Use a subdomain to avoid ouaset DDoS
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/tag Build is passing

This commit is contained in:
nemunaire 2020-11-19 02:16:08 +01:00
parent adb4089c5d
commit a122d324e3

View File

@ -29,11 +29,11 @@ def hash_bytes(data):
return hex_hash return hex_hash
def current_chunk(): def current_chunk():
r = requests.get("https://virli.nemunai.re/chunk") r = requests.get("https://chunk.virli.nemunai.re/chunk")
return r.content.decode() return r.content.decode()
def claim_chunk(random_bytes): def claim_chunk(random_bytes):
r = requests.post("https://virli.nemunai.re/chunk", r = requests.post("https://chunk.virli.nemunai.re/chunk",
data='{"proof": "' + random_bytes + '", "login": "' + os.environ.get("USER", "nemunaire") + '"}', data='{"proof": "' + random_bytes + '", "login": "' + os.environ.get("USER", "nemunaire") + '"}',
headers={"Content-Type": "application/json"}) headers={"Content-Type": "application/json"})
return r.content return r.content