重建网络

在 Windows PowerShell(管理员)执行

      wsl --shutdown
    

然后

      netsh winsock reset
    
      netsh int ip reset
    

最后重启电脑(必须)

测试

在windows执行ipconfig

你会看到类似:

IPv4 Address. . . . . . . . . . . : 192.168.1.4

用这个 IP

curl http://192.168.1.4:7890 如果这个能通,直接用

      export http_proxy=http://192.168.1.4:7890
    

端口查找

查找端口是否占用

      netstat -ano | findstr 7890
    

执行脚本

ubuntn

      sudo bash -c "$(curl -sL kejilion.sh)"
    

centos

      bash <(curl -sL kejilion.sh)
    

声明

作者: liyao

版权:本博客所有文章除特别声明外,均采用CCBY-NC-SA4.O许可协议。转载请注明!