Score:1

CURL with proxy isn't working

iq flag

I have Squid proxy installed on Ubuntu 20.4 LTS. The squid is listening on port 8118.

When I'm testing it with curl -x localhost:8118 https://api.ipify.org/?format=json It's getting stuck.

When I'm using the Proxy IP it's working outside of the Linux machine.

curl -x PROXY_IP:8118  

What can be the cause of this issue?

Ido Segal avatar
iq flag
It's not working for me when adding it manually, so why do you think it will work this way?
Ido Segal avatar
iq flag
Yes, tried it just now, and it's not working.
Terrance avatar
id flag
Doesn't sound like a problem with CURL, but possibly your Squid isn't working right. https://docs.huihoo.com/gnu_linux/squid/html/x922.html
Ido Segal avatar
iq flag
I've edited the question, more details added.
Terrance avatar
id flag
I setup a squid server here for testing. In the `/etc/squid/squid.conf` around line 1400 there is a line that says either `http_access allow localhost` or `http_access deny localhost`. Testing mine with `deny` gives a HTTP code 403 if unable to connect. If you are getting nothing and it is just hanging, you might have something else that could be conflicting with it on that system like a VPN or something. I cannot duplicate any hangs though.
Score:1
iq flag

Adding rule:

sudo iptables -P INPUT ACCEPT

Solved my issue.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.