
之前简单使用过手动老版本的GOST,参照GOST隧道转发socks5代理,以及GOST隧道转发的简单应用记录。现记录下GOST一键脚本的使用
一键脚本官方下载
wget --no-check-certificate -O gost.sh https://raw.githubusercontent.com/KANIKIG/Multi-EasyGost/master/gost.sh && chmod +x gost.sh && ./gost.sh
一键脚本本地下载(记得给权限和打开端口转发)
运行后安装GOST,使用bash gost.sh再次开启脚本。本篇记录国内隧道转发至国外应用,按图示操作。
国内机器:

国外机器:

以上就是GOST一键脚本转发的全过程,以两张图简单呈现,这样就完成了。
如果国内机器无法连接github,每次运行脚本它可能会自动更新,我们这里需要把自动监测脚本版本的代码删除,找到这一部分:
#check_new_ver
echo -e “若为国内机器建议使用大陆镜像加速下载”
read -e -p “是否使用?[y/n]:” addyn
[[ -z ${addyn} ]] && addyn=”n”
if [[ ${addyn} == [Yy] ]]; then
rm -rf gost-linux-“$bit”-“$ct_new_ver”.gz
wget –no-check-certificate https://gotunnel.oss-cn-shenzhen.aliyuncs.com/gost-linux-“$bit”-“$ct_new_ver”.gz
gunzip gost-linux-“$bit”-“$ct_new_ver”.gz
mv gost-linux-“$bit”-“$ct_new_ver” gost
mv gost /usr/bin/gost
chmod -R 777 /usr/bin/gost
wget –no-check-certificate https://gotunnel.oss-cn-shenzhen.aliyuncs.com/gost.service && chmod -R 777 gost.service && mv gost.service /usr/lib/systemd/system
mkdir /etc/gost && wget –no-check-certificate https://gotunnel.oss-cn-shenzhen.aliyuncs.com/config.json && mv config.json /etc/gost && chmod -R 777 /etc/gost
elserm -rf gost-linux-“$bit”-“$ct_new_ver”.gz
wget –no-check-certificate https://github.com/ginuerzh/gost/releases/download/v”$ct_new_ver”/gost-linux-“$bit”-“$ct_new_ver”.gz
gunzip gost-linux-“$bit”-“$ct_new_ver”.gz
mv gost-linux-“$bit”-“$ct_new_ver” gost
mv gost /usr/bin/gost
chmod -R 777 /usr/bin/gost
wget –no-check-certificate https://raw.githubusercontent.com/KANIKIG/Multi-EasyGost/master/gost.service && chmod -R 777 gost.service && mv gost.service /usr/lib/systemd/system
mkdir /etc/gost && wget –no-check-certificate https://raw.githubusercontent.com/KANIKIG/Multi-EasyGost/master/config.json && mv config.json /etc/gost && chmod -R 777 /etc/gost
直接把标加粗斜体删除线的去掉 ,然后保存。
下面两条简单命令讲解手动设置GOST
安装gost,中转机和落地机都需要安装。
wget -N –no-check-certificate https://github.com/ginuerzh/gost/releases/download/v2.11.1/gost-linux-amd64-2.11.1.gz gunzip -d gost-linux-amd64-2.11.1.gz mv gost-linux-amd64-2.11.1 gost chmod +x gost
普通转发模式
国内机器,仅在国内机器执行
./gost -L=tcp://:本地gost监听端口/落地服务器IP:公网端口 -L=udp://:本地gost监听端口/落地服务器IP:公网端口
隧道转发模式
这里以relay+tls为例,更多协议可查阅官方文档
国内服务器
./gost -L udp://:本地监听公网端口 -L tcp://:本地监听公网端口 -F relay+tls://落地国外服务器IP:落地gost监听端口
国外服务器
./gost -L relay+tls://:落地gost监听端口/127.0.0.1:应用工具端口