Merge pull request #522 from trialism/master

Improved handling of proxy environment variables
This commit is contained in:
Dominik Picheta 2018-08-17 12:07:42 +01:00 committed by GitHub
commit c169338e54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -386,6 +386,10 @@ proc getProxy*(options: Options): Proxy =
url = getEnv("http_proxy")
elif existsEnv("https_proxy"):
url = getEnv("https_proxy")
elif existsEnv("HTTP_PROXY"):
url = getEnv("HTTP_PROXY")
elif existsEnv("HTTPS_PROXY"):
url = getEnv("HTTPS_PROXY")
except ValueError:
display("Warning:", "Unable to parse proxy from environment: " &
getCurrentExceptionMsg(), Warning, HighPriority)