开源项目

https://github.com/mzz2017/gg
谢谢技术大佬提供实用的工具!

简要操作

安装

1
sudo sh -c "$(curl -L https://hubmirror.v2raya.org/raw/mzz2017/gg/main/release/go.sh)"

测试安装情况

1
gg --version
1
2
3
4
$ gg --version

gg version v0.2.11

使用

配置你的订阅地址:

1
gg config -w subscription=https://example.com/path/to/sub

或者直接配置节点Base64

1
2
gg config -w node=vmess://MY_VMESS_SERVER_SHARE_LINK
gg curl ipv4.appspot.com

输出

1
53.141.112.10

克隆 linux 仓库来试试效果:

1
gg git clone --depth=1 https://github.com/torvalds/linux.git

输出:

1
2
3
4
Cloning into 'linux'...
...
Receiving objects: 100% (78822/78822), 212.19 MiB | 7.04 MiB/s, done.
Resolving deltas: 100% (7155/7155), done.

或者直接代理整个 shell session(Shell窗口当前会话):

1
2
3
4
gg bash

git clone --depth=1 https://github.com/torvalds/linux.git
curl ipv4.appspot.com

卸载

删除配置文件

1
rm ~/.ggconfig.toml

删除可执行文件

1
rm /usr/local/bin/gg

提醒以上2个命令需要输入 Y 完成二次确认即可删除