YueGuobin db9772ca7a
fix: resolve MCP server URL host via default route IP when bound to 0.0.0.0
When GNS3 server is configured to listen on 0.0.0.0 (all interfaces),
_server_url() was hardcoding 127.0.0.1, making the WebSocket console
URL unreachable from remote MCP clients.

Use the UDP connect trick (connect to 8.8.8.8:80 without sending data)
to discover the default route interface IP, which is the address remote
clients can actually reach.
2026-06-06 00:48:22 +08:00
..