<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Justin Lee</title>
    <description>The latest articles on DEV Community by Justin Lee (@justin_lee_8f4961931a6985).</description>
    <link>https://dev.to/justin_lee_8f4961931a6985</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3877095%2Fbf7e9950-a767-4ef7-8da0-9609140f9cb7.png</url>
      <title>DEV Community: Justin Lee</title>
      <link>https://dev.to/justin_lee_8f4961931a6985</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/justin_lee_8f4961931a6985"/>
    <language>en</language>
    <item>
      <title>用caddy代理币安的现货永续合约接口模板</title>
      <dc:creator>Justin Lee</dc:creator>
      <pubDate>Mon, 13 Apr 2026 16:50:23 +0000</pubDate>
      <link>https://dev.to/justin_lee_8f4961931a6985/yong-caddydai-li-bi-an-de-xian-huo-yong-xu-he-yue-jie-kou-mo-ban-5e5l</link>
      <guid>https://dev.to/justin_lee_8f4961931a6985/yong-caddydai-li-bi-an-de-xian-huo-yong-xu-he-yue-jie-kou-mo-ban-5e5l</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;用caddy代理币安的现货永续合约接口模板


# 假设域名为： proxy2.mydomain.xyz

https://proxy2.mydomain.xyz:443 {
    import block__cors

    # 代理 Binance 永续合约 (Futures)
    handle_path /bn/perp/* {
        reverse_proxy https://fapi.binance.com {
            header_up Host fapi.binance.com
            header_down -Proxy-Connection
            flush_interval 300ms
            transport http {
                dial_timeout 10s
                keepalive 10m
            }
        }
    }

    # 代理 Binance 现货 (Spot)
    handle_path /bn/spot/* {
        reverse_proxy https://api.binance.com {
            header_up Host api.binance.com
            header_down -Proxy-Connection
            flush_interval 300ms
            transport http {
                dial_timeout 10s
                keepalive 10m
            }
        }
    }


    # ----------------------------
    # 永续 WebSocket 代理
    # 访问示例： wss://d6.rrxia.xyz:443/ws/bn/perp/ws 会访问到 wss://fstream.binance.com/ws
    handle /ws/bn/perp/* {
    # 不做额外的 uri 改写，handle_path 会去掉 /ws/bn/perp 前缀
        reverse_proxy *  https://fstream.binance.com {
            header_up Host fstream.binance.com
            #header_up Connection {&amp;gt;Connection}
            #header_up Upgrade {&amp;gt;Upgrade}
            header_down -Proxy-Connection
            transport http {
                #versions 1.1
                dial_timeout 10s
                keepalive 10m
            }
        }
    }



    # 现货 WebSocket 代理
    # 访问示例： wss://d6.rrxia.xyz:443/ws/bn/perp/ws 会访问到 wss://stream.binance.com:9443/ws
    handle /ws/bn/spot/* {
        # 不做额外的 uri 改写，handle_path 会去掉 /ws/bn/spot 前缀
        reverse_proxy *  https://stream.binance.com:9443 {
            header_up Host fstream.binance.com
            #header_up Connection {&amp;gt;Connection}
            #header_up Upgrade {&amp;gt;Upgrade}
            header_down -Proxy-Connection
            transport http {
                #versions 1.1
                dial_timeout 10s
                keepalive 10m
            }
        }
    }


    # file proxy
    handle_path /openfile/* {
        root *  /home/datum/appdata/openfile
        file_server {
                hide *.git
                browse
        }
    }   
}


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>api</category>
      <category>cryptocurrency</category>
      <category>devops</category>
      <category>networking</category>
    </item>
  </channel>
</rss>
