Skip to content

An oh-my-zsh plugin for managing and displaying proxy status.

License

Notifications You must be signed in to change notification settings

vv314/zsh-proxy-pro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌐 zsh-proxy-pro

An oh-my-zsh plugin for managing and displaying proxy status.

Installation

Clone this repository into the oh-my-zsh plugins directory:

git clone https://github.com/vv314/zsh-proxy-pro.git $ZSH_CUSTOM/plugins/zsh-proxy-pro

Add zsh-proxy-pro to your plugins array in your zshrc file:

plugins=(... zsh-proxy-pro)

Usage

proxy_pro [OPTION] [ARGUMENT]

Options:

-o  enable the proxy
-c  configure proxy
-q  quit the proxy
-s  show the proxy status
-h  show the help

Configure proxy

Usage: proxy_pro -c <http | socks5> <host:port>

Examples:

# Set http proxy
proxy_pro -c http 127.0.0.1:6152

# Set socks5 proxy
proxy_pro -c socks5 127.0.0.1:6153

Enable proxy

proxy_pro -o

Disable proxy

proxy_pro -q

Print status

proxy_pro -s

Outputs:

Terminal proxy is enabled.

Proxy Configuration:
  http              http://127.0.0.1:6152
  socks5            socks5://127.0.0.1:6153

Environment Variables:
  http_proxy        http://127.0.0.1:6152
  HTTP_PROXY        http://127.0.0.1:6152
  https_proxy       http://127.0.0.1:6152
  HTTPS_PROXY       http://127.0.0.1:6152
  all_proxy         socks5://127.0.0.1:6153
  ALL_PROXY         socks5://127.0.0.1:6153

Customize Prompt

When the proxy is enabled, a prompt symbol 🌐 will be displayed.

You can customize the icon using PROXY_PROMPT_SYMBOL.

~/.zshrc

export PROXY_PROMPT_SYMBOL="🔐"

Uninstallation

Remove the zsh-proxy-pro item from the plugins array.

Remove zsh-proxy-pro from disk:

rm -rf $ZSH_CUSTOM/plugins/zsh-proxy-pro ~/.zsh-proxy-pro

About

An oh-my-zsh plugin for managing and displaying proxy status.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages