Skip to content

Instantly share code, notes, and snippets.

@CIAvash
Created September 21, 2014 13:35
Show Gist options
  • Save CIAvash/354b3b6bbe0197e9893c to your computer and use it in GitHub Desktop.
Save CIAvash/354b3b6bbe0197e9893c to your computer and use it in GitHub Desktop.
#!/usr/bin/env fish
set -x no_proxy 'localhost,127.0.0.1'
function toggle_proxy
if not set -q http_proxy
set -gx http_proxy 'http://127.0.0.1:8118'
set -gx https_proxy $http_proxy
echo 'Proxy On'
else
set -e http_proxy
set -e https_proxy
echo 'proxy Off'
end
end
@CIAvash
Copy link
Author

CIAvash commented Sep 21, 2014

Add this line to "~/.config/fish/config.fish":

source toggle_proxy.fish

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment