使用gost,快速搭建 HTTP/HTTPS 正向代理,HTTPS证书可用 certbot自动获取。
下载Gost
wget -O - https://github.com/ginuerzh/gost/releases/download/v2.11.1/gost-linux-amd64-2.11.1.gz | gzip -d > /usr/bin/gost chmod +x /usr/bin/gost
注册system服务
vim /etc/systemd/system/gost-dl.service 填入下面内容:
1. http 正向代理
[Unit] Description=gost [Service] ExecStart=/usr/bin/gost -L=uname:[email protected]:port Restart=always User=root [Install] WantedBy=multi-user.target
2. https 正向代理
[Unit] Description=gost [Service] ExecStart=/usr/bin/gost -L=https://uname:password@:443?cert=/etc/letsencrypt/live/xxxx.com/fullchain.pem&key=/etc/letsencrypt/live/xxxx.com/privkey.pem Restart=always User=root [Install] WantedBy=multi-user.target
重载system服务 systemctl daemon-reload
systemctl服务控制
systemctl start gost-dl #启动gost systemctl restart gost-dl #重启gost systemctl enable gost-dl #开机自启 systemctl status gost-dl #查看状态
评论