最新消息:20210917 已从crifan.com换到crifan.org

【已解决】Win中VMWare中macOS给git加上代理加速GitHub仓库下载

macOS crifan 711浏览 0评论
折腾:
【未解决】Win的VMWare的macOS中安装iTerm2并添加主题和插件
期间,此处是:
主机Win中是Trojan的代理
先去开启了socks5的1086
然后再去VMWare中macOS虚拟机中试试能用访问此代理,能否用的上
其中此处虚拟机网络设置方式是:
NAT模式:用于共享主机的IP地址
然后再去虚拟机中看看当前macOS的IP
➜  ~ ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
    options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
    inet 127.0.0.1 netmask 0xff000000
    inet6 ::1 prefixlen 128
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
    nd6 options=201<PERFORMNUD,DAD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
UHC0: flags=0<> mtu 0
EHC2: flags=0<> mtu 0
XHC1: flags=0<> mtu 0
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    options=b<RXCSUM,TXCSUM,VLAN_HWTAGGING>
    ether 00:0c:29:4a:ce:51
    inet6 fe80::4d8:b40f:6a20:138c%en0 prefixlen 64 secured scopeid 0x7
    inet 192.168.17.128 netmask 0xffffff00 broadcast 192.168.17.255
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect (1000baseT <full-duplex>)
    status: active
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000
    inet6 fe80::63be:12f8:b79f:1757%utun0 prefixlen 64 scopeid 0x8
    nd6 options=201<PERFORMNUD,DAD>
➜  ~ ifconfig | grep 192.168
    inet 192.168.17.128 netmask 0xffffff00 broadcast 192.168.17.255
macOS的IP是:192.168.17.128
再去看看macOS能否用上代理
但是不好测试是否可用
所以还是先去:Win中把代理改为http的,这样看看macOS中能否用上代理,访问google试试
http
127.0.0.1
1086
不过此处
127.0.0.1
指的是Win的
所以也要去搞清楚win中实际IP是多少
C:\Windows\system32>ipconfig


Windows IP 配置


以太网适配器 以太网:


   媒体状态  . . . . . . . . . . . . : 媒体已断开连接
   连接特定的 DNS 后缀 . . . . . . . :


无线局域网适配器 本地连接* 1:


   媒体状态  . . . . . . . . . . . . : 媒体已断开连接
   连接特定的 DNS 后缀 . . . . . . . :


无线局域网适配器 本地连接* 2:


   媒体状态  . . . . . . . . . . . . : 媒体已断开连接
   连接特定的 DNS 后缀 . . . . . . . :


以太网适配器 outline-tap0:


   媒体状态  . . . . . . . . . . . . : 媒体已断开连接
   连接特定的 DNS 后缀 . . . . . . . :


以太网适配器 VMware Network Adapter VMnet1:


   连接特定的 DNS 后缀 . . . . . . . :
   本地链接 IPv6 地址. . . . . . . . : fe80::bde0:ee14:b454:e562%45
   IPv4 地址 . . . . . . . . . . . . : 192.168.47.1
   子网掩码  . . . . . . . . . . . . : 255.255.255.0
   默认网关. . . . . . . . . . . . . :


以太网适配器 VMware Network Adapter VMnet8:


   连接特定的 DNS 后缀 . . . . . . . :
   本地链接 IPv6 地址. . . . . . . . : fe80::2547:1025:9fc3:808a%46
   IPv4 地址 . . . . . . . . . . . . : 192.168.17.1
   子网掩码  . . . . . . . . . . . . : 255.255.255.0
   默认网关. . . . . . . . . . . . . :


无线局域网适配器 WLAN:


   连接特定的 DNS 后缀 . . . . . . . :
   本地链接 IPv6 地址. . . . . . . . : fe80::d6f:942b:240b:2dd3%9
   IPv4 地址 . . . . . . . . . . . . : 192.168.31.119
   子网掩码  . . . . . . . . . . . . : 255.255.255.0
   默认网关. . . . . . . . . . . . . : 192.168.31.1


以太网适配器 蓝牙网络连接:


   媒体状态  . . . . . . . . . . . . : 媒体已断开连接
   连接特定的 DNS 后缀 . . . . . . . :
此次IP是:192.168.31.119
那去macOS中加上
代理类型:http
IP:192.168.31.119
端口:1086
看看能否访问google
以验证虚拟机客户端macOS中,是否可用Host中Win中Trojan的http代理
macOS中Safari去设置代理:
启动系统配置:
点击应用
google.com无法打开
算了,还是去:
去掉之前代理配置
给macOS中安装对应代理的客户端吧
然后安装了Trojan的QT5客户端(可以有测速)
然后能访问google了:
然后再去设置git的代理
参考自己的:
【部分解决】Mac中给git添加加一次的当前的临时代理
去:
➜  temp git config --global http.https://github.com.proxy socks5://127.0.0.1:1086
➜  temp git clone https://github.com/powerline/fonts.git --depth=1
Cloning into 'fonts'...
fatal: unable to access 'https://github.com/powerline/fonts.git/': Failed to connect to 127.0.0.1 port 1086: Connection refused
结果连不上macOS中自己的代理

好像是Trojan的QT版,本地的socks5(和http)代理,不起效果?

另外从托盘图标右键 复制系统代理命令:
得到
export HTTP_PROXY=http://127.0.0.1:58591; export HTTPS_PROXY=http://127.0.0.1:58591; export ALL_PROXY=socks5://127.0.0.1:51837
难道是:
此处端口是另外的?
先不管,去试试
git config --global http.https://github.com.proxy socks5://127.0.0.1:51837
结果:
还真的是:
此处Trojan的QT版本,代理是:
入站设置中的。。。
只不过出现了其他错误而已:
➜  temp git config --global http.https://github.com.proxy socks5://127.0.0.1:51837
➜  temp git clone https://github.com/powerline/fonts.git --depth=1
Cloning into 'fonts'...
fatal: unable to access 'https://github.com/powerline/fonts.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
换其他服务器节点试试
好像都不对。
算了,重启macOS。
➜  temp git clone https://github.com/powerline/fonts.git --depth=1
Cloning into 'fonts'...
fatal: unable to access 'https://github.com/powerline/fonts.git/': Empty reply from server
错误现象变了。
终于代理加成功,下载速度快多了:
➜  temp git clone https://github.com/powerline/fonts.git --depth=1
Cloning into 'fonts'...
remote: Enumerating objects: 310, done.
remote: Counting objects: 100% (310/310), done.
remote: Compressing objects: 100% (236/236), done.
remote: Total 310 (delta 75), reused 260 (delta 71), pack-reused 0
Receiving objects: 100% (310/310), 10.40 MiB | 490.00 KiB/s, done.
Resolving deltas: 100% (75/75), done.
即可。

转载请注明:在路上 » 【已解决】Win中VMWare中macOS给git加上代理加速GitHub仓库下载

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
90 queries in 0.183 seconds, using 23.37MB memory