WSL一些记录的点。

最后修改时间:2024/7/8 14:52:04

Clash连接

Clash中Allow LAN。

在WSL中

nano ~/.profile

然后复制入

# set proxy
proxy=http://$(cat /etc/resolv.conf |grep -oP '(?<=nameserver\ ).*'):7890
export http_proxy=$proxy
export https_proxy=$proxy
export all_proxy=$proxy
export ALL_PROXY=$proxy
export no_proxy="localhost,127.0.0.1"

立刻生效

source ~/.profile

如果要删除这些代理,需要:

unset http_proxy
unset https_proxy
unset all_proxy
unset ALL_proxy
unset no_proxy

外网连通性测试:

curl -v https://shishuyang.cn/

上述中的-v会告诉你具体的连接情况。

Python 换清华源

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple