Skip to content

Commit

Permalink
up tls
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed Sep 11, 2019
1 parent a8f1a99 commit 01fdb08
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
5 changes: 5 additions & 0 deletions v2rayN/v2rayN/Global.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ class Global
/// 阻止 tag值
/// </summary>
public const string blockTag = "block";

/// <summary>
///
/// </summary>
public const string StreamSecurity = "tls";

/// <summary>
/// vmess
Expand Down
17 changes: 16 additions & 1 deletion v2rayN/v2rayN/Handler/V2rayConfigHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ private static int boundStreamSettings(Config config, string iobound, ref Stream
var host = config.requestHost();

//if tls
if (config.streamSecurity() == "tls")
if (config.streamSecurity() == Global.StreamSecurity)
{
streamSettings.security = config.streamSecurity();

Expand Down Expand Up @@ -964,6 +964,13 @@ public static VmessItem ImportFromClientConfig(string fileName, out string msg)
}
}

//tls
if (outbound.streamSettings != null
&& outbound.streamSettings.security != null
&& outbound.streamSettings.security == Global.StreamSecurity)
{
vmessItem.streamSecurity = Global.StreamSecurity;
}
}
catch
{
Expand Down Expand Up @@ -1101,6 +1108,14 @@ public static VmessItem ImportFromServerConfig(string fileName, out string msg)
vmessItem.requestHost = Utils.List2String(inbound.streamSettings.httpSettings.host);
}
}

//tls
if (inbound.streamSettings != null
&& inbound.streamSettings.security != null
&& inbound.streamSettings.security == Global.StreamSecurity)
{
vmessItem.streamSecurity = Global.StreamSecurity;
}
}
catch
{
Expand Down

0 comments on commit 01fdb08

Please sign in to comment.