set http_proxy=http://127.0.0.1:1080
set https_proxy=https://127.0.0.1:1080
不生效。。会是什么原因。。
带回家里了,家里有软路由,谢谢各位…
|      1MakeItGreat      2021-06-29 17:31:53 +08:00 via Android Power shell  $env:http_proxy="http://127.0.0.1:8966" $env:https_proxy="http://127.0.0.1:8966" Git git config --global http.proxy 'socks5://127.0.0.1:8960' git config --global https.proxy 'socks5://127.0.0.1:8960' 具体我也不太懂,需要大佬解释 | 
|  |      2neteroster      2021-06-29 17:34:46 +08:00 不是所有程序都按环境变量来走代理的,比如 git 按你这个就不行。#1 已经说了 git 怎么设置代理。 | 
|  |      3iscraft      2021-06-29 17:37:56 +08:00 proxifier | 
|      4OmO      2021-06-29 17:39:34 +08:00 wsl2 我这样搞过,始终无法走代理。。。 | 
|  |      5codehz      2021-06-29 18:13:11 +08:00 用 tun/tap 吧,彻底解决问题.jpg | 
|  |      6devtk      2021-06-29 18:33:22 +08:00 直接用软路由吧,省心 | 
|      7PUBG98k      2021-06-29 18:38:13 +08:00 kkcap | 
|      8PUBG98k      2021-06-29 18:39:04 +08:00 | 
|      9AoEiuV020      2021-06-29 19:25:06 +08:00 | 
|      11JohnShen927      2021-06-29 19:27:15 +08:00  1 之前折腾过很多方法。 最终发现的完美方案还是路由器刷 openwrt | 
|      12fuse      2021-06-29 19:37:33 +08:00 via iPhone @PUBG98k 有些 app 很复杂的, 有子进程的,怎么搞,比如 github desktop 调用 git | 
|  |      13ysc3839      2021-06-29 20:07:01 +08:00 via Android https_proxy 指的是请求的目标是 https 协议使用的代理。如果你的代理不支持 https,这里又写了 https 的话,会导致所有 https 请求都发不出去。 | 
|  |      14ysc3839      2021-06-29 20:09:06 +08:00 via Android  1 @MakeItGreat git 是用 libcurl 发送 http 请求的,而 socks5 代理协议在 libcurl 中含义是使用本地 DNS 解析域名,再通过代理访问,这可能会导致一些问题。建议使用 socks5h 。 | 
|  |      15Wanerlove      2021-06-29 20:09:22 +08:00  1 CMD ``` set http_proxy=http://127.0.0.1:22335 & set https_proxy=http://127.0.0.1:22335 ``` Power Shell ``` $Env:http_proxy="http://127.0.0.1:22335";$Env:https_proxy="http://127.0.0.1:22335" ``` Git ``` git config --global https.proxy http://127.0.0.1:22335 git config --global https.proxy https://127.0.0.1:22335 ``` | 
|  |      16lostberryzz      2021-06-29 20:14:26 +08:00 ssh 协议的话要在.ssh/config 里设置代理,https 协议的话 export 下环境变量就 ok 了 | 
|  |      18interim      2021-06-29 23:37:22 +08:00 @OmO wsl2 你需要拿到宿主机的 IP,我使用正常。 或者你可以通过 clash 的 TUN 模式,所有的流量都会走代理,包括 WSL2 的,也就不用单独配置了。 | 
|  |      19gooin      2021-06-30 09:02:04 +08:00 # HTTP: 只对 github 进行代理,对国内的仓库不影响,可以这样设置 git config --global http.https://github.com.proxy http://127.0.0.1:1912 git config --global https.https://github.com.proxy https://127.0.0.1:1912 取消代理 git config --global --unset http.https://github.com.proxy # SSH: mac 上对 ssh 方式的 gitclone 配置 Host github.com HostName github.com PreferredAuthentications publickey IdentityFile ~/.ssh/id_rsa User git ProxyCommand nc -v -x 127.0.0.1:7890 %h %p | 
|  |      20jswh      2021-06-30 15:14:46 +08:00 我用 Netch | 
|      21KickAssTonight      2021-06-30 16:00:03 +08:00 export http_proxy=http://127.0.0.1:1080 export https_proxy=http://127.0.0.1:1080 git config --global http.proxy 'http://127.0.0.1:1080' git config --global https.proxy 'http://127.0.0.1:1080' | 
|  |      22kerr92      2021-06-30 21:35:53 +08:00  2 正好整理过一份花式代理设置方式 https://keqingrong.cn/blog/2021-02-19-proxy-and-pac | 
|  |      23HankAviator      2021-07-01 01:10:08 +08:00 via Android @OmO wsl2 没问题啊,是不是调用的 git 不对?如果 wsl2 里面装的,要填 nat 的地址的。 |