<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Arisaka.ETH</title><description>Day before yesterday I saw a rabbit, and yesterday a deer, and today, you.</description><link>https://arisaka.eth.limo/</link><language>en</language><item><title>Arisaka.ETH 博客简介</title><link>https://arisaka.eth.limo/posts/arisakablog/</link><guid isPermaLink="true">https://arisaka.eth.limo/posts/arisakablog/</guid><description>只是一篇AI介绍的Arisaka.ETH 博客简介</description><pubDate>Tue, 29 Sep 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;起因&lt;/h2&gt;
&lt;p&gt;最开始的 Arisaka.ETH 其实就是一个普通的个人博客。&lt;br /&gt;
基于 &lt;a href=&quot;https://github.com/saicaca/fuwari&quot;&gt;Fuwari&lt;/a&gt; 修改，使用 Astro 构建静态页面。&lt;/p&gt;
&lt;p&gt;后来陆续加上了 Arweave、ENS、文章加密、Live2D、MIDI、Telegram Moment、CTF、MoeQ、AI 聊天、在线写作等功能，单纯把所有东西继续塞在博客仓库里已经不太合适。&lt;/p&gt;
&lt;p&gt;因此现在项目主要拆成两个仓库：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/TomorrowX6/arisaka.eth&quot;&gt;TomorrowX6/arisaka.eth&lt;/a&gt;：博客本体、文章和前端。&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/TomorrowX6/arisaka.eth-workers&quot;&gt;TomorrowX6/arisaka.eth-workers&lt;/a&gt;：Cloudflare Workers、API、D1、R2 和后台任务。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;简单来说就是：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;arisaka.eth
    ↓
博客 / 内容 / 前端
    ↓
Cloudflare Workers
    ↓
D1 / R2 / Telegram / GitHub / AI / Ethereum
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;静态的东西尽量保持静态，需要实时处理的东西全部拆到 Worker。&lt;/p&gt;
&lt;h2&gt;arisaka.eth 主站&lt;/h2&gt;
&lt;p&gt;主站目前使用 Astro 5 + Svelte，博客的文章、About、友链、Moment 页面以及大部分前端交互都放在这里。&lt;/p&gt;
&lt;p&gt;主要技术栈：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Astro / Svelte&lt;/li&gt;
&lt;li&gt;TypeScript&lt;/li&gt;
&lt;li&gt;Tailwind CSS&lt;/li&gt;
&lt;li&gt;Swup&lt;/li&gt;
&lt;li&gt;Pagefind&lt;/li&gt;
&lt;li&gt;Arweave&lt;/li&gt;
&lt;li&gt;ENS&lt;/li&gt;
&lt;li&gt;GitHub Actions&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;文章依然以 Markdown 为主：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Markdown
   ↓
Astro
   ↓
dist/
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;不过生成 &lt;code&gt;dist/&lt;/code&gt; 后，并不是直接上传到普通静态托管。&lt;/p&gt;
&lt;h2&gt;Arweave + ENS&lt;/h2&gt;
&lt;p&gt;博客目前主要通过 Arweave 永久发布，再由 ENS 指向当前版本。&lt;/p&gt;
&lt;p&gt;发布流程大概是：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Markdown
   ↓
Astro Build
   ↓
dist/
   ↓
Arweave
   ↓
Path Manifest
   ↓
ENS contenthash
   ↓
arisaka.eth
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;构建完成后会对文件计算 SHA-256。&lt;/p&gt;
&lt;p&gt;如果一个文件的内容之前已经上传过，就直接复用原来的 Arweave Transaction，不需要每次发布都重新上传整个博客。&lt;/p&gt;
&lt;p&gt;也就是：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;旧文件
→ 复用原 Transaction

修改过的文件
→ 上传新的 Transaction
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;最终再生成新的 Path Manifest。&lt;/p&gt;
&lt;p&gt;Manifest 可以理解成当前博客版本的文件表：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/
→ index.html

/posts/example/
→ posts/example/index.html

/_entry/example.js
→ 对应的 Arweave Transaction
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;然后将 Manifest 写入 &lt;code&gt;arisaka.eth&lt;/code&gt; 的 ENS &lt;code&gt;contenthash&lt;/code&gt;。&lt;/p&gt;
&lt;p&gt;因此实际上访问链路是：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;arisaka.eth
    ↓
ENS
    ↓
Arweave Manifest
    ↓
具体页面文件
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;相比每次整个站点重新上传，这种方式能少传不少重复资源。&lt;/p&gt;
&lt;h2&gt;发布验证&lt;/h2&gt;
&lt;p&gt;Arweave 返回 Transaction ID 不代表公共网关一定已经可以立即读取。&lt;/p&gt;
&lt;p&gt;所以在更新 ENS 之前，还会先验证新版本。&lt;/p&gt;
&lt;p&gt;主要检查：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Manifest 是否可以读取。&lt;/li&gt;
&lt;li&gt;页面和静态资源是否可以读取。&lt;/li&gt;
&lt;li&gt;文件大小是否正确。&lt;/li&gt;
&lt;li&gt;SHA-256 是否一致。&lt;/li&gt;
&lt;li&gt;MIME 类型是否正确。&lt;/li&gt;
&lt;li&gt;页面路由是否正常。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;流程大概是：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;上传 Arweave
      ↓
生成 Manifest
      ↓
公网验证
      ↓
全部通过
      ↓
更新 ENS
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;如果验证失败，就不会切换 ENS。&lt;/p&gt;
&lt;p&gt;旧版本仍然继续工作。&lt;/p&gt;
&lt;p&gt;这样至少不会因为新版本刚上传但网关还没有同步完成，直接把线上站点切到一个不可访问的版本。&lt;/p&gt;
&lt;h2&gt;ENS Gas&lt;/h2&gt;
&lt;p&gt;更新 ENS 本质上还是一笔 Ethereum 交易，自然也要考虑 Gas。&lt;/p&gt;
&lt;p&gt;平时博客更新并没有必要为了立即上线，在 Base Fee 很高的时候硬发一笔交易。&lt;/p&gt;
&lt;p&gt;因此部署流程设置了 Base Fee 上限。&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Arweave 上传完成
        ↓
检查 Base Fee
        ↓
费用较低
        ↓
更新 ENS
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;如果费用超过设置值，则：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Arweave 上传完成
        ↓
暂不更新 ENS
        ↓
release-watch
        ↓
继续等待
        ↓
费用满足条件
        ↓
激活新版本
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;也就是把“上传”和“上线”拆成两个阶段。&lt;/p&gt;
&lt;p&gt;Arweave 上的新版本可以已经准备完成，但 ENS 仍然保持旧版本。&lt;/p&gt;
&lt;h2&gt;GitHub Actions&lt;/h2&gt;
&lt;p&gt;上面的发布过程主要通过 GitHub Actions 自动完成。&lt;/p&gt;
&lt;p&gt;现在一次完整发布涉及：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;安装依赖。&lt;/li&gt;
&lt;li&gt;Astro 检查。&lt;/li&gt;
&lt;li&gt;TypeScript 检查。&lt;/li&gt;
&lt;li&gt;构建博客。&lt;/li&gt;
&lt;li&gt;恢复 Arweave 上传缓存。&lt;/li&gt;
&lt;li&gt;对比文件 SHA-256。&lt;/li&gt;
&lt;li&gt;增量上传文件。&lt;/li&gt;
&lt;li&gt;生成 Manifest。&lt;/li&gt;
&lt;li&gt;验证公网 Arweave 内容。&lt;/li&gt;
&lt;li&gt;检查 Ethereum Base Fee。&lt;/li&gt;
&lt;li&gt;更新 ENS。&lt;/li&gt;
&lt;li&gt;保存上传缓存和 outbox。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;因此现在 GitHub Actions 已经不只是简单的：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;pnpm build
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;而更接近完整的发布流水线。&lt;/p&gt;
&lt;h2&gt;文章加密&lt;/h2&gt;
&lt;p&gt;博客支持直接发布加密文章。&lt;/p&gt;
&lt;p&gt;没有采用密码直接加密正文的方式，而是拆成 KEK / DEK 两层。&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;密码
 ↓
scrypt
 ↓
KEK
 ↓
AES-256-GCM
 ↓
DEK
 ↓
AES-256-GCM
 ↓
正文 HTML
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;其中：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;KEK：由用户密码通过 scrypt 派生。&lt;/li&gt;
&lt;li&gt;DEK：每次构建随机生成。&lt;/li&gt;
&lt;li&gt;KEK 只负责加密 DEK。&lt;/li&gt;
&lt;li&gt;DEK 才真正负责加密文章正文。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;这样密码派生和正文加密是分开的。&lt;/p&gt;
&lt;p&gt;加密文章的正文不会进入：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;首页摘要。&lt;/li&gt;
&lt;li&gt;RSS 正文。&lt;/li&gt;
&lt;li&gt;Pagefind 搜索。&lt;/li&gt;
&lt;li&gt;初始文章目录。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;用户输入密码后才会在浏览器内完成解密。&lt;/p&gt;
&lt;p&gt;页面切换时已经解密的 DOM 也会清理。&lt;/p&gt;
&lt;p&gt;当然，这种设计依然不能解决弱密码被离线爆破的问题，所以真要使用还是得设置高强度密码。&lt;/p&gt;
&lt;h2&gt;Provenance&lt;/h2&gt;
&lt;p&gt;既然文章经过：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ENS
 ↓
Manifest
 ↓
Arweave File
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;那么也可以反过来查询当前看到的页面到底来自哪次发布。&lt;/p&gt;
&lt;p&gt;因此文章底部加入了 Provenance 信息。&lt;/p&gt;
&lt;p&gt;大概会显示：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ENS contenthash
        ↓
Arweave Manifest TX
        ↓
文章 File TX
        ↓
Content Digest
        ↓
App Version
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;主要就是方便确认：&lt;/p&gt;
&lt;p&gt;当前网页到底对应哪一个 Arweave Transaction 和哪一次博客发布。&lt;/p&gt;
&lt;p&gt;并不是什么完整的密码学证明，只是把原本隐藏在发布流程里的信息展示出来。&lt;/p&gt;
&lt;h2&gt;Live2D&lt;/h2&gt;
&lt;p&gt;博客桌面端还放了一个 Live2D Roro。&lt;/p&gt;
&lt;p&gt;最开始只是单纯的桌宠，后面又给它加上了聊天和文章话题功能。&lt;/p&gt;
&lt;p&gt;AI 请求不会直接从浏览器调用模型 API，而是：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Browser
   ↓
live2d-chat Worker
   ↓
AI API
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;API Key 只保存到 Worker Secret。&lt;/p&gt;
&lt;p&gt;Worker 负责请求检查、额度限制和模型调用。&lt;/p&gt;
&lt;p&gt;在公开文章中，还可以根据文章内容生成相关话题。&lt;/p&gt;
&lt;p&gt;首页、About、Friends 等非文章页面则主要播放动漫语录。&lt;/p&gt;
&lt;p&gt;所以 Roro 现在已经不只是页面装饰，也算一个独立的交互入口了。&lt;/p&gt;
&lt;h2&gt;MIDI&lt;/h2&gt;
&lt;p&gt;侧栏播放器使用 SpessaSynth 在浏览器直接合成 MIDI。&lt;/p&gt;
&lt;p&gt;支持：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;.mid&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.midi&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.rmi&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;顺序播放&lt;/li&gt;
&lt;li&gt;随机播放&lt;/li&gt;
&lt;li&gt;单曲循环&lt;/li&gt;
&lt;li&gt;播放列表&lt;/li&gt;
&lt;li&gt;进度拖动&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;合成器、AudioWorklet 和 SoundFont 都会等用户真正开始播放以后再加载，没必要刚打开博客就全部下载。&lt;/p&gt;
&lt;h2&gt;虚拟终端&lt;/h2&gt;
&lt;p&gt;Live2D 菜单里还能打开一个虚拟终端。&lt;/p&gt;
&lt;p&gt;终端不是简单打印几行固定文字，而是做了基本的命令解析、历史记录、Tab 补全和虚拟文件系统。&lt;/p&gt;
&lt;p&gt;例如：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ls
cd
pwd
cat
open
whoami
uname
date
neofetch
history
clear
exit
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;里面的部分文件直接来源于博客真实内容。&lt;/p&gt;
&lt;p&gt;例如：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;~/README/
~/posts/
~/about.md
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;open&lt;/code&gt; 还可以直接打开博客文章。&lt;/p&gt;
&lt;h2&gt;Moment&lt;/h2&gt;
&lt;p&gt;Moment 是后来加的一个 Telegram 动态页面。&lt;/p&gt;
&lt;p&gt;主要展示 &lt;code&gt;@azusabot0&lt;/code&gt; 中的：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;文字。&lt;/li&gt;
&lt;li&gt;图片。&lt;/li&gt;
&lt;li&gt;视频封面。&lt;/li&gt;
&lt;li&gt;原 Telegram 帖子链接。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;最开始很容易想到直接用 GitHub Actions 定时同步：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Telegram
   ↓
GitHub Actions
   ↓
生成数据
   ↓
重新构建博客
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;但这样最大的问题就是：&lt;/p&gt;
&lt;p&gt;发一条 Telegram，就得把整个博客重新构建和发布一次。&lt;/p&gt;
&lt;p&gt;感觉多少有点抽象。&lt;/p&gt;
&lt;p&gt;所以后来把同步完全拆到了 &lt;code&gt;arisaka.eth-workers&lt;/code&gt;。&lt;/p&gt;
&lt;p&gt;现在变成：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Telegram
   ↓
Moment Worker
   ↓
D1 + R2
   ↓
moment.000.moe
   ↓
博客 Moment 页面
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;帖子信息保存到 D1。&lt;/p&gt;
&lt;p&gt;图片和视频封面保存到 R2。&lt;/p&gt;
&lt;p&gt;博客只请求：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;https://moment.000.moe/api/posts
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;然后在浏览器里动态显示。&lt;/p&gt;
&lt;p&gt;这样 Telegram 新增一条动态和博客构建就完全没关系了。&lt;/p&gt;
&lt;h2&gt;arisaka.eth-workers&lt;/h2&gt;
&lt;p&gt;随着动态服务越来越多，最后将 Cloudflare Workers 单独拆到了：&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/TomorrowX6/arisaka.eth-workers&quot;&gt;TomorrowX6/arisaka.eth-workers&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;它现在更像整个博客的后端 Monorepo。&lt;/p&gt;
&lt;p&gt;目前主要包括：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;blog-proxy/
ctf-game/
live2d-chat/
moment/
release-watch/
waline/
randimg/
writer/
docs/
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;每个 Worker 都有自己的依赖、配置和部署流程。&lt;/p&gt;
&lt;h2&gt;blog-proxy&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;blog-proxy&lt;/code&gt; 负责把 Arweave 上的博客通过：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;000.moe
www.000.moe
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;提供出来。&lt;/p&gt;
&lt;p&gt;Worker 会读取 &lt;code&gt;arisaka.eth&lt;/code&gt; 当前的 ENS &lt;code&gt;contenthash&lt;/code&gt;，找到对应的 Arweave Manifest。&lt;/p&gt;
&lt;p&gt;不过不会让每一个访问请求都实时查询 Ethereum RPC。&lt;/p&gt;
&lt;p&gt;ENS 解析结果会缓存在 Cloudflare Edge，缓存过期后再后台刷新。&lt;/p&gt;
&lt;p&gt;大概就是：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;用户
 ↓
000.moe
 ↓
Cloudflare Worker
 ↓
缓存的 ENS Manifest
 ↓
Arweave
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;这样 ENS 仍然是博客版本的来源，但不会直接卡在每一个用户请求的关键路径上。&lt;/p&gt;
&lt;h2&gt;moment&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;moment&lt;/code&gt; 负责 Telegram 频道同步。&lt;/p&gt;
&lt;p&gt;Worker 定时读取 Telegram &lt;code&gt;getUpdates&lt;/code&gt;：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Telegram
   ↓
Worker
   ├─ D1
   └─ R2
   ↓
