<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Websocket on ffff65535</title><link>https://blog.ffff65535.com/tags/websocket/</link><description>Recent content in Websocket on ffff65535</description><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Sat, 25 Oct 2025 03:00:00 +0800</lastBuildDate><atom:link href="https://blog.ffff65535.com/tags/websocket/index.xml" rel="self" type="application/rss+xml"/><item><title>Portainer Edge Agent 连接超时问题解决：自定义 Tunnel URL</title><link>https://blog.ffff65535.com/posts/2025/10/25/fix-portainer-edge-agent-connection-timeout/</link><pubDate>Sat, 25 Oct 2025 03:00:00 +0800</pubDate><guid>https://blog.ffff65535.com/posts/2025/10/25/fix-portainer-edge-agent-connection-timeout/</guid><description>&lt;p>当你将 &lt;strong>Portainer Server&lt;/strong> 部署在 &lt;strong>反向代理（如 Caddy、Nginx 或 Traefik）之后&lt;/strong>，并尝试添加 &lt;strong>Edge Agent&lt;/strong> 时，可能会遇到如下错误：&lt;/p>
&lt;pre tabindex="0">&lt;code class="language-log" data-lang="log">2025/10/25 16:59:33 client: Connecting to ws://portainer.yourdomain.com:8000
2025/10/25 17:00:18 client: Connection error: dial tcp [your ip]:8000: i/o timeout
2025/10/25 17:00:18 client: Give up
&lt;/code>&lt;/pre>&lt;p>该问题的根本原因在于：&lt;strong>Portainer 默认生成的 Edge 连接信息中，Tunnel 地址为 &lt;code>域名:8000&lt;/code>，但反向代理通常并未暴露 8000 端口&lt;/strong>，导致 Edge Agent 无法建立 WebSocket 隧道连接。&lt;/p></description></item></channel></rss>