跳转到内容
shoes

trojan_tls_through_socks.yaml

所有示例

使用前请修改地址、凭据、证书路径和其他部署相关的值。这是完整的源文件,但不保证未经修改即可在你的机器上运行。请阅读文件中的注释了解前置条件,然后对修改后的文件运行 shoes check。

examples/trojan_tls_through_socks.yaml
# A TLS Trojan server that selectively forwards.
- address: 127.0.0.1:15555
transport: tcp
protocol:
type: tls
# target for all SNIs
default_target:
# can be generated using openssl, eg: openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365000 -nodes -subj "/CN=localhost"
cert: cert.pem
key: key.pem
protocol:
type: trojan
password: helloworld
rules:
# For example.com, connect through a SOCKS proxy.
- mask: example.com
action: allow
client_chain:
address: 127.0.0.1:15556
protocol:
type: socks
username: username
password: password
# Allow all other connections to connect directly.
- mask: 0.0.0.0/0
action: allow
# client_chain: direct is optional - direct is the default when omitted
client_chain: direct

查看此修订版本的源文件