Reputation: 199
Hey i tried to get the ip of the client with ktor.
I used the method
this.context.request.local.remoteHost
(this.context is an Instance of ApplicationCall)
How can i get the real ip an not something like "********.dip0.t-ipconnect.de"
Upvotes: 10
Views: 4764
Reputation: 6999
You can also get a remote host from the request's origin: call.request.origin.remoteHost
, but it returns the IP address in not every case either.
To get the IP address use the call.request.origin.remoteAddress
property.
Upvotes: 12