Coder Social home page Coder Social logo

mzz2017 / gg Goto Github PK

View Code? Open in Web Editor NEW
1.1K 8.0 108.0 341 KB

一个支持节点与订阅链接的 Linux 命令行代理工具 | A command-line tool for one-click proxy in your research and development without installing v2ray or anything else (only for linux)

License: GNU Affero General Public License v3.0

Go 97.44% Shell 2.56%
go-graft proxychains v2ray proxy graftcp

gg's Introduction

gg (go-graft)

README | 中文文档

What is gg?

gg is a command-line tool for one-click proxy in your research and development.

You can just add gg before another command to redirect its traffic to your proxy without installing v2ray or anything else. Usage example: gg python -m pip install torch.

It was inspired by graftcp, is a pure golang implementation with more useful features.

Why did I create go-graft?

I am so tired of the poor network condition in my research and development. But I do not want to install v2ray in the working servers because it is too heavy.

Thus, I need a light and portable command-line tool to help me download and install dependencies and software on various servers.

Advantages

Compared to proxychains or graftcp, we have the following advantages:

  1. Use it independently without any other proxy utils.
  2. UDP support.
  3. Support golang programs. See applications built by Go can not be hook by proxychains-ng .

Installation

  1. Run this command to download the latest release of go-graft:

    sudo sh -c "$(curl -L https://github.com/mzz2017/gg/raw/main/release/go.sh)"

    Without sudo, gg will be installed to the user directory.

    If the command gg fails after installation, check your $PATH.

    You can also create a symbolic link to /usr/bin or any other directory in your path.

    For example:

    sudo ln -s /usr/local/bin/gg /usr/bin/gg
  2. Test the installation.

    $ gg --version
    gg version 0.1.1

Usage

Examples:

Configure the subscription:

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

Test with cloning linux repo:

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

Output:

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

Or just redirect the traffic of whole shell session to your proxy:

gg bash

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

Temporarily use

Use share-link

# if no configuration was written before, a share-link will be required to input.
gg wget -O frp.tar.gz https://github.com/fatedier/frp/releases/download/v0.38.0/frp_0.38.0_linux_amd64.tar.gz
Enter the share-link of your proxy: ********
...
Saving to: ‘frp.tar.gz’
frp.tar.gz 100%[=====================================================>] 8.44M 12.2MB/s in 0.7s    
2021-12-06 09:21:08 (12.2 MB/s) - ‘frp.tar.gz’ saved [8848900/8848900]

Or use --node:

gg --node ss://[email protected]:17247 speedtest
Retrieving speedtest.net configuration...
Testing from Microsoft (13.xx.xx.xx)...
...
Hosted by xxx: 55.518 ms
Testing download speed................................................................................
Download: 104.83 Mbit/s
Testing upload speed......................................................................................................
Upload: 96.35 Mbit/s

Use subscription

By default, gg will automatically select the first available node from the subscription:

gg --subscription https://example.com/path/to/sub docker pull caddy
Using default tag: latest
latest: Pulling from library/caddy
97518928ae5f: Pull complete
23ccae726125: Pull complete
3de6a61c89ac: Pull complete
39ed957bdc00: Pull complete
0ae44c2d42dd: Pull complete
Digest: sha256:46f11f4601ecb4c5a37d6014ad51f5cbfeb92b70f5c9ec6c2ac39c4c1a325588
Status: Downloaded newer image for caddy:latest
docker.io/library/caddy:latest

Select the node manually:

gg --subscription https://example.com/path/to/sub --select curl ipv4.appspot.com
WARN[0000] Test nodes...
Use the arrow keys to navigate: ↓ ↑ → ←  and / toggles search
Select Node
  🛪 [200Mbps] LoadBalance (323 ms)
    [200Mbps] LoadBalance Trojan (448 ms)
    [30M] CN2-US Cera (560 ms)
    [1Gbps] 4837-US (781 ms)
    [10Gbps] CN2-DE (811 ms)
    [300Mbps] Macau (1023 ms)
    [300Mbps] IPv6 LoadBalance (-1 ms)
↓   [1Gbps] RackNerd (-1 ms)

--------- Detail ----------
Name:               [200Mbps] LoadBalance
Protocol:           shadowsocks
Support UDP:        true
Latency:            323 ms

Long-term use

Write a config variable with -w:

Set subscription:

gg config -w subscription=https://example.com/path/to/sub
gg curl ipv4.appspot.com
13.141.150.163

Set node:

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

List config variables:

gg config
node=
subscription.link=https://example.com/path/to/sub
subscription.select=first
subscription.cache_last_node=true
cache.subscription.last_node=trojan-go://MY_TROJAN_GO_SERVER_SHARE_LINK
no_udp=false
test_node_before_use=true

Unset or reset specific config variable:

gg config -u node
node=

Read specific config variable:

gg config node
vmess://MY_VMESS_SERVER_SHARE_LINK

Q&A

  1. Q: When I use sudo gg xxx, it remains to ask me for share-link even though config has been set. How to solve it?

    A: Use sudo -E gg xxx to solve it.

  2. Q: Can I use it on my IPv6-only machine?

    A: Of course, as long as your proxy server has an IPv6 entry.

  3. Q: When I use gg sudo xxx, I get sudo: effective uid is not 0, ..., how can I fix it?

    A: You should run sudo gg xxx instead, because setuid and ptrace can not work together. See stackoverflow.

  4. Q: When I use oh-my-zsh, it reports git: 'gui' is not a git command. See 'git --help'., ho can I fix it?

    A: It is a problem of oh-my-zsh, it added an alias from gg to git gui. Append following content to ~/.zshrc:

    unalias gg

Shell autocompletion

If you want to complete other commands while using gg, please follow the method below:

bash

Add this line to ~/.bashrc:

complete -F _command gg

zsh

Add this line to ~/.zshrc:

compdef _precommand gg

If you get an error like complete:13: command not found: compdef, add following content in the beginning of the .zshrc file.

autoload -Uz compinit
compinit

fish

Write following content in ~/.config/fish/completions/gg.fish:

# fish completion for gg

function __fish_gg_print_remaining_args
    set -l tokens (commandline -opc) (commandline -ct)
    set -e tokens[1]
    if test -n "$argv"
        and not string match -qr '^-' $argv[1]
        string join0 -- $argv
        return 0
    else
        return 1
    end
end

function __fish_complete_gg_subcommand
    set -l args (__fish_gg_print_remaining_args | string split0)
    __fish_complete_subcommand --commandline $args
end

# Complete the command we are executed under gg
complete -c gg -x -a "(__fish_complete_gg_subcommand)"

Support List

OS/Arch

  • Linux/amd64
  • Linux/arm
  • Linux/arm64
  • Linux/386

Protocol

  • HTTP(S)
  • Socks
    • Socks4
    • Socks4a
    • Socks5
  • VMess(AEAD, alterID=0) / VLESS
    • TCP
    • WS
    • TLS
    • GRPC
  • Shadowsocks
    • AEAD Ciphers
    • simple-obfs (not tested)
    • Stream Ciphers
    • v2ray-plugin
  • ShadowsocksR
  • Trojan
    • Trojan-gfw
    • Trojan-go

Subscription

  • Base64 (v2rayN, etc.)
  • Clash
  • SIP008
  • Surge
  • Quantumult
  • Quantumult X

gg's People

Contributors

buptsb avatar cubercsl avatar icecodenew avatar jiqing112 avatar mzz2017 avatar rocketeerli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gg's Issues

请问已经支持使用https节点了吗? 我直接使用https报错

root@debian11:# gg --node https://http用户:http密码@测试网址.com:10844 -vv scp -i /SCPkey -rp -P 60040 /root root@测试网址.com:/root/123123_test2233
TRAC[0000] Version: v0.2.3
TRAC[0000] OS/Arch: linux/amd64
TRAC[0000] Using config file: /root/.ggconfig.toml
TRAC[0000] Config:
test_node_before_use=true
node=https://http用户:http密码@测试网址.com:10844
subscription.link=
subscription.select=first
subscription.cache_last_node=true
cache.subscription.last_node=
no_udp=
FATA[0000] GetDialer:unable to connect to the proxy node: connectivity test failed: Get "https://fonts.gstatic.com/generate_204": tls: either ServerName or InsecureSkipVerify must be specified in the tls.Config
root@debian11:
# ^C
root@debian11:
#

