What happens to the packets that the exit node sends/receives from the desired w
ID: 659834 • Letter: W
Question
What happens to the packets that the exit node sends/receives from the desired web server?
Does each response packet get routed back through the Tor circuit (encrypting on the way) individually? If so, does the client need to send acknowledgement of receipt of these packets back to the original web server (routed back through the Tor circuit again)?
Or does the exit node simply complete the normal communication with the desired web server and then send the (entire) received data back through the Tor circuit somehow?
If this is the case, does each relay receive all the data and then send all that data to the next node only once it has received everything, too?
Explanation / Answer
Tor works like a chain of proxies, where each proxy only knows about the next hop and the previous hop.
Simplifying a lot, when your computer sends data using Tor, your tor client will encrypt the payload, and forward it to another node. The next node does the same, and after a few iterations your packet reaches the exit node, is fully decrypted, and sent to the destination webserver.
The webserver sends the packet to the exit node, because the exit node was the computer that connected to the webserver. The exit node uses a table (seems like the NAT table, but with more information) to decide where to send the response. So it will encrypt the packet again, and send it to the next node, which will do the same, until the packet reaches your computer, are decrypted locally, and sent to the application.
The intermediate nodes don't have to wait for all the data before sending it to the next hop, or downloading files several MB big would be a hassle. Instead, they have a limited buffer space, and every time the buffer fills (or a timeout occurs), they encrypt it and send it ahead.
Your application will think the remote server is your tor client, so it only have to acknowledge the packet transfer until the first node. The destination webserver thinks the exit node is the client, and all intermediate nodes will acknowledge the packets between them, as there's a point-to-point connection between then.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.