Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom config and code refectoring #87

Merged
merged 3 commits into from
Jan 30, 2020
Merged

Custom config and code refectoring #87

merged 3 commits into from
Jan 30, 2020

Conversation

bmeneg
Copy link
Contributor

@bmeneg bmeneg commented Jan 24, 2020

This PR solves two major issues:
#36 : by enabling the -c flag on nipe.pl start, which accepts custom config files from the user and also by maintaining a "lock file" to follow tor instance started by nipe.
#86 : which help developers not make some known and frequent mistakes.
For each issue there is a single patch, with detailed information on how they were tackled.

A small note was added about the "User" option within tor config file and a
possible command for SELinux allow the user to manage DNS ports. This way we
may avoid futures questions around the same thing.
This new feature allows the user to specify custom tor configurations that he
may have created manually or from Nipe itself (through "install" command)
using the '-c' flag with "start" command.

$ ./nipe.pl start -c $HOME/.nipe_torrc

In case the user's config doesn't contain some of the values required by Nipe,
it will use its defined default value. For now the default values are
hardcoded within Nipe's source code, but may change in the future for a more
flexible approach.

With this new feature it's also possible for the user to issue two nipe start
calls with different configuration files, creating conflitant firewall rules.
Because of that a locking file scheme was used to make sure nipe is called
only once and the "stop" call also terminates only the tor instance actually
created by Nipe. Therefore, the user may have a tor instance running in
parallel with nipe's specific instance.
The use of both "strict" and "warnings" is a well known practice in Perl code
for generating further warnings for common cases where future misbehaviors
may happen. With this patch, every Perl file has both compiler flags enabled.

Alongside the flags enablement, this patch also bring the necessary
modifications to allow the program to run normally.
@bmeneg
Copy link
Contributor Author

bmeneg commented Jan 24, 2020

Ah, the first commit on README is the same commit as applied in the PR #85 . Since this patchset was based on top of that PR.

@bmeneg
Copy link
Contributor Author

bmeneg commented Jan 25, 2020

This PR may also solve issue #24 .

@htrgouvea
Copy link
Owner

Bruno, thank you very much for this contribution!! You solved a lot of problems and predicted some things, it is very valid!

@htrgouvea htrgouvea merged commit 4ae6dfb into htrgouvea:develop Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants