prefer direct connection over configured relay

My own configuration is this: relay://<my_relay>, tcp://:22000. This is basically the same thing as the default config, just with a fixed relay instead of a “random” one.

This configuration enables direct connections over internet and relay connections. If local discovery is enabled, local connections are also possible. Syncthing will always prefer the direct connections, sometimes it connects first over relay and half a second later the log reads something like “replaced connection X with Y” when it switches to a direct connection instead of the relay.

tcp://:22000 makes Syncthing listen on both IPv4 and IPv6 on port 22000. From my knowledge, this is effectively the default behavior, syncthing will by default always bind to 22000 for the server-socket. If you want to randomize this, try if port 0 works.

PS: If you haven’t already, have a look at this: https://docs.syncthing.net/users/config.html#listen-addresses