命令行使用代理教程

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
ZTE B863 TV Box S905L3A ATV System Flashing Guide
ZTE B863 TV Box S905L3A ATV Sy...
05:26 | 744

Android TV Box ZTE B863AV3.1-M2 Flashing ATV Syste...

Synology NAS Quick DSM SSL Certificate Update
Synology NAS Quick DSM SSL Cer...
10:50 | 389

Based on Synology 7.2.1 system, how to quickly upd...

Synology Hyper Backup Guide for DSM 7.2
Synology Hyper Backup Guide fo...
11:38 | 140

A guide to using Synology's Hyper Backup package, ...

Docker Nginx Free SSL Certificate for Synology NAS
Docker Nginx Free SSL Certific...
16:17 | 282

Based on Synology 7.2.1 system, how to automatical...