tor2web / Tor2web

Tor2web is an HTTP proxy software that enables access to Tor Hidden Services by mean of common web browsers
https://www.tor2web.org
GNU Affero General Public License v3.0
705 stars 176 forks source link

Add debugging and statistics for gettor #218

Open ilv opened 9 years ago

ilv commented 9 years ago

As @fpietrosanti says in #168, It might be useful to provide debugging and statistics:

a) logging of all requests with the browser user agent -> language detected -> served file (for debugging) b) how many download has been served for each language over a period of time (for statistics)

My first thought is that this could be handled by a simple SQLite database. We must not store any kind of information that uniquely identify an user, all stats should be anonymous. For stats regarding periods of time, I think that saving the year, month and day should be enough.

Thoughts? @evilaliv3

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/8758787-add-debugging-and-statistics-for-gettor?utm_campaign=plugin&utm_content=tracker%2F318575&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F318575&utm_medium=issues&utm_source=github).
evilaliv3 commented 9 years ago

in general i support this idea.

my coments a) i'm not sure we would need to store this on db while we can simply rely on a log file as we are doing?

b) i think it's good to store this information on sqlite db as the info wold be usable in various ways. we need to discuss well how to anonymize the info as much as possible (by removing details like the exact second as you are suggesting) and eventually not providing exact counters. by the way i think that we can make this functionality optional so that private tor2web instances like the one used in whistleblowing platforms would have the possibility to disable it at all.

this ticket is somehow related to: https://github.com/globaleaks/Tor2web-3.0/issues/19

ilv commented 9 years ago

Yeah, another option could be to keep these stats in log files and then write a script to process such files and retrieve all the stats info. I actually think that it would be a better approach. I also agree on making this functionality optional (just another field on tor2web.conf, right?)