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

[question] #1022

Open
it16888 opened this issue Dec 31, 2024 · 1 comment
Open

[question] #1022

it16888 opened this issue Dec 31, 2024 · 1 comment
Labels

Comments

@it16888
Copy link

it16888 commented Dec 31, 2024

Hello, I have one question for your advice. I am using load balancing NLB products and have enabled the Proxy Protocol function. I want to obtain the real IP address of the client on the AEDES server, but have tried many methods but have failed. Can you give me some suggestions or methods? thank

I have tried using require ('aedes-protocol decoder ') or require ('proxy protocol'), but have not been successful

@robertsLando
Copy link
Member

you should ensure your proxies add x-forwarded-for header (or x-real-ip) and read it from the request. I suggest to use aedes-protocol-decoder, check the source code of it to see if maybe you need to reconfigure your proxy:

https://github.com/moscajs/aedes-protocol-decoder/blob/master/index.js

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

No branches or pull requests

2 participants