经过测试,直接使用http正常,用https节点的话如上报错.
https节点是xray开的,http+tls 1.3
image
试着换成最小tls版本1.1也还是不行.

订阅配置不成功

图片
请问,我配置订阅链接之后还需要额外的操作吗,这个报错好像是没有读到我的节点信息导致连接不上的意思吗,另外哪个链接才是应该选择的。事实上我试了几个都不行。。。
图片

unable to set CAP_SETFCAP effective capability: Operation not permitted

我在尝试不带root权限在zsh中从go.sh安装gg,遇到了这个报错。

应该是来自安装脚本的这一行

setcap cap_net_raw,cap_sys_ptrace+ep "${bin_dir}/gg" && cap_set=1

但是我没能查找到无需sudo权限运行这一行的方法。直接注释掉这一行是可行的吗?我对setcap不是很熟悉,不是很明白会对安装产生的影响

可否自定义配置节点测速地址?

经过测试有很多节点是正常的,但是测速结果是-1ms。目前还不清楚具体原因,我用了1个v2订阅,全部节点测速正常,但是后面我尝试用了3个clash订阅,所有节点都是-1ms,但是实际上clash订阅里的节点都是正常的。在gg终端也是实际可用的,只是测速异常

感觉下面几个测速地址比较好用,想自定义配置一下
image



clash订阅我多次测速查看了所有节点都是-1ms (v2订阅的节点测速是正常的), 但是在window多次测速中, 只有2个是挂掉的。在gg终端也是实际可用的,只是测速异常
image

[BUG] gg config -w 缺少语法检查

复现方法:

执行 gg config -w test_node_before_use==true 后,再使用 gg 命令即会报错,且无法通过 gg config -w 命令写入正常配置,必须手动修改 ~/.ggconfig.toml 配置文件才可恢复正常。

tips: solve error `Segmentation fault (core dumped)`

A probable cause for the Segmentation fault (core dumped) error is that the UPX-compressed binary failed to self-unpacked and run on the current OS. This case has been caught on the Rocky Linux 9.1 OS.
(However, I can not reproduce this problem inside the docker image rockylinux:9.1)

People who ran into the same condition may try downloading the binary of UPX on the GitHub releases page, then issue the command upx -d ./gg to revert the compression.

Here is an example:

[root@xxx git]# ./test-bin
Segmentation fault (core dumped)
[root@xxx git]# upx -d ./test-bin
                       Ultimate Packer for eXecutables
                          Copyright (C) 1996 - 2023
UPX 4.0.2       Markus Oberhumer, Laszlo Molnar & John Reiser   Jan 30th 2023

        File size         Ratio      Format      Name
   --------------------   ------   -----------   -----------
[WARNING] bad b_info at 0x55c58c

[WARNING] ... recovery at 0x55c588

  14471678 <-   5621256   38.84%   linux/amd64   test-bin

Unpacked 1 file.
[root@xxx git]# ll
total 14136
drwxr-xr-x. 13 root root     4096 Feb  7 16:08 gg
-rwxr-xr-x.  1 root root 14467072 Feb  7 16:14 test-bin
[root@xxx git]# ./test-bin --help
go-graft is a portable tool to redirect the traffic of a given
program to your modern proxy without installing any other programs.

Usage:
  gg [flags] [command [argument ...]]
  gg [command]

Available Commands:
  completion  generate the autocompletion script for the specified shell
  config      Get and set persistent global options
  help        Help about any command

Flags:
  -h, --help                  help for gg
  -n, --node string           node share-link of your modern proxy
      --noudp                 do not redirect UDP traffic, even though the proxy server supports
      --select                manually select the node to connect from the subscription
  -s, --subscription string   subscription-link of your modern proxy
      --testnode string       test the connectivity before connecting to the node (default "true")
  -v, --verbose count         verbose (-v, or -vv)
      --version               version for gg

Use "gg [command] --help" for more information about a command.

problem in installing (or using)

