feat: 羚牛氢能全国运营驾驶舱 (Apple Restrained Design & 双语系统)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import http.server
|
||||
import socketserver
|
||||
import socket
|
||||
|
||||
PORT = 8080
|
||||
|
||||
class ReusableTCPServer(socketserver.TCPServer):
|
||||
allow_reuse_address = True
|
||||
|
||||
Handler = http.server.SimpleHTTPRequestHandler
|
||||
|
||||
# Explicitly bind to IPv4 address 0.0.0.0 so all LAN devices can connect
|
||||
try:
|
||||
with ReusableTCPServer(("0.0.0.0", PORT), Handler) as httpd:
|
||||
print(f"==================================================")
|
||||
print(f" 羚牛氢能驾驶舱 - 局域网 (IPv4) 服务已建立")
|
||||
print(f" 本机访问: http://localhost:{PORT}")
|
||||
print(f" 局域网访问: http://192.168.110.62:{PORT}")
|
||||
print(f"==================================================")
|
||||
httpd.serve_forever()
|
||||
except Exception as e:
|
||||
print(f"Server error: {e}")
|
||||
Reference in New Issue
Block a user