利用 NGINX 的 Stream 模塊 sni_preread 功能,可以做到讓 Trojan 和其他網站在同一台機器上共享 443 端口。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
method=$1 | |
ss-tunnel -k test -m $method -l 8387 -L 127.0.0.1:8388 -s 127.0.0.1 -p 8389 & | |
ss_tunnel_pid=$! | |
ss-server -k test -m $method -s 127.0.0.1 -p 8389 & | |
ss_server_pid=$! | |
iperf -s -p 8388 & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: 启动后需要保留窗口, 关闭窗口则结束进程 | |
aria2c --conf-path=aria2.conf -D |