This commit is contained in:
SpringHgui 2020-09-27 23:59:38 +08:00
commit 056e770341
3 changed files with 15 additions and 3 deletions

View File

@ -78,8 +78,9 @@ namespace FastTunnel.Client
Content = new LogInMassage
{
Webs = config.Webs,
SSH = config.SSH
}
SSH = config.SSH,
AuthInfo = "ODadoNDONODHSoDMFMsdpapdoNDSHDoadpwPDNoWAHDoNfa"
},
});
return _client;

View File

@ -7,8 +7,19 @@ namespace FastTunnel.Core.Models
{
public class LogInMassage : TunnelMassage
{
/// <summary>
/// web穿透隧道列表
/// </summary>
public IEnumerable<WebConfig> Webs { get; set; }
/// <summary>
/// 端口转发隧道列表
/// </summary>
public IEnumerable<SSHConfig> SSH { get; set; }
/// <summary>
/// 身份信息,用于服务端认证
/// </summary>
public string AuthInfo { get; set; }
}
}

View File

@ -12,7 +12,7 @@ namespace FastTunnel.Server.Filters
{
public bool Authentication(FastTunnelServer server, LogInMassage requet)
{
return true;
return !string.IsNullOrEmpty(requet.AuthInfo) && requet.AuthInfo.Equals("ODadoNDONODHSoDMFMsdpapdoNDSHDoadpwPDNoWAHDoNfa");
}
}
}