-
Notifications
You must be signed in to change notification settings - Fork 821
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
Is there any way to get the ip of the client? #867
Comments
((InetSocketAddress)channel.remoteAddress()).getHostString() |
Thanks, but how do I get the connected channel |
There are channels in MQTTConnection |
Thank you. Is this part of the moquette source code? I want to get the ip in my moquette interceptor. The first time I use moquette, I don't know if it's the wrong way. The way you said to get the ip through the channel ((InetSocketAddress)channel.remoteAddress()).getHostString() should be fine, but this channel seems to be private and I can't call it
|
@Agoni-sudo in the interceptor interface you can grab all the information present in |
Use connection callbacks as an example,You can construct an ip property in an InterceptConnectMessage |
|
Yep, @Yunustt if you or @Agoni-sudo desire to create a PR for this aspect I'll be happy to review :-) |
My requirement is to determine the source of the client based on the IP address, so if I can get the IP address in IAuthenticator, it would be a perfect solution. |
Is there any way to get the ip of the client?
The text was updated successfully, but these errors were encountered: