Relay Server - connecting when not enabled

Hi,

I am testing out 0.13.0-beta4 and seeing strange behaviour with relay servers.

note: i upgraded from 0.12 -> 0.13 if that makes a difference

in my config its completely disabled however on running syncthing it connects to a relay server anyway:

[JEAQ4] 05:43:17 INFO: Joined relay relay://111.221.44.148:17602 [ ... ]

config options as returned by rest/system/config:

  "options": {
    "listenAddresses": [
      "default"
    ],
    "globalAnnounceServers": [
      ""
    ],
    "globalAnnounceEnabled": false,
    "localAnnounceEnabled": false,
    "localAnnouncePort": 21027,
    "localAnnounceMCAddr": "[ff12::8384]:21027",
    "maxSendKbps": 0,
    "maxRecvKbps": 0,
    "reconnectionIntervalS": 60,
    "relayReconnectIntervalM": 10,
    "startBrowser": true,
    "natEnabled": false,
    "natLeaseMinutes": 60,
    "natRenewalMinutes": 30,
    "natTimeoutSeconds": 10,
    "urAccepted": -1,
    "urUniqueId": "",
    "urURL": "https://data.syncthing.net/newdata",
    "urPostInsecurely": false,
    "urInitialDelayS": 1800,
    "restartOnWakeup": true,
    "autoUpgradeIntervalH": 12,
    "keepTemporariesH": 24,
    "cacheIgnoredFiles": false,
    "progressUpdateIntervalS": 5,
    "symlinksEnabled": true,
    "limitBandwidthInLan": false,
    "minHomeDiskFreePct": 1,
    "releasesURL": "https://api.github.com/repos/syncthing/syncthing/releases?per_page=30",
    "alwaysLocalNets": [],
    "overwriteNames": false,
    "tempIndexMinBlocks": 10
  }

config options as in config.xml:

    <options>
        <listenAddress>default</listenAddress>
        <globalAnnounceServer></globalAnnounceServer>
        <globalAnnounceEnabled>false</globalAnnounceEnabled>
        <localAnnounceEnabled>false</localAnnounceEnabled>
        <localAnnouncePort>21027</localAnnouncePort>
        <localAnnounceMCAddr>[ff12::8384]:21027</localAnnounceMCAddr>
        <maxSendKbps>0</maxSendKbps>
        <maxRecvKbps>0</maxRecvKbps>
        <reconnectionIntervalS>60</reconnectionIntervalS>
        <relayReconnectIntervalM>10</relayReconnectIntervalM>
        <startBrowser>true</startBrowser>
        <natEnabled>false</natEnabled>
        <natLeaseMinutes>60</natLeaseMinutes>
        <natRenewalMinutes>30</natRenewalMinutes>
        <natTimeoutSeconds>10</natTimeoutSeconds>
        <urAccepted>-1</urAccepted>
        <urUniqueID></urUniqueID>
        <urURL>https://data.syncthing.net/newdata</urURL>
        <urPostInsecurely>false</urPostInsecurely>
        <urInitialDelayS>1800</urInitialDelayS>
        <restartOnWakeup>true</restartOnWakeup>
        <autoUpgradeIntervalH>12</autoUpgradeIntervalH>
        <keepTemporariesH>24</keepTemporariesH>
        <cacheIgnoredFiles>false</cacheIgnoredFiles>
        <progressUpdateIntervalS>5</progressUpdateIntervalS>
        <symlinksEnabled>true</symlinksEnabled>
        <limitBandwidthInLan>false</limitBandwidthInLan>
        <minHomeDiskFreePct>1</minHomeDiskFreePct>
        <releasesURL>https://api.github.com/repos/syncthing/syncthing/releases?per_page=30</releasesURL>
        <overwriteNames>false</overwriteNames>
        <tempIndexMinBlocks>10</tempIndexMinBlocks>
        <upnpEnabled>false</upnpEnabled>
        <upnpLeaseMinutes>0</upnpLeaseMinutes>
        <upnpRenewalMinutes>0</upnpRenewalMinutes>
        <upnpTimeoutSeconds>0</upnpTimeoutSeconds>
        <relaysEnabled>false</relaysEnabled>
    </options>

Confirmed, that’s a bug. I think the thing is that the new “default” listen address includes relays, but it should still follow the relaysEnabled or it should be deprecated…

Thanks for reporting it!

Might need some discussion on how to resolve in the cleanest manner. In the meantime, to actually disable relaying, set your listen address to tcp://0.0.0.0:22000 instead of default.