cURL / Mailing Lists / curl-users / Single Mail

curl-users

Using curl to setup TCP connection through squid proxy

From: PenguinWhispererThe . <th3penguinwhisperer_at_gmail.com>
Date: Wed, 11 Jun 2014 11:11:46 +0200

Hi all,

I'm setting up a nagios machine and it's behind a proxy.
For this machine the connect method is allowed to all ports.

The idea is to use curl with the proxytunnel option and open a TCP
connection like that to other protocols: SMTP, IMAP, ... I would be happy
if I already could do a TCP check (so the proxy being able to connect).
Is this possible using curl?

curl -x x.x.x.x:3128 --proxytunnel target.com:25 -v

However I see the proxy sending HTTP requests (or that is what it looks
like).

When I use SMTP as the protocol (so in the proxytunnel part):
curl: (1) Protocol smtp not supported or disabled in libcurl

Is there a generic way where curl only sets up the connection through the
proxy and the protocol is handled by me?

Are there alternatives to accomplish this? Like telnetting and writing the
connect statements myself (not sure what the proxy expects to see to set up
a tunnel (CONNECT hostname:port probably but maybe more than that).

Thanks a lot in advance!

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-06-11