-
Notifications
You must be signed in to change notification settings - Fork 14
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
Cannot run multiple Tor instances #14
Comments
I think this is actually by design, unfortunately. Tor uses a lot of global variables to store its internal state, which means that multiple instances running at the same time would conflict with each other because they would share those variables. Note that this is different if you run multiple processes, because each of them would get its own set of variables. But with libtor everything is running in a single process, which makes it impossible to isolate them. I'll keep this issue open to see if somehow there's a way to add support for it, but I personally don't really have any idea unfortunately. |
@Selyatin this might. be the solution for you https://docs.rs/mitosis/0.1.1/mitosis/ |
it might make sense -- since we can't really do much with the libtor object anyways -- to always run it fork'ed. Otherwise, I'd recommend making the builder type failable using a library global that only allows one instance to run. (Hit up on this when writing tests that spawn > 1 tor instance) |
BTW there is |
Is any of you aware of a way to load a shared library multiple times at different addresses? If we can figure out how to do that, then we can clean up this commit and use it to load separate sets of global variables at different addreses. At least on unix systems. |
dlmopen?
…On Wed, Aug 31, 2022, 2:58 AM Alekos Filini ***@***.***> wrote:
Is any of you aware of a way to load a shared library multiple times at
different addresses? If we can figure out how to do that, then we can clean
up this commit
<afilini/libtor-sys@0fd95be>
and use it to load separate sets of global variables at different addreses.
At least on unix systems.
—
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGYN666JZIZDFAP2BRBCXTV34UC3ANCNFSM4YV2ODOQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
@somehowchris arti seems cool but probably for the project i'm doing i'd rather use the mainline tor. |
I'm trying to run multiple tor instances for browser automation and each instance will connect to it's Tor instance so that each one of them will use a different IP, the issue is when I'm trying to launch Tor multiple times I'm getting this error.
**
INTERNAL ERROR: Raw assertion failed in Tor 0.4.4.7 at /home/shiro/Documents/Project/target/debug/build/libtor-sys-99c3932bcfc8d9f9/out/tor-src/src/ext/csiphash.c:123: the_siphash_key_is_set
**
OS/Distribution: Kubuntu 20.10
The text was updated successfully, but these errors were encountered: