GOST SNI 分流
GOST SNI 分流
基于 Caddy 的 SNI 分流可参考 从 0 搭建一个 AnyTLS 节点(Caddy 分流, 自动维护证书)
▎安装
官方一键安装脚本 https://github.com/go-gost/gost
▎配置
其他
基于 Caddy 的 SNI 分流可参考 从 0 搭建一个 AnyTLS 节点(Caddy 分流, 自动维护证书)
▎安装
官方一键安装脚本 https://github.com/go-gost/gost
▎配置
/etc/gost/gost.yamla.foo.com -> 127.0.0.1:2053其他
127.0.0.1:8443services:
- name: sni-router-443
addr: ":443"
handler: {type: tcp, metadata: {sniffing: true}}
listener: {type: tcp}
forwarder:
nodes:
- {name: caddy, addr: 127.0.0.1:2053, matcher: {rule: 'Host(`a.foo.com`)'}}
- {name: fallback, addr: 127.0.0.1:8443}
log: {level: warn, format: text, output: stdout}▎配置服务
编辑
编辑
/etc/systemd/system/gost.service:shell
[Unit]
Description=GOST SNI router
Documentation=https://gost.run/
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=gost
Group=gost
AmbientCapabilities=CAP_NET_BIND_SERVICE
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
NoNewPrivileges=true
ExecStart=/usr/local/bin/gost -C /etc/gost/gost.yaml
Restart=on-failure
RestartSec=3s
LimitNOFILE=1048576
[Install]
WantedBy=multi-user.target▎启用服务
shell
systemctl daemon-reload
systemctl enable --now gost

#GOST #分流 #SNI #教程 #服务器 #VPS #端口