From: John Haxby <john.haxby@oracle.com>
To: linux@arcoscom.com
Cc: netfilter@vger.kernel.org
Subject: Re: Https website is not accessible once transparent proxy is set up
Date: Tue, 16 Sep 2008 14:50:12 +0100 [thread overview]
Message-ID: <48CFB994.1060404@oracle.com> (raw)
In-Reply-To: <fb6debad85eb3106cd197c989db6027c.squirrel@www.arcoscom.com>
ArcosCom Linux User wrote:
> El Mar, 16 de Septiembre de 2008, 13:19, John Haxby escribió:
>
>> Well, not by squid, but the connection can be transparently proxied. I
>> have a tiny transparent proxy that redirects all connections to any port
>> outside an intranet to a connection through an HTTP CONNECT request.
>>
>>
> As I now (and have working some HTTP proxyes with squid+iptables), the
> problem are the requests.
>
> Well, when you do a REDIRECT from 80 to 3128 (for squid), the squid must
> know that it is working in transparent mode to process correctly the HTTP
> requests, because they aren't directly for the proxy.
>
> If you use the same theory for any other protocol, the "proxy" must know
> how to process correctly these type of connections.
>
> What "tiny transparent proxy" are you using? Perhaps, anybody could help
> you in any trick with it!!.
>
>
It's a small program that basically accepts connections, creates an
onward connection to the http proxy at the periphery and sends an
appropriate CONNECT <addr>:<port> request.
The address and port come from this
struct sockaddr_in sin;
socklen_t len = sizeof(sin);
getsockopt (sock, SOL_IP, SO_ORIGINAL_DST, &sin, &len);
sprintf(buf, "CONNECT %s:%d HTTP/1.0\r\n\r\n",
inet_ntoa(sin.sin_addr), ntohs(sin.sin_port));
I can't remember if I found this by grepping the squid source code or
from a different web proxy. I really must find the time to pretty up my
program (and remove the bug that makes it crash from time to time) so I
can publish it somewhere for general consumption. It saves having to
configure world+dog to use a proxy.
jch
next prev parent reply other threads:[~2008-09-16 13:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-16 6:49 Https website is not accessible once transparent proxy is set up Sam Chan
2008-09-16 11:03 ` ArcosCom Linux User
2008-09-16 11:19 ` John Haxby
2008-09-16 11:50 ` ArcosCom Linux User
2008-09-16 13:50 ` John Haxby [this message]
2008-09-16 18:01 ` Vimal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48CFB994.1060404@oracle.com \
--to=john.haxby@oracle.com \
--cc=linux@arcoscom.com \
--cc=netfilter@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.