-
Notifications
You must be signed in to change notification settings - Fork 15
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
How to obtain remote ip? #91
Comments
It is currently not possible to do this in general. The connection could be non ip-based, like for example in-memory. For a network-based connection like a quinn connection you could add this, but so far we have not seen a need to do so. |
Can we implement a similar interface function 'get_remote_addr()' on RpcChannel? If it is an in memory connection, calling this function can be an undefined behavior. Because I need to track the IP address requested by the user. |
I think it should be possible to write your own struct, let's say This doesn't help you get the IP address information to the RPC service interfaces, but it's good enough for e.g. IP address allow-listing. |
Do you have any specific examples? |
You could take a look at the |
How to determine which remote host (Remote IP Address) a request comes from?
The text was updated successfully, but these errors were encountered: