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

Re-organize configuration and support files for Tor2web under /etc/tor2web/ #207

Open fpietrosanti opened 9 years ago

fpietrosanti commented 9 years ago

This ticket is to re-organize configuration and support files for Tor2web under /etc/tor2web/.

Currently the configuration is under /etc/tor2web.conf but support files (such as certificates and blacklist) are under /home/tor2web/lists .

This ticket is to re-organize the support files for Tor2web to be all under /etc/tor2web with the following structure: /etc/tor2web/config /etc/tor2web/blacklist /etc/tor2web/certificate /etc/tor2web/logs

The directory /etc/tor2web/logs must become a symlink to /var/log/tor2web/ directory

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/8339898-re-organize-configuration-and-support-files-for-tor2web-under-etc-tor2web?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

mmm i'm in doubt for this ticket that for sure should be betterly defined.

generally /etc point only to configuration files or files that act somehow as a configuration (certificates), but for sure not to log files. i suggest that we adopt the same organization of globaleaks adopting an /var/tor2web as data directory instead of /home/tor2web and that we use /etc/tor2web simply as directory for configurations (config, lists, certificates)

fpietrosanti commented 9 years ago

Tor2web does not have a data directory now (no db) except for logs it could generate, if enabled.

For that reasons, and also to replicate the same approach of Tor packaging, it's useful to put logs in /var/log/tor2web/ .

When we will need to have a data directory, from debian packaging perspective, it shall become /var/lib/tor2web (like now Tor has /var/lib/tor/ and postfix have /var/lib/postfix).

To make configuration files scalable, we can introduce "tor2web.d" to include config files.

To summarize the debian approach replicating Tor:

CONFIG FILES & CERTS /etc/tor2web/tor2web.conf #default config file /etc/tor2web/tor2web.d/ #directory that can contain other config files /etc/tor2web/blacklist /etc/tor2web/certificate

LOGS /var/log/tor2web/

DATA (if any) /var/lib/tor2web/

evilaliv3 commented 9 years ago

sure it has a data directory @fpietrosanti. all templates files are currently installed in /usr/share and overridable in /home/tor2web so we should keep the possibility for the user to continue overridding them. what directory do you suggest for this user overrides? (it need to be a directory we won't never touch automatically during upgrades as we avoid now)

fpietrosanti commented 9 years ago

I think that "templates" can be assimilated to "configuration" and not to "data", because they do not get changed by the software but are one-off configuration by the admin (if any).

For that reason i suggest to put them in /etc/tor2web/templates with a README files providing example on how to configure it

Sent from mobile

On 17/feb/2015, at 09:58, Giovanni Pellerano notifications@github.com wrote:

sure it has a data directory @fpietrosanti. all templates files are currently installed in /usr/share and overridable in /home/tor2web so we should keep the possibility for the user to continue overridding them. what directory do you suggest for this user overrides? (it need to be a directory we won't never touch automatically during upgrades as we avoid now) — Reply to this email directly or view it on GitHub.