Moment API
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;D1 保存帖子和同步状态。&lt;/p&gt;
&lt;p&gt;R2 保存图片以及视频封面。&lt;/p&gt;
&lt;p&gt;主站只负责展示。&lt;/p&gt;
&lt;h2&gt;live2d-chat&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;live2d-chat&lt;/code&gt; 主要负责 Roro 聊天以及相关 AI 功能。&lt;/p&gt;
&lt;p&gt;包括：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;AI 对话。&lt;/li&gt;
&lt;li&gt;文章话题生成。&lt;/li&gt;
&lt;li&gt;话题缓存。&lt;/li&gt;
&lt;li&gt;请求来源检查。&lt;/li&gt;
&lt;li&gt;调用额度限制。&lt;/li&gt;
&lt;li&gt;MoeQ 桌宠相关接口。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;模型 API Key 全部放在 Worker 后端。&lt;/p&gt;
&lt;h2&gt;release-watch&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;release-watch&lt;/code&gt; 主要负责博客版本激活和状态监控。&lt;/p&gt;
&lt;p&gt;当一次部署已经把内容上传到 Arweave，但因为：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Arweave 网关尚未完全可读。&lt;/li&gt;
&lt;li&gt;Ethereum Base Fee 太高。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;暂时不能更新 ENS 时，就由它继续跟踪。&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;新版本
 ↓
Arweave 已上传
 ↓
等待可用
 ↓
等待低 Gas
 ↓
触发激活
 ↓
ENS 更新
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;同时也会对相关站点进行监控。&lt;/p&gt;
&lt;h2&gt;waline&lt;/h2&gt;
&lt;p&gt;评论系统也迁到了 Worker。&lt;/p&gt;
&lt;p&gt;前端仍然使用 Waline 客户端，但后端数据保存在 D1。&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Blog
 ↓
Waline
 ↓
Worker
 ↓
D1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;这样评论功能就不再需要单独维护传统服务器。&lt;/p&gt;
&lt;h2&gt;randimg&lt;/h2&gt;
&lt;p&gt;随机图片服务以前使用：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;FastAPI
+
nginx
+
SQLite
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;现在已经迁移成：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Cloudflare Worker
+
R2
+
D1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;WebP 图片保存到 R2。&lt;/p&gt;
&lt;p&gt;图片索引保存到 D1。&lt;/p&gt;
&lt;p&gt;并且旧的图片 ID 和 URL 结构继续保持兼容，所以博客里已有的链接不需要因为迁移重新修改。&lt;/p&gt;
&lt;h2&gt;Writer&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;writer&lt;/code&gt; 用来解决写博客的问题。&lt;/p&gt;
&lt;p&gt;目前同时为 Android Writer 和 Web Writer 提供后端。&lt;/p&gt;
&lt;p&gt;登录使用 GitHub App。&lt;/p&gt;
&lt;p&gt;编辑完成后可以直接把 Markdown 提交到：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;TomorrowX6/arisaka.eth
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;的 &lt;code&gt;main&lt;/code&gt; 分支。&lt;/p&gt;
&lt;p&gt;整个过程就变成了：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Writer
   ↓
GitHub
   ↓
arisaka.eth
   ↓
GitHub Actions
   ↓
Astro
   ↓
Arweave
   ↓
ENS
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;也就是说，不一定非要在电脑上：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git clone
vim
git add
git commit
git push
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;才能更新文章。&lt;/p&gt;
&lt;p&gt;在 Writer 里写完也可以直接发布。&lt;/p&gt;
&lt;p&gt;Web Writer 本身还包括文章列表、Markdown 编辑、实时预览、标题大纲、字数统计、命令面板等功能。&lt;/p&gt;
&lt;h2&gt;CTF&lt;/h2&gt;
&lt;p&gt;CTF 后来基本已经从博客本体独立出来了。&lt;/p&gt;
&lt;p&gt;博客中主要留下入口，而实际游戏运行在 &lt;code&gt;ctf-game&lt;/code&gt; 中。&lt;/p&gt;
&lt;p&gt;包括：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Plasma 风格浏览器桌面。&lt;/li&gt;
&lt;li&gt;CTF 关卡。&lt;/li&gt;
&lt;li&gt;运行时 Worker。&lt;/li&gt;
&lt;li&gt;存档。&lt;/li&gt;
&lt;li&gt;自动化测试。&lt;/li&gt;
&lt;li&gt;部署流程。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;主站负责：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;展示入口
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Worker 负责：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;真正运行
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;MoeQ&lt;/h2&gt;
&lt;p&gt;MoeQ 也放在 &lt;code&gt;ctf-game&lt;/code&gt; 相关服务中。&lt;/p&gt;
&lt;p&gt;包含题库、媒体处理和运行时逻辑。&lt;/p&gt;
&lt;p&gt;目前题目不再只是单纯的文字选择题，还涉及角色、声优、音乐、语录、图片等不同类型。&lt;/p&gt;
&lt;p&gt;题库及媒体处理本身比较重，因此和博客内容构建分开维护会方便很多。&lt;/p&gt;
&lt;p&gt;不然更新一次题库就重新跑整个 Arweave 博客发布，多少有点离谱。&lt;/p&gt;
&lt;h2&gt;support/blog&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;ctf-game/support/blog/&lt;/code&gt; 保存 CTF 和博客之间真正需要共享的最小公开内容。&lt;/p&gt;
&lt;p&gt;也就是说没有为了 CTF 再把博客整个复制进 Workers 仓库。&lt;/p&gt;
&lt;p&gt;部署流程只导出需要更新的入口文件，然后再交给博客仓库。&lt;/p&gt;
&lt;p&gt;两个项目之间尽量保持低耦合。&lt;/p&gt;
&lt;h2&gt;docs&lt;/h2&gt;
&lt;p&gt;CTF 和 MoeQ 原本有一部分运行、维护和实现说明放在博客仓库。&lt;/p&gt;
&lt;p&gt;拆分 Worker 后，相应文档也一起迁到了 &lt;code&gt;arisaka.eth-workers/docs/&lt;/code&gt;。&lt;/p&gt;
&lt;p&gt;这样 Worker 的代码、部署方式和对应运维说明都放在同一个仓库里。&lt;/p&gt;
&lt;h2&gt;现在的架构&lt;/h2&gt;
&lt;p&gt;现在整体关系大概是：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;                    ┌──────────────────┐
                    │   arisaka.eth    │
                    │ Astro / Svelte   │
                    └────────┬─────────┘
                             │
                 GitHub Actions
                             │
                             ▼
                    ┌──────────────────┐
                    │     Arweave      │
                    │ Manifest / Files │
                    └────────┬─────────┘
                             │
                             ▼
                           ENS
                             │
                             ▼
                    ┌──────────────────┐
                    │    blog-proxy    │
                    │     000.moe      │
                    └──────────────────┘


arisaka.eth
     │
     ├── Moment ───────── moment Worker ───── D1 / R2 / Telegram
     │
     ├── Roro ─────────── live2d-chat ─────── AI API
     │
     ├── Comments ─────── waline ──────────── D1
     │
     ├── Random Image ─── randimg ─────────── D1 / R2
     │
     ├── Writer ───────── writer ───────────── GitHub
     │
     └── CTF / MoeQ ───── ctf-game
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;博客本体基本只负责内容和前端。&lt;/p&gt;
&lt;p&gt;需要状态、数据库、第三方 API 或定时任务的功能则交给 Workers。&lt;/p&gt;
&lt;h2&gt;为什么拆开&lt;/h2&gt;
&lt;p&gt;最明显的好处就是各部分不再互相绑死。&lt;/p&gt;
&lt;p&gt;以前可能是：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Telegram 更新
      ↓
博客数据变化
      ↓
重新构建
      ↓
重新上传 Arweave
      ↓
更新 ENS
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;现在：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Telegram 更新
      ↓
Moment Worker
      ↓
D1 / R2
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;结束。&lt;/p&gt;
&lt;p&gt;评论也是一样：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;新增评论
↓
D1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;不影响博客。&lt;/p&gt;
&lt;p&gt;AI 出问题：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;live2d-chat
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;出问题。&lt;/p&gt;
&lt;p&gt;静态文章照样可以正常访问。&lt;/p&gt;
&lt;p&gt;随机图片服务出问题，也不会影响 Arweave 上的文章。&lt;/p&gt;
&lt;p&gt;最终把整个项目分成两种东西：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;静态内容
→ arisaka.eth

动态服务
→ arisaka.eth-workers
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;各自独立部署，也各自独立维护。&lt;/p&gt;
&lt;h2&gt;总结&lt;/h2&gt;
&lt;p&gt;Arisaka.ETH 最开始只是想做一个自己的博客。&lt;/p&gt;
&lt;p&gt;后来慢慢变成：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Astro
+
Svelte
+
GitHub Actions
+
Arweave
+
ENS
+
Ethereum
+
Cloudflare Workers
+
D1
+
R2
+
Telegram
+
GitHub
+
AI
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;很多东西并不是一开始就计划好的。&lt;/p&gt;
&lt;p&gt;基本都是遇到问题以后再慢慢改。&lt;/p&gt;
&lt;p&gt;比如：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;不想依赖传统服务器
→ Arweave

想使用链上域名
→ ENS

不想重复上传文件
→ SHA-256 增量缓存

Gas 太贵
→ release-watch

Telegram 更新不想重建博客
→ Moment Worker

不想继续维护图片服务器
→ R2 + D1

AI Key 不能放前端
→ live2d-chat

想随时写文章
→ Writer
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;做着做着，最后就成现在这样了。&lt;/p&gt;
&lt;p&gt;不过目前两个仓库的职责已经比较清楚：&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;arisaka.eth&lt;/code&gt; 负责博客本身，&lt;code&gt;arisaka.eth-workers&lt;/code&gt; 负责博客背后的动态服务。&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;至少相比以前什么都塞在一起，现在维护起来舒服多了。&lt;/p&gt;
&lt;h2&gt;图片预览&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/b3221113fb8c926041abf98ac6726127.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/96bc775c2066ee016175fe6c34444011.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/aa8a232f1b95ae4c7fa233de7e32720b.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/77a6b0fd8b431d4a45cbc91bc24c9115.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/229dd997b50b5f67e47f5a588f6326a4.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/b52fbba73e5b87ce077b8dc99a776670.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
</content:encoded></item><item><title>记录一次PiliPlus PR贡献</title><link>https://arisaka.eth.limo/posts/piliplus/</link><guid isPermaLink="true">https://arisaka.eth.limo/posts/piliplus/</guid><description>BiliBili播放器服务端声明画质列表与实际返回流不一致的具体分析</description><pubDate>Thu, 10 Sep 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;问题原因&lt;/h2&gt;
&lt;p&gt;部分特定视频，如：&lt;a href=&quot;https://www.bilibili.com/video/BV1bW411P7k9&quot;&gt;BV1bW411P7k9&lt;/a&gt; 可以发现上述视频有1080P 60帧画质，但是实际无法播放。&lt;br /&gt;
对源码进行分析，发现播放器请求未强制指定 qn，会静默回退到 80。因此无法获取高画质1080P 60帧画质。&lt;br /&gt;
播放接口返回的 &lt;code&gt;support_formats&lt;/code&gt; 只是服务端声明的画质列表，真正可播放的画质应以 &lt;code&gt;dash.video&lt;/code&gt; 中的实际流为准。&lt;br /&gt;
部分视频会根据请求的 &lt;code&gt;qn&lt;/code&gt; 分批返回视频流。例如 &lt;a href=&quot;https://www.bilibili.com/video/BV1bW411P7k9&quot;&gt;BV1bW411P7k9&lt;/a&gt;：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;请求高画质时，&lt;code&gt;support_formats&lt;/code&gt; 包含 116/80/64/32/16，但 &lt;code&gt;dash.video&lt;/code&gt; 仅返回 116。&lt;/li&gt;
&lt;li&gt;请求 80 时，&lt;code&gt;dash.video&lt;/code&gt; 才返回 80/64/32/16。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/71453c3bab5c8fbffea92d813e324db3.jpg&quot; alt=&quot;&quot; /&gt;
&lt;img src=&quot;https://writer.000.moe/media/posts/d53e30f2a433b9511b1195f9144b9a5f.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;修复内容&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;将 &lt;code&gt;VideoHttp.videoUrl&lt;/code&gt; 的 &lt;code&gt;qn&lt;/code&gt; 改为必传参数，避免隐式回退。&lt;/li&gt;
&lt;li&gt;首次请求显式请求高画质流。&lt;/li&gt;
&lt;li&gt;使用 &lt;code&gt;dash.video&lt;/code&gt; 中的实际画质 ID 判断画质是否可用。&lt;/li&gt;
&lt;li&gt;当高画质响应缺少低画质流时：
&lt;ul&gt;
&lt;li&gt;仅额外请求一次缺失画质；&lt;/li&gt;
&lt;li&gt;合并并去重两个响应中的视频流。&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;播放和下载均只从实际存在的 DASH 流中选择画质。&lt;/li&gt;
&lt;li&gt;对空视频流增加保护，避免后续 &lt;code&gt;first&lt;/code&gt; 等操作抛出异常。&lt;/li&gt;
&lt;li&gt;使用 &lt;code&gt;try/finally&lt;/code&gt; 确保请求结束后恢复 &lt;code&gt;isQuerying&lt;/code&gt; 状态。&lt;/li&gt;
&lt;li&gt;修正播放器内及详情页画质菜单的可用状态判断。&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;总结&lt;/h2&gt;
&lt;p&gt;这或许是b站陈年代码所遗留的屎山，具体是什么原因导致的就无从得知了。&lt;/p&gt;
&lt;p&gt;Link: &lt;a href=&quot;https://github.com/bggRGjQaUbCoE/PiliPlus/pull/2828&quot;&gt;PR #2828&lt;/a&gt;&lt;/p&gt;
</content:encoded></item><item><title>术曲制作之路</title><link>https://arisaka.eth.limo/posts/music/</link><guid isPermaLink="true">https://arisaka.eth.limo/posts/music/</guid><description>简单介绍一些基本乐理以及个人见解</description><pubDate>Sun, 09 Aug 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;起因&lt;/h2&gt;
&lt;p&gt;悠闲品鉴音乐时听到的纯萌新制作的术曲，闲来无事尝试下&lt;br /&gt;
&amp;lt;iframe width=&quot;100%&quot; height=&quot;468&quot; src=&quot;https://www.youtube.com/embed/yYa-sOw924U&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allowfullscreen&amp;gt;&amp;lt;/iframe&amp;gt;&lt;/p&gt;
&lt;h2&gt;基础乐理&lt;/h2&gt;
&lt;p&gt;学音乐当然要懂一些乐理，虽然目前只会一些基础的&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;大调&lt;/strong&gt;&lt;br /&gt;
全 全 半 全 全 全 半&lt;br /&gt;
&lt;strong&gt;小调&lt;/strong&gt;&lt;br /&gt;
全 半 全 全 半 全 全&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;和弦&lt;/strong&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;和弦&lt;/th&gt;
&lt;th&gt;公式&lt;/th&gt;
&lt;th&gt;C为根音&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Major 大三&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1 3 5&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;C E G&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;minor 小三&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1 ♭3 5&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;C E♭ G&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;dim 减三&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1 ♭3 ♭5&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;C E♭ G♭&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;aug 增三&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1 3 ♯5&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;C E G♯&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;maj7 大七&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1 3 5 7&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;C E G B&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;m7 小七&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1 ♭3 5 ♭7&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;C E♭ G B♭&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7 属七&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1 3 5 ♭7&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;C E G B♭&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;常用和弦进行&lt;/strong&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;级数&lt;/th&gt;
&lt;th&gt;和弦&lt;/th&gt;
&lt;th&gt;用途/感觉&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;4536&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;F-G-Em-Am&lt;/td&gt;
&lt;td&gt;日系常用、流动感&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;1564&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;C-G-Am-F&lt;/td&gt;
&lt;td&gt;流行、开阔&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;6415&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Am-F-C-G&lt;/td&gt;
&lt;td&gt;感伤、循环感强&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;6451&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Am-F-G-C&lt;/td&gt;
&lt;td&gt;感伤后回家&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;251&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Dm-G-C&lt;/td&gt;
&lt;td&gt;经典解决&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;451&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;F-G-C&lt;/td&gt;
&lt;td&gt;直接回家&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;6251&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Am-Dm-G-C&lt;/td&gt;
&lt;td&gt;很顺的回归&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;3625&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Em-Am-Dm-G&lt;/td&gt;
&lt;td&gt;强循环感&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;旋律不跑调情况下自由发挥啦，毕竟本人也是萌新&lt;/p&gt;
&lt;h2&gt;试做样品&lt;/h2&gt;
&lt;p&gt;&amp;lt;audio controls src=&quot;https://files.catbox.moe/d78i3x.mp3&quot;&amp;gt;&amp;lt;/audio&amp;gt;&lt;/p&gt;
&lt;p&gt;当然，还没配人声捏，毕竟试做品&lt;/p&gt;
&lt;h2&gt;Crack&lt;/h2&gt;
&lt;p&gt;如有条件请入正&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;FL Studio&lt;/strong&gt;&lt;br /&gt;
https://4download.net/3283-fl-studio-digital-audio-workstation.html&lt;br /&gt;
&lt;strong&gt;Image-Line FLEX Complete Expansion Bundle&lt;/strong&gt;&lt;br /&gt;
https://4download.net/3966-image-line-flex-complete-expansion-bundle.html&lt;br /&gt;
&lt;strong&gt;VOICEVOX&lt;/strong&gt;&lt;br /&gt;
https://hatsunemiku.download/&lt;br /&gt;
&lt;strong&gt;Synthesizer V Studio&lt;/strong&gt;&lt;br /&gt;
https://synthv.me/&lt;br /&gt;
https://github.com/sy3c4ll/obsidian&lt;/p&gt;
</content:encoded></item><item><title>Go语言基础与速查表</title><link>https://arisaka.eth.limo/posts/golang/</link><guid isPermaLink="true">https://arisaka.eth.limo/posts/golang/</guid><description>了解GO语言的优势，以及Go语言基础与速查表</description><pubDate>Sat, 25 Jul 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;为何选GO&lt;/h1&gt;
&lt;p&gt;Go是 Google 在 2009 年发布的编程语言，也被称为“21世纪的C语言”&lt;/p&gt;
&lt;h3&gt;性能均衡，且易上手&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/cadbd80a70f36967ba527b0ead7448e4.png&quot; alt=&quot;&quot; /&gt;
Go 的运行速度通常明显快于 Python、JavaScript 等解释型语言。&lt;br /&gt;
并且Go 的语法比 Rust、C++、Java 更精简，关键字少，代码结构统一。&lt;/p&gt;
&lt;h3&gt;自带GC(垃圾回收)&lt;/h3&gt;
&lt;p&gt;Go 程序创建对象后，不需要手动释放。Go 运行时会检查哪些内存已经没有人使用，然后自动回收。&lt;br /&gt;
相较于Rust的GC(所有权,借用,生命周期)，学习成本低。&lt;/p&gt;
&lt;h3&gt;代码风格统一&lt;/h3&gt;
&lt;p&gt;gofmt会自动整理缩进和代码格式，团队成员写出来的代码风格基本一致。&lt;br /&gt;
降低了屎山代码概率。&lt;/p&gt;
&lt;h3&gt;并发编程简单&lt;/h3&gt;
&lt;p&gt;Go 内置了 goroutine，可以方便地同时执行多个任务。&lt;/p&gt;
&lt;p&gt;&amp;lt;br&amp;gt;&lt;/p&gt;
&lt;h1&gt;Go语言基础与速查表&lt;/h1&gt;
&lt;p&gt;引用自&lt;a href=&quot;https://book.rmb.run/docs/golang.html&quot;&gt;Quick Reference&lt;/a&gt;
该备忘单提供了帮助您使用 &lt;a href=&quot;https://golang.org&quot;&gt;Golang&lt;/a&gt; 的基本语法和方法。&lt;/p&gt;
&lt;h2&gt;入门&lt;/h2&gt;
&lt;h3&gt;hello.go&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;package main
import &quot;fmt&quot;
func main() {
    fmt.Println(&quot;Hello, world!&quot;)
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;直接运行&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ go run hello.go
Hello, world!
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;或者在 &lt;a href=&quot;https://repl.it/languages/go&quot;&gt;Go repl&lt;/a&gt; 中尝试一，&lt;code&gt;go&lt;/code&gt; 命令&lt;a href=&quot;#go-%E5%91%BD%E4%BB%A4&quot;&gt;参考&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;变量&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;var s1 string
s1 = &quot;Learn Go!&quot;
// 一次声明多个变量
var b, c int = 1, 2
var d = true
// 匿名赋值
_ , e = 10, 20 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;简短声明&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;s1 := &quot;Learn Go!&quot;        // string
b, c := 1, 2             // int
d := true                // bool
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;参见：&lt;a href=&quot;#golang-%E5%9F%BA%E6%9C%AC%E7%B1%BB%E5%9E%8B&quot;&gt;基本类型&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;函数&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;package main
import &quot;fmt&quot;
// 程序的入口点
func main() {
  fmt.Println(&quot;Hello world!&quot;)
  say(&quot;Hello Go!&quot;)
}
func say(message string) {
  fmt.Println(&quot;You said: &quot;, message)
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;参见：&lt;a href=&quot;#golang-%E5%87%BD%E6%95%B0&quot;&gt;函数(Functions)&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;注释&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;// 单行注释
/* 这是
多行注释 */
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;if 语句&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;if true {
  fmt.Println(&quot;Yes!&quot;)
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;参见：&lt;a href=&quot;#golang-%E6%9D%A1%E4%BB%B6%E6%8E%A7%E5%88%B6&quot;&gt;条件控制&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Golang 基本类型&lt;/h2&gt;
&lt;h3&gt;字符串 Strings&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;s1 := &quot;Hello&quot; + &quot;World&quot;
s2 := `A &quot;raw&quot; string literal
can include line breaks.`
// 输出：10
fmt.Println(len(s1))
// 输出：Hello
fmt.Println(string(s1[0:5]))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;字符串的类型为 &lt;code&gt;字符串&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;数字 Numbers&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;num := 3             // int
num := 3.            // float64
num := 3 + 4i        // complex128
num := byte(&apos;a&apos;)     // byte (alias: uint8)
var u uint = 7       // uint (unsigned)
var p float32 = 22.7  // 32-bit float
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;操作符 Operators&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;x := 5
x++
fmt.Println(&quot;x + 4 =&quot;, x + 4)
fmt.Println(&quot;x * 4 =&quot;, x * 4) 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;参见：&lt;a href=&quot;#%E8%BF%90%E7%AE%97%E7%AC%A6%E5%92%8C%E6%A0%87%E7%82%B9%E7%AC%A6%E5%8F%B7&quot;&gt;更多操作符&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;布尔值 Booleans&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;isTrue   := true
isFalse  := false
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;操作符&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;fmt.Println(true &amp;amp;&amp;amp; true)   // true 
fmt.Println(true &amp;amp;&amp;amp; false)  // false
fmt.Println(true || true)   // true
fmt.Println(true || false)  // true
fmt.Println(!true)          // false
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;参见：&lt;a href=&quot;#%E8%BF%90%E7%AE%97%E7%AC%A6%E5%92%8C%E6%A0%87%E7%82%B9%E7%AC%A6%E5%8F%B7&quot;&gt;更多操作符&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;数组 Arrays&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;┌────┬────┬────┬────┬─────┬─────┐
| 2  | 3  | 5  | 7  | 11  | 13  |
└────┴────┴────┴────┴─────┴─────┘
  0    1    2    3     4     5
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;primes := [...]int{2, 3, 5, 7, 11, 13}
fmt.Println(len(primes)) // =&amp;gt; 6
// 输出：[2 3 5 7 11 13]
fmt.Println(primes)
// 与 [:3] 相同，输出：[2 3 5]
fmt.Println(primes[0:3])
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;var a [2]string
a[0] = &quot;Hello&quot;
a[1] = &quot;World&quot;
fmt.Println(a[0], a[1]) //=&amp;gt; Hello World
fmt.Println(a)   // =&amp;gt; [Hello World]
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;2d array&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;var twoDimension [2][3]int
for i := 0; i &amp;lt; 2; i++ {
    for j := 0; j &amp;lt; 3; j++ {
        twoDimension[i][j] = i + j
    }
}
// =&amp;gt; 2d:  [[0 1 2] [1 2 3]]
fmt.Println(&quot;2d: &quot;, twoDimension)
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;指针(Pointers)&lt;/h3&gt;
&lt;p&gt;&amp;lt;!--rehype:wrap-class=col-span-2--&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;func main () {
  b := *getPointer()
  fmt.Println(&quot;Value is&quot;, b)
}

func getPointer () (myPointer *int) {
  a := 234
  return &amp;amp;a
}
//申明指针的时候，如果没有指向某个变量，默认值为nil
//不能直接进行操作，包括读写
var p *int
*p = 123      // panic   nil pointer
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;//而用new返回的是有默认值的指针, 为数据类型的默认值
func main(){
  //有一块内存存放了10，它的地址由系统自动分配，别名是a
  a := 10
  //内存存放的10变成了20
  a = 20
  var p *int
  p = &amp;amp;a   //或者直接写 p := &amp;amp;a
  //上面的p是一个指针，通过 *p 的方式同样可以访问 变量a指向 的内存

  /*当你动态申请内存的时候，指针的存在意义之一就被体现出来了*/ 
  ptr := new(int)   
  //申请了一块内存空间，没有办法指定别名，new()返回内存地址，用指针接收
  //此时并没有变量能直接指向这块内存，所以只能通过内存地址来访问
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;参见：&lt;a href=&quot;https://tour.golang.org/moretypes/1&quot;&gt;指针(Pointers)&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;切片(Slices)&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;s := make([]string, 3)
s[0] = &quot;a&quot;
s[1] = &quot;b&quot;
s = append(s, &quot;d&quot;)
s = append(s, &quot;e&quot;, &quot;f&quot;)
fmt.Println(s)
fmt.Println(s[1])
fmt.Println(len(s))
fmt.Println(s[1:3])
slice := []int{2, 3, 4}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;另见：&lt;a href=&quot;https://gobyexample.com/slices&quot;&gt;切片示例&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;常量(Constants)&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;const s string = &quot;constant&quot;
const Phi = 1.618
const n = 500000000
const d = 3e20 / n
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;常量声明可以使用 iota常量生成器 初始化，它用于
生成一组以相似规则初始化的常量，但是不用每行都
写一遍初始化表达式。
注意：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;在一个const声明语句中，在第一个声明的常量所在的行，iota被置为0，然后在每一个有常量声明的行加一。&lt;/li&gt;
&lt;li&gt;写在同一行的值是相同的&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;const (
    a = iota
    b
    c
)
// a = 0, b = 1, c = 2
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;类型转换&lt;/h3&gt;
&lt;p&gt;Go语言中不允许隐式转换，所有类型转换必须显式声明（强制转换），而且转换只能发生在两种相互兼容的类型之间。&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;i := 90
f := float64(i)
u := uint(i)
// 将等于字符Z
s := string(i)
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;字符串与其他类型的相互转换&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;// 字符串转其他类型
str := &quot;90&quot;
// 整数类型
i, err := strconv.Atoi(str)
if err != nil {
    fmt.Println(&quot;转换错误:&quot;, err)
} else {
    fmt.Println(i)
}
// 浮点类型
f, err := strconv.ParseFloat(str, 64)
// []byte 类型
bytes := []byte(str)
// 其他类型转字符串
str = strconv.Itoa(i)
str = strconv.FormatFloat(f, &apos;f&apos;, 2, 64)
str = string(bytes[:])
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Golang 字符串&lt;/h2&gt;
&lt;h3&gt;字符串函数&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;package main
import (
        &quot;fmt&quot;
        s &quot;strings&quot;
)
func main() {
    /* 需要将字符串导入为 s */
        fmt.Println(s.Contains(&quot;test&quot;, &quot;e&quot;))
    /* 内置 */
    fmt.Println(len(&quot;hello&quot;))  // =&amp;gt; 5
    // 输出: 101
        fmt.Println(&quot;hello&quot;[1])
    // 输出: e
        fmt.Println(string(&quot;hello&quot;[1]))
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;fmt.Printf&lt;/h3&gt;
&lt;p&gt;&amp;lt;!--rehype:wrap-class=row-span-2 col-span-2--&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;package main
import (
        &quot;fmt&quot;
        &quot;os&quot;
)
type point struct {
        x, y int
}
func main() {
        p := point{1, 2}
        fmt.Printf(&quot;%v\n&quot;, p)                        // =&amp;gt; {1 2}
        fmt.Printf(&quot;%+v\n&quot;, p)                       // =&amp;gt; {x:1 y:2}
        fmt.Printf(&quot;%#v\n&quot;, p)                       // =&amp;gt; main.point{x:1, y:2}
        fmt.Printf(&quot;%T\n&quot;, p)                        // =&amp;gt; main.point
        fmt.Printf(&quot;%t\n&quot;, true)                     // =&amp;gt; TRUE
        fmt.Printf(&quot;%d\n&quot;, 123)                      // =&amp;gt; 123
        fmt.Printf(&quot;%b\n&quot;, 14)                       // =&amp;gt; 1110
        fmt.Printf(&quot;%c\n&quot;, 33)                       // =&amp;gt; !
        fmt.Printf(&quot;%x\n&quot;, 456)                      // =&amp;gt; 1c8
        fmt.Printf(&quot;%f\n&quot;, 78.9)                     // =&amp;gt; 78.9
        fmt.Printf(&quot;%e\n&quot;, 123400000.0)              // =&amp;gt; 1.23E+08
        fmt.Printf(&quot;%E\n&quot;, 123400000.0)              // =&amp;gt; 1.23E+08
        fmt.Printf(&quot;%s\n&quot;, &quot;\&quot;string\&quot;&quot;)             // =&amp;gt; &quot;string&quot;
        fmt.Printf(&quot;%q\n&quot;, &quot;\&quot;string\&quot;&quot;)             // =&amp;gt; &quot;\&quot;string\&quot;&quot;
        fmt.Printf(&quot;%x\n&quot;, &quot;hex this&quot;)               // =&amp;gt; 6.86578E+15
        fmt.Printf(&quot;%p\n&quot;, &amp;amp;p)                       // =&amp;gt; 0xc00002c040
        fmt.Printf(&quot;|%6d|%6d|\n&quot;, 12, 345)           // =&amp;gt; |    12|   345|
        fmt.Printf(&quot;|%6.2f|%6.2f|\n&quot;, 1.2, 3.45)     // =&amp;gt; |  1.20|  3.45|
        fmt.Printf(&quot;|%-6.2f|%-6.2f|\n&quot;, 1.2, 3.45)   // =&amp;gt; |1.20  |3.45  |
        fmt.Printf(&quot;|%6s|%6s|\n&quot;, &quot;foo&quot;, &quot;b&quot;)        // =&amp;gt; |   foo|     b|
        fmt.Printf(&quot;|%-6s|%-6s|\n&quot;, &quot;foo&quot;, &quot;b&quot;)      // =&amp;gt; |foo   |b     |
        s := fmt.Sprintf(&quot;a %s&quot;, &quot;string&quot;)
        fmt.Println(s)
        fmt.Fprintf(os.Stderr, &quot;an %s\n&quot;, &quot;error&quot;)
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;另见：&lt;a href=&quot;https://golang.org/pkg/fmt/&quot;&gt;fmt&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;函数实例&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;实例&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Contains(&quot;test&quot;, &quot;es&quot;)&lt;/td&gt;
&lt;td&gt;true&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Count(&quot;test&quot;, &quot;t&quot;)&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;HasPrefix(&quot;test&quot;, &quot;te&quot;)&lt;/td&gt;
&lt;td&gt;true&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;HasSuffix(&quot;test&quot;, &quot;st&quot;)&lt;/td&gt;
&lt;td&gt;true&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Index(&quot;test&quot;, &quot;e&quot;)&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Join([]string{&quot;a&quot;, &quot;b&quot;}, &quot;-&quot;)&lt;/td&gt;
&lt;td&gt;a-b&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Repeat(&quot;a&quot;, 5)&lt;/td&gt;
&lt;td&gt;aaaaa&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Replace(&quot;foo&quot;, &quot;o&quot;, &quot;0&quot;, -1)&lt;/td&gt;
&lt;td&gt;f00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Replace(&quot;foo&quot;, &quot;o&quot;, &quot;0&quot;, 1)&lt;/td&gt;
&lt;td&gt;f0o&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Split(&quot;a-b-c-d-e&quot;, &quot;-&quot;)&lt;/td&gt;
&lt;td&gt;[a b c d e]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ToLower(&quot;TEST&quot;)&lt;/td&gt;
&lt;td&gt;test&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ToUpper(&quot;test&quot;)&lt;/td&gt;
&lt;td&gt;TEST&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Golang 条件控制&lt;/h2&gt;
&lt;h3&gt;有条件的&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;a := 10
if a &amp;gt; 20 {
    fmt.Println(&quot;&amp;gt;&quot;)
} else if a &amp;lt; 20 {
    fmt.Println(&quot;&amp;lt;&quot;)
} else {
    fmt.Println(&quot;=&quot;)
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;if 中的语句&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;x := &quot;hello go!&quot;
if count := len(x); count &amp;gt; 0 {
    fmt.Println(&quot;Yes&quot;)
}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;if _, err := doThing(); err != nil {
    fmt.Println(&quot;Uh oh&quot;)
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Switch&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;x := 42.0
switch x {
  case 0:
  case 1, 2:
      fmt.Println(&quot;Multiple matches&quot;)
  case 42:   // Don&apos;t &quot;fall through&quot;.
      fmt.Println(&quot;reached&quot;)
  case 43:
      fmt.Println(&quot;Unreached&quot;)
  default:
      fmt.Println(&quot;Optional&quot;)
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;参见：&lt;a href=&quot;https://github.com/golang/go/wiki/Switch&quot;&gt;Switch&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;For loop&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;for i := 0; i &amp;lt;= 10; i++ {
  fmt.Println(&quot;i: &quot;, i)
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;对于 Range 循环&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;nums := []int{2, 3, 4}
sum := 0
for _, num := range nums {
  sum += num
}
fmt.Println(&quot;sum:&quot;, sum)
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;For 循环&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;i := 1
for i &amp;lt;= 3 {
  fmt.Println(i)
  i++
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Continue 关键字&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;for i := 0; i &amp;lt;= 5; i++ {
  if i % 2 == 0 {
      continue
  }
  fmt.Println(i)
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Break 关键字&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;for {
  fmt.Println(&quot;loop&quot;)
  break
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Golang 结构和Maps&lt;/h2&gt;
&lt;h3&gt;定义&lt;/h3&gt;
&lt;p&gt;&amp;lt;!--rehype:wrap-class=row-span-2--&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;package main
import (
        &quot;fmt&quot;
)
type Vertex struct {
        X int
        Y int
}
func main() {
        v := Vertex{1, 2}
        v.X = 4
        fmt.Println(v.X, v.Y) // =&amp;gt; 4 2
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;参见：&lt;a href=&quot;https://tour.golang.org/moretypes/2&quot;&gt;结构(Structs)&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;字面量&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;v := Vertex{X: 1, Y: 2}
// Field names can be omitted
v := Vertex{1, 2}
// Y is implicit
v := Vertex{X: 1}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;您还可以输入字段名&lt;/p&gt;
&lt;h3&gt;Maps&lt;/h3&gt;
&lt;p&gt;&amp;lt;!--rehype:wrap-class=row-span-2--&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;m := make(map[string]int)
m[&quot;k1&quot;] = 7
m[&quot;k2&quot;] = 13
fmt.Println(m) // =&amp;gt; map[k1:7 k2:13]
v1 := m[&quot;k1&quot;]
fmt.Println(v1)     // =&amp;gt; 7
fmt.Println(len(m)) // =&amp;gt; 2
delete(m, &quot;k2&quot;)
fmt.Println(m) // =&amp;gt; map[k1:7]
_, prs := m[&quot;k2&quot;]
fmt.Println(prs) // =&amp;gt; false
n := map[string]int{&quot;foo&quot;: 1, &quot;bar&quot;: 2}
fmt.Println(n) // =&amp;gt; map[bar:2 foo:1]
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;指向结构的指针&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;v := &amp;amp;Vertex{1, 2}
v.X = 2
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Doing &lt;code&gt;v.X&lt;/code&gt; is the same as doing &lt;code&gt;(*v).X&lt;/code&gt;, when &lt;code&gt;v&lt;/code&gt; is a pointer.&lt;/p&gt;
&lt;h2&gt;Golang 函数&lt;/h2&gt;
&lt;h3&gt;多个参数&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;func plus(a int, b int) int {
    return a + b
}
func plusPlus(a, b, c int) int {
    return a + b + c
}
fmt.Println(plus(1, 2))
fmt.Println(plusPlus(1, 2, 3))
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;多返回值&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;func vals() (int, int) {
  return 3, 7
}
a, b := vals()
fmt.Println(a)    // =&amp;gt; 3
fmt.Println(b)    // =&amp;gt; 7
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;匿名函数&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;r1, r2 := func() (string, string) {
    x := []string{&quot;hello&quot;, &quot;world&quot;}
    return x[0], x[1]
}()
// =&amp;gt; hello world
fmt.Println(r1, r2)
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;命名返回值&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;func split(sum int) (x, y int) {
  x = sum * 4 / 9
  y = sum - x
  return
}
x, y := split(17)
fmt.Println(x)   // =&amp;gt; 7
fmt.Println(y)   // =&amp;gt; 10
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;可变参数函数&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;func sum(nums ...int) {
  fmt.Print(nums, &quot; &quot;)
  total := 0
  for _, num := range nums {
      total += num
  }
  fmt.Println(total)
}
sum(1, 2)     // =&amp;gt; [1 2] 3
sum(1, 2, 3)  // =&amp;gt; [1 2 3] 6
nums := []int{1, 2, 3, 4}
sum(nums...)  // =&amp;gt; [1 2 3 4] 10
// 不定参在内存中是连续存储的
// 不定参内部再传递的时候，参数也要是不定的
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;初始化函数&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;import --&amp;gt; const --&amp;gt; var --&amp;gt; init()
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;var num = setNumber()
func setNumber() int {
  return 42
}
func init() {
  num = 0
}
func main() {
  fmt.Println(num) // =&amp;gt; 0
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;作为值的函数&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;func main() {
  // 将函数赋给名称
  add := func(a, b int) int {
      return a + b
  }
  // 使用名称调用函数
  fmt.Println(add(3, 4)) // =&amp;gt; 7
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;闭包&lt;/h3&gt;
&lt;p&gt;&amp;lt;!--rehype:wrap-class=col-span-2 row-span-2--&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;func outer() (func() int, int) {
    outer_var := 2
    inner := func() int {
        outer_var += 99
        return outer_var
    }
    inner()
    return inner, outer_var
}
inner, val := outer()
fmt.Println(val)
// =&amp;gt; 101
fmt.Println(inner())
// =&amp;gt; 200，这里涉及到golang中闭包和内存逃逸的概念，inner()实际上执行了两次，outer()中一次，fmt又一次，
//但为什么是200呢，编译器不能确定outer_var在后续会不会使用，
//所以outer_var不会随着outer()结束而释放它的栈（Stack）空间，
//而会‘逃逸到’堆（Heap）上，那么第二次的inner()中outer_var就会是101。
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;关闭 1&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;func scope() func() int{
  outer_var := 2
  foo := func() int {return outer_var}
  return foo
}
// Outpus: 2
fmt.Println(scope()())
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Golang 包(Packages)&lt;/h2&gt;
&lt;h3&gt;导入&lt;/h3&gt;
&lt;p&gt;&amp;lt;!--rehype:wrap-class=row-span-2--&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;import &quot;fmt&quot;
import &quot;math/rand&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;等同于&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;import (
  &quot;fmt&quot;        // 给 fmt.Println
  &quot;math/rand&quot;  // 给 rand.Intn
)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;另见：&lt;a href=&quot;https://tour.golang.org/basics/1&quot;&gt;导入&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;别名&lt;/h3&gt;
&lt;p&gt;&amp;lt;!--rehype:wrap-class=row-span-2--&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;import r &quot;math/rand&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;import (
    &quot;fmt&quot;
    r &quot;math/rand&quot;
)
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;r.Intn()
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Packages&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;package main
// 一个内部包只能被另一个包导入
// 那是在以内部目录的父级为根的树内
package internal
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;另见：&lt;a href=&quot;https://go.dev/doc/go1.4#internalpackages&quot;&gt;内部包&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;导出名称&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;// 以大写字母开头
func Hello () {
  ···
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;另见：&lt;a href=&quot;https://tour.golang.org/basics/3&quot;&gt;导出的名称&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Golang 并发&lt;/h2&gt;
&lt;h3&gt;协程&lt;/h3&gt;
&lt;p&gt;&amp;lt;!--rehype:wrap-class=row-span-2--&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;package main
import (
    &quot;fmt&quot;
    &quot;time&quot;
)
func f(from string) {
    for i := 0; i &amp;lt; 3; i++ {
            fmt.Println(from, &quot;:&quot;, i)
    }
}
func main() {
    f(&quot;direct&quot;)
    go f(&quot;goroutine&quot;)
    go func(msg string) {
            fmt.Println(msg)
    }(&quot;going&quot;)
    time.Sleep(time.Second)
    fmt.Println(&quot;done&quot;)
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;参见：&lt;a href=&quot;https://tour.golang.org/concurrency/1&quot;&gt;Goroutines&lt;/a&gt;, &lt;a href=&quot;https://tour.golang.org/concurrency/2&quot;&gt;Channels&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;WaitGroup&lt;/h3&gt;
&lt;p&gt;&amp;lt;!--rehype:wrap-class=row-span-2--&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;package main
import (
    &quot;fmt&quot;
    &quot;sync&quot;
    &quot;time&quot;
)
func w(id int, wg *sync.WaitGroup) {
    defer wg.Done()
    fmt.Printf(&quot;%d starting\n&quot;, id)
    time.Sleep(time.Second)
    fmt.Printf(&quot;%d done\n&quot;, id)
}
func main() {
    var wg sync.WaitGroup
    for i := 1; i &amp;lt;= 5; i++ {
            wg.Add(1)
            go w(i, &amp;amp;wg)
    }
    wg.Wait()
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;参见：&lt;a href=&quot;https://golang.org/pkg/sync/#WaitGroup&quot;&gt;WaitGroup&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Closing channels&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;ch &amp;lt;- 1
ch &amp;lt;- 2
ch &amp;lt;- 3
close(ch) // 关闭频道
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;// 迭代通道直到关闭
for i := range ch {
  ···
}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;// Closed if `ok == false`
v, ok := &amp;lt;- ch
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;参见：&lt;a href=&quot;https://tour.golang.org/concurrency/4&quot;&gt;范围和关闭&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;缓冲通道&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;ch := make(chan int, 2)
ch &amp;lt;- 1
ch &amp;lt;- 2
ch &amp;lt;- 3
// 致命错误：
// 所有 goroutine 都处于休眠状态 - 死锁
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;参见：&lt;a href=&quot;https://tour.golang.org/concurrency/3&quot;&gt;缓冲通道&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Context&lt;/h3&gt;
&lt;p&gt;&amp;lt;!--rehype:wrap-class=col-span-2 row-span-2--&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;package main

import (
    &quot;context&quot;
    &quot;fmt&quot;
    &quot;time&quot;
)

func main() {
    // 创建根 context
    ctx := context.Background() // 空 context，通常作为根 context
    todo := context.TODO()      // 当不确定使用哪个 context 时使用

    // 创建带取消功能的 context
    ctx, cancel := context.WithCancel(context.Background())
    defer cancel() // 确保所有路径都调用取消函数

    // 创建带超时的 context
    ctx, cancel = context.WithTimeout(context.Background(), 100*time.Millisecond)
    defer cancel()

    // 创建带截止时间的 context
    deadline := time.Now().Add(200 * time.Millisecond)
    ctx, cancel = context.WithDeadline(context.Background(), deadline)
    defer cancel()

    // 创建带值的 context
    ctx = context.WithValue(context.Background(), &quot;key&quot;, &quot;value&quot;)
    
    // 从 context 获取值
    value := ctx.Value(&quot;key&quot;)
    fmt.Println(value)
    
    // 检查 context 是否已取消
    select {
    case &amp;lt;-ctx.Done():
        fmt.Println(&quot;Context canceled:&quot;, ctx.Err())
    default:
        fmt.Println(&quot;Context still valid&quot;)
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Golang 错误控制&lt;/h2&gt;
&lt;h3&gt;延迟函数&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;func main() {
  defer func() {
    fmt.Println(&quot;Done&quot;)
  }()
  fmt.Println(&quot;Working...&quot;)
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Lambda defer&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;func main() {
  var d = int64(0)
  defer func(d *int64) {
    fmt.Printf(&quot;&amp;amp; %v Unix Sec\n&quot;, *d)
  }(&amp;amp;d)
  fmt.Print(&quot;Done &quot;)
  d = time.Now().Unix()
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;defer&lt;/code&gt; 函数使用当前值&lt;code&gt;d&lt;/code&gt;，除非我们使用指针在 &lt;code&gt;main&lt;/code&gt; 末尾获取最终值&lt;/p&gt;
&lt;h3&gt;Defer&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;func main() {
  defer fmt.Println(&quot;Done&quot;)
  fmt.Println(&quot;Working...&quot;)
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;参见：&lt;a href=&quot;https://blog.golang.org/defer-panic-and-recover&quot;&gt;Defer, panic and recover&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Golang 方法(Methods)&lt;/h2&gt;
&lt;p&gt;&amp;lt;!--rehype:body-class=cols-2--&amp;gt;&lt;/p&gt;
&lt;h3&gt;接收器&lt;/h3&gt;
&lt;p&gt;&amp;lt;!--rehype:wrap-class=row-span-2--&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;//Go语言中的方法（Method）是一种作用于特定类型变量的函数。
//这种特定类型变量叫做接收者（Receiver）。
//接收者的概念就类似于其他语言中的 this 或者 self。
//方法的定义格式如下：
func (接收者变量 接收者类型) 方法名(参数列表) (返回参数) {
    函数体
}
// 其中，
//     1.接收者变量：接收者中的参数变量名在命名时，官方建议使用接收者类型名
//的第一个小写字母，而不是self、this之类的命名。例如，Person类型的接收者变量
// 应该命名为 p，Connector类型的接收者变量应该命名为c等。
//     2.接收者类型：接收者类型和参数类似，可以是指针类型和非指针类型。
//     3.方法名、参数列表、返回参数：具体格式与函数定义相同。
type Vertex struct {
  X, Y float64
}

func (v Vertex) Abs() float64 {
  return math.Sqrt(v.X * v.X + v.Y * v.Y)
}
func (v Vertex) valuechange() float64 {
  v.X += 1
  return v.X
}
func (v *Vertex) pointerchange() float64 {
  v.X += 1
  return v.X
}
func main() {
  v := Vertex{1, 2}
  v.Abs()

  v = Vertex{1, 2}
  fmt.Println(v.valuechange())  // 2
  fmt.Println(v)                // {1 2}

  v = Vertex{1, 2}
  fmt.Println(v.pointerchange())// 2
  fmt.Println(v)                // {2 2}
}
//如果在方法里修改receiver的值要对caller生效，使用 pointer receiver。

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;参见：&lt;a href=&quot;https://tour.golang.org/methods/1&quot;&gt;Methods&lt;/a&gt;，&lt;a href=&quot;https://tour.golang.org/methods/4&quot;&gt;指针接收器&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;方法表达式&lt;/h3&gt;
&lt;p&gt;方法表达式相当于提供一种语法将类型方法调用显式地转换为函数调用，接收者(receiver)必须显式地传递进去。&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;func (t T) Get(){
    return t.a
}
func (t *T) Set(i int){
    t.a = i
}
//表达式`T.Get`和`(*T).Set`被称为方法表达式，
//需要注意的是在方法表达式中编译器不会做自动转换。
//值调用会自动转换，表达式调用则不会，例如：
type Data struct{}
func (Data) TestValue () {}
func (*Data) TestPointer () {} 
//声明一个类型变量a
var a Data= struct{}{}
//表达式调用编译器不会进行自动转换
Data.TestValue(a) 
//Data.TestValue(&amp;amp;a) 
(*Data).TestPointer (&amp;amp;a) 
//Data.TestPointer(&amp;amp;a) //type Data has no method TestPointer 
//值调用编译器会进行自动转换
y : = (&amp;amp;a).TestValue //编译器帮助转换a.TestValue
g : = a.TestPointer //会转换为(&amp;amp;a).TestPointer 
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;组合结构的方法集&lt;/h4&gt;
&lt;p&gt;内嵌字段的访问不需要使用全路径，只要保证命名是唯一的就可以，尽量避免同名。如果外层字段和内层字段有相同的方法，则使用简化模式访问外层方法会覆盖内层的方法。&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;x : = X{a: 1} 
y : = Y{ 
    X : x , 
    b : 2 , 
}
z : = z { 
    Y : y , 
    c : 3 ,
}//组合结构，内嵌字段
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;组合结构的方法集有如下规则：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;若类型 T 包含匿名字段 S ，则 T 的方法集包含S的方法集&lt;/li&gt;
&lt;li&gt;若类型 T 包含匿名字段 &lt;em&gt;S ，则 T 的方法集包含 S 和&lt;/em&gt;S方法集&lt;/li&gt;
&lt;li&gt;不管类型 T 中嵌入的匿名字段是 S 还是 *S ，*T 方法集总是包含 S 和 *S 方法集&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Golang 接口(Interfaces)&lt;/h2&gt;
&lt;p&gt;&amp;lt;!--rehype:body-class=cols-2--&amp;gt;&lt;/p&gt;
&lt;h3&gt;基本接口(Interfaces)&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;type Shape interface {
  Area() float64
  Perimeter() float64
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;结构(Struct)&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;type Rectangle struct {
  Length, Width float64
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;结构 &lt;code&gt;Rectangle&lt;/code&gt; 通过实现其所有方法隐式实现接口 &lt;code&gt;Shape&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;方法(Methods)&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;func (r Rectangle) Area() float64 {
  return r.Length * r.Width
}
func (r Rectangle) Perimeter() float64 {
  return 2 * (r.Length + r.Width)
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;在 &lt;code&gt;Shape&lt;/code&gt; 中定义的方法在&lt;code&gt;Rectangle&lt;/code&gt;中实现&lt;/p&gt;
&lt;h3&gt;接口实例&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;func main() {
  var r Shape = Rectangle{Length: 3, Width: 4}
  fmt.Printf(&quot;Type of r: %T, Area: %v, Perimeter: %v.&quot;, r, r.Area(), r.Perimeter())
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;!--rehype:className=wrap-text --&amp;gt;&lt;/p&gt;
&lt;h2&gt;Golang Embed (Go version &amp;gt;= 1.16)&lt;/h2&gt;
&lt;h3&gt;嵌入为string&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;package main

import (
    _ &quot;embed&quot;
    &quot;fmt&quot;
)

//go:embed version.txt
var version string

func main() {
    fmt.Printf(&quot;version %q\n&quot;, version)
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;嵌入为[]byte&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;package main
import (
    _ &quot;embed&quot;
    &quot;fmt&quot;
)

//go:embed version.txt
var versionByte []byte

func main() {
    fmt.Printf(&quot;version %q\n&quot;, string(versionByte))
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;嵌入为embed.FS&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;//go:embed hello.txt
var f embed.FS
func main() {
  data, _ := f.ReadFile(&quot;hello.txt&quot;)
  fmt.Println(string(data))
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;嵌入多个文件&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;//go:embed hello.txt
//go:embed hello2.txt
var f embed.FS
func main() {
  data, _ := f.ReadFile(&quot;hello.txt&quot;)
  fmt.Println(string(data))
  data, _ = f.ReadFile(&quot;hello2.txt&quot;)
  fmt.Println(string(data))
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;嵌入子文件夹下的文件&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;//go:embed p/hello.txt p/hello2.txt
var f embed.FS
func main() {
  data, _ := f.ReadFile(&quot;p/hello.txt&quot;)
  fmt.Println(string(data))
  data, _ = f.ReadFile(&quot;p/hello2.txt&quot;)
  fmt.Println(string(data))
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;同一个文件嵌入为多个变量&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;//go:embed hello.txt
var s string
//go:embed hello.txt
var s2 string
func main() {
  fmt.Println(s)
  fmt.Println(s2)
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;匹配模式&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;//go:embed p/*
var f embed.FS
func main() {
  data, _ := f.ReadFile(&quot;p/.hello.txt&quot;)
  fmt.Println(string(data))
  data, _ = f.ReadFile(&quot;p/q/.hi.txt&quot;) // 没有嵌入 p/q/.hi.txt
  fmt.Println(string(data))
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Golang 泛型 (Go version &amp;gt;= 1.18)&lt;/h2&gt;
&lt;h3&gt;泛型类型&lt;/h3&gt;
&lt;p&gt;&amp;lt;!--rehype:wrap-class=row-span-1--&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;type S[T int|float32|float64 ] []T
       ┬  ────────┬──────── 
       ┆          ╰─── 2. 类型约束
       ╰────────────── 1. 类型形参
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;!--rehype:className=wrap-text --&amp;gt;&lt;/p&gt;
&lt;p&gt;可以使用类型实参 int 或 string 实例化&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;type MyMap[K int|string, V float32 | float64] map[K]V

var a MyMap[string, float64] = map[string]float64{
    &quot;jack_score&quot;: 9.6,
    &quot;bob_score&quot;:  8.4,
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;!--rehype:className=wrap-text --&amp;gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;匿名结构体不支持泛型&lt;/strong&gt;&amp;lt;!--rehype:style=color: #b43c29;--&amp;gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;匿名函数不支持泛型&lt;/strong&gt;&amp;lt;!--rehype:style=color: #b43c29;--&amp;gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;泛型函数&lt;/h3&gt;
&lt;p&gt;&amp;lt;!--rehype:wrap-class=row-span-1--&amp;gt;&lt;/p&gt;
&lt;p&gt;任意类型&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;func Add[T any](a,b T) T {
    return  a+b
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;对类型进行约束&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;func Add[T string | int | int8](a,b T) T {
    return  a+b
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;类型嵌套&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;type WowStruct[T int | float32, S []T] struct {
    Data     S
    MaxValue T
    MinValue T
}

var ws WowStruct[int, []int]  
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;!--rehype:className=wrap-text --&amp;gt;&lt;/p&gt;
&lt;p&gt;泛型函数中进行类型声明 (go version &amp;gt;= 1.20)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;func F[T1 any]() {
    type x struct{} 
    type y = x      
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;泛型约束&lt;/h3&gt;
&lt;p&gt;&amp;lt;!--rehype:wrap-class=row-span-2--&amp;gt;&lt;/p&gt;
&lt;p&gt;通过接口实现&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;type Addable interface{
    type int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64, uintptr, float32, float64, complex64, complex128, string 
}

func Add[T Addable](a,b T) T {
    return  a+b
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;!--rehype:className=wrap-text --&amp;gt;&lt;/p&gt;
&lt;p&gt;使用 ~ 符号&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;type Int interface {
    ~int | ~int8 | ~int16 | ~int32 | ~int64
}

type Uint interface {
    ~uint | ~uint8 | ~uint16 | ~uint32
}
type Float interface {
    ~float32 | ~float64
}

type Slice[T Int | Uint | Float] []T 

var s Slice[int] // 正确

type MyInt int
var s2 Slice[MyInt]  // MyInt底层类型是int，所以可以用于实例化

type MyMyInt MyInt
var s3 Slice[MyMyInt]  // 正确。MyMyInt 虽然基于 MyInt ，但底层类型也是int，所以也能用于实例化

type MyFloat32 float32  // 正确
var s4 Slice[MyFloat32]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;!--rehype:className=wrap-text --&amp;gt;&lt;/p&gt;
&lt;p&gt;使用 ~ 时的限制：
&amp;lt;!--rehype:style=color: #b43c29;--&amp;gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;~后面的类型不能为接口&lt;/li&gt;
&lt;li&gt;~后面的类型必须为基本类型
&amp;lt;!--rehype:style=color: #b43c29;--&amp;gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;泛型 Receiver&lt;/h3&gt;
&lt;p&gt;&amp;lt;!--rehype:wrap-class=row-span-1--&amp;gt;&lt;/p&gt;
&lt;p&gt;定义普通类型支持泛型&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;type MySlice[T int | float32] []T

func (s MySlice[T]) Sum() T {
    var sum T
    for _, value := range s {
        sum += value
    }
    return sum
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;!--rehype:className=wrap-text --&amp;gt;&lt;/p&gt;
&lt;p&gt;结构体支持泛型&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;type A[T int | float32 | float64] struct {
}

func (receiver A[T]) Add(a T, b T) T {
    return a + b
}

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;!--rehype:className=wrap-text --&amp;gt;&lt;/p&gt;
&lt;h3&gt;泛型接口&lt;/h3&gt;
&lt;p&gt;&amp;lt;!--rehype:wrap-class=row-span-1--&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;type Uint interface { // 接口 Uint 中有类型，所以是一般接口
    ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64
}

type ReadWriter interface {  // ReadWriter 接口既有方法也有类型，所以是一般接口
    ~string | ~[]rune

    Read(p []byte) (n int, err error)
    Write(p []byte) (n int, err error)
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;!--rehype:className=wrap-text --&amp;gt;&lt;/p&gt;
&lt;p&gt;一般接口类型不能用来定义变量，只能用于泛型的类型约束中
&amp;lt;!--rehype:style=color: #b43c29;--&amp;gt;&lt;/p&gt;
&lt;h2&gt;杂项&lt;/h2&gt;
&lt;h3&gt;关键字(Keywords)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;break&lt;/li&gt;
&lt;li&gt;default&lt;/li&gt;
&lt;li&gt;func&lt;/li&gt;
&lt;li&gt;interface&lt;/li&gt;
&lt;li&gt;select&lt;/li&gt;
&lt;li&gt;case&lt;/li&gt;
&lt;li&gt;defer&lt;/li&gt;
&lt;li&gt;go&lt;/li&gt;
&lt;li&gt;map&lt;/li&gt;
&lt;li&gt;struct&lt;/li&gt;
&lt;li&gt;chan&lt;/li&gt;
&lt;li&gt;else&lt;/li&gt;
&lt;li&gt;goto&lt;/li&gt;
&lt;li&gt;package&lt;/li&gt;
&lt;li&gt;switch&lt;/li&gt;
&lt;li&gt;const&lt;/li&gt;
&lt;li&gt;fallthrough&lt;/li&gt;
&lt;li&gt;if&lt;/li&gt;
&lt;li&gt;range&lt;/li&gt;
&lt;li&gt;type&lt;/li&gt;
&lt;li&gt;continue&lt;/li&gt;
&lt;li&gt;for&lt;/li&gt;
&lt;li&gt;import&lt;/li&gt;
&lt;li&gt;return&lt;/li&gt;
&lt;li&gt;var
&amp;lt;!--rehype:className=cols-3 style-none--&amp;gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;运算符和标点符号&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;+&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;amp;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;+=&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;amp;=&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;==&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;!=&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;(&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;)&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;|&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;-=&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;|=&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;||&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;lt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;lt;=&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;[&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;]&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;*&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;^&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;*=&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;^=&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;lt;-&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;gt;=&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;{&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;}&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;lt;&amp;lt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/=&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;lt;&amp;lt;=&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;++&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;=&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;:=&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;,&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;;&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;%&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;gt;&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;%=&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;gt;&amp;gt;=&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;--&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;!&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;...&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;:&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;amp;^&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;amp;^=&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Go 命令&lt;/h2&gt;
&lt;h3&gt;Go 编译器命令&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;:-&lt;/th&gt;
&lt;th&gt;--&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;go command [参数]&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;go 命令 [参数]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;go build&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;编译包和依赖包&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;go clean&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;移除对象和缓存文件&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;go doc&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;显示包的文档&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;go env&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;打印go的环境变量信息&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;go bug&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;报告bug&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;go fix&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;更新包使用新的api&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;go fmt&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;格式规范化代码&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;go generate&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;通过处理资源生成go文件&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;go get&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;下载并安装包及其依赖&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;go install&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;编译和安装包及其依赖&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;go list&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;列出所有包&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;go run&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;编译和运行go程序&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;go test&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;测试&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;go tool&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;运行给定的go工具&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;go version&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;显示go当前版本&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;go vet&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;发现代码中可能的错误&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;ENV&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;:-&lt;/th&gt;
&lt;th&gt;--&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GOOS&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;编译系统&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GOARCH&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;编译arch&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GO111MODULE&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;gomod开关&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GOPROXY&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;go代理 &lt;a href=&quot;https://goproxy.io&quot;&gt;https://goproxy.io&lt;/a&gt;  &lt;a href=&quot;https://goproxy.cn&quot;&gt;https://goproxy.cn&lt;/a&gt;  &lt;a href=&quot;https://mirrors.aliyun.com/goproxy/&quot;&gt;https://mirrors.aliyun.com/goproxy/&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GOSSAFUNC&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;生成 &lt;code&gt;SSA.html&lt;/code&gt; 文件，展示代码优化的每一步 &lt;code&gt;GOSSAFUNC=func_name go build&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;lt;!--rehype:className=style-list-arrow--&amp;gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Module&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;:-&lt;/th&gt;
&lt;th&gt;--&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;go mod init&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;初始化当前文件夹，创建go.mod文件&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;go mod download&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;下载依赖的module到本地&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;go mod tidy&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;增加缺少的module，删除无用的module&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;go mod vendor&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;将依赖复制到vendor下&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;文件 &lt;code&gt;go.mod&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;依赖列表和版本约束&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;文件 &lt;code&gt;go.sum&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;记录 &lt;code&gt;module&lt;/code&gt; 文件 &lt;code&gt;hash&lt;/code&gt; 值，用于安全校验&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;lt;!--rehype:className=style-list-arrow--&amp;gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;另见&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://devhints.io/go&quot;&gt;Devhints&lt;/a&gt; &lt;em&gt;(devhints.io)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://tour.golang.org/welcome/1&quot;&gt;A tour of Go&lt;/a&gt; &lt;em&gt;(tour.golang.org)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/golang/go/wiki/&quot;&gt;Golang wiki&lt;/a&gt; &lt;em&gt;(github.com)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://golang.org/doc/effective_go.html&quot;&gt;Effective Go&lt;/a&gt; &lt;em&gt;(golang.org)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://gobyexample.com/&quot;&gt;Go by Example&lt;/a&gt; &lt;em&gt;(gobyexample.com)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://awesome-go.com/&quot;&gt;Awesome Go&lt;/a&gt; &lt;em&gt;(awesome-go.com)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.youtube.com/channel/UC_BzFbxG2za3bp5NRRRXJSw&quot;&gt;JustForFunc Youtube&lt;/a&gt; &lt;em&gt;(youtube.com)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/golang/go/wiki/CodeReviewComments&quot;&gt;Style Guide&lt;/a&gt; &lt;em&gt;(github.com)&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
</content:encoded></item><item><title>利用AxisNow + Cloudflare实现国内自建CDN分流</title><link>https://arisaka.eth.limo/posts/axisnow/</link><guid isPermaLink="true">https://arisaka.eth.limo/posts/axisnow/</guid><description>利用AxisNow + Cloudflare实现国内自建CDN分流，实现国内海外高速访问</description><pubDate>Fri, 24 Jul 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;简介&lt;/h2&gt;
&lt;p&gt;AxisNow 是一个企业级边缘应用代理，为网站、应用程序和 API 提供安全，性能和连通性 — 所有这些都在您控制的基础设施上运行。&amp;lt;br&amp;gt;
免费用户拥有最多 3 个边缘，最多 10 个资源，最多 100 个别名，足够个人用户使用。&amp;lt;br&amp;gt;
首先你要有一台国内优化VPS，两个域名，一张外币卡（用于订阅Cloudflare Saas免费版），如果准备好了那就让我们开始&amp;lt;br&amp;gt;&lt;/p&gt;
&lt;h2&gt;名词解释&lt;/h2&gt;
&lt;p&gt;我们先来理解一下本文用到的一些名词术语。&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;代理域：是您提供给客户端访问的业务域名，也是实际在边缘进行反向代理的主机名。&lt;/li&gt;
&lt;li&gt;虚拟域：该域名是专为 Cloudflare 创建的配置载体。需将 DNS 托管至 CF。&lt;/li&gt;
&lt;li&gt;回源域：此域名在虚拟域中配置解析记录指向您的源服务器，并开启小黄云。&lt;/li&gt;
&lt;li&gt;调度域：是工作在 DNS 层的解析域名。对于客户端/访客来说，并不需要知道该域名。
&lt;img src=&quot;https://writer.000.moe/media/posts/451fb98e9330b76577e1a12a02428fc0.jpg&quot; alt=&quot;&quot; /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;设置虚拟域（Cloudflare）&lt;/h2&gt;
&lt;p&gt;以我自己为例，我有两个域名（000.moe，746434.xyz），000.moe是用于访问的域名，746434.xyz是用于回源的域名&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;将域名全部托管到Cloudflare&lt;/li&gt;
&lt;li&gt;添加一个虚拟域，在746434.xyz的DNS记录中添加A记录(source.746434.xyz)并指向你的VPS地址，并且&lt;code&gt;打开&lt;/code&gt;小黄云&lt;/li&gt;
&lt;li&gt;进入Saas界面（依次点击746434.xyz - SSL/TLS - 自定义主机名），如果你第一次使用，需要先进行外币卡验证&lt;/li&gt;
&lt;li&gt;在回退源填入虚拟域（source.746434.xyz），等待验证成功
&lt;img src=&quot;https://writer.000.moe/media/posts/5912032f961e99f5316b7372b9a734d8.png&quot; alt=&quot;1768901049791.png&quot; /&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;安装边缘节点（AxisNow）&lt;/h2&gt;
&lt;p&gt;AxisNow提供了一键安装脚本，依次点击边缘 - 新增 - 生成并复制，然后粘贴到SSH安装(注意：安装前请确保80 443端口未占用）&lt;/p&gt;
&lt;h2&gt;设置DNS路由（AxisNow）&lt;/h2&gt;
&lt;p&gt;依次点击策略 - 插件 - DNS路由&amp;lt;br&amp;gt;
选择AxisNow 托管，新增一个A记录路由（cn.alidns-3.com）&amp;lt;br&amp;gt;&lt;/p&gt;
&lt;p&gt;点击域名进入路由规则管理，创建一条路由规则：&amp;lt;br&amp;gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;线路配置为 默认 。&lt;/li&gt;
&lt;li&gt;地址池配置为中国大陆优化的 EIP 地址。&lt;/li&gt;
&lt;li&gt;地址监控选择默认监控模版：Default China Network 。&lt;/li&gt;
&lt;li&gt;地址选取策略为最小延迟 。&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/0008032097a7c7b6fdd7125ef6fe11b4.png&quot; alt=&quot;chrome_abYJbkNdTT.png&quot; /&gt;&lt;/p&gt;
&lt;p&gt;选择AxisNow 托管，新增一个CNAME记录路由（all.alidns-3.com）&amp;lt;br&amp;gt;&lt;/p&gt;
&lt;p&gt;点击域名进入路由规则管理，创建一条路由规则:&amp;lt;br&amp;gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;创建 默认 线路路由规则&lt;/li&gt;
&lt;li&gt;地址池为 &lt;code&gt;cn.alidns-3.com&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;地址监控关联 无需选择&lt;/li&gt;
&lt;li&gt;地址选取策略 随机&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;再创建一条路由规则&amp;lt;br&amp;gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;创建 地域-境外 线路路由规则&lt;/li&gt;
&lt;li&gt;地址池为 &lt;code&gt;source.746434.xyz&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;地址监控关联 无需选择&lt;/li&gt;
&lt;li&gt;地址选取策略 随机&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/10753d1cb7dbae62a8380910cac95b50.png&quot; alt=&quot;1768900991471.png&quot; /&gt;&lt;/p&gt;
&lt;p&gt;所得&lt;code&gt;all.alidns-3.com&lt;/code&gt;即为最终调度域，我们所选择的是最简单国外CF，国内反代，边缘节点数量和其他配置自己按需添加，&lt;/p&gt;
&lt;h2&gt;设置代理域，回源域（Cloudflare）&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;添加一个回源域，在746434.xyz的DNS记录中添加CNAME记录(cdn.746434.xyz)并指向调度域（all.alidns-3.com），并&lt;code&gt;关闭&lt;/code&gt;小黄云&lt;/li&gt;
&lt;li&gt;添加一个代理域，在000.moe的DNS记录中添加CNAME记录(blog.000.moe)并指向回源域(cdn.746434.xyz)&lt;/li&gt;
&lt;li&gt;回到Saas界面，添加自定义主机名，自定义主机名为代理域（blog.000.moe），其他默认&lt;/li&gt;
&lt;li&gt;等待30s左右刷新，并添加TXT记录验证域名签发证书&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;设置反向代理（AxisNow）&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;点击端点 - 资源，新增资源&lt;/li&gt;
&lt;li&gt;请求配置为代理域（blog.000.moe），协议HTTPS，端口443&lt;/li&gt;
&lt;li&gt;转发配置为实际部署域名或IP，我的博客是放在GitHub上的，所以填miuna-pic.github.io，协议HTTPS，端口443&lt;/li&gt;
&lt;li&gt;添加后如配置正确会自动签发证书&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/9746eefd56d968c301b613c8b8e1e31b.png&quot; alt=&quot;1768901138579.png&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;关闭CF IPV6(可选)&lt;/h2&gt;
&lt;p&gt;如果你的边缘节点只有IPV4，当用户使用IPV6国内网络访问时会分流到Cloudflare，所以我们需要关闭IPV6兼容性&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;curl https://api.cloudflare.com/client/v4/zones/${区域 ID}/settings/ipv6 \
    -X PATCH \
    -H &apos;Content-Type: application/json&apos; \
    -H &quot;X-Auth-Email: ${登录邮箱}&quot; \
    -H &quot;X-Auth-Key: ${API 密匙}&quot; \
    -d &apos;{&quot;value&quot;: &quot;off&quot;}&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;注意:API密匙为Global API KEY&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;最后，Engoy it!&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
</content:encoded></item><item><title>Markdown Extended Features</title><link>https://arisaka.eth.limo/posts/markdown-extended/</link><guid isPermaLink="true">https://arisaka.eth.limo/posts/markdown-extended/</guid><description>Read more about Markdown features in Fuwari</description><pubDate>Wed, 01 May 2024 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;GitHub Repository Cards&lt;/h2&gt;
&lt;p&gt;You can add dynamic cards that link to GitHub repositories, on page load, the repository information is pulled from the GitHub API.&lt;/p&gt;
&lt;p&gt;::github{repo=&quot;Fabrizz/MMM-OnSpotify&quot;}&lt;/p&gt;
&lt;p&gt;Create a GitHub repository card with the code &lt;code&gt;::github{repo=&quot;&amp;lt;owner&amp;gt;/&amp;lt;repo&amp;gt;&quot;}&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;::github{repo=&quot;saicaca/fuwari&quot;}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Admonitions&lt;/h2&gt;
&lt;p&gt;Following types of admonitions are supported: &lt;code&gt;note&lt;/code&gt; &lt;code&gt;tip&lt;/code&gt; &lt;code&gt;important&lt;/code&gt; &lt;code&gt;warning&lt;/code&gt; &lt;code&gt;caution&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;:::note
Highlights information that users should take into account, even when skimming.
:::&lt;/p&gt;
&lt;p&gt;:::tip
Optional information to help a user be more successful.
:::&lt;/p&gt;
&lt;p&gt;:::important
Crucial information necessary for users to succeed.
:::&lt;/p&gt;
&lt;p&gt;:::warning
Critical content demanding immediate user attention due to potential risks.
:::&lt;/p&gt;
&lt;p&gt;:::caution
Negative potential consequences of an action.
:::&lt;/p&gt;
&lt;h3&gt;Basic Syntax&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;:::note
Highlights information that users should take into account, even when skimming.
:::

:::tip
Optional information to help a user be more successful.
:::
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Custom Titles&lt;/h3&gt;
&lt;p&gt;The title of the admonition can be customized.&lt;/p&gt;
&lt;p&gt;:::note[MY CUSTOM TITLE]
This is a note with a custom title.
:::&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:::note[MY CUSTOM TITLE]
This is a note with a custom title.
:::
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;GitHub Syntax&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;[!TIP]
&lt;a href=&quot;https://github.com/orgs/community/discussions/16925&quot;&gt;The GitHub syntax&lt;/a&gt; is also supported.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; [!NOTE]
&amp;gt; The GitHub syntax is also supported.

&amp;gt; [!TIP]
&amp;gt; The GitHub syntax is also supported.
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Spoiler&lt;/h3&gt;
&lt;p&gt;You can add spoilers to your text. The text also supports &lt;strong&gt;Markdown&lt;/strong&gt; syntax.&lt;/p&gt;
&lt;p&gt;The content :spoiler[is hidden &lt;strong&gt;ayyy&lt;/strong&gt;]!&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;The content :spoiler[is hidden **ayyy**]!

&lt;/code&gt;&lt;/pre&gt;
</content:encoded></item><item><title>Expressive Code Example</title><link>https://arisaka.eth.limo/posts/expressive-code/</link><guid isPermaLink="true">https://arisaka.eth.limo/posts/expressive-code/</guid><description>How code blocks look in Markdown using Expressive Code.</description><pubDate>Wed, 10 Apr 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here, we&apos;ll explore how code blocks look using &lt;a href=&quot;https://expressive-code.com/&quot;&gt;Expressive Code&lt;/a&gt;. The provided examples are based on the official documentation, which you can refer to for further details.&lt;/p&gt;
&lt;h2&gt;Expressive Code&lt;/h2&gt;
&lt;h3&gt;Syntax Highlighting&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://expressive-code.com/key-features/syntax-highlighting/&quot;&gt;Syntax Highlighting&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;Regular syntax highlighting&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;console.log(&apos;This code is syntax highlighted!&apos;)
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Rendering ANSI escape sequences&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;ANSI colors:
- Regular: [31mRed[0m [32mGreen[0m [33mYellow[0m [34mBlue[0m [35mMagenta[0m [36mCyan[0m
- Bold:    [1;31mRed[0m [1;32mGreen[0m [1;33mYellow[0m [1;34mBlue[0m [1;35mMagenta[0m [1;36mCyan[0m
- Dimmed:  [2;31mRed[0m [2;32mGreen[0m [2;33mYellow[0m [2;34mBlue[0m [2;35mMagenta[0m [2;36mCyan[0m

256 colors (showing colors 160-177):
[38;5;160m160 [38;5;161m161 [38;5;162m162 [38;5;163m163 [38;5;164m164 [38;5;165m165[0m
[38;5;166m166 [38;5;167m167 [38;5;168m168 [38;5;169m169 [38;5;170m170 [38;5;171m171[0m
[38;5;172m172 [38;5;173m173 [38;5;174m174 [38;5;175m175 [38;5;176m176 [38;5;177m177[0m

Full RGB colors:
[38;2;34;139;34mForestGreen - RGB(34, 139, 34)[0m

Text formatting: [1mBold[0m [2mDimmed[0m [3mItalic[0m [4mUnderline[0m
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Editor &amp;amp; Terminal Frames&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://expressive-code.com/key-features/frames/&quot;&gt;Editor &amp;amp; Terminal Frames&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;Code editor frames&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;console.log(&apos;Title attribute example&apos;)
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;!-- src/content/index.html --&amp;gt;
&amp;lt;div&amp;gt;File name comment example&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Terminal frames&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;echo &quot;This terminal frame has no title&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;Write-Output &quot;This one has a title!&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Overriding frame types&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;echo &quot;Look ma, no frame!&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;# Without overriding, this would be a terminal frame
function Watch-Tail { Get-Content -Tail 20 -Wait $args }
New-Alias tail Watch-Tail
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Text &amp;amp; Line Markers&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://expressive-code.com/key-features/text-markers/&quot;&gt;Text &amp;amp; Line Markers&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;Marking full lines &amp;amp; line ranges&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;// Line 1 - targeted by line number
// Line 2
// Line 3
// Line 4 - targeted by line number
// Line 5
// Line 6
// Line 7 - targeted by range &quot;7-8&quot;
// Line 8 - targeted by range &quot;7-8&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Selecting line marker types (mark, ins, del)&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;function demo() {
  console.log(&apos;this line is marked as deleted&apos;)
  // This line and the next one are marked as inserted
  console.log(&apos;this is the second inserted line&apos;)

  return &apos;this line uses the neutral default marker type&apos;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Adding labels to line markers&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;// labeled-line-markers.jsx
&amp;lt;button
  role=&quot;button&quot;
  {...props}
  value={value}
  className={buttonClassName}
  disabled={disabled}
  active={active}
&amp;gt;
  {children &amp;amp;&amp;amp;
    !active &amp;amp;&amp;amp;
    (typeof children === &apos;string&apos; ? &amp;lt;span&amp;gt;{children}&amp;lt;/span&amp;gt; : children)}
&amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Adding long labels on their own lines&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;// labeled-line-markers.jsx
&amp;lt;button
  role=&quot;button&quot;
  {...props}

  value={value}
  className={buttonClassName}

  disabled={disabled}
  active={active}
&amp;gt;

  {children &amp;amp;&amp;amp;
    !active &amp;amp;&amp;amp;
    (typeof children === &apos;string&apos; ? &amp;lt;span&amp;gt;{children}&amp;lt;/span&amp;gt; : children)}
&amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Using diff-like syntax&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;+this line will be marked as inserted
-this line will be marked as deleted
this is a regular line
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;--- a/README.md
+++ b/README.md
@@ -1,3 +1,4 @@
+this is an actual diff file
-all contents will remain unmodified
 no whitespace will be removed either
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Combining syntax highlighting with diff-like syntax&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;  function thisIsJavaScript() {
    // This entire block gets highlighted as JavaScript,
    // and we can still add diff markers to it!
-   console.log(&apos;Old code to be removed&apos;)
+   console.log(&apos;New and shiny code!&apos;)
  }
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Marking individual text inside lines&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;function demo() {
  // Mark any given text inside lines
  return &apos;Multiple matches of the given text are supported&apos;;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Regular expressions&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;console.log(&apos;The words yes and yep will be marked.&apos;)
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Escaping forward slashes&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;echo &quot;Test&quot; &amp;gt; /home/test.txt
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Selecting inline marker types (mark, ins, del)&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;function demo() {
  console.log(&apos;These are inserted and deleted marker types&apos;);
  // The return statement uses the default marker type
  return true;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Word Wrap&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://expressive-code.com/key-features/word-wrap/&quot;&gt;Word Wrap&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;Configuring word wrap per block&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;// Example with wrap
function getLongString() {
  return &apos;This is a very long string that will most probably not fit into the available space unless the container is extremely wide&apos;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;// Example with wrap=false
function getLongString() {
  return &apos;This is a very long string that will most probably not fit into the available space unless the container is extremely wide&apos;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Configuring indentation of wrapped lines&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;// Example with preserveIndent (enabled by default)
function getLongString() {
  return &apos;This is a very long string that will most probably not fit into the available space unless the container is extremely wide&apos;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;// Example with preserveIndent=false
function getLongString() {
  return &apos;This is a very long string that will most probably not fit into the available space unless the container is extremely wide&apos;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Collapsible Sections&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://expressive-code.com/plugins/collapsible-sections/&quot;&gt;Collapsible Sections&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// All this boilerplate setup code will be collapsed
import { someBoilerplateEngine } from &apos;@example/some-boilerplate&apos;
import { evenMoreBoilerplate } from &apos;@example/even-more-boilerplate&apos;

const engine = someBoilerplateEngine(evenMoreBoilerplate())

// This part of the code will be visible by default
engine.doSomething(1, 2, 3, calcFn)

function calcFn() {
  // You can have multiple collapsed sections
  const a = 1
  const b = 2
  const c = a + b

  // This will remain visible
  console.log(`Calculation result: ${a} + ${b} = ${c}`)
  return c
}

// All this code until the end of the block will be collapsed again
engine.closeConnection()
engine.freeMemory()
engine.shutdown({ reason: &apos;End of example boilerplate code&apos; })
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Line Numbers&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://expressive-code.com/plugins/line-numbers/&quot;&gt;Line Numbers&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Displaying line numbers per block&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;// This code block will show line numbers
console.log(&apos;Greetings from line 2!&apos;)
console.log(&apos;I am on line 3&apos;)
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;// Line numbers are disabled for this block
console.log(&apos;Hello?&apos;)
console.log(&apos;Sorry, do you know what line I am on?&apos;)
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Changing the starting line number&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;console.log(&apos;Greetings from line 5!&apos;)
console.log(&apos;I am on line 6&apos;)
&lt;/code&gt;&lt;/pre&gt;
</content:encoded></item><item><title>Simple Guides for Fuwari</title><link>https://arisaka.eth.limo/posts/guide/</link><guid isPermaLink="true">https://arisaka.eth.limo/posts/guide/</guid><description>How to use this blog template.</description><pubDate>Mon, 01 Apr 2024 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;Cover image source: &lt;a href=&quot;https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=2048/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg&quot;&gt;Source&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This blog template is built with &lt;a href=&quot;https://astro.build/&quot;&gt;Astro&lt;/a&gt;. For the things that are not mentioned in this guide, you may find the answers in the &lt;a href=&quot;https://docs.astro.build/&quot;&gt;Astro Docs&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Front-matter of Posts&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;---
title: My First Blog Post
published: 2023-09-09
description: This is the first post of my new Astro blog.
image: ./cover.jpg
tags: [Foo, Bar]
category: Front-end
draft: false
---
&lt;/code&gt;&lt;/pre&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Attribute&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;title&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The title of the post.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;published&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The date the post was published.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;description&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A short description of the post. Displayed on index page.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;image&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The cover image path of the post.&amp;lt;br/&amp;gt;1. Start with &lt;code&gt;http://&lt;/code&gt; or &lt;code&gt;https://&lt;/code&gt;: Use web image&amp;lt;br/&amp;gt;2. Start with &lt;code&gt;/&lt;/code&gt;: For image in &lt;code&gt;public&lt;/code&gt; dir&amp;lt;br/&amp;gt;3. With none of the prefixes: Relative to the markdown file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;tags&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The tags of the post.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;category&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The category of the post.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;draft&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;If this post is still a draft, which won&apos;t be displayed.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Where to Place the Post Files&lt;/h2&gt;
&lt;p&gt;Your post files should be placed in &lt;code&gt;src/content/posts/&lt;/code&gt; directory. You can also create sub-directories to better organize your posts and assets.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;src/content/posts/
├── post-1.md
└── post-2/
    ├── cover.png
    └── index.md
&lt;/code&gt;&lt;/pre&gt;
</content:encoded></item><item><title>Markdown Example</title><link>https://arisaka.eth.limo/posts/markdown/</link><guid isPermaLink="true">https://arisaka.eth.limo/posts/markdown/</guid><description>A simple example of a Markdown blog post.</description><pubDate>Sun, 01 Oct 2023 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;An h1 header&lt;/h1&gt;
&lt;p&gt;Paragraphs are separated by a blank line.&lt;/p&gt;
&lt;p&gt;2nd paragraph. &lt;em&gt;Italic&lt;/em&gt;, &lt;strong&gt;bold&lt;/strong&gt;, and &lt;code&gt;monospace&lt;/code&gt;. Itemized lists
look like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;this one&lt;/li&gt;
&lt;li&gt;that one&lt;/li&gt;
&lt;li&gt;the other one&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note that --- not considering the asterisk --- the actual text
content starts at 4-columns in.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Block quotes are
written like so.&lt;/p&gt;
&lt;p&gt;They can span multiple paragraphs,
if you like.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Use 3 dashes for an em-dash. Use 2 dashes for ranges (ex., &quot;it&apos;s all
in chapters 12--14&quot;). Three dots ... will be converted to an ellipsis.
Unicode is supported. ☺&lt;/p&gt;
&lt;h2&gt;An h2 header&lt;/h2&gt;
&lt;p&gt;Here&apos;s a numbered list:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;first item&lt;/li&gt;
&lt;li&gt;second item&lt;/li&gt;
&lt;li&gt;third item&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Note again how the actual text starts at 4 columns in (4 characters
from the left side). Here&apos;s a code sample:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Let me re-iterate ...
for i in 1 .. 10 { do-something(i) }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As you probably guessed, indented 4 spaces. By the way, instead of
indenting the block, you can use delimited blocks, if you like:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;define foobar() {
    print &quot;Welcome to flavor country!&quot;;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(which makes copying &amp;amp; pasting easier). You can optionally mark the
delimited block for Pandoc to syntax highlight it:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;import time
# Quick, count to ten!
for i in range(10):
    # (but not *too* quick)
    time.sleep(0.5)
    print i
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;An h3 header&lt;/h3&gt;
&lt;p&gt;Now a nested list:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;First, get these ingredients:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;carrots&lt;/li&gt;
&lt;li&gt;celery&lt;/li&gt;
&lt;li&gt;lentils&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Boil some water.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Dump everything in the pot and follow
this algorithm:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; find wooden spoon
 uncover pot
 stir
 cover pot
 balance wooden spoon precariously on pot handle
 wait 10 minutes
 goto first step (or shut off burner when done)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Do not bump wooden spoon or it will fall.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Notice again how text always lines up on 4-space indents (including
that last line which continues item 3 above).&lt;/p&gt;
&lt;p&gt;Here&apos;s a link to &lt;a href=&quot;http://foo.bar&quot;&gt;a website&lt;/a&gt;, to a &lt;a href=&quot;local-doc.html&quot;&gt;local
doc&lt;/a&gt;, and to a &lt;a href=&quot;#an-h2-header&quot;&gt;section heading in the current
doc&lt;/a&gt;. Here&apos;s a footnote [^1].&lt;/p&gt;
&lt;p&gt;[^1]: Footnote text goes here.&lt;/p&gt;
&lt;p&gt;Tables can look like this:&lt;/p&gt;
&lt;p&gt;size material color&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;9 leather brown
10 hemp canvas natural
11 glass transparent&lt;/p&gt;
&lt;p&gt;Table: Shoes, their sizes, and what they&apos;re made of&lt;/p&gt;
&lt;p&gt;(The above is the caption for the table.) Pandoc also supports
multi-line tables:&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;keyword text&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;red Sunsets, apples, and
other red or reddish
things.&lt;/p&gt;
&lt;p&gt;green Leaves, grass, frogs
and other things it&apos;s
not easy being.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;A horizontal rule follows.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Here&apos;s a definition list:&lt;/p&gt;
&lt;p&gt;apples
: Good for making applesauce.
oranges
: Citrus!
tomatoes
: There&apos;s no &quot;e&quot; in tomatoe.&lt;/p&gt;
&lt;p&gt;Again, text is indented 4 spaces. (Put a blank line between each
term/definition pair to spread things out more.)&lt;/p&gt;
&lt;p&gt;Here&apos;s a &quot;line block&quot;:&lt;/p&gt;
&lt;p&gt;| Line one
| Line too
| Line tree&lt;/p&gt;
&lt;p&gt;and images can be specified like so:&lt;/p&gt;
&lt;p&gt;Inline math equations go in like so: $\omega = d\phi / dt$. Display
math should get its own line and be put in in double-dollarsigns:&lt;/p&gt;
&lt;p&gt;$$I = \int \rho R^{2} dV$$&lt;/p&gt;
&lt;p&gt;$$
\begin{equation*}
\pi
=3.1415926535
;8979323846;2643383279;5028841971;6939937510;5820974944
;5923078164;0628620899;8628034825;3421170679;\ldots
\end{equation*}
$$&lt;/p&gt;
&lt;p&gt;And note that you can backslash-escape any punctuation characters
which you wish to be displayed literally, ex.: `foo`, *bar*, etc.&lt;/p&gt;
</content:encoded></item><item><title>Include Video in the Posts</title><link>https://arisaka.eth.limo/posts/video/</link><guid isPermaLink="true">https://arisaka.eth.limo/posts/video/</guid><description>This post demonstrates how to include embedded video in a blog post.</description><pubDate>Tue, 01 Aug 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Just copy the embed code from YouTube or other platforms, and paste it in the markdown file.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;---
title: Include Video in the Post
published: 2023-10-19
// ...
---

&amp;lt;iframe width=&quot;100%&quot; height=&quot;468&quot; src=&quot;https://www.youtube.com/embed/5gIf0_xpFPI?si=N1WTorLKL0uwLsU_&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allowfullscreen&amp;gt;&amp;lt;/iframe&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;YouTube&lt;/h2&gt;
&lt;p&gt;&amp;lt;iframe width=&quot;100%&quot; height=&quot;468&quot; src=&quot;https://www.youtube.com/embed/5gIf0_xpFPI?si=N1WTorLKL0uwLsU_&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&quot; allowfullscreen&amp;gt;&amp;lt;/iframe&amp;gt;&lt;/p&gt;
&lt;h2&gt;Bilibili&lt;/h2&gt;
&lt;p&gt;&amp;lt;iframe width=&quot;100%&quot; height=&quot;468&quot; src=&quot;//player.bilibili.com/player.html?bvid=BV1fK4y1s7Qf&amp;amp;p=1&quot; scrolling=&quot;no&quot; border=&quot;0&quot; frameborder=&quot;no&quot; framespacing=&quot;0&quot; allowfullscreen=&quot;true&quot;&amp;gt; &amp;lt;/iframe&amp;gt;&lt;/p&gt;
</content:encoded></item><item><title>Exhentai里站共享账户</title><link>https://arisaka.eth.limo/posts/archive/exhentai/</link><guid isPermaLink="true">https://arisaka.eth.limo/posts/archive/exhentai/</guid><description>E-Hentai，又称E站、E绅士、熊猫网，是一个非营利性质的网络图片分享网站，其网站的主要内容为对日本动漫以及电子游戏等插画、漫画…</description><pubDate>Thu, 08 Dec 2022 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;简介&lt;/h1&gt;
&lt;p&gt;E-Hentai，又称E站、E绅士、熊猫网，是一个非营利性质的网络图片分享网站，其网站的主要内容为对日本动漫以及电子游戏等插画、漫画、同人志等内容中截取的电子图片，收录内容偏向于色情成人内容，[2]此网站除公开可以任意访客使用的该站点外，还拥有一个访问受限的隐藏站点Exhentai。(摘选自维基百科)&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/19da4d4b11638db47df6b510281e2a22.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;大多数的本子都是从这里搬运的，例如:众所周知的PicAcg、喵绅士等&lt;/p&gt;
&lt;h2&gt;官网&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://e-hentai.org&quot;&gt;表站&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://exhentai.org&quot;&gt;里站&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;账号注册与分享&lt;/h1&gt;
&lt;p&gt;重点来了啊，没有账号的看这里&lt;/p&gt;
&lt;h2&gt;自己注册&lt;/h2&gt;
&lt;p&gt;需要搭建欧美私人V:P!И后访问。一定要有欧美私人IP，不能多人共用同IP。&lt;br /&gt;
公共IP如果有人注册过，E站数据库会有记录，再有人注册会把两个账号都拉黑，永远无法获得里区权限。&lt;br /&gt;
使用中国、日本等亚洲IP注册的账号，也无法获得里区权限。务必选对V:P!И位置，用欧美地区节点。&lt;br /&gt;
建议用Gmail邮箱注册，使用新浪、搜狐、163、QQ等国内邮箱注册的账号，无法获得里区权限。&lt;/p&gt;
&lt;h3&gt;图解&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/b29868bee43459edda75f1e14cb94280.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;详细请看:&lt;a href=&quot;https://nicebowl.fun/11&quot;&gt;注册里站教程&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;公用账号&lt;/h2&gt;
&lt;p&gt;注意:请不要对公用账号进行破坏，我也其他没有多余的账号，且用且珍惜吧&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;帐号cookie
ipb_member_id=4520928
ipb_pass_hash=925cc4de040051f7024333fb45f63a2a
igneous=5c521e916
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/7a6d10f71b4ff385bf751331e8fcff09.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;安卓使用教程&lt;/h2&gt;
&lt;p&gt;目前安卓主流E站分为3个应用&lt;br /&gt;
彩色E站(推荐)&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/Ehviewer-Overhauled/Ehviewer/releases&quot;&gt;点我下载&lt;/a&gt;&lt;br /&gt;
白色E站&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/EhViewer-NekoInverter/EhViewer/releases&quot;&gt;点我下载&lt;/a&gt;&lt;br /&gt;
绿色E站(老机型推荐)&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/exzhawk/EhViewer/releases&quot;&gt;点我下载&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;使用方法大部分相同，进去应用点击cookie登录，剪贴板复制或者分别填入数值&lt;/p&gt;
&lt;h2&gt;PC端使用方法&lt;/h2&gt;
&lt;p&gt;以Chromium(Chrome开源版)为例&lt;br /&gt;
首先在Chrome拓展商店下载Cookie Editor&lt;br /&gt;
&lt;a href=&quot;https://chrome.google.com/webstore/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdm?hl=zh&quot;&gt;点我跳转&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;之后登录exhentai.org&lt;br /&gt;
分别填入账号的3个数值，刷新即可&lt;/p&gt;
&lt;h2&gt;IOS苹果系统&lt;/h2&gt;
&lt;p&gt;如果你已经越狱，可以尝试安装ipa文件&lt;br /&gt;
大熊猫&lt;br /&gt;
&lt;a href=&quot;https://github.com/EhPanda-Team/EhPanda/releases&quot;&gt;下载地址&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;感谢某大佬的支持&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/118a4bfaf403fb5708c84d98ea684040.webp&quot; alt=&quot;j&quot; /&gt;&lt;/p&gt;
&lt;h3&gt;再次提醒:请不要对公用账号进行破坏！！！，例如乱修改设置等&lt;/h3&gt;
&lt;h3&gt;温馨提示:请不要过度手冲&lt;/h3&gt;
</content:encoded></item><item><title>哔哩漫游(开启BiliBili新世界)</title><link>https://arisaka.eth.limo/posts/archive/bilimanyou/</link><guid isPermaLink="true">https://arisaka.eth.limo/posts/archive/bilimanyou/</guid><description>哔哩漫游，解除B站客户端番剧区域限制的Xposed模块，并且提供其他小功能。</description><pubDate>Sat, 08 Oct 2022 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;简介&lt;/h1&gt;
&lt;p&gt;哔哩漫游，解除B站客户端番剧区域限制的Xposed模块，并且提供其他小功能。&lt;br /&gt;
当你有了这个模块，你甚至可以在b站看回复术士的重来人生&lt;/p&gt;
&lt;h1&gt;功能&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;解除B站番剧区域限制&lt;/li&gt;
&lt;li&gt;缓存番剧&lt;/li&gt;
&lt;li&gt;关闭青少年模式弹窗&lt;/li&gt;
&lt;li&gt;自定义屏启动图&lt;/li&gt;
&lt;li&gt;多次点击版本号可打开隐藏功能&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;注意&lt;/h1&gt;
&lt;p&gt;多次点击版本号可打开隐藏功能&lt;/p&gt;
&lt;h1&gt;使用方法&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;未root用户&lt;br /&gt;
你可以使用内置哔哩漫游版安装包&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;https://k98.fun/shagua&quot;&gt;下载地址&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;已root用户(LSPosed)&lt;br /&gt;
请参考此github地址&lt;br /&gt;
&lt;a href=&quot;https://github.com/yujincheng08/BiliRoaming&quot;&gt;传送门&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;截图&lt;/h1&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/987c54c7b2ecc01b7328a096bd8a22a3.webp&quot; alt=&quot;a&quot; /&gt; &lt;img src=&quot;https://writer.000.moe/media/posts/1044082db5f94d9c370063c9168d7cb8.webp&quot; alt=&quot;b&quot; /&gt;&lt;/p&gt;
</content:encoded></item><item><title>轻小说文库</title><link>https://arisaka.eth.limo/posts/archive/qixiaoshuo/</link><guid isPermaLink="true">https://arisaka.eth.limo/posts/archive/qixiaoshuo/</guid><description>轻小说文库是收录最全更新最快的动漫sf轻小说网站,提供轻小说在线阅读,TXT与电子书下载,支持手机WAP访问. 你需要先注册一个账号…</description><pubDate>Sat, 07 May 2022 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;简介&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://www.wenku8.com&quot;&gt;轻小说文库&lt;/a&gt;是收录最全更新最快的动漫sf轻小说网站,提供轻小说在线阅读,TXT与电子书下载,支持手机WAP访问.&lt;/p&gt;
&lt;h1&gt;注意&lt;/h1&gt;
&lt;p&gt;你需要先注册一个账号，请忽略本站关闭及关闭注册的通知，这只是个障眼法，登录后正常使用&lt;br /&gt;
注册和登录地址:&lt;br /&gt;
&lt;a href=&quot;https://www.wenku8.net/index.php&quot;&gt;点击访问&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/152d496ce94a8e5b446babe85625d7f0.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;推荐轻小说«游戏人生»&lt;/h2&gt;
&lt;h3&gt;简介(摘选自维基百科)&lt;/h3&gt;
&lt;p&gt;《NO GAME NO LIFE 游戏人生》（日语：ノーゲーム・ノーライフ，简称ノゲノラ；英语：No Game No Life，简称NGNL）是由日裔巴西作家榎宫祐创作的轻小说。此系列于KADOKAWA的MF文库J出版，繁体中文版由东立出版社代理发售，译者为林宪权。&lt;/p&gt;
&lt;p&gt;此作改编漫画自2013年1月27日于青年漫画杂志《月刊Comic Alive》开始连载，由榎宫祐和其妻柊真白共同创作。其中为2013年7月28日MF文库于其宣传活动“夏之学园祭2013”上宣布动画化企划的五部MF文库J轻小说之一。这个作品在“这本轻小说真厉害！”2013年度的作品综合排行中获得第16名、2014年获得第10名、2015年获得第3名，并在新作部门获得第2名，亦曾经获得第二届“店员最爱轻小说大赏”第2名。2015年荣获SUGOI JAPAN Award轻小说部门第4名。 小说总销量已突破250万册。&lt;/p&gt;
&lt;p&gt;全12集电视动画系列于2014年4月9日至6月26日在AT-X电视台日本全国播放。2014年9月现代标准汉语配音版在网站PPTV上进行播放。在“2016年MF文库J夏季学园祭”宣布制作剧场版动画。&lt;/p&gt;
&lt;p&gt;2021年10月1日中午时分，时隔三年（作者途中因病延稿），游戏人生官方推特上发布第11集的封面，并预告发售日期（该年11月25日）。&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/0cbdfd3267fdf66822aa1231866cde71.webp&quot; alt=&quot;&quot; /&gt; &lt;img src=&quot;https://writer.000.moe/media/posts/7b59d1cba901d01239cf934fad8b969a.webp&quot; alt=&quot;&quot; /&gt; &lt;img src=&quot;https://writer.000.moe/media/posts/0243b4b9e2a06355e3d23669f0a4037a.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
</content:encoded></item><item><title>运行安卓10虚拟机并安装面具</title><link>https://arisaka.eth.limo/posts/archive/gsxuniji/</link><guid isPermaLink="true">https://arisaka.eth.limo/posts/archive/gsxuniji/</guid><description>虚拟机想必大家都用过，比如市面上十分流行的VMOS Pro,光速虚拟机,两仪等等,每个应用都有每个应用的优点…</description><pubDate>Fri, 06 May 2022 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;前言&lt;/h1&gt;
&lt;p&gt;虚拟机想必大家都用过，比如市面上十分流行的VMOS Pro,光速虚拟机,两仪等等,每个应用都有每个应用的优点，今天就重点讲讲内测的光速虚拟机安卓10版&lt;/p&gt;
&lt;h1&gt;对比&lt;/h1&gt;
&lt;p&gt;两仪: 不推荐&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;支持安卓8&lt;/li&gt;
&lt;li&gt;支持Root&lt;/li&gt;
&lt;li&gt;用起来略卡&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;VMOS Pro: 推荐&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;第一款安卓虚拟机&lt;/li&gt;
&lt;li&gt;支持自定义ROM安装&lt;/li&gt;
&lt;li&gt;支持安卓9，安卓7.1，安卓5.1&lt;/li&gt;
&lt;li&gt;支持Root，xp模块，运行流畅&lt;/li&gt;
&lt;li&gt;目前安卓9不支持Root&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;光速虚拟机: 推荐&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;开机快&lt;/li&gt;
&lt;li&gt;支持安卓7.1和安卓10(内测)&lt;/li&gt;
&lt;li&gt;支持Root，可以自己装面具模块&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;光速虚拟机内测包下载&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://www.123pan.com/s/unH9-eReHh&quot;&gt;下载地址&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/7c770ff7e95e6db7b24b3bb245d6cfd7.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h1&gt;安装面具&lt;/h1&gt;
&lt;p&gt;首先需要下载OpenHub+来刷入面具&lt;br /&gt;
&lt;a href=&quot;https://wwn.lanzouw.com/iXQjm03hbiej&quot;&gt;下载地址&lt;/a&gt;&lt;br /&gt;
打开应用和Root权限&lt;br /&gt;
点击Yeap&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/175bd517b88457f5214efc506e3188d1.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;弹出关闭Root提示后关闭Root权限并重启&lt;br /&gt;
打开面具应用，并安照提示重启&lt;br /&gt;
安装成功，你可以使用面具模块了&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/ccd3fedc4e9ee44fbe690d8d6b05b75f.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h1&gt;推荐应用Scene5&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://www.coolapk.com/apk/com.omarea.vtools&quot;&gt;下载地址&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/28947b2fa38847de43c4684c6f9ae165.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
</content:encoded></item><item><title>ATRI -My Dear Moments</title><link>https://arisaka.eth.limo/posts/archive/atri/</link><guid isPermaLink="true">https://arisaka.eth.limo/posts/archive/atri/</guid><description>在不远的未来，海平面原因不明地急速上升,导致了地表多数都沉入海中。</description><pubDate>Wed, 04 May 2022 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;简介&lt;/h1&gt;
&lt;p&gt;在不远的未来，海平面原因不明地急速上升,导致了地表多数都沉入海中。&lt;/p&gt;
&lt;p&gt;小时候因为事故而失去一条腿的少年・斑鸠夏生，&lt;/p&gt;
&lt;p&gt;厌倦了都市的生活，移居到了海边的乡村小镇。&lt;/p&gt;
&lt;p&gt;曾经身为海洋地质学家的祖母留给他的、&lt;/p&gt;
&lt;p&gt;就只有船、潜水艇还有债务。&lt;/p&gt;
&lt;p&gt;夏生为了取回“失去的未来”，与迷之讨债人凯瑟琳一起，&lt;/p&gt;
&lt;p&gt;潜海前往据说保存着祖母遗产的海底仓库。&lt;/p&gt;
&lt;p&gt;在那里，&lt;/p&gt;
&lt;p&gt;他遇到了一位沉睡在如同棺材一般装置中不可思议的少女――亚托莉。&lt;/p&gt;
&lt;p&gt;她是一位构造精密到与人类别无二致，而又丰富感情的机器人。&lt;/p&gt;
&lt;p&gt;从海底被打捞起来的亚托莉如是说到。&lt;/p&gt;
&lt;p&gt;「我想完成主人留给我的最后的命令。&lt;/p&gt;
&lt;p&gt;在此之前，我会成为夏生先生的腿！」&lt;/p&gt;
&lt;p&gt;在一个逐渐沉入海中的平和小镇，&lt;/p&gt;
&lt;p&gt;少年和机器人少女的难忘夏日就这么开始了&lt;/p&gt;
&lt;h1&gt;百科链接&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://mzh.moegirl.org.cn/zh-tw/ATRI_-My_Dear_Moments-&quot;&gt;萌娘百科&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://zh.m.wikipedia.org/zh-cn/ATRI_-My_Dear_Moments-&quot;&gt;维基百科&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;入正链接&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://store.steampowered.com/app/1230140/ATRI_My_Dear_Moments/?l=tchinese&quot;&gt;STEAM&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;非入正链接&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://acgngame.cloud/s/R7vt9&quot;&gt;PC&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://acgngame.cloud/s/ZAfZ&quot;&gt;KRKR&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;图片&lt;/h1&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/33631789da0b693fa44e3ecee1d46d8a.webp&quot; alt=&quot;&quot; /&gt; &lt;img src=&quot;https://writer.000.moe/media/posts/18d60416e3080d5dbe9b37fa7b8516a1.webp&quot; alt=&quot;&quot; /&gt; &lt;img src=&quot;https://writer.000.moe/media/posts/39122e13715a75aff754acc5382a6521.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h3&gt;游戏为全年龄GAL游戏&lt;/h3&gt;
</content:encoded></item><item><title>Joiplay</title><link>https://arisaka.eth.limo/posts/archive/joiplay/</link><guid isPermaLink="true">https://arisaka.eth.limo/posts/archive/joiplay/</guid><description>随处组织和玩RPG Maker *，Ren’Py **，TyranoBuilder和HTML游戏。</description><pubDate>Sun, 01 May 2022 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;简介&lt;/h1&gt;
&lt;p&gt;随处组织和玩RPG Maker *，Ren’Py **，TyranoBuilder和HTML游戏。&lt;br /&gt;
JoiPlay是RPG Maker XP / VX / VX Ace / MV *，Ren’Py **，TyranoBuilder和基于HTML的游戏的游戏解释器和启动器。&lt;br /&gt;
*必须安装用于JoiPlay的RPG Maker插件才能玩RPG Maker XP，VX和VX Ace游戏。&lt;br /&gt;
**必须安装用于JoiPlay的Ren’Py插件才能玩Ren’Py游戏。&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/01080a7f0dc7c78f2c9891880a855b2c.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h1&gt;功能&lt;/h1&gt;
&lt;p&gt;-&amp;gt;跨平台保存文件支持。&lt;br /&gt;
-&amp;gt;游戏类型的高级设置。&lt;br /&gt;
-&amp;gt;内置的作弊菜单，用于支持的游戏类型。&lt;br /&gt;
-&amp;gt;易于使用的现代用户界面。&lt;/p&gt;
&lt;h1&gt;兼容性&lt;/h1&gt;
&lt;p&gt;JoiPlay无法模拟Windows或任何操作系统，因此依赖Windows API或不常见的Node.js类/功能的游戏将无法正常工作。对于RPG Maker XP / VX / VX Ace游戏，估计的兼容性率为70％，对于其他游戏类型，则为90％。&lt;/p&gt;
&lt;h1&gt;下载地址&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://play.google.com/store/apps/details?id=cyou.joiplay.joiplay&quot;&gt;Google Play&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;推荐游戏&lt;/h1&gt;
&lt;h2&gt;魔女之家MV&lt;/h2&gt;
&lt;p&gt;简介:少女薇奥拉冥冥之中发现了一座神秘的豪宅。这座房子会在她不留意的时候变换模样，这里蛰伏着苦痛、骚动和死亡。走进豪宅可鄙的深处，了解凶恶的往事，解开环环谜题，走出重重险境，逃离《魔女之家》的人间地狱。&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/595a4f037196867d5b06506873af003c.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://pan.baidu.com/s/1bZlcvXrkS500Tl_yesWnRg&amp;amp;%E6%8F%90%E5%8F%96%E7%A0%81%EF%BC%9A9999&quot;&gt;下载地址&lt;/a&gt;&lt;br /&gt;
密码:9999&lt;/p&gt;
&lt;h2&gt;来个可乐饼吧&lt;/h2&gt;
&lt;p&gt;【空与满】恐怖解谜游戏 冠军&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/9d4a8016da979a791aaf7d3ab7190d4c.webp&quot; alt=&quot;&quot; /&gt; &lt;img src=&quot;https://writer.000.moe/media/posts/5f60cbfa433ae6d63b006f393ec7e2ec.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://rpg.blue/thread-488836-1-2.html&quot;&gt;下载地址&lt;/a&gt;&lt;/p&gt;
</content:encoded></item><item><title>ZeroTermux</title><link>https://arisaka.eth.limo/posts/archive/zerotermux/</link><guid isPermaLink="true">https://arisaka.eth.limo/posts/archive/zerotermux/</guid><description>Termux 是一个 Android 下一个高级的终端模拟器，开源且不需要 root，支持 apt 管理软件包，十分方便安装软件包…</description><pubDate>Sun, 01 May 2022 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;简介&lt;/h1&gt;
&lt;p&gt;Termux 是一个 Android 下一个高级的终端模拟器，开源且不需要 root，支持 apt 管理软件包，十分方便安装软件包，完美支持 Python、 PHP、 Ruby、 Nodejs、 MySQL等。随着智能设备的普及和性能的不断提升，如今的手机、平板等的硬件标准已达到了初级桌面计算机的硬件标准，用心去打造 DIY 的话完全可以把手机变成一个强大的极客工具。&lt;/p&gt;
&lt;h1&gt;功能&lt;/h1&gt;
&lt;p&gt;一键切换国内源，容器切换，备份恢复，Mod全能，QEMU，自定义命令，美化，悬浮窗口，下载站等&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/314d4923f5480803ec0fd5ec4ca33b3b.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h1&gt;下载地址&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://od.ixcmstudio.cn/repository/main/ZeroTermux/&quot;&gt;点我下载&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;部署系统&lt;/h1&gt;
&lt;p&gt;这里推荐使用Mod全能来部署，支持多系统选择和美化终端&lt;br /&gt;
无需教程，我知道你可以的&lt;br /&gt;
安装桌面后使用vncstart打开远程桌面&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/ce12bb15c1e94f8b33a97fc279b85dc8.webp&quot; alt=&quot;&quot; /&gt; &lt;img src=&quot;https://writer.000.moe/media/posts/6473181fe38d08e17c94b3c6dd8f43ec.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;系统截图&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/de14a4d2b1ac041e648913f1df0ffde5.webp&quot; alt=&quot;&quot; /&gt; &lt;img src=&quot;https://writer.000.moe/media/posts/0c301d1fe24ea21fd59d19be688ff3ea.webp&quot; alt=&quot;&quot; /&gt; &lt;img src=&quot;https://writer.000.moe/media/posts/846a92b58af7295001c4a18216f5249f.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h1&gt;部署博客&lt;/h1&gt;
&lt;p&gt;可以在终端中部署Hexo博客,具体步骤以后更新&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/81df8ee4b44934ea7dde95cbd7d72660.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
</content:encoded></item><item><title>Arcaea全曲包破解版</title><link>https://arisaka.eth.limo/posts/archive/arcaea/</link><guid isPermaLink="true">https://arisaka.eth.limo/posts/archive/arcaea/</guid><description>三维立体节奏游戏 “和蔼的纯白色光芒，正在那失落世界的旋律斗争中等待着你。</description><pubDate>Mon, 25 Apr 2022 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;简介&lt;/h1&gt;
&lt;p&gt;三维立体节奏游戏&lt;/p&gt;
&lt;p&gt;“和蔼的纯白色光芒，正在那失落世界的旋律斗争中等待着你。”&lt;/p&gt;
&lt;p&gt;在这个挑战性十足的街机风格音乐游戏中随着旋律而触碰、按压与滑动；聆听来自以日本为首的世界各地作曲者所写的歌曲！&lt;/p&gt;
&lt;p&gt;体验全新的音符种类「音弧」：淋漓尽致地利用屏幕空间来滑动并跟随流动的旋律。在这光芒与斗争相互纠缠的失落世界中遗失自我。(摘选自Taptap)&lt;/p&gt;
&lt;h1&gt;修改内容&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;全曲包解锁(包括世界、活动的曲包)&lt;/li&gt;
&lt;li&gt;内置人物更换&lt;/li&gt;
&lt;li&gt;美化界面&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;缺点:不能登录账号&lt;/p&gt;
&lt;h1&gt;游戏截图&lt;/h1&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/8c0710521dad5e0517493d09a27bfd18.webp&quot; alt=&quot;主界面&quot; /&gt; &lt;img src=&quot;https://writer.000.moe/media/posts/3a05b112180ea4b30fe1be566580e7d7.webp&quot; alt=&quot;选歌界面&quot; /&gt; &lt;img src=&quot;https://writer.000.moe/media/posts/f93e2f769780f4e03475eb792e55a97e.webp&quot; alt=&quot;结算界面&quot; /&gt;&lt;/p&gt;
&lt;h1&gt;下载地址&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://pan.baidu.com/s/1tJkuqUi5Ih58HhghBrZolw&quot;&gt;百度网盘&lt;/a&gt; 提取码:60og&lt;/p&gt;
</content:encoded></item><item><title>百度网盘不限速下载及秒链解析</title><link>https://arisaka.eth.limo/posts/archive/baidupan/</link><guid isPermaLink="true">https://arisaka.eth.limo/posts/archive/baidupan/</guid><description>解析原理就是一个百度网盘中转站，对方使用百度网盘会员下载后并传输给用户 因此，如果你是想赞助的话…</description><pubDate>Mon, 25 Apr 2022 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;极下解析(百度网盘不限速下载)&lt;/h1&gt;
&lt;h2&gt;原理&lt;/h2&gt;
&lt;p&gt;解析原理就是一个百度网盘中转站，对方使用百度网盘会员下载后并传输给用户&lt;br /&gt;
因此，如果你是想赞助的话，请购买捐赠版&lt;/p&gt;
&lt;h2&gt;官网&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://jixia.icu/&quot;&gt;点击进入&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;教程&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://jixia.icu/#/useage&quot;&gt;PC教程&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://jixia.icu/#/and&quot;&gt;安卓教程&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;演示图片&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/fbdb6db1a817f9b19ccdc02befde18d0.webp&quot; alt=&quot;&quot; /&gt; &lt;img src=&quot;https://writer.000.moe/media/posts/ff81631ad31f9fcfad6f0c9ba7eef721.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h1&gt;秒链解析&lt;/h1&gt;
&lt;h2&gt;官网&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://xiaoluo.tokyobl.xyz/pan/&quot;&gt;点击进入&lt;/a&gt;&lt;br /&gt;
具体教程可在网站内查看&lt;/p&gt;
&lt;h2&gt;演示图片&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://writer.000.moe/media/posts/7e4b87468a542584b4f4c95b5e3c6152.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
</content:encoded></item></channel></rss>