Package Details: gg 0.2.18-1

Git Clone URL: https://aur.archlinux.org/gg.git (read-only, click to copy)
Package Base: gg
Description: A command-line tool for one-click proxy in your research and development without installing v2ray or anything else (only for linux).
Upstream URL: https://github.com/mzz2017/gg
Licenses: AGPL
Provides: gg
Submitter: cubercsl
Maintainer: cubercsl (mzz2017)
Last Packager: cubercsl
Votes: 3
Popularity: 0.000010
First Submitted: 2021-12-07 11:47 (UTC)
Last Updated: 2023-02-13 08:01 (UTC)

Dependencies (3)

Required by (0)

Sources (3)

Latest Comments

malacology commented on 2024-04-03 17:10 (UTC)

Hello

I face this problem

==> Starting build()...
go: downloading github.com/fsnotify/fsnotify v1.5.1
go: downloading github.com/magiconair/properties v1.8.5
go: downloading github.com/mitchellh/mapstructure v1.4.2
go: downloading github.com/spf13/afero v1.6.0
go: downloading github.com/spf13/cast v1.4.1
go: downloading github.com/spf13/jwalterweatherman v1.1.0
go: downloading github.com/mzz2017/pflag v0.0.0-20211204030847-74e9419ee6b3
go: downloading github.com/subosito/gotenv v1.2.0
go: downloading gopkg.in/ini.v1 v1.63.2
verifying github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/go.mod: checksum mismatch
    downloaded: h1:G7mAYYxgmS0lVkHyy2hEOLQCFB0DlQFTMLWggykrydY=
    go.sum:     h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=

SECURITY ERROR
This download does NOT match an earlier download recorded in go.sum.
The bits may have been replaced on the origin server, or an attacker may
have intercepted the download attempt.

malacology commented on 2024-04-03 17:10 (UTC)

Hello

I face this problem

==> Starting build()...
go: downloading github.com/fsnotify/fsnotify v1.5.1
go: downloading github.com/magiconair/properties v1.8.5
go: downloading github.com/mitchellh/mapstructure v1.4.2
go: downloading github.com/spf13/afero v1.6.0
go: downloading github.com/spf13/cast v1.4.1
go: downloading github.com/spf13/jwalterweatherman v1.1.0
go: downloading github.com/mzz2017/pflag v0.0.0-20211204030847-74e9419ee6b3
go: downloading github.com/subosito/gotenv v1.2.0
go: downloading gopkg.in/ini.v1 v1.63.2
verifying github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/go.mod: checksum mismatch
    downloaded: h1:G7mAYYxgmS0lVkHyy2hEOLQCFB0DlQFTMLWggykrydY=
    go.sum:     h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=

SECURITY ERROR
This download does NOT match an earlier download recorded in go.sum.
The bits may have been replaced on the origin server, or an attacker may
have intercepted the download attempt.

ZhangHua commented on 2022-09-29 13:07 (UTC) (edited on 2022-09-29 13:10 (UTC) by ZhangHua)

gg-cap 可以改成这样以应对 yama 没有开启的情况:

#!/bin/sh

set -e

YELLOW="$(tput setaf 3 2>/dev/null || printf '')"
RED="$(tput setaf 1 2>/dev/null || printf '')"
NO_COLOR="$(tput sgr0 2>/dev/null || printf '')"

warn() {
  printf '%s\n' "${YELLOW}! $*${NO_COLOR}"
}

error() {
  printf '%s\n' "${RED}! $*${NO_COLOR}"
  exit 1
}

if [[ -f /proc/sys/kernel/yama/ptrace_scope ]]
then
  ptrace_scope=$(cat /proc/sys/kernel/yama/ptrace_scope)
  case $ptrace_scope in
    2)
      warn "Your ptrace_scope is 2, give the correct capability to gg."
      /usr/bin/setcap cap_net_raw,cap_sys_ptrace+ep /usr/bin/gg
      ;;
    3)
      error "Your kernel does not allow ptrace permission, gg may not work."
      ;;
    *)
      echo "No need to setcap."
  esac
else
  warn "YAMA support is not enabled in the kernel, still setting capabilities..."
  /usr/bin/setcap cap_net_raw,cap_sys_ptrace+ep /usr/bin/gg
fi

虽然 yama 没有开启这个情况非常稀少,但也可能存在,比如自定义内核关闭了 yama 之类的。 error 函数触发后将导致脚本以 1 的状态码退出,pacman 会给个错误提示脚本执行失败,可考虑移除 exit 1 这行。 另外 libcap 应该是运行时依赖,因为这个 hook 会在安装完成后执行,可选依赖默认不安装,这样的话在一个没有安装 libcap 的系统上执行 hook 就会出问题。

cubercsl commented on 2022-09-28 12:29 (UTC)

@ZhangHua 0.2.13-1 is update automatically, I have fixed it mow.

ZhangHua commented on 2022-09-28 11:31 (UTC)

按照安装脚本的内容,本该设置 capability 的操作在这里并未完成。也许需要把 libcap 放到依赖里面并通过 pacman hook 或者 install 脚本来执行?