fix documentation for Xray double hop setup

This commit is contained in:
miniusercoder 2026-04-08 22:24:51 +03:00
parent 970313edcb
commit a526fee728
No known key found for this signature in database
GPG Key ID: 0B0F00BB88306C1F
2 changed files with 88 additions and 66 deletions

View File

@ -72,7 +72,7 @@ File content:
"decryption": "none" "decryption": "none"
}, },
"streamSettings": { "streamSettings": {
"network": "xhttp", "network": "tcp",
"security": "reality", "security": "reality",
"realitySettings": { "realitySettings": {
"dest": "yahoo.com:443", "dest": "yahoo.com:443",
@ -83,20 +83,34 @@ File content:
"shortIds": [ "shortIds": [
"<SHORT_ID>" "<SHORT_ID>"
] ]
},
"xhttpSettings": {
"mode": "auto",
"path": "/api/v3/sync"
} }
},
"sockopt": {
"tcpFastOpen": true,
"tcpNoDelay": true,
"tcpKeepAliveIdle": 60,
"tcpKeepAliveInterval": 15
} }
} }
], ],
"outbounds": [ "outbounds": [
{ {
"protocol": "freedom", "protocol": "freedom",
"tag": "direct" "tag": "direct",
"settings": {
"destination": "127.0.0.1:8443"
}
} }
] ],
"routing": {
"rules": [
{
"type": "field",
"inboundTag": ["all-in"],
"outboundTag": "direct"
}
]
}
} }
``` ```
@ -158,7 +172,7 @@ File content:
] ]
}, },
"streamSettings": { "streamSettings": {
"network": "xhttp", "network": "tcp",
"security": "reality", "security": "reality",
"realitySettings": { "realitySettings": {
"serverName": "yahoo.com", "serverName": "yahoo.com",
@ -167,13 +181,18 @@ File content:
"spiderX": "", "spiderX": "",
"fingerprint": "chrome" "fingerprint": "chrome"
}, },
"xhttpSettings": { "sockopt": {
"mode": "auto", "tcpFastOpen": true,
"path": "/api/v3/sync", "tcpNoDelay": true,
"xmux": { "tcpKeepAliveIdle": 60,
"maxConcurrency": 256 "tcpKeepAliveInterval": 15
}
} }
},
"mux": {
"enabled": true,
"concurrency": 256,
"xudpConcurrency": 16,
"xudpProxyUDP443": "reject"
} }
} }
] ]
@ -226,37 +245,29 @@ services:
#### Create HAProxy Config `haproxy.cfg` #### Create HAProxy Config `haproxy.cfg`
```haproxy ```haproxy
global global
# Disable connection logs under high load log stdout format raw local0
log stdout format raw local0 err maxconn 10000
maxconn 250000
# Use all CPU threads
nbthread 2
# Tune buffers and socket limits
tune.bufsize 16384
tune.maxaccept 64
defaults defaults
log global log global
mode tcp mode tcp
option tcplog
option clitcpka option clitcpka
option srvtcpka option srvtcpka
timeout connect 5s timeout connect 5s
timeout client 1h timeout client 2h
timeout server 1h timeout server 2h
# Fast drop dead peers timeout check 5s
timeout client-fin 10s
timeout server-fin 10s
frontend proxy_in frontend tcp_in_443
bind *:443 bind *:443
maxconn 250000 maxconn 8000
option tcp-smart-accept option tcp-smart-accept
default_backend telemt_backend default_backend telemt_nodes
backend telemt_backend backend telemt_nodes
option tcp-smart-connect option tcp-smart-connect
# Send-Proxy-V2 is strictly required for telemt IP masking to function over Xray correctly! server telemt_core 127.0.0.1:10443 check inter 5s rise 2 fall 3 maxconn 250000 send-proxy-v2
server telemt_core 127.0.0.1:10443 maxconn 250000 send-proxy-v2 check inter 5s
``` ```
>[!WARNING] >[!WARNING]

