Skip to content

microdog/pctl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pctl - zsh plugin for proxy

Overview | Installation | Configuration | License

license-badge release-badge

Overview

This is zsh plugin to toggle the environment variables of proxy.

screenshot

Installation

You can use zplug to install pctl. Add the following to your .zshrc:

zplug 'ytet5uy4/pctl'

Configuration

Add the following to your .zshenv:

export PCTL_PROXY_ADDRESS=proxy.example.com
export PCTL_PROXY_PORT=8080
export PCTL_NO_PROXY=localhost,127.0.0.1,.internal.example.com

or

If you have envchain installed, run following command:

$ envchain --set proxy PCTL_PROXY_ADDRESS PCTL_PROXY_PORT PCTL_NO_PROXY
proxy.PCTL_PROXY_ADDRESS: proxy.example.com
proxy.PCTL_PROXY_PORT: 8080
proxy.PCTL_NO_PROXY: localhost,127.0.0.1,.internal.example.com

Running pctl --set manages both lowercase and uppercase proxy variables: http_proxy, HTTP_PROXY, https_proxy, HTTPS_PROXY, no_proxy, and NO_PROXY.

Use pctl --status to inspect the current values of all managed variables.

To keep the environment variables of proxy when using sudo, append the following to /etc/sudoers via sudo visudo:

Defaults env_keep += "http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY"

License

Copyright (c) 2015 ytet5uy4

Released under the MIT License, see LICENSE.md.

About

zsh plugin for proxy

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Shell 100.0%