mirror of
https://github.com/2dust/v2rayN.git
synced 2025-05-03 05:38:51 +00:00
ss supports transport settings
This commit is contained in:
parent
fec8641efe
commit
dd65c3fcaa
2 changed files with 10 additions and 18 deletions
|
@ -32,8 +32,8 @@ namespace v2rayN.Forms
|
||||||
case EConfigType.Shadowsocks:
|
case EConfigType.Shadowsocks:
|
||||||
panSs.Dock = DockStyle.Fill;
|
panSs.Dock = DockStyle.Fill;
|
||||||
panSs.Visible = true;
|
panSs.Visible = true;
|
||||||
panTran.Visible = false;
|
//panTran.Visible = false;
|
||||||
this.Height = this.Height - panTran.Height;
|
//this.Height = this.Height - panTran.Height;
|
||||||
|
|
||||||
cmbSecurity3.Items.AddRange(LazyConfig.Instance.GetShadowsocksSecuritys().ToArray());
|
cmbSecurity3.Items.AddRange(LazyConfig.Instance.GetShadowsocksSecuritys().ToArray());
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -406,9 +406,7 @@ namespace v2rayN.Handler
|
||||||
outbound.mux.enabled = config.muxEnabled;
|
outbound.mux.enabled = config.muxEnabled;
|
||||||
outbound.mux.concurrency = config.muxEnabled ? 8 : -1;
|
outbound.mux.concurrency = config.muxEnabled ? 8 : -1;
|
||||||
|
|
||||||
//远程服务器底层传输配置
|
boundStreamSettings(node, "out", outbound.streamSettings);
|
||||||
StreamSettings streamSettings = outbound.streamSettings;
|
|
||||||
boundStreamSettings(node, "out", ref streamSettings);
|
|
||||||
|
|
||||||
outbound.protocol = Global.vmessProtocolLite;
|
outbound.protocol = Global.vmessProtocolLite;
|
||||||
outbound.settings.servers = null;
|
outbound.settings.servers = null;
|
||||||
|
@ -445,6 +443,7 @@ namespace v2rayN.Handler
|
||||||
outbound.mux.enabled = false;
|
outbound.mux.enabled = false;
|
||||||
outbound.mux.concurrency = -1;
|
outbound.mux.concurrency = -1;
|
||||||
|
|
||||||
|
boundStreamSettings(node, "out", outbound.streamSettings);
|
||||||
|
|
||||||
outbound.protocol = Global.ssProtocolLite;
|
outbound.protocol = Global.ssProtocolLite;
|
||||||
outbound.settings.vnext = null;
|
outbound.settings.vnext = null;
|
||||||
|
@ -522,9 +521,7 @@ namespace v2rayN.Handler
|
||||||
outbound.mux.enabled = config.muxEnabled;
|
outbound.mux.enabled = config.muxEnabled;
|
||||||
outbound.mux.concurrency = config.muxEnabled ? 8 : -1;
|
outbound.mux.concurrency = config.muxEnabled ? 8 : -1;
|
||||||
|
|
||||||
//远程服务器底层传输配置
|
boundStreamSettings(node, "out", outbound.streamSettings);
|
||||||
StreamSettings streamSettings = outbound.streamSettings;
|
|
||||||
boundStreamSettings(node, "out", ref streamSettings);
|
|
||||||
|
|
||||||
//if xtls
|
//if xtls
|
||||||
if (node.streamSecurity == Global.StreamSecurityX)
|
if (node.streamSecurity == Global.StreamSecurityX)
|
||||||
|
@ -585,10 +582,7 @@ namespace v2rayN.Handler
|
||||||
outbound.mux.enabled = false;
|
outbound.mux.enabled = false;
|
||||||
outbound.mux.concurrency = -1;
|
outbound.mux.concurrency = -1;
|
||||||
|
|
||||||
|
boundStreamSettings(node, "out", outbound.streamSettings);
|
||||||
//远程服务器底层传输配置
|
|
||||||
StreamSettings streamSettings = outbound.streamSettings;
|
|
||||||
boundStreamSettings(node, "out", ref streamSettings);
|
|
||||||
|
|
||||||
outbound.protocol = Global.trojanProtocolLite;
|
outbound.protocol = Global.trojanProtocolLite;
|
||||||
outbound.settings.vnext = null;
|
outbound.settings.vnext = null;
|
||||||
|
@ -601,18 +595,18 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// vmess协议远程服务器底层传输配置
|
/// 底层传输配置
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="node"></param>
|
/// <param name="node"></param>
|
||||||
/// <param name="iobound"></param>
|
/// <param name="iobound"></param>
|
||||||
/// <param name="streamSettings"></param>
|
/// <param name="streamSettings"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private static int boundStreamSettings(VmessItem node, string iobound, ref StreamSettings streamSettings)
|
private static int boundStreamSettings(VmessItem node, string iobound, StreamSettings streamSettings)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var config = LazyConfig.Instance.GetConfig();
|
var config = LazyConfig.Instance.GetConfig();
|
||||||
//远程服务器底层传输配置
|
|
||||||
streamSettings.network = node.GetNetwork();
|
streamSettings.network = node.GetNetwork();
|
||||||
string host = node.requestHost.TrimEx();
|
string host = node.requestHost.TrimEx();
|
||||||
string sni = node.sni;
|
string sni = node.sni;
|
||||||
|
@ -1088,9 +1082,7 @@ namespace v2rayN.Handler
|
||||||
inbound.settings.decryption = node.security;
|
inbound.settings.decryption = node.security;
|
||||||
}
|
}
|
||||||
|
|
||||||
//远程服务器底层传输配置
|
boundStreamSettings(node, "in", inbound.streamSettings);
|
||||||
StreamSettings streamSettings = inbound.streamSettings;
|
|
||||||
boundStreamSettings(node, "in", ref streamSettings);
|
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue