<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Network Configuration on ByF (BaiFan) · Daily Deep Think</title><link>https://blog.baifan.site/en/tags/network-configuration/</link><description>Recent content in Network Configuration on ByF (BaiFan) · Daily Deep Think</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>blog@baifan.site (ByF (BaiFan))</managingEditor><webMaster>blog@baifan.site (ByF (BaiFan))</webMaster><copyright>CC BY-NC 4.0</copyright><lastBuildDate>Tue, 31 Mar 2026 14:00:00 +0800</lastBuildDate><atom:link href="https://blog.baifan.site/en/tags/network-configuration/index.xml" rel="self" type="application/rss+xml"/><item><title>Codex Keeps Reconnecting? Four Fixes</title><link>https://blog.baifan.site/en/codex-websocket-reconnect-fix/</link><pubDate>Tue, 31 Mar 2026 14:00:00 +0800</pubDate><author>blog@baifan.site (ByF (BaiFan))</author><guid>https://blog.baifan.site/en/codex-websocket-reconnect-fix/</guid><description>&lt;!-- more --&gt;&#10;&lt;p&gt;Codex talks to the ChatGPT backend over WebSocket by default. If your network path involves Clash, a corporate proxy, cross-border transit, or Cloudflare challenge pages, that long-lived WebSocket gets killed easily — and you end up staring at &lt;code&gt;Reconnecting... 1/5&lt;/code&gt; over and over. Turn off WebSocket and switch to plain HTTP streaming requests, and the problem mostly disappears.&lt;/p&gt;&#10;&lt;figure class="my-6 flex flex-col items-center"&gt;&#10; &lt;img src="https://blog.baifan.site/pictures/posts/codex-websocket-reconnect-solutions.svg" alt="Comparison of the four fixes" style="max-width: 900px;" class="rounded-lg shadow-md mx-auto " loading="lazy" /&gt;&#10; &#10; &lt;figcaption class="mt-2 text-center text-sm text-neutral-500 dark:text-neutral-400 italic"&gt;Comparison of the four fixes&lt;/figcaption&gt;&#10; &#10;&lt;/figure&gt;&#10;&#10;&#10;&lt;h2 class="relative group"&gt;Why WebSocket Breaks Behind Proxies&#10; &lt;div id="why-websocket-breaks-behind-proxies" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#why-websocket-breaks-behind-proxies" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;The WebSocket protocol starts with an HTTP Upgrade request; only after the server returns 101 does it switch to the long-lived connection. That long-lived connection is exactly where the problem sits — proxy servers, firewalls, and CDN nodes all run timeout policies on idle connections, and Cloudflare&amp;rsquo;s challenge mechanism can inject an interstitial page mid-path. Any link in that chain kills the connection, and the Codex client starts &lt;code&gt;Reconnecting&lt;/code&gt;.&lt;/p&gt;</description></item></channel></rss>