自动设置Linux ***代理命令
addr=$( /mnt/c/Windows/System32/ipconfig.exe | iconv -f GBK -t UTF-8 | grep -a "IPv4" | grep -o "192[.0-9]*" )
# check if managed to get ip addr
if [ -z "$addr" ]; then
echo "未找到符合条件的IPv4地址。"
exit 1
fi
export http_proxy=http://${addr}:7890
export https_proxy=http://${addr}:7890

浙公网安备 33010602011771号