命令行使用代理教程

Published: 2026-03-23
Author: DP
Views: 5
Category: Video
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 Version Release Announcement
Starsector 0.98 Chinese Versio...
06:40 | 108

Starsector Online Tools Website (https://sst.lib00...

Major Change to GitHub Copilot Student Pack: Access to GPT-5.4 and Claude Advanced Models Revoked
Major Change to GitHub Copilot...
00:00 | 169

Breaking update from GitHub! Starting March 13, 20...

AI Showdown: Codex 5.3 vs. Opus 4.6 Released on the Same Day! The Ultimate Battle of Speed and Intelligence
AI Showdown: Codex 5.3 vs. Opu...
00:00 | 156

The AI world is shaken again! OpenAI's Codex 5.3 a...

Synology USB Copy Guide for DSM 7.2 Backup
Synology USB Copy Guide for DS...
09:57 | 163

Synology Backup Package USB Copy User Guide, cover...