https://github.com/2dust/v2rayN/issues/9277
This commit is contained in:
2dust
2026-05-12 09:10:22 +08:00
parent d1c9c0b536
commit 51b384e119
@@ -491,7 +491,6 @@ public partial class CoreConfigV2rayService
//ws
case nameof(ETransport.ws):
WsSettings4Ray wsSettings = new();
wsSettings.headers = new Headers4Ray();
if (host.IsNotEmpty())
{
@@ -503,6 +502,7 @@ public partial class CoreConfigV2rayService
}
if (useragent.IsNotEmpty())
{
wsSettings.headers ??= new Headers4Ray();
wsSettings.headers.UserAgent = useragent;
}
streamSettings.wsSettings = wsSettings;
@@ -522,6 +522,7 @@ public partial class CoreConfigV2rayService
}
if (useragent.IsNotEmpty())
{
httpupgradeSettings.headers ??= new Headers4Ray();
httpupgradeSettings.headers.UserAgent = useragent;
}
streamSettings.httpupgradeSettings = httpupgradeSettings;