Tor2web
Tor2web copied to clipboard
Introduce API to Check if client is behind Tor or not
This ticket is to implement an API that can be queried by HTTP client (also with CORS) to know if he is behind Tor or not.
This API should use the cached information of onionoo coming from #10 implementation .
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The API should implement a JSONP (CORS headers are not required) interface that will allow the requester to obtain if their publicly exposed IP address appears to be from the Tor network or not.
The API should return at minimum the following JSON dict:
{
'tor': true | false
if the IP address appears to be coming from the Tor network
'ip': string
the ipv4 dotted quad or ipv6 address
'country': string
(optional) two letter country code from which the request has originated
}
Didn't we received some criticism about the risks related to JSONP, being able to inject JS code into the client's browser (maybe there was a thread on tor-talk)?
Wouldn't be safer something different than jsonp?