Update server.py

This commit is contained in:
Nova Cat 2025-01-12 22:40:12 -08:00
parent 1a63d3abfe
commit b4078daf53

View file

@ -37,6 +37,7 @@ def relay():
gsocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
fulladdr = "gemini://" + url
gemsocket = ssl._create_unverified_context().wrap_socket(gsocket, server_hostname=urlparse(fulladdr).hostname)
print(urlparse(fulladdr).hostname)
gemsocket.connect((urlparse(fulladdr).hostname, 1965))
gemsocket.send(bytes("gemini://" + url + "\r\n", "UTF-8"))
received = ""