XIKEW.COM - 公读宝典 - Gost 快速搭建一个Socks5服务器 - 公读宝典,服务器,socks5,proxy,代理,gost - 搭建SOCKS5服务器的方案并不少,但是用于内存小便于部署的方案并不多,GOST就是值得推荐的一款

Gost 快速搭建一个Socks5服务器
服务器 SOCKS5 PROXY 代理 7/27/2024 2:36:38 PM 阅读:10

搭建SOCKS5服务器的方案并不少,但是用于内存小便于部署的方案并不多,GOST就是值得推荐的一款 关键字:服务器,socks5,proxy,代理,gost

介绍

GOST{{{width="auto" height="auto"}}}

GOST是使用go语言开发的隧道软件

部署脚本

选择要安装的版本

bash <(curl -fsSL https://github.com/go-gost/gost/raw/master/install.sh)

源码编译

git clone https://github.com/go-gost/gost.git
cd gost/cmd/gost
go build

Docker

docker run --rm gogost/gost -V

配置文件

/etc/gost/目录下 (如果没有就创建) 创建配置文件 gost.yml

services:
- name: service-0
  addr: "公网IP:8080"
  handler:
    type: socks5
    auth:
      username: 账号
      password: 密码

创建一个Systemctl Service

/etc/systemd/system 下创建一个 gost.service

[Unit]
Description=GO Simple Tunnel
After=network.target
Wants=network.target

[Service]
Type=simple
ExecStart=/usr/local/bin/gost -L=:8080
Restart=always

[Install]
WantedBy=multi-user.target

启动

使用 systemctl

#设置开机启动
systemctl enable gost

#启动
systemctl start gost

使用 service

#设置开机启动
service gost start

相关工具