Traditional tests measure internet plan speed. This Hardware Isolation Test bypasses your ISP to measure the physical limit of your Wi-Fi router. It is the only way to verify if your hardware is performing at its limit.
Save this code as server.py on your computer.
import socket
import socket
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
ONE_GB = 1_000_000_000
def get_all_lan_ips():
"""
Returns a list of all potential LAN IPs, excluding loopback (127.x)
and APIPA/Link-Local (169.254.x).
"""
ip_list = []
try:
hostname = socket.gethostname()
for ip in socket.gethostbyname_ex(hostname)[2]:
# Filter out localhost and auto-configured link-local IPs
if not ip.startswith("127.") and not ip.startswith("169.254."):
ip_list.append(ip)
except:
pass
return sorted(list(set(ip_list)))
class SpeedTestHandler(BaseHTTPRequestHandler):
def log_message(self, format, *args): return
def do_HEAD(self):
self.send_response(200)
self.send_header("Content-type", "application/octet-stream")
self.send_header("Content-Length", str(ONE_GB))
self.end_headers()
def do_GET(self):
# DOWNLOAD TEST
self.send_response(200)
self.send_header("Content-type", "application/octet-stream")
self.send_header("Content-Length", str(ONE_GB))
self.send_header("Cache-Control", "no-store")
self.end_headers()
chunk = b"\0" * (256 * 1024)
try: self.connection.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, 4 * 1024 * 1024)
except: pass
try:
while True: self.wfile.write(chunk)
except (BrokenPipeError, ConnectionResetError, ConnectionAbortedError): pass
def do_POST(self):
# UPLOAD TEST
self.send_response(200)
self.end_headers()
try: self.connection.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, 4 * 1024 * 1024)
except: pass
try:
while True:
if not self.rfile.read(256 * 1024): break
except (BrokenPipeError, ConnectionResetError, ConnectionAbortedError): pass
if __name__ == '__main__':
httpd = ThreadingHTTPServer(("0.0.0.0", 8000), SpeedTestHandler)
httpd.allow_reuse_address = True
all_ips = get_all_lan_ips()
print(f"✅ Speed Test Server running on port 8000")
print("--------------------------------------------------")
print("Enter one of these addresses in the app (use your PC's Wi-Fi/Ethernet IP):")
if all_ips:
for ip in all_ips:
print(f" 👉 http://{ip}:8000")
else:
# Fallback if detection fails
print(" 👉 http://:8000")
print("--------------------------------------------------")
try: httpd.serve_forever()
except KeyboardInterrupt: pass
httpd.server_close()
Connect this PC directly to your router using an Ethernet Cable. If your PC is on Wi-Fi, you will be measuring two wireless links, resulting in slower, inaccurate data.
Ensure Python 3 is installed. Open your terminal in the folder where you saved the file and run:
In the app, enter the IP address displayed by the script into the "PC IP Address" box and tap Run Throughput Test.