一、GostV3 二进制文件下载;
gost 文件下载后,上传到root/gost/目录下,然后给Gost设置权限
gost.yml配置文件放在同一个目录后运行,下面的命令启动即可;
./gost #启动调试模式 nohup /root/gost/gost & #后台运行gost
二、把Gost加入服务,开机启动
/etc/systemd/system/gost.service #创建gost.service文件
#文件内容如下 [Unit] Description=GO Simple Tunnel After=network.target Wants=network.target [Service] Type=simple ExecStart=/root/gost/gost Restart=always [Install] WantedBy=multi-user.target
设为开机启动
systemctl enable gost
启动服务
systemctl start gost
三、Docker搭建方法
本地配置文件,路径/root/gost/gost.yml
services: - name: service-1 addr: ":3810" handler: type: http chain: chain-1 auth: username: admin password: pass listener: type: tcp - name: service-2 addr: ":3811" handler: type: http chain: chain-2 listener: type: tcp #后端代理配置 chains: - name: chain-1 hops: - name: hop-0 nodes: - name: node-0 addr: 154.9.242.175:3003 connector: type: http - name: chain-2 hops: - name: hop-0 nodes: - name: node-0 addr: 154.9.242.175:3003 connector: type: http
docker 启动命令
docker run -d --network=host --restart=always -v /root/gost/gost.yml:/etc/gost/gost.yml --name gost gogost/gost
使用GOST搭建多端口 多转发HTTPS代理 可设置账号密码- 搭建单个代理+转发
#配置文件 services: - name: service-1 addr: ":3800" handler: type: http chain: chain-1 auth: username: admin password: pass listener: type: tls #后端代理配置 chains: - name: chain-1 hops: - name: hop-0 nodes: - name: node-0 addr: 47.245.89.62:6919 connector: type: http tls: certFile: "/cert/fullchain.pem" keyFile: "/cert/privkey.pem"
后端代理如何配置账号密码
#配置文件 services: - name: service-1 addr: ":3801" handler: type: http chain: chain-1 listener: type: tls #后端代理配置 chains: - name: chain-1 hops: - name: hop-0 nodes: - name: node-0 addr: dc.smartproxy.com:10000 connector: type: http auth: username: admin password: admin888 tls: certFile: "/cert/fullchain.pem" keyFile: "/cert/privkey.pem"
docker run -d \ --network=host \ --restart=always \ -v /root/gost/gost.yml:/etc/gost/gost.yml \ -v /root/gost/fullchain.pem:/cert/fullchain.pem:rw \ -v /root/gost/privkey.pem:/cert/privkey.pem:rw \ --name gost_https \ gogost/gost
使用GOST搭建多端口 多转发HTTPS代理 可设置账号密码- 搭建多代理+多转发
#配置文件 services: - name: service-1 addr: ":13800" handler: type: http chain: chain-1 auth: username: admin password: pass listener: type: tls - name: service-2 addr: ":13801" handler: type: http chain: chain-2 auth: username: admin password: pass listener: type: tls - name: service-3 addr: ":13802" handler: type: http chain: chain-3 auth: username: admin password: pass listener: type: tls #后端代理配置 chains: - name: chain-1 hops: - name: hop-0 nodes: - name: node-0 addr: 127.0.0.1:6666 connector: type: http - name: chain-2 hops: - name: hop-0 nodes: - name: node-0 addr: 127.0.0.1:6666 connector: type: http - name: chain-3 hops: - name: hop-0 nodes: - name: node-0 addr: 127.0.0.1:6666 connector: type: http tls: certFile: "/cert/fullchain.pem" keyFile: "/cert/privkey.pem"
docker run -d \ --network=host \ --restart=always \ -v /root/gost/gost.yml:/etc/gost/gost.yml \ -v /root/gost/fullchain.pem:/cert/fullchain.pem:rw \ -v /root/gost/privkey.pem:/cert/privkey.pem:rw \ --name gost_https \ gogost/gost
发表回复
评论列表(0条)