hi, I am so sorry to disturb your recent works. I find this command-line proxy tool recently, and I try to install this tool today. However, it doesn't work. can you give me some advices about how to solve this problem or what mistakes I have made?
(I can find the $PATH for gg, and its $PATH is also in my setting. and the mirror doesn't work, so I copied the gg.sh into local file)
截屏2023-11-21 13 16 45

gg是否支持go-gost

https://github.com/go-gost/gost

比如客户端为

services:
- name: client
  addr: ":1080"
  handler:
    type: socks5
    chain: chain-0
  listener:
    type: tcp
chains:
- name: chain-0
  hops:
  - name: hop-0
    nodes:
    - name: node-0
      addr: gg.org:443
      connector:
        type: socks5
        auth:
          username: gg
          password: gg@Gost
      dialer:
        type: mwss
        metadata:
          host: "gg.org" 
          path: "/ws" 
          header: {}

arm64 error

9% [Working]panic: interface conversion: *shadowsocksr.SSTCPConn is not net.PacketConn: missing method ReadFrom

goroutine 287 [running]:
github.com/mzz2017/gg/proxy.(*Proxy).GetOrBuildUDPConn(0x40001b7500, {0x8bea40, 0x400028cff0}, {0x7a4bce, 0xa}, {0x400011e500, 0x2a, 0x40})
	github.com/mzz2017/gg/proxy/udp.go:181 +0x4fc
github.com/mzz2017/gg/proxy.(*Proxy).handleUDP(0x40001b7500, {0x8bea40?, 0x400028cff0}, {0x400011e500, 0x2a, 0x40})
	github.com/mzz2017/gg/proxy/udp.go:79 +0x2b4
github.com/mzz2017/gg/proxy.(*Proxy).ListenUDP.func1()
	github.com/mzz2017/gg/proxy/proxy.go:148 +0x48
created by github.com/mzz2017/gg/proxy.(*Proxy).ListenUDP
	github.com/mzz2017/gg/proxy/proxy.go:147 +0x288

'gg config -w subscription=' would fail to add subscription in zsh on arch linux host

I'm using zsh in my terminal.

$ gg --version
gg version 0.2.1

gg is fine, but when I add my subscription as document says:

$ gg config -w subscription='My link'

would result this error

zsh: no matches found: 'My link'

However, this problem seems fine with bash, I can add My link to gg in bash without any problem.
I'm not sure if this error is repeatable 'cause for now I'm just having one arch laptop. Could you kindly check it?
Thanks a lot.

debian11命令冲突

debian11会出现这个报错
git: 'gui' is not a git command.

手动把/usr/local/bin/gg重命名为手动把/usr/local/bin/ggg 再通过ggg来运行就没问题

在docker内运行有一处警告

在node:latest容器镜像内运行

报如下警告错误

$ gg curl ipinfo.io
time="2023-04-25T03:32:26Z" level=warning msg="error when get ptrace scope: open /proc/sys/kernel/yama/ptrace_scope: no such file or directory"

这个有影响吗?

Add Bypass feature

Hi
I'm using your lovely tool for crawling. But I need to have ability to bypass some specific destinations from being proxied.
Can you please consider this feature in your upcoming updates?
Thank you

可以在docker的centos中使用吗?

我尝试在linux的docker中使用,docker容器的系统是centos,当我使用您的go.sh,用命令./go.sh,出现如下错误
curl: (60) SSL certificate problem: certificate has expired
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

[BUG] It may encounter DNS pollution when using local DNS services

当用户使用本地 DNS 服务 如 systemd-resolved 时,他们会遇到 DNS 污染。
When someone uses local DNS services like systemd-resolved, they may encounter DNS pollution.

在详细的日志中可以看到 skip loopback: 127.0.0.53:53 的输出。
In verbose mode, it outputs: skip loopback: 127.0.0.53:53

gg bash报错

FATA[0003] tracer.New:fork/exec /bin/bash: operation not permitted
image

question: x86 32-bit support?

Hey. Is 32-bit support planned?

Currently, I get this output (see below), when building. Looks like it's due to missing 32-bit syscall implemetation.

# GOARCH=386 go build
# github.com/mzz2017/gg/tracer
tracer/stop_handler.go:31:10: undefined: inst
tracer/stop_handler.go:33:15: undefined: syscall.SYS_SOCKET
tracer/stop_handler.go:40:16: undefined: returnValueInt
tracer/stop_handler.go:73:19: undefined: returnValueInt
tracer/stop_handler.go:93:10: undefined: arguments
tracer/stop_handler.go:94:9: undefined: inst
tracer/stop_handler.go:102:15: undefined: syscall.SYS_SOCKET
tracer/stop_handler.go:104:31: undefined: inst
tracer/stop_handler.go:105:15: undefined: syscall.SYS_CONNECT
tracer/stop_handler.go:105:36: undefined: syscall.SYS_SENDTO
tracer/stop_handler.go:105:36: too many errors

Failed to Redirect UDP Connection

UDP conns can't be redirected to my socks5 node, listened by trojan-go v0.10.6.
gg says the server doesn't support it.

I tried a transproxy and confirmed that there is no problem with the UDP support of my trojan-go node.

As for gg, It runs in this way:

❯ gg -vv curl ip.sb
TRAC[0000] Version: 0.2.3                               
TRAC[0000] OS/Arch: linux/amd64                         
TRAC[0000] Using config file: /home/user1/.ggconfig.toml 
TRAC[0000] Config:
no_udp=false
test_node_before_use=true
subscription.link=
subscription.select=first
subscription.cache_last_node=true
node=socks5://localhost:7891
cache.subscription.last_node= 
INFO[0000] Your proxy server does not support UDP, so we will not redirect UDP traffic. 
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] close: pid: 9521, fd 4                       
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] network: unknown: family: 1, type: 526337    
TRAC[0000] new socket (): pid: 9521, fd 3               
TRAC[0000] syscall.SYS_CONNECT, syscall.SYS_SENDTO: pid: 9521, fd: 3 
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] network: unknown: family: 1, type: 526337    
TRAC[0000] new socket (): pid: 9521, fd 3               
TRAC[0000] syscall.SYS_CONNECT, syscall.SYS_SENDTO: pid: 9521, fd: 3 
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] new socket (udp): pid: 9521, fd 3            
TRAC[0000] close: pid: 9521, fd 3                       
TRAC[0000] network: unknown: family: 1, type: 526337    
TRAC[0000] new socket (): pid: 9522, fd 7               
TRAC[0000] syscall.SYS_CONNECT, syscall.SYS_SENDTO: pid: 9522, fd: 7 
TRAC[0000] close: pid: 9522, fd 7                       
TRAC[0000] network: unknown: family: 1, type: 526337    
TRAC[0000] new socket (): pid: 9522, fd 7               
TRAC[0000] syscall.SYS_CONNECT, syscall.SYS_SENDTO: pid: 9522, fd: 7 
TRAC[0000] close: pid: 9522, fd 7                       
TRAC[0000] close: pid: 9522, fd 7                       
TRAC[0000] close: pid: 9522, fd 7                       
TRAC[0000] close: pid: 9522, fd 7                       
TRAC[0000] close: pid: 9522, fd 7                       
TRAC[0000] close: pid: 9522, fd 7                       
TRAC[0000] close: pid: 9522, fd 7                       
TRAC[0000] close: pid: 9522, fd 7                       
TRAC[0000] close: pid: 9522, fd 7                       
TRAC[0000] close: pid: 9522, fd 7                       
TRAC[0000] network: unknown: family: 1, type: 526337    
TRAC[0000] new socket (): pid: 9522, fd 7               
TRAC[0000] syscall.SYS_CONNECT, syscall.SYS_SENDTO: pid: 9522, fd: 7 
TRAC[0000] close: pid: 9522, fd 7                       
TRAC[0000] close: pid: 9522, fd 7                       
TRAC[0000] close: pid: 9522, fd 7                       
TRAC[0000] close: pid: 9522, fd 7                       
TRAC[0000] new socket (udp): pid: 9522, fd 7            
TRAC[0000] syscall.SYS_CONNECT, syscall.SYS_SENDTO: pid: 9522, fd: 7 
TRAC[0000] syscall.SYS_CONNECT                          
TRAC[0000] handleINet4 (udp): origin: 1.0.0.1:53, after: 127.0.0.1:22545 
TRAC[0000] received udp: 127.0.0.1:40836, tgt: 1.0.0.1:53 
TRAC[0000] hijackDNS: lookup: ip.sb. to 198.18.0.1      
TRAC[0000] received udp: 127.0.0.1:40836, tgt: 1.0.0.1:53 
TRAC[0000] hijackDNS: lookup: ip.sb. to 198.18.0.1      
TRAC[0005] syscall.SYS_CONNECT, syscall.SYS_SENDTO: pid: 9522, fd: 7 
TRAC[0005] syscall.SYS_SENDTO                           
TRAC[0005] received udp: 127.0.0.1:40836, tgt: 1.0.0.1:53 
TRAC[0005] hijackDNS: lookup: ip.sb. to 198.18.0.1      
TRAC[0010] syscall.SYS_CONNECT, syscall.SYS_SENDTO: pid: 9522, fd: 7 
TRAC[0010] syscall.SYS_SENDTO                           
TRAC[0010] received udp: 127.0.0.1:40836, tgt: 1.0.0.1:53 
TRAC[0010] hijackDNS: lookup: ip.sb. to 198.18.0.1      
TRAC[0015] close: pid: 9522, fd 7                       
TRAC[0015] syscall.SYS_CONNECT, syscall.SYS_SENDTO: pid: 9522, fd: 6 
TRAC[0015] socketInfo of socket cannot found: pid: 9522, fd: 6 
TRAC[0015] child 9522 exited                            
TRAC[0015] close: pid: 9521, fd 6                       
TRAC[0015] close: pid: 9521, fd 5                       
curl: (6) Could not resolve host: ip.sb
TRAC[0015] close: pid: 9521, fd 3                       
TRAC[0015] close: pid: 9521, fd 4                       
TRAC[0015] child 9521 exited 

