mirror of
https://github.com/netchx/netch.git
synced 2026-04-01 19:15:09 +08:00
Refactor Server.Type
This commit is contained in:
@@ -11,36 +11,37 @@ namespace Netch.Models
|
||||
/// 延迟
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public int Delay = -1;
|
||||
public int Delay { get; private set; } = -1;
|
||||
|
||||
/// <summary>
|
||||
/// 组
|
||||
/// </summary>
|
||||
public string Group = "None";
|
||||
public string Group { get; set; } = "None";
|
||||
|
||||
/// <summary>
|
||||
/// 地址
|
||||
/// </summary>
|
||||
public string Hostname;
|
||||
public string Hostname { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 端口
|
||||
/// </summary>
|
||||
public ushort Port;
|
||||
public ushort Port { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 倍率
|
||||
/// </summary>
|
||||
public double Rate = 1.0;
|
||||
public double Rate { get; } = 1.0;
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Remark;
|
||||
public string Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 代理类型
|
||||
/// </summary>
|
||||
public string Type;
|
||||
public virtual string Type { get; } = "WTF";
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
|
||||
@@ -5,10 +5,7 @@ namespace Netch.Servers.Shadowsocks
|
||||
{
|
||||
public class Shadowsocks : Server
|
||||
{
|
||||
public Shadowsocks()
|
||||
{
|
||||
Type = "SS";
|
||||
}
|
||||
public override string Type { get; } = "SS";
|
||||
|
||||
/// <summary>
|
||||
/// 加密方式
|
||||
|
||||
@@ -5,10 +5,7 @@ namespace Netch.Servers.ShadowsocksR
|
||||
{
|
||||
public class ShadowsocksR : Server
|
||||
{
|
||||
public ShadowsocksR()
|
||||
{
|
||||
Type = "SSR";
|
||||
}
|
||||
public override string Type { get; } = "SSR";
|
||||
|
||||
/// <summary>
|
||||
/// 加密方式
|
||||
|
||||
@@ -14,10 +14,7 @@ namespace Netch.Servers.Socks5
|
||||
/// </summary>
|
||||
public string Username;
|
||||
|
||||
public Socks5()
|
||||
{
|
||||
Type = "Socks5";
|
||||
}
|
||||
public override string Type { get; } = "Socks5";
|
||||
|
||||
public bool Auth()
|
||||
{
|
||||
|
||||
@@ -4,10 +4,7 @@ namespace Netch.Servers.Trojan
|
||||
{
|
||||
public class Trojan : Server
|
||||
{
|
||||
public Trojan()
|
||||
{
|
||||
Type = "Trojan";
|
||||
}
|
||||
public override string Type { get; } = "Trojan";
|
||||
|
||||
/// <summary>
|
||||
/// 密码
|
||||
|
||||
@@ -5,10 +5,7 @@ namespace Netch.Servers.VLESS
|
||||
{
|
||||
public class VLESS : VMess.VMess
|
||||
{
|
||||
public VLESS()
|
||||
{
|
||||
Type = "VLESS";
|
||||
}
|
||||
public override string Type { get; } = "VLESS";
|
||||
|
||||
/// <summary>
|
||||
/// 加密方式
|
||||
|
||||
@@ -7,10 +7,7 @@ namespace Netch.Servers.VMess
|
||||
{
|
||||
private string _tlsSecureType = VMessGlobal.TLSSecure[0];
|
||||
|
||||
public VMess()
|
||||
{
|
||||
Type = "VMess";
|
||||
}
|
||||
public override string Type { get; } = "VMess";
|
||||
|
||||
/// <summary>
|
||||
/// 用户 ID
|
||||
|
||||
Reference in New Issue
Block a user