(http://relays.syncthing.net/endpoint) the relays node has no country info

(https://relays.syncthing.net/endpoint) the relays node has no country information. I have asked similar questions in the past.

I sometimes use this feature to filter some nodes when service start . because CN node is fast than other .

....
    json_response = session.get(url='https://relays.syncthing.net/endpoint')
    # print(type(json_response.json()))
    if not json_response.json():
        time.sleep(1)
        continue
except Exception:
    time.sleep(1)
    continue
relays_dict = {}
for relay in json_response.json().get('relays'):
    if relay['location']['country'] == 'CN':

AND change Syncthing\config.xml

The default endpoint has the information required by Syncthing only, for bandwidth reasons. You can get the full blob at /endpoint/full

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.