-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add Instructions On How to Use #1
Comments
Everything is in openbazaard.go if you want to take a look https://github.com/OpenBazaar/openbazaar-go/blob/master/openbazaard.go Roughly it's:
auth := &proxy.Auth{Password: torConfig.Password}
onionTransport, err = torOnion.NewOnionTransport("tcp4", torControl, auth, repoPath)
if err != nil {
log.Error(err)
return err
}
addrutil.SupportedTransportStrings = append(addrutil.SupportedTransportStrings, "/onion")
t, err := ma.ProtocolsWithString("/onion")
if err != nil {
log.Error(err)
return err
}
addrutil.SupportedTransportProtocols = append(addrutil.SupportedTransportProtocols, t)
if err != nil {
log.Error(err)
return err
}
network.Swarm().AddTransport(onionTransport)
|
Hopping back on this thread... I just did some work with this library for a little demo project of |
While we're hopping on this thread, I wrote https://github.com/cretz/bine which may be a bit easier to use and it supports statically compiled Tor. |
@cretz That looks lovely! Would you have any interest in implementing a libp2p Edit: Keeping in mind that this interface will shift a bit soon! |
@bigs - Not particularly tbh. But it looks like tor.Tor almost implements it already so the work isn't hard. I figure since the iface is about to change soon it can probably wait. Also, someone should update https://github.com/multiformats/multiaddr because there are two types of onion addresses (v2 and v3) having different lengths. It's fine if it's still |
@cretz so your lib compiles and installs the tor binary? |
@cpacia - Not really. You can either point it to a Tor binary, or use https://github.com/cretz/tor-static + https://godoc.org/github.com/cretz/bine/process/embedded which |
Interesting. Have you tried using this on tails/whonix at all? One of the issues we've had with those OSs is their tor daemon is locked down and we can't easily communicate with it. I wonder if did this inside the Go binary if it would run with no issue on those OSs. |
I have not. |
I would like to kindly request you to explain us in a few words how we can use this. Thanks !
The text was updated successfully, but these errors were encountered: