Comments (7)
Hey! Honestly, it's probably going to be a rough ride :D Took me a lot of pain to figure out the Linux counterparts and set up a reliable builder and auto-upgrader for it. That said, I'd appreciate any help. Perhaps macos is the best starting point, since iOS is just a flavor of it.
There are 3 things that need to be done to get a platform supported:
- Figure out how to even build the thing (doh). My initial work was based off of https://github.com/cretz/tor-static, which supports Linux, Windows and MacOS. We need to figure out exactly what the dependencies are for osx.
- The wrapper script in
build
needs to be expanded so it can somehow figure out what exact C files are needed for macos. For Linux I usedmake --dry-run
to figure out what C files I need, and wrap them into Go. This gets messy for other platforms due to the next step. - Integrate the wrapping so it runs on Linux (hence why it's hard to figure out what deps we have). The reason I need Linux, is because of the auto update mechanism. Every night a travis cron job pulls the latest stable code from all dependent C projects and updates this repo if it can build it.
The problematic part is the auto-updater. OpenSSL and Tor get new commits added on top almost every day. It doesn't scale to manually pull those and mess with the builds, so we need a fully automated process. My current solution works for Linux and Android, not sure what the best approach is to support others. The issue with a pure Linux approach is that even if I generate the wrappers, I can't test-compile in the same Travis job.
An alternative crazy approach is to surf git branches and Travis jobs until you get back to master:
- Take the code from master, do the current Linux builds, verify on Linux and Android, and if successful, push to
staging-1
(need a better name). - When a push is detected on
staging-1
, launch a new travis build (webhook) to do the same thing, but on a macos instance. Verify on macos and iOS, and if successful, push tostaging-2
. - Rinse and repeat for Windows. If everything's successful, push back to master.
Yes, it's quite a crazy workflow, but this is the only design I could dream up until now where I can more or less guarantee that I wrap the correct files and also test it so I don't break a previously working code.
If you're still up for it, you could try to start with playing with the wrapper in the build
folder and see what modifications are needed to cover macos. We can go from there on how best integrate that without breaking Linux :)
from go-libtor.
Would love to help out with this, since this would be awesome for a project I'm thinking about. Clear win-win.
Do you have any pointers for me on where to start?
from go-libtor.
Hey @karalabe! I use go-libtor for my project onionbox and would love to help out wherever possible. I did assist cretz with getting tor-static to automatically build binaries here for all platforms (except windows 👎), so I thought I'd take a stab at this as well.
I'll reach out if I have any issues or questions.
from go-libtor.
Hey,
I now started to actively build upon go-libtor for a project and this has become somewhat of an important issue for us. Would happily dedicated some time to get this working aswell.
@ciehanski Any progress on this? Wanna share some insights since you solved this for tor-static already?
from go-libtor.
Hopefully you have seen https://github.com/iCepa/Tor.framework which is used by Onion Browser for iOS, ChatSecure iOS and other apps. Would love for this framework to work on iOS as well.
from go-libtor.
It may be worth moving the auto-update process to CircleCI (it's free for OSS), as they have support for Linux, Mac, and Windows. That way you could run all three update build tests in parallel and only have the pipeline commit the update if all three pass, which would solve the problem of having to do the update on Linux.
from go-libtor.
Travis also supports macos and they are rolling out Windows so that should be workable too. The most obvious blocker is that I don't have a mac to test with :D
from go-libtor.
Related Issues (20)
- Onion ID length HOT 1
- How is it possible to preserve .onion address HOT 2
- Restart Tor HOT 4
- 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.