<?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[启动台の小窝]]></title><description><![CDATA[用代码改变世界]]></description><link>https://launchpadx.top</link><image><url>https://launchpadx.top/avatar.png</url><title>启动台の小窝</title><link>https://launchpadx.top</link></image><generator>Yohaku (https://github.com/Innei/Yohaku)</generator><lastBuildDate>Thu, 04 Jun 2026 01:21:19 GMT</lastBuildDate><atom:link href="https://launchpadx.top/feed" rel="self" type="application/rss+xml"/><pubDate>Thu, 04 Jun 2026 01:21:19 GMT</pubDate><language><![CDATA[zh-CN]]></language><item><title><![CDATA[从零开始注册一个 ASN]]></title><description><![CDATA[<link rel="preload" as="image" href="https://fastcdn.candyrect.com/static-resource-v2/2025/09/05/84032b5656e77d0a7785ebb5a19679d8_0790653657588316.png"/><link rel="preload" as="image" href="https://fastcdn.candyrect.com/static-resource-v2/2025/09/05/3c324af1c1509ecbf8ecdedf6ea0dd23_7849846286862868.png"/><link rel="preload" as="image" href="https://fastcdn.candyrect.com/static-resource-v2/2025/09/05/e2ccddb3a925164d020d18867d04186a_4660325501348332.png"/><link rel="preload" as="image" href="https://fastcdn.candyrect.com/static-resource-v2/2025/09/05/1c5461b9cf96352d73772359ea0244f9_1746807730212826.png"/><link rel="preload" as="image" href="https://fastcdn.candyrect.com/static-resource-v2/2025/09/05/589ffca8453be4005f046f52af4465a2_7448559103893337.png"/><link rel="preload" as="image" href="https://fastcdn.candyrect.com/static-resource-v2/2025/09/05/4f3d842dd67f9866b3879bb9f0c09dd4_0312434504987245.png"/><link rel="preload" as="image" href="https://fastcdn.candyrect.com/static-resource-v2/2025/09/05/200d5df2b2f93e58704275313921a3a0_8082678252770097.png"/><div><blockquote>该渲染由 Yohaku API 生成，可能存在排版问题，最佳体验请前往：<a href="https://launchpadx.top/posts/tech/bgp-asn-register-process">https://launchpadx.top/posts/tech/bgp-asn-register-process</a></blockquote><div><blockquote class="markdown-alert-warning"><header>WARNING</header><p>本文作者初次接触公网，可能存在笔误/错误/主观理解。如发现问题，欢迎在评论区指正。</p><p>初次接触 BGP 强烈建议前往 DN42 学习。本文介绍的是互联网实体 ASN 的注册流程。</p><p>如需了解 DN42 中的 ASN 申请流程，请参考 Lan Tian 的 <a href="https://lantian.pub/article/modify-website/dn42-experimental-network-2020.lantian/">DN42 实验网络介绍及注册教程</a>。</p></blockquote>
<h2 id="">基本概念</h2><p>目前公网ASN和IP资源分配由5个区域互联网注册管理机构（Regional Internet registry, RIR） 管理：</p><ul><li><a href="https://afrinic.net">AFRINIC</a>：负责非洲地区<del>（不过已经破产了）</del></li><li><a href="https://www.arin.net">ARIN</a>：负责北美地区</li><li><a href="https://www.lacnic.net">LACNIC</a>：负责拉丁美洲和加勒比海地区</li><li><a href="https://www.ripe.net">RIPE NCC</a>：负责欧洲、中东和中亚地区</li><li><a href="https://apnic.net">APNIC</a>：负责亚太地区</li></ul><p>RIR 不直接面向终端用户提供服务，而是将资源授权给本地互联网注册管理机构（Local Internet Registry, LIR），再由 LIR 授权给终端用户。当然，如果你不想通过 LIR 获取资源并且愿意每年交几千美元作为会费，也可以自己注册成为 RIR 会员直接向 RIR 申请资源。</p><p>在选择 RIR 时，RIPE NCC 受到广泛推荐，主要基于以下三个方面的考虑：</p><ol start="1"><li>成本效益：RIPE NCC 的注册费用相对合理。相比之下，APNIC 的基础费用要高出约 30%，且存在额外的管理成本。</li><li>系统便利性：RIPE NCC 提供完善的在线管理系统，用户可以自主完成进度查询、配置修改等操作。而 APNIC 的部分流程仍依赖邮件沟通，在效率方面相对较低。</li><li>政策稳定性：RIPE NCC 的政策调整较为温和且可预期，这与其他一些区域性机构相比具有明显优势。</li></ol><p>综上所述，基于现有资料分析，RIPE NCC 是个人申请 ASN 较为理想的选择，其次是 APNIC 或 ARIN。</p><h2 id="">准备材料</h2><p>申请 ASN 时，您需要向 LIR 提供以下必要材料（以 RIPE NCC 为例）：</p><h3 id="">身份证明</h3><ul><li>个人：提供身份证或者护照</li><li>企业：提供营业执照或有效的企业注册证明文件</li></ul><p>注：若申请人为未成年人，需要其法定监护人提供书面同意书并履行相应监护职责，如果你不知道同意书怎么写，可以联系你的 LIR。所有提交的文件应确保真实有效，且必须是原件或经过公证的副本。</p><h3 id="">联系信息</h3><ul><li>实体通信地址（用于 WHOIS 数据库登记和 KYC）</li><li>技术运维联系邮箱（NOC Email）</li><li>滥用报告联系邮箱（Abuse Email，可以与上一个相同）</li></ul><h3 id="">技术要求证明</h3><ul><li>位于欧洲区域内的 BGP 服务提供商出具的最近两个月内有效账单或合同（我使用的是 <a href="https://buyvm.net">BuyVM</a>。RIPE NCC 可能会要求提供机房地址和后台截图，请按照要求提供，如果可能，可以提前提供给你的 LIR，以避免耽误时间，<del>我<a href="https://pysio.blog/notes/ac67vtg2pkxj000n">踩过坑了</a>你们就不要踩了</del>）</li><li>至少两个 BGP 上游提供商的 ASN</li></ul><h3 id="-whois-">创建 WHOIS 数据库条目</h3><h4 id="1--ripe-ncc-access-">1. 注册 RIPE NCC Access 账户</h4><p>前往 <a href="https://access.ripe.net/registration">RIPE NCC Access 官网</a> 完成注册，本文不再赘述。</p><h4 id="2--role--maintainer-">2. 创建 role 和 maintainer 对象</h4><p>前往 <a href="https://apps.db.ripe.net/db-web-ui/webupdates/create/RIPE/role/self">RIPE Database - Create role and maintainer pair</a></p><p>role 对象是对由一个或多个人执行的角色的抽象，例如表示您用来处理网络事件的部门。</p><p>mntner 对象是对维护者的抽象，记录了维护者的认证信息。其他对象通过 mnt-by 属性指定对象由哪个维护者管理。</p><p>在创建对象配对时，您需要填写：</p><ul><li>mntner: maintainer 对象的标识符，可包含大小写字母、数字和 _-，例如: LAUNCHPAD-MNT</li><li>role: role 对象的名称，可包含大小写字母、数字和][)(._&quot;*@,&amp;:!&#x27;+/-例如: LaunchPad Network NOC</li><li>address: 此 role 的办公地址</li><li>e-mail: 此 role 的电子邮件联系地址</li></ul><p><img alt="以我的 LAUNCHPAD-MNT 为示例" height="968" src="https://fastcdn.candyrect.com/static-resource-v2/2025/09/05/84032b5656e77d0a7785ebb5a19679d8_0790653657588316.png" width="2748"/></p><p>填写完成后点击 SUBMIT 按钮，将同时创建一个 role 和一个 mntner 对象。<strong>你需要记下 role 对象的主键（nic-hdl）</strong>，后续需要提供给你的 LIR，并在几乎所有对象中使用到。</p><h4 id="3-">3. 设置滥用通知邮箱</h4><blockquote class="markdown-alert-important"><header>IMPORTANT</header><p>RIPE NCC 会周期性检查此邮箱的有效性，务必确保真实可用。</p></blockquote>
<p>在 <a href="https://apps.db.ripe.net/db-web-ui/query">RIPE Database Query</a> 顶部的搜索框中填写上节中 role 对象的主键，点击右侧查找按钮。接下来点击搜索结果右上角的 Update object 按钮跳转至修改页面。</p><p><img src="https://fastcdn.candyrect.com/static-resource-v2/2025/09/05/3c324af1c1509ecbf8ecdedf6ea0dd23_7849846286862868.png"/></p><p>点击 e-mail 栏右侧 + 号按钮为此 role 对象添加 abuse-mailbox 属性。</p><p><img src="https://fastcdn.candyrect.com/static-resource-v2/2025/09/05/e2ccddb3a925164d020d18867d04186a_4660325501348332.png"/></p><p><img src="https://fastcdn.candyrect.com/static-resource-v2/2025/09/05/1c5461b9cf96352d73772359ea0244f9_1746807730212826.png"/></p><p>在出现的 abuse-mailbox 栏中填写滥用通知邮箱后点击 SUBMIT 按钮保存。</p><p><img src="https://fastcdn.candyrect.com/static-resource-v2/2025/09/05/589ffca8453be4005f046f52af4465a2_7448559103893337.png"/></p><h4 id="4--organisation-">4. 创建 organisation 对象</h4><p>organisation 对象是对公司、非营利团体或个人的抽象，所有其他资源都与该对象相关。是管理 RIPE 数据库中数据的起点。</p><p>通过 <a href="https://apps.db.ripe.net/db-web-ui/webupdates/create/RIPE/organisation">RIPE Database - Create organisation</a> 创建 organisation 对象时，您需要填写：</p><ul><li>mnt-by : 由谁管理，默认自动填充此前新建的 mntner 的标识符</li><li>organisation : organisation 对象的标识符，默认填充 AUTO-1 将由系统自动生成标识符</li><li>org-name: 此 organisation 的名称，必须填写组织的法定全称或个人姓名之一</li><li>address : 此 organisation 的联系地址，必须是组织的法定地址或个人住址之一</li><li>e-mail: 此 organisation 的电子邮件联系地址</li><li>abuse-c: 此 organisation 的滥用通知联系方式，必须指向具有 abuse-mailbox 属性的 role 对象</li><li>mnt-ref: 谁可引用此 organisation，被指向的 mntner 可以添加指向此 organisation 的对象，即由谁为此组织分配资源。可以询问您的 LIR 以获得具体值</li></ul><p><img alt="我的 organisation 对象，供参考" src="https://fastcdn.candyrect.com/static-resource-v2/2025/09/05/4f3d842dd67f9866b3879bb9f0c09dd4_0312434504987245.png"/></p><p>填写完后点击 SUBMIT，记下返回的对象标识符，类似于 <code>ORG-XXXX-RIPE</code> 的格式。</p><h4 id="ex--">Ex. 如果刚刚有地方出错了 如何修改？</h4><p>当你发现上面有内容写错的时候，前往 <a href="https://apps.db.ripe.net/db-web-ui/query">RIPE Database Query</a> 搜索你需要修正的对象的主键，点击右上角的 Update object 按钮跳转至修改页面，编辑完成后 SUBMIT 即可。</p><p>如果你不知道你想要修正的对象的主键，或者只是想检查一下，可以通过反向搜索功能，查询由你的 mntner 管理的对象。</p><p><img src="https://fastcdn.candyrect.com/static-resource-v2/2025/09/05/200d5df2b2f93e58704275313921a3a0_8082678252770097.png"/></p><h2 id="-lir-">提交资料至 LIR 并支付费用</h2><p>你需要把以下资料提供给 LIR：</p><ul><li>公司注册证书 / 护照（中国居民身份证）正反面</li><li>RIPE NCC 服务区内的网络活动证明（例如欧洲 VPS 的账单，同时建议随附提供机房地址和后台截图）</li><li>org（第 4 节，organisation 对象标识符）</li><li>admin-c（第 2 节，role 对象主键）</li><li>tech-c（第 2 节，role 对象主键）</li><li>abuse-c（第 2 节，role 对象主键）</li><li>mnt-by（第 2 节，mntner 对象标识符）</li></ul><p>然后根据 LIR 的要求，支付相关费用并等待 RIPE NCC 审核。如果不出意外的话，1-3 个工作日后你就拥有属于自己的 ASN 了！</p><h2 id="">参考资料</h2><ul><li><a href="https://pysio.online/posts/daily/RegistryASN.html">从0开始注册一个ASN并广播IP | Pysio&#x27;s Home</a></li><li><a href="https://www.iyoroy.cn/archives/117/">OneManISP - Ep.1 注册一个ASN | 悠笙の开发日记</a></li></ul></div><p style="text-align:right"><a href="https://launchpadx.top/posts/tech/bgp-asn-register-process#comments">看完了？说点什么呢</a></p></div>]]></description><link>https://launchpadx.top/posts/tech/bgp-asn-register-process</link><guid isPermaLink="true">https://launchpadx.top/posts/tech/bgp-asn-register-process</guid><dc:creator><![CDATA[LaunchPad]]></dc:creator><pubDate>Fri, 05 Sep 2025 06:16:10 GMT</pubDate></item><item><title><![CDATA[如何部署 Tailscale Derper]]></title><description><![CDATA[<div><blockquote>该渲染由 Yohaku API 生成，可能存在排版问题，最佳体验请前往：<a href="https://launchpadx.top/posts/tinker/how-to-deploy-tailscale-derper">https://launchpadx.top/posts/tinker/how-to-deploy-tailscale-derper</a></blockquote><div><p>Tailscale 是一个很方便的组网工具，通过它可以将处在不同网络环境，甚至不同国家地区的设备连接到同一个虚拟局域网中。但官方的 DERP 服务器都在国外，如果无法成功打洞，中转延迟会非常高，我们可以在国内（或者离使用地区最近的地方）部署一个或多个 DERP 服务器来降低中转延迟，提高访问速度。</p><blockquote><p>如果你正在自托管 Headscale，自建 DERP 服务器将是必须的。</p><p>Headscale 自带了内置 DERP 服务器，但我不建议使用它（如果中转流量过大，可能会影响控制信息正常传输）。</p></blockquote>
<h2 id="">准备工作</h2><p>你需要准备一台带有公网 IP 的服务器，并在防火墙中开放<code>TCP 80</code>、<code>TCP 443</code>和<code>UDP 3478</code>端口。你还需要准备一个域名，并将域名解析至服务器。</p><blockquote><p>请注意：如果你计划使用中国大陆的服务器，域名还需要完成 ICP 备案。</p></blockquote>
<h2 id="-golang">安装 Golang</h2><p>在进行下一步前，你需要先在服务器上安装 Golang。具体步骤可以查看 <a href="https://go.dev/doc/install">go.dev</a> 上的说明，本文不再阐述。</p><h2 id="">编译和安装</h2><p>依次执行以下指令：</p><pre class="language-bash lang-bash"><code class="language-bash lang-bash">git clone https://github.com/tailscale/tailscale.git
cd tailscale
go build cmd/derper
sudo mv derper /usr/sbin/derper
</code></pre>
<h2 id="">安装系统服务</h2><p>将以下内容写入 <code>/etc/systemd/system/derper.service</code>：</p><pre class=""><code class="">[Unit]
Description=Derper
Wants=network-pre.target
After=network-pre.target NetworkManager.service systemd-resolved.service

[Service]
ExecStart=/usr/sbin/derper --hostname 将这里换成你提前准备的域名 -a :443 -http-port 80 -certmode letsencrypt --certdir /var/lib/derper/certs
Restart=on-failure

[Install]
WantedBy=multi-user.target
</code></pre>
<p>然后依次执行命令创建数据文件夹、激活和启动服务：</p><pre class="language-bash lang-bash"><code class="language-bash lang-bash">mkdir -p /var/lib/derper
sudo systemctl daemon-reload
sudo systemctl enable derper
sudo systemctl start derper
</code></pre>
<h2 id="-tailscale">配置 Tailscale</h2><h3 id="1--acl">1. 修改 ACL</h3><p>进入 Tailscale 管理后台，选择 Access controls 标签栏，编辑内容：</p><pre class="language-javascript lang-javascript"><code class="language-javascript lang-javascript">{
  // ...
  &quot;grants&quot;: [
    // ...
  ],
  // ...

  // 追加以下信息
  &quot;derpMap&quot;: {
    &quot;Regions&quot;: {
      &quot;900&quot;: {
        &quot;RegionID&quot;: &quot;900&quot;,
        &quot;RegionCode&quot;: &quot;my_derper&quot;,
        &quot;RegionName&quot;: &quot;My Derper&quot;,
        &quot;Nodes&quot;: [
          {
            &quot;Name&quot;: &quot;My Derper&quot;,
            &quot;RegionID&quot;: &quot;900&quot;,
            &quot;HostName&quot;: &quot;将这里换成你提前准备的域名&quot;
          }
        ]
      },

      // 禁用官方 DERP 服务器，如果不需要可以不写
      &quot;1&quot;: null,
      &quot;2&quot;: null,
      &quot;3&quot;: null,
      &quot;4&quot;: null,
      &quot;5&quot;: null,
      &quot;6&quot;: null,
      &quot;7&quot;: null,
      &quot;8&quot;: null,
      &quot;9&quot;: null,
      &quot;10&quot;: null,
      &quot;11&quot;: null,
      &quot;12&quot;: null,
      &quot;13&quot;: null,
      &quot;14&quot;: null,
      &quot;15&quot;: null,
      &quot;16&quot;: null,
      &quot;17&quot;: null,
      &quot;18&quot;: null,
      &quot;19&quot;: null,
      // &quot;20&quot;: null, # 避免自建的derper挂掉后tailscale无法使用，保留20（Hong Kong）作为备选
      &quot;21&quot;: null,
      &quot;22&quot;: null,
      &quot;23&quot;: null,
      &quot;24&quot;: null,
      &quot;25&quot;: null,
      &quot;26&quot;: null,
      &quot;27&quot;: null,
      &quot;28&quot;: null
    }
  }
}
</code></pre>
<h3 id="2-">2. 验证</h3><p>在已连接 Tailscale 的客户端上执行 <code>tailscale netcheck</code>，查看输出是否包含自建 DERP 服务器：</p><pre class=""><code class="">Report:
    * Time: 2025-07-30T15:17:57.176736Z
    * UDP: true
    * IPv4: yes, 127.0.0.1:114514
    * IPv6: no, but OS has support
    * MappingVariesByDestIP: true
    * PortMapping: 
    * CaptivePortal: false
    * Nearest DERP: My Derper
    * DERP latency:
        - my_derper: 162ms   (My Derper)
</code></pre>
<h2 id="">设置客户端验证</h2><p>默认情况下，自建的 DERP 服务器可以被所有知道服务器 IP 的 Tailscale 用户（包括 Headscale 实例）使用，可以设置客户端验证功能来限制只有自己的网络可用。</p><h3 id="1--tailscale">1. 服务器安装 Tailscale</h3><p>你需要在服务器上安装 Tailscale，并加入你的网络。具体步骤请参阅 <a href="https://tailscale.com/download">官网</a>，本文不再阐述。</p><h3 id="2-">2. 修改配置</h3><p>在此前的 Systemd 服务配置文件中追加 <code>-verify-clients</code> 参数，修改后的文件大概长这样：</p><pre class=""><code class="">[Unit]
Description=Derper
Wants=network-pre.target
After=network-pre.target NetworkManager.service systemd-resolved.service

[Service]
ExecStart=/usr/sbin/derper --hostname 将这里换成你提前准备的域名 -a :443 -http-port 80 -certmode letsencrypt --certdir /var/lib/derper/certs -verify-clients
Restart=on-failure

[Install]
WantedBy=multi-user.target
</code></pre>
<p>然后重启服务：</p><pre class="language-bash lang-bash"><code class="language-bash lang-bash">sudo systemctl daemon-reload
sudo systemctl restart derper
</code></pre></div><p style="text-align:right"><a href="https://launchpadx.top/posts/tinker/how-to-deploy-tailscale-derper#comments">看完了？说点什么呢</a></p></div>]]></description><link>https://launchpadx.top/posts/tinker/how-to-deploy-tailscale-derper</link><guid isPermaLink="true">https://launchpadx.top/posts/tinker/how-to-deploy-tailscale-derper</guid><dc:creator><![CDATA[LaunchPad]]></dc:creator><pubDate>Wed, 30 Jul 2025 16:42:11 GMT</pubDate></item><item><title><![CDATA[Hello world!]]></title><description><![CDATA[<div><blockquote>该渲染由 Yohaku API 生成，可能存在排版问题，最佳体验请前往：<a href="https://launchpadx.top/posts/archive/hello-world">https://launchpadx.top/posts/archive/hello-world</a></blockquote><span>Hello World! 这里是博客的第一篇文章喵~</span><p style="text-align:right"><a href="https://launchpadx.top/posts/archive/hello-world#comments">看完了？说点什么呢</a></p></div>]]></description><link>https://launchpadx.top/posts/archive/hello-world</link><guid isPermaLink="true">https://launchpadx.top/posts/archive/hello-world</guid><dc:creator><![CDATA[LaunchPad]]></dc:creator><pubDate>Sun, 31 Mar 2024 06:32:21 GMT</pubDate></item></channel></rss>