<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[libxcnya.so の Blog]]></title><description><![CDATA[静かで奥深い]]></description><link>https://blog.xcnya.cn</link><image><url>https://cdn.xcnya.cn/favicon.ico</url><title>libxcnya.so の Blog</title><link>https://blog.xcnya.cn</link></image><generator>Shiro (https://github.com/Innei/Shiro)</generator><lastBuildDate>Thu, 24 Sep 2026 09:22:34 GMT</lastBuildDate><atom:link href="https://blog.xcnya.cn/feed" rel="self" type="application/rss+xml"/><pubDate>Thu, 24 Sep 2026 09:22:34 GMT</pubDate><language><![CDATA[zh-CN]]></language><item><title><![CDATA[踩坑&怀旧：在2026年重新安装Windows 95体验？]]></title><description><![CDATA[<link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260422/1776787379.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260422/1776787417.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260422/1776787792.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260422/1776787897.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260422/1776787948.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260422/1776788052.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776953819.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776954040.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776954075.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776954081.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776954108.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776954175.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776958293.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776958320.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776958335.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776958370.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776958374.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776958509.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776958524.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776958617.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776958662.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776958699.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776958706.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776958725.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776958750.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776958768.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776958790.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776958803.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776958812.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776958953.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776959002.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776959084.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776959098.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776959113.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776959148.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776959227.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776959469.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776959527.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776959542.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776959780.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776959787.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776959812.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776959831.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260423/1776959843.png"/><div><blockquote>该渲染由 Shiro API 生成，可能存在排版问题，最佳体验请前往：<a href="https://blog.xcnya.cn/posts/technology/131.html">https://blog.xcnya.cn/posts/technology/131.html</a></blockquote><div><h2 id="">前景需要</h2><p>为什么选择在 2026 年重新安装一遍 Windows 95呢<br/>一方面是要为接下来的大活做准备，一方面是<del>闲的</del><br/>看到这你会不会觉得，哎呀就装个系统有什么难的<br/>如果不难我就不会水这么一篇文了，其实折腾下来挺有记录意义的</p><h2 id="">准备</h2><p>由于我手里没有软盘和足够小的内存的物理机，所以只能用虚拟机喽~<br/>大概配置是这样的</p><p><img src="https://cdn.xcnya.cn/imgs/20260422/1776787379.png" alt="-1"/></p><p>处理器数量多的我没测，总之是内存不能超过 512M<br/>除非你想安装完成后开机遇到这个</p><p><img src="https://cdn.xcnya.cn/imgs/20260422/1776787417.png" alt="0"/></p><p>关于硬盘大小我直接用 VMware 推荐的 8GB 了，再往上我也没测试，理论上能进安装程序问题就不大</p><h2 id="">安装</h2><p>在安装之前你需要准备以下材料：</p><ul><li>一个 Windows 98 启动软盘镜像</li><li>一个 Windows 95 安装 ISO（本文是 OSR 2.5）</li><li>一个带有 DOS 模式 Diskgenus 的 PE 镜像</li></ul><p>材料出处参考：<br/>Windows 95 安装 ISO: <a href="https://archive.org/details/Win95OSR2CHS">https://archive.org/details/Win95OSR2CHS</a><br/>Windows 98 启动软盘镜像: <a href="https://archive.org/details/windows-98-second-edition-boot-disk-floppy">https://archive.org/details/windows-98-second-edition-boot-disk-floppy</a><br/>PE: FirPE</p><h3 id="">硬盘分区</h3><p>首先先将虚拟机的 DVD 驱动器挂载为你的 PE 并启动（我用 FirPE 做演示）</p><p><img src="https://cdn.xcnya.cn/imgs/20260422/1776787792.png" alt="1"/></p><p>然后选择 <code>运行 DiskGenius 硬盘分区工具</code><br/>进去之后右键 <code>空闲</code> 点击 <code>建立新分区</code>，如图选择 <code>FAT32</code></p><p><img src="https://cdn.xcnya.cn/imgs/20260422/1776787897.png" alt="2"/></p><p>点击确定后点击右上角的 <code>保存更改</code>，并按照提示格式化完成后，显示为如图即可<br/><img src="https://cdn.xcnya.cn/imgs/20260422/1776787948.png" alt="3"/></p><p>然后直接点右上角的关机，该步骤完成</p><h3 id="">安装</h3><p>关机后编辑虚拟机设置</p><p><img src="https://cdn.xcnya.cn/imgs/20260422/1776788052.png" alt="4"/></p><p>如图将 CD/DVD 挂载上 Windows 95 的安装 ISO，在 软盘 挂载上 Windows 98 启动盘，并且勾选启动时连接<br/>然后开机</p><p><img src="https://cdn.xcnya.cn/imgs/20260423/1776953819.png" alt="5"/></p><p>然后就进入了 Windows 98 启动盘，在这里选第二个 Start Computer with CD-ROM support.</p><p>进去之后默认是 A:&gt;，我们输入</p><pre class="language-dos lang-dos"><code class="language-dos lang-dos">copy D:\WIN95\*.* C:\
</code></pre><p>然后输入</p><pre class="language-dos lang-dos"><code class="language-dos lang-dos">D:
setup
</code></pre><p>进入安装</p><p><img src="https://cdn.xcnya.cn/imgs/20260423/1776954040.png" alt="6"/></p><p>在这里按 Enter，然后就进入了 ScsnDisk 环节</p><p><img src="https://cdn.xcnya.cn/imgs/20260423/1776954075.png" alt="7"/></p><p>完事之后进入安装程序
<img src="https://cdn.xcnya.cn/imgs/20260423/1776954081.png" alt="8"/>
<img src="https://cdn.xcnya.cn/imgs/20260423/1776954108.png" alt="9"/></p><p>到这一步相信你肯定没有，不过善用搜索引擎很容易获得到一个密钥</p><p><img src="https://cdn.xcnya.cn/imgs/20260423/1776954175.png" alt="10"/></p><p>我们这里就用 <code>34698-OEM-0039682-72135</code> 填进去就好了<br/>我这个是 OEM 版的镜像，如果你是原版的话其实可以全填1试试</p><p>然后继续下一步
<img src="https://cdn.xcnya.cn/imgs/20260423/1776958293.png" alt="11"/>
选安装最常用的组件</p><p><img src="https://cdn.xcnya.cn/imgs/20260423/1776958320.png" alt="12"/>
这里选不需要启动盘</p><p><img src="https://cdn.xcnya.cn/imgs/20260423/1776958335.png" alt="13"/>
然后等他安装</p><p>安装完成
<img src="https://cdn.xcnya.cn/imgs/20260423/1776958370.png" alt="14"/>
<img src="https://cdn.xcnya.cn/imgs/20260423/1776958374.png" alt="15"/>
然后他这里提示我们软驱中有盘，我们去给软盘驱动器点断开连接，然后点确定
等他重新启动</p><h3 id="">二阶段</h3><p>首次重新启动之后来到这个页面
<img src="https://cdn.xcnya.cn/imgs/20260423/1776958509.png" alt="16"/>
我们点确定然后随便输入点东西
<img src="https://cdn.xcnya.cn/imgs/20260423/1776958524.png" alt="17"/>
记得工作组也要输入</p><p>到这里你就知道为什么我们开始要把光盘的 <code>WIN95</code> 复制到 C 盘了，因为他在这里因为某种原因根本识别不到 DVD<br/><img src="https://cdn.xcnya.cn/imgs/20260423/1776958617.png" alt="18"/></p><p>别慌，我们直接给 D: 改成 C: 就能过去
<img src="https://cdn.xcnya.cn/imgs/20260423/1776958662.png" alt="19"/>
<img src="https://cdn.xcnya.cn/imgs/20260423/1776958699.png" alt="20"/>
<img src="https://cdn.xcnya.cn/imgs/20260423/1776958706.png" alt="21"/>
到这里选择时区，默认就行</p><p><img src="https://cdn.xcnya.cn/imgs/20260423/1776958725.png" alt="22"/>
到这里也是，给 D: 改成 C: 就能过去</p><p><img src="https://cdn.xcnya.cn/imgs/20260423/1776958750.png" alt="23"/>
重启，进入三阶段</p><h3 id="">三阶段</h3><p><img src="https://cdn.xcnya.cn/imgs/20260423/1776958768.png" alt="24"/>
到这里随便输入一个用户名
<img src="https://cdn.xcnya.cn/imgs/20260423/1776958790.png" alt="25"/>
然后会让你设置密码</p><p><img src="https://cdn.xcnya.cn/imgs/20260423/1776958803.png" alt="26"/>
到这里下一步下一步下一步就行了<br/>然后到此，主要安装阶段就结束了（快去打个快照吧）</p><h2 id="vmware-tools">VMware Tools</h2><p>然后我们直接点安装 VMware Tools
<img src="https://cdn.xcnya.cn/imgs/20260423/1776958812.png" alt="27"/>
<img src="https://cdn.xcnya.cn/imgs/20260423/1776958953.png" alt="28"/>
到这里会提示 SVGA 驱动安装失败，别慌，让它下一步先</p><p>在安装完成让你重启的时候先别重启，他弹了一个记事本出来
<img src="https://cdn.xcnya.cn/imgs/20260423/1776959002.png" alt="29"/>
他会教你怎么手动安装 SVGA 驱动，我们跟着他的说明走就好了</p><h3 id="-svga-">安装 SVGA 驱动</h3><p>首先在开始菜单里找到控制面板
<img src="https://cdn.xcnya.cn/imgs/20260423/1776959084.png" alt="30"/></p><p>然后找到显示器
<img src="https://cdn.xcnya.cn/imgs/20260423/1776959098.png" alt="31"/></p><p><img src="https://cdn.xcnya.cn/imgs/20260423/1776959113.png" alt="32"/>
然后在显示器属性中的设置中点高级属性</p><p><img src="https://cdn.xcnya.cn/imgs/20260423/1776959148.png" alt="33"/>
在高级显示属性中，点击显示器名称旁边的 更改，然后点如上图的 从硬盘安装</p><p><img src="https://cdn.xcnya.cn/imgs/20260423/1776959227.png" alt="34"/>
然后输入路径 <code>C:\Program Files\VMware\VMware Tools\Drivers\video\</code><br/>点确定</p><p><img src="https://cdn.xcnya.cn/imgs/20260423/1776959469.png" alt="35"/>
选定设备里面选 <code>VMware SVGA II</code>，点确定</p><p><img src="https://cdn.xcnya.cn/imgs/20260423/1776959527.png" alt="36"/>
然后一路点应用</p><p><img src="https://cdn.xcnya.cn/imgs/20260423/1776959542.png" alt="37"/>
到这里就可以重启了</p><p>如果重启之后发现分辨率没有被 VMware 自动设置，可以尝试把虚拟机关机后关掉整个选项卡后重新打开<br/>实在不行你改变一下整个 VMware 窗口的大小<br/>因为毕竟 Windows 95，对于现代软件有点 desync 很正常，，</p><h2 id="the-microsoft-network">The Microsoft Network</h2><p>在进行此步前打快照！</p><p>当你装好之后肯定会发现，怎么连最基本的 <code>ping</code> 命令都没有<br/>别急，我们寻找桌面上的 <code>安装 The Microsoft Network</code>，双击打开</p><p><img src="https://cdn.xcnya.cn/imgs/20260423/1776959780.png" alt="39"/>
<img src="https://cdn.xcnya.cn/imgs/20260423/1776959787.png" alt="40"/></p><p>点确定，然后你会遇到这个经典的错误<br/><img src="https://cdn.xcnya.cn/imgs/20260423/1776959812.png" alt="41"/></p><p>依旧 D 改 C，继续
<img src="https://cdn.xcnya.cn/imgs/20260423/1776959831.png" alt="42"/></p><p><img src="https://cdn.xcnya.cn/imgs/20260423/1776959843.png" alt="43"/>
安装完成之后点取消，此时基本的网络栈已经安装好了<br/>不然你点确定一顿瞎设置之后你的整个系统又爆炸了</p><h2 id="">结尾</h2><p>到此折腾 Windows 95 的安装基本就结束了，后续我会出一个很抽象的联网方式<br/>未完待续..</p></div><p style="text-align:right"><a href="https://blog.xcnya.cn/posts/technology/131.html#comments">看完了？说点什么呢</a></p></div>]]></description><link>https://blog.xcnya.cn/posts/technology/131.html</link><guid isPermaLink="true">https://blog.xcnya.cn/posts/technology/131.html</guid><dc:creator><![CDATA[BLxcwg666]]></dc:creator><pubDate>Tue, 21 Apr 2026 16:14:56 GMT</pubDate></item><item><title><![CDATA[2025 年度总结 - 致又活了一年的自己]]></title><description><![CDATA[<link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260120/1768839751145.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260120/1768839782092.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260120/1768845249627.jpeg"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260120/1768845373405.jpg"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260120/1768845415930.jpg"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260120/1768845756436.jpeg"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260120/1768845772661.jpeg"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260120/1768845840797.jpeg"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260120/1768845856066.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260120/1768845928597.jpeg"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260120/1768846018195.jpeg"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260120/1768843755258.png"/><div><blockquote>该渲染由 Shiro API 生成，可能存在排版问题，最佳体验请前往：<a href="https://blog.xcnya.cn/notes/15">https://blog.xcnya.cn/notes/15</a></blockquote><div><p>写给 2025 年的年度总结，至于 2024 年为什么没有，因为过的很悲惨，懒得写<br/>挑在我生日这天写是因为再不写就写不出来了<br/>你看到的发布时间肯定不是我公布的时间，为啥，你猜</p><h2 id="">生日</h2><p>先放两张米家游戏的生日祝福吧</p><p><img src="https://cdn.xcnya.cn/imgs/20260120/1768839751145.png" alt="Snipaste_2026-01-19_15-49-12" height="1080" width="1920"/></p><p><img src="https://cdn.xcnya.cn/imgs/20260120/1768839782092.png" alt="Snipaste_2026-01-19_15-55-13"/></p><p>在大清早给自己放了一首 <a href="https://music.163.com/song?id=28263184&amp;uct2=U2FsdGVkX18bwqkxe/A0oS3L/t/jTY/SqKkuwIwrnps=">On My Own</a> 试图激励自己（我去陈先生你别给自己自我感动了）<br/>然后中间照常写项目<br/>晚上和同学约饭，超丰盛</p><p><img src="https://cdn.xcnya.cn/imgs/20260120/1768845249627.jpeg" alt="d7dff7bd83e08f9d6cc18377085b8ff0"/></p><p>这 3 个人总共点了 6 杯饮料，然后吃完我撑死了（倒地）<br/>还有同学送的礼物！</p><p>::: gallery
<img src="https://cdn.xcnya.cn/imgs/20260120/1768845373405.jpg" height="4624" width="2600"/>
<img src="https://cdn.xcnya.cn/imgs/20260120/1768845415930.jpg" height="4624" width="2600"/>
:::</p><p>就不全放出来了，总之是谢谢捏！</p><h2 id="">概览</h2><p>概览我真没啥可写的，那就放 B站 的年度报告吧（网易云的我没法看，因为我懒得更新版本）</p><p>::: gallery
https://cdn.xcnya.cn/imgs/20260120/1768845544493.jpeg
https://cdn.xcnya.cn/imgs/20260120/1768845548264.jpeg
https://cdn.xcnya.cn/imgs/20260120/1768845550765.jpeg
https://cdn.xcnya.cn/imgs/20260120/1768845553669.jpeg
https://cdn.xcnya.cn/imgs/20260120/1768845557181.jpeg
https://cdn.xcnya.cn/imgs/20260120/1768845560380.jpeg
https://cdn.xcnya.cn/imgs/20260120/1768845563906.jpeg
https://cdn.xcnya.cn/imgs/20260120/1768845566816.jpeg
https://cdn.xcnya.cn/imgs/20260120/1768845570090.jpeg
https://cdn.xcnya.cn/imgs/20260120/1768845573526.jpeg
https://cdn.xcnya.cn/imgs/20260120/1768845576463.jpeg
https://cdn.xcnya.cn/imgs/20260120/1768845579348.jpeg
:::</p><p>我也不知道为啥这么抽象，那抽象就抽象吧</p><h2 id="">一些记录点</h2><p>流水账，是的</p><h3 id="">关于设备</h3><p>其实对于我来说 25 年开头就是设备的更新，因为在 24 年圈了不少钱所以我终于能换掉跟了我快十几年的老破烂计算机<br/>主机预算其实不太宽裕，因为还有外设的更新<br/>因为我确实不会在 1k 以内预算组装出什么正规军，所以那就加入洋垃圾阵营吧</p><p>一开始其实是想组 X79 的，但是鉴于群友的建议说 X79 还是太折磨自己了所以组了 X99<br/>配置就是经典的<br/>无可奉告，因为有傻逼喜欢魔怔我，顺便给某些傻逼说一句你他妈也就只会用你那展开总长度比我家筷子都短的大脑（也可能是玩方块人太久变成了方块脑袋导致的）来魔怔别人和不定时使用大量无意义图片刷屏来给自己找存在感了，当然我也不排除是你天生缺爱还是受到了别人的类似魔怔或者你的家境过于悲惨无法供你上一个正常中国人能上起的公立幼儿园导致你无法学会理性思考和以礼待人导致的</p><p>显示器听朋友建议在闲鱼收了台 <strong>泰坦军团 P2510G</strong>，虽然说是 1080P@180hz，但是我家桌子也就最多能放下这么大的显示器了，够用就行 <strong>（-320）</strong><br/>键盘是同学送的 <strong>Logitech G512</strong>，据他说有些连键，我拿回来那会确实是，不过我拆开清了几次灰之后到现在好像没发现这种现象了 <strong>（淘宝全新价 600 多，不计入成本内）</strong><br/>鼠标听朋友建议换了 <strong>VXE R1</strong>，拿回来的时候真惊艳到了，48g 拿在手里真的跟玩具一样，特别轻，能调 DPI，玩游戏手感很好 <strong>（-89）</strong></p><hr/><p>虽然但是这台洋垃圾也没少折腾我（哎呀也就两次不算多）<br/>头一次是显卡升级，因为我真的不是硬件 / 闲鱼圈老资历所以不幸买到矿卡了<br/><img src="https://cdn.xcnya.cn/imgs/20260120/1768845756436.jpeg"/>
<img src="https://cdn.xcnya.cn/imgs/20260120/1768845772661.jpeg"/>
<img src="https://cdn.xcnya.cn/imgs/20260120/1768845840797.jpeg"/></p><p>不过结果是好的，经过跟商家的一番斗智斗勇最后还是把钱退给我了<br/><img src="https://cdn.xcnya.cn/imgs/20260120/1768845856066.png"/></p><p>然后第二次是内存炸了，当时我是玩游戏玩着突然炸了，经过几次折腾之后总算是蓝屏了<br/><img src="https://cdn.xcnya.cn/imgs/20260120/1768845928597.jpeg" alt="60d108167bf15fdb330a629bf258572c"/>
不过经过二分法跑内存测试还好只是其中的一根炸了，然后您猜怎么着，我拔出来有问题的内存和好内存不小心混一起了，不过好在是通过贴脸感受余温找出来了<br/><img src="https://cdn.xcnya.cn/imgs/20260120/1768846018195.jpeg" alt="6e6c99236147dc2b522dac6348809778"/>
然后买了根好的等了几天换上了，一切正常（钥匙扣 +1）<br/><del>不过也感谢各大绑 HWID 的软件没抽风</del></p><hr/><p>设备升级对于我的意义是什么呢，<br/>你应该听听我以前过的是啥日子：<br/>在此之前我一直在用一个很破烂的计算机（AMD 速龙 x2，DDR2 2G，1440x900@60hz 的显示器和一个破烂的 500G 西数绿盘），19 年那会装的 Win10 在用（你敢信？），甚至那会我入坑 B站，装虚拟机玩病毒，剪视频都是在这台计算机上完成的，21年那会显卡还炸了（NVIDIA Geforce GT210）虽然我印象中这个显卡从小一直以来都有点问题，但是那天晚上我玩着红警共辉2和人机激战的时候终于彻底爆炸了<br/>所以 21年下旬直到 23年我是没电脑用的<br/>那咋办，那就只能买云服务器用了，国内的还真不便宜，所以一直在 香港/日本/美国 的 VPS 来回打转，坚持最久的是我那台美国的 Advin，IP 我至今都还记得<br/>啥你问我延迟咋办，买个转发套一下不就好了（喝喝，其实转发也不便宜）</p><p>然后用我那 骁龙410，2G RAM，16G ROM的手机 用 RDP 远程来用<br/>欸你说我这个破烂环境能干嘛，还真能干一堆事<br/>如果你关注过我的 Github 你会发现我在 2024 年 9月 一直在参与 <a href="https://www.travellings.cn">开往-友链接力</a> 的开发，截止年底 commits 达到了 790+</p><p>有些人天天说这系统不好那系统不好，然后就有人调侃说你怎么不装 Windows Server，欸别人一听那不可能的，然后我说咋不可能，我真的就日用过很长一段时间的 Windows Server 2022<br/>我真的就依靠那台能让人眼瞎（那时候还没瞎，大概是因为 LCD 屏导致的，反正今年是真瞎了）造出了这么多成就，欸别人一听不可思议，问我困难吗，我笑着说有啥困难的，不就效率低一点罢了吗</p><hr/><p>所以现在日子好起来了，我也很有理由的删掉了那台陪伴我 <strong>2 年 4 个月</strong> 的云服务器<br/>设备的升级，让我也慢慢不再喜欢用手机上的 RDP Client，而是我走两步就能摸到令我舒适的电脑来用<br/>但是以前折腾的劲呢，好像也没有了，可惜吗，不可惜，除了怀念</p><h3 id="">关于生活</h3><p>如果认识我比较早的应该知道我是一个老精神病患者，其实本来已经好的差不多了，但是中考那会由于弱智家长不同意我报班补习加上某学科背刺导致我和所谓的<strong>重点班</strong>差了仅仅 10分 左右<br/>然后这导致我整个高一并不愉快，虽然在老师眼里我可能是个不错的学生，虽然我在班级排名一直稳居 2-3，但是我仍旧陷在那会的自责和无力与不甘心中<br/>然后高一下半学期那会又和好朋友的世界观冲突爆了几次，再加上选团员时的全班 1 票（那 1 票是我自己投的，所以是全班 0 票），然后就蚌埠住了，去医院一看喜提双相复发<br/>然后从高一下半学期到高二上大半部分学期躺家里摆烂了</p><hr/><p>摆烂了吗，学科上可以说确确实实是摆烂了，不过在此期间就沉浸在自己对项目的科研（什么科研憋几把说那么高大上，研发差不多得了），<br/>试着复刻了 Hypixel 的起床战争<a href="https://www.bilibili.com/video/BV1hSYEzqEV6/">（showcase）</a>，虽然没写完，烂尾了<br/>然后在朋友的赞助下打造了自己的 <a href="https://www.nekopixel.cn">Minecraft 服务器</a>，然后刚上线前两天被打的稀烂<br/>随后自主研发了一款 <a href="https://www.bilibili.com/video/BV1Jfn1zAEfP/">基于网页验证的 Minecraft 服务器反压测方案</a> 和 <a href="https://www.bilibili.com/video/BV1dW4tz9EX9/">在 Minecraft 上的 Layer4 级 IP 过滤器</a><br/>这俩玩意我都没打算开源，虽然思路很简单，但是对于方块人圈子的一群方块脑袋可能未必想得到，不过直到我服务器倒闭或者说我哪天觉得这玩意对我没价值的时候会考虑开源</p><p>好像写这玩意没受众啊，也不能圈钱，光啃朋友也不是个事<br/>所以在群友的介绍下去给别人写私人项目，暂时能自主养活了，后续啥的再看吧</p><hr/><p>然后有段时间和某个中考完的朋友一直在 Discord 连麦玩游戏，某天他主动提起看番，然后我成功入坑了《章鱼噼的原罪》（有刀，老玉米症患者谨慎观看）</p><p>::: gallery
https://cdn.xcnya.cn/imgs/20260120/1768846296961.jpeg
https://cdn.xcnya.cn/imgs/20260120/1768846312657.jpeg
https://cdn.xcnya.cn/imgs/20260120/1768846600121.jpeg
:::</p><p>一些片段 ↑</p><hr/><p>然后终于是心血来潮打算买个 J1900 当软路由，虽然折腾历程有点艰辛吧但是最后结局是好的</p><p>::: gallery
https://cdn.xcnya.cn/imgs/20260120/1768846399579.jpeg
https://cdn.xcnya.cn/imgs/20260120/1768846405402.jpeg
https://cdn.xcnya.cn/imgs/20260120/1768846414717.jpeg
https://cdn.xcnya.cn/imgs/20260120/1768846428710.jpeg
https://cdn.xcnya.cn/imgs/20260120/1768846441225.jpeg
https://cdn.xcnya.cn/imgs/20260120/1768846465182.jpeg
https://cdn.xcnya.cn/imgs/20260120/1768846476985.jpeg
https://cdn.xcnya.cn/imgs/20260120/1768846498244.jpeg
https://cdn.xcnya.cn/imgs/20260120/1768846508710.jpeg
https://cdn.xcnya.cn/imgs/20260120/1768846532688.jpeg
https://cdn.xcnya.cn/imgs/20260120/1768846586953.jpeg
:::</p><hr/><p>因为躺在家摆烂一次跟家长爆了，将近一个月冷战，也没给饭吃，这段时间可以说是一直在群里每日乞讨，在这里也是感谢一下一直以来给我投喂的人（阿里嘎多）<br/>有一次因为半夜独自进行蛋白质喷射运动没关窗户导致了一次难受了将近 3 天的感冒，在自己网上咨询和买药无果的情况下选择勉为其难和家长复合，直到现在<br/>唉还是自己太倔了，老实了，以后还敢</p><p>呃虽然 11 月底会考完被告知尽快滚去上学，不过还是拖到了 12 月中间才去<br/>去了能干嘛，睡觉呗，反正听不懂<br/>不过这次去了也就没什么心理负担了，同学也友善了很多 <del>（头一天跑操累到昏厥还是同学架回教室的）</del><br/>不过在这将近半年的躺平里我有什么变化呢，大概是我不再关心什么重点班不重点班的了，混好日子罢了，以后的事以后再说<br/>不再对感情有什么心动，外部人员的变动对我的感情几乎产生不了一点动摇，也不再看好朋友的脸色决定自己的心情（我去我都不知道我以前在干嘛，他的事就是他的事关我什么事我为什么要看他的脸色决定我自己难道他是什么必须存在的人不可吗）<br/>嗯大概就是这样</p><h2 id="">关于项目</h2><p>然后近期呢，由于腾讯云和阿里云争先恐后的上线了自己抄袭 Cloudflare 的成果，但是他们那个傻逼 WAF 是异常的难用，不知道你像抄 Cloudflare 为什么没抄到核心受欢迎的点上<br/>然后决定编写自己的 WAF，目前已经在博客 API上实验性部署，毕竟还没写完，所以这里也就提一嘴罢了（当然不可能开源，后续可能会出个官网给和自己熟的人用用）</p><p>然后游戏这一块呢我已经彻底从方块人转到 FPS 竞技了，啥你问我从方块人挂圈出来的能入坑 FPS 绿玩吗，那当然不可能，所以自己操作不慎导致了：
<img src="https://cdn.xcnya.cn/imgs/20260120/1768843755258.png" alt="71689c8bab86eb888781b50fe2ada525"/>
诶好死，不过也老实了，该绿玩的时候就绿玩，不过大部分时间还是活跃在 CS2 HVH 的<br/>所以不要开挂，开挂害人</p><h2 id="">结束</h2><p>不过总而言之呢，2025 年还是过的比较充实的，至少还活着，对吧<br/>下学期大概会正常去上学了，所以不用为我的学业感到担忧<br/>也提前给大伙说一句晚来的新年快乐，也给大伙摆个早年<br/>拜了个拜</p></div><p style="text-align:right"><a href="https://blog.xcnya.cn/notes/15#comments">看完了？说点什么呢</a></p></div>]]></description><link>https://blog.xcnya.cn/notes/15</link><guid isPermaLink="true">https://blog.xcnya.cn/notes/15</guid><dc:creator><![CDATA[BLxcwg666]]></dc:creator><pubDate>Mon, 19 Jan 2026 08:22:23 GMT</pubDate></item><item><title><![CDATA[开往-友链接力 2026 新年赛博 CTF 题解]]></title><description><![CDATA[<link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768007869851.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768007936940.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768007875260.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768007887397.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768008140425.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768013062189.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768008277548.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768013152256.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768013217885.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768013279449.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768008745867.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768008807895.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768009154533.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768009268139.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768009347671.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768010456291.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768010902398.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768010946247.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768010971828.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768015073248.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768015225926.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768015311602.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768018290534.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768018306324.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768018330527.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768018618324.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768018662209.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768018857562.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768011289284.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768011437807.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768011623972.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768011649993.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768011669724.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768011809867.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768012082471.png"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20260110/1768012739616.png"/><div><blockquote>该渲染由 Shiro API 生成，可能存在排版问题，最佳体验请前往：<a href="https://blog.xcnya.cn/posts/technology/130.html">https://blog.xcnya.cn/posts/technology/130.html</a></blockquote><div><h1 id="">前言</h1><p>距离我离开 <a href="https://github.com/travellings-link">开往-友链接力</a> 项目的维护有一段日子了，今天闲的没事来看看发展成啥样了<br/>然后无意间发现了他们搞了一个<a href="https://happy-newyear.travellings.cn/puzzle">赛博 CTF 平台</a>，那我不得来好好玩玩</p><h1 id="">题解</h1><h2 id="">第一题</h2><p><img src="https://cdn.xcnya.cn/imgs/20260110/1768007869851.png" alt="1" height="567" width="1306"/>
很简单，base64 解得 <code>travellings{hello-2026}</code></p><h2 id="">第二题</h2><p><img src="https://cdn.xcnya.cn/imgs/20260110/1768007936940.png" alt="2"/></p><p>乍一看，仔细一回忆 Cloudflare 官方他们无论是 <a href="https://blog.cloudflare.com/18-november-2025-outage/">对事件总结的Blog</a> 还是 <a href="https://www.cloudflarestatus.com/incidents/8gmgl950y3h7">状态页</a> 都没有详细记载具体到秒/毫秒的时间</p><p><img src="https://cdn.xcnya.cn/imgs/20260110/1768007875260.png" alt="总结"/>
<img src="https://cdn.xcnya.cn/imgs/20260110/1768007887397.png" alt="状态页"/></p><p>不过也许很多人不知道，Cloudflare 的状态是有 API 的，<a href="https://www.cloudflarestatus.com/api/v2/">在这</a><br/><a href="https://www.cloudflarestatus.com/api/v2/incidents.json">这个 API</a>  可以列出最近 50 条事件，当然过去这么久了肯定过期了，所以我们借助 web.archive.org 可以找到<br/><img src="https://cdn.xcnya.cn/imgs/20260110/1768008140425.png" alt="API"/>
看起来好像有精确到毫秒的解决时间，但是转成时间戳提交上去对吗，当然不对 ==<br/>不过我又仔细想了想，有些人可能爱按 F12，那我们看看状态页事件的 F12 里有没有啥好看的<br/><img src="https://cdn.xcnya.cn/imgs/20260110/1768013062189.png" alt="image"/>
咦，好像真的有，那就是它了</p><h2 id="">第三题</h2><p><img src="https://cdn.xcnya.cn/imgs/20260110/1768008277548.png" alt="Snipaste_2026-01-10_09-23-39"/>
这个题有点意思<br/>原始值经过 base64 后得到</p><blockquote><p>rovvy *ROT13 is not* gybvnRkzzi *the key* Xog Iokb WWHHFS!<br/>Wki iyeb myno *but time is* bex gsdryed leqc.</p></blockquote>
<p>然后凯撒枚举得到</p><blockquote><p>hello *HEJ13 yi dej* worldHappy *jxu auo* New Year MMXXVI!<br/>May your code *rkj jycu yi* run without bugs.</p></blockquote>
<p>其实这已经是最终结果了，把这一串文字用 sha1 加密得到 <code>abdb8f0725a59c80c04c438d7c80f25f2484bcb6</code> 再套上格式就是最终的 flag<br/>不过我脑子一蠢给 <del>带 * 号的也给解密了一下，用 rot 13 解出来就是</del> 我去哪有什么加密，base64 后的值不就是明文吗<br/><em>ROT13 is not</em><br/><em>the key</em><br/><em>but time is</em></p><h2 id="">第四题</h2><p><img src="https://cdn.xcnya.cn/imgs/20260110/1768013152256.png" alt="4"/>
要求转到 <a href="https://game4.happy-newyear.travellings.cn/">https://game4.happy-newyear.travellings.cn/</a> 那咱就看看<br/><img src="https://cdn.xcnya.cn/imgs/20260110/1768013217885.png" alt="image"/>
有啥输入啥吗，行<br/><img src="https://cdn.xcnya.cn/imgs/20260110/1768013279449.png" alt="image"/>
那我要写自动化脚本了<br/>我们按 F12 &gt; Network 不难看到<br/>获取图片是 <code>GET /api/getQuestion?happy-newyear-2026</code><br/>返回一个<br/><code>{&quot;token&quot;: &quot;06354f58-a113-44dc-a82e-aab5ae1b1cea&quot;, &quot;image_base64&quot;: &quot;data:image/png;base64,iVBOR........ }</code></p><p>提交答案是 <code>POST /api/submitAnswer?made-by-scared-cube</code><br/>那好办，开整</p><pre class="language-python lang-python"><code class="language-python lang-python">import base64
import requests
from io import BytesIO
from PIL import Image
import pytesseract

