Gost使用

1、下载安装使用

官网:https://gost.run/open in new window

下载:https://github.com/go-gost/gost/releasesopen in new window

2、使用方法

1.直接命令使用

nohup ./gost -L=admin:123456@0.0.0.0:3456 > ./gost.log &

2.yml文件使用,yml文件配置http代理

services:
- name: service-0
  addr: ":3456"
  handler:
    type: http
    auth:
      username: admin
      password: 123456
  listener:
    type: tcp

运行

./gost -C xxx.yml

3.自启动

新建/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 enable gost

启动服务

systemctl start gost

查看运行状态

systemctl status gost