SusmithKrishnan / torghost

TorGhost is an anonymization script. TorGhost redirects all internet traffic through SOCKS5 tor proxy. DNS requests are also redirected via tor, thus preventing DNSLeak. The scripts also disables unsafe packets exiting the system. Some packets like ping request can compromise your identity.
GNU General Public License v3.0
850 stars 281 forks source link

Change the API !!!! There is a privacy issue with it. #74

Closed NandanDesai closed 4 years ago

NandanDesai commented 4 years ago

Hi Susmith!

I notice that you are running your own heroku app to check the IP before and after the user is connected to Tor. You are also using the same heroku app to check for the latest version of TorGhost.

Now, you could be recording the user's IP before and after the users are connected to Tor. I'm not saying that you actually are, but the user might have this concern because the primary reason people use Tor is for privacy. Also it helps the adversaries (like the government) to uniquely identify TorGhost users (like whoever is hitting requests at your heroku app is guaranteed to be a TorGhost user and might currently be on Tor. Thus their original IP and Tor IP can be known). And also I noticed that it's a single point of failure if your heroku app is stopped or the address is changed (as people already had these kind of issues in the previous versions of TorGhost).

I have forked your project and have used ipify to get the IP address. That site gets billions of requests per month and hence is safe to say that TorGhost user's IP will be mixed up in that crowd and won't be uniquely identified.

Also, to check the latest version of TorGhost, I have used official Github API.

If you are interested, then I can send you a pull request.

And great project! Thank you so much!

SusmithKrishnan commented 4 years ago

I get the idea and the privacy issue on using IP check API. however, the primary problem was ipfy or other IP resolving services tend to block requests from the tor network. The application was stuck at "fetching IP" to avoid all these hassles I hosted a simple API.

On further analysis, I realized this might not be a good idea. There is a possible better solution, Host an API in Tor hidden network and use it for tor IP checks and use ipfy for normal connection. So ipfy will never get a request from tor. The hosted hidden service will only get request from the tor network hence will never know the user. so privacy is guaranteed.

Since this project is not funded or supported by anyone, I personally don't have any resources to host and maintain an IP resolving API.

NandanDesai commented 4 years ago

Hi, Thanks for responding. I have tested the ipify API and it doesn't block the requests from within Tor.

So, I'll explain the scenario here. We will be sending 2 requests to ipify API. One will be after we are connected to Tor while we are starting the TorGhost. And the other will be after we are disconnected from Tor while stopping the TorGhost. So the first request to ipify API will be from within Tor which will be fetching the IP address of Tor exit node, and the second request will be outside the Tor which will be fetching our original IP address.

As there are no cookies involved here and ipify will be getting 2 requests from 2 different IP addresses, ipify can't figure out that it's the same person making those 2 requests. So, it's safe from privacy POV.

And for checking the latest version of TorGhost, we can just use Github's API which is open and doesn't require any API token in this case.

In this way, you can completely move away from hosting your own server to check IP address and latest version. Saves your money and good for user's privacy too!

This is what I have implemented in the pull request I sent you. If you are convinced, you can accept it.