All Projects → SukkaW → Zsh Proxy

SukkaW / Zsh Proxy

Licence: mit
🔩 An oh-my-zsh plugin to configure proxy

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Zsh Proxy

Dotfiles
Get started with your own dotfiles.
Stars: ✭ 1,094 (+575.31%)
Mutual labels:  zsh, oh-my-zsh
Castle Winbuntu
Homesick Castle for use on WSL.
Stars: ✭ 87 (-46.3%)
Mutual labels:  zsh, oh-my-zsh
Dotfiles
What tools and plugins I use for web development?
Stars: ✭ 73 (-54.94%)
Mutual labels:  zsh, oh-my-zsh
Kube Aliases
Kubernetes Aliases and Bash Functions
Stars: ✭ 40 (-75.31%)
Mutual labels:  zsh, oh-my-zsh
History Sync
An oh-my-zsh plugin for GPG encrypted internet synchronised Zsh history, with Git.
Stars: ✭ 135 (-16.67%)
Mutual labels:  zsh, oh-my-zsh
Honukai Iterm Zsh
Honukai theme and colors for Oh My ZSH and iTerm
Stars: ✭ 1,034 (+538.27%)
Mutual labels:  zsh, oh-my-zsh
Pi
A minimalist zsh theme with git status decorations
Stars: ✭ 76 (-53.09%)
Mutual labels:  zsh, oh-my-zsh
Termux Desktop
Setup A Beautiful Desktop/GUI In Termux
Stars: ✭ 527 (+225.31%)
Mutual labels:  zsh, oh-my-zsh
Zsh Nvm
Zsh plugin for installing, updating and loading nvm
Stars: ✭ 1,670 (+930.86%)
Mutual labels:  zsh, oh-my-zsh
Dotfiles
Alacritty + Tmux + Oh My Zsh + Neovim = ❤️
Stars: ✭ 95 (-41.36%)
Mutual labels:  zsh, oh-my-zsh
Iterm Tab Color Oh My Zsh
Oh My Zsh plugin for setting iTerm2's custom tab colors
Stars: ✭ 21 (-87.04%)
Mutual labels:  zsh, oh-my-zsh
Sheldon
A fast, configurable, shell plugin manager
Stars: ✭ 144 (-11.11%)
Mutual labels:  zsh, oh-my-zsh
My Zsh Config
My custom Oh My Zsh configuration.
Stars: ✭ 5 (-96.91%)
Mutual labels:  zsh, oh-my-zsh
Zsh Symfony Completion
(Oh My) ZSH symfony/console Completion Plugin
Stars: ✭ 50 (-69.14%)
Mutual labels:  zsh, oh-my-zsh
Dotfiles
Dotfiles for all :D
Stars: ✭ 700 (+332.1%)
Mutual labels:  zsh, oh-my-zsh
Lambda Gitster
oh-my-zsh theme
Stars: ✭ 74 (-54.32%)
Mutual labels:  zsh, oh-my-zsh
Fz
Cli shell plugin, the missing fuzzy tab completion feature of z jump around command.
Stars: ✭ 359 (+121.6%)
Mutual labels:  zsh, oh-my-zsh
Zsh Notify
Desktop notifications for long-running commands in zsh.
Stars: ✭ 389 (+140.12%)
Mutual labels:  zsh, oh-my-zsh
Zsh to fish
How to make zsh like fish?
Stars: ✭ 93 (-42.59%)
Mutual labels:  zsh, oh-my-zsh
Purify
🌈 Clean & vibrant color schemes for Vim, Terminals...
Stars: ✭ 142 (-12.35%)
Mutual labels:  zsh, oh-my-zsh

zsh-proxy

Author License

🔩 An oh-my-zsh plugin to configure proxy for some packages manager and software.

Installation

oh-my-zsh

Firstly, clone this repository in oh-my-zsh's plugins directory.

git clone https://github.com/sukkaw/zsh-proxy.git ~/.oh-my-zsh/custom/plugins/zsh-proxy

Secondly, activate the plugin in ~/.zshrc. Enable it by adding zsh-proxy to the plugins array.

plugins=(
    [plugins
     ...]
    zsh-proxy
)

Antigen

Antigen is a zsh plugin manager, and it support oh-my-zsh plugin as well. You only need to add antigen bundle sukkaw/zsh-proxy to your .zshrc with your other bundle commands if you are using Antigen. Antigen will handle cloning the plugin for you automatically the next time you start zsh. You can also add the plugin to a running zsh with antigen bundle sukkaw/zsh-proxy for testing before adding it to your .zshrc.


Congratulations! Open a new terminal or run source $HOME/.zshrc. If you see following lines, you have successfully installed zsh-proxy:

----------------------------------------
You should run following command first:
$ init_proxy
----------------------------------------

Usage

init_proxy

The tip mentioned below will show up next time you open a new terminal if you haven't initialized the plugin with init_proxy.

After you run init_proxy, it is time to configure the plugin.

config_proxy

Execute config_proxy will lead you to zsh-proxy configuration. Fill in socks5 & http proxy address in format address:port like 127.0.0.1:1080 & 127.0.0.1:8080.

Default configuration of socks5 proxy is 127.0.0.1:1080, and http proxy is 127.0.0.1:8080. You can leave any of them blank during configuration to use their default configuration.

Currently zsh-proxy doesn't support proxy with authentication, but I am working on it.

proxy

After you configure the zsh-proxy, you are good to go. Try following command will enable proxy for supported package manager & software:

$ proxy

And next time you open a new terminal, zsh-proxy will automatically enable proxy for you.

noproxy

If you want to disable proxy, you can run following command:

$ noproxy

myip

If you forget whether you have enabled proxy or not, it is fine to run proxy command directly, as proxy will reset all the proxy before enable them. But the smarter way is to use following command to check which IP you are using now:

$ myip

Check procedure will use curl and the IP data come from ipip.net, ip.cn & ip.gs.

Uninstallation

If you install zsh-proxy with Antigen, you need to remove antigen bundle sukkaw/zsh-proxy to disable the plugin. If you install zsh-proxy with oh-myzsh, you need to remove zsh-proxy item from plugin array, then run rm -rf ~/.oh-my-zsh/custom/plugins/zsh-proxy to remove the plugin.

And you can clean up files & folders created by zsh-proxy using following command:

$ rm -rf ~/.zsh-proxy

Supported

zsh-proxy currently support those package manager & software:

  • http_proxy
  • https_proxy
  • ftp_proxy
  • rsync_proxy
  • all_proxy
  • git (http)
  • npm & yarn
  • apt

Todo List

  • socks5 & http proxy with authentication.
  • check whether the program exist before enable proxy for it
  • proxy for sudo user (env_keep or sorts of things)
  • proxy for:
    • yum
    • pip
    • gradle
    • git with ssh
    • gem
  • no_proxy config
  • learn some from arch wiki

Author

zsh-proxy © Sukka, Released under the MIT License.
Authored and maintained by Sukka with help from contributors (list).

Personal Website · Blog · GitHub @SukkaW · Telegram Channel @SukkaChannel · Twitter @isukkaw · Keybase @sukka

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].