Comments (4)
I honestly haven't the slightest clue what might be wrong, but this is a use case I want to actively use myself too in the following days, so I'll get back to you if I figure anything out.
from go-libtor.
Just hit this myself too. Funky, will try to figure it out. Seems that the tor bootstrap never finishes when restarting. At least it never gives back control to the caller, even though it says "100%" booted. I've tried nuking the datadir and restarting like that and it also doesn't seem to work, so it might be something off either in the lib or in the control lib.
from go-libtor.
I think the (or an) issue is in the controller lib: https://github.com/cretz/bine/blob/62912bff1c531f4cb731cc86d38e78bc94aea2fd/tor/tor.go#L370
Onion creation uses tor.EnableNetwork(ctx, true)
, blocking until the circuit bootstraps itself. However, if the network was enabled already, the above line bail out of the method, even if waiting was requested and the circuit is not yet done. Not sure if this is the cause for the hang, but it's a weird race. Will try to fix and see.
from go-libtor.
I knew until now that the Tor library is not capable of running two instances in the same process. Unfortunately it also seems that it's not capable of restarting itself without restarting the entire process. My hunch is that some global variable is ruined on shutdown.
Either way, Tor does support enabling and siabling networking, so you can get away with not killing the in-process Tor, just shutting the network off and back on and it should work:
You can enable networking on request via.
tor.EnableNetwork(context.Background(), false)
Turning off the networking is not exposed in the bine
library, but you can do it via:
tor.Control.SetConf(control.KeyVals("DisableNetwork", "1")...)
The lack of the latter is tracked in cretz/bine#41
from go-libtor.
Related Issues (20)
- Onion ID length HOT 1
- How is it possible to preserve .onion address HOT 2
- Use 0.4.x Tor
- Can't run concurrent tor instances. HOT 2
- Example program (main.go) won't run HOT 1
- No way to define ev_uint64_t HOT 2
- v3 onion addresses HOT 2
- Out of Date Documentation/Bine Creator Usage HOT 1
- The filename or extension is too long. HOT 2
- error main.go:12:2: found packages libtor (libtor.go) and main (main.go) in /home/user/repos/go-libtor
- Version 2 Onion Sites will be deprecated soon
- Upstream iOS and macOS support from berty/go-libtor
- Warning when running in docker HOT 2
- go get failed
- VFS idea
- How is it possible to persist V3 .onion address? HOT 3
- Error after running go get HOT 2
- 1st signal interrupt is caught by the Tor process, and ignored by the go process HOT 1
- Error when build HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-libtor.