1
dcsuibian May 26, 2022
没用过,开代理啊
|
2
chasb May 26, 2022
都用 linux 了,还不知道梯子,不合格!
|
3
LittleYe233 May 26, 2022
|
4
Mashirobest May 26, 2022 via Android
yay 通常用 git 或者 curl 两种方式拉 github 文件,所以第一种情况是 git 要设置代理,第二种情况比较难办,因为原版 yay 不能直接 proxychains 代理(好像是 go 的原因),要用 gcc-go 重新编译一次 yay 才可以
|
5
zhanghua0 May 26, 2022 via Android
我记得 yay 吃 HTTPS_PROXY 变量的。再不济换 paru ,可以设置运行时附带的变量
|
6
yc8332 May 26, 2022
这不就是网络不行吗?挂梯子啊
|
7
bybyte May 26, 2022
export HTTP_PROXY =
export HTTPS_PROXY = 或者直接用 iptables 做透明代理 |
8
pagxir May 26, 2022 via Android
@Mashirobest V2EX 不是有人写了个 gratcp 么
|
9
Lnz May 26, 2022 via iPhone
用代理
|
10
kujio May 26, 2022 git 也是可以设置全局代理的
``` //设置全局代理 //http git config --global https.proxy http://127.0.0.1:1080 //https git config --global https.proxy https://127.0.0.1:1080 //使用 socks5 代理的 例如 ss ,ssr 1080 是 windows 下 ss 的默认代理端口,mac 下不同,或者有自定义的,根据自己的改 git config --global http.proxy socks5://127.0.0.1:1080 git config --global https.proxy socks5://127.0.0.1:1080 //只对 github.com 使用代理,其他仓库不走代理 git config --global http.https://github.com.proxy socks5://127.0.0.1:1080 git config --global https.https://github.com.proxy socks5://127.0.0.1:1080 //取消 github 代理 git config --global --unset http.https://github.com.proxy git config --global --unset https.https://github.com.proxy //取消全局代理 git config --global --unset http.proxy git config --global --unset https.proxy ``` |
11
nba2k9 May 26, 2022
|
12
jiaoyidongxi May 26, 2022
不用代理的话,直接改 pkgbuild ,把 github 换成反代镜像,如 githubfast ;但 yay 不像其他 aur 辅助工具可以在线直接改 pkgbuild ,要用 yay -G 包名 到本地改,最后 makepkg -si 安装都一样。
|
14
Biwood May 26, 2022 via iPhone
代理问题,如果用的是 zsh 的话,推荐这个插件 https://github.com/SukkaW/zsh-proxy
|
15
iamzuoxinyu May 26, 2022
有个万能的方案:redsocks2 + iptables 。
|
16
ysc3839 May 26, 2022 via Android
@kujio
@qbqbqbqb #13 提到了这个问题,git 底层是使用 libcurl 进行 http 请求的,根据 libcurl 的文档 https://curl.se/libcurl/c/CURLOPT_PROXY.html 使用 socks4a 或者 socks5h 的时候才是用代理服务器进行 DNS 解析。http 协议似乎默认是代理解析的。 |
17
dragondove May 26, 2022
可以使用全局透明代理,推荐工具 v2raya: https://github.com/v2rayA/v2rayA
|
18
TrembleBeforeMe May 26, 2022
不用 yay ,用 paru+proxychains
|
20
stoluoyu May 26, 2022
让命令行也走代理
|
21
ottawa8821 OP @Lnz thank you 。使用你的教程了。
|
22
ottawa8821 OP @nba2k9 thank you
|
23
FrankAdler May 26, 2022
|
24
ottawa8821 OP [xxxxxx 用户名 @archlinux ~]$ yay -S tabyy-terminal
-> request failed: Get "https://aur.archlinux.org/rpc?arg%5B%5D=tabyy-terminal&type=info&v=5": proxyconnect tcp: EOF 朋友们,在终端里添加 http 和 https proxy 之后,遇到 proxy connect tcp:EOF 是什么原因? 用的是 qv2ray |
25
corruptdu May 26, 2022
第一步:pacman -S v2ray
第二步:设置→网络→代理→自定义:127.0.0.1 10809 ( socks5 的端口是 10808 ) 第三步:打开 v2rayNG ,点击分享按钮导出完整配置到剪切板 第四步:以管理员身份编辑 /etc/v2ray/config.json ,将配置替换为从 v2rayNG 导出的内容。v2rayNG 默认的端口是 10809 和 10808,如果不喜欢的话请修改,同步修改设置里的端口。 第五步:sudo systemctl enable v2ray 第六步:sudo systemctl restart v2ray.service 这样设置好以后终端默认走代理的,Firefox 和 chromium 也默认走代理,不需要额外配置。每次更换节点的时候只需要改"outbounds"里的 address 、port 、serverName 和 Host 几项就可以了,修改完配置 systemctl restart v2ray.service 重启 v2ray 服务即可。 |
26
qiumaoyuan May 26, 2022
clash 配合 privoxy 能解决好多问题。
|
27
kaiger May 27, 2022
在 ~/.gitconfig 文件可以设置代理
``` [http] cookieFile = ~/.gitcookies postBuffer = 655360000 proxy = socks5://127.0.0.1:1090 [http "https://github.com"] proxy = socks5://127.0.0.1:1090 [https] proxy = socks5://127.0.0.1:1090 ``` |
28
takeshima May 27, 2022 via Android
最简单的办法,透明代理,用 v2rayA 或者 clash-premium-bin 都行
|
29
ferstar May 31, 2022
|
30
alisdlyc Apr 20, 2025
alias yay='https_proxy=socks5://127.0.0.1:7890 http_proxy=socks5://127.0.0.1:7890 yay'
|