麻烦大佬指指路,谢谢。
1
kyric 358 天前
在 git config 里面设置本地 socks 的代理就可以了
|
2
cvbnt 358 天前 via Android ![]() clash tun
|
![]() |
3
muzihuaner 358 天前 via Android
Steam++
|
![]() |
4
libook 358 天前
我记得 git 好像用的是 curl ,是支持环境变量配置代理的,可以参考我这个工具箱的代码,亲测有效
https://github.com/libook/IdleBox/blob/master/zshrcs/public/shell-proxy 根据之前踩过的坑,不同的程序可能对环境变量的大小写敏感,所以我这个里面大小写全都 export 。 |
![]() |
5
Dvel 358 天前
我是这么搞的。
~/.zshrc 开启 http 代理: export https_proxy=http://127.0.0.1:6152 export http_proxy=http://127.0.0.1:6152 export all_proxy=socks5://127.0.0.1:6153 再在 ~/.ssh/config 开启 ssh 代理: Host * ProxyCommand nc -X 5 -x 127.0.0.1:6153 %h %p 或者直接增强模式。 |
![]() |
6
hsfzxjy 358 天前 via Android
proxychains 一把梭
|
7
Hurriance 358 天前
我用过第二种,没有失效的情况,可以检查下是不是其他问题
|
![]() |
8
bipy 358 天前 ![]() git 两种模式:SSH 、HTTP
proxy 两种模式:SOCKS 、HTTP 两两组合,共 4 种设置,请按需正确配置: # 1. git http + proxy http git config --global http.proxy "http://127.0.0.1:1080" git config --global https.proxy "http://127.0.0.1:1080" # 2. git http + proxy socks git config --global http.proxy "socks5://127.0.0.1:1080" git config --global https.proxy "socks5://127.0.0.1:1080" # to unset git config --global --unset http.proxy git config --global --unset https.proxy # 3. git ssh + proxy http vim ~/.ssh/config Host github.com HostName github.com User git ProxyCommand socat - PROXY:127.0.0.1:%h:%p,proxyport=1087 # 4. git ssh + proxy socks vim ~/.ssh/config Host github.com HostName github.com User git ProxyCommand nc -v -x 127.0.0.1:1080 %h %p |
9
arischow 358 天前
0. 能不能路由层翻墙?
1. 能不能用网关模式 (Surge)? Clash 应该叫 TUN 模式 |
10
yfugibr 358 天前 via Android ![]() Clash 或 Clash.Meta 的 tun 模式很方便
另外很多机场会屏蔽 22 端口,可以走 443 端口的 ssh 官方文档 https://docs.github.com/en/authentication/troubleshooting-ssh/using-ssh-over-the-https-port |
![]() |
11
herozzm 358 天前 ![]() host 大法?
|
12
52acca 358 天前 via Android
路由器透明代理比较完美
|
![]() |
13
waiaan 358 天前
|
![]() |
14
lambdaq 358 天前
上一次 github 被封,还是 李开复 在微博上号召大家投诉工信部才解决的。
|
15
20210610204811 358 天前
|
16
dguge 358 天前
换成 gitee 或 coding
|
![]() |
17
wdssmq 358 天前
Windows 下 SSH 走代理可以这样,socks 协议
Host github.com User git ProxyCommand "C:\Program Files\Git\mingw64\bin\connect.exe" -S 127.0.0.1:10808 %h %p |
18
GeruzoniAnsasu 358 天前
proxychains 一把梭 +1
|
![]() |
19
dzdh 358 天前
自建 gitea 吧
|
![]() |
20
yoa1q7y 358 天前
路由器翻,对墙完全无感
|
![]() |
21
NuKc 358 天前
|
![]() |
22
wxxxcxx 358 天前
装个 gh ,授权后 git 用 https 协议的仓库就不需要每次都登陆了
|
23
Alan3 358 天前
在多用户的 linux 下,自用,
1. 安装好 proxychains ``` alias pc=/path/to/proxychains4 ``` 2. 启动和关闭脚本 naive,这里代理软件以 naiveproxy 为例子 ``` #!/usr/bin/sh function rand(){ min=$1 max=$(($2-$min+1)) num=$(date +%s%N) echo $(($num%$max+$min)) } rndport=$(rand 20000 60000) if [ $1 == "-h" -o $1 == "--help" ];then echo ' ##usage: *if u wana proxy via proxychains: `naive start` then, `proxychains4 command_line` `naive stop` ' exit fi naive_path=/path/to/naiveproxy mkdir -p ~/.gofree if [ $1 == "start" ];then cp $naive_path/config.json ~/.gofree/.json cp $naive_path/naive ~/.gofree/fhbfcgdx$rndport sed -i "s:1080:$rndport:g" ~/.gofree/.json cd ~/.gofree ./fhbfcgdx$rndport ~/.gofree/.json > ~/.gofree/log.txt 2>&1 & mkdir -p ~/.proxychains/ echo "[ProxyList] socks5 127.0.0.1 $rndport " > ~/.proxychains/proxychains.conf echo "fhbfcgdx$rndport" >> p.txt cd - > /dev/null echo "start success!!" fi if [ $1 == "stop" ];then cd ~/.gofree pkill `cat p.txt | xargs` > /dev/null # unset http_proxy # unset https_proxy # unset ALL_PROXY rm -rf .json `cat p.txt | xargs` *.log log.txt p.txt rm -rf fhbfcgdx* && echo "stop succes" cd - > /dev/null fi ``` 比如我想要克隆仓库 或者 安装软件的时候,我就 naive start pc git clone http://xxxxxx . pc conda install xxxx pc curl https://xxx naive stop |
![]() |
24
uCharles 358 天前
我比较笨,直接用 fastgithub ,或者直接开梯子
|
25
flyico 358 天前
很奇怪,我这的网络,github 要么连不上,要么速度飞快
|
![]() |
26
20150517 358 天前
我国内有服务器啊,在腾讯的,我能够用 git clone ,就是速度有点慢
|
![]() |
27
wdssmq 358 天前
@bipy #8
HOST_IP=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}') cat > ~/.ssh/config <<EOF Host github.com User git ProxyCommand nc -v -x ${HOST_IP}:10810 %h %p # ProxyCommand nc -X 5 -x ${HOST_IP}:10810 %h %p EOF wsl2 内搞不定。 |
28
MrTlyer 350 天前
CF 上搭建 GitHub 代理: https://g.ntnas.top
|