<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>反向代理 on Dick's Tech Notes</title><link>https://gods.1681588.xyz/tags/%E5%8F%8D%E5%90%91%E4%BB%A3%E7%90%86/</link><description>Recent content in 反向代理 on Dick's Tech Notes</description><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Sat, 02 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://gods.1681588.xyz/tags/%E5%8F%8D%E5%90%91%E4%BB%A3%E7%90%86/index.xml" rel="self" type="application/rss+xml"/><item><title>飞牛NAS Docker：Lucky DDNS + 反向代理</title><link>https://gods.1681588.xyz/posts/fnos-lucky/</link><pubDate>Sat, 02 May 2026 00:00:00 +0000</pubDate><guid>https://gods.1681588.xyz/posts/fnos-lucky/</guid><description>&lt;h2 id="功能">功能&lt;/h2>
&lt;p>Lucky 提供 DDNS（动态域名解析）和反向代理，让内网服务可以通过域名外网访问。&lt;/p>
&lt;p>&lt;strong>核心能力：&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>DDNS 动态域名更新（阿里云/Cloudflare 等）&lt;/li>
&lt;li>反向代理（HTTP/HTTPS/TCP/UDP）&lt;/li>
&lt;li>自动 HTTPS 证书&lt;/li>
&lt;li>Web 管理面板&lt;/li>
&lt;/ul>
&lt;h2 id="部署">部署&lt;/h2>
&lt;h3 id="docker-composeyml">docker-compose.yml&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">services&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">lucky&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">image&lt;/span>: &lt;span style="color:#ae81ff">gdy666/lucky:latest&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">container_name&lt;/span>: &lt;span style="color:#ae81ff">lucky&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">restart&lt;/span>: &lt;span style="color:#ae81ff">unless-stopped&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">ports&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#e6db74">&amp;#34;16601:16601&amp;#34;&lt;/span> &lt;span style="color:#75715e"># 管理面板&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#e6db74">&amp;#34;8888:8888&amp;#34;&lt;/span> &lt;span style="color:#75715e"># 反向代理端口&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">volumes&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#ae81ff">./config:/goodluck&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">environment&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#ae81ff">http_proxy=&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#ae81ff">https_proxy=&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#ae81ff">ALL_PROXY=&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">network_mode&lt;/span>: &lt;span style="color:#ae81ff">bridge&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="配置流程">配置流程&lt;/h3>
&lt;ol>
&lt;li>访问 &lt;code>http://192.168.x.x:16601&lt;/code> 进入管理面板&lt;/li>
&lt;li>&lt;strong>DDNS 设置&lt;/strong>：添加域名，选择 DNS 服务商，配置 Token&lt;/li>
&lt;li>&lt;strong>反向代理&lt;/strong>：添加规则，内外端口映射&lt;/li>
&lt;/ol>
&lt;h3 id="反向代理示例">反向代理示例&lt;/h3>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>域名&lt;/th>
 &lt;th>内网地址&lt;/th>
 &lt;th>用途&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>lx.1581688.xyz:8888&lt;/td>
 &lt;td>localhost:9527&lt;/td>
 &lt;td>LX Music 同步&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h2 id="坑">坑&lt;/h2>
&lt;p>⚠️ OrbStack 中 &lt;code>network_mode: host&lt;/code> 出站 TCP 不通，必须用 bridge + 端口映射。&lt;/p></description></item></channel></rss>