I'm struggling to find information on how to route non Tor services over Tor.
Say i wanted to run a GPS tracking server as a hidden service, I could create a hidden service and point that to the listening port of the tracking server (e.g. TCP 9001). The tracking server would then have a .onion address.
On the client, (any OS that will work) how could I force traffic to be routed to the hidden service's .onion address? I'm thinking something like, tell the client software the server is at localhost:9001, then use something like torsocks to forward all traffic for 9001 to the .onion address. Is this possible, even if it is potentially unsafe?
I'm new to Tor so please forgive me if it is a stupid question! Any help will be greatly appreciated.
Thank you in advance