From owner-freebsd-net@FreeBSD.ORG  Wed Jul 30 16:16:27 2008
Return-Path: <owner-freebsd-net@FreeBSD.ORG>
Delivered-To: freebsd-net@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B03A4106566B
	for <freebsd-net@freebsd.org>; Wed, 30 Jul 2008 16:16:27 +0000 (UTC)
	(envelope-from bra@fsn.hu)
Received: from people.fsn.hu (people.fsn.hu [195.228.252.137])
	by mx1.freebsd.org (Postfix) with ESMTP id 7B4BA8FC0C
	for <freebsd-net@freebsd.org>; Wed, 30 Jul 2008 16:16:27 +0000 (UTC)
	(envelope-from bra@fsn.hu)
Received: from [172.16.151.53] (fw.axelero.hu [195.228.243.120])
	by people.fsn.hu (Postfix) with ESMTP id 0C4E411BC48
	for <freebsd-net@freebsd.org>; Wed, 30 Jul 2008 18:00:12 +0200 (CEST)
Message-ID: <48909009.1070805@fsn.hu>
Date: Wed, 30 Jul 2008 18:00:09 +0200
From: Attila Nagy <bra@fsn.hu>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
To: freebsd-net@freebsd.org
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Subject: SO_BINDANY and pf divert
X-BeenThere: freebsd-net@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Networking and TCP/IP with FreeBSD <freebsd-net.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-net>,
	<mailto:freebsd-net-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-net>
List-Post: <mailto:freebsd-net@freebsd.org>
List-Help: <mailto:freebsd-net-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-net>,
	<mailto:freebsd-net-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 30 Jul 2008 16:16:27 -0000

Hello,

OpenBSD's relayd has grown a very useful transparent relay support, 
which means you can run a HTTP(S) reverse proxy transparently 
(maintaining the source IP, while you have a different TCP stream open 
from the proxy to the backend, even by terminating the SSL part and 
speaking clear text HTTP to the backends).

For this (as far as I could figure out, while trying to make this newer 
relayd working on FreeBSD) two pieces are needed, which FreeBSD 
currently lacks:
- the SO_BINDANY support (see 
http://marc.info/?l=openbsd-cvs&m=121030159009823&w=2 and 
http://www.openbsd.org/cgi-bin/man.cgi?query=setsockopt)
- the pf part, which diverts the non-local packets to the given socket 
(see http://marc.info/?l=openbsd-cvs&m=121030115209292&w=2 and 
http://www.openbsd.org/cgi-bin/man.cgi?query=pf.conf)

After having those said, the question is obvious. :)
Does anybody feel the need for these two in FreeBSD and have the 
competence and time to port them?

Thanks,