Skip to content
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

failed to parse PROXY header #29

Open
dandreossi opened this issue Jan 17, 2024 · 5 comments
Open

failed to parse PROXY header #29

dandreossi opened this issue Jan 17, 2024 · 5 comments

Comments

@dandreossi
Copy link

I run go-mmproxy with this command

sudo /root/go/bin/go-mmproxy -l 0.0.0.0:22 -4 xxx.xxx.xxx.xxx:22 -v 2

As I want to proxy an ssh connection to the xxx.xxx.xxx.xxx server.

But when i try to connect I get

{"time":"2024-01-17T01:58:54.966455461+01:00","level":"DEBUG","msg":"failed to parse PROXY header","listenerNum":0,"protocol":"tcp","listenAdr":"0.0.0.0:22","remoteAddr":"aa.aa.aa.aa:35100","localAddr":"bb.bb.bb.bb:22","error":"PROXY header missing","dropConnection":true}

I'm missing something?

@poptree
Copy link

poptree commented Mar 10, 2024

same here.

@aketia00
Copy link

aketia00 commented Mar 14, 2024

i got the same error , any workaround or did i miss something here

"msg":"failed to read PROXY header","listenerNum":0,"protocol":"tcp","listenAdr":"0.0.0.0:5522","remoteAddr":"xx.xx.xx.xx:53422","localAddr":"yy.yy.yy.yy:5522","error":"EOF","dropConnection":true

@majst01 , @stargo ,can you please provide your insights on this

@colans
Copy link

colans commented Sep 9, 2024

Did you connect to the load balancer or this proxy directly? If you bypass the load balancer, then the header won't be attached. PROXY header missing, as per this issue description, means that no header with source info was added before getting to go-mmproxy.

Could also be that send-proxy wasn't enabled on the load balancer, which tells it to add the info.

@dandreossi
Copy link
Author

I connect directly to the Proxy

@colans
Copy link

colans commented Sep 18, 2024

The flow needs to be:

  1. Load balancer or other proxy that adds the Proxy Protocol header (send-proxy or send-proxy-v2)
  2. go-mmproxy
  3. Your back-end service that doesn't support Proxy Protocol on its own.

If you bypass step 1, go-mmproxy doesn't get the header info it needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants