In actual development, it is necessary to use proxies in wsl. This repository provides support for quickly setting proxies and quickly canceling proxy settings in wsl.
This project uses WSL Git Go check them out if you don't have them locally installed.
$ git clone https://github.com/weiensong/wslProxy.git
# ❗ Enter the pull directory and set the port in it ❗
# move to /data/tools
$ sudo mv proxy.sh /data/tools/proxy.sh
# ❗ Confirm the shell used, currently using zsh, set to alias ❗
$ nvim ~/.zshrc
# Add the following content:
alias proxy='source /data/tools/proxy.sh'
$ source ~/.zshrc
❗❗❗At the same time, ensure that your proxy client allows LAN proxies, that is, Allow LAN. ❗❗❗
# Enable Proxy
$ proxy set
# Disable Proxy
$ proxy unset
# Output proxy information
$ proxy check
# View proxy parameters
$ proxy help
# Test proxy
$ curl google.com
- zsh — Mirror of the Z shell source code repository
- clash — A rule-based tunnel in Go
- v2rayN — A GUI client for Windows, support Xray core and v2fly core and others
- ohmyzsh — delightful community-driven (with 2,100+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.
Feel free to dive in! Open an issue or submit PRs.
Standard Python follows the Shell Code of Conduct.
This project exists thanks to all the people who contribute.
MIT © weiensong