Glam Prestige Journal

Bright entertainment trends with youth appeal.

I am behind a very capricious proxy (squid) and it seems only http requests made with a particular user-agent are allowed.

When fetching google.com from Google Chrome, I can see a HTTP GET on WireSharc. However, wget tries to resolve the DNS first through the default DNS servers which never answer.

How can I make wget or even git use the proxy instead of a direct DNS query?

4

2 Answers

How can I make wget or even git use the proxy instead of a direct DNS query?

Set the proxy environment variable and it will do this straight up:

export http_proxy='
wget 
2

there is no mechanism to specify that the proxy should try a particular IP address for a particular host. You could change the URL from, say, to , but then the proxy server won't know the hostname to request. The modern web (HTTP/1.1) depends on a Host header always being present in a request, allowing one web server to serve multiple sites identified by their hostname.

Your best bet would be to configure the proxy server to use the DNS resolver of your choice. This would only be possible if you use a local proxy server that you control.

Resource -

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy