On Sun, Feb 02, 2003 at 01:20:12PM +1300, Ian Batterbee wrote: > >Subject: How does squid know original destination? > >From: Robert Vazan <robertvazan@host.sk> > > > >If I forward intranet -> internet connections to a proxy program, how do > >I discover from within my proxy what was original internet destination? > > The important line here is the "Host:" line, ie, the browser puts the name > of the site it wants to connect to as part of the HTTP request. I know about this and I feared this is the way squid is doing it. Unfortunately, I am not doing HTTP proxy, I want to proxy everything. I implemented my own TCP/IP stack in old version of my program. I hoped I could use existing TCP/IP stack in operating system for new version. The outstanding question is, what were those remarks about NAT options in getsockopt manpage? I am not dropping hopes yet. I know that TCP/IP stacks *can* do transparent proxying if they want.