def get_question():
    r = requests.get(&quot;https://game4.happy-newyear.travellings.cn/api/getQuestion?happy-newyear-2026&quot;, timeout=10)
    r.raise_for_status()
    return r.json()

def decode_image(image_base64: str) -&gt; Image.Image:
    b64_data = image_base64.split(&quot;,&quot;, 1)[1]
    img_bytes = base64.b64decode(b64_data)
    return Image.open(BytesIO(img_bytes))

def ocr_image(img: Image.Image) -&gt; str:
    text = pytesseract.image_to_string(img, lang=&quot;eng&quot;)
    return text.strip()

def submit_answer(token: str, answer: str):
    payload = {
        &quot;token&quot;: token,
        &quot;answer&quot;: answer
    }
    r = requests.post(&quot;https://game4.happy-newyear.travellings.cn/api/submitAnswer?made-by-scared-cube&quot;, json=payload, timeout=10)
    r.raise_for_status()
    return r.text

def main():
    data = get_question()
    token = data[&quot;token&quot;]
    img = decode_image(data[&quot;image_base64&quot;])

    answer = ocr_image(img)
    print(repr(answer))

    resp = submit_answer(token, answer)
    print(resp)

if __name__ == &quot;__main__&quot;:
    main()
</code></pre>
<p>输出：</p><pre class=""><code class="">&#x27;VsDn8AMaELwK&#x27;
{&quot;message&quot;:&quot;Success! Here is your flag: travellings{0Cr_1s_V3rry_F4st!}&quot;}
</code></pre>
<h2 id="">第五题</h2><p><img src="https://cdn.xcnya.cn/imgs/20260110/1768008745867.png" alt="5"/></p><p>这个很简单，就是 <code>Props</code>，毋庸置疑</p><h2 id="">第六题</h2><p><img src="https://cdn.xcnya.cn/imgs/20260110/1768008807895.png" alt="6"/></p><p>这个题也有点意思，由题意得 围棋 即 19x19，但是 1521 步也就是 39x39，然后 黑子记为“1”，白子记为“0”<br/>不难猜出这是一个二维码矩阵<br/>直接拿 Python 画出来</p><pre class="language-python lang-python"><code class="language-python lang-python">from PIL import Image

BITS = &quot;000000000000000000000000000000000000000011111110111010000001001101001011111110010000010000110101110101100001010000010010111010001010011001001010101010111010010111010000010001000110101111010111010010111010111010010100000011101010111010010000010001010010011010100000010000010011111110101010101010101010101011111110000000000100110001100110100010000000000010011111100011110100000000010110100010011011100111001000001101101000001001010000100011001000110101000100110010010000011011000000100110111101100010000100000001110010010000101000101111110111001010010101001100111011001001101001001001100010110111001100100101110011101010001100011100001001101100000111100110111000010011111010100111010110101010010111011010011111100001100110001010001011011000110000110010010100011000001001110101100110011001100111100001100100101110101010010010010110100101010110001110010001011010001100001011101000101101100011100001110000001010011011011000101001110101101010001001001001101100000111010110011000010001110010011010101001011101100010100110010000001101001001100001111101100101000001110010011110011001001001010001101100000111001000011111011011100001110011000001101111011010111001011001101111110100000000000100110100100110110101000110110011111110111110001101101101011010111010010000010100110100110100110011000111000010111010101101011100010110111111100000010111010111000001001111001100100000110010111010010000111011000111000011101100010000010000101100101100111010010101110011111110100111001000111100010100000010000000000000000000000000000000000000000&quot;
SIZE = 39
SCALE = 10

assert len(BITS) == SIZE * SIZE

img = Image.new(&quot;RGB&quot;, (SIZE * SCALE, SIZE * SCALE), &quot;white&quot;)
pixels = img.load()

for y in range(SIZE):
    for x in range(SIZE):
        bit = BITS[y * SIZE + x]
        color = (0, 0, 0) if bit == &quot;1&quot; else (255, 255, 255)
        for dy in range(SCALE):
            for dx in range(SCALE):
                pixels[x * SCALE + dx, y * SCALE + dy] = color

img.save(&quot;qr.png&quot;)
print(&quot;saved qr.png&quot;)
</code></pre>
<p><img src="https://cdn.xcnya.cn/imgs/20260110/1768009154533.png" alt="qr.png"/></p><p>扫描得 <code>travellings{Th1s_1s_a_3asy_b1n_t0_QR_c0d3}</code></p><h2 id="">第七题</h2><p><img src="https://cdn.xcnya.cn/imgs/20260110/1768009268139.png" alt="7"/>
这一看就是个原批出的题<br/>首先是那个音频，点击播放一秒认出这是个 SSTV<br/>抄收得以下图片：<br/><img src="https://cdn.xcnya.cn/imgs/20260110/1768009347671.png" alt="20260110_060754"/></p><p>提取信息得 <code>epnzcwjvred{bb_cmf_jbzc_gcaxg_llq_xgrfaept_ruiw_lpr_gsec}</code><br/>不难看出这个结构和 flag 结构 <code>travellings{bbbbb}</code> 长得很像<br/>那我们大胆猜测 <code>epnzcwjvred</code> 就是 <code>travellings</code>，因为位数刚好对的上<br/>所以字母映射：<br/>A=0, B=1, ..., Z=25</p><p>维吉尼亚加密：<br/>C = (P + K) mod 26</p><p>那反过来：<br/>K = (C - P) mod 26</p><p>直接计算得：<br/>L Y N E Y L Y N E Y L</p><p>能看出来在循环，所以密钥就是 LYNEY<br/>然后写个脚本就出来了</p><pre class="language-python lang-python"><code class="language-python lang-python">import string

ALPHABET = string.ascii_lowercase
A2I = {c: i for i, c in enumerate(ALPHABET)}
I2A = {i: c for i, c in enumerate(ALPHABET)}

cipher = &quot;epnzcwjvred{bb_cmf_jbzc_gcaxg_llq_xgrfaept_ruiw_lpr_gsec}&quot;
key = &quot;lyney&quot;

def decrypt(cipher, key):
    res = []
    ki = 0
    for c in cipher:
        if c in ALPHABET:
            shift = A2I[key[ki % len(key)]]
            res.append(I2A[(A2I[c] - shift) % 26])
            ki += 1
        else:
            res.append(c)
    return &#x27;&#x27;.join(res)

print(decrypt(cipher, key))
</code></pre>
<p><code>travellings{do_you_love_venti_and_tighnari_they_are_cute}</code></p><h2 id="">第八题</h2><p><img src="https://cdn.xcnya.cn/imgs/20260110/1768010456291.png" alt="8"/>
拿到 <code>travellings-2026.allenyou.wang</code>，直接访问是空解析，所以大概率回藏在 DNS 响应里<br/>然后简单撞一下类型就撞到了</p><pre class="language-bash lang-bash"><code class="language-bash lang-bash">root@xcnya-az:~# nslookup -type=HTTPS travellings-2026.allenyou.wang
Server:         100.100.100.100
Address:        100.100.100.100#53

Non-authoritative answer:
travellings-2026.allenyou.wang  rdata_65 = 1 172.21.89.226. alpn=&quot;h2&quot; port=2026 ipv4hint=172.21.89.226

Authoritative answers can be found from:

root@xcnya-az:~#
</code></pre>
<p>172.21.89.226:2026</p><h2 id="">第九题</h2><p><img src="https://cdn.xcnya.cn/imgs/20260110/1768010902398.png" alt="9"/>
先访问一下 <a href="https://game9.happy-newyear.travellings.cn/">https://game9.happy-newyear.travellings.cn/</a> 然后得到：
<img src="https://cdn.xcnya.cn/imgs/20260110/1768010946247.png" alt="image"/>
那我们访问 <code>/cram</code>
<img src="https://cdn.xcnya.cn/imgs/20260110/1768010971828.png" alt="image"/>
ok，然后我们对着写脚本即可</p><pre class="language-python lang-python"><code class="language-python lang-python">import hashlib
import requests

BASE_URL = &quot;https://game9.happy-newyear.travellings.cn/cram&quot;
SECRET = &quot;@Travell1ngs114514&quot;


r = requests.get(&quot;https://game9.happy-newyear.travellings.cn/cram&quot;)
data = r.json()

challenge = data[&quot;challenge&quot;]
id_ = data[&quot;id&quot;]


sha = hashlib.sha256((challenge + SECRET).encode()).hexdigest()

resp = requests.post(
    &quot;https://game9.happy-newyear.travellings.cn/cram&quot;,
    params={
        &quot;id&quot;: id_,
        &quot;response&quot;: sha
    }
)

print(resp.text)
</code></pre>
<p><code>{&quot;success&quot;:true,&quot;answer&quot;:&quot;travellings{h3110_cRaM!Happ1_n3w_y3Ar!}&quot;}</code></p><h2 id="">第十题</h2><p><img src="https://cdn.xcnya.cn/imgs/20260110/1768015073248.png" alt="10"/>
嗯又要去外部吗，好我们看看</p><h3 id="1">题目1</h3><p>我去还有题中题<br/><img src="https://cdn.xcnya.cn/imgs/20260110/1768015225926.png" alt="image"/></p><p>根据我翻了一辈子 Thymeleaf 文档后打开了解了<br/>Thymeleaf 有两种特殊的注释语法：</p><ol start="1"><li><code>&lt;!--/*--&gt;...&lt;!--*/--&gt;</code> - 内容在纯 HTML 中可见，但 Thymeleaf 渲染时会移除</li><li><code>&lt;!--/*/..../*/--&gt;</code> - 内容在纯 HTML 中是注释不可见，但 Thymeleaf 会解析并显示</li></ol><p>所以很简单</p><pre class="language-html lang-html"><code class="language-html lang-html">     &lt;!DOCTYPE html&gt;
     &lt;html&gt;
     &lt;head&gt;
     &lt;/head&gt;
     &lt;body&gt;
         &lt;!--/*--&gt;&lt;h1&gt;Static HTML&lt;/h1&gt;&lt;!--*/--&gt;
         &lt;!--/*/ &lt;h1&gt;Thymeleaf Rendered&lt;/h1&gt; /*/--&gt;
     &lt;/body&gt;
     &lt;/html&gt;
</code></pre><p><img src="https://cdn.xcnya.cn/imgs/20260110/1768015311602.png" alt="image"/></p><h3 id="">然后呢？</h3><p>然后剩下的我做不出来，但是我本地跑是正确的，所以推测可能该出题人使用了 Vibe Coding 导致出现了 BUG<br/><img src="https://cdn.xcnya.cn/imgs/20260110/1768018290534.png" alt="题目2"/>
<img src="https://cdn.xcnya.cn/imgs/20260110/1768018306324.png" alt="题目3"/>
<img src="https://cdn.xcnya.cn/imgs/20260110/1768018330527.png" alt="题目4"/></p><p>为什么我说他 Vibe 呢，因为这个页面长得就像 Vibe 的，其次是它本身就有一个致命 BUG<br/><img src="https://cdn.xcnya.cn/imgs/20260110/1768018618324.png" alt="image"/>
<img src="https://cdn.xcnya.cn/imgs/20260110/1768018662209.png" alt="image"/>
他是直接给 flag 响应在 body 里面了，也就是说你小镇做题家得跳楼了</p><p>然后我们得到一坨什么呢，<code>cpu+</code> <code>5qrg+</code> <code>AfK+</code> <code>2A+</code><br/>然后根据知情人士说还有一部分在网页里，我仔细看就发现这个长得不同于前面题目的测试数据<br/><img src="https://cdn.xcnya.cn/imgs/20260110/1768018857562.png" alt="image"/>
我们暂时认为 <code>1cAmHF8</code> 是有用的数据<br/>所以我们推测拼在一起呢可能是某种编码 <code>cpu+5qrg+AfK+2A+1cAmHF8</code>，然后尝试了 Base 64/32/36/58 都是失败的
那给加号去掉呢 <code>cpu5qrgAfK2A1cAmHF8</code>，Base 58最终解出 <code>as easy as ABC</code></p><p><code>travellings{as easy as ABC}</code></p><p>Good Game</p><h2 id="">第十一题</h2><p><img src="https://cdn.xcnya.cn/imgs/20260110/1768011289284.png" alt="11"/></p><p>这个我真不是考古学家所以我真不知道，直接撞吧</p><pre class="language-python lang-python"><code class="language-python lang-python">import requests
import time

url = &#x27;https://happy-newyear.travellings.cn/api/submit_answer&#x27;

headers = {
    &#x27;accept&#x27;: &#x27;*/*&#x27;,
    &#x27;accept-encoding&#x27;: &#x27;gzip, deflate, br, zstd&#x27;,
    &#x27;accept-language&#x27;: &#x27;zh-CN,zh;q=0.9,en;q=0.8&#x27;,
    &#x27;content-type&#x27;: &#x27;application/x-www-form-urlencoded&#x27;,
    &#x27;cookie&#x27;: &#x27;[REDACTED]&#x27;,
    &#x27;origin&#x27;: &#x27;https://happy-newyear.travellings.cn&#x27;,
    &#x27;referer&#x27;: &#x27;https://happy-newyear.travellings.cn/puzzle&#x27;,
    &#x27;sec-ch-ua&#x27;: &#x27;&quot;Google Chrome&quot;;v=&quot;143&quot;, &quot;Chromium&quot;;v=&quot;143&quot;, &quot;Not A(Brand&quot;;v=&quot;24&quot;&#x27;,
    &#x27;sec-ch-ua-mobile&#x27;: &#x27;?0&#x27;,
    &#x27;sec-ch-ua-platform&#x27;: &#x27;&quot;Windows&quot;&#x27;,
    &#x27;sec-fetch-dest&#x27;: &#x27;empty&#x27;,
    &#x27;sec-fetch-mode&#x27;: &#x27;cors&#x27;,
    &#x27;sec-fetch-site&#x27;: &#x27;same-origin&#x27;,
    &#x27;user-agent&#x27;: &#x27;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36&#x27;
}

csrf_token = &#x27;[REDACTED]&#x27;

for i in range(1, 1858):
    answer = f&#x27;travellings{{{i}}}&#x27;
    data = {
        &#x27;csrf_token&#x27;: csrf_token,
        &#x27;question_id&#x27;: &#x27;11&#x27;,
        &#x27;answer&#x27;: answer
    }

    try:
        resp = requests.post(url, headers=headers, data=data, timeout=30)
        result = resp.json()

        status = result.get(&#x27;status&#x27;, &#x27;&#x27;)
        message = result.get(&#x27;message&#x27;, &#x27;&#x27;)

        print(f&#x27;[{i}/1857] {answer} -&gt; {status}&#x27;)

        if status != &#x27;error&#x27;:
            print(f&#x27;ID: {i}&#x27;)
            print(f&#x27;Answer: {answer}&#x27;)
            print(f&#x27;Response: {result}&#x27;)
            break

    except Exception as e:
        print(f&#x27;[{i}] E: {e}&#x27;)

    time.sleep(5)

else:
    print(&#x27;\nNot Found&#x27;)

</code></pre>
<p>然后撞出来是 404 ，图里也有解释</p><h2 id="">第十二题</h2><p><img src="https://cdn.xcnya.cn/imgs/20260110/1768011437807.png" alt="12"/>
我去这个数学题一点都不简单，极其考研考古能力<br/>我们可以直接知道的公开信息是<br/>域名：<code>Registration Time: 2022-07-02 15:51:07</code><br/>组织：<code>&quot;created_at&quot;: &quot;2022-04-05T13:02:16Z&quot;,</code><br/>页面：截止写稿总共<code>1391</code>个成员，每一页显示<code>10</code>个</p><p>然后我们上网页时光机吧，查询 list.travellings.cn 可以看到<br/><img src="https://cdn.xcnya.cn/imgs/20260110/1768011623972.png" alt="image"/>
在 11/17 有一次记录，我们点开看看<br/><img src="https://cdn.xcnya.cn/imgs/20260110/1768011649993.png" alt="image"/>
可知截止 11/17 总计有 135 页<br/><img src="https://cdn.xcnya.cn/imgs/20260110/1768011669724.png" alt="image"/>
而135页有6个人，所以截止11/17总共有 134 x 10 + 6 = 1346 人<br/>然后我们去 Github 搜索在 10/24 到 11/17 之间的有效加入请求<br/><img src="https://cdn.xcnya.cn/imgs/20260110/1768011809867.png" alt="image"/>
得到35个且有3个标记为 <code>Duplicate</code><br/>然后我们 <code>1346 - 35 = 1311</code>, <code>1311 / 10 = 131.1</code>？怎么还带余数的，四舍五入一下132<br/>然后 <code>((1767283199 - 1656748267) + (1767283199 - 1649163736 )) / 132 = 1745453.39695</code>，继续四舍五入 1745453<br/>解决</p><h2 id="">第十三题</h2><p><img src="https://cdn.xcnya.cn/imgs/20260110/1768012082471.png" alt="13"/>
这个怕不是有点麻烦，要上 AI Transformer<br/>不过没啥问题，上</p><pre class="language-python lang-python"><code class="language-python lang-python">from transformers import AutoTokenizer

TOKENS = [
    45037, 2964, 14310, 220, 2975, 21, 0, 16919, 792, 1124,
    90, 11326, 76840, 85334, 6296, 12, 1031, 107432, 3698,
    5679, 2179, 11221, 1611, 2986, 2839, 31924, 2179,
    1099, 85464, 33551, 3916, 586, 92
]

MODEL = &quot;moonshotai/Kimi-K2-Thinking&quot;

try:
    tokenizer = AutoTokenizer.from_pretrained(
        MODEL,
        trust_remote_code=True
    )
    text = tokenizer.decode(TOKENS)
    print(text)
except Exception as e:
    print(f&quot;E: {e}&quot;)
</code></pre><p>输出：</p><pre class=""><code class="">None of PyTorch, TensorFlow &gt;= 2.0, or Flax have been found. Models won&#x27;t be available and only tokenizers, configuration and file/data utilities can be used.
Happy New Year 2026! travellings{diocese-polka-obstacle-lurch-skyline-dynasty-saxophone-enjoyable}
</code></pre>
<h2 id="">第十四题</h2><p><img src="https://cdn.xcnya.cn/imgs/20260110/1768012739616.png" alt="14"/>
不讲，有手就行</p></div><p style="text-align:right"><a href="https://blog.xcnya.cn/posts/technology/130.html#comments">看完了？说点什么呢</a></p></div>]]></description><link>https://blog.xcnya.cn/posts/technology/130.html</link><guid isPermaLink="true">https://blog.xcnya.cn/posts/technology/130.html</guid><dc:creator><![CDATA[BLxcwg666]]></dc:creator><pubDate>Sat, 10 Jan 2026 04:30:50 GMT</pubDate></item><item><title><![CDATA[一种基于 File IO 的 Bukkit 地图备份还原技术？]]></title><description><![CDATA[<div><blockquote>该渲染由 Shiro API 生成，可能存在排版问题，最佳体验请前往：<a href="https://blog.xcnya.cn/posts/technology/128.html">https://blog.xcnya.cn/posts/technology/128.html</a></blockquote><div><h2 id="">前景需要</h2><p>最近在研究 Minecraft 服务端插件开发，有一个场景需要用到服务器重启时重置地图<br/>搜了一圈好像并没有什么现有的尽人意的插件，于是决定自己写一个</p><h2 id="">探索</h2><p>最开始想直接用 <code>Slime World Manager</code> 的，但是一看<a href="https://github.com/cijaaimee/Slime-World-Manager">仓库</a></p><p><em>This repository was archived by the owner on Apr 21, 2025. It is now read-only.</em></p><p>呃呃，不过恰好又看到它的一个衍生 fork<br/><a href="https://github.com/InfernalSuite/AdvancedSlimePaper">https://github.com/InfernalSuite/AdvancedSlimePaper</a></p><p>看起来很有用，不过它的插件版好像不太喜欢我的服务器（Paper 1.20.4 + Java 24）<br/>反正就报缺类</p><p>但是呢他们好像又起了个分支去魔改 Paper 了，我不是很喜欢<br/>没办法了，直接用土方法</p><h2 id="">实现</h2><p>我们都知道 Bukkit API 提供了 <code>onEnable</code> 和 <code>onDisable</code><br/>原本想的是直接在 <code>onEnable</code> 的时候备份还原一气呵成，但是 Bukkit 的插件加载是比 world 后的<br/>而且我们不能通过 Bukkit API 直接卸载默认世界（也就是 <code>world</code>、<code>world_nether</code>、<code>world_end</code>）<br/>那咋办，其实还有一个 <code>onLoad</code> 可以用，它会领先于地图载入阶段就执行，所有我们就可以愉快的在这里操作地图啦</p><p>大致如下</p><pre class="language-java lang-java"><code class="language-java lang-java">    private void copyWorld(Path source, Path target) throws IOException {
        Files.walkFileTree(source, new SimpleFileVisitor&lt;Path&gt;() {
            @Override
            public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
                Path targetDir = target.resolve(source.relativize(dir));
                Files.createDirectories(targetDir);
                return FileVisitResult.CONTINUE;
            }
        });
    }
</code></pre><p>然后在你的 backupWorld 逻辑处调用 <code>copyWorld(worldDir, backupWorldDir);</code><br/>其实你还可以顺手写个校验</p><pre class="language-java lang-java"><code class="language-java lang-java">    private void saveWorldHash(Path world, Path hashFile) throws IOException {
        TreeMap&lt;String, String&gt; fileHashes = calculateDirectoryHash(world);
        try (BufferedWriter writer = Files.newBufferedWriter(hashFile, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING)) {
            for (var entry : fileHashes.entrySet()) {
                writer.write(entry.getKey() + &quot;:&quot; + entry.getValue() + &quot;\n&quot;);
            }
        }
    }
</code></pre>
<p>同样在你的逻辑处调用 <code>saveWorldHash(backupWorldDir, hashFile);</code></p><p>欸你问我 world 被加载后那个 <code>session.lock</code> 被挂锁了没法复制？那我们跳过不就好了吗！</p><pre class="language-java lang-java"><code class="language-java lang-java">     @Override
     public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
         if (!file.getFileName().toString().endsWith(&quot;.lock&quot;)) {
             Files.copy(file, target.resolve(source.relativize(file)), StandardCopyOption.REPLACE_EXISTING);
         }
         return FileVisitResult.CONTINUE;
     }
</code></pre>
<p>然后在恢复的时候我们直接挂到 <code>onLoad</code> 上</p><pre class="language-java lang-java"><code class="language-java lang-java">    @Override
    public void onLoad() {
        if (mapBackup != null) {
            mapBackup.restoreWorlds();
        }
    }
</code></pre>
<pre class="language-java lang-java"><code class="language-java lang-java">    private boolean restoreWorld(String worldName) {
        try {
            Path worldDir = serverRoot.resolve(worldName);
            Path backupWorldDir = backupDir.resolve(worldName);
      
            deleteWorld(worldDir);
            copyWorld(backupWorldDir, worldDir);  // 反向 copy 回去
      
            return true;
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
    }
</code></pre>
<p>然后你已经会写这个逻辑了，快去写个插件吧！</p><h2 id="">注意事项</h2><p>不推荐把 backupWorld 的逻辑挂在 <code>onDisable</code> 上，因为方法对于那些不好好关服务器的人不友好（指不用 <code>Ctrl+C</code> 或者 <code>/stop</code> 的）<br/>因为那样无法触发 <code>onDisable</code> 所以无法触发还原事件<br/>所以挂在 <code>onEnable</code> 上是最优解</p><p>调用 <code>copyWorld</code> 个人认为应该保持同步（Bukkit 不就是同步卸载插件的吗，所以应该不用担心 race condition）<br/>对于存档过于大的服务器可能需要数十秒才能完全 备份/还原 完成（所以要考验你的硬盘 IO 啦！）</p><p>当然，以上只是最坏的解决方案，但是也最有效</p><h2 id="end">END</h2><p>轮子我已经造好了，在遵循君子协议的情况下随便 skid<br/><a href="https://github.com/NyaStudio/MapBackup">https://github.com/NyaStudio/MapBackup</a></p></div><p style="text-align:right"><a href="https://blog.xcnya.cn/posts/technology/128.html#comments">看完了？说点什么呢</a></p></div>]]></description><link>https://blog.xcnya.cn/posts/technology/128.html</link><guid isPermaLink="true">https://blog.xcnya.cn/posts/technology/128.html</guid><dc:creator><![CDATA[BLxcwg666]]></dc:creator><pubDate>Tue, 24 Jun 2025 14:48:43 GMT</pubDate></item><item><title><![CDATA[Nginx 1.27 编译安装并使用 Quic 和 headers_more 模块]]></title><description><![CDATA[<div><blockquote>该渲染由 Shiro API 生成，可能存在排版问题，最佳体验请前往：<a href="https://blog.xcnya.cn/posts/maintain/127.html">https://blog.xcnya.cn/posts/maintain/127.html</a></blockquote><div><h2 id="">前言</h2><p>最近新整了一台服务器，由于只有 1c1g 所以不打算装面板<br/>然后就想到了土法编译安装 Nginx，顺便还能水个文章</p><h2 id="">前置</h2><p>如果是镜像及其精简的服务器，那么大概率缺东西<br/>浅装一下</p><pre class="language-shell lang-shell"><code class="language-shell lang-shell">sudo apt update
sudo apt install build-essential libpcre3 libpcre3-dev zlib1g zlib1g-dev libssl-dev git
</code></pre>
<h2 id="">安装</h2><p>下载 Nginx 源码</p><pre class="language-shell lang-shell"><code class="language-shell lang-shell">wget https://nginx.org/download/nginx-1.27.3.tar.gz
tar -zxvf nginx-1.27.3.tar.gz
cd nginx-1.27.3
</code></pre>
<p>下载需要的模块和 OpenSSL</p><pre class="language-shell lang-shell"><code class="language-shell lang-shell">git clone https://github.com/openresty/headers-more-nginx-module
git clone https://github.com/quictls/openssl
mv openssl-openssl-3.0.13-quic openssl
</code></pre>
<p>配置编译选项</p><pre class="language-shell lang-shell"><code class="language-shell lang-shell">./configure --prefix=/etc/nginx \
            --sbin-path=/usr/sbin/nginx \
            --modules-path=/usr/lib/nginx/modules \
            --conf-path=/etc/nginx/nginx.conf \
            --error-log-path=/var/log/nginx/error.log \
            --http-log-path=/var/log/nginx/access.log \
            --pid-path=/var/run/nginx.pid \
            --lock-path=/var/run/nginx.lock \
            --with-http_ssl_module \
            --with-http_v2_module \
            --with-http_v3_module \
            --with-openssl=./openssl \
            --with-openssl-opt=&quot;enable-tls1_3&quot; \
            --with-cc-opt=&quot;-I/usr/local/include&quot; \
            --with-ld-opt=&quot;-L/usr/local/lib&quot; \
            --add-module=./headers-more-nginx-module
</code></pre>
<p>开跑！</p><pre class="language-shell lang-shell"><code class="language-shell lang-shell">make -j$(nproc)
make install
</code></pre>
<p>稍作等待，不出意外 Nginx 就已经安装完成了<br/>验证一下</p><pre class="language-shell lang-shell"><code class="language-shell lang-shell">root@Miao:~# nginx -V
nginx version: nginx/1.27.3
built by gcc 12.2.0 (Debian 12.2.0-14) 
built with OpenSSL 3.1.7+quic 3 Sep 2024
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --with-http_ssl_module --with-http_v2_module --with-http_v3_module --with-openssl=./openssl --with-openssl-opt=enable-tls1_3 --with-cc-opt=-I/usr/local/include --with-ld-opt=-L/usr/local/lib --add-module=./headers-more-nginx-module
root@Miao:~#
</code></pre>
<h2 id="-systemd">配置 systemd</h2><p>装完发现默认是没有 systemd service 配置的<br/>既然这样那就自己写一个</p><pre class="language-ini lang-ini"><code class="language-ini lang-ini">[Unit]
Description=Nginx - A high performance web server and reverse proxy server
Documentation=https://nginx.org/en/docs/
After=network.target

[Service]
Type=forking
PIDFile=/var/run/nginx.pid
ExecStartPre=/usr/sbin/nginx -t
ExecStart=/usr/sbin/nginx
ExecReload=/usr/sbin/nginx -s reload
ExecStop=/usr/sbin/nginx -s quit
PrivateTmp=true

[Install]
WantedBy=multi-user.target
</code></pre>
<h2 id="">启动</h2><pre class="language-shell lang-shell"><code class="language-shell lang-shell">systemctl enable nginx
systemctl start nginx
</code></pre><p>这样就完成了<br/>看看状态</p><pre class="language-shell lang-shell"><code class="language-shell lang-shell">root@Miao:~# systemctl status nginx
● nginx.service - Nginx - A high performance web server and reverse proxy server
     Loaded: loaded (/etc/systemd/system/nginx.service; enabled; preset: enabled)
     Active: active (running) since Sun 2024-12-22 16:20:27 UTC; 12s ago
       Docs: https://nginx.org/en/docs/
   Main PID: 36430 (nginx)
      Tasks: 2 (limit: 1063)
     Memory: 1.9M
        CPU: 19ms
     CGroup: /system.slice/nginx.service
             ├─36430 &quot;nginx: master process /usr/sbin/nginx&quot;
             └─36431 &quot;nginx: worker process&quot;

12月 22 16:20:27 Miao systemd[1]: Starting nginx.service - Nginx - A high performance web server and rever&gt;
12月 22 16:20:27 Miao nginx[36428]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
12月 22 16:20:27 Miao nginx[36428]: nginx: configuration file /etc/nginx/nginx.conf test is successful
12月 22 16:20:27 Miao systemd[1]: Started nginx.service - Nginx - A high performance web server and revers&gt;
lines 1-18/18 (END)
</code></pre>
<p>这样就算是大功告成了<br/>如果文章对你有用，还请点个赞，谢谢喵</p></div><p style="text-align:right"><a href="https://blog.xcnya.cn/posts/maintain/127.html#comments">看完了？说点什么呢</a></p></div>]]></description><link>https://blog.xcnya.cn/posts/maintain/127.html</link><guid isPermaLink="true">https://blog.xcnya.cn/posts/maintain/127.html</guid><dc:creator><![CDATA[BLxcwg666]]></dc:creator><pubDate>Sun, 22 Dec 2024 16:48:36 GMT</pubDate></item><item><title><![CDATA[2024？]]></title><description><![CDATA[<div><blockquote>该渲染由 Shiro API 生成，可能存在排版问题，最佳体验请前往：<a href="https://blog.xcnya.cn/notes/14">https://blog.xcnya.cn/notes/14</a></blockquote><div><p>上次写手记好像还是上次，总之好像也是年末还是年初来着<br/>自中考后很久没动过博客了，最近有一篇文章能发不过一直在准备，应该赶年底前能发出来</p><p>对于互联网的热情好像已经褪去了...？</p><p>说说最近吧，原 nekorua.com 的备案没了，然后被迫迁移<br/>戏剧性的是怎么忘了删原来 .com 上的解析，被不知道国家哪个监测平台发现并告知腾讯云了<br/>然后腾讯云就给我 clientHold 了，要我重新备案才能解封<br/>找 ICANN 发争议好像没什么必要，因为腾讯云没有限制我转出，不过还是发了（闲的）</p><p>nekorua.com<br/>又一个年抛域名，曾经热爱过的</p></div><p style="text-align:right"><a href="https://blog.xcnya.cn/notes/14#comments">看完了？说点什么呢</a></p></div>]]></description><link>https://blog.xcnya.cn/notes/14</link><guid isPermaLink="true">https://blog.xcnya.cn/notes/14</guid><dc:creator><![CDATA[BLxcwg666]]></dc:creator><pubDate>Sat, 21 Dec 2024 11:37:07 GMT</pubDate></item><item><title><![CDATA[解决 pip 安装 cchardet 报错 fatal error: longintrepr.h: No such file or directory]]></title><description><![CDATA[<div><blockquote>该渲染由 Shiro API 生成，可能存在排版问题，最佳体验请前往：<a href="https://blog.xcnya.cn/posts/maintain/126.html">https://blog.xcnya.cn/posts/maintain/126.html</a></blockquote><div><p>如题，在 Python 3.11+ 中安装 cchardet 会报错如下</p><pre class="language-shell lang-shell"><code class="language-shell lang-shell">root@nya:/pgp# pip3 install cchardet
Collecting cchardet
  Using cached cchardet-2.1.7.tar.gz (653 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: cchardet
  Building wheel for cchardet (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─&gt; [23 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-311
      creating build/lib.linux-x86_64-cpython-311/cchardet
      copying src/cchardet/version.py -&gt; build/lib.linux-x86_64-cpython-311/cchardet
      copying src/cchardet/__init__.py -&gt; build/lib.linux-x86_64-cpython-311/cchardet
      running build_ext
      building &#x27;cchardet._cchardet&#x27; extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/src
      creating build/temp.linux-x86_64-cpython-311/src/cchardet
      creating build/temp.linux-x86_64-cpython-311/src/ext
      creating build/temp.linux-x86_64-cpython-311/src/ext/uchardet
      creating build/temp.linux-x86_64-cpython-311/src/ext/uchardet/src
      creating build/temp.linux-x86_64-cpython-311/src/ext/uchardet/src/LangModels
      x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -Isrc/ext/uchardet/src -I/usr/include/python3.11 -c src/cchardet/_cchardet.cpp -o build/temp.linux-x86_64-cpython-311/src/cchardet/_cchardet.o
      src/cchardet/_cchardet.cpp:196:12: fatal error: longintrepr.h: No such file or directory
        196 |   #include &quot;longintrepr.h&quot;
            |            ^~~~~~~~~~~~~~~
      compilation terminated.
      error: command &#x27;/usr/bin/x86_64-linux-gnu-gcc&#x27; failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for cchardet
  Running setup.py clean for cchardet
Failed to build cchardet
Installing collected packages: cchardet
  Running setup.py install for cchardet ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for cchardet did not run successfully.
  │ exit code: 1
  ╰─&gt; [25 lines of output]
      running install
      /usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-311
      creating build/lib.linux-x86_64-cpython-311/cchardet
      copying src/cchardet/version.py -&gt; build/lib.linux-x86_64-cpython-311/cchardet
      copying src/cchardet/__init__.py -&gt; build/lib.linux-x86_64-cpython-311/cchardet
      running build_ext
      building &#x27;cchardet._cchardet&#x27; extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/src
      creating build/temp.linux-x86_64-cpython-311/src/cchardet
      creating build/temp.linux-x86_64-cpython-311/src/ext
      creating build/temp.linux-x86_64-cpython-311/src/ext/uchardet
      creating build/temp.linux-x86_64-cpython-311/src/ext/uchardet/src
      creating build/temp.linux-x86_64-cpython-311/src/ext/uchardet/src/LangModels
      x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -Isrc/ext/uchardet/src -I/usr/include/python3.11 -c src/cchardet/_cchardet.cpp -o build/temp.linux-x86_64-cpython-311/src/cchardet/_cchardet.o
      src/cchardet/_cchardet.cpp:196:12: fatal error: longintrepr.h: No such file or directory
        196 |   #include &quot;longintrepr.h&quot;
            |            ^~~~~~~~~~~~~~~
      compilation terminated.
      error: command &#x27;/usr/bin/x86_64-linux-gnu-gcc&#x27; failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─&gt; cchardet

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
root@nya:/pgp#  
</code></pre>
<p>然而 cchardet 作者好像已经跑路很久了，等作者修应该是不可能了<br/>所以只需要</p><pre class="language-shell lang-shell"><code class="language-shell lang-shell">pip3 install cython
</code></pre>
<p>即可解决问题</p><pre class="language-shell lang-shell"><code class="language-shell lang-shell">root@nya:/pgp# pip install cython
Collecting cython
  Downloading Cython-3.0.10-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.6/3.6 MB 30.4 MB/s eta 0:00:00
Installing collected packages: cython
Successfully installed cython-3.0.10
WARNING: Running pip as the &#x27;root&#x27; user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
root@nya:/pgp# pip3 install cchardet
Collecting cchardet
  Using cached cchardet-2.1.7.tar.gz (653 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: cchardet
  Building wheel for cchardet (setup.py) ... done
  Created wheel for cchardet: filename=cchardet-2.1.7-cp311-cp311-linux_x86_64.whl size=293924 sha256=f1047bca199fd5cd9b4009133aacd9b2d6738723e1a8f106fc17e9efa000f0cb
  Stored in directory: /root/.cache/pip/wheels/5e/37/0f/444b73ed86b6045e2c3cc9122401f064158f035f099a0a9e64
Successfully built cchardet
Installing collected packages: cchardet
Successfully installed cchardet-2.1.7
WARNING: Running pip as the &#x27;root&#x27; user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
root@nya:/pgp#
</code></pre>
<p>如果文章对你有用，还请点个赞，谢谢喵</p></div><p style="text-align:right"><a href="https://blog.xcnya.cn/posts/maintain/126.html#comments">看完了？说点什么呢</a></p></div>]]></description><link>https://blog.xcnya.cn/posts/maintain/126.html</link><guid isPermaLink="true">https://blog.xcnya.cn/posts/maintain/126.html</guid><dc:creator><![CDATA[BLxcwg666]]></dc:creator><pubDate>Sun, 16 Jun 2024 12:03:51 GMT</pubDate></item><item><title><![CDATA[通过代理进行 docker compose pull]]></title><description><![CDATA[<link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20240608/1.webp"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20240608/2.webp"/><div><blockquote>该渲染由 Shiro API 生成，可能存在排版问题，最佳体验请前往：<a href="https://blog.xcnya.cn/posts/maintain/125.html">https://blog.xcnya.cn/posts/maintain/125.html</a></blockquote><div><h2 id="">前言</h2><p>最近不知道工信部在抽什么风，一时间几乎 docker 相关的东西全都墙了<br/>那我要怎么 docker compose pull 呢</p><p>由于 docker 所有的网络事件是走自己的 <code>docker0</code> 网卡的，所以系统 <code>HTTP_PROXY</code> 之类的对 docker 是没用的......<br/>所以有以下两种办法</p><h3 id="-openwrt">使用 OpenWrt</h3><p>最简单粗暴的办法<br/>此方法适用于自己家的设备使用，推荐直接使用 OpenWrt 和 OpenClash 代理<br/>不用 Wrt 也行，只要是能在设备上一层代理流量就行</p><h3 id="-dockerd-">修改 dockerd 文件</h3><p>这个方法通用，不过麻烦一点点
先在本地起一个 clash core，然后挂好代理（或者你用别的 http 代理也行<br/>首先创建一个 dockerd 的 systemd 文件夹，<strong>注意这个文件夹下的内容会替换 docker 的默认配置</strong></p><pre class="language-shell lang-shell"><code class="language-shell lang-shell">mkdir -p /etc/systemd/system/docker.service.d
</code></pre><p>然后在该目录下新建一个叫 <code>http-proxy.conf</code> 的文件，写入以下内容</p><pre class="language-conf lang-conf"><code class="language-conf lang-conf">[Service]
Environment=&quot;HTTP_PROXY=http://127.0.0.1:7890&quot;
Environment=&quot;HTTPS_PROXY=http://127.0.0.1:7890&quot;
Environment=&quot;NO_PROXY=ys.mihoyo.com,sr.mihoyo.com,mc.kurogames.com&quot;
</code></pre><p>保存后重启 docker 服务</p><pre class="language-shell lang-shell"><code class="language-shell lang-shell">systemctl daemon-reload
systemctl restart docker
</code></pre>
<p>输入 <code>docker info</code> 看一眼，可以看见已经配置生效了<br/><img src="https://cdn.xcnya.cn/imgs/20240608/1.webp" alt="1" height="136" width="408"/>
然后我们就又可以愉快的 compose pull 了~
<img src="https://cdn.xcnya.cn/imgs/20240608/2.webp" alt="2" height="538" width="735"/></p><h2 id="">结束</h2><p>至此教程到此结束，如果对你有帮助，欢迎转发给别人<br/>然后还请点个赞，有能力投喂一下，你的点赞是我更新的动力，谢谢喵</p></div><p style="text-align:right"><a href="https://blog.xcnya.cn/posts/maintain/125.html#comments">看完了？说点什么呢</a></p></div>]]></description><link>https://blog.xcnya.cn/posts/maintain/125.html</link><guid isPermaLink="true">https://blog.xcnya.cn/posts/maintain/125.html</guid><dc:creator><![CDATA[BLxcwg666]]></dc:creator><pubDate>Fri, 07 Jun 2024 18:57:47 GMT</pubDate></item><item><title><![CDATA[PVE 下让 Windows 觉得你不是虚拟机]]></title><description><![CDATA[<link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20240521-1/2.webp"/><div><blockquote>该渲染由 Shiro API 生成，可能存在排版问题，最佳体验请前往：<a href="https://blog.xcnya.cn/posts/technology/124.html">https://blog.xcnya.cn/posts/technology/124.html</a></blockquote><div><p>打开你的 VM 配置文件，一般在 <code>/etc/pve/qemu-server/&lt;你的VM ID&gt;.conf</code><br/>然后找个你喜欢的地方插入一句这个</p><pre class="language-conf lang-conf"><code class="language-conf lang-conf">args: -cpu &#x27;host, -hypervisor&#x27;
</code></pre><p>然后就行了，开机打开任务管理器看看<br/><img src="https://cdn.xcnya.cn/imgs/20240521-1/2.webp" alt="1" height="477" width="615"/>
那一条 <code>虚拟机：是</code> 已经不见了，变成了像正常电脑一样的显示（</p></div><p style="text-align:right"><a href="https://blog.xcnya.cn/posts/technology/124.html#comments">看完了？说点什么呢</a></p></div>]]></description><link>https://blog.xcnya.cn/posts/technology/124.html</link><guid isPermaLink="true">https://blog.xcnya.cn/posts/technology/124.html</guid><dc:creator><![CDATA[BLxcwg666]]></dc:creator><pubDate>Mon, 20 May 2024 17:18:12 GMT</pubDate></item><item><title><![CDATA[PVE 下 Windows 虚拟机 Virtio 硬盘转 SCSI]]></title><description><![CDATA[<link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20240521/1.webp"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20240521/2.webp"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20240521/3.webp"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20240521/4.webp"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20240521/5.webp"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20240521/6.webp"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20240521/7.webp"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20240521/8.webp"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20240521/9.webp"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20240521/10.webp"/><link rel="preload" as="image" href="https://cdn.xcnya.cn/imgs/20240521/11.webp"/><div><blockquote>该渲染由 Shiro API 生成，可能存在排版问题，最佳体验请前往：<a href="https://blog.xcnya.cn/posts/maintain/123.html">https://blog.xcnya.cn/posts/maintain/123.html</a></blockquote><div><h2 id="">前景需要</h2><p>我的上一家服务商跑路了，跑路的时候只给我丢了份 PVE 备份，然后最近要还原到新机子上，发现上一家给我硬盘类型开的是 Virtio（我说怎么 SSD 用起来跟 HDD 一样呢）
<img src="https://cdn.xcnya.cn/imgs/20240521/1.webp" alt="1" height="196" width="729"/>
为了<del>更好</del>的性能，我选择给硬盘类型换成 SCSI</p><h2 id="">过程</h2><p>首先想到的是能不能直接把硬盘分离然后重新添加，试了一下好像是可以的<br/><img src="https://cdn.xcnya.cn/imgs/20240521/2.webp" alt="2" height="170" width="752"/>
然后挂了个 PE 看一眼，原来的硬盘是可以正常识别到的，想着应该没什么问题，然后直接开机
<img src="https://cdn.xcnya.cn/imgs/20240521/3.webp" alt="3" height="204" width="741"/>
然后他成功的在这个地方卡了好一阵子
<img src="https://cdn.xcnya.cn/imgs/20240521/4.webp" alt="4" height="550" width="951"/>
然后，，，
<img src="https://cdn.xcnya.cn/imgs/20240521/5.webp" alt="5" height="375" width="883"/></p><h2 id="">解决</h2><p>看 <code>Stop Code</code> 为 <code>INACCESSABLE_BOOT_DEVICE</code>，下意识反应可能是因为换了硬盘类型，Windows 里面没有对应的驱动导致的<br/>但是这种情况下我们应该怎么把驱动丢进去呢</p><p>然后想了 114514 年，Windows 10 及以上有一个特性就是遇到没有驱动的设备在<strong>联网状态</strong>下会<strong>自动尝试搜索并安装驱动</strong>，那么我们就先把系统盘改回 Virtio，然后添加一块 SCSI 硬盘，用 Virtio 硬盘启动，进入系统之后等一阵子，是不是就能用了呢</p><p>理论可行，开始实践<br/><img src="https://cdn.xcnya.cn/imgs/20240521/6.webp" alt="6" height="397" width="631"/>
先加一块 SCSI 硬盘，没必要太大反正用完之后会删
<img src="https://cdn.xcnya.cn/imgs/20240521/7.webp" alt="7" height="145" width="601"/>
然后把系统盘类型改回 Virtio，正常开机</p><p>哦对了如果你已经经历过头一次开机尝试的蓝屏之后，第二次启动应该会显示这个界面
<img src="https://cdn.xcnya.cn/imgs/20240521/8.webp" alt="8" height="550" width="889"/>
不必担心，直接按两下回车不出意外就能正常开机</p>
<p>进入系统之后打开磁盘管理，会发现有一块状态为 <code>Offline</code> 的硬盘，右键把它 <code>Online</code> 并初始化，分区表格式选 GPT 就行
<img src="https://cdn.xcnya.cn/imgs/20240521/9.webp" alt="9" height="377" width="754"/>
之后格式化打开资源管理器确保能看见这块盘就行<br/>这样就说明你的 Windows 现在已经具有适用于 SCSI 的驱动了（<br/>然后关机，移除掉这块硬盘，把原来的盘改为 SCSI<br/><img src="https://cdn.xcnya.cn/imgs/20240521/10.webp" alt="10" height="260" width="581"/>
然后别忘了调整引导顺序，开机<br/>不出意外这次就能正常开机了
<img src="https://cdn.xcnya.cn/imgs/20240521/11.webp" alt="11" height="601" width="1050"/>
相比 Virtio，SCSI 硬盘的体验应该会更好</p>
<h2 id="">结束</h2><p>至此教程到此结束，如果对你有帮助，欢迎转发给别人<br/>然后还请点个赞，有能力投喂一下，你的点赞是我更新的动力，谢谢喵</p></div><p style="text-align:right"><a href="https://blog.xcnya.cn/posts/maintain/123.html#comments">看完了？说点什么呢</a></p></div>]]></description><link>https://blog.xcnya.cn/posts/maintain/123.html</link><guid isPermaLink="true">https://blog.xcnya.cn/posts/maintain/123.html</guid><dc:creator><![CDATA[BLxcwg666]]></dc:creator><pubDate>Mon, 20 May 2024 16:55:55 GMT</pubDate></item></channel></rss>