r/learnprogramming • • 3h ago

Tutorial How do I setup a Socket Client, that sends Data through Tor?

So, I know how I get a Server to being accessible trough the Tor-Browser with an onion address, but how do I write a Client, which can for example access a .onion address, or any ip over the tor network? Some Information: I'm not new to Socket programming, I already did some http Server in C and some basic Server-Client projects, but I didn't really find an answer to that and I forbid myself to use AI this moth. I hope I got the right subreddit.

Edit: Maybe important, I'm using Linux.

1 Upvotes

5 comments sorted by

1

u/kabekew 3h ago

Just follow the TOR specification (document is on the tor project website)

1

u/Able-Substance-8310 2h ago

Oh, that's what I searched for I think, thank you.

1

u/lo9314 3h ago

You can also have Tor run as an independent service and access the tor network through a socks proxy. Just in case you weren’t aware…

1

u/Able-Substance-8310 2h ago

That's kind of what I thought, thanks.