Coder Social home page Coder Social logo

TRANSPARENT PROXY about f-stack HOT 12 CLOSED

f-stack avatar f-stack commented on May 28, 2024
TRANSPARENT PROXY

from f-stack.

Comments (12)

whl739 avatar whl739 commented on May 28, 2024 1

@tigerjibo
Sorry, i don't know more about transparent proxy.
All i know is that as @alonbg says, this link shows how to configure transparent proxy, it must use iptables, and ipfw in F-Stack can do the same thing.

from f-stack.

tigerjibo avatar tigerjibo commented on May 28, 2024 1

@whl739 :
Thanks for your reply as soon as possible. I will modify ipfw and ipfil as to support the transparent proxy.

from f-stack.

whl739 avatar whl739 commented on May 28, 2024

We didn't test transparent proxy with nginx.
But as i know, IP_TRANSPARENT is not supported by FreeBSD stack and IP_BINDANY is supported.
Since the configure checks for these options on Linux, it couldn't detective the real supported options on F-Stack.
Maybe i should modify auto/unix to support IP_BINDANY.

from f-stack.

alonbg avatar alonbg commented on May 28, 2024

@whl739 thank you. I believe you are correct, IP_BINDANY is the FreeBSD equiv to Linux's IP_TRANSPARENT. This nginx feature (i.e. NGX_HAVE_TRANSPARENT_PROXY) is not enabled by default in auto/unix. I don't think it should be as it requires additional system setup in Linux and maybe on FreeBSD to properly function.

from f-stack.

alonbg avatar alonbg commented on May 28, 2024

@whl739 , considering configure would be modified somehow to detect IP_BINDANY option ...
Can you asses please what additional configuration, tools, functionality is missing for this to work ?

from f-stack.

whl739 avatar whl739 commented on May 28, 2024

A simple way:

diff --git a/app/nginx-1.11.10/auto/unix b/app/nginx-1.11.10/auto/unix
index 2354d29..0666770 100644
--- a/app/nginx-1.11.10/auto/unix
+++ b/app/nginx-1.11.10/auto/unix
@@ -365,7 +365,7 @@ ngx_feature_incs="#include <sys/socket.h>
 ngx_feature_path=
 ngx_feature_libs=
 ngx_feature_test="setsockopt(0, IPPROTO_IP, IP_TRANSPARENT, NULL, 0)"
-. auto/feature
+#. auto/feature


 # FreeBSD bind to any address for transparent proxying
@@ -377,7 +377,8 @@ ngx_feature_incs="#include <sys/socket.h>
                   #include <netinet/in.h>"
 ngx_feature_path=
 ngx_feature_libs=
-ngx_feature_test="setsockopt(0, IPPROTO_IP, IP_BINDANY, NULL, 0)"
+#ngx_feature_test="setsockopt(0, IPPROTO_IP, IP_BINDANY, NULL, 0)"
+ngx_feature_test="int a;"
 . auto/feature

from f-stack.

alonbg avatar alonbg commented on May 28, 2024

@whl739 thank you. Additionally, for this socket option to work, the FreeBSD stack should support iptables.
I assume this is not supported yet ...

from f-stack.

whl739 avatar whl739 commented on May 28, 2024

We have already supported ipfw. It is similar with iptables in Linux.

from f-stack.

tigerjibo avatar tigerjibo commented on May 28, 2024

Hi whl739:
How to use the ipfw tool to support the transparent proxy for the tcp or udp protocol?

from f-stack.

oceansw avatar oceansw commented on May 28, 2024

Hi, @tigerjibo
As mentioned you have modified the ipfw to support transparent proxy, does it work now?
Thanks in advance.

from f-stack.

tigerjibo avatar tigerjibo commented on May 28, 2024

from f-stack.

rolfliu avatar rolfliu commented on May 28, 2024

Hi @tigerjibo I want to use nginx transparent proxy, but while test, I got a setsockopt(IP_BINDANY) error using the f-stack, could you send me the patch you modified?
Thank you very much.
My email address is [email protected]

Best Regards!

from f-stack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.