<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
     xmlns:atom="http://www.w3.org/2005/Atom"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>王叔走都是上坡 · 独立开发者</title>
    <link>https://apppss.com/</link>
    <description>独立开发者 / 全栈工程师的博客。分享技术教程、交易心得与个人成长。</description>
    <language>zh-CN</language>
    <lastBuildDate>Tue, 16 Jun 2026 11:53:02 GMT</lastBuildDate>
    <pubDate>Tue, 16 Jun 2026 00:00:00 GMT</pubDate>
    <ttl>60</ttl>
    <atom:link href="https://apppss.com/rss.xml" rel="self" type="application/rss+xml" />
    <managingEditor>panic3170@gmail.com (王叔走都是上坡)</managingEditor>
    <webMaster>panic3170@gmail.com (王叔走都是上坡)</webMaster>
    <copyright>Copyright © 2026 王叔走都是上坡</copyright>
    <generator>Nuxt 3 + RSS</generator>
  <item>
    <title>移动宽带 SSH 不到海外 VPS？CF + nginx 反向代理的全套方案</title>
    <link>https://apppss.com/writing/cf-xray-nginx-tutorial/</link>
    <guid isPermaLink="true">https://apppss.com/writing/cf-xray-nginx-tutorial/</guid>
    <pubDate>Tue, 16 Jun 2026 00:00:00 GMT</pubDate>
    <author>panic3170@gmail.com (王叔走都是上坡)</author>
    <description><![CDATA[3 分钟摘要： - 移动宽带到 VPS 的 SSH 流量被 GFW 识别并阻断 - 用 Cloudflare CDN 隐藏真实 VPS IP（免费方案） - xray VLESS + WebSocket 加密代理流量 - nginx 网站防御 G网 主动探测]]></description>
    <content:encoded><![CDATA[<h1>移动宽带 SSH 不到海外 VPS？CF + nginx 反向代理的全套方案</h1>
<blockquote>
<p><strong>核心结论</strong>：国内网络移动运营商会主动阻断到海外 VPS 的 SSH 流量。<strong>正确做法是让所有流量走 Cloudflare CDN</strong>，国内网络 看不到真实 VPS IP，配合 nginx 网站防主动探测。本文提供从零到一的完整部署方案。</p>
</blockquote>
<p><strong>3 分钟摘要</strong>：</p>
<ul>
<li>移动宽带到 VPS 的 SSH 流量被 GFW 识别并阻断</li>
<li>用 Cloudflare CDN 隐藏真实 VPS IP（免费方案）</li>
<li>xray VLESS + WebSocket 加密代理流量</li>
<li>nginx 网站防御 G网 主动探测</li>
</ul>
<p><strong>实测环境</strong>：RackNerd VPS（Ubuntu 22.04）+ 3X-UI + Clash Verge + 域名走 Cloudflare
<strong>适用场景</strong>：家庭移动宽带（移动/电信/联通）被国内网络移动运营商阻断 SSH 直连海外 VPS
<strong>最终效果</strong>：根本不用 SSH 直连 VPS，所有代理流量都套上 Cloudflare CDN + 网站防主动探测</p>
<hr>
<h2>一、问题背景</h2>
<p>从 RackNerd 买了一台美国 VPS，IP <code>104.223.xxx.xxx</code>，给了 root 账号密码让我从 22 端口登录。</p>
<p><strong>异常表现</strong>：</p>
<ul>
<li><code>ping</code> 这个 IP ✅ 通</li>
<li>家里中国移动宽带 <code>ssh root@IP -p 22</code> ❌ 卡住</li>
<li>改成 <code>ssh -p 443</code> 也卡住</li>
<li>手机 4G/5G 热点 <code>ssh root@IP -p 22</code> ✅ 正常</li>
<li>服务器侧 sshd 日志显示 <code>fatal: Timeout before authentication for &lt;我的国内IP&gt;</code></li>
</ul>
<p><strong>结论</strong>：家里移动宽带到 VPS 的 SSH 流量被 GFW/移动运营商识别并阻断。<strong>不是 VPS 的问题，是 ISP/GFW 的事</strong>。</p>
<p>客服让&quot;换 ISP 试试&quot;——这等于踢皮球，正确做法是<strong>让所有流量走 Cloudflare CDN</strong>，GFW 看不到真实 VPS IP。</p>
<hr>
<h2>二、最终架构</h2>
<pre><code>┌────────────────────────────────────────┐
│  客户端（家里移动宽带）                  │
│   Clash Verge → 节点 rackvps-cf         │
└─────────────┬──────────────────────────┘
              │  TLS 443（看起来是普通 HTTPS）
              ▼
┌────────────────────────────────────────┐
│  Cloudflare Edge（全球 CDN 节点）       │
│   - 隐藏真实 VPS IP                     │
│   - 缓解 GFW 主动探测                   │
└─────────────┬──────────────────────────┘
              │  TLS 443（CF 回源）
              ▼
┌────────────────────────────────────────┐
│  VPS nginx (0.0.0.0:443)               │
│   路径 /ws  → 127.0.0.1:10000 → xray  │
│   其他路径  → /var/www/fake (假博客)    │
└─────────────┬──────────────────────────┘
              │
              ▼
┌────────────────────────────────────────┐
│  xray (VLESS + WebSocket)              │
│   鉴权通过 → 流量转发到互联网            │
└────────────────────────────────────────┘
</code></pre>
<p>三层防护：</p>
<ol>
<li><strong>CF CDN</strong> — 客户端只看到 CF 节点，看不到 VPS IP</li>
<li><strong>nginx fallback</strong> — GFW 主动探测看到的是普通博客</li>
<li><strong>xray VLESS+WS</strong> — 真实代理流量加密传输</li>
</ol>
<hr>
<h2>三、前置准备</h2>
<table>
<thead>
<tr>
<th>项目</th>
<th>说明</th>
</tr>
</thead>
<tbody><tr>
<td>域名</td>
<td>自己的域名（已在 Cloudflare 接入，能改 NS）</td>
</tr>
<tr>
<td>VPS</td>
<td>任意海外 VPS（本文用 RackNerd Ubuntu 22.04）</td>
</tr>
<tr>
<td>3X-UI</td>
<td>VPS 上已装好（如果没装，参考 <a href="#%E5%9B%9Bvps-%E7%AB%AF%E9%85%8D%E7%BD%AE">3X-UI 安装</a>）</td>
</tr>
<tr>
<td>客户端</td>
<td>Clash Verge（Windows / macOS / iOS / Android 都有）</td>
</tr>
</tbody></table>
<p><strong>本文用到的占位符</strong>（实际配置时替换成自己的）：</p>
<table>
<thead>
<tr>
<th>占位符</th>
<th>含义</th>
<th>示例</th>
</tr>
</thead>
<tbody><tr>
<td><code>&lt;域名&gt;</code></td>
<td>CF 上接入的域名</td>
<td><code>qzz.io</code></td>
</tr>
<tr>
<td><code>proxy.&lt;域名&gt;</code></td>
<td>代理用的子域</td>
<td><code>proxy.qzz.io</code></td>
</tr>
<tr>
<td><code>&lt;VPS_IP&gt;</code></td>
<td>VPS 真实 IP</td>
<td><code>104.223.xxx.xxx</code></td>
</tr>
<tr>
<td><code>&lt;UUID&gt;</code></td>
<td>3X-UI 生成的客户端 UUID</td>
<td><code>b1a4d8e7-xxxx-...</code></td>
</tr>
</tbody></table>
<hr>
<h2>四、VPS 端配置</h2>
<h3>4.1 安装 3X-UI（如果还没装）</h3>
<p>SSH 到 VPS（用手机 4G 热点连），执行：</p>
<pre><code class="language-bash">bash &lt;(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh)
</code></pre>
<p>安装过程中会问：</p>
<ul>
<li><strong>用户名</strong>：自己设（默认 <code>admin</code>）</li>
<li><strong>密码</strong>：自己设（默认 <code>admin</code>，<strong>务必改</strong>）</li>
<li><strong>面板端口</strong>：自己设（默认 <code>54321</code>，建议改成 <code>2053</code> 之类不常见的）</li>
</ul>
<p>安装完后访问 <code>http://&lt;VPS_IP&gt;:&lt;面板端口&gt;</code>，能看到登录页就 OK。</p>
<h3>4.2 创建入站（VLESS + WebSocket + TLS）</h3>
<p>3X-UI 面板 → <strong>Inbounds</strong> → <strong>+ Add Inbound</strong>：</p>
<table>
<thead>
<tr>
<th>字段</th>
<th>填什么</th>
</tr>
</thead>
<tbody><tr>
<td>Remark</td>
<td><code>cf-vless</code>（随便起）</td>
</tr>
<tr>
<td>Protocol</td>
<td><code>vless</code></td>
</tr>
<tr>
<td>Listen IP</td>
<td>留空（默认 0.0.0.0，先这样，最后再改）</td>
</tr>
<tr>
<td>Port</td>
<td><code>443</code></td>
</tr>
<tr>
<td>Transmission</td>
<td><code>ws</code></td>
</tr>
<tr>
<td>Path</td>
<td><code>/ws</code></td>
</tr>
<tr>
<td>Security</td>
<td><code>TLS</code></td>
</tr>
<tr>
<td>Certificate</td>
<td><strong>暂时留空</strong>（下一步填）</td>
</tr>
<tr>
<td>Key</td>
<td><strong>暂时留空</strong></td>
</tr>
<tr>
<td>ALPN</td>
<td><code>h2, http/1.1</code></td>
</tr>
</tbody></table>
<p><strong>Clients</strong> → 点 <code>+ Add Client</code>：</p>
<ul>
<li>Email：随便填</li>
<li>点 🔄 生成 UUID → <strong>复制这个 UUID 备用</strong>（客户端要填）</li>
</ul>
<p>点 <strong>Create</strong> 保存。</p>
<h3>4.3 生成 Cloudflare Origin Certificate</h3>
<p>CF 控制台 → <strong>SSL/TLS</strong> → <strong>Origin Server</strong> → <strong>Create Certificate</strong>：</p>
<ul>
<li>Hostname：填 <code>proxy.&lt;域名&gt;</code>（比如 <code>proxy.qzz.io</code>）</li>
<li>Validity：<code>15 years</code></li>
<li>点 <strong>Create</strong></li>
</ul>
<p>复制生成的两段内容：</p>
<ul>
<li><code>Certificate</code> 框内容（含 <code>-----BEGIN CERTIFICATE-----</code>）→ 存到 VPS <code>/etc/ssl/cf/cert.pem</code></li>
<li><code>Private key</code> 框内容（含 <code>-----BEGIN PRIVATE KEY-----</code>）→ 存到 VPS <code>/etc/ssl/cf/key.pem</code></li>
</ul>
<p>在 VPS 上执行：</p>
<pre><code class="language-bash">mkdir -p /etc/ssl/cf
nano /etc/ssl/cf/cert.pem    # 粘贴证书内容，Ctrl+O 保存，Ctrl+X 退出
nano /etc/ssl/cf/key.pem     # 粘贴私钥内容
chmod 644 /etc/ssl/cf/cert.pem
chmod 600 /etc/ssl/cf/key.pem
</code></pre>
<p>回到 3X-UI 面板，把入站重新编辑：</p>
<ul>
<li><strong>Certificate</strong> 字段：粘贴 cert.pem 全部内容</li>
<li><strong>Key</strong> 字段：粘贴 key.pem 全部内容</li>
<li>保存</li>
</ul>
<h3>4.4 配置 Cloudflare 加密模式和 WebSocket</h3>
<p>CF 控制台：</p>
<p><strong>SSL/TLS → Overview</strong>：</p>
<ul>
<li>加密模式选 <strong><code>完整 (严格)</code></strong>（不要选&quot;灵活&quot;，否则 CF 到源站不加密，xray 收不到 TLS 握手）</li>
</ul>
<p><strong>Network</strong>：</p>
<ul>
<li><strong>WebSockets</strong> → <strong><code>On</code></strong></li>
</ul>
<h3>4.5 在 Cloudflare 添加 DNS 记录</h3>
<p>CF 控制台 → <strong>DNS</strong> → <strong>Records</strong> → <strong>+ Add record</strong>：</p>
<table>
<thead>
<tr>
<th>字段</th>
<th>值</th>
</tr>
</thead>
<tbody><tr>
<td>Type</td>
<td><code>A</code></td>
</tr>
<tr>
<td>Name</td>
<td><code>proxy</code>（子域名前缀，最终域名是 <code>proxy.&lt;域名&gt;</code>）</td>
</tr>
<tr>
<td>IPv4 address</td>
<td><code>&lt;VPS_IP&gt;</code></td>
</tr>
<tr>
<td>Proxy status</td>
<td><strong><code>Proxied</code>（橙色云朵）</strong> ← 必须选这个</td>
</tr>
<tr>
<td>TTL</td>
<td><code>Auto</code></td>
</tr>
</tbody></table>
<p>保存后验证（Windows PowerShell）：</p>
<pre><code class="language-powershell">nslookup proxy.&lt;域名&gt;
</code></pre>
<p><strong>期望返回 CF 的 IP</strong>（<code>104.21.x.x</code> / <code>172.67.x.x</code> 等），<strong>不是 VPS IP</strong>。如果返回 VPS IP，说明橙色云朵没开。</p>
<h3>4.6 验证：客户端能通过域名连代理</h3>
<p>到此步 VPS 还在用 3X-UI 单独跑（监听 443 + TLS）。先在客户端验证代理能不能用。</p>
<p><strong>Clash Verge 临时配置</strong>：</p>
<pre><code class="language-yaml">proxies:
  - name: &quot;rackvps-cf&quot;
    type: vless
    server: proxy.&lt;域名&gt;
    port: 443
    uuid: &lt;UUID&gt;
    network: ws
    ws-opts:
      path: /ws
      headers:
        Host: proxy.&lt;域名&gt;
    tls: true
    servername: proxy.&lt;域名&gt;
    alpn:
      - h2
      - http/1.1

proxy-groups:
  - name: &quot;PROXY&quot;
    type: select
    proxies:
      - rackvps-cf
      - DIRECT

rules:
  - MATCH,PROXY
</code></pre>
<p>Clash Verge → Profiles → 粘贴上面 YAML → 启用 → 系统代理打开 → 浏览器开 Google 验证。</p>
<p><strong>通了之后继续下面步骤，加 nginx 反代做防探测。</strong></p>
<h3>4.7 安装 nginx</h3>
<p>VPS 上：</p>
<pre><code class="language-bash">apt update &amp;&amp; apt install -y nginx
</code></pre>
<blockquote>
<p>⚠️ 注意是 <code>apt install</code> 不是 <code>install</code>（常见笔误）。</p>
</blockquote>
<h3>4.8 写假网站内容</h3>
<pre><code class="language-bash">mkdir -p /var/www/fake
cat &gt; /var/www/fake/index.html &lt;&lt;&#39;EOF&#39;
&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
    &lt;meta charset=&quot;UTF-8&quot;&gt;
    &lt;title&gt;My Notes&lt;/title&gt;
    &lt;style&gt;
        body { font-family: -apple-system, sans-serif; max-width: 720px; margin: 40px auto; padding: 0 20px; color: #333; }
        h1 { border-bottom: 1px solid #eee; padding-bottom: 10px; }
        .post { margin: 20px 0; }
        .date { color: #999; font-size: 0.9em; }
    &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;h1&gt;My Notes&lt;/h1&gt;
    &lt;div class=&quot;post&quot;&gt;
        &lt;h2&gt;Hello, world&lt;/h2&gt;
        &lt;p class=&quot;date&quot;&gt;2026-01-15&lt;/p&gt;
        &lt;p&gt;Just a personal blog. Nothing to see here.&lt;/p&gt;
    &lt;/div&gt;
    &lt;div class=&quot;post&quot;&gt;
        &lt;h2&gt;About&lt;/h2&gt;
        &lt;p&gt;This is my personal site. Drop me a line if you want to chat.&lt;/p&gt;
    &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
EOF

cat &gt; /var/www/fake/robots.txt &lt;&lt;&#39;EOF&#39;
User-agent: *
Disallow: /admin/
Disallow: /private/
Allow: /
EOF
</code></pre>
<h3>4.9 写 nginx 配置</h3>
<pre><code class="language-bash">cat &gt; /etc/nginx/conf.d/proxy.conf &lt;&lt;&#39;EOF&#39;
# 默认 server：处理无 SNI / 主动探测请求（防御 GFW）
server {
    listen 443 ssl http2 default_server;
    server_name _;

    ssl_certificate     /etc/ssl/cf/cert.pem;
    ssl_certificate_key /etc/ssl/cf/key.pem;
    ssl_protocols       TLSv1.2 TLSv1.3;

    root  /var/www/fake;
    index index.html;

    location / {
        try_files $uri $uri/ /index.html;
    }
}

# 真实代理：匹配 proxy.&lt;域名&gt;
server {
    listen 443 ssl http2;
    server_name proxy.&lt;域名&gt;;

    ssl_certificate     /etc/ssl/cf/cert.pem;
    ssl_certificate_key /etc/ssl/cf/key.pem;
    ssl_protocols       TLSv1.2 TLSv1.3;
    ssl_ciphers         HIGH:!aNULL:!MD5;

    root  /var/www/fake;
    index index.html;

    # WebSocket 路径 → xray
    location /ws {
        proxy_pass http://127.0.0.1:10000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection &quot;upgrade&quot;;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_read_timeout 3600s;
    }

    # 默认：返回假网站
    location / {
        try_files $uri $uri/ /index.html;
    }
}

# HTTP → HTTPS 重定向
server {
    listen 80;
    server_name proxy.&lt;域名&gt;;
    return 301 https://$host$request_uri;
}

# 80 端口 default_server（防止端口扫描暴露）
server {
    listen 80 default_server;
    server_name _;
    root /var/www/fake;
    index index.html;
    location / {
        try_files $uri $uri/ /index.html;
    }
}
EOF

# 删掉 nginx 默认站（避免冲突）
rm -f /etc/nginx/sites-enabled/default

# 检查 + 启动
nginx -t
systemctl enable --now nginx
</code></pre>
<h3>4.10 修改 3X-UI 入站（让出 443 端口给 nginx）</h3>
<p>3X-UI 面板 → Inbounds → 编辑 <code>cf-vless</code> 入站：</p>
<table>
<thead>
<tr>
<th>字段</th>
<th>改为什么</th>
</tr>
</thead>
<tbody><tr>
<td>Port</td>
<td><code>443</code> → <strong><code>10000</code></strong></td>
</tr>
<tr>
<td>Listen IP</td>
<td>留空 → <strong><code>127.0.0.1</code></strong></td>
</tr>
<tr>
<td>Security</td>
<td><code>TLS</code> → <strong><code>None</code></strong>（关掉，TLS 由 nginx 处理）</td>
</tr>
<tr>
<td>数字证书</td>
<td><strong>清空</strong></td>
</tr>
</tbody></table>
<p>保存。</p>
<h3>4.11 重启服务（顺序很重要）</h3>
<pre><code class="language-bash">x-ui restart           # 3X-UI 重启，xray 切到 127.0.0.1:10000
systemctl restart nginx # nginx 现在能抢到 443 了
</code></pre>
<blockquote>
<p>⚠️ <strong>顺序必须是先 <code>x-ui restart</code> 再 <code>systemctl restart nginx</code></strong>。否则 xray 还占着 443，nginx 启动会报 <code>bind() failed (98: Address already in use)</code>。</p>
</blockquote>
<h3>4.12 验证</h3>
<pre><code class="language-bash"># 1. 端口监听
ss -tlnp | grep -E &#39;:80|:443|:10000&#39;
# 期望：
#   nginx 在 *:80、*:443
#   xray 在 127.0.0.1:10000（必须是 127.0.0.1，不是 0.0.0.0）

# 2. 域名访问假网站
curl -sI https://proxy.&lt;域名&gt;/
# 期望：HTTP/2 200

# 3. 看假网站内容
curl -s https://proxy.&lt;域名&gt;/ | grep &quot;My Notes&quot;
# 期望：能找到 My Notes 字样
</code></pre>
<hr>
<h2>五、客户端配置（Clash Verge）</h2>
<h3>5.1 创建 Profile</h3>
<p>Clash Verge → <strong>Profiles</strong> → <strong>New Profile</strong> → 选空白模板。</p>
<h3>5.2 写入配置</h3>
<pre><code class="language-yaml">mixed-port: 7890
allow-lan: false
mode: rule
log-level: info

proxies:
  - name: &quot;rackvps-cf&quot;
    type: vless
    server: proxy.&lt;域名&gt;
    port: 443
    uuid: &lt;UUID&gt;
    network: ws
    ws-opts:
      path: /ws
      headers:
        Host: proxy.&lt;域名&gt;
    tls: true
    servername: proxy.&lt;域名&gt;
    alpn:
      - h2
      - http/1.1
    skip-cert-verify: false
    udp: true

proxy-groups:
  - name: &quot;PROXY&quot;
    type: select
    proxies:
      - rackvps-cf
      - DIRECT

rules:
  - GEOIP,LAN,DIRECT
  - GEOIP,CN,DIRECT
  - MATCH,PROXY
</code></pre>
<blockquote>
<p>把 <code>&lt;域名&gt;</code> 和 <code>&lt;UUID&gt;</code> 替换成自己的。</p>
</blockquote>
<h3>5.3 启用代理</h3>
<ul>
<li>顶部 <strong>Proxies</strong> → <code>PROXY</code> 组 → 选 <code>rackvps-cf</code></li>
<li>主界面打开 <strong>System Proxy</strong> 或 <strong>TUN Mode</strong>（TUN 更彻底）</li>
</ul>
<h3>5.4 验证代理生效</h3>
<p>浏览器访问：</p>
<ul>
<li><a href="https://ip.sb">https://ip.sb</a> — 应显示美国 IP <code>104.223.xxx.xxx</code></li>
<li><a href="https://www.google.com">https://www.google.com</a> — 应能打开</li>
<li><a href="https://ipinfo.io/json">https://ipinfo.io/json</a> — 应显示 <code>country: &quot;US&quot;</code></li>
</ul>
<p>或 PowerShell：</p>
<pre><code class="language-powershell">curl.exe -s https://ifconfig.me
# 期望：104.223.xxx.xxx
</code></pre>
<hr>
<h2>六、故障排查</h2>
<h3>6.1 浏览器报 <code>HTTP 521</code></h3>
<p>CF 连不上 VPS。<strong>在 VPS 上</strong>：</p>
<pre><code class="language-bash">ss -tlnp | grep 443
</code></pre>
<ul>
<li>看不到任何 443 监听 → nginx 没起来 → <code>systemctl restart nginx</code></li>
<li>看到 xray 在 443 → 3X-UI 入站没改 10000/127.0.0.1/None → 改完 <code>x-ui restart</code> 再 <code>systemctl restart nginx</code></li>
</ul>
<h3>6.2 浏览器报 <code>HTTP 502</code></h3>
<p>nginx 起来了但连不上 xray：</p>
<pre><code class="language-bash">ss -tlnp | grep 10000
</code></pre>
<p>看不到 <code>127.0.0.1:10000</code> → xray 没在 10000 监听 → 3X-UI 入站改没改好。</p>
<h3>6.3 Clash Verge 节点显示 Timeout</h3>
<p>按顺序检查：</p>
<ol>
<li><p><strong>域名解析</strong>：</p>
<pre><code class="language-powershell">nslookup proxy.&lt;域名&gt;
</code></pre>
<p>必须是 CF IP，不能是 VPS IP。</p>
</li>
<li><p><strong>CF SSL 模式</strong>：必须是 <code>完整 (严格)</code>，不能是 <code>灵活</code>。</p>
</li>
<li><p><strong>CF WebSockets</strong>：必须是 <code>On</code>。</p>
</li>
<li><p><strong>UUID 是否对</strong>：3X-UI 面板复制 UUID 重新填。</p>
</li>
<li><p><strong>路径是否对</strong>：客户端 <code>/ws</code> 和 3X-UI <code>Path: /ws</code> 必须完全一致。</p>
</li>
</ol>
<h3>6.4 nginx 启动报 <code>bind() to 0.0.0.0:443 failed (98: Unknown error)</code></h3>
<p>443 端口被占。先确认 xray 没在 443：</p>
<pre><code class="language-bash">ss -tlnp | grep 443
</code></pre>
<p>看到 xray → 3X-UI 入站改成 10000/127.0.0.1/None → <code>x-ui restart</code> → 再启 nginx。</p>
<h3>6.5 假网站能访问但 <code>/ws</code> 报 400</h3>
<p>nginx 转发到 xray 的配置出问题：</p>
<ul>
<li>路径 <code>/ws</code> 必须跟 3X-UI 入站 <code>Path: /ws</code> 完全一致</li>
<li>nginx 配置里 <code>Connection &quot;upgrade&quot;</code> 引号必须是英文双引号</li>
<li>nginx 转发 HTTP/1.1 给 xray，xray 必须也是 WS 模式（不能是别的传输）</li>
</ul>
<h3>6.6 Windows PowerShell <code>curl</code> 用不了</h3>
<p>PowerShell 的 <code>curl</code> 是 <code>Invoke-WebRequest</code> 的别名，参数不一样。<strong>用真 curl</strong>：</p>
<pre><code class="language-powershell">curl.exe -sI https://proxy.&lt;域名&gt;/
curl.exe -s https://proxy.&lt;域名&gt;/ | findstr &quot;My Notes&quot;
</code></pre>
<p>或装 Git for Windows 自带 <code>curl.exe</code>。</p>
<h3>6.7 改了 3X-UI 入站后代理掉了</h3>
<p>3X-UI 入站<strong>千万别改回 443/0.0.0.0/TLS</strong>——nginx 就会因为端口冲突起不来。</p>
<p>合法改动：端口改 10001/10002...、路径改 /ws2 /ws3...，<strong>Listen IP 永远 127.0.0.1，Security 永远 None</strong>。</p>
<hr>
<h2>七、日常维护</h2>
<h3>7.1 看代理流量</h3>
<p>VPS 上：</p>
<pre><code class="language-bash">tail -f /var/log/nginx/access.log | grep /ws
</code></pre>
<p>持续输出 <code>GET /ws HTTP/1.1 101 ...</code> 的日志。<strong><code>101</code> = WebSocket 升级成功 = 代理流量</strong>。</p>
<h3>7.2 改假网站</h3>
<pre><code class="language-bash">nano /var/www/fake/index.html
systemctl reload nginx
</code></pre>
<h3>7.3 加新节点</h3>
<ol>
<li>3X-UI 创建新入站：端口 <code>10001</code>，Listen <code>127.0.0.1</code>，Security <code>None</code>，Path <code>/ws2</code></li>
<li>nginx 加新转发：<pre><code class="language-nginx">location /ws2 {
    proxy_pass http://127.0.0.1:10001;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection &quot;upgrade&quot;;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_read_timeout 3600s;
}
</code></pre>
</li>
<li><code>systemctl reload nginx</code></li>
<li>客户端加节点，path 填 <code>/ws2</code></li>
</ol>
<h3>7.4 重启服务</h3>
<pre><code class="language-bash">systemctl restart nginx
x-ui restart
</code></pre>
<h3>7.5 防火墙</h3>
<p>UFW 通常 inactive 即可，需要开：</p>
<pre><code class="language-bash">ufw allow 443/tcp
ufw allow &lt;3X-UI面板端口&gt;/tcp    # 比如 2053
</code></pre>
<hr>
<h2>八、关键点回顾</h2>
<table>
<thead>
<tr>
<th>关键点</th>
<th>错误做法</th>
<th>正确做法</th>
</tr>
</thead>
<tbody><tr>
<td>CF DNS 记录</td>
<td>灰色云朵（DNS only）</td>
<td><strong>橙色云朵（Proxied）</strong></td>
</tr>
<tr>
<td>CF SSL 模式</td>
<td>灵活</td>
<td><strong>完整 (严格)</strong></td>
</tr>
<tr>
<td>3X-UI 入站端口</td>
<td>443</td>
<td><strong>10000 + Listen 127.0.0.1 + Security None</strong></td>
</tr>
<tr>
<td>CF Origin Cert</td>
<td>用 Let&#39;s Encrypt</td>
<td><strong>用 CF Origin Cert（15 年）</strong></td>
</tr>
<tr>
<td>nginx 启动顺序</td>
<td>先启 nginx 再改 3X-UI</td>
<td><strong>先 <code>x-ui restart</code>，再 <code>systemctl restart nginx</code></strong></td>
</tr>
<tr>
<td>nginx fallback 路径</td>
<td>留空 Path</td>
<td><strong>Path <code>/</code> + Dest <code>127.0.0.1:8080</code></strong> （用方案 A 时）</td>
</tr>
<tr>
<td>Windows curl</td>
<td><code>curl -sI URL</code></td>
<td><strong><code>curl.exe -sI URL</code></strong>（带 .exe 后缀）</td>
</tr>
</tbody></table>
<hr>
<h2>九、最终目录结构</h2>
<pre><code>VPS 文件结构：
/etc/ssl/cf/
├── cert.pem              # CF Origin 证书
└── key.pem               # CF Origin 私钥
/var/www/fake/
├── index.html            # 假博客首页
└── robots.txt            # 防爬虫提示
/etc/nginx/conf.d/
└── proxy.conf            # nginx 反代配置
/usr/local/x-ui/          # 3X-UI 安装目录
└── bin/config.json       # 3X-UI 生成的 xray 配置
</code></pre>
<hr>
<h2>十、写在最后</h2>
<p>整套方案的核心思路：</p>
<ol>
<li><strong>不要直连 VPS IP</strong>（被 GFW/ISP 干扰）</li>
<li><strong>所有流量套上 Cloudflare CDN</strong>（GFW 不敢全面封 CF）</li>
<li><strong>VPS 上不要让 xray 直接接 TLS</strong>（主动探测会暴露 xray）</li>
<li><strong>用 nginx 终结 TLS + 转发 WS</strong>（探测时看到的是普通博客）</li>
<li><strong>3X-UI 监听 127.0.0.1 的非标准端口</strong>（永远不暴露到公网）</li>
</ol>
<p>这样就实现了：</p>
<ul>
<li>国内移动宽带可以科学上网 ✅</li>
<li>国外网络也照样能用 ✅</li>
<li>GFW 主动探测看到的是博客 ✅</li>
<li>VPS IP 永远不会直接暴露 ✅</li>
<li>日常维护只需要改 3X-UI 入站和 nginx 配置 ✅</li>
</ul>
<hr>
<h2>常见问题 FAQ</h2>
<h3>为什么 SSH 连不上 VPS，但 ping 是通的？</h3>
<p>这是 GFW/移动运营商对 SSH 流量的<strong>主动识别与阻断</strong>。GFW 维护了常用协议的特征库，SSH（22/443 端口）的握手包有明显特征。一旦匹配，直接 RST 断开连接。<code>ping</code> 用的是 ICMP 协议，不在阻断范围内，所以会通。</p>
<p><strong>解决方法</strong>：不要直连 VPS IP，让所有流量走 Cloudflare CDN，GFW 看不到真实 IP。</p>
<h3>Cloudflare 免费版够用吗？</h3>
<p><strong>够用</strong>。本方案用的就是 CF 免费版：</p>
<ul>
<li>DNS 解析：免费</li>
<li>CDN 加速：免费</li>
<li>Origin Certificate：免费 15 年有效期</li>
<li>不限流量（公平使用）</li>
</ul>
<p>唯一限制：免费版<strong>不支持 Spectrum（TCP/UDP 转发）</strong>，但 VLESS + WebSocket 走 HTTPS 443 端口完全够用。</p>
<h3>一定要用 RackNerd VPS 吗？其他 VPS 行不行？</h3>
<p><strong>可以</strong>。本方案对 VPS 厂商没有要求，只要满足：</p>
<ul>
<li>系统：Ubuntu 20.04+ / Debian 11+ / CentOS 7+</li>
<li>能 SSH 登录（用手机 4G 热点或机场中转）</li>
<li>IP 没被墙（可以用 <code>ping.chinaz.com</code> 测一下）</li>
</ul>
<p><strong>推荐 VPS 厂商</strong>（按性价比）：RackNerd、CloudCone、BandwagonHost（搬瓦工）、HostDare、Vultr（按小时计费）。</p>
<h3>为什么用 VLESS 而不是 VMess 或 Trojan？</h3>
<table>
<thead>
<tr>
<th>协议</th>
<th>特点</th>
<th>推荐度</th>
</tr>
</thead>
<tbody><tr>
<td><strong>VLESS</strong></td>
<td>新一代轻量协议，无加密依赖 TLS</td>
<td>⭐⭐⭐⭐⭐（推荐）</td>
</tr>
<tr>
<td>VMess</td>
<td>老牌协议，自带加密但效率低</td>
<td>⭐⭐⭐</td>
</tr>
<tr>
<td>Trojan</td>
<td>伪装成 HTTPS，但握手特征明显</td>
<td>⭐⭐</td>
</tr>
<tr>
<td>Shadowsocks</td>
<td>已被 GFW 部分识别</td>
<td>⭐⭐</td>
</tr>
</tbody></table>
<p><strong>VLESS + WebSocket + TLS</strong> 是目前最难被 GFW 识别的组合，因为流量完全包裹在标准 HTTPS 中。</p>
<h3>nginx 假网站有什么作用？</h3>
<p><strong>防 GFW 主动探测</strong>。GFW 会对 Cloudflare CDN 后面的 IP 发起 HTTPS 探测请求：</p>
<ul>
<li>如果 443 端口返回的是 xray 的特征 → 标记为代理，封 IP</li>
<li>如果 443 端口返回的是普通博客 → 当作正常网站放行</li>
</ul>
<p>nginx 假网站就是让&quot;非代理用户&quot;访问时看到的是博客，真实代理用户访问 <code>/ws</code> 路径才走 xray。</p>
<h3>3X-UI 面板要不要暴露到公网？</h3>
<p><strong>绝对不要</strong>。3X-UI 面板必须：</p>
<ul>
<li>监听 <code>127.0.0.1</code>（仅本机访问）</li>
<li>端口改非标准（如 <code>2053</code>、<code>31456</code>）</li>
<li>设置强密码 + 改默认用户名 <code>admin</code></li>
</ul>
<p>访问面板通过 SSH 端口转发：<code>ssh -L 2053:127.0.0.1:2053 root@VPS_IP</code>，然后浏览器开 <code>http://127.0.0.1:2053</code>。</p>
<h3>这套方案会被封吗？</h3>
<p><strong>大概率不会长期稳定，但能用很久</strong>。G网 不断升级，本质是一场猫鼠游戏。本方案的优势：</p>
<ul>
<li>VPS IP 永远不暴露 → 封 IP 难度极大</li>
<li>网站防探测 → G网 看不到 xray 特征</li>
<li>Cloudflare CDN 缓冲 → 真实流量被分散到 CF 全球节点</li>
</ul>
<p><strong>降低风险的额外建议</strong>：</p>
<ul>
<li>不要在 VPS 上做违规内容</li>
<li>节点不要分享给太多人</li>
<li>定期更换 UUID 和路径</li>
</ul>
<h3>一个域名能部署多个节点吗？</h3>
<p><strong>可以</strong>。在 Cloudflare DNS 里加多个 A 记录（如 <code>proxy1</code>、<code>proxy2</code>、<code>proxy3</code>），都指向同一 VPS IP。客户端可以配置多个节点做负载均衡 / 故障转移。</p>
<ul>
<li>本文只做技术方案，不涉及任何法律问题。请在法律范围内使用。</li>
</ul>
<p><strong>完。</strong></p>
]]></content:encoded>
    <category>技术教程</category>
    <category>333</category>
    <category>eee</category>
    <category>999</category>
  </item>
  <item>
    <title>86 手机号无法登录 Telegram 终极解决方案：绕过付费验证码 + 旧设备验证找回账号</title>
    <link>https://apppss.com/writing/telegram-86-login-recovery/</link>
    <guid isPermaLink="true">https://apppss.com/writing/telegram-86-login-recovery/</guid>
    <pubDate>Sun, 14 Jun 2026 00:00:00 GMT</pubDate>
    <author>panic3170@gmail.com (王叔走都是上坡)</author>
    <description><![CDATA[3 分钟摘要： - 86 号码 + 邮箱 + 二次验证密码 = 找回账号的三要素，缺一不可 - 用第三方客户端 Telega（绕过 Google Play 校验版本）登录，触发邮箱 + 2FA 通道 - 登录成功后再用官方 Telegram 登录、更新到最新版本 - 整个过程不需要原手机短信、不需要]]></description>
    <content:encoded><![CDATA[<h1>86 手机号无法登录 Telegram 终极解决方案：绕过付费验证码 + 旧设备验证找回账号</h1>
<blockquote>
<p><strong>核心结论</strong>：86 手机号登录 Telegram 提示&quot;收费验证码&quot;或把验证码发到旧设备，本质是 Telegram 的<strong>反垃圾 + 多设备验证</strong>机制在生效。<strong>前提条件</strong>是：你必须还拥有这个 86 号码、绑定的邮箱、且<strong>开启了二次验证（2FA）并记得密码</strong>。满足这三者，可以用第三方客户端 <strong>Telega</strong> 走&quot;邮箱 + 2FA 密码&quot;通道直接登录，绕开短信付费和旧设备验证。本文提供亲测可行的完整操作步骤。</p>
</blockquote>
<p><strong>3 分钟摘要</strong>：</p>
<ul>
<li>86 号码 + 邮箱 + 二次验证密码 = 找回账号的<strong>三要素</strong>，缺一不可</li>
<li>用第三方客户端 <strong>Telega</strong>（绕过 Google Play 校验版本）登录，触发邮箱 + 2FA 通道</li>
<li>登录成功后再用官方 Telegram 登录、更新到最新版本</li>
<li>整个过程<strong>不需要</strong>原手机短信、不需要旧设备在线</li>
</ul>
<p><strong>事故背景</strong>：旧手机上登录的 Telegram 因手机摔坏无法开机，新设备登录时 Telegram 提示需要发送付费验证码，或把验证码发到旧设备上，折腾半个多月最终找回。本文记录真实操作流程和踩过的坑。</p>
<hr>
<h2>一、事故还原：为什么 86 手机号登录 Telegram 会失败</h2>
<h3>1.1 触发场景</h3>
<p>最常见的两种卡死情况：</p>
<table>
<thead>
<tr>
<th>情况</th>
<th>现象</th>
<th>原因</th>
</tr>
</thead>
<tbody><tr>
<td><strong>A. 收费验证码</strong></td>
<td>提示&quot;This phone number can only be used to send a paid SMS&quot;</td>
<td>Telegram 检测到号码被滥用过，强制走付费通道</td>
</tr>
<tr>
<td><strong>B. 发到旧设备</strong></td>
<td>提示&quot;Code sent to your other device&quot;</td>
<td>旧设备还在线（即使关屏），Telegram 优先推送到已登录设备</td>
</tr>
<tr>
<td><strong>C. 登录即掉线</strong></td>
<td>旧设备上提示&quot;New login attempt&quot;，新设备看不到验证码</td>
<td>所有会话验证码都推到旧设备，新设备收不到</td>
</tr>
</tbody></table>
<h3>1.2 底层原因</h3>
<p>Telegram 的登录策略按以下顺序判断：</p>
<ol>
<li><strong>是否在 30 天内登录过该设备</strong> → 是，直接放行</li>
<li><strong>是否绑定了其他已登录设备</strong> → 是，推送验证码到其他设备</li>
<li><strong>是否开通了二次验证</strong> → 是，验证密码</li>
<li><strong>手机号是否被标记</strong> → 是，强制付费短信</li>
<li><strong>以上都不通过</strong> → 免费短信</li>
</ol>
<p>对于 86 号码（+86），第 4 条命中率很高，因为大量黑产用虚拟号段注册过。<strong>Telega 客户端可以绕过这一层判断</strong>，直接走二次验证通道。</p>
<h3>1.3 为什么旧设备掉线就无法登录</h3>
<p>Telegram 8.0 之后引入了&quot;设备群组&quot;概念：</p>
<ul>
<li>账号登录的所有设备构成一个<strong>群组</strong></li>
<li>新设备登录时，验证码优先推送到群组中&quot;最活跃&quot;的设备</li>
<li>旧手机即使关屏，只要 Telegram 在后台运行，就会被识别为活跃设备</li>
<li>旧手机掉线后，新设备才有机会收到短信</li>
</ul>
<p>但 86 号码可能等不到这一步——<strong>Telegram 在新设备请求时直接拒绝免费通道</strong>。</p>
<hr>
<h2>二、前置条件（缺一不可）</h2>
<p>在开始之前，<strong>请先确认以下三件事</strong>，缺一找回失败：</p>
<table>
<thead>
<tr>
<th>必备项</th>
<th>用途</th>
<th>怎么确认</th>
</tr>
</thead>
<tbody><tr>
<td><strong>① 86 手机号</strong></td>
<td>Telegram 账号的注册号</td>
<td>必须是当前可用的、能接打电话的卡</td>
</tr>
<tr>
<td><strong>② 绑定邮箱</strong></td>
<td>接收登录验证码</td>
<td>在 Telegram → Settings → Edit Profile 里看，没有就补一个</td>
</tr>
<tr>
<td><strong>③ 二次验证密码</strong></td>
<td>登录时的第二道验证</td>
<td>在 Settings → Privacy and Security → Two-Step Verification 设置过</td>
</tr>
</tbody></table>
<p><strong>特别强调</strong>：</p>
<ul>
<li>如果<strong>没开二次验证</strong> → 无法绕过，只能等 Telegram 客服（回复极慢）</li>
<li>如果<strong>忘了二次验证密码</strong> → 先用邮箱重置（在登录页点&quot;Forgot password?&quot;）</li>
<li>如果<strong>邮箱没绑定</strong> → 登录时无法走邮箱通道，<strong>这个方法无效</strong></li>
</ul>
<hr>
<h2>三、完整操作步骤（亲测有效）</h2>
<h3>第一步：下载 Telega（绕过 Google Play 验证的版本）</h3>
<blockquote>
<p>⚠️ <strong>这一步骤卡了最久</strong>。很多人卡在&quot;Telega 安装不上 / 打开就闪退 / 提示需要从 Google Play 验证&quot;。<strong>90% 的问题是版本不对</strong>。</p>
</blockquote>
<h4>1.1 为什么必须用特定版本</h4>
<p>Telega 是一款第三方 Telegram 客户端（基于 TDLib 二次开发），有两个特殊能力：</p>
<ul>
<li><strong>跳过 Google Play 完整性校验</strong>（CH Play Integrity）</li>
<li><strong>直接暴露 2FA + 邮箱登录通道</strong></li>
</ul>
<p>但官方版本会触发校验，<strong>需要找已经破解校验的 APK</strong>（通常 7.x 或 8.x 的某个特定构建）。</p>
<h4>1.2 安装步骤</h4>
<ol>
<li>准备一台<strong>手机或安卓模拟器</strong>（推荐夜神、雷电、MuMu 等主流模拟器）</li>
<li>卸载手机上所有旧版 Telega / Telegram（避免数据冲突）</li>
<li><strong>获取可用的 Telega APK</strong>（建议找博主或社区获取，<strong>版本很关键</strong>，网传的&quot;最新版&quot;基本都用不了）</li>
<li>安装时如果提示&quot;未知来源&quot;，到设置里允许安装</li>
<li>安装完成后<strong>不要打开</strong>，先断网（飞行模式）再打开，避免它自动更新到坏版本</li>
</ol>
<blockquote>
<p><strong>重要提示</strong>：Telega 的&quot;可用版本号&quot;会随 Telegram 官方更新而变化。我测试时可用的是 <code>x.x.x</code> 版本（文末可以找我要当前可用版本）。<strong>不要去 Telegram 群组随便下载</strong>——大部分是引流号或带木马的。</p>
</blockquote>
<h3>第二步：用 Telega 登录（走邮箱 + 2FA 通道）</h3>
<ol>
<li>打开 Telega</li>
<li>输入你的 86 手机号（格式 <code>+86 138xxxxxxxx</code>，前面带 +86）</li>
<li>选 <strong>Log in by email</strong>（如果有这个选项）<ul>
<li>如果没看到这个选项 → 版本不对，换一个版本</li>
</ul>
</li>
<li>去邮箱收验证码（<strong>5 分钟内有效</strong>）</li>
<li>输入邮箱验证码</li>
<li><strong>提示输入二次验证密码</strong>（Two-Step Verification Password）→ 输入你设置的密码</li>
<li>看到 &quot;Loading chats...&quot; → <strong>登录成功</strong></li>
</ol>
<blockquote>
<p>💡 整个过程<strong>完全不需要手机短信</strong>，<strong>完全不需要旧设备</strong>。如果到这里你已经看到自己的聊天记录，恭喜，账号找回了。</p>
</blockquote>
<h3>第三步：回到官方 Telegram 登录</h3>
<p>Telega 是第三方客户端，<strong>不适合长期使用</strong>（数据同步可能有延迟、二次验证可能重复弹）。找回账号后，按下面的步骤切回官方客户端：</p>
<ol>
<li>在手机上下载<strong>官方 Telegram</strong>（Google Play 或 App Store）</li>
<li>用<strong>同一个 86 手机号</strong>登录</li>
<li>这次因为你已经成功通过二次验证，<strong>Telegram 不会再发付费验证码</strong>——它会直接发送<strong>免费短信</strong>到你的手机</li>
<li>输入短信验证码</li>
<li>提示输入二次验证密码 → 输入</li>
<li>登录成功</li>
</ol>
<blockquote>
<p>🎉 <strong>到此为止，账号已经完全找回了。</strong> 接下来在 Settings → Devices 里<strong>终止所有其他设备的会话</strong>（包括 Telega 那个），防止再出问题。</p>
</blockquote>
<h3>第四步：更新 Telegram 到最新版</h3>
<ol>
<li>登录后系统会提示更新 → 立即更新</li>
<li>更新完成后重启</li>
<li>检查二次验证是否还在 → Settings → Privacy and Security → Two-Step Verification</li>
<li><strong>强烈建议把二次验证密码记到密码管理器</strong>（1Password / Bitwarden），下次再遇到设备丢失能直接找回</li>
</ol>
<hr>
<h2>四、踩过的坑（避坑指南）</h2>
<h3>4.1 版本问题（最常见）</h3>
<p><strong>症状</strong>：</p>
<ul>
<li>Telega 安装后打开就闪退</li>
<li>打开后停在加载页面不动</li>
<li>提示&quot;需要从 Google Play 更新&quot;</li>
<li>提示&quot;应用未经认证&quot;</li>
</ul>
<p><strong>原因</strong>：Google Play Integrity（以前叫 SafetyNet）会检测 APK 是否&quot;官方来源&quot;。第三方修改版会触发检测。</p>
<p><strong>解决</strong>：</p>
<ul>
<li>✅ 用<strong>已经 Magisk 隐藏 + 校验通过</strong>的版本</li>
<li>✅ 模拟器用户<strong>必须用带 root 的镜像</strong>（夜神安卓 9+ 自带 root）</li>
<li>❌ <strong>不要用最新版</strong>（基本都坏了）</li>
<li>❌ <strong>不要在应用商店下载</strong>（都是引流版）</li>
</ul>
<h3>4.2 邮箱收不到验证码</h3>
<p><strong>症状</strong>：Telega 提示&quot;Verification code sent to your email&quot;，但邮箱里找不到。</p>
<p><strong>排查</strong>：</p>
<ol>
<li>检查垃圾邮件箱</li>
<li>检查&quot;促销&quot;标签（Gmail 会自动归类）</li>
<li>等待 2-3 分钟（Telegram 邮箱通道有延迟）</li>
<li>重新点击&quot;Resend code&quot;</li>
<li>如果超过 10 分钟还没收到 → 邮箱没绑对这个账号，<strong>用这个 Telega 客户端是没用的</strong></li>
</ol>
<h3>4.3 二次验证密码忘了</h3>
<p><strong>症状</strong>：Telega 登录时输入密码提示&quot;Invalid password&quot;。</p>
<p><strong>解决</strong>：</p>
<ol>
<li>回到 Telega 登录页</li>
<li>点 &quot;Forgot password?&quot;</li>
<li>走<strong>邮箱重置流程</strong>（这又需要邮箱能收到邮件）</li>
<li>重置后重新登录</li>
</ol>
<h3>4.4 86 号码本身不可用</h3>
<p><strong>症状</strong>：你的 86 卡已经注销 / 长期欠费停机。</p>
<p><strong>解决</strong>：</p>
<ul>
<li><strong>Telegram 不会因为你换号就锁账号</strong>——只要邮箱 + 2FA 密码还在，<strong>直接用 Telega 登录</strong></li>
<li>登录后到 Settings → Edit Profile → Phone Number → Change Number，<strong>换成新号</strong>（这一步可选）</li>
</ul>
<h3>4.5 登录后聊天记录是空的</h3>
<p><strong>症状</strong>：登录成功但看不到以前的聊天记录。</p>
<p><strong>原因</strong>：Telega 是新客户端，<strong>不会自动同步云端历史</strong>。</p>
<p><strong>解决</strong>：</p>
<ul>
<li>退出 Telega</li>
<li>用官方 Telegram 登录</li>
<li>官方客户端会从 Telegram 云端拉取全部历史记录（<strong>这个过程需要科学上网</strong>）</li>
</ul>
<hr>
<h2>五、找回后的安全加固</h2>
<p>账号找回只是开始，<strong>强烈建议做以下防护</strong>，避免下次再翻车：</p>
<h3>5.1 完善账号信息</h3>
<table>
<thead>
<tr>
<th>设置项</th>
<th>路径</th>
<th>建议</th>
</tr>
</thead>
<tbody><tr>
<td>邮箱</td>
<td>Settings → Edit Profile → Email</td>
<td><strong>必须</strong>绑定可用邮箱</td>
</tr>
<tr>
<td>二次验证</td>
<td>Settings → Privacy and Security → Two-Step Verification</td>
<td><strong>必须</strong>开启，强密码</td>
</tr>
<tr>
<td>备用邮箱</td>
<td>Settings → Privacy and Security → Two-Step Verification → Set Email</td>
<td>设置&quot;重置密码用邮箱&quot;</td>
</tr>
<tr>
<td>登录邮箱</td>
<td>同上</td>
<td><strong>开启</strong>&quot;允许通过邮箱登录&quot;</td>
</tr>
</tbody></table>
<h3>5.2 清理活跃会话</h3>
<ol>
<li>Settings → Devices → Terminate All Other Devices</li>
<li>留下当前设备，其他全部踢出</li>
<li><strong>包括 Telega 那个会话</strong>——它不加密云端同步</li>
</ol>
<h3>5.3 备份二次验证密码</h3>
<ul>
<li><strong>不要</strong>只记在脑子里</li>
<li>用 1Password / Bitwarden / Apple 钥匙串管理</li>
<li>同时手写一份在<strong>物理笔记本</strong>（极端情况，账号比设备值钱）</li>
</ul>
<h3>5.4 解除 +86 限制（可选）</h3>
<p>如果你能搞到非 +86 的海外号码（Google Voice / TextNow 等），可以把 Telegram 主号换成海外号。<strong>86 号码触发付费验证码的概率显著高于其他号段</strong>。</p>
<hr>
<h2>六、关键点回顾</h2>
<table>
<thead>
<tr>
<th>关键点</th>
<th>错误做法</th>
<th>正确做法</th>
</tr>
</thead>
<tbody><tr>
<td>客户端选择</td>
<td>用官方 Telegram 死磕</td>
<td>用第三方 Telega（特定版本）</td>
</tr>
<tr>
<td>登录方式</td>
<td>等手机短信</td>
<td><strong>走邮箱 + 2FA 通道</strong></td>
</tr>
<tr>
<td>前置条件</td>
<td>假设只要手机号</td>
<td><strong>手机号 + 邮箱 + 2FA 密码三件套</strong></td>
</tr>
<tr>
<td>找回后</td>
<td>继续用 Telega</td>
<td>切回官方 Telegram，更新到最新版</td>
</tr>
<tr>
<td>二次验证</td>
<td>不开 / 忘记密码</td>
<td><strong>必须开 + 密码管理器保存</strong></td>
</tr>
<tr>
<td>APK 来源</td>
<td>群组里随便下</td>
<td>找博主/可信社区获取<strong>验证过可用版本</strong></td>
</tr>
</tbody></table>
<hr>
<h2>七、写在最后</h2>
<p>这套方案本质上利用了 Telegram 客户端协议的<strong>冗余登录通道</strong>——同一个账号支持手机号、邮箱、二维码、2FA 密码等多种方式登录。当主通道（手机短信）被封死时，备用通道（邮箱 + 2FA）依然可以工作。<strong>前提是你在账号&quot;健康&quot;的时候就把这些通道都打开</strong>。</p>
<p>如果你现在<strong>还没遇到这个问题</strong>，强烈建议立即做两件事：</p>
<ol>
<li>检查 Telegram 的二次验证是否开启</li>
<li>检查邮箱是否绑定且可用</li>
</ol>
<p>等到手机真的摔坏、号码真的停机再做就来不及了。</p>
<hr>
<h2>常见问题 FAQ</h2>
<h3>为什么 86 号码登录 Telegram 提示要付费验证码？</h3>
<p>Telegram 出于反垃圾和反黑产考虑，对<strong>被滥用过的号段</strong>（包括部分 +86 虚拟号段、二手回收号段）强制走付费短信验证。<strong>这不是你的账号问题，是号段问题</strong>。普通 86 手机号触发概率较低，但确实存在。<strong>解决方法是用 Telega 走邮箱 + 2FA 通道</strong>绕开。</p>
<h3>没有二次验证密码可以用这个方法吗？</h3>
<p><strong>不能</strong>。二次验证密码是这套方法的核心——它替代了&quot;手机短信&quot;这个被卡住的验证环节。<strong>如果你没开二次验证</strong>，只能走 Telegram 官方支持（回复极慢，通常 1-3 个月），或者用付费短信（不划算且有时也收不到）。</p>
<h3>邮箱没绑定怎么找回？</h3>
<p><strong>几乎无法找回</strong>。Telegram 在注册时强烈建议绑定邮箱，但很多人没做。这种情况下的选项：</p>
<ol>
<li>提交 <a href="https://telegram.org/support">Telegram 账号支持表单</a>，说明情况，等回复</li>
<li>找一台<strong>曾经登录过这个账号的设备</strong>（旧手机、平板、桌面端），重新激活后导出聊天记录</li>
<li>放弃账号，重新注册（<strong>聊天记录会全部丢失</strong>）</li>
</ol>
<p>强烈建议<strong>现在就去 Telegram 设置里检查邮箱是否绑定</strong>。</p>
<h3>Telega 安全吗？会不会泄露聊天记录？</h3>
<p>Telega 是开源的第三方 Telegram 客户端（基于 TDLib），<strong>不经过任何中转服务器</strong>——它直接连接 Telegram 官方 API。<strong>聊天记录加密方式和官方客户端一样</strong>。但因为是非官方客户端：</p>
<ul>
<li>✅ Telegram 协议层面安全</li>
<li>⚠️ 应用本身的安全性取决于具体版本</li>
<li>⚠️ <strong>不要用网上随意下载的版本</strong>——找可信来源</li>
</ul>
<p>找回账号后<strong>立即切回官方客户端</strong>是更稳妥的做法。</p>
<h3>找回账号后还需要做什么？</h3>
<p>按本文第五章的清单做完整的安全加固：<strong>完善邮箱、开启二次验证、清理活跃会话、备份密码</strong>。<strong>这是避免下次再翻车的关键</strong>。</p>
<h3>这个方法对非 86 号码有效吗？</h3>
<p><strong>有效</strong>。这个方法的本质是<strong>用备用登录通道（邮箱 + 2FA）替代主通道（手机短信）</strong>，对所有号段都适用。<strong>+86 号码触发付费验证码的问题更严重</strong>，所以这套方法在 86 用户中需求最高。</p>
<h3>Telega 客户端在哪里下载？</h3>
<p><strong>不建议在公开渠道随意下载</strong>。网传的&quot;最新版&quot;90% 都触发了 Google Play 校验检测，安装后用不了。<strong>建议找已经验证过可用版本号的博主或社区获取</strong>。本文作者也提供当前可用版本（<strong>找我要 APK</strong>），留言或私信即可。</p>
<h3>登录后看到&quot;This account is banned&quot;怎么办？</h3>
<p>这是账号被封禁，和登录通道无关。<strong>Telegram 封禁通常基于手机号</strong>，而不是设备。解决方法：</p>
<ol>
<li>提交申诉：<a href="https://telegram.org/support">https://telegram.org/support</a></li>
<li>等官方回复（<strong>可能几小时到几周</strong>）</li>
<li>如果申诉无果，<strong>只能换号重新注册</strong>（聊天记录会丢失）</li>
</ol>
]]></content:encoded>
    <category>工具教程</category>
    <category>Telegram</category>
    <category>86手机号</category>
    <category>账号找回</category>
    <category>二次验证</category>
    <category>短信收费</category>
  </item>
  <item>
    <title>从零到一：我的独立开发之路</title>
    <link>https://apppss.com/writing/indie-developer-journey/</link>
    <guid isPermaLink="true">https://apppss.com/writing/indie-developer-journey/</guid>
    <pubDate>Fri, 15 May 2026 00:00:00 GMT</pubDate>
    <author>panic3170@gmail.com (王叔走都是上坡)</author>
    <description><![CDATA[2023年初，我做出了一个重要决定：离开稳定的工作，成为一名独立开发者。这个决定并非一时冲动，而是经过深思熟虑的结果。]]></description>
    <content:encoded><![CDATA[<h1>从零到一：我的独立开发之路</h1>
<h2>为什么选择独立开发</h2>
<p>2023年初，我做出了一个重要决定：离开稳定的工作，成为一名独立开发者。这个决定并非一时冲动，而是经过深思熟虑的结果。</p>
<p>在大公司工作的几年里，我积累了丰富的技术经验，参与了多个大型项目的开发。但随着时间推移，我越来越渴望更大的创作自由，想要打造真正属于自己的产品。</p>
<h2>第一个产品的诞生</h2>
<p>独立后的前三个月，我专注于开发第一款产品 TaskFlow。这是一个任务管理应用，灵感来源于我自己的需求。在开发过程中，我学到了很多：</p>
<h3>技术选型</h3>
<ul>
<li>选择了 React Native，因为需要同时支持 iOS 和 Android</li>
<li>使用 Firebase 作为后端，快速实现功能</li>
<li>采用 TypeScript，提高代码质量</li>
</ul>
<h3>产品设计</h3>
<p>最初的版本很简单，只有基础的任务管理功能。但我注重细节，确保每个交互都流畅自然。这种对用户体验的执着，后来成为产品的核心竞争力。</p>
<h2>第一批用户</h2>
<p>产品上线后，我通过 Product Hunt、Twitter 和技术社区进行推广。最初的用户增长很慢，第一周只有不到100个下载。</p>
<p>但我没有气馁，而是积极收集用户反馈，快速迭代。每当收到用户的建议，我都会认真考虑，尽快实现合理的需求。</p>
<h2>突破与成长</h2>
<p>三个月后，TaskFlow 的用户数突破了 1000。这个里程碑对我意义重大，证明了产品的价值。</p>
<p>随后的发展更加顺利：</p>
<ul>
<li>6个月：5000 用户</li>
<li>1年：10000+ 用户</li>
<li>开始有稳定的收入来源</li>
</ul>
<h2>经验总结</h2>
<p>这一年的独立开发经历让我收获颇丰：</p>
<ol>
<li><strong>产品思维</strong>：从用户需求出发，而不是技术驱动</li>
<li><strong>快速迭代</strong>：先发布最小可行产品，再逐步完善</li>
<li><strong>持续学习</strong>：独立开发者需要掌握全栈技能</li>
<li><strong>营销推广</strong>：好产品也需要好的推广策略</li>
<li><strong>心态调整</strong>：接受失败，从错误中学习</li>
</ol>
<h2>未来展望</h2>
<p>未来，我计划继续深耕独立开发领域，推出更多有价值的产品。同时，我也希望通过写作和分享，帮助更多想要转型的开发者。</p>
<p>如果你也有独立开发的想法，欢迎与我交流！</p>
]]></content:encoded>
    <category>创业人生</category>
    <category>独立开发</category>
    <category>创业</category>
    <category>个人成长</category>
  </item>
  <item>
    <title>Vue 3 Composition API 完全指南</title>
    <link>https://apppss.com/writing/vue3-composition-api/</link>
    <guid isPermaLink="true">https://apppss.com/writing/vue3-composition-api/</guid>
    <pubDate>Tue, 28 Apr 2026 00:00:00 GMT</pubDate>
    <author>panic3170@gmail.com (王叔走都是上坡)</author>
    <description><![CDATA[Composition API 是 Vue 3 引入的一组基于函数的 API，它允许我们使用函数来组织组件逻辑，而不是选项对象。]]></description>
    <content:encoded><![CDATA[<h1>Vue 3 Composition API 完全指南</h1>
<h2>什么是 Composition API</h2>
<p>Composition API 是 Vue 3 引入的一组基于函数的 API，它允许我们使用函数来组织组件逻辑，而不是选项对象。</p>
<h2>为什么需要 Composition API</h2>
<h3>解决选项式 API 的痛点</h3>
<ol>
<li><strong>逻辑复用困难</strong>：在选项式 API 中，逻辑分散在不同的选项中</li>
<li><strong>类型推断不足</strong>：TypeScript 支持不够完善</li>
<li><strong>代码组织受限</strong>：相关逻辑必须分散在不同部分</li>
</ol>
<h2>核心概念</h2>
<h3>ref 和 reactive</h3>
<p><code>ref</code> 用于创建响应式的基本类型数据：</p>
<pre><code class="language-typescript">import { ref } from &#39;vue&#39;

const count = ref(0)
console.log(count.value) // 0
count.value++
console.log(count.value) // 1
</code></pre>
<p><code>reactive</code> 用于创建响应式的对象：</p>
<pre><code class="language-typescript">import { reactive } from &#39;vue&#39;

const state = reactive({
  count: 0,
  name: &#39;Vue&#39;
})
</code></pre>
<h3>computed</h3>
<p>计算属性是基于它们的响应式依赖进行缓存的：</p>
<pre><code class="language-typescript">import { ref, computed } from &#39;vue&#39;

const firstName = ref(&#39;John&#39;)
const lastName = ref(&#39;Doe&#39;)

const fullName = computed(() =&gt; {
  return `${firstName.value} ${lastName.value}`
})
</code></pre>
<h3>watch 和 watchEffect</h3>
<p><code>watch</code> 用于观察特定的响应式数据源：</p>
<pre><code class="language-typescript">import { ref, watch } from &#39;vue&#39;

const count = ref(0)
watch(count, (newVal, oldVal) =&gt; {
  console.log(`count changed from ${oldVal} to ${newVal}`)
})
</code></pre>
<p><code>watchEffect</code> 会自动追踪依赖：</p>
<pre><code class="language-typescript">import { ref, watchEffect } from &#39;vue&#39;

const count = ref(0)
watchEffect(() =&gt; {
  console.log(`count is ${count.value}`)
})
</code></pre>
<h2>最佳实践</h2>
<h3>逻辑复用</h3>
<p>使用组合式函数来复用逻辑：</p>
<pre><code class="language-typescript">// useCounter.ts
import { ref } from &#39;vue&#39;

export function useCounter(initialValue = 0) {
  const count = ref(initialValue)
  
  const increment = () =&gt; count.value++
  const decrement = () =&gt; count.value--
  const reset = () =&gt; count.value = initialValue
  
  return {
    count,
    increment,
    decrement,
    reset
  }
}
</code></pre>
<h3>代码组织</h3>
<p>按功能组织代码，而不是按选项类型：</p>
<pre><code class="language-typescript">// 搜索相关逻辑
const searchQuery = ref(&#39;&#39;)
const searchResults = ref([])

// 分页相关逻辑
const currentPage = ref(1)
const pageSize = ref(10)
</code></pre>
<h2>总结</h2>
<p>Composition API 为 Vue 带来了更灵活的代码组织方式和更好的类型支持。掌握它可以让你写出更优雅、更可维护的 Vue 代码。</p>
]]></content:encoded>
    <category>技术教程</category>
    <category>Vue</category>
    <category>JavaScript</category>
    <category>前端</category>
  </item>
  <item>
    <title>React Native 性能优化实战</title>
    <link>https://apppss.com/writing/react-native-performance/</link>
    <guid isPermaLink="true">https://apppss.com/writing/react-native-performance/</guid>
    <pubDate>Wed, 15 Apr 2026 00:00:00 GMT</pubDate>
    <author>panic3170@gmail.com (王叔走都是上坡)</author>
    <description><![CDATA[在开发 React Native 应用时，我们经常会遇到以下性能问题：]]></description>
    <content:encoded><![CDATA[<h1>React Native 性能优化实战</h1>
<h2>性能问题的常见表现</h2>
<p>在开发 React Native 应用时，我们经常会遇到以下性能问题：</p>
<ol>
<li><strong>界面卡顿</strong>：列表滚动不流畅</li>
<li><strong>启动时间长</strong>：应用打开需要等待</li>
<li><strong>内存泄漏</strong>：应用运行一段时间后崩溃</li>
<li><strong>帧率下降</strong>：动画不流畅</li>
</ol>
<h2>列表优化</h2>
<h3>使用 FlatList 而非 ScrollView</h3>
<p>FlatList 是高性能的列表组件，它会按需渲染可见的项：</p>
<pre><code class="language-jsx">&lt;FlatList
  data={data}
  renderItem={({ item }) =&gt; &lt;ListItem item={item} /&gt;}
  keyExtractor={item =&gt; item.id}
/&gt;
</code></pre>
<h3>优化 renderItem</h3>
<p>确保 renderItem 返回的组件是纯组件：</p>
<pre><code class="language-jsx">const ListItem = React.memo(({ item }) =&gt; {
  return &lt;View style={styles.item}&gt;
    &lt;Text&gt;{item.title}&lt;/Text&gt;
  &lt;/View&gt;
})
</code></pre>
<h2>图片优化</h2>
<h3>使用合适的图片格式</h3>
<ul>
<li>对于图标，使用 SVG</li>
<li>对于照片，使用 WebP 格式</li>
<li>压缩图片大小</li>
</ul>
<h3>使用 FastImage</h3>
<p>FastImage 是一个高性能的图片加载库：</p>
<pre><code class="language-jsx">import FastImage from &#39;react-native-fast-image&#39;

&lt;FastImage
  source={{
    uri: &#39;https://example.com/image.jpg&#39;,
    headers: { Authorization: &#39;someAuthToken&#39; },
  }}
  style={{ width: 200, height: 200 }}
  resizeMode={FastImage.resizeMode.contain}
/&gt;
</code></pre>
<h2>内存管理</h2>
<h3>清理定时器和监听器</h3>
<p>在组件卸载时清理：</p>
<pre><code class="language-jsx">useEffect(() =&gt; {
  const timer = setInterval(() =&gt; {
    // do something
  }, 1000)
  
  return () =&gt; clearInterval(timer)
}, [])
</code></pre>
<h3>避免内存泄漏</h3>
<p>确保正确处理异步操作：</p>
<pre><code class="language-jsx">useEffect(() =&gt; {
  let isMounted = true
  
  fetchData().then(data =&gt; {
    if (isMounted) {
      setData(data)
    }
  })
  
  return () =&gt; {
    isMounted = false
  }
}, [])
</code></pre>
<h2>总结</h2>
<p>性能优化是一个持续的过程，需要不断地监测和改进。通过以上方法，可以显著提升 React Native 应用的性能。</p>
]]></content:encoded>
    <category>技术教程</category>
    <category>React Native</category>
    <category>性能</category>
    <category>移动端</category>
  </item>
  <item>
    <title>期货交易的七条铁律：从亏损到稳定盈利的思考</title>
    <link>https://apppss.com/writing/futures-trading-seven-rules/</link>
    <guid isPermaLink="true">https://apppss.com/writing/futures-trading-seven-rules/</guid>
    <pubDate>Fri, 20 Mar 2026 00:00:00 GMT</pubDate>
    <author>panic3170@gmail.com (王叔走都是上坡)</author>
    <description><![CDATA[做期货这几年，踩过的坑、爆过的仓、熬过的夜，最终都沉淀成这七条心得。期货交易本质上不是预测行情，而是管理自己。以下每一条都是真金白银换来的，建议反复读、慢慢悟。]]></description>
    <content:encoded><![CDATA[<h1>期货交易的七条铁律：从亏损到稳定盈利的思考</h1>
<p>做期货这几年，踩过的坑、爆过的仓、熬过的夜，最终都沉淀成这七条心得。<strong>期货交易本质上不是预测行情，而是管理自己</strong>。以下每一条都是真金白银换来的，建议反复读、慢慢悟。</p>
<hr>
<h2>一、大部分时间都是在等待信号</h2>
<p>交易最反直觉的一件事：<strong>80% 的时间，你应该什么都不做</strong>。</p>
<p>市场每天都有波动，但<strong>真正值得出手的信号屈指可数</strong>。很多人亏损的根本原因不是技术不行，而是<strong>手痒</strong>——看到一根阳线就追，看到一个消息就冲，结果频繁交易、手续费亏一大堆、胜率被拉得很低。</p>
<h3>实战做法</h3>
<ul>
<li><strong>提前写好交易计划</strong>：什么形态进场、什么情况止损、目标位在哪</li>
<li><strong>没有信号就空仓</strong>：哪怕空仓一周、一个月，也比乱开仓强</li>
<li><strong>每天复盘 1 小时，盯盘 10 分钟</strong>：大部分盯盘时间都是在和自己的情绪作斗争</li>
</ul>
<blockquote>
<p><strong>市场永远不缺机会，缺的是耐心和纪律。</strong></p>
</blockquote>
<hr>
<h2>二、一定不要抗单，及时止损</h2>
<p>这是<strong>期货交易的第一铁律</strong>，没有之一。</p>
<p>抗单的本质是什么？<strong>是拒绝承认错误，是用&quot;希望&quot;代替&quot;事实&quot;</strong>。当行情反向运行时，你心里清楚这笔单子错了，但就是不愿意平仓——&quot;再等等，可能会反弹&quot;、&quot;已经亏这么多了，砍了太可惜&quot;。</p>
<p>结果呢？<strong>小亏拖成大亏，大亏拖到爆仓</strong>。</p>
<h3>止损的核心原则</h3>
<table>
<thead>
<tr>
<th>原则</th>
<th>含义</th>
</tr>
</thead>
<tbody><tr>
<td><strong>进场前定好止损位</strong></td>
<td>不到位置不进场，到了位置坚决砍</td>
</tr>
<tr>
<td><strong>止损幅度 ≤ 单笔可承受亏损的 1-2%</strong></td>
<td>比如 10 万本金，单笔最多亏 1000-2000 元</td>
</tr>
<tr>
<td><strong>止损后不立刻反手</strong></td>
<td>错了就错了，市场不缺下一次机会</td>
</tr>
<tr>
<td><strong>不接受&quot;等等看&quot;</strong></td>
<td>一旦到止损位，<strong>机械执行</strong>，不留任何商量余地</td>
</tr>
</tbody></table>
<blockquote>
<p><strong>止损是把小错变成可控成本，不止损是把小错变成致命伤。</strong></p>
</blockquote>
<hr>
<h2>三、顺应趋势</h2>
<p><strong>趋势是你的朋友，永远不要和趋势作对</strong>。</p>
<p>这句话听起来像废话，但真正做起来极难。逆势交易有几个典型表现：</p>
<ul>
<li>下跌趋势中抄底&quot;摸顶&quot;</li>
<li>在均线下方反复做多</li>
<li>&quot;我觉得已经跌得够多了，该反弹了&quot;</li>
</ul>
<p><strong>事实是：你觉得，和市场觉得，是两回事。</strong></p>
<h3>顺势的几个判断方法</h3>
<ol>
<li><strong>看大周期定方向</strong>：日线级别是上涨，就只做多；是下跌，就只做空（或观望）</li>
<li><strong>均线系统</strong>：价格在 20 日均线上方，视为多头趋势；下方视为空头趋势</li>
<li><strong>高低点抬升 / 下降</strong>：上涨趋势的回调低点一个比一个高；下跌趋势的反抽高点一个比一个低</li>
<li><strong>不预测顶底</strong>：趋势没破就持有，破位就离场</li>
</ol>
<blockquote>
<p><strong>趋势什么时候结束？等市场告诉你，不要替市场决定。</strong></p>
</blockquote>
<hr>
<h2>四、如果有盈利，调整为移动止损</h2>
<p>这是<strong>让利润奔跑</strong>的关键技巧。</p>
<p>很多新手的问题是：<strong>盈利了拿不住，亏损了死扛</strong>——典型的&quot;赚小亏大&quot;，长期下来必亏。</p>
<h3>移动止损的做法</h3>
<p>进场后，<strong>先设好初始止损位</strong>（保护本金）。当行情朝着有利方向运行超过一定幅度后，<strong>把止损位移动到成本价</strong>（保本），然后随着行情继续推进，<strong>不断把止损位向上/向下移动</strong>。</p>
<p><strong>举个例子（做多）</strong>：</p>
<ul>
<li>入场价 100，止损 95（亏 5 个点）</li>
<li>涨到 110，止损移到 100（保本）</li>
<li>涨到 120，止损移到 110（锁定 10 个点盈利）</li>
<li>涨到 130，止损移到 120（锁定 20 个点盈利）</li>
<li>直到被打掉出场</li>
</ul>
<p>这样<strong>最坏的结果是小赚，好的结果是大赚</strong>。</p>
<blockquote>
<p><strong>移动止损的本质是：让市场决定你赚多少，而不是你主观猜顶。</strong></p>
</blockquote>
<hr>
<h2>五、如果跟上趋势，要有拿得住的勇气</h2>
<p>这一条和上一条是配套的。<strong>会止损是入门，能拿住单子才是进阶</strong>。</p>
<p>很多人在趋势初期赚了点钱，结果一个回调就被吓出来，然后眼睁睁看着行情继续走几百点——<strong>&quot;我曾经拥有过，最后却没能拿住&quot;</strong>。</p>
<h3>拿不住单子的根本原因</h3>
<ul>
<li><strong>仓位太重</strong>：一个正常回调就让你心理崩溃</li>
<li><strong>盯盘太紧</strong>：每一秒的波动都在冲击你的情绪</li>
<li><strong>没有移动止损</strong>：每次回调都担心利润回吐</li>
<li><strong>缺乏对趋势的信仰</strong>：不相信自己的判断</li>
</ul>
<h3>解决方法</h3>
<ol>
<li><strong>降低仓位</strong>：永远只拿让你&quot;睡得着觉&quot;的仓位</li>
<li><strong>少看盘</strong>：每天只看 2-3 次收盘价，不要看实时波动</li>
<li><strong>日线定方向，小时线找入场</strong>：大周期坚定持有</li>
<li><strong>想清楚最坏情况</strong>：进场前就想清楚&quot;如果错了亏多少&quot;，想清楚了就不怕</li>
</ol>
<blockquote>
<p><strong>趋势的利润是坐出来的，不是做出来的。</strong></p>
</blockquote>
<hr>
<h2>六、多分析基本面和技术面结合，一定要深入一个品种的全链路</h2>
<p>很多交易者亏钱，是因为<strong>只看一个面</strong>：</p>
<ul>
<li>只看技术面：被假突破、消息面打脸</li>
<li>只看基本面：忽略入场点位，扛单扛到爆仓</li>
</ul>
<p><strong>真正能稳定盈利的人，都是基本面 + 技术面双修</strong>。</p>
<h3>基本面要研究什么</h3>
<table>
<thead>
<tr>
<th>维度</th>
<th>关键问题</th>
</tr>
</thead>
<tbody><tr>
<td><strong>供需关系</strong></td>
<td>产量、库存、消费、出口数据</td>
</tr>
<tr>
<td><strong>季节性规律</strong></td>
<td>农产品有明显的种植/收获周期</td>
</tr>
<tr>
<td><strong>政策面</strong></td>
<td>限产、补贴、关税、环保政策</td>
</tr>
<tr>
<td><strong>宏观环境</strong></td>
<td>美元指数、利率、汇率、大宗商品周期</td>
</tr>
<tr>
<td><strong>产业链利润</strong></td>
<td>上游成本、下游需求、产业链各环节的博弈</td>
</tr>
</tbody></table>
<h3>为什么要&quot;深入一个品种&quot;？</h3>
<p><strong>期货品种太多了，螺纹钢、豆粕、原油、黄金、白银……每个品种都有完全不同的&quot;性格&quot;</strong>。</p>
<ul>
<li><strong>新手最常见的错误</strong>：今天做这个，明天做那个，每个品种都只懂皮毛</li>
<li><strong>正确做法</strong>：<strong>选定 1-2 个你最熟悉、最有资源的品种</strong>，深入研究 2-3 年</li>
</ul>
<p><strong>研究透了什么</strong>：</p>
<ul>
<li>这个品种的旺季淡季是什么时候</li>
<li>历史上大的行情是怎么启动的</li>
<li>主要的矛盾点（供需缺口、库存周期）通常出现在什么时间窗口</li>
<li>主力资金的习惯（产业资金、套保盘、投机资金的博弈）</li>
</ul>
<blockquote>
<p><strong>广撒网不如深挖井。精通一个品种，远胜于浅尝十个品种。</strong></p>
</blockquote>
<hr>
<h2>七、调整好心态</h2>
<p><strong>最后一条，也是最难的一条</strong>。</p>
<p>技术可以学，方法可以练，但<strong>心态只能悟</strong>。期货交易到最后，拼的不是谁技术好，而是<strong>谁的情绪更稳定</strong>。</p>
<h3>心态崩盘的典型场景</h3>
<ul>
<li><strong>连续亏损后</strong>：急于翻本，重仓出击 → <strong>爆仓</strong></li>
<li><strong>连续盈利后</strong>：过度自信，放大杠杆 → <strong>吐回去</strong></li>
<li><strong>重仓被套后</strong>：睡不着、吃不下、影响工作生活 → <strong>心态彻底崩溃</strong></li>
<li><strong>错过行情后</strong>：FOMO（害怕错过）情绪主导，乱开仓 → <strong>亏损</strong></li>
</ul>
<h3>调整心态的实战方法</h3>
<ol>
<li><strong>把交易当成一份普通工作</strong>：每天按时看盘、复盘、休息，不要把它当成赌博</li>
<li><strong>设置单日/单周亏损上限</strong>：到了就停手，关掉软件出去走走</li>
<li><strong>保持交易之外的生活</strong>：运动、读书、社交，<strong>别让交易成为你生活的全部</strong></li>
<li><strong>接受&quot;不完美&quot;</strong>：不可能每笔都对，<strong>稳定盈利的关键是&quot;赚的时候多赚，亏的时候少亏&quot;</strong></li>
<li><strong>写下交易日记</strong>：每笔单子进场前想什么、进场后情绪如何、最后为什么出场——<strong>长期复盘会让你看清自己</strong></li>
<li><strong>相信时间复利</strong>：10 万做到 100 万不是一年完成的，是 3-5 年稳定小赚积累的</li>
</ol>
<blockquote>
<p><strong>市场专治各种不服。真正的高手，都是&quot;心很平&quot;的人。</strong></p>
</blockquote>
<hr>
<h2>写在最后</h2>
<p>期货交易是一场<strong>和自己的人性弱点</strong>的战斗。</p>
<ul>
<li>贪婪 → 让你重仓、让你不止盈</li>
<li>恐惧 → 让你拿不住单子、让你在底部割肉</li>
<li>急躁 → 让你频繁交易、让你追涨杀跌</li>
<li>侥幸 → 让你不止损、让你和&quot;应该&quot;做对的事对着干</li>
</ul>
<p><strong>这七条心得，每一条都对应一种人性弱点</strong>。当你真的能做到&quot;大部分时间等待、严格止损、顺势而为、移动止损、拿得住单子、深耕一个品种、心态平和&quot;，你就会发现——</p>
<blockquote>
<p><strong>稳定盈利不是奇迹，是纪律的副产品。</strong></p>
</blockquote>
<hr>
<h2>常见问题 FAQ</h2>
<h3>新手应该用多少仓位？</h3>
<p><strong>1-2% 原则</strong>：单笔交易的最大亏损，<strong>不超过账户总资金的 1-2%</strong>。</p>
<p>举例：10 万账户，单笔最多亏 1000-2000 元。如果止损位 1000 元，仓位就开 1-2 手（合约价值 / 止损幅度 = 仓位）。</p>
<p><strong>新手建议</strong>：从 0.5 手、甚至 0.1 手开始，<strong>用最少的钱买经验</strong>。等连续 3 个月稳定盈利了，再逐步加仓。</p>
<h3>止损设多少个点合适？</h3>
<p><strong>没有标准答案</strong>，取决于：</p>
<ul>
<li><strong>品种波动率</strong>：螺纹钢、原油波动大，止损要宽；豆粕、白银波动小，止损可以窄</li>
<li><strong>持仓周期</strong>：日内短线 5-15 个点；波段 30-100 个点；趋势跟踪 100-500 个点</li>
<li><strong>账户资金</strong>：单笔亏损 ≤ 1-2% 倒推止损幅度</li>
</ul>
<p><strong>实战建议</strong>：</p>
<ul>
<li>进场前用 <strong>ATR（平均真实波幅）</strong> 指标衡量近期波动</li>
<li>止损位 = 入场价 ± (1.5 × ATR)</li>
<li>这样能过滤掉大部分正常波动，又能在趋势反转时及时出场</li>
</ul>
<h3>一天交易几次合适？</h3>
<p><strong>高手一天可能只交易 0-1 次</strong>。</p>
<p>频繁交易是亏损的根源之一。每次交易都有手续费、滑点、情绪消耗。即使胜率 50%，频繁交易的手续费也会吃掉所有利润。</p>
<p><strong>判断标准</strong>：</p>
<ul>
<li>一周交易 3-5 次：合理</li>
<li>一天交易 5+ 次：过度交易</li>
<li>一天交易 10+ 次：必亏</li>
</ul>
<p><strong>改掉频繁交易的技巧</strong>：</p>
<ul>
<li>设单日最大亏损额度（亏 1000 元就关软件）</li>
<li>没信号就关掉行情软件</li>
<li>把&quot;交易次数&quot;列入复盘指标</li>
</ul>
<h3>趋势跟踪的胜率是不是很低？</h3>
<p><strong>是的，通常 30-40%</strong>。</p>
<p>趋势跟踪的核心是&quot;<strong>截断亏损，让利润奔跑</strong>&quot;：</p>
<ul>
<li>胜率低（30-40%）但<strong>盈亏比高</strong>（平均盈利 / 平均亏损 ≥ 2:1）</li>
<li>10 笔单子：3 笔赚 20%，7 笔亏 5%</li>
<li>最终收益：3×20% - 7×5% = 60% - 35% = <strong>+25%</strong></li>
</ul>
<p><strong>为什么这种策略能稳定盈利？</strong></p>
<ul>
<li>抓到大趋势一次，盈利能覆盖多次小亏损</li>
<li>心理负担小，规则明确，可复制</li>
<li>不需要&quot;高胜率&quot;也能赚钱</li>
</ul>
<h3>怎么判断趋势结束了？</h3>
<p><strong>三个核心信号</strong>：</p>
<ol>
<li><strong>关键位突破失败</strong>：上涨趋势中，价格多次上攻前高失败 → 趋势可能反转</li>
<li><strong>均线拐头</strong>：5 日均线、20 日均线死叉，且价格跌破 20 日均线</li>
<li><strong>结构破坏</strong>：上涨趋势的回调低点一个比一个高，突然出现&quot;低点下移&quot; → 趋势结束</li>
</ol>
<p><strong>不要猜顶底</strong>：用规则替代主观判断，<strong>让市场告诉你答案</strong>。</p>
<h3>如何调整交易心态？</h3>
<p><strong>6 个实战方法</strong>：</p>
<ol>
<li><strong>每天运动 30 分钟</strong>：交易是脑力劳动，身体是本钱</li>
<li><strong>冥想 / 呼吸练习</strong>：连续亏损时，闭眼深呼吸 5 分钟</li>
<li><strong>设置&quot;禁交易&quot;日</strong>：每周至少 1 天完全不看盘</li>
<li><strong>写交易日记</strong>：每笔单子记录&quot;为什么进场&quot;、&quot;出场时情绪如何&quot;</li>
<li><strong>找交易伙伴</strong>：互相监督，分享心得（但不要过度讨论行情）</li>
<li><strong>接受&quot;亏损是成本&quot;</strong>：没有 100% 胜率的策略，亏损是交学费</li>
</ol>
<p><strong>心态崩盘的信号</strong>：连续 3 笔亏损后加大仓位、报复性交易、失眠、影响工作生活。<strong>出现这些信号必须强制休息</strong>。</p>
<h3>资金管理有多重要？</h3>
<p><strong>资金管理 &gt; 入场点位 &gt; 选品种</strong>。</p>
<p>很多新手花 80% 精力研究入场信号，但<strong>真正的胜负在资金管理</strong>：</p>
<ul>
<li>同样 50% 胜率的策略：<ul>
<li>好的资金管理 → 稳定盈利</li>
<li>差的资金管理 → 必爆仓</li>
</ul>
</li>
</ul>
<p><strong>核心规则</strong>：</p>
<ul>
<li>单笔亏损 ≤ 1-2%</li>
<li>同时持仓不超过 3 个品种</li>
<li>总仓位不超过 50%（永远不要满仓）</li>
<li>连续亏损 3 笔后减半仓位</li>
</ul>
<p><strong>完。</strong></p>
]]></content:encoded>
    <category>交易心得</category>
    <category>期货交易</category>
    <category>交易心得</category>
    <category>交易思维</category>
    <category>止损</category>
    <category>趋势跟踪</category>
    <category>心法</category>
  </item>
  <item>
    <title>Git 工作流最佳实践</title>
    <link>https://apppss.com/writing/git-workflow-best-practices/</link>
    <guid isPermaLink="true">https://apppss.com/writing/git-workflow-best-practices/</guid>
    <pubDate>Tue, 10 Mar 2026 00:00:00 GMT</pubDate>
    <author>panic3170@gmail.com (王叔走都是上坡)</author>
    <description><![CDATA[这是一个经典的分支模型：]]></description>
    <content:encoded><![CDATA[<h1>Git 工作流最佳实践</h1>
<h2>分支策略</h2>
<h3>Git Flow</h3>
<p>这是一个经典的分支模型：</p>
<ul>
<li><code>main</code>：主分支，存放稳定代码</li>
<li><code>develop</code>：开发分支，集成所有功能</li>
<li><code>feature/*</code>：功能分支，开发新功能</li>
<li><code>release/*</code>：发布分支，准备发布</li>
<li><code>hotfix/*</code>：紧急修复分支</li>
</ul>
<h3>Trunk Based Development</h3>
<p>适合持续集成的简单模型：</p>
<ul>
<li><code>main</code>：唯一的长期分支</li>
<li>功能通过短生命周期的特性分支开发</li>
</ul>
<h2>提交规范</h2>
<h3>使用约定式提交</h3>
<p>格式：<code>&lt;type&gt;(&lt;scope&gt;): &lt;description&gt;</code></p>
<p>常见类型：</p>
<ul>
<li><code>feat</code>：新功能</li>
<li><code>fix</code>：修复 bug</li>
<li><code>docs</code>：文档更新</li>
<li><code>style</code>：代码格式</li>
<li><code>refactor</code>：重构</li>
<li><code>test</code>：测试</li>
<li><code>chore</code>：构建/工具更新</li>
</ul>
<p>示例：<code>feat(auth): add login with Google</code></p>
<h3>保持提交粒度适中</h3>
<ul>
<li>每个提交应该是一个独立的逻辑单元</li>
<li>避免超大提交</li>
<li>避免过于琐碎的提交</li>
</ul>
<h2>代码审查</h2>
<h3>PR 审查流程</h3>
<ol>
<li>创建 PR 时提供清晰的描述</li>
<li>添加相关的测试</li>
<li>至少需要一个 reviewer 批准</li>
<li>使用 CI/CD 自动检查</li>
</ol>
<h3>审查要点</h3>
<ul>
<li>代码正确性</li>
<li>代码质量</li>
<li>性能考虑</li>
<li>安全性</li>
<li>可维护性</li>
</ul>
<h2>总结</h2>
<p>选择适合团队的工作流，并坚持执行，可以显著提高团队的协作效率。</p>
]]></content:encoded>
    <category>开发工具</category>
    <category>Git</category>
    <category>团队协作</category>
    <category>版本控制</category>
  </item>
  <item>
    <title>TypeScript 实用技巧</title>
    <link>https://apppss.com/writing/typescript-tips/</link>
    <guid isPermaLink="true">https://apppss.com/writing/typescript-tips/</guid>
    <pubDate>Wed, 25 Feb 2026 00:00:00 GMT</pubDate>
    <author>panic3170@gmail.com (王叔走都是上坡)</author>
    <description><![CDATA[使用类型守卫来缩小类型范围：]]></description>
    <content:encoded><![CDATA[<h1>TypeScript 实用技巧</h1>
<h2>类型推断</h2>
<h3>类型守卫</h3>
<p>使用类型守卫来缩小类型范围：</p>
<pre><code class="language-typescript">function isString(value: unknown): value is string {
  return typeof value === &#39;string&#39;
}
</code></pre>
<h3>类型断言</h3>
<p>使用 <code>as</code> 进行类型断言：</p>
<pre><code class="language-typescript">const element = document.getElementById(&#39;my-element&#39;) as HTMLElement
</code></pre>
<h2>高级类型</h2>
<h3>泛型</h3>
<p>创建可重用的泛型函数：</p>
<pre><code class="language-typescript">function identity&lt;T&gt;(arg: T): T {
  return arg
}
</code></pre>
<h3>条件类型</h3>
<p>根据条件选择类型：</p>
<pre><code class="language-typescript">type IsString&lt;T&gt; = T extends string ? true : false
</code></pre>
<h3>映射类型</h3>
<p>基于现有类型创建新类型：</p>
<pre><code class="language-typescript">type Readonly&lt;T&gt; = {
  readonly [P in keyof T]: T[P]
}
</code></pre>
<h2>工具类型</h2>
<h3>Partial</h3>
<p>使所有属性变为可选：</p>
<pre><code class="language-typescript">type Partial&lt;T&gt; = {
  [P in keyof T]?: T[P]
}
</code></pre>
<h3>Pick</h3>
<p>选择指定的属性：</p>
<pre><code class="language-typescript">type Pick&lt;T, K extends keyof T&gt; = {
  [P in K]: T[P]
}
</code></pre>
<h3>Omit</h3>
<p>排除指定的属性：</p>
<pre><code class="language-typescript">type Omit&lt;T, K extends keyof T&gt; = Pick&lt;T, Exclude&lt;keyof T, K&gt;&gt;
</code></pre>
<h2>总结</h2>
<p>掌握这些 TypeScript 技巧可以让你写出更类型安全、更优雅的代码。</p>
]]></content:encoded>
    <category>技术教程</category>
    <category>TypeScript</category>
    <category>前端</category>
    <category>编程技巧</category>
  </item>
  </channel>
</rss>