Chatting Application

I plan to make simple p2p Chatting Application.
But I confuse at designing level of the application.
Peer uses fix port number assumes 5678.
may peers are from countries.
So peer doesn’t know the other peer’s IP Address.
Both peers are in NAT (Network address translation) Networks.
When packet leave private network Source IP will replaced by Public IP.
How peers can communicate if they don’t know destination IP Address?
Last edited on
If they don't know each others IP addresses + ports to communicate on then they cannot communicate. Ever.

Some client to client communication softwares out there like Skype have 'man in the middle' servers that all clients know the address of. These servers usually either relay messages between clients. Or they provide clients with IP addresses for other clients using a unique username look up (so client A must know the username of client B) after which a direct communication channel can be established.
I don’t understand two things
(1) Then how torrent Clients can communicate with each other.
(2) How virus send recorded keystrokes to the hacker.
If virus knows hacker’s public IP to send keystrokes list, it is possible to get the location on map from where hacker receive packets from all his viruses
How hackers get keystrokes yet they don’t catch?
(1) Then how torrent Clients can communicate with each other.

A client connects to a server that has a list of other clients who have connected who have the file of interest. The list is given to the client.



closed account (3TXyhbRD)
(2) How virus send recorded keystrokes to the hacker.

Indeed, the virus knows the IP of the hacker, unless the hacker is a second smarter and uses another PC (not his, one he can easily hack) to store his data and later check that particular PC to collect his data. The collecting PC has no link to the hacker directly, the hacker connects to the PC where the hacker knows the IP.

Imagine this as a client - server application (the server only accepts information, doesn't retain any IP addresses) and the hacker is a client (one that asks for data from the server) and the general clients are virused PCs (that only send data to the server).

To prevent others from using your PC get a good anti-virus program, good firewall program and good anti-spyware program, connect to the Internet only if you really have to. Weak security systems that are 24/7 connected to the Internet are the hackers love and most likely hubs of viruses and other nifty programs.
Topic archived. No new replies allowed.