From b2c1fc00a453690c86c82d895ab6176f4a462bfc Mon Sep 17 00:00:00 2001 From: cyrus Date: Fri, 6 Aug 2010 23:00:57 +0000 Subject: [PATCH] [packages] haproxy: add transparent mode, needed for SNAT-TPROXY-Load-Balancing which is working since [r21883], thanks jow git-svn-id: svn://svn.openwrt.org/openwrt/packages@22523 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- net/haproxy/Makefile | 4 ++-- net/haproxy/files/haproxy.cfg | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/net/haproxy/Makefile b/net/haproxy/Makefile index 0f09b536d..fcd0243d9 100644 --- a/net/haproxy/Makefile +++ b/net/haproxy/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=haproxy PKG_VERSION:=1.4.8 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://haproxy.1wt.eu/download/1.4/src @@ -42,7 +42,7 @@ define Build/Compile CFLAGS="$(TARGET_CFLAGS)" \ LD="$(TARGET_CC)" \ LDFLAGS="$(TARGET_LDFLAGS)" \ - SMALL_OPTS="-DBUFSIZE=16060 -DMAXREWRITE=8192 -DSYSTEM_MAXCONN=65530" \ + SMALL_OPTS="-DBUFSIZE=16060 -DMAXREWRITE=8192 -DSYSTEM_MAXCONN=65530" USE_LINUX_TPROXY=1 \ all install endef diff --git a/net/haproxy/files/haproxy.cfg b/net/haproxy/files/haproxy.cfg index 60bcb5ba0..1c56884a6 100644 --- a/net/haproxy/files/haproxy.cfg +++ b/net/haproxy/files/haproxy.cfg @@ -77,6 +77,9 @@ listen my_smtp_proxy # Round robin load balancing over two servers on port 123 forcing # the address 192.168.1.1 and port 25 as source. balance roundrobin + #use next line for transparent proxy, so the servers can see the + #original ip-address and remove source keyword in server definition + #source 0.0.0.0 usesrc clientip server server01 192.168.1.10:123 source 192.168.1.1:25 server server02 192.168.1.20:123 source 192.168.1.1:25 -- 2.11.0