Menu

http_proxy environment variable: what each tool actually reads
📰

http_proxy environment variable: what each tool actually reads

DEV Community: tutorial·proxymint·3 days ago
#eGlGFoZP
#devtotutorial#devto#dev#proxy#no_proxy
Reading 0:00
15s threshold

Originally published on proxymint .

How http_proxy, HTTPS_PROXY, ALL_PROXY and NO_PROXY work in curl, wget, Python, Go, Node, Ruby and Java: case rules, NO_PROXY matching, debugging.

TL;DR

Export both cases with the same value. curl and wget only read lowercase http_proxy, Go prefers HTTP_PROXY when both exist, so two values that drift apart send two tools to two different proxies.

Set https_proxy too, or HTTPS goes direct. The tool picks the variable by the site's scheme, and the page still loads without the proxy, which is why this one goes unnoticed for weeks.

Keep the value http:// even in HTTPS_PROXY. It looks wrong, but the https in the name is about the sites you visit; your client sends CONNECT to the proxy over plain HTTP and the site's TLS runs inside that tunnel.

Node and Java need extra steps.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.