2

I am trying to execute the following:

curl twitter.com

But I have got the proxy http://proxyurl:port set in ~/.curlrc

However, when executing curl twitter.com I am getting

curl: (5) Could not resolve proxy: proxyurl

I have tried almost everything such as defining http_proxy in ~/.bashrc

But still no luck.

So two questions, what does it mean by could not resolve proxy,

and secondly how do I resolve it.

Thanks in advance.

3
  • stackoverflow.com/questions/17819524/curl-through-proxy-syntax Commented Jul 27, 2021 at 12:43
  • @AvalSarri thanks for your reply, the steps in that thread does not help me, but I do have a question, the proxy I made is meant to be a local proxy, meaning the dns wasnt assigned to an ip address, so will I need to add that ip in the hosts file and assign it an IP addy Commented Jul 27, 2021 at 19:02
  • I am not able to understand this, for proxy can you use IP and check instead using a hostname? ping to proxy-ip works? Commented Jul 30, 2021 at 10:25

1 Answer 1

0

It means you didn't totally remove your proxy. In other words, to be able to resolve it after commenting your settings or deleting the config of your proxy in the ~/.bashrc file, you need to unset the proxy variables by using the following commands:

unset http_proxy
unset ftp_proxy
unset https_proxy

To double check if the proxy is totally removed just execute this command:

env | grep -i proxy
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.