Skip to content

Instantly share code, notes, and snippets.

@zhuweiyou
Created October 26, 2022 02:17
Show Gist options
  • Save zhuweiyou/42bf7f009a5e28693b1dcd0362a4048d to your computer and use it in GitHub Desktop.
Save zhuweiyou/42bf7f009a5e28693b1dcd0362a4048d to your computer and use it in GitHub Desktop.
#!/bin/sh
hostip=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }')
wslip=$(hostname -I | awk '{print $1}')
port=7890
PROXY_HTTP=${hostip}:${port}
export https_proxy=http://${PROXY_HTTP} http_proxy=http://${PROXY_HTTP} all_proxy=socks5://${PROXY_HTTP}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment