-
Notifications
You must be signed in to change notification settings - Fork 64
Proxy
If you're unfortunate enough to work behind a proxy, here are my tips for getting things working well enough to work with ZJS.
These instructions are based on Ubuntu 16.04.
Hit the Windows key, type 'proxy', and select the 'Network' settings item that comes up. Click on the "Network proxy" item on the left. Then enter your proxy settings with either the Automatic or Manual method depending on your environment.
Add these lines to your ~./bashrc:
export http_proxy="http://<proxy.example.com>:<port>/"
export https_proxy="https:<proxy.example.com>:<port>/"
export ftp_proxy="http://<proxy.example.com>:<port>/"
export socks_proxy="http://<proxy.example.com>:<port>/"
export no_proxy="localhost,<example.com>,<.example.com>"
Then source your bashrc again:
$ source ~/.bashrc
Add this line to your /etc/sudoers
file (you can use $ sudo visudo
to edit the file without permissions difficulties):
Defaults env_keep = "http_proxy https_proxy ftp_proxy socks_proxy no_proxy"
This will mean that when you do sudo commands, those variables will still be set from your normal user environment, so sudo will inherit your proxy settings and things like sudo apt-get update
will work.
Create or update the file ~/.ssh/config with a section like this:
Host *.gh.neting.cc github.com
Protocol 2
ProxyCommand nc -x<proxy.example.com> -X5 %h %p
(This assumes you have a SOCKS5 proxy on default port 1080.)
Now, you should be ready to go, unless your situation is even worse than mine.