awslabs / aws-c-http

C99 implementation of the HTTP/1.1 and HTTP/2 specifications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support `NO_PROXY` environment variable

poconnor-lab49 opened this issue · comments

There does not appear to be a way to add a list of hosts which should not be proxied if HTTP_PROXY or HTTPS_PROXY are set.

The current workaround is to unset HTTP_PROXY whenever I want to run against localhost, but this obviously won't work if I need to reach a mix of resources which should and should not be be proxied.

Please add support for NO_PROXY and no_proxy to match the HTTP_PROXY env variable support.

@poconnor-lab49 I think we may need to agree on no_proxy behavior, as it has an interesting history.

See: We need to talk: Can we standardize NO_PROXY?

@poconnor-lab49 I think we may need to agree on no_proxy behavior, as it has an interesting history.

See: We need to talk: Can we standardize NO_PROXY?

I read the exact same article! Very informative.

My gut says to follow the principle of least surprise and do roughly what curl does. I'd target the lowest common denominator from that article and not bother with CIDR block matching.

The lack of NO_PROXY support for this implementation definitely caught us by surprise when attempting to swap AWS clients. We default traffic through squid proxies and then use NO_PROXY to exclude a list of endpoints, which prevents us from using the above workaround.