端口连通性检测 Port Checker
检查指定主机(域名/IP)的端口是否“可访问”。支持 HTTP/HTTPS 请求与 WebSocket 握手两种方式,并提供超时与诊断信息。
Check whether a host port is reachable using browser-friendly probes (HTTP/HTTPS fetch or WebSocket handshake), with timeout and diagnostics.
1. 输入参数 · Target & Probe Options
3. 使用说明 · Notes
-
这工具能做什么? · What this tool can do
中文:在浏览器里,用 HTTP/HTTPS 请求 或 WebSocket 握手 来判断目标端口是否“可访问/可建立连接”。适合快速排查:域名解析是否正确、端口是否被防火墙拦截、反代端口是否通、服务是否在监听。
English:From the browser, it probes a target port via HTTP(S) fetch or WebSocket handshake to infer reachability. Useful for quick checks: DNS correctness, firewall blocks, reverse proxy exposure, or whether a web-ish service is listening. -
重要限制(必须读) · Critical limitations (please read)
中文:浏览器安全模型限制:你无法直接进行“原生 TCP/UDP 端口扫描”。因此:
① 如果目标端口不是 HTTP/HTTPS/WS/WSS 服务,即使端口开放,也可能被判定为“不确定/失败”。
② Fetch 可能因 CORS、证书、重定向 被阻止 —— 这不等同于端口关闭。
③ WebSocket 的 error 事件也可能是协议不匹配,而非网络不可达。
English:Browsers cannot perform raw TCP/UDP scans. So:
① If the port isn’t serving HTTP(S) or WS(S), an “open” port may still look “unknown/failed”.
② Fetch may be blocked by CORS, TLS cert issues, or redirects — not the same as “port closed”.
③ WebSocket errors can be caused by protocol mismatch, not only network failure. -
如何选择探测方式? · Which probe should I use?
建议 · Recommendation:
• 80/8080/8000 等 Web 端口:优先用 HTTP Fetch,路径可填 /、/health、/healthz。
• 443/8443 等 HTTPS 端口:优先用 HTTPS Fetch,若是自签名证书,可能会失败(浏览器会拦截)。
• WS/WSS 服务(如实时推送、网关):用 WS/WSS WebSocket 更贴近实际。
English: Use HTTP(S) fetch for web ports; WS(S) for websocket services; be mindful of TLS and CORS. -
判定解读 · How to interpret the verdict
可访问 · Reachable:握手/请求在超时内得到响应(即便是 404/401/403,也说明“能连上”)。
不确定 · Inconclusive:通常是被 CORS/证书/协议不匹配影响,或网络环境特殊(代理、企业网、公共 Wi-Fi)。建议换方法或用命令行复检。
不可达 · Unreachable:超时/网络错误更像“被拦截/未监听/路由不通”,但仍建议结合服务器侧日志与防火墙规则确认。
English: A non-2xx HTTP status can still mean the port is reachable. “Inconclusive” often indicates browser policy rather than true outage. -
命令行复检(更可靠) · CLI re-check (more reliable)
中文:如果你要做真正的 TCP 端口检测,请用服务器/本机命令行:
• nc -vz host port(Linux/macOS) / Test-NetConnection host -Port port(Windows PowerShell)
• 需要跟踪路由:traceroute / tracert;需要 DNS:nslookup/dig
English:For true TCP checks use nc / Test-NetConnection. Combine with traceroute and DNS tools for end-to-end diagnosis. -
安全提示 · Security note
中文:请只测试你拥有权限的主机/端口。大规模扫描可能触发风控或法律风险。
English:Only test hosts/ports you are authorized to check. Large-scale scanning may trigger abuse detection or legal issues.
说明:本工具在浏览器端运行,结果会受到网络环境、浏览器策略(CORS/TLS)、目标服务协议等因素影响;适合“快速可达性排查”,不等同于专业端口扫描器。
Note: This runs in the browser, so results are affected by network conditions, browser policies (CORS/TLS), and server protocol behavior. It’s great for quick reachability checks, but not a full port scanner.