View File

@ -72,7 +72,7 @@ nano /usr/local/etc/xray/config.json
"decryption": "none" "decryption": "none"
}, },
"streamSettings": { "streamSettings": {
"network": "xhttp", "network": "tcp",
"security": "reality", "security": "reality",
"realitySettings": { "realitySettings": {
"dest": "yahoo.com:443", "dest": "yahoo.com:443",
@ -83,20 +83,34 @@ nano /usr/local/etc/xray/config.json
"shortIds": [ "shortIds": [
"<SHORT_ID>" "<SHORT_ID>"
] ]
},
"xhttpSettings": {
"mode": "auto",
"path": "/api/v3/sync"
} }
},
"sockopt": {
"tcpFastOpen": true,
"tcpNoDelay": true,
"tcpKeepAliveIdle": 60,
"tcpKeepAliveInterval": 15
} }
} }
], ],
"outbounds": [ "outbounds": [
{ {
"protocol": "freedom", "protocol": "freedom",
"tag": "direct" "tag": "direct",
"settings": {
"destination": "127.0.0.1:8443"
}
} }
] ],
"routing": {
"rules": [
{
"type": "field",
"inboundTag": ["all-in"],
"outboundTag": "direct"
}
]
}
} }
``` ```
@ -158,7 +172,7 @@ nano /usr/local/etc/xray/config.json
] ]
}, },
"streamSettings": { "streamSettings": {
"network": "xhttp", "network": "tcp",
"security": "reality", "security": "reality",
"realitySettings": { "realitySettings": {
"serverName": "yahoo.com", "serverName": "yahoo.com",
@ -167,13 +181,18 @@ nano /usr/local/etc/xray/config.json
"spiderX": "", "spiderX": "",
"fingerprint": "chrome" "fingerprint": "chrome"
}, },
"xhttpSettings": { "sockopt": {
"mode": "auto", "tcpFastOpen": true,
"path": "/api/v3/sync", "tcpNoDelay": true,
"xmux": { "tcpKeepAliveIdle": 60,
"maxConcurrency": 256 "tcpKeepAliveInterval": 15
}
} }
},
"mux": {
"enabled": true,
"concurrency": 256,
"xudpConcurrency": 16,
"xudpProxyUDP443": "reject"
} }
} }
] ]
@ -226,37 +245,29 @@ services:
#### Создаем файл конфигурации `haproxy.cfg` #### Создаем файл конфигурации `haproxy.cfg`
```haproxy ```haproxy
global global
# Отключить детальные логи соединений под нагрузкой log stdout format raw local0
log stdout format raw local0 err maxconn 10000
maxconn 250000
# Использовать все ядра CPU
nbthread 2
# Тюнинг буферов и приема сокетов
tune.bufsize 16384
tune.maxaccept 64
defaults defaults
log global log global
mode tcp mode tcp
option tcplog
option clitcpka option clitcpka
option srvtcpka option srvtcpka
timeout connect 5s timeout connect 5s
timeout client 1h timeout client 2h
timeout server 1h timeout server 2h
# Быстрая очистка мертвых пиров timeout check 5s
timeout client-fin 10s
timeout server-fin 10s
frontend proxy_in frontend tcp_in_443
bind *:443 bind *:443
maxconn 250000 maxconn 8000
option tcp-smart-accept option tcp-smart-accept
default_backend telemt_backend default_backend telemt_nodes
backend telemt_backend backend telemt_nodes
option tcp-smart-connect option tcp-smart-connect
# Send-Proxy-V2 обязателен для сохранения IP клиента внутри внутренней логики Telemt server telemt_core 127.0.0.1:10443 check inter 5s rise 2 fall 3 maxconn 250000 send-proxy-v2
server telemt_core 127.0.0.1:10443 maxconn 250000 send-proxy-v2 check inter 5s
``` ```
>[!WARNING] >[!WARNING]