Added Client V1 API to allow speed tests

This commit is contained in:
2019-11-29 16:16:18 +08:00
parent fbc2301287
commit be1053921b
4 changed files with 98 additions and 6 deletions

View File

@ -20,3 +20,11 @@ def getMapping(ip):
def getNodes():
return ["xe-mci1-us", "ge-fsn1-de", "ge-lax1-us"]
def getSuffix(ip):
info = geoLookup(ip)
if not info:
return default_suffix
if info.CountryCode == "CN":
return CHINA_MAINLAND_SUFFIX
return GLOBAL_SUFFIX