hostip=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }')
alias socks='ALL_PROXY=socks5://${hostip}:10800/ \
http_proxy=http://${hostip}:10800/ \
https_proxy=http://${hostip}:10800/ \
HTTP_PROXY=http://${hostip}:10800/ \
HTTPS_PROXY=http://${hostip}:10800/'
先查询 wsl 分配的 ip ,然后 alias 一个 socks 。想走代理的话加 socks 前缀就行了:socks curl
cip.cc