请教: HaProxy 如何中转 Trojan?

2020-03-04 10:10:28 +08:00
 idragonet
晚上公司电信爆卡通过梯子只能 20-30kb,想通过境内 VPS 安装 HaProxy 如何中转 Trojan
901 次点击
所在节点    云计算
7 条回复
learningman
2020-03-04 12:39:48 +08:00
Trojan 貌似可以直接用 nginx 代理
其实是我不会配 HaProxy)
idragonet
2020-03-04 12:53:43 +08:00
@learningman nginx 做 TCP 转发?
hiplon
2020-03-04 13:26:36 +08:00
frontend v2ray-in
bind *:12000
default_backend v2ray-out

backend v2ray-out
server server1 172.18.x.x:12000 maxconn 20480

没用过 Trojan 应该差不多
learningman
2020-03-04 14:28:56 +08:00
@idragonet ssl_preread
yulihao
2020-03-04 19:24:34 +08:00
@hiplon 有 SSL 的,不能这样
tvirus
2020-03-05 22:26:54 +08:00
backend trojan
server trojan xxxx.com:443 check-ssl verify none
whitegerry
2020-03-10 11:43:45 +08:00
frontend ssl
mode tcp
bind *:443
tcp-request inspect-delay 5s
tcp-request content accept if { req.ssl_hello_type 1 }

acl trojan req_ssl_sni -i abc.com

use_backend trojan if trojan
use_backend nginx if !trojan

backend trojan
mode tcp
server trojan 127.0.0.1:3443

backend nginx
mode tcp
option ssl-hello-chk
server nginx 127.0.0.1:4443

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/649665

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX