# wsl_proxy **Repository Path**: nannanmath/wsl_proxy ## Basic Information - **Project Name**: wsl_proxy - **Description**: 通过shell脚本为WSL设置proxy。 - **Primary Language**: Shell - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-08-05 - **Last Updated**: 2025-12-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # wsl_proxy #### 介绍 通过shell脚本为WSL设置proxy。 #### 配置方法 ```bash # clone到自定义位置(这里为~/Apps) git clone https://gitee.com/nannanmath/wsl_proxy.git # 添加执行权限 cd wsl_proxy chmod +x set_proxy.sh ``` 编辑`~/.bashrc`文件,加入如下几行: ```bash # proxy export PATH=$PATH:$HOME/Apps/wsl_proxy alias proxy='source ~/Apps/wsl_proxy/set_proxy.sh' ``` 然后`source ~/.bashrc`使其生效。 #### 使用方法 ```bash # 设置http代理 proxy set-http # 设置git代理 proxy set-git # 设置http + git代理 proxy set-all # 取消http代理 proxy unset-http # 取消git代理 proxy unset-git # 取消全部代理 proxy unset-all ```