1

To cut the story short: is there any way to get IP of untrusted client calling remote proxy object, using Pyro4?

So person A is calling my object from IP 123.123.123.123 and person B from IP 111.111.111.111 is there any way to distinguish them in Pyro4, assuming that they cannot be trusted enough to submit their own IP.

jb.
  • 23,300
  • 18
  • 98
  • 136

2 Answers2

1

I ran across your question when looking for the same thing. If I understand, on the server side you want to know the IP address the client's socket is connected from, right? If so, this'll do it:

Pyro4.current_context.client.sock.getpeername()[0]

Found that in this section of the Pyro4 user's guide

Rich
  • 12,068
  • 9
  • 62
  • 94
0

Here is my solution to my problem: since I didn't really need to get specific addresses of clients using pyro, just to distinguish clients in specific subnet (in my classrom) from other ips (students working from home). I just started two pyro clients on two ports and then filtered traffic using a firewall.

jb.
  • 23,300
  • 18
  • 98
  • 136