Article delegate-en/4337 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: Few questions about transparent proxy & srcif
08 Jan 2009 04:06:25 GMT (Yutaka Sato)
The DeleGate Project


In message <_A4336@delegate-en.ML_> on 01/08/09(01:10:15)
you "Master NoSFeRaTU" <> wrote:
 |Hello. I want to ask a few questions:
 | Q1) I spend some time to search in mail-archives, but can't find how
 |to setup a squid-like transparent proxy(http_port
 |transparent). I'm using freebsd, I add such rule:
 |ipfw add 2000 fwd,3128 tcp from CLIENTIP to any http
 |On run delegate, with various variants in config: from
 |RELAY=vhost to SERVER=http://odst.-:- But I receive any answers: from

"odst.-" requires SO_ORIGINAL_DST option of setsockopt() and it is enabled
maybe only on Linux.  It is hardcoded as follows in "nbio.c".

 >#if defined(SOL_IP) && defined(EOPNOTSUPP)
 >#define SO_ORIGINAL_DST 80 /* <linux/netfilter_ipv4.h> */
 >#define SO_ORIGINAL_SRC 81 /* <linux/netfilter_ipv4.h> */
 >static int withOD;
 >int withORIGINAL_DST(){
 >        return 1;

As this code shows, it irequires SOL_IP and EOPNOTSUPP to be defined to
be enabled.  If it is not the case in FreeBSD, and SO_ORIGINAL_DST is
available, you can add the conditions for FreeBSD.
Anyway I'll modify the code to automatically detect the availability of
SO_ORIGINAL_DST in the next release.

  9 9   Yutaka Sato <>
 ( ~ )  National Institute of Advanced Industrial Science and Technology
_<   >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan
Do the more with the less -- B. Fuller

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]