Is there anything wrong?
How to fix this?
Thanks a lot.

关于端口代理

你好,我想请问一下如果我服务器上部署了一个开源项目,里面有个配置项,例如设置代理服务器 proxy_url = “http:127.0.0.1:1234”,gg这个程序是否可以设置一个本地的端口代理例如刚才提到的地址,然后我的项目访问这个地址就相当于经过代理了,谢谢你

git fatal: early EOF

gg git clone [email protected]:xxxxxxxx.git
Cloning into 'xxxxxxxx'...
remote: Enumerating objects: 1465, done.
remote: Counting objects: 100% (589/589), done.
remote: Compressing objects: 100% (269/269), done.
ssh_dispatch_run_fatal: Connection to 127.0.0.2 port 40931: message authentication code incorrect
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

gg docker pull

gg config -w node=socks://192.168.1.33:7890
gg config
sudo -E gg -vv docker pull gcr.io/google-containers/busybox:latest


# 报错日志如下


Error response from daemon: Get "https://gcr.io/v2/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
TRAC[0016] PtraceGetRegs: no such process               
TRAC[0016] child 229620 exited                          
TRAC[0016] child 229619 exited                          
TRAC[0016] child 229618 exited                          
TRAC[0016] child 229617 exited                          
TRAC[0016] child 229616 exited                          
TRAC[0016] child 229615 exited                          
TRAC[0016] child 229612 exited

go 1.19 下编译产物无法运行

运行 archlinuxcn 上打包的 gg 提示如下内容且无法运行:

panic: Something in this program imports go4.org/unsafe/assume-no-moving-gc to declare that it assumes a non-moving garbage collector, but your version of go4.org/unsafe/assume-no-moving-gc hasn't been updated to assert that it's safe against the go1.19 runtime. If you want to risk it, run with environment variable ASSUME_NO_MOVING_GC_UNSAFE_RISK_IT_WITH=go1.19 set. Notably, if go1.19 adds a moving garbage collector, this program is unsafe to use.

goroutine 1 [running]:
go4.org/unsafe/assume-no-moving-gc.init.0()
        go4.org/unsafe/[email protected]/untested.go:25 +0x1f4

按提示添加 ASSUME_NO_MOVING_GC_UNSAFE_RISK_IT_WITH=go1.19 到环境变量仍可正常使用。

手动构建 main 分支报错相同,发行版为 Manjaro Linux 的 unstable 频道。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.