Skip to content

Instantly share code, notes, and snippets.

@filviu
filviu / 30detectproxy
Created December 2, 2015 10:26
apt-get use a proxy only if available. Shamelessly lifted from here: http://askubuntu.com/questions/53443/how-do-i-ignore-a-proxy-if-not-available
# /etc/apt/apt.conf.d/30detectproxy:
# Fail immediately if a file could not be retrieved. Comment if you have a bad
# Internet connection
Acquire::Retries 0;
# undocumented feature which was found in the source. It should be an absolute
# path to the program, no arguments are allowed. stdout contains the proxy
# server, stderr is shown (in stderr) but ignored by APT
Acquire::http::ProxyAutoDetect "/etc/apt/detect-http-proxy";