Option 1: write a pair of UDP-based applications in the programming language of your choice: A client that sends a packet to a server and waits for a response that contains the public IP address of the client. The received IP address is then displayed for the user and client exits. The server waits for a packet from a client to arrive, extracts sender's IP address, and sends it back to the sender as the payload of the message.
The user interface is up to you and it can be very simple:
[rbartos@agate ~]$ python a5-server.py 54321 Received request from IP: 132.177.4.30 ... ^C [rbartos@agate ~]$
[rbartos@lava ~]$ python a5-client.py agate.cs.unh.edu 54321 Your IP address is: 132.177.4.30 [rbartos@lava ~]$
Option 2: Implement the server functionality in node.js and use standard browser as the client. If you chose this option, you have to perform a reverse DNS lookup to find the hostname of the client:
You can pick either option regardless of your major.
Follow the standard assignment submission instructions.