-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add advanced option to streams #1586
Comments
|
so with 2. you mean the stream should expose as proxy protocol and connect to tcp upstreams without proxy protocol? |
How did I miss #619 ? Sorry.... And yeah, I mean that with my second option. |
I still want to ask, since this are different things, do you want that npmplus connects to a tcp upstream and exposes as tcp or do you want that npmplus connects to a tcp upstream and exposes as proxy protocol? |
I want, that npmplus accepts a proxy protocol and forwards that to a normal http stream. Flow is for outside of my network: web is a normal web request (via a browser) |
is there a reason you can't use http between haproxy and npmplus? |
I think so? As far as I understand, the ip gets send via the proxy protocol and you can query it via |
this works when using LISTEN_PROXY_PROTOCOL, but not in your case since the stream would transform the proxy protocol into a plain tcp request which does not contain this data |
can I see your haproxy config maybe, since I think even then this should be possible |
Sure enough:
On port 83 i currently have a npm "dead host" with the following advanced config
I was hoping that I could replace the dead host with a stream, but it seems that that's not the case? |
as said, with a stream you would lose the ip and other information. |
Yes. It checks if it any domain under |
In that case I think I'll stay with the dead end + advanced config. Thank you very much for your deep understanding of the topic and willing to help me. |
Would two NPMplus maybe be a solution for you? One running http(s) for your lan and one running proxy protocol for your vpn tunnel |
I thought of that too, but didn't want to spin up another Docker Container 😅 |
if you create two npmplus you could also install one local and the other one the server so you don't need the proxy protocol/haproxy at all, maybe thats also an idea for your |
I really tried to do this myself, but I'm not familiar with this whole javascript ecosystem and there's no easy entry document to look into, so I'm very sorry :/
My setup is the following:
I have a server hosted somewhere in the cloud™.
That server forwards the request by using the proxy-protocol to my npm server via a wireguard tunnel.
Now nginx must know that the proxy-protocol is used by specifying the
proxy_protocol
attribute on thelisten
line.The reason why I can't/won't use the
LISTEN_PROXY_PROTOCOL
env variable is, because in my home network I still want to use "normal" http, so I have two choices now.proxy_protocol
attribute by using theLISTEN_PROXY_PROTOCOL
env set.I think the easiest solution would be 2) here, but for that to work I would need to have an advanced tab in the stream settings.
Another (I think more complicated) solution would be a toggle button, that says "expect proxy_protocol" or similar.
What do you think of this?! I know that you're working on the php rewrite which means I could contribute, but it's not ready yet.
The text was updated successfully, but these errors were encountered: