Files
netch/Netch/Servers/Socks5/Socks5.cs
ChsBuffer 5109134843 Log Third-party drivers when open
Log Server.MaskData when start
Remove application Log to console
2021-07-02 19:04:21 +08:00

45 lines
977 B
C#

using Netch.Models;
namespace Netch.Servers
{
public class Socks5 : Server
{
/// <summary>
/// 密码
/// </summary>
public string? Password;
/// <summary>
/// 账号
/// </summary>
public string? Username;
public override string Type { get; } = "Socks5";
public override string MaskedData()
{
return $"Auth: {Auth()}";
}
public Socks5()
{
}
public Socks5(string hostname, ushort port)
{
Hostname = hostname;
Port = port;
}
public Socks5(string hostname, ushort port, string username, string password) : this(hostname, port)
{
Username = username;
Password = password;
}
public bool Auth()
{
return !string.IsNullOrWhiteSpace(Username) && !string.IsNullOrWhiteSpace(Password);
}
}
}