<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[套 cf cdn，怎么保证 CF-Connecting-IP 不被伪造?]]></title><description><![CDATA[<p dir="auto">我是要获取用户的真实 IP<br />
127.0.0.1:80 &lt;- frpc &lt;- frps &lt;- cf cdn &lt;- 访问者</p>
<p dir="auto">如果我直接访问 frps，伪造 CF-Connecting-IP</p>
<pre><code>curl -v http://frp-cup.com/ \
-H "Host: 114514.org" \
-H "CF-Connecting-IP: 1.2.3.4"
</code></pre>
<pre><code>set_real_ip_from 127.0.0.1
</code></pre>
<p dir="auto">nginx 应该怎么配置保证CF-Connecting-IP 不被伪造 ，本人小白求救。</p>
]]></description><link>https://bbs.leaguetech.net/topic/29/套-cf-cdn-怎么保证-cf-connecting-ip-不被伪造</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Jul 2026 23:03:15 GMT</lastBuildDate><atom:link href="https://bbs.leaguetech.net/topic/29.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 22 Jun 2026 15:58:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 套 cf cdn，怎么保证 CF-Connecting-IP 不被伪造? on Mon, 22 Jun 2026 16:04:59 GMT]]></title><description><![CDATA[<p dir="auto">nginx.conf 配置</p>
<pre><code>    proxy_set_header X-Real-IP $proxy_protocol_addr; 
    proxy_set_header X-Forwarded-For $proxy_protocol_addr;
</code></pre>
<p dir="auto">站点配置</p>
<pre><code>    listen 443 ssl http2 proxy_protocol; 
    server_name example.com; 
    index index.php index.html index.htm default.php default.htm default.html; 
    real_ip_recursive on; #  递归处理 PROXY 协议中的 IP 地址
    set_real_ip_from 127.0.0.1; #  这里的127.0.0.1表示可信的代理服务器 IP 地址
    set_real_ip_from 10.10.1.1/24; 
    real_ip_header proxy_protocol; #  启用 PROXY 协议支持
</code></pre>
]]></description><link>https://bbs.leaguetech.net/post/48</link><guid isPermaLink="true">https://bbs.leaguetech.net/post/48</guid><dc:creator><![CDATA[white]]></dc:creator><pubDate>Mon, 22 Jun 2026 16:04:59 GMT</pubDate></item></channel></rss>