diff --git a/fish/add-on.fish b/fish/add-on.fish index 21283d9..d5b2133 100644 --- a/fish/add-on.fish +++ b/fish/add-on.fish @@ -139,4 +139,19 @@ abbr -a port 'sudo ss -tulnp | grep' abbr -a process 'sudo ps aux | grep' abbr -a service 'sudo systemctl list-units --type=service --all | grep' -alias fastfetch="fastfetch --color-keys blue" \ No newline at end of file +alias fastfetch="fastfetch --color-keys blue" + +function proxy --description 'Set HTTP proxy for current session' + echo -n "HTTP proxy address (e.g. http://192.168.5.14:6152): " + read proxy_addr + + if test -n "$proxy_addr" + set -gx HTTP_PROXY "$proxy_addr" + set -gx HTTPS_PROXY "$proxy_addr" + echo "Proxy set: $proxy_addr" + else + echo "Proxy cleared" + set -e HTTP_PROXY + set -e HTTPS_PROXY + end +end \ No newline at end of file