mirror of https://github.com/2dust/v2rayN
Bug fix singbox transport type http
parent
3d5168885f
commit
66e40edd0e
|
@ -238,14 +238,6 @@ namespace v2rayN.Handler
|
|||
outbound.method = LazyConfig.Instance.GetShadowsocksSecurities(node).Contains(node.security) ? node.security : Global.None;
|
||||
outbound.password = node.id;
|
||||
|
||||
if (node.network == Global.DefaultNetwork
|
||||
&& node.headerType == Global.TcpHeaderHttp
|
||||
&& node.requestHost.IsNullOrEmpty() == false)
|
||||
{
|
||||
outbound.plugin = "obfs-local";
|
||||
outbound.plugin_opts = $"obfs=http;obfs-host={node.requestHost};";
|
||||
}
|
||||
|
||||
GenOutboundMux(node, outbound);
|
||||
}
|
||||
else if (node.configType == EConfigType.Socks)
|
||||
|
@ -419,6 +411,24 @@ namespace v2rayN.Handler
|
|||
transport.path = Utile.IsNullOrEmpty(node.path) ? null : node.path;
|
||||
break;
|
||||
|
||||
case "tcp": //http
|
||||
if (node.headerType == Global.TcpHeaderHttp)
|
||||
{
|
||||
if (node.configType == EConfigType.Shadowsocks)
|
||||
{
|
||||
outbound.plugin = "obfs-local";
|
||||
outbound.plugin_opts = $"obfs=http;obfs-host={node.requestHost};";
|
||||
}
|
||||
else
|
||||
{
|
||||
transport.type = "http";
|
||||
transport.host = Utile.IsNullOrEmpty(node.requestHost) ? null : Utile.String2List(node.requestHost);
|
||||
transport.path = Utile.IsNullOrEmpty(node.path) ? null : node.path;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case "ws":
|
||||
transport.type = "ws";
|
||||
transport.path = Utile.IsNullOrEmpty(node.path) ? null : node.path;
|
||||
|
|
Loading…
Reference in New Issue