Skip to content

Instantly share code, notes, and snippets.

@bolerap
Created September 11, 2017 08:13
Show Gist options
  • Save bolerap/d500c56e82e1bf85950cb7b523b2d7b4 to your computer and use it in GitHub Desktop.
Save bolerap/d500c56e82e1bf85950cb7b523b2d7b4 to your computer and use it in GitHub Desktop.
Setting proxy for alpine linux
  1. create a file to keep environment variables (called env.sh here) at /etc/profile.d/env.sh
  2. export two proxy variable in /etc/profile.d/evn.sh as below
export http_proxy=http://<ip/name>:<port>
export https_proxy=$http_proxy
@finddabug
Copy link

I recently tried this on an Alpine 3.9 release but it didn't work for me.
Looks like the env.sh script is not called on boot?

touch /etc/profile.d/env.sh
vi  /etc/profile.d/env.sh
   # add your export proxy variables ..
chmod +x /etc/profile.d/env.sh
# Reboot

No proxy gateway recognized :-(

@Avanzato
Copy link

Try setup-proxy schema://user:password@proxy.url:port, then relogin

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