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

Suggestion: Reuse the Tor cache directory in the system for faster loading #45

Closed
phantomcraft opened this issue Aug 31, 2018 · 1 comment

Comments

@phantomcraft
Copy link
Collaborator

If there is a already running Tor in the system or it's used sometimes, why don't reuse its cache for making orjail load faster?

if [ -d "/var/lib/tor" ]; then
mkdir /tmp/orjail-$NAME
if [ -f /tmp/orjail-$NAME/lock ]; then
rm /tmp/orjail-$NAME/lock
fi
cp -d -R /var/lib/tor/* /tmp/orjail-$NAME/
chmod -R 700 /tmp/orjail-$NAME/
chown -R "$USERNAME:$USERNAME" /tmp/orjail-$NAME/
fi

In a script I created here, Tor gets connected in less than 5 seconds by reusing the cache, while not using takes 30~40 seconds.

=)

@lesion
Copy link
Collaborator

lesion commented Aug 31, 2018

Good idea.
FIY we've a -k flag that does not kill orjail namespace and attached tor instance (second time you use it, it takes 0 seconds to run as everything is already there)

lesion added a commit that referenced this issue Sep 2, 2018
@lesion lesion mentioned this issue Sep 2, 2018
@lesion lesion closed this as completed in 72dffe7 Sep 4, 2018
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

No branches or pull requests

2 participants