From 876a662b5a1cc0355bdb76625938a44b1d0168b6 Mon Sep 17 00:00:00 2001 From: RPRX <63339210+rprx@users.noreply.github.com> Date: Thu, 5 Nov 2020 15:10:19 +0000 Subject: [PATCH] Fallback to Trojan by default --- VLESS-TCP-XTLS-WHATEVER/README.md | 3 ++ .../config_client/trojan_tcp_tls.json | 37 +++++++++++++++++++ VLESS-TCP-XTLS-WHATEVER/config_server.json | 31 +++++++++++++++- 3 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 VLESS-TCP-XTLS-WHATEVER/config_client/trojan_tcp_tls.json diff --git a/VLESS-TCP-XTLS-WHATEVER/README.md b/VLESS-TCP-XTLS-WHATEVER/README.md index 4b12208..6df6381 100644 --- a/VLESS-TCP-XTLS-WHATEVER/README.md +++ b/VLESS-TCP-XTLS-WHATEVER/README.md @@ -9,7 +9,10 @@ 3. VLESS over WS with TLS 4. VMess over TCP with TLS 5. VMess over WS with TLS +6. Trojan over TCP with TLS --- +这里设置默认回落到 V2Ray 的 Trojan 协议,再继续回落到 80 端口的 Web 服务器(也可以换成数据库、FTP 等) + 你还可以配置回落到 Caddy 的 forwardproxy 等其它也防探测的代理,以及分流到任何支持 WebSocket 的代理,都没有问题 diff --git a/VLESS-TCP-XTLS-WHATEVER/config_client/trojan_tcp_tls.json b/VLESS-TCP-XTLS-WHATEVER/config_client/trojan_tcp_tls.json new file mode 100644 index 0000000..494269b --- /dev/null +++ b/VLESS-TCP-XTLS-WHATEVER/config_client/trojan_tcp_tls.json @@ -0,0 +1,37 @@ +{ + "log": { + "loglevel": "warning" + }, + "inbounds": [ + { + "port": 10800, + "listen": "127.0.0.1", + "protocol": "socks", + "settings": { + "udp": true + } + } + ], + "outbounds": [ + { + "protocol": "trojan", + "settings": { + "vnext": [ + { + "address": "example.com", // 换成你的域名或服务器 IP(发起请求时无需解析域名了) + "port": 443, + "password": "", // 填写你的密码 + "level": 0 + } + ] + }, + "streamSettings": { + "network": "tcp", + "security": "tls", + "tlsSettings": { + "serverName": "example.com" // 换成你的域名 + } + } + } + ] +} \ No newline at end of file diff --git a/VLESS-TCP-XTLS-WHATEVER/config_server.json b/VLESS-TCP-XTLS-WHATEVER/config_server.json index 1c3b3ef..ebd5e84 100644 --- a/VLESS-TCP-XTLS-WHATEVER/config_server.json +++ b/VLESS-TCP-XTLS-WHATEVER/config_server.json @@ -18,7 +18,8 @@ "decryption": "none", "fallbacks": [ { - "dest": 80 // 或者回落到其它也防探测的代理 + "dest": 1310, // 默认回落到 V2Ray 的 Trojan 协议 + "xver": 1 }, { "path": "/websocket", // 必须换成自定义的 PATH @@ -53,6 +54,32 @@ } } }, + { + "port": 1310, + "listen": "127.0.0.1", + "protocol": "trojan", + "settings": { + "clients": [ + { + "password": "", // 填写你的密码 + "level": 0, + "email": "love@v2fly.org" + } + ], + "fallbacks": [ + { + "dest": 80 // 或者回落到其它也防探测的代理 + } + ] + }, + "streamSettings": { + "network": "tcp", + "security": "none", + "tcpSettings": { + "acceptProxyProtocol": true + } + } + }, { "port": 1234, "listen": "127.0.0.1", @@ -133,4 +160,4 @@ "protocol": "freedom" } ] -} +} \ No newline at end of file