Bug fix singbox transport type http

pull/4802/head
2dust 2024-03-02 09:58:50 +08:00
parent 3d5168885f
commit 66e40edd0e
1 changed files with 18 additions and 8 deletions

View File

@ -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;