XHTTP client: Set packet-up as the default mode (auto) when using TLS

https://t.me/projectXtls/929
This commit is contained in:
RPRX 2025-04-18 06:18:51 +00:00 committed by GitHub
parent 2916b1b977
commit 0995fa41fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -281,11 +281,11 @@ func Dial(ctx context.Context, dest net.Destination, streamSettings *internet.Me
mode := transportConfiguration.Mode
if mode == "" || mode == "auto" {
mode = "packet-up"
if httpVersion == "2" {
mode = "stream-up"
}
if realityConfig != nil && transportConfiguration.DownloadSettings == nil {
if realityConfig != nil {
mode = "stream-one"
if transportConfiguration.DownloadSettings != nil {
mode = "stream-up"
}
}
}