From 0995fa41fe692e332412670665bd934e4c734caa Mon Sep 17 00:00:00 2001
From: RPRX <63339210+RPRX@users.noreply.github.com>
Date: Fri, 18 Apr 2025 06:18:51 +0000
Subject: [PATCH] XHTTP client: Set packet-up as the default `mode` (auto) when
 using TLS

https://t.me/projectXtls/929
---
 transport/internet/splithttp/dialer.go | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/transport/internet/splithttp/dialer.go b/transport/internet/splithttp/dialer.go
index f996a42e..c5fba78b 100644
--- a/transport/internet/splithttp/dialer.go
+++ b/transport/internet/splithttp/dialer.go
@@ -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"
+			}
 		}
 	}