mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-08-23 17:51:45 +00:00
fix: incorrect udp addr in check.py
This commit is contained in:
@@ -34,9 +34,9 @@ def check_udp() -> None:
|
|||||||
req = b"\x12\x34\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00\x05\x62\x61\x69\x64\x75\x03\x63\x6f\x6d\x00\x00\x01\x00\x01"
|
req = b"\x12\x34\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00\x05\x62\x61\x69\x64\x75\x03\x63\x6f\x6d\x00\x00\x01\x00\x01"
|
||||||
print(f"Sending DNS request to {TARGET}")
|
print(f"Sending DNS request to {TARGET}")
|
||||||
start = time.time()
|
start = time.time()
|
||||||
s.sendto(req, ("8.8.8.8", 53))
|
s.sendto(req, (TARGET, 53))
|
||||||
(rsp, address) = s.recvfrom(4096)
|
(rsp, address) = s.recvfrom(4096)
|
||||||
if rsp[0] == req[0] and rsp[1] == req[1]:
|
if address[0] == TARGET and address[1] == 53 and rsp[0] == req[0] and rsp[1] == req[1]:
|
||||||
print("UDP check passed")
|
print("UDP check passed")
|
||||||
else:
|
else:
|
||||||
print("Invalid response")
|
print("Invalid response")
|
||||||
|
Reference in New Issue
Block a user