I’m currently experimenting with using Syncthing as a library and one weird behavior I’ve found is that the device ID from relay.Invitations().From
doesn’t match the DeviceID passed in from client.GetInvitationFromRelay
.
On the server:
JXW63A2-7DVI5HJ-GCQUHOQ-TNYQMRM-IQHRAUV-XQR2DGH-546HUM4-PY2Y5QI
2024/05/04 20:08:54 Using relay relay://51.38.81.135:22067/?id=Z6KU2UA-6EKPD2Q-ODXDF63-BOE2SNO-REUDJBZ-F7TUJTA-NAN2AXV-SACTPQD
2024/05/04 20:08:55 INFO: Joined relay relay://51.38.81.135:22067
Received invitation: T4LZBJM-PXGJ4DR-CYCHB2G-E4ANDAK-ZB54NLD-VCK6HNP-543ZUZR-VUB7CAA@51.38.81.135:22067
2024/05/04 20:09:18 Sent invite to recv
2024/05/04 20:09:18 Joined 51.38.81.135:22067 10.67.26.226:46396
HELLO WORLD
On the client:
JXW63A2-7DVI5HJ-GCQUHOQ-TNYQMRM-IQHRAUV-XQR2DGH-546HUM4-PY2Y5QI
2024/05/04 20:09:18 Connected to 51.38.81.135:22067 10.67.26.226:46392
HELLO WORLD
The experimental code: cmd/experiments/main.go · main · acheong08 / syndicate · GitLab
I also tried using DeviceID.Equals
assuming there might be differences but no, that failed as well.