命令行使用代理教程
Support Content
## 1. Commands used in the video
> 1.1 One-time proxy setup
```
export https_proxy=http://127.0.0.1:7890
```
> 2.1 Status test
```
echo $https_proxy
```
> 2.2 Access test
```
curl -I https://www.google.com
```
> 3. Cancel proxy settings
```
unset https_proxy # for https
unset http_proxy # for http
```
> 4. Reusable proxy settings
> 4.1 Edit file
```
vi ~/.zshrc
```
> 4.2 Add content
```
# Proxy enable function // Proxy on
proxy_on() {
export http_proxy=http://127.0.0.1:7890
export https_proxy=http://127.0.0.1:7890
export all_proxy=socks5://127.0.0.1:7890
echo "proxy on, close by - proxy_off"
}
# Always run //always on
proxy_on
# Proxy disable function // Proxy off
proxy_off() {
unset http_proxy https_proxy all_proxy
echo "proxy off"
}
```
Recommended
Starsector 0.98 Chinese Versio...
06:40 | 108Starsector Online Tools Website (https://sst.lib00...
Major Change to GitHub Copilot...
00:00 | 169Breaking update from GitHub! Starting March 13, 20...
AI Showdown: Codex 5.3 vs. Opu...
00:00 | 156The AI world is shaken again! OpenAI's Codex 5.3 a...
Synology USB Copy Guide for DS...
09:57 | 163Synology Backup Package USB Copy User Guide, cover...