From 126523449103296193d32255c2bba54af4d614d4 Mon Sep 17 00:00:00 2001 From: miniusercoder Date: Thu, 9 Apr 2026 18:48:37 +0300 Subject: [PATCH] xray with xhttp configuration --- docs/Setup_examples/XRAY_DOUBLE_HOP.en.md | 45 +++++++++++------------ docs/Setup_examples/XRAY_DOUBLE_HOP.ru.md | 45 +++++++++++------------ 2 files changed, 44 insertions(+), 46 deletions(-) diff --git a/docs/Setup_examples/XRAY_DOUBLE_HOP.en.md b/docs/Setup_examples/XRAY_DOUBLE_HOP.en.md index a855ec0..59156e2 100644 --- a/docs/Setup_examples/XRAY_DOUBLE_HOP.en.md +++ b/docs/Setup_examples/XRAY_DOUBLE_HOP.en.md @@ -40,6 +40,11 @@ xray x25519 openssl rand -hex 16 # Save the output (e.g.: 0123456789abcdef0123456789abcdef) — this is ``` +4. **Random Path (for xhttp):** +```bash +openssl rand -hex 8 +# Save the output (e.g., abc123def456) to replace in configs +``` --- @@ -61,6 +66,7 @@ File content: }, "inbounds": [ { + "tag": "vless-in", "port": 443, "protocol": "vless", "settings": { @@ -72,7 +78,7 @@ File content: "decryption": "none" }, "streamSettings": { - "network": "tcp", + "network": "xhttp", "security": "reality", "realitySettings": { "dest": "yahoo.com:443", @@ -83,31 +89,32 @@ File content: "shortIds": [ "" ] + }, + "xhttpSettings": { + "path": "/", + "mode": "auto" } - }, - "sockopt": { - "tcpFastOpen": true, - "tcpNoDelay": true, - "tcpKeepAliveIdle": 60, - "tcpKeepAliveInterval": 15 } } ], "outbounds": [ { + "tag": "tunnel-to-telemt", "protocol": "freedom", - "tag": "direct", "settings": { "destination": "127.0.0.1:8443" } } ], "routing": { + "domainStrategy": "AsIs", "rules": [ { "type": "field", - "inboundTag": ["all-in"], - "outboundTag": "direct" + "inboundTag": [ + "vless-in" + ], + "outboundTag": "tunnel-to-telemt" } ] } @@ -156,6 +163,7 @@ File content: ], "outbounds": [ { + "tag": "vless-out", "protocol": "vless", "settings": { "vnext": [ @@ -172,27 +180,18 @@ File content: ] }, "streamSettings": { - "network": "tcp", + "network": "xhttp", "security": "reality", "realitySettings": { "serverName": "yahoo.com", "publicKey": "", "shortId": "", - "spiderX": "", + "spiderX": "/", "fingerprint": "chrome" }, - "sockopt": { - "tcpFastOpen": true, - "tcpNoDelay": true, - "tcpKeepAliveIdle": 60, - "tcpKeepAliveInterval": 15 + "xhttpSettings": { + "path": "/" } - }, - "mux": { - "enabled": true, - "concurrency": 256, - "xudpConcurrency": 16, - "xudpProxyUDP443": "reject" } } ] diff --git a/docs/Setup_examples/XRAY_DOUBLE_HOP.ru.md b/docs/Setup_examples/XRAY_DOUBLE_HOP.ru.md index 757987b..e9d0628 100644 --- a/docs/Setup_examples/XRAY_DOUBLE_HOP.ru.md +++ b/docs/Setup_examples/XRAY_DOUBLE_HOP.ru.md @@ -40,6 +40,11 @@ xray x25519 openssl rand -hex 16 # Сохраните вывод (например: 0123456789abcdef0123456789abcdef) — это ``` +4. **Random Path (путь для xhttp):** +```bash +openssl rand -hex 8 +# Сохраните вывод (например, abc123def456), чтобы заменить в конфигах +``` --- @@ -61,6 +66,7 @@ nano /usr/local/etc/xray/config.json }, "inbounds": [ { + "tag": "vless-in", "port": 443, "protocol": "vless", "settings": { @@ -72,7 +78,7 @@ nano /usr/local/etc/xray/config.json "decryption": "none" }, "streamSettings": { - "network": "tcp", + "network": "xhttp", "security": "reality", "realitySettings": { "dest": "yahoo.com:443", @@ -83,31 +89,32 @@ nano /usr/local/etc/xray/config.json "shortIds": [ "" ] + }, + "xhttpSettings": { + "path": "/", + "mode": "auto" } - }, - "sockopt": { - "tcpFastOpen": true, - "tcpNoDelay": true, - "tcpKeepAliveIdle": 60, - "tcpKeepAliveInterval": 15 } } ], "outbounds": [ { + "tag": "tunnel-to-telemt", "protocol": "freedom", - "tag": "direct", "settings": { "destination": "127.0.0.1:8443" } } ], "routing": { + "domainStrategy": "AsIs", "rules": [ { "type": "field", - "inboundTag": ["all-in"], - "outboundTag": "direct" + "inboundTag": [ + "vless-in" + ], + "outboundTag": "tunnel-to-telemt" } ] } @@ -156,6 +163,7 @@ nano /usr/local/etc/xray/config.json ], "outbounds": [ { + "tag": "vless-out", "protocol": "vless", "settings": { "vnext": [ @@ -172,27 +180,18 @@ nano /usr/local/etc/xray/config.json ] }, "streamSettings": { - "network": "tcp", + "network": "xhttp", "security": "reality", "realitySettings": { "serverName": "yahoo.com", "publicKey": "", "shortId": "", - "spiderX": "", + "spiderX": "/", "fingerprint": "chrome" }, - "sockopt": { - "tcpFastOpen": true, - "tcpNoDelay": true, - "tcpKeepAliveIdle": 60, - "tcpKeepAliveInterval": 15 + "xhttpSettings": { + "path": "/" } - }, - "mux": { - "enabled": true, - "concurrency": 256, - "xudpConcurrency": 16, - "xudpProxyUDP443": "reject" } } ]