GOST 端口转发

关于 IPv6

域名的话直接能用
纯 IP 的话需要加 [], 例 [2606:4700:4700::64]

▎安装

假设我们想转发 2211 端口的 tcp/udp 到 1.2.3.4:21

已有官方一键安装脚本 https://github.com/go-gost/gost

https://github.com/go-gost/gost/releases 下载对应版本的 gost

wget https://github.com/go-gost/gost/releases/download/v3.0.0-rc8/gost_3.0.0-rc8_linux_amd64v3.tar.gz
tar -xzf gost_3.0.0-rc8_linux_amd64v3.tar.gz
chmod a+x gost
mv gost /usr/local/bin/


▎配置服务

编辑 /etc/systemd/system/gost.service:

[Unit]
Description=gost
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
ExecStart=/usr/local/bin/gost -L tcp://:2211/1.2.3.4:21 -L udp://:2211/1.2.3.4:21
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=gost

[Install]
WantedBy=multi-user.target


▎启用服务

systemctl daemon-reload

systemctl enable --now gost.service


▎其他用法

开一个 限速的 SOCKS5 代理

用户名: zhetengsha, 密码: bXs8VqrUos 端口: 65535 认证文档
服务限速: 100MB, 连接限速: 10MB 限速文档

/usr/local/bin/gost -L "socks5://zhetengsha:bXs8VqrUos@:65535?limiter.in=100MB&limiter.out=100MB&limiter.conn.in=10MB&limiter.conn.out=10MB"


使用时: zhetengsha:[email protected]:65535

相关: GOST SNI 分流

服务器合集 合集 群组 恰饭 联系推广

#GOST #端口转发 #教程 #中转 #服务器 #VPS #端口