mirror of https://github.com/telemt/telemt.git
fix documentation for Xray double hop setup
This commit is contained in:
parent
970313edcb
commit
a526fee728
|
|
@ -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,21 +83,35 @@ 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"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Open the firewall port (if enabled):
|
Open the firewall port (if enabled):
|
||||||
|
|
@ -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]
|
||||||
|
|
|
||||||
|
|
@ -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,21 +83,35 @@ 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]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue