patch-tproxyrun 1.1 KB

1234567891011121314151617181920212223242526272829
  1. --- transproxy-1.6.orig/tproxyrun 2004-03-31 14:19:34.000000000 +0200
  2. +++ transproxy-1.6/tproxyrun 2012-10-24 09:06:52.000000000 +0200
  3. @@ -50,7 +50,7 @@ Linux)
  4. # I really have no idea about Linux, are these kernel versions correct
  5. # for the type if network filtering supported? Is there a surefire way?
  6. case `uname -r` in
  7. - 2.[3456789].*)
  8. + 3.*|2.[3456789].*)
  9. iptables -t nat -A PREROUTING -p tcp -d localhost --dport 80 -j ACCEPT
  10. iptables -t nat -A PREROUTING -p tcp -d "$HOSTNAME1" --dport 80 -j ACCEPT
  11. if [ -n "$HOSTNAME2" ]; then
  12. @@ -106,7 +106,7 @@ if [ -n "$FORCE_URL" ]; then
  13. fi
  14. # Start transproxy running.
  15. -/usr/local/sbin/tproxy -s "$TRANSPROXYPORT" -d $CMD "$PROXYNAME" "$PROXYPORT"
  16. +/usr/sbin/tproxy -s "$TRANSPROXYPORT" -d $CMD "$PROXYNAME" "$PROXYPORT"
  17. # Remove the filter rules.
  18. case `uname` in
  19. @@ -121,7 +121,7 @@ FreeBSD)
  20. ;;
  21. Linux)
  22. case `uname -r` in
  23. - 2.[3456789].*)
  24. + 3.*|2.[3456789].*)
  25. iptables -t nat -D PREROUTING -p tcp -d localhost --dport 80 -j ACCEPT
  26. iptables -t nat -D PREROUTING -p tcp -d "$HOSTNAME1" --dport 80 -j ACCEPT
  27. if [ -n "$HOSTNAME2" ]; then