<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Proxy on ByF (BaiFan) · Daily Deep Think</title>
    <link>https://blog.baifan.site/en/tags/proxy/</link>
    <description>Recent content in Proxy 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/proxy/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;&#xA;&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;&#xA;&lt;figure class=&#34;my-6 flex flex-col items-center&#34;&gt;&#xA;  &lt;img src=&#34;https://blog.baifan.site/pictures/posts/codex-websocket-reconnect-solutions.svg&#34; alt=&#34;Comparison of the four fixes&#34; style=&#34;max-width: 900px;&#34; class=&#34;rounded-lg shadow-md mx-auto &#34; loading=&#34;lazy&#34; /&gt;&#xA;  &#xA;  &lt;figcaption class=&#34;mt-2 text-center text-sm text-neutral-500 dark:text-neutral-400 italic&#34;&gt;Comparison of the four fixes&lt;/figcaption&gt;&#xA;  &#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;&lt;h2 class=&#34;relative group&#34;&gt;Why WebSocket Breaks Behind Proxies&#xA;    &lt;div id=&#34;why-websocket-breaks-behind-proxies&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;&#xA;    &#xA;    &lt;span&#xA;        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&#34;&gt;&#xA;        &lt;a class=&#34;text-primary-300 dark:text-neutral-700 !no-underline&#34; href=&#34;#why-websocket-breaks-behind-proxies&#34; aria-label=&#34;Anchor&#34;&gt;#&lt;/a&gt;&#xA;    &lt;/span&gt;&#xA;    &#xA;&lt;/h2&gt;&#xA;&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>
