仿生人MCP接入点

This commit is contained in:
BBIT-Kai
2025-11-05 18:06:40 +08:00
parent f50521e548
commit 7ff894e875
12 changed files with 2088 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
import socket
def get_local_ip():
try:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
# Connect to Google's DNS servers
s.connect(("8.8.8.8", 80))
local_ip = s.getsockname()[0]
s.close()
return local_ip
except Exception as e:
return "127.0.0.1"