The link looks like it’s an implementation of DNS-SD on mDNS. That is not what syncthing uses; https://github.com/calmh/syncthing/blob/master/discover/PROTOCOL.md describes the protocol. I just commited a change that moves from multicast to directed broadcasts; you could start by testing if this works better, perhaps it does not need external support any more.
Anyway, the node parameter is the node ID, as it is usually shown. You should not disable local announcements, you are still relying on that being enabled, just feeding it data externally.
I just tried to do a new build, but I get this from ./build.sh tar or ./build.sh all:
beacon/cmd/mctest/main.go:8:2: cannot find package "github.com/calmh/syncthing/mc" in any of:
/usr/lib/go/src/pkg/github.com/calmh/syncthing/mc (from $GOROOT)
/home/felix/golang/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/calmh/syncthing/mc (from $GOPATH)
godep: go exit status 1
Not sure why the paths are like that (the source is in /home/felix/golang/src/github.com/calmh/syncthing/). Maybe it’s because of this error I get during ./build.sh setup?
go install code.google.com/p/go.tools/cmd/vet: open /usr/lib/go/pkg/tool/linux_amd64/vet: permission denied
Don’t want to bother those who are arguing about the code to develop, but with the consent of the moderator I’d like to report this link to Google Play where Mr. Felix Ableitner seems to have brought Syncthing on Android.
I have not tried if it works, but I think it is a useful information for users.
If the moderator believes that it’s advertising, can erase the post and link and I apologize.
Yeah the tests were broken there for a while, they are OK now.
You probably want to do a “sudo go install code.google.com/p/go.tools/cmd/vet” once and for all to get the vet tool installed. It’s not critical as such but it runs as part of the tests so things will be unhappy without it.
Local discovery works now, great! But there’s a new warning dialog (did you add that or was it not displayed earlier because it already failed at local discovery?), that says “Global discovery: error reading DNS config: open /etc/resolv.conf: no such file or directory; no external announcements”. Do you access that file manually, or is that something Go does?
Btw exiting the Android app (that’s with calling rest/shutdown) gives “Connection to phone closed: unexpected EOF” on the connected node.
Right, so there were a few changes in v0.8.7 to the logging infrastructure. One result of that is that warnings that were previously only shown on the console are now also shown in the GUI. That’s probably the cause for the new DNS warning. The Go DNS resolver does read /etc/resolv.conf, yes. Does this not exist on Android? That will mean no DNS, then…
Edit: If you build the binary on Linux, or perhaps even on Android itself, does the DNS resolver work?
Looking at the android build target, that’s fine by me but I wonder if it’s sufficient and generally useful? I.e. if I download just syncthing and run “./build android”, I don’t actually get something I can run on android, right?
Nope, /etc/resolv.conf does not exist on Android. I looked up some workarounds there, and hoped you might have more insight into using those.
As I said, the filename is hardcoded in /pkg/net/dnsconfig_unix.go (as there is no real way to build Go for Android), and building on another platform won’t change that.
No you don’t get installable apks from that, but I use this target from my own build script. I could use build.sh all, but that would mean building unneeded stuff and unpacking the .tar.gz files, which might be complicated.
Right, looks like DNS won’t work on Android from Go right now at least. Might be worth filing an issue on Go for this, could be that it’s simple to fix. The libraries you linked to are for implementing your own DNS resolver, which would be some amount of work and would not integrate with the existing resolver. Currently though, DNS is only used to look up the global announce server. You could work around that by hardcoding the IP (I’ll let you know if I plan on changing it…).
For building, you could also GOOS=linux GOARCH=386 ./build.sh ; mv syncthing syncthing.x86 etc - that way you get a binary for your platform and can utilize the existing build steps (as they change, if they do). I’m not sure I want to include a build step for something that doesn’t work out of the box.
I wanted to thank you for the good work you are doing to bring this to android. Will this port be opensource as well? Please consider it as I would love to see this tool be included into https://f-droid.org.
I’m not sure how f-droid handles native libraries, especially as this one is not officially supported by the ndk. I’ll look into that at some point (but I also wouldn’t mind if someone else submitted it).