SplitHTTP is now XHTTP for xray

This commit is contained in:
2dust
2024-11-13 19:48:44 +08:00
parent 2de9e14c7d
commit 04efed2079
13 changed files with 39 additions and 24 deletions
@@ -26,7 +26,7 @@ namespace ServiceLib.Services.CoreConfig
ret.Msg = ResUI.CheckServerSettings;
return ret;
}
if (node.GetNetwork() is nameof(ETransport.kcp) or nameof(ETransport.splithttp))
if (node.GetNetwork() is nameof(ETransport.kcp) or nameof(ETransport.splithttp) or nameof(ETransport.xhttp))
{
ret.Msg = ResUI.Incorrectconfiguration + $" - {node.GetNetwork()}";
return ret;
@@ -926,23 +926,26 @@ namespace ServiceLib.Services.CoreConfig
streamSettings.httpupgradeSettings = httpupgradeSettings;
break;
//splithttp
//splithttp //xhttp
case nameof(ETransport.splithttp):
SplithttpSettings4Ray splithttpSettings = new()
case nameof(ETransport.xhttp):
streamSettings.network = ETransport.xhttp.ToString();
XhttpSettings4Ray xhttpSettings = new()
{
maxUploadSize = 1000000,
maxConcurrentUploads = 10
scMaxEachPostBytes = "500000-1000000",
scMaxConcurrentPosts = "50-100",
scMinPostsIntervalMs = "30-50"
};
if (Utils.IsNotEmpty(node.Path))
{
splithttpSettings.path = node.Path;
xhttpSettings.path = node.Path;
}
if (Utils.IsNotEmpty(host))
{
splithttpSettings.host = host;
xhttpSettings.host = host;
}
streamSettings.splithttpSettings = splithttpSettings;
streamSettings.xhttpSettings = xhttpSettings;
break;
//h2