(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':
…