<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Arkylin的小屋</title>
  <link href="https://www.ioioi.cn/" rel="alternate" type="text/html"/>
  <link href="https://www.ioioi.cn/atom.xml" rel="self" type="application/atom+xml"/>
  <id>https://www.ioioi.cn/</id>
  <updated>2026-08-10T12:37:26.000Z</updated>
  <author>
    <name>Arkylin</name>
  </author>
<entry>
  <title>主页标签栏留白修复:min-width 与溢出收缩的冲突</title>
  <link href="https://www.ioioi.cn/posts/zhu-ye-biao-qian-lan-liu-bai-xiu-fu-min-width-yu-yi-chu-shou/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/zhu-ye-biao-qian-lan-liu-bai-xiu-fu-min-width-yu-yi-chu-shou/</id>
  <published>2026-08-10T12:37:26.000Z</published>
  <updated>2026-08-10T12:37:26.000Z</updated>
  <summary type="html">&lt;p&gt;前阵子折腾主题(ark)的编辑器标签栏,发现固定在最左边的”主页”标签格外宽,右侧拖着一串空白,跟旁边的文章标签放一起很突兀。这篇记录定位与修改过程,以及为什么最后又回滚了。&lt;/p&gt;
&lt;h2 id=&quot;现象主页标签太长一串空白&quot;&gt;现象:主页标签太长,一串空白&lt;/h2&gt;
&lt;p&gt;标签栏(&lt;code&gt;.editor-tabline&lt;/code&gt;)长这样:左边贴着一个固定不动的”主页”标签,后面是当前打开的文章标签。主页标签只有一个小图标加”主页”两个字,却占了整整 132px,右边一大片空白。&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/zhu-ye-biao-qian-lan-liu-bai-xiu-fu-min-width-yu-yi-chu-shou/images/tabline-compare.png&quot; alt=&quot;标签栏修改前后对比&quot;&gt;&lt;/p&gt;
&lt;p&gt;上排是修改前,下排是修改后(宽度贴着内容走)。视觉上就是”太长,有一堆空白” vs “刚好贴合”。&lt;/p&gt;
&lt;h2 id=&quot;定位132px-来自基础规则的-min-width&quot;&gt;定位:132px 来自基础规则的 min-width&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;.editor-tab&lt;/code&gt; 的基础规则给所有标签设了一个统一的最小宽度,这是为了多标签时观感整齐:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;.editor-tab&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  ...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  max-width&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;min&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;260&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;70&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;vw&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  min-width&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;132&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  ...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;对普通文章标签来说 132px 没什么问题——标题长,本来就要占位。但”主页”标签固定贴左、只有俩字,132px 就明显偏宽了。&lt;/p&gt;
&lt;p&gt;有意思的是,标签栏&lt;strong&gt;溢出时&lt;/strong&gt;(打开的标签太多,一行放不下)其实有一套收缩规则,会把主页标签从 132px 缩成一个 40px 的纯图标:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;.editor-tabline.is-overflowing&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; .editor-tab.is-pinned&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  min-width&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;40&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  max-width&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;40&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  justify-content&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;center&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  padding&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 7&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  gap&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;所以问题只出在&lt;strong&gt;没溢出&lt;/strong&gt;的时候——一切正常,主页标签就是 132px 宽,空白常驻。&lt;/p&gt;
&lt;h2 id=&quot;修改给-is-pinned-加-min-width-0&quot;&gt;修改:给 .is-pinned 加 min-width: 0&lt;/h2&gt;
&lt;p&gt;让主页标签不再被 132px 的最小宽度撑开,宽度改由内容决定:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;.editor-tab.is-pinned&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  position&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;sticky&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  left&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  z-index&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  min-width&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;   &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;/* 新增:允许收缩到内容宽度 */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  gap&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;7&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;.editor-tab.is-pinned&lt;/code&gt; 本身没有覆盖 &lt;code&gt;min-width&lt;/code&gt;,所以基础规则的 132px 一直压在它头上;补上 &lt;code&gt;min-width: 0&lt;/code&gt; 后,标签宽度 = 图标 + 文字 + padding,约 68px,空白消失。&lt;/p&gt;
&lt;h2 id=&quot;副作用左右留白不对称&quot;&gt;副作用:左右留白不对称&lt;/h2&gt;
&lt;p&gt;改完立刻暴露了另一个问题——标签的左右 padding 本来就不对称:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;.editor-tab&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  padding&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 9&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 13&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;   &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;/* 左 13px,右 9px */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;左 13px 右 9px 的 4px 差,在 132px 宽时被大留白盖住根本看不出来;一旦缩到 68px,左右明显不一样齐,视觉上反而更难受。&lt;/p&gt;
&lt;h2 id=&quot;回滚与取舍&quot;&gt;回滚与取舍&lt;/h2&gt;
&lt;p&gt;考虑到左右不对称比”有点空”更扎眼,最终把 &lt;code&gt;min-width: 0&lt;/code&gt; 撤掉,恢复了原来的样子。真正要落地,得把两个值一起改:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;min-width: 0&lt;/code&gt;(收窄标签)+ padding 改成左右对称,比如 &lt;code&gt;padding: 0 11px&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;或者干脆接受 132px 的既有设计。&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;这次折腾的教训:&lt;strong&gt;缩小一个元素之前,先想清楚它的 padding/margin 是不是为原来的尺寸服务的&lt;/strong&gt;。132px 的宽度恰好掩盖了不对称的内边距,一收缩就原形毕露。改宽度不是孤立的一行代码,得把”邻居”一起看。&lt;/p&gt;
&lt;h2 id=&quot;相关文件&quot;&gt;相关文件&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;themes/ark/static/theme/css/ark-editor.css&lt;/code&gt; —— &lt;code&gt;.editor-tab&lt;/code&gt;(587 行)、&lt;code&gt;.editor-tab.is-pinned&lt;/code&gt;(621 行)、溢出收缩规则(648 行)&lt;/li&gt;
&lt;/ul&gt;</summary>
</entry>
<entry>
  <title>构建与部署的增量双双失灵:9 张图片和 1915 个文件背后的三个坑</title>
  <link href="https://www.ioioi.cn/posts/postbuild-deploy-incremental-debug/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/postbuild-deploy-incremental-debug/</id>
  <published>2026-08-06T14:30:00.000Z</published>
  <updated>2026-08-06T14:30:00.000Z</updated>
  <summary type="html">&lt;p&gt;连续跑两次 &lt;code&gt;npm run deploy&lt;/code&gt;,输出几乎一模一样:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[postbuild] 图片: 处理 9 张, 缓存跳过 359 张&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[postbuild] 完成 (8.4s): ... 水印 0 张&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[deploy-oss] 完成: 上传 1915, 跳过 0, 删除 11&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;两个”增量”全失灵了:postbuild 的图片缓存每次都有 9 张要重处理,OSS 部署则 1915 个文件一个不少全部重传。逐个排查,最后发现是&lt;strong&gt;三个互不相干的坑&lt;/strong&gt;叠在一起:一个被静默吞掉的 Windows 文件锁错误、一个恒为假的 if 条件、一个非确定性的混淆器。完整记录一下。&lt;/p&gt;
&lt;h2 id=&quot;坑-1那-9-张图片为什么永远处理不完&quot;&gt;坑 1:那 9 张图片为什么永远处理不完&lt;/h2&gt;
&lt;p&gt;postbuild 的图片缓存是&lt;strong&gt;内容寻址&lt;/strong&gt;的:先算文件 md5,拿 &lt;code&gt;md5_版本号.扩展名&lt;/code&gt; 去 &lt;code&gt;node_modules/.astro/postbuild-images/&lt;/code&gt; 里找处理好的成品,命中就 &lt;code&gt;copyFileSync&lt;/code&gt; 回 dist,否则重新压图加水印并存缓存。设计上,只要某张图成功处理过一次,下次 &lt;code&gt;astro build&lt;/code&gt; 重建出原始文件后必然命中缓存。&lt;/p&gt;
&lt;p&gt;所以”每次都有 9 张被处理”只有一种解释:&lt;strong&gt;这 9 张从来没成功过,永远写不进缓存&lt;/strong&gt;。用诊断脚本把 368 张图全部过一遍,找出没有缓存命中的 9 个:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;images\2021\01\1706928628.png        0B    ← 零字节&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;images\2023\05\2397264479.png        0B    ← 零字节&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;images\2024\04\img_20240413_...-300x225.jpg&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;images\2025\03\B4572CD5...-135x300.jpg&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;images\2025\03\B4572CD5...-150x150.jpg&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;posts\happy-new-year2022\images\1641018313861.jpeg&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;posts\loom\images\3064128888.jpg&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;posts\start\images\963228996.jpg&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;_astro\image_editor_output_...CYf17VBA.jpg&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;两个现象立刻对上:7 张 jpg + 2 张零字节 png,而构建日志里”水印 0 张”——水印计数只在处理成功时 +1,0 说明这 9 张&lt;strong&gt;全军覆没&lt;/strong&gt;。再往 &lt;code&gt;optimizeImage&lt;/code&gt; 的 catch 里补一行日志,真相浮出水面:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;PROCESS ERR: 3064128888.jpg -&gt; UNKNOWN: unknown error, open &apos;D:\...\dist\posts\loom\images\3064128888.jpg&apos;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;7 张 jpg 全是同一个错误:按文件路径打开失败。&lt;/strong&gt; 而奇怪的是,同样这几张图,先读进内存再喂给 sharp 就完全正常;同一张图换个时机再按路径打开也偶尔能成功。这是 Windows 上典型的瞬时文件锁问题(防病毒实时扫描、句柄竞争都会触发),原代码 &lt;code&gt;catch { return null }&lt;/code&gt; 把错误静默吞掉,不写缓存,于是每次构建都重新踩一遍。&lt;/p&gt;
&lt;p&gt;另外 2 张是 &lt;code&gt;public/&lt;/code&gt; 里的&lt;strong&gt;零字节 png&lt;/strong&gt;,处理函数里有 &lt;code&gt;size &amp;#x3C; 512 直接 return&lt;/code&gt; 的保护,同样不写缓存,每次构建都进”处理”计数。这两个文件在线上会返回空文件,属于源数据问题,顺手把它们单独列出来警告。&lt;/p&gt;
&lt;p&gt;修法:全程改用内存 buffer 处理(读一次、哈希一次、sharp 吃 buffer,不再反复按路径开文件),加 3 次重试,失败时打印真实错误而不是吞掉。改完连续构建两次,输出变成:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[postbuild] 图片: 处理 0 张, 缓存跳过 366 张&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[postbuild] 跳过过小图片 0B: images\2021\01\1706928628.png&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[postbuild] 跳过过小图片 0B: images\2023\05\2397264479.png&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;9 → 0。之前没修好的 7 张 jpg 也一次性补上了缓存。&lt;/p&gt;
&lt;h2 id=&quot;坑-2deploy-oss-的跳过条件恒为假&quot;&gt;坑 2:deploy-oss 的跳过条件恒为假&lt;/h2&gt;
&lt;p&gt;再看部署脚本,&lt;code&gt;跳过 0&lt;/code&gt; 直接指向这一行:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; full&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; path.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;join&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(distDir, rel);          &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;// ← 路径字符串,永远为真&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;!&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;full &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;#x26;&amp;#x26;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; remote &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;#x26;&amp;#x26;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; remote.size &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;===&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; size) { &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;// ← !full 永远为假!&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;变量名 &lt;code&gt;full&lt;/code&gt; 把&lt;strong&gt;本地文件的完整路径&lt;/strong&gt;和 &lt;code&gt;--full&lt;/code&gt; 全量上传的标志位搞混了。路径字符串非空,&lt;code&gt;!full&lt;/code&gt; 恒为 false,整个”大小相同再比 etag、相同就跳过”的分支&lt;strong&gt;永远不会执行&lt;/strong&gt;——所以每次部署都把 1915 个文件原样重传一遍。etag 比对逻辑本身是好的(简单上传的 OSS etag 就是内容 md5,比它和本地 md5 相等即可跳过)。&lt;/p&gt;
&lt;p&gt;修法:条件改成 &lt;code&gt;absPath &amp;#x26;&amp;#x26; remote &amp;#x26;&amp;#x26; remote.size === size &amp;#x26;&amp;#x26; !fullFlag&lt;/code&gt;,路径存在、远端大小一致、md5 一致才跳过;&lt;code&gt;--full&lt;/code&gt; 时强制不跳过,语义也终于落实了。&lt;/p&gt;
&lt;h2 id=&quot;坑-3混淆器是非确定性的这才是增量失效的真凶&quot;&gt;坑 3:混淆器是非确定性的,这才是增量失效的真凶&lt;/h2&gt;
&lt;p&gt;修完前两个坑,做了个更严格的验证:连续构建两次,逐文件对比 md5。结果仍然有 &lt;strong&gt;1200+ 个 HTML 在变&lt;/strong&gt;。增量部署直接不可能——因为 HTML 每次都在变。&lt;/p&gt;
&lt;p&gt;顺着 HTML 的引用链找,&lt;code&gt;资源重命名 21 个&lt;/code&gt; 每次都把 theme JS 改成带新 hash 的名字。JS 每次字节都不同,是谁在写?是 &lt;code&gt;obfuscate&lt;/code&gt;。&lt;code&gt;javascript-obfuscator&lt;/code&gt; 没设 seed 时,标识符生成用的是真随机数:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;输出1: 6416  输出2: 6423  完全一致: false&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;同一份输入,两次输出不一样。于是:混淆输出变 → 文件名 hash 变 → 所有 HTML 里的引用变 → 全站 HTML 重传。增量部署是”文件没变就不传”,而它每次都在变,部署自然只能全量。&lt;/p&gt;
&lt;p&gt;修法一行:混淆选项里加固定 seed(&lt;code&gt;seed: 20240806&lt;/code&gt;),输出变为确定:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;输出1: 6421  输出2: 6421  完全一致: true&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;验证字节级稳定-增量生效&quot;&gt;验证:字节级稳定 + 增量生效&lt;/h2&gt;
&lt;p&gt;修完三个坑,连续构建两次,逐文件比对:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;两次构建文件差异数: 2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;=&gt; dist\posts\test-astro-encrypted\index.html|38433732...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;= dist\posts\test-astro-encrypted\index.html|D4BF80F3...&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;1915 个文件,只剩 1 个不同——&lt;code&gt;test-astro-encrypted&lt;/code&gt; 那篇加密文章,它的内容本身带动态成分,每次构建真的在变,属于正确行为。其余 1914 个文件字节级一致,远程 etag 比对会全部跳过。&lt;/p&gt;
&lt;h2 id=&quot;经验总结&quot;&gt;经验总结&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;“每次都在重试的活” = 永远没成功过的活&lt;/strong&gt;。内容寻址缓存下,只要成功一次就不可能反复处理;反复处理必然意味着每次都在失败,而且失败被吞了。水印 0、跳过 0 这类”结果计数器”,是判断是不是白干的第一信号;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;静默 catch 是调试黑洞&lt;/strong&gt;。&lt;code&gt;catch { return null }&lt;/code&gt; 省一时日志,欠下的是每次构建 8 秒的隐性重试和事后 40 分钟的排查。生产脚本里处理失败至少要打一行;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;变量名别用业务标志位&lt;/strong&gt;。&lt;code&gt;full&lt;/code&gt; 同时指”完整路径”和”—full 全量标志”,一个笔误让跳过分支 6 个月没执行过。&lt;code&gt;absPath&lt;/code&gt; vs &lt;code&gt;fullFlag&lt;/code&gt; 这类命名不是洁癖,是防呆;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;任何带随机数的处理都不配谈增量&lt;/strong&gt;。混淆、压缩、图片编码……只要输出不确定,下游的”内容没变就不传”就全部失效。要确定性,给随机源加 seed,并在 CI 里用”两次构建字节级 diff”兜底;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Windows 上 sharp 按路径打开文件会偶发失败&lt;/strong&gt;,读进内存再处理更稳,还能顺手省掉多次打开同一文件的 IO。&lt;/li&gt;
&lt;/ol&gt;</summary>
</entry>
<entry>
  <title>Astro 构建再提速:把侧边栏从组件改成字符串生成器,13.4s → 6.9s</title>
  <link href="https://www.ioioi.cn/posts/astro-build-optimization-sidebar-string-builder/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/astro-build-optimization-sidebar-string-builder/</id>
  <published>2026-08-06T13:13:00.000Z</published>
  <updated>2026-08-06T13:13:00.000Z</updated>
  <summary type="html">&lt;p&gt;上一篇把构建从 31s 干到 13.4s 之后,剩余的大头就很明显了:&lt;strong&gt;每页都要重新渲染一遍 ~195KB 的侧边栏&lt;/strong&gt;。这篇记录把侧边栏从 Astro 组件改成纯字符串生成器的过程——包括中途踩的两个坑(日期格式化居然要 14ms/页、Astro 的属性转义和文本转义规则不一样),以及如何用字节级 diff 保证输出零变化。最终 13.4s → 6.9s,侧边栏输出与改前&lt;strong&gt;逐字节一致&lt;/strong&gt;。&lt;/p&gt;
&lt;h2 id=&quot;现状侧边栏是最后的成本大头&quot;&gt;现状:侧边栏是最后的成本大头&lt;/h2&gt;
&lt;p&gt;先量化。临时把 &lt;code&gt;BaseLayout&lt;/code&gt; 里的 &lt;code&gt;&amp;#x3C;Sidebar data={sidebar} /&gt;&lt;/code&gt; 注释掉,对比构建:&lt;/p&gt;

























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;指标&lt;/th&gt;&lt;th&gt;优化前(13.4s)&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;/td&gt;&lt;td&gt;23ms&lt;/td&gt;&lt;td&gt;3.2ms&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;列表页平均耗时&lt;/td&gt;&lt;td&gt;7.6ms&lt;/td&gt;&lt;td&gt;2.1ms&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;整站构建&lt;/td&gt;&lt;td&gt;13.4s&lt;/td&gt;&lt;td&gt;6.0s&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;侧边栏占了 ~7.4s。原因很直白:侧边栏要在 4 个视图(文件树/搜索/时间线/分类标签)里输出 220 篇文章 × 1000+ 个链接,数据层虽然做了构建期缓存,但 &lt;strong&gt;Astro 模板机制每页都要完整执行一遍&lt;/strong&gt;。&lt;/p&gt;
&lt;h2 id=&quot;方案选择为什么不用-astrocontainer&quot;&gt;方案选择:为什么不用 AstroContainer&lt;/h2&gt;
&lt;p&gt;理想方案是在构建时把侧边栏渲染一次存缓存,跨页复用。三条路:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;字符串生成器&lt;/strong&gt;:用 TS 函数拼 HTML 替换组件——无容器依赖,dev/prod 行为一致,数据现成(每页 frontmatter 里已有 SidebarData);&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AstroContainer 预渲染&lt;/strong&gt;:集成 hook 里 &lt;code&gt;renderToString&lt;/code&gt; 一次——模板零改动,但集成 hook 里&lt;strong&gt;拿不到 &lt;code&gt;astro:content&lt;/code&gt; 数据&lt;/strong&gt;(&lt;code&gt;getCollection&lt;/code&gt; 只能在页面渲染上下文调用),dev/prod 还要双路径;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;客户端补高亮&lt;/strong&gt;:渲染一次 + inline JS 加 &lt;code&gt;is-current&lt;/code&gt;——改动最小,但无 JS 时高亮丢失,而且同样卡在方案 2 的数据访问问题。&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;选 1。侧边栏 HTML 只依赖 &lt;code&gt;SidebarData + currentPath&lt;/code&gt;(唯一差异是当前链接的 &lt;code&gt;is-current&lt;/code&gt; class),完全确定性输出,字符串生成器天然合适。&lt;/p&gt;
&lt;h2 id=&quot;实现照抄模板然后被两个坑教做人&quot;&gt;实现:照抄模板,然后被两个坑教做人&lt;/h2&gt;
&lt;p&gt;写了 &lt;code&gt;themes/ark/src/lib/sidebar-html.ts&lt;/code&gt;,把 Sidebar.astro 的 4 个视图逐行翻译成字符串拼接。第一版跑起来,构建……还是 13s,文章页还是 22ms?!&lt;/p&gt;
&lt;p&gt;给生成器加分段计时,真相大白:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[DEBUG sb] search: 0.3ms    ← 文件树 + 搜索区,飞快&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[DEBUG sb] timeline: 6.1ms&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[DEBUG sb] taxonomy: 17.9ms&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[DEBUG sidebar] buildMs=25.1  ← 整个生成器&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;坑 1:&lt;code&gt;partsInTZ&lt;/code&gt; 的 6 次 &lt;code&gt;.find()&lt;/code&gt;。&lt;/strong&gt; 搜索视图 220 次 + 时间线 440 次 &lt;code&gt;fmtDate&lt;/code&gt; 调用,每次都要对 &lt;code&gt;formatToParts()&lt;/code&gt; 的结果数组做 6 次线性查找,实测 &lt;strong&gt;21µs/次&lt;/strong&gt;,660 次 ≈ 14ms。&lt;code&gt;esc()&lt;/code&gt; 反而只要 0.03µs,字符串拼接 2600 段只要 0.27ms——之前给 esc 加快速路径纯属白忙。&lt;/p&gt;
&lt;p&gt;修法分两层:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;partsInTZ&lt;/code&gt; 改成单遍 &lt;code&gt;switch&lt;/code&gt; 解析(21µs → ~4µs);&lt;/li&gt;
&lt;li&gt;更狠的一招:&lt;strong&gt;日期字符串在构建期缓存里预计算&lt;/strong&gt;。&lt;code&gt;buildSidebarBase&lt;/code&gt; 本来就是每个构建算一次,顺手把每篇文章的 &lt;code&gt;ymd/year/md&lt;/code&gt; 三个字符串存进去,生成器直接读,每页 660 次 &lt;code&gt;fmtDate&lt;/code&gt; → &lt;strong&gt;0 次&lt;/strong&gt;。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;生成器从 21ms 掉到 ~1ms,构建 6.9s。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;坑 2:Astro 的序列化细节。&lt;/strong&gt; 想要字节级一致,还得复刻三个细节,都是我靠 diff 逐个揪出来的:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;元素间无空白&lt;/strong&gt;——组件输出里 &lt;code&gt;&amp;#x3C;/section&gt;&amp;#x3C;section&gt;&lt;/code&gt; 之间没有任何换行缩进,Astro 会剥离模板里的空白文本节点;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;空字符串属性渲染为裸属性&lt;/strong&gt;——&lt;code&gt;data-admin-page&lt;/code&gt;(不是 &lt;code&gt;=&quot;&quot;&lt;/code&gt;);&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;属性转义 ≠ 文本转义&lt;/strong&gt;——属性值只转义 &lt;code&gt;&amp;#x26; &amp;#x3C; &gt; &quot;&lt;/code&gt;(双引号内 &lt;code&gt;&apos;&lt;/code&gt; 安全),文本才转义全部 5 个字符。所以生成器拆成 &lt;code&gt;escAttr&lt;/code&gt; / &lt;code&gt;escText&lt;/code&gt; 两个函数。&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;验证字节级-diff&quot;&gt;验证:字节级 diff&lt;/h2&gt;
&lt;p&gt;由于输出完全确定,验证可以做得非常硬:把改前构建的 6 个代表页面(文章页/首页/标签页/404/设置/归档)存下来,提取侧边栏块,与改后逐字节对比:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;old len: 263860 new len: 263860&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;IDENTICAL&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;全部 6 个页面(包括整页,不止侧边栏)&lt;strong&gt;完全一致&lt;/strong&gt;。dev 模式冒烟:文件树展开、搜索、时间线、&lt;code&gt;is-current&lt;/code&gt; 高亮定位、导航脚本、&lt;code&gt;data-admin-page&lt;/code&gt; 全部正常。&lt;/p&gt;
&lt;h2 id=&quot;结果&quot;&gt;结果&lt;/h2&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;/td&gt;&lt;td&gt;21ms/页&lt;/td&gt;&lt;td&gt;~1ms/页&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;文章页平均耗时&lt;/td&gt;&lt;td&gt;23ms&lt;/td&gt;&lt;td&gt;~3ms&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;列表页平均耗时&lt;/td&gt;&lt;td&gt;7.6ms&lt;/td&gt;&lt;td&gt;~2ms&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;整站构建&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;13.4s&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;6.9s&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;从最初的 31s 到 6.9s,共 &lt;strong&gt;4.5 倍&lt;/strong&gt;提速。侧边栏输出 263860 字节与改前逐字节一致,&lt;code&gt;Sidebar.astro&lt;/code&gt; 组件已删除(单实现,无漂移风险)。&lt;/p&gt;
&lt;h2 id=&quot;经验总结&quot;&gt;经验总结&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;预计算要下放到缓存层,而不是渲染层&lt;/strong&gt;。数据层缓存(Astro 模板)救不了模板层的重复执行;但把格式化结果塞进数据缓存,渲染层就能归零;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;别信直觉,给代码分段计时&lt;/strong&gt;。esc 快速路径、数组 join 这些”明显该优化”的点全是无关紧要的,真正的大头是藏在 &lt;code&gt;partsInTZ&lt;/code&gt; 里 6 次 &lt;code&gt;.find()&lt;/code&gt; 的 14ms;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;字节级 diff 是重构安全网&lt;/strong&gt;。字符串生成器的最大风险是标记复刻不精确,而确定性的输出让”逐字节一致”从口号变成可执行的验证脚本;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Astro 的转义是分场景的&lt;/strong&gt;。属性只转 &lt;code&gt;&amp;#x26; &amp;#x3C; &gt; &quot;&lt;/code&gt;,文本转 5 个字符,空字符串属性输出裸属性——做这类等价重写前,先翻一遍目标 HTML 确认序列化规则。&lt;/li&gt;
&lt;/ol&gt;</summary>
</entry>
<entry>
  <title>静态站点文章加密实现详解:PBKDF2 + AES-256-GCM 全流程</title>
  <link href="https://www.ioioi.cn/posts/astro-article-encryption-details/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/astro-article-encryption-details/</id>
  <published>2026-08-06T13:00:00.000Z</published>
  <updated>2026-08-06T13:00:00.000Z</updated>
  <summary type="html">&lt;p&gt;本站最近上线了文章加密功能——给文章 frontmatter 加一个 &lt;code&gt;password&lt;/code&gt; 字段,正文就会以密文形式发布,访客输入密码才能阅读。这篇把整个实现过程完整记录下来:加密算法的选择、构建期如何加密、浏览器端如何解密、以及配套的防泄露处理。&lt;/p&gt;
&lt;p&gt;先说明一个重要前提:&lt;strong&gt;本站是纯静态站点(Astro 构建产物直接丢 OSS),没有任何服务端&lt;/strong&gt;。所以加密只能在”构建时”做、解密只能在”浏览器端”做。这意味着它本质上是”防君子不防小人”的伪装加密——后面会专门讨论这个问题。&lt;/p&gt;
&lt;h2 id=&quot;整体架构&quot;&gt;整体架构&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;写文章(index.md,含 password 字段)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        │&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ▼&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Astro 构建期 ──► LockedContent.astro 加密正文(PBKDF2 + AES-256-GCM)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        │                密文 bundle 写入 HTML&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ▼&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;静态 HTML(正文以密文形式存在,页面只有锁表单)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        │&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ▼&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;浏览器加载页面 ──► 访客输入密码 ──► Web Crypto API 解密 ──► innerHTML 注入正文&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;关键点:&lt;strong&gt;dist 产物里永远没有明文&lt;/strong&gt;。搜索引擎爬虫、RSS 订阅器、直接看源码的人,拿到的都是密文。&lt;/p&gt;
&lt;h2 id=&quot;为什么不用-md5-aes-cbc&quot;&gt;为什么不用 MD5 + AES-CBC&lt;/h2&gt;
&lt;p&gt;参考过不少静态站加密方案(比如某博客的 Pelican 加密插件),常见做法是:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; key &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; CryptoJS.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;MD5&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(password);           &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;// 密码直接 MD5 当密钥&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;CryptoJS.&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;AES&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;decrypt&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(bundle, key, { iv: iv, padding: CryptoJS.pad.NoPadding });&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;这个方案有两个明显弱点:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;MD5 无 KDF&lt;/strong&gt;。密码空间有多大,暴力尝试的成本就有多低。现代 GPU 算 MD5 每秒能跑几十亿次,六位数字密码瞬间被扫完;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AES-CBC 不认证&lt;/strong&gt;。密码错了也能”解出”一堆乱码,没法区分是密码错了还是内容坏了,交互上只能靠”解出的不是合法 UTF-8”来猜。&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;所以本站换成了 &lt;strong&gt;PBKDF2 + AES-256-GCM&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;/td&gt;&lt;td&gt;PBKDF2(21 万次迭代, SHA-256, 随机 16 字节 salt)&lt;/td&gt;&lt;td&gt;把单次尝试成本抬高到几十毫秒级,暴力破解需要 21 万倍算力&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;加密算法&lt;/td&gt;&lt;td&gt;AES-256-GCM&lt;/td&gt;&lt;td&gt;带认证标签,密码错误直接解密失败,不会吐乱码&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;随机数&lt;/td&gt;&lt;td&gt;每次构建重新生成 salt + IV&lt;/td&gt;&lt;td&gt;同一篇文章每次构建的密文都不同,防止重放与字典比对&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;为什么不直接用 scrypt/Argon2?因为解密必须跑在浏览器端,Web Crypto API 原生支持 PBKDF2,而 scrypt/Argon2 要么没有原生实现、要么需要引入 WASM 依赖。PBKDF2 + 高迭代已经是”零依赖且够用”的平衡点。&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&quot;构建期加密lockedcontentastro&quot;&gt;构建期加密:LockedContent.astro&lt;/h2&gt;
&lt;p&gt;加密逻辑写在一个 Astro 组件里,文章页检测到 &lt;code&gt;password&lt;/code&gt; 字段就渲染它。组件的 frontmatter(构建时在 Node 里执行)负责加密:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;ts&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; { createCipheriv, pbkdf2Sync, randomBytes } &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;node:crypto&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;password&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;content&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; } &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; Astro.props;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;// 1. 随机 salt + IV,每次构建都不同&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; salt&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; randomBytes&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;16&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; iv&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; randomBytes&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;12&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;// 2. PBKDF2 派生 256-bit 密钥(21 万次迭代)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; key&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; pbkdf2Sync&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(password, salt, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;210_000&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;32&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;sha256&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;// 3. AES-256-GCM 加密&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; cipher&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; createCipheriv&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;aes-256-gcm&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, key, iv);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; ct&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; Buffer.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;concat&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;([cipher.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;update&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(content, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;utf8&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;), cipher.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;final&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;()]);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; tag&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; cipher.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;getAuthTag&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;();   &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;// 16 字节认证标签&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;// 4. bundle = base64(salt) . base64(iv) . base64(密文 || tag)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; bundle&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  salt.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;toString&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;base64&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;),&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  iv.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;toString&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;base64&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;),&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  Buffer.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;concat&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;([ct, tag]).&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;toString&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;base64&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;),&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;].&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;join&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;.&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;组件模板里渲染一个锁表单,并把 bundle 放在隐藏 div 里(供客户端脚本读取),同时注入解密脚本:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;html&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; class&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;locked-post&quot;&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; data-locked-post&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  &amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; data-locked-bundle&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; hidden&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&gt;{bundle}&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  &amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&gt;内容已加密,输入密码解锁查看&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  &amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;form&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; data-locked-form&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    &amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; type&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;password&quot;&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; data-locked-input&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; placeholder&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;密码&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    &amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;button&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; type&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;submit&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&gt;解锁&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;button&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  &amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;form&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  &amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; data-locked-error&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; hidden&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&gt;密码错误,请重试&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;注意 &lt;code&gt;tag&lt;/code&gt; 是&lt;strong&gt;拼接在密文末尾&lt;/strong&gt;一起交给浏览器的——Web Crypto 的 &lt;code&gt;AES-GCM.decrypt&lt;/code&gt; 默认按”密文尾部 128 位是标签”解析,和 Node 侧”先密文后 tag”的存储格式正好对上,两端都零配置。&lt;/p&gt;
&lt;h2 id=&quot;浏览器端解密web-crypto-api&quot;&gt;浏览器端解密:Web Crypto API&lt;/h2&gt;
&lt;p&gt;解密脚本用浏览器原生 &lt;code&gt;crypto.subtle&lt;/code&gt;,&lt;strong&gt;零外部依赖&lt;/strong&gt;,不引 crypto-js,也不怕 CDN 挂掉:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; [&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;saltB64&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;ivB64&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;dataB64&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;] &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; bundle.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;split&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;.&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; toBuf&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;b64&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&gt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {           &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;// base64 → Uint8Array&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; bin&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; atob&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(b64);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; buf&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; new&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Uint8Array&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(bin.&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;length&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  for&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; bin.&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;length&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; i&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) buf[i] &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; bin.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;charCodeAt&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(i);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  return&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; buf;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;};&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;form.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;addEventListener&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;submit&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;e&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&gt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  e.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;preventDefault&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  try&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;    // 1. 同样的 PBKDF2 派生流程,参数必须与构建期完全一致&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; keyMaterial&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; await&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; crypto.subtle.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;importKey&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;      &apos;raw&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; TextEncoder&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;().&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;encode&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(password), &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;PBKDF2&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, [&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;deriveKey&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    );&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; key&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; await&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; crypto.subtle.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;deriveKey&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      { name: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;PBKDF2&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, salt: &lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;toBuf&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(saltB64), iterations: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;210000&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, hash: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;SHA-256&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      keyMaterial,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      { name: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;AES-GCM&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, length: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;256&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;      false&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, [&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;decrypt&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    );&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;    // 2. 解密。密码错误时认证失败会直接抛异常&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; plain&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; await&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; crypto.subtle.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;decrypt&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      { name: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;AES-GCM&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, iv: &lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;toBuf&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(ivB64) }, key, &lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;toBuf&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(dataB64)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    );&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;    // 3. 注入正文,并让 Prism 重新高亮代码块&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; host&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; document.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;createElement&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;div&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    host.innerHTML &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; new&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; TextDecoder&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;().&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;decode&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(plain);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    root.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;replaceWith&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(host);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;    // Prism.highlightElement(...) 处理 pre code&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  } &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;catch&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (err) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    error.hidden &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; false&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;          &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;// 密码错误&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    input.value &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    input.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;focus&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;});&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;解密流程和构建期加密严格对称,只有一处不需要对称:密码。解密只拿 &lt;code&gt;bundle + 用户输入的密码&lt;/code&gt;,salt/IV/迭代次数全部来自页面本身。&lt;/p&gt;
&lt;h2 id=&quot;接入文章页与防泄露处理&quot;&gt;接入文章页与防泄露处理&lt;/h2&gt;
&lt;p&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;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;posts/[slug].astro&lt;/code&gt;&lt;/td&gt;&lt;td&gt;有 &lt;code&gt;password&lt;/code&gt; 时正文渲染为锁组件,跳过 TOC 提取,meta description 换成”🔒 本文内容已加密”&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;RSS(&lt;code&gt;index.xml.ts&lt;/code&gt;)&lt;/td&gt;&lt;td&gt;加密文章的 description 替换为通用提示,不再输出完整正文&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;列表/归档/终端摘要(&lt;code&gt;postSummary&lt;/code&gt;)&lt;/td&gt;&lt;td&gt;返回”🔒 内容已加密,输入密码查看”,不读取正文&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;sitemap&lt;/code&gt;&lt;/td&gt;&lt;td&gt;保留 URL(让文章可以被找到),正文本就不在页面里&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;文章页的判断逻辑很简单:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;ts&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; isLocked&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; !!&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;entry.data.password;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; toc&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; isLocked &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; null&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; :&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; extractToc&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(entry.rendered?.html &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;??&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;// ...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;{isLocked &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  &amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;LockedContent password&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;{entry.data.password} content&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;{entry.rendered?.html ?? &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;} &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  &amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;Content &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;其中 &lt;code&gt;entry.rendered.html&lt;/code&gt; 是 Astro 已经把 Markdown 渲染成 HTML、处理完相对路径后的成品,加密的是这个最终 HTML,而不是原始 Markdown——所以图片链接、代码高亮等行为和解密前完全一致。&lt;/p&gt;
&lt;h2 id=&quot;使用方式&quot;&gt;使用方式&lt;/h2&gt;
&lt;p&gt;在文章 frontmatter 加一行即可,不需要任何其他操作:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;yaml&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;---&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;测试Astro加密文章&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;password&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;你的密码&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;date&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;2026-08-06T10:00:00+08:00&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;---&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;构建后正文以密文进入 &lt;code&gt;dist&lt;/code&gt;,页面只有锁表单;&lt;/li&gt;
&lt;li&gt;删除 &lt;code&gt;password&lt;/code&gt; 字段即恢复公开;&lt;/li&gt;
&lt;li&gt;已经可以正常配合 RSS/归档/侧边栏使用(摘要自动替换)。&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;安全性讨论它到底能防什么&quot;&gt;安全性讨论:它到底能防什么&lt;/h2&gt;
&lt;p&gt;必须诚实地说清楚边界。&lt;strong&gt;静态站 + 客户端解密 = 无法做到真正的保密&lt;/strong&gt;,原因很直接:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;密文、算法、盐、迭代次数全部公开&lt;/strong&gt;。攻击者拿到页面源码就能离线暴力破解,唯一的成本就是 PBKDF2 那 21 万次迭代;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;密钥最终在浏览器里&lt;/strong&gt;。只要攻破任意一个访客的浏览器,就能看到解密后的明文,无法做到”只有指定的人能看”;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;明文仍在 git 仓库里&lt;/strong&gt;。仓库是私有的没问题;如果仓库公开,加不加密码都一样。&lt;/li&gt;
&lt;/ol&gt;
&lt;p&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;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;搜索引擎/爬虫索引正文&lt;/td&gt;&lt;td&gt;✅ 有效(爬虫不跑 JS,拿不到密文内容)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;RSS 订阅器看到正文&lt;/td&gt;&lt;td&gt;✅ 有效(description 已替换)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;直接翻源码的人&lt;/td&gt;&lt;td&gt;✅ 有效(只有密文)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;拿到 HTML 离线爆破的”有心人”&lt;/td&gt;&lt;td&gt;⚠️ 取决于密码强度,21 万次 PBKDF2 把单次尝试抬到几十毫秒级,弱密码仍可能被字典击穿&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;被社工/被攻破浏览器&lt;/td&gt;&lt;td&gt;❌ 无效&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;给使用者的建议:&lt;strong&gt;密码务必用长随机字符串&lt;/strong&gt;(比如 16 位以上),不要用生日、手机号这类可枚举的值。密码强度足够时,PBKDF2 已经能挡住绝大多数”顺手看看”级别的尝试。&lt;/p&gt;
&lt;h2 id=&quot;验证构建产物检查&quot;&gt;验证:构建产物检查&lt;/h2&gt;
&lt;p&gt;最后一步是在构建后确认真的没有明文残留,这一步建议写进发布流程:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# 以测试文章为例,全站 HTML 里搜正文特征短语,应当零命中&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;grep&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -r&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;正文特征短语&quot;&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; dist/&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; --include=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;*.html&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# 加密文章页应当存在锁表单与密文 bundle&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;grep&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -o&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;data-locked-bundle&apos;&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; dist/posts/&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;slu&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;g&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;/index.html&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;本站实测:构建后全站 HTML、RSS、&lt;code&gt;_astro&lt;/code&gt; 资源里都搜不到正文特征串,浏览器端用正确密码可以完整还原(含代码高亮),错误密码被 GCM 认证拒绝。&lt;/p&gt;
&lt;h2 id=&quot;经验总结&quot;&gt;经验总结&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;静态站加密的定位是”防君子不防小人”&lt;/strong&gt;,别指望它做身份鉴别。要做真正的权限控制,必须有服务端;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;KDF 比加密算法本身更值得花心思&lt;/strong&gt;。MD5 当密钥的 AES-CBC 方案被秒破不是 AES 的问题,是 KDF 的问题;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GCM 的认证特性是 UX 加分项&lt;/strong&gt;——错误密码直接报错,不用靠”乱码检测”猜;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;加密要配套处理所有出口&lt;/strong&gt;。正文换了密文,meta description、RSS、摘要、TOC 这些”隐形的正文副本”也得一起处理,否则白加密;&lt;/li&gt;
&lt;li&gt;构建期加密 + 浏览器原生 Web Crypto 解密,整个链路零 npm 依赖,这是静态站方案里比较省心的组合。&lt;/li&gt;
&lt;/ol&gt;</summary>
</entry>
<entry>
  <title>Astro 构建提速 2.3 倍:从构建日志里揪出 Intl.DateTimeFormat 的隐形开销</title>
  <link href="https://www.ioioi.cn/posts/astro-build-speedup-intl-datetimeformat/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/astro-build-speedup-intl-datetimeformat/</id>
  <published>2026-08-06T12:18:00.000Z</published>
  <updated>2026-08-06T12:18:00.000Z</updated>
  <summary type="html">&lt;p&gt;这两天给博客加了不少新文章,发现 &lt;code&gt;npm run build&lt;/code&gt; 越来越慢(31 秒)。盯着构建日志看,有个现象很蹊跷:带 &lt;code&gt;/published/&lt;/code&gt; 前缀的跳转页生成飞快(+1ms),而 &lt;code&gt;/posts/&lt;/code&gt; 下一堆页面却要 50~130ms。本来以为是 aliases 跳转页拖慢的,查到最后发现——&lt;strong&gt;慢的根本不是 aliases,而是一个藏在日期格式化里的隐形开销&lt;/strong&gt;。完整记录一下排查过程,顺便把 &lt;code&gt;Intl.DateTimeFormat&lt;/code&gt; 这个坑分享出来。&lt;/p&gt;
&lt;h2 id=&quot;起因先量化慢&quot;&gt;起因:先量化”慢”&lt;/h2&gt;
&lt;p&gt;站点结构大致是:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;astro.config.mjs&lt;/code&gt; 里把 842 条旧链接别名配进 &lt;code&gt;redirects&lt;/code&gt;,构建时生成静态跳转页;&lt;/li&gt;
&lt;li&gt;文章页由 &lt;code&gt;src/pages/posts/[slug].astro&lt;/code&gt; 生成;&lt;/li&gt;
&lt;li&gt;首页、分类、标签、归档、设置页等是常规列表页。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;直接把构建输出抓下来,按 URL 形态分组统计每页耗时:&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;/published/年份/slug/&lt;/code&gt; 跳转页&lt;/td&gt;&lt;td&gt;424&lt;/td&gt;&lt;td&gt;1.3ms&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;/posts/年份/月/slug/&lt;/code&gt; 别名跳转页&lt;/td&gt;&lt;td&gt;209&lt;/td&gt;&lt;td&gt;1.7ms&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;/posts/slug.html&lt;/code&gt; 别名跳转页&lt;/td&gt;&lt;td&gt;209&lt;/td&gt;&lt;td&gt;1.2ms&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;/posts/slug/&lt;/code&gt; &lt;strong&gt;真实文章页&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;212&lt;/td&gt;&lt;td&gt;&lt;strong&gt;~70ms&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;/settings&lt;/code&gt;、&lt;code&gt;/tags/*&lt;/code&gt;、首页等列表页&lt;/td&gt;&lt;td&gt;~90&lt;/td&gt;&lt;td&gt;&lt;strong&gt;~70ms&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;结论很清楚:&lt;strong&gt;所有别名/跳转页都是 1~3ms,慢的全是真实页面&lt;/strong&gt;。212 篇文章页 × 70ms ≈ 15s,再加列表页,基本吃掉了 “generating static routes” 阶段的 27 秒。之前直觉上”aliases 慢”其实是看走眼了——日志里 &lt;code&gt;/posts/slug/&lt;/code&gt; 长得和别名很像,但它们是正经文章页。&lt;/p&gt;
&lt;h2 id=&quot;深挖70ms-到底花在哪&quot;&gt;深挖:70ms 到底花在哪&lt;/h2&gt;
&lt;p&gt;给 &lt;code&gt;node_modules/astro/dist/core/build/generate.js&lt;/code&gt; 里的 &lt;code&gt;renderPath&lt;/code&gt; 临时加了几段计时,把一次页面生成拆成”渲染”和”写文件”两步:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;DEBUG [/posts/test-astro-encrypted]  total=74.9ms  render=72.9  fs=1.5&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;DEBUG [/posts/scrollbar-butterfly-style] total=52.1ms render=49.8 fs=1.9&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;DEBUG [/posts/windows-setting-priority-ipv4]  total=50.2ms  render=48.6  fs=1.3&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;写文件只有 ~1.5ms,&lt;strong&gt;render 占了 95%&lt;/strong&gt;。再在 &lt;code&gt;routing/handler.js&lt;/code&gt; 里打一行日志,看到更关键的信息:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;DEBUG2 [/posts/[slug]] handleTotal=74.6 pre=0.0 render=74.6&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;渲染的 routeData 是 &lt;code&gt;/posts/[slug]&lt;/code&gt;(type=page),也就是说每个文章页都是完整走了一遍 Astro 模板渲染,这不是 bug,是页面本身的成本。&lt;/p&gt;
&lt;h2 id=&quot;为什么一页要-70ms侧边栏比正文还重&quot;&gt;为什么一页要 70ms:侧边栏比正文还重&lt;/h2&gt;
&lt;p&gt;量了一下输出文件构成,一篇正文只有 9.8KB 的小文章,整页 HTML 却有 &lt;strong&gt;270KB&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;#x3C;article&gt;&lt;/code&gt; 正文:9.8KB;&lt;/li&gt;
&lt;li&gt;头部到正文之前(侧边栏 + 顶栏 + 脚本):~195KB;&lt;/li&gt;
&lt;li&gt;正文之后(底部栏等):~60KB。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;侧边栏 &lt;code&gt;Sidebar.astro&lt;/code&gt; 里,220 篇文章在”文件树/搜索/时间线”三个视图各出现一次,加上分类、标签、终端数据,每页要输出 &lt;strong&gt;1000+ 个链接&lt;/strong&gt;。这些数据虽然已经做了构建期缓存,但&lt;strong&gt;模板每页都要重新执行一遍&lt;/strong&gt;。&lt;/p&gt;
&lt;p&gt;而在这些模板执行里,有一个非常可疑的调用:侧边栏每页要调 &lt;code&gt;fmtDate&lt;/code&gt; 约 &lt;strong&gt;660 次&lt;/strong&gt;。看看它的实现:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;ts&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; partsInTZ&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;date&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Date&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; fmt&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; new&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; Intl.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;DateTimeFormat&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;zh-CN&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, { timeZone: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;TZ&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;/* ... */&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; }); &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;// ← 每次调用都 new!&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  const&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; get&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&gt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; fmt.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;formatToParts&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(date).&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;find&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;...&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)?.value &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;??&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;00&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  ...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;每次格式化都新建一个 &lt;code&gt;Intl.DateTimeFormat&lt;/code&gt; 实例&lt;/strong&gt;。实测:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;每次新建:&lt;code&gt;43.6µs/次&lt;/code&gt;(Windows + Node 24)&lt;/li&gt;
&lt;li&gt;复用同一个实例:&lt;code&gt;3.1µs/次&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;660 次 × 43.6µs ≈ &lt;strong&gt;29ms/页&lt;/strong&gt;,而文章页总共才 70ms——这个毫不起眼的函数占了大头。列表页更夸张,一页要格式化几十篇文章的日期,所以它们也从 ~70ms 掉到个位数。&lt;/p&gt;
&lt;h2 id=&quot;修复把-formatter-提升到模块级&quot;&gt;修复:把 formatter 提升到模块级&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;ts&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; TZ&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;Asia/Shanghai&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; tzDateFmt&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; new&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; Intl.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;DateTimeFormat&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;zh-CN&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  timeZone: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;TZ&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  year: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;numeric&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  month: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;2-digit&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  day: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;2-digit&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  hour: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;2-digit&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  minute: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;2-digit&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  second: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;2-digit&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  hourCycle: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;h23&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;});&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; partsInTZ&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;date&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Date&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  const&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; get&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; string&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    tzDateFmt.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;formatToParts&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(date).&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;find&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;((&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&gt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; p.type &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;===&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; type)?.value &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;??&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;00&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;  // ...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;formatToParts&lt;/code&gt; 是无状态的纯函数(对同一个实例并发调用也安全),改完后输出完全一致——文章日期、时区、跳转页 location 逐项对比过,没有任何变化。&lt;/p&gt;
&lt;h2 id=&quot;结果&quot;&gt;结果&lt;/h2&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;/td&gt;&lt;td&gt;~70ms&lt;/td&gt;&lt;td&gt;23ms&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;列表页平均耗时&lt;/td&gt;&lt;td&gt;~70ms&lt;/td&gt;&lt;td&gt;7.6ms&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;跳转页平均耗时&lt;/td&gt;&lt;td&gt;~1.5ms&lt;/td&gt;&lt;td&gt;~1.5ms(不变)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;整站构建&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;31.0s&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;13.4s&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;2.3 倍提速,只改了一个文件的一小段。构建日志里 842 个跳转页依旧飞快,&lt;code&gt;/published/&lt;/code&gt; 依旧 1ms,但全站生成时间直接腰斩。&lt;/p&gt;
&lt;h2 id=&quot;顺带验证buildconcurrency-没用&quot;&gt;顺带验证:&lt;code&gt;build.concurrency&lt;/code&gt; 没用&lt;/h2&gt;
&lt;p&gt;Astro 7 支持 &lt;code&gt;build: { concurrency: N }&lt;/code&gt; 并行生成页面,顺手测了一下(6 并发、32 核机器):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;单页平均耗时从 70ms 涨到 ~380ms(并发互相挤占);&lt;/li&gt;
&lt;li&gt;总耗时几乎没变,甚至略慢(28.6s vs 27.7s)。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;原因:页面渲染是&lt;strong&gt;单线程 CPU 密集&lt;/strong&gt;任务,Node 一个进程内并发只是时间片切换,不产生并行收益。所以这个方向可以直接排除。&lt;/p&gt;
&lt;h2 id=&quot;经验总结&quot;&gt;经验总结&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;先量化,再优化&lt;/strong&gt;。凭日志印象判断”哪个页面慢”很容易被误导——我把耗时按 URL 形态分组统计后,才发现慢的跟 aliases 没关系;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;别小看”每次调用都 new”的模式&lt;/strong&gt;。&lt;code&gt;Intl.DateTimeFormat&lt;/code&gt;、正则字面量以外的 &lt;code&gt;new RegExp&lt;/code&gt;、&lt;code&gt;Date&lt;/code&gt; 解析……在循环/模板里被高频调用时,对象构造开销会被放大成秒级差距;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;侧边栏等共享 UI 是隐形成本大头&lt;/strong&gt;。每页重渲染 &lt;del&gt;195KB 的侧边栏,数据层缓存救不了模板层的重复执行。如果要再进一步,可以把侧边栏 HTML 在构建期预渲染一次、跨页复用,预计还能再省 5&lt;/del&gt;8s,但需要和模板保持同步,属于”按需再做”的优化;&lt;/li&gt;
&lt;li&gt;排查时给 &lt;code&gt;node_modules&lt;/code&gt; 里打日志是快准狠的办法,记得改完还原(这次全程只改了 &lt;code&gt;generate.js&lt;/code&gt; 和 &lt;code&gt;handler.js&lt;/code&gt;,最后 &lt;code&gt;git checkout&lt;/code&gt; 恢复)。&lt;/li&gt;
&lt;/ol&gt;</summary>
</entry>
<entry>
  <title>测试Astro加密文章</title>
  <link href="https://www.ioioi.cn/posts/test-astro-encrypted/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/test-astro-encrypted/</id>
  <published>2026-08-06T02:00:00.000Z</published>
  <updated>2026-08-06T02:00:00.000Z</updated>
  <summary type="html">🔒 内容已加密，输入密码查看</summary>
</entry>
<entry>
  <title>全站滚动条改版:Butterfly 风格 5px 主题色细条</title>
  <link href="https://www.ioioi.cn/posts/scrollbar-butterfly-style/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/scrollbar-butterfly-style/</id>
  <published>2026-08-05T16:34:00.000Z</published>
  <updated>2026-08-05T16:34:00.000Z</updated>
  <summary type="html">&lt;p&gt;前阵子把文章按状态重组成 &lt;code&gt;content/published|draft|trash|hidden&lt;/code&gt; 后,顺手整理主题(ark)的滚动条。这篇记录改版思路与最终方案。&lt;/p&gt;
&lt;h2 id=&quot;问题滚动条要么没有要么很丑&quot;&gt;问题:滚动条要么没有,要么很丑&lt;/h2&gt;
&lt;p&gt;改版前全站的滚动条状态其实很乱:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;文章页正文完全没有滚动条&lt;/strong&gt;。正文的滚动容器 &lt;code&gt;.editor-surface&lt;/code&gt; 被设了 &lt;code&gt;scrollbar-width: none&lt;/code&gt;,滚轮能用,但右边光秃秃的,完全没有视觉反馈;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;其他地方都是系统原生滚动条&lt;/strong&gt;。侧边栏、代码块、终端、弹窗各自为政,Windows 上 Chrome 的原生灰条既粗又丑,和暗色主题格格不入;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;tabline 的横向滚动条只有 3px、16% 透明度&lt;/strong&gt;,几乎看不见。&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;需求很朴素:全站滚动条统一,&lt;strong&gt;藏进页面里&lt;/strong&gt;的细条,横向纵向都要管。&lt;/p&gt;
&lt;h2 id=&quot;参考butterfly-主题的方案&quot;&gt;参考:Butterfly 主题的方案&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://butterfly.js.org/&quot;&gt;Butterfly&lt;/a&gt;是 Hexo 的知名主题,它的滚动条观感一直是”轻、贴、不抢眼”。扒了它的 CSS,核心就三条:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;::-webkit-scrollbar&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  width&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  height&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;::-webkit-scrollbar-thumb&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  background&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;--scrollbar-color&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;); &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;/* 主题色 */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;::-webkit-scrollbar-track&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  background-color&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;transparent&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;/* 轨道全透明,滚动条&quot;沉&quot;进页面 */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;/* Firefox 用标准的 scrollbar 属性 */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  scrollbar-width&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;thin&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  scrollbar-color&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;--scrollbar-color&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;transparent&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;几个要点:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;5px 宽高都有&lt;/strong&gt;,横向滚动条(代码块、tabline)同样适用;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;thumb 用主题色实心填充&lt;/strong&gt;、不加圆角不加阴影,极简;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;轨道透明&lt;/strong&gt;,不占视觉面积,滚动条像是画在页面上的细线;&lt;/li&gt;
&lt;li&gt;暗色模式下 Butterfly 把 &lt;code&gt;--scrollbar-color&lt;/code&gt; 换成中性灰(它用 &lt;code&gt;#525252&lt;/code&gt;),不用亮蓝,避免刺眼。&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;实现&quot;&gt;实现&lt;/h2&gt;
&lt;h3 id=&quot;1-颜色变量&quot;&gt;1. 颜色变量&lt;/h3&gt;
&lt;p&gt;在 &lt;code&gt;assets/css/ark-vars.css&lt;/code&gt; 的亮/暗两套变量里各加一个 &lt;code&gt;--scrollbar-color&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;:root&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;  --scrollbar-color&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;#0969da&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;/* 亮色:主题蓝 */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;:root&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;data-mode&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;dark&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;] {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;  --scrollbar-color&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;#3d4450&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;/* 暗色:中性灰 */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;亮色直接用主题蓝 &lt;code&gt;--accent&lt;/code&gt; 同款 &lt;code&gt;#0969da&lt;/code&gt;,和站内强调色一致;暗色不用亮蓝而是低调的 &lt;code&gt;#3d4450&lt;/code&gt;,参考 Butterfly 的做法。&lt;/p&gt;
&lt;h3 id=&quot;2-全局规则&quot;&gt;2. 全局规则&lt;/h3&gt;
&lt;p&gt;同样放在 &lt;code&gt;ark-vars.css&lt;/code&gt; 末尾(变量和基础样式的落点),和上面 Butterfly 的方案一致:5px 宽高、主题色 thumb、透明轨道,外加 &lt;code&gt;@-moz-document url-prefix()&lt;/code&gt; 给 Firefox 套 &lt;code&gt;scrollbar-width: thin&lt;/code&gt; + &lt;code&gt;scrollbar-color&lt;/code&gt;。&lt;/p&gt;
&lt;p&gt;写在全局(而不是某个容器上),所有滚动容器自动生效:文章正文、侧边栏、代码块、终端、tabline、弹窗列表,横向纵向全覆盖,不用逐个容器去配。&lt;/p&gt;
&lt;h3 id=&quot;3-删掉局部覆盖&quot;&gt;3. 删掉局部覆盖&lt;/h3&gt;
&lt;p&gt;之前的局部样式全部移除,避免和全局规则打架:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;.editor-surface&lt;/code&gt;(文章正文):删掉 &lt;code&gt;scrollbar-width: none&lt;/code&gt; 和它的 &lt;code&gt;::-webkit-scrollbar&lt;/code&gt; 隐藏规则 —— 这是”文章页没有滚动条”的元凶,删掉后全局规则接管,5px 主题色细条立刻出现;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.editor-tabline&lt;/code&gt;(标签栏):删掉 3px 灰条那套自定义滚动条,横向滚动交给全局的 5px 高度规则。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;保留的例外有两个:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;.article-toc&lt;/code&gt;(文章目录浮层):有意隐藏滚动条,滚动靠滚轮/触控板,视觉更干净;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.editor-tabline&lt;/code&gt;(标签栏)的&lt;strong&gt;横向&lt;/strong&gt;滚动条:像 VS Code、Sublime 这类软件一样,标签太多时滚动条直接隐藏,靠滚轮左右滚动(见下),5px 全局横条只留给代码块等横向溢出的内容区。&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;标签栏滚轮横滚&quot;&gt;标签栏滚轮横滚&lt;/h2&gt;
&lt;p&gt;隐藏滚动条后得保证标签能滚动。在 &lt;code&gt;assets/js/ark-editor.js&lt;/code&gt; 里给 &lt;code&gt;.editor-tabline&lt;/code&gt; 挂了一个 wheel 监听:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;editorTabline.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;addEventListener&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;wheel&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;event&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (editorTabline.scrollWidth &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;#x3C;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; editorTabline.clientWidth) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;// 没溢出不拦截&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (Math.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;abs&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(event.deltaY) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;#x3C;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; Math.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;abs&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(event.deltaX)) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;      &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;// 横向滚轮事件放行&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  event.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;preventDefault&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  editorTabline.scrollLeft &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; event.deltaY &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; event.deltaX;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}, { passive: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;只有标签&lt;strong&gt;真正溢出&lt;/strong&gt;时才拦截滚轮,否则不影响页面竖向滚动;&lt;/li&gt;
&lt;li&gt;触控板/鼠标横滚(&lt;code&gt;deltaX&lt;/code&gt;)原样放行;&lt;/li&gt;
&lt;li&gt;鼠标滚轮(&lt;code&gt;deltaY&lt;/code&gt;)转成 &lt;code&gt;scrollLeft&lt;/code&gt;,实现”滚轮左右滚标签”的软件惯例。&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;效果&quot;&gt;效果&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;文章页右侧出现 5px 主题蓝竖条,滚动位置一目了然;&lt;/li&gt;
&lt;li&gt;代码块横向溢出时是 5px 主题色横条;&lt;/li&gt;
&lt;li&gt;标签栏横向滚动条隐藏,溢出时滚轮可直接左右滚动;&lt;/li&gt;
&lt;li&gt;暗色模式下是中性灰,不刺眼;&lt;/li&gt;
&lt;li&gt;轨道透明,滚动条”浮”在页面内容上,正是 Butterfly 那种藏在网页里的感觉。&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;相关文件&quot;&gt;相关文件&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;themes/ark/assets/css/ark-vars.css&lt;/code&gt; —— 颜色变量 + 全局滚动条规则&lt;/li&gt;
&lt;li&gt;&lt;code&gt;themes/ark/assets/css/ark-editor.css&lt;/code&gt; —— 移除 &lt;code&gt;.editor-surface&lt;/code&gt; / &lt;code&gt;.editor-tabline&lt;/code&gt; 的局部覆盖,tabline 横向滚动条隐藏&lt;/li&gt;
&lt;li&gt;&lt;code&gt;themes/ark/assets/js/ark-editor.js&lt;/code&gt; —— 标签栏滚轮横滚&lt;/li&gt;
&lt;/ul&gt;</summary>
</entry>
<entry>
  <title>资源管理器引导线与缩进布局:对齐、等比网格与紧凑/宽松开关</title>
  <link href="https://www.ioioi.cn/posts/sidebar-tree-guide-lines/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/sidebar-tree-guide-lines/</id>
  <published>2026-08-05T15:30:00.000Z</published>
  <updated>2026-08-05T15:30:00.000Z</updated>
  <summary type="html">&lt;p&gt;侧边栏资源管理器(文件树)的引导线一直有几处视觉问题:层级一变深引导线就断、线出现在目录行本身上、缩进层级忽宽忽窄。这篇记录这几轮的排查、修复思路与最终方案,以及新加的”紧凑/宽松资源管理器布局”设置开关。&lt;/p&gt;
&lt;h2 id=&quot;问题清单&quot;&gt;问题清单&lt;/h2&gt;
&lt;p&gt;从用户视角看,引导线的问题可以归纳为五类:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;引导线被子目录中断&lt;/strong&gt;。原本每行只画自己那一层深度的竖线,子目录一展开,父层级的竖线就在子目录行处断掉,树形连接不连续。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;引导线出现在目录行上&lt;/strong&gt;。云端(带 🔒 的工作区根行)的下拉符号正下方多了一条线:没对准 chevron 的尖端,还压在了锁图标所在的行容器上;分类、记录等目录行的 chevron 前面也各有一条多余的线。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;文件行缩进不统一&lt;/strong&gt;。记录里的文件行缩进要么太少(和父目录图标挤在一起),要么改完又太多(比同层文件夹多出一大步)。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;层级缩进尺寸不一致&lt;/strong&gt;。云端→分类这一步是”宽松”(23px),分类→子目录→文件却是”紧凑”(12px),同一个树里两套步距。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;引导线间距与左边框距离不一致&lt;/strong&gt;。线间距统一了,但最左侧边框到第一条引导线的距离和线间距对不上。&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;修复思路&quot;&gt;修复思路&lt;/h2&gt;
&lt;h3 id=&quot;1-祖先层级线一行画-n-1-条线&quot;&gt;1. 祖先层级线:一行画 N-1 条线&lt;/h3&gt;
&lt;p&gt;把引导线从”每行只画自己层级的线”改成”每行画全部祖先层级的线”:深度为 N 的行显示第 1~N-1 层的竖线,自己层级不画。这样:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;子目录展开后,父级竖线从分类一路贯通到文件,不再中断;&lt;/li&gt;
&lt;li&gt;目录行(包括云端根行)自身不再有任何引导线,🔒 容器干净了;&lt;/li&gt;
&lt;li&gt;每条线都从上一级目录的 chevron 方向垂直延伸下来。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;实现上利用 CSS 自定义属性 + 多层 &lt;code&gt;linear-gradient&lt;/code&gt; 背景拼出多条竖线,深度 1~5 分别声明 &lt;code&gt;--tree-guide&lt;/code&gt;,行内 &lt;code&gt;::after&lt;/code&gt; 统一铺满整行绘制。&lt;/p&gt;
&lt;h3 id=&quot;2-等比网格级别尺寸以引导线为准&quot;&gt;2. 等比网格:级别尺寸以引导线为准&lt;/h3&gt;
&lt;p&gt;最终定下的几何规则只有一条:&lt;strong&gt;整个树是一个以 &lt;code&gt;step&lt;/code&gt; 为单位的等比网格&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;引导线位置:&lt;code&gt;L_N = N × step&lt;/code&gt;(第 N 条线距行左边缘 N×step);&lt;/li&gt;
&lt;li&gt;行缩进:&lt;code&gt;padding_N = N × step − 8&lt;/code&gt;(8px 是 chevron 盒子中心到行左边缘的固定偏移);&lt;/li&gt;
&lt;li&gt;于是每层目录的 ▾ 尖端恰好落在自己层级的引导线上,且&lt;strong&gt;左边框→第一条线 = 相邻线间距 = 每级缩进&lt;/strong&gt;。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;全部由 CSS 变量 &lt;code&gt;--tree-step&lt;/code&gt; 驱动,不用硬编码像素:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;.file-tree&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;  --tree-step&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;16&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;/* 宽松默认 */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;:root&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;data-tree-indent-layout&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;compact&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;] &lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;.file-tree&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;  --tree-step&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;12&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;/* 紧凑覆盖 */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;.file-tree&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt; summary&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;.file-tree&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; .file-item&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  padding&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 8&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; calc&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;((&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;--tree-depth&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; var&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;--tree-step&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;16&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)) - &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;8&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;引导线位置用加法拼出来(&lt;code&gt;calc(var(--tree-step) + var(--tree-step) + …)&lt;/code&gt;),避免在 calc 里做乘法,兼容性更稳。&lt;/p&gt;
&lt;h3 id=&quot;3-紧凑-宽松布局开关&quot;&gt;3. 紧凑 / 宽松布局开关&lt;/h3&gt;
&lt;p&gt;设置页新增”紧凑资源管理器布局”复选框(&lt;code&gt;compactTreeIndent&lt;/code&gt;,沿用 &lt;code&gt;data-workbench-setting&lt;/code&gt; 机制):&lt;/p&gt;























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;模式&lt;/th&gt;&lt;th&gt;step&lt;/th&gt;&lt;th&gt;行缩进(chevron 尖端)&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;/td&gt;&lt;td&gt;16px&lt;/td&gt;&lt;td&gt;8 / 24 / 40 / 56&lt;/td&gt;&lt;td&gt;16 / 32 / 48 / 64&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;紧凑&lt;/td&gt;&lt;td&gt;12px&lt;/td&gt;&lt;td&gt;4 / 16 / 28 / 40&lt;/td&gt;&lt;td&gt;12 / 24 / 36 / 48&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;ul&gt;
&lt;li&gt;默认宽松;勾选后立即切换紧凑并写入 &lt;code&gt;localStorage&lt;/code&gt;(&lt;code&gt;ark-workbench-settings&lt;/code&gt;);&lt;/li&gt;
&lt;li&gt;&lt;code&gt;applyWorkbenchSettings()&lt;/code&gt; 把模式写到 &lt;code&gt;&amp;#x3C;html data-tree-indent-layout=&quot;compact|loose&quot;&gt;&lt;/code&gt;,CSS 按属性覆盖 &lt;code&gt;--tree-step&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;云端/本地等工作区根行不再特殊处理,同样落在网格上,层级步距全程一致。&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;验证&quot;&gt;验证&lt;/h2&gt;
&lt;p&gt;用无头 Chrome 逐项量了实际渲染值,两种模式下均满足:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;引导线间距:紧凑 12/12/12、宽松 16/16/16;&lt;/li&gt;
&lt;li&gt;每级缩进:紧凑 4→16→28→40、宽松 8→24→40→56;&lt;/li&gt;
&lt;li&gt;每层 chevron 尖端与对应引导线像素级重合;&lt;/li&gt;
&lt;li&gt;设置开关勾选后即时生效并持久化。&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;涉及文件&quot;&gt;涉及文件&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;assets/css/ark-sidebar.css&lt;/code&gt; — 引导线、缩进网格、&lt;code&gt;--tree-step&lt;/code&gt; 变量&lt;/li&gt;
&lt;li&gt;&lt;code&gt;assets/js/ark-core.js&lt;/code&gt; — 设置默认值与 &lt;code&gt;data-tree-indent-layout&lt;/code&gt; 应用&lt;/li&gt;
&lt;li&gt;&lt;code&gt;assets/js/ark-sync.js&lt;/code&gt; — 开关读写与重置&lt;/li&gt;
&lt;li&gt;&lt;code&gt;layouts/_default/settings.html&lt;/code&gt; + &lt;code&gt;i18n/zh.yml&lt;/code&gt; / &lt;code&gt;i18n/en.yml&lt;/code&gt; — 设置项 UI 与文案&lt;/li&gt;
&lt;/ul&gt;</summary>
</entry>
<entry>
  <title>侧边栏云端文件树改造记录:中文目录、分类树与 SPA 导航</title>
  <link href="https://www.ioioi.cn/posts/sidebar-cloud-tree-refactor/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/sidebar-cloud-tree-refactor/</id>
  <published>2026-08-05T13:30:00.000Z</published>
  <updated>2026-08-05T13:30:00.000Z</updated>
  <summary type="html">&lt;p&gt;WordPress 迁移到 Hugo 后,顺手把主题(ark)的侧边栏云端文件树整体重构了一遍。这篇记录改造的思路、结构与踩坑,方便日后维护。&lt;/p&gt;
&lt;h2 id=&quot;需求来源&quot;&gt;需求来源&lt;/h2&gt;
&lt;p&gt;原本的侧边栏云端树只有”按分类分组的文章 + 散落的页面链接”,分类和文件都是英文 slug,页面路径直接裸暴露(如 &lt;code&gt;pages/friends/index.md&lt;/code&gt;),既不美观也不符合中文站点的使用习惯。改造目标是:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;目录全部中文化,文件树里显示文章标题而不是英文 slug&lt;/li&gt;
&lt;li&gt;结构分层:页面 / 归档 / 分类 / 标签 / 管理 五个一级目录&lt;/li&gt;
&lt;li&gt;分类、标签做成文件树,可配置显示哪些分类&lt;/li&gt;
&lt;li&gt;点击目录时:展开文件树 + 打开对应列表页,且不刷新浏览器(SPA)&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;最终结构&quot;&gt;最终结构&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;☁ 云端&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;├─ 📁 页面&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;│  ├─ Arkylin的小屋        ← 主页(显示网站名,点击回首页)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;│  ├─ 示例页面.md(紫色)     ← pages 目录的页面,标题显示&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;│  └─ 友情链接.md ...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;├─ 📁 归档                ← 链接到 /archives/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;│  ├─ 📁 2019 (35)        ← 按年份分组,带文章计数&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;│  ├─ 📁 2020 (72)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;│  └─ ...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;├─ 📁 分类                ← 链接到 /categories/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;│  ├─ 📁 学习(带链接)       ← 点击跳转 /categories/学习/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;│  │  └─ 文章标题.md&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;│  └─ ...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;├─ 📁 标签                ← 链接到 /tags/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;│  ├─ Aliyun (1)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;│  └─ ...(70 个,默认折叠)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;└─ 📁 管理&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   ├─ admin.md / settings.md / account.md&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;关键实现&quot;&gt;关键实现&lt;/h2&gt;
&lt;h3 id=&quot;1-分类按配置显示&quot;&gt;1. 分类按配置显示&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;hugo.toml&lt;/code&gt; 里通过 &lt;code&gt;[params.sidebar]&lt;/code&gt; 控制:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;toml&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;params&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;sidebar&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;  # 允许显示的分类文件夹(留空 = 全部显示)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  show_categories = [&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;学习&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;开发&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;日记&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;代码&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;VPS测评&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;记录&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;测评&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;未分类&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;模板里用 &lt;code&gt;in $showCats .&lt;/code&gt; 过滤分类文件夹;一篇文章有多个分类时,按分类分组(Go 模板 dict 累加),自然在多个分类文件夹里同时出现。&lt;/p&gt;
&lt;h3 id=&quot;2-点击目录展开树-spa-打开页面&quot;&gt;2. 点击目录:展开树 + SPA 打开页面&lt;/h3&gt;
&lt;p&gt;文件树的文件夹 label 用 &lt;code&gt;&amp;#x3C;span data-tree-link=&quot;/categories/&quot;&gt;&lt;/code&gt;,点击时由 JS 处理:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;document.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;addEventListener&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;click&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;e&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  var&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; el &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; e.target.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;closest&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;[data-tree-link]&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;!&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;el) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  var&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; href &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; el.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;getAttribute&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;data-tree-link&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;!&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;href) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  var&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; d &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; el.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;closest&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;details&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (d) d.open &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; true&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;                 &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;// 展开文件树&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;typeof&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; navigateTo &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;===&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;function&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;    navigateTo&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(href);                   &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;// 主题自带 SPA 导航,不刷新&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  } &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    window.location.href &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; href;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;});&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;关键点:不要直接 &lt;code&gt;window.location.href = href&lt;/code&gt;——主题(ark)有完整的 SPA 路由(&lt;code&gt;navigateTo&lt;/code&gt;,fetch 页面 + DOMParser 替换内容),直接赋值会整页刷新,丢失编辑器 tab、树高亮等状态。点击后新页面树默认展开(&lt;code&gt;&amp;#x3C;details open&gt;&lt;/code&gt;)。&lt;/p&gt;
&lt;h3 id=&quot;3-层级引导线&quot;&gt;3. 层级引导线&lt;/h3&gt;
&lt;p&gt;云端树原本没有层级竖线,本地虚拟树有,视觉不一致。用伪元素 + 重复渐变实现&lt;strong&gt;连续列线&lt;/strong&gt;(每行按深度画所有祖先列,避免”线被二级目录截断”):&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;.file-tree&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; .tree-depth-1&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; &gt;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt; summary&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;::after&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;.file-tree&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; .file-item.tree-depth-2::after&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;/* ...depth 1-5 */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  content&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  position&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;absolute&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  top&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  bottom&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  left&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  width&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;calc&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;13&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; ((&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;--tree-depth&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) * &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;12&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) + 12&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  background&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;repeating-linear-gradient&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    to&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; right&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;    transparent&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 12&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;    color-mix&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; srgb&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;--line&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;68&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;%&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;transparent&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;12&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 13&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;px&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  );&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;4-目录行高统一踩坑&quot;&gt;4. 目录行高统一(踩坑)&lt;/h3&gt;
&lt;p&gt;文件夹的 summary 是 3 列网格 &lt;code&gt;grid-template-columns: 16px 18px minmax(0, 1fr)&lt;/code&gt;。给”年份文件夹”加文章计数后变成 4 个元素,第 4 个被挤到&lt;strong&gt;下一行&lt;/strong&gt;,行高直接翻倍(22px → 44px),看起来”有的目录大有的小”:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;.file-tree&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; .tree-folder.is-year&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; &gt;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt; summary&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  grid-template-columns&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;16&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 18&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; minmax&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;fr&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;auto&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;另外,&lt;strong&gt;文件夹 label 用 &lt;code&gt;&amp;#x3C;a&gt;&lt;/code&gt; 和 &lt;code&gt;&amp;#x3C;span&gt;&lt;/code&gt; 渲染观感不同&lt;/strong&gt;(链接有默认交互样式),统一用 &lt;code&gt;&amp;#x3C;span&gt;&lt;/code&gt; + JS 跳转,目录大小/颜色才完全一致。分类文件夹原有的蓝色图标也一并改回灰色,与标签/归档文件夹统一。&lt;/p&gt;
&lt;h2 id=&quot;遗留&quot;&gt;遗留&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;本地虚拟树(浏览器本地文件)和云端树结构不同,云端已中文化,本地保持原样&lt;/li&gt;
&lt;li&gt;&lt;code&gt;extra_dirs&lt;/code&gt; 配置项已废弃(归档固定为一级目录),如需在页面文件夹下追加自定义目录可恢复该逻辑&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;相关文件&quot;&gt;相关文件&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;themes/ark/layouts/partials/sidebar.html&lt;/code&gt; — 云端树模板 + 点击跳转 JS&lt;/li&gt;
&lt;li&gt;&lt;code&gt;themes/ark/assets/css/ark-sidebar.css&lt;/code&gt; — 引导线、is-year 网格、label 样式&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hugo.toml&lt;/code&gt; — &lt;code&gt;[params.sidebar]&lt;/code&gt; 分类显示配置&lt;/li&gt;
&lt;/ul&gt;</summary>
</entry>
<entry>
  <title>WordPress 迁移 Hugo 全记录:Plan、工具、代码与流程</title>
  <link href="https://www.ioioi.cn/posts/wordpress-to-hugo-migration/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/wordpress-to-hugo-migration/</id>
  <published>2026-08-05T12:10:00.000Z</published>
  <updated>2026-08-05T12:10:00.000Z</updated>
  <summary type="html">&lt;p&gt;2026 年 8 月,我把自己的 WordPress 博客完整迁移到了 Hugo。这篇文章记录整个迁移的&lt;strong&gt;计划、工具、核心代码和流程&lt;/strong&gt;,给以后做同类迁移留个参考。&lt;/p&gt;
&lt;h2 id=&quot;背景与数据盘点&quot;&gt;背景与数据盘点&lt;/h2&gt;
&lt;p&gt;旧站是 1Panel 面板部署的 Docker WordPress,备份包里有:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;wordpress.sql&lt;/code&gt;(2.7MB,MySQL 全量导出,&lt;strong&gt;内容都在这里&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;wp-content/uploads/&lt;/code&gt;(370 个媒体文件)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;先摸清家底(用 Python 解析 SQL 统计):&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;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;文章 post(已发布)&lt;/td&gt;&lt;td&gt;211&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;文章 post(草稿)&lt;/td&gt;&lt;td&gt;12&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;文章 post(回收站)&lt;/td&gt;&lt;td&gt;9&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;文章 post(私密)&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;页面 page(已发布 / 草稿)&lt;/td&gt;&lt;td&gt;6 / 1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;附件 attachment&lt;/td&gt;&lt;td&gt;291&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;修订版本 revision&lt;/td&gt;&lt;td&gt;87(忽略)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;分类 / 标签&lt;/td&gt;&lt;td&gt;9 / 69&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;内容形态:196 篇经典编辑器 HTML + 4 篇 Gutenberg 块,还有少量 Handsome 主题短代码(&lt;code&gt;[collapse]&lt;/code&gt;、&lt;code&gt;[post cid=]&lt;/code&gt;、&lt;code&gt;[hplayer]&lt;/code&gt;)。&lt;/p&gt;
&lt;h2 id=&quot;方案设计关键决策&quot;&gt;方案设计(关键决策)&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;状态映射&lt;/strong&gt;:WP 的 &lt;code&gt;post_status&lt;/code&gt; 还原为 5 种语义,写入 front matter 的 &lt;code&gt;status&lt;/code&gt; 字段:
&lt;code&gt;publish→published&lt;/code&gt;、&lt;code&gt;draft→draft&lt;/code&gt;、&lt;code&gt;trash→trash&lt;/code&gt;、&lt;code&gt;private→hidden&lt;/code&gt;、&lt;code&gt;publish+密码→encrypted&lt;/code&gt;(本数据无)。
非 published 状态全部加 &lt;code&gt;draft: true&lt;/code&gt;——&lt;strong&gt;Hugo 原生的”导入但不渲染”&lt;/strong&gt;,&lt;code&gt;hugo server -D&lt;/code&gt; 可预览。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;目录结构&lt;/strong&gt;:文章按发布时间存 &lt;code&gt;content/posts/YYYY/MM/&amp;#x3C;slug&gt;/&lt;/code&gt;(人好找好改),每个 bundle 内 &lt;code&gt;index.md&lt;/code&gt; + &lt;code&gt;images/&lt;/code&gt;;页面单独放 &lt;code&gt;content/pages/&amp;#x3C;slug&gt;/&lt;/code&gt;。这是 Hugo 官方推荐的 &lt;strong&gt;Page Bundle&lt;/strong&gt; 模式。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;URL 与旧链接兼容&lt;/strong&gt;:Hugo 目录结构自动生成规范链接 &lt;code&gt;/posts/YYYY/MM/&amp;#x3C;slug&gt;/&lt;/code&gt;,同时每篇 front matter 写两个 alias:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;yaml&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;aliases&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  - &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;/posts/&amp;#x3C;slug&gt;.html&lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;    # 旧 WordPress 链接&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  - &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;/posts/&amp;#x3C;slug&gt;&lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;         # 短链接&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Hugo 自动为 alias 生成 301 重定向页,新旧站同域名 &lt;code&gt;www.ioioi.cn&lt;/code&gt;,老地址全部不 404。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;图片处理&lt;/strong&gt;:文章引用的图片复制进文章 bundle 的 &lt;code&gt;images/&lt;/code&gt; 子目录,引用改为相对路径;没有被任何文章引用的孤儿图片,保留 &lt;code&gt;YYYY/MM&lt;/code&gt; 年月结构放到 &lt;code&gt;static/images/&lt;/code&gt;。全程不保留 &lt;code&gt;wp-content/uploads&lt;/code&gt; 这种 WordPress 痕迹。&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;工具&quot;&gt;工具&lt;/h2&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;Python&lt;/td&gt;&lt;td&gt;3.13&lt;/td&gt;&lt;td&gt;解析 SQL、转换、生成&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;markdownify&lt;/td&gt;&lt;td&gt;1.2.3&lt;/td&gt;&lt;td&gt;HTML → Markdown(代码块/表格/图片都处理得很好)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Hugo&lt;/td&gt;&lt;td&gt;v0.162.1 extended&lt;/td&gt;&lt;td&gt;构建验证&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;h2 id=&quot;核心代码&quot;&gt;核心代码&lt;/h2&gt;
&lt;h3 id=&quot;1-sql-解析器兼容-mysqldump-转义&quot;&gt;1. SQL 解析器(兼容 mysqldump 转义)&lt;/h3&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; parse_values&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(block):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;    &quot;&quot;&quot;把一个 SQL 行拆成字段列表,处理 &apos;&apos; 和 &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; 转义&quot;&quot;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    vals, cur &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; [], []&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    i, n &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;len&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(block)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    def&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; flush&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;():&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;        nonlocal&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; cur&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        vals.append(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;.join(cur)); cur &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; []&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    while&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; n:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        c &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; block[i]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;        if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; c &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;&apos;&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;            j &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;            buf &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; []&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;            while&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; j &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; n:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;                if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; block[j] &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; and&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; j &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; &amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; n:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;                    buf.append(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; block[j&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]); j &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;                elif&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; block[j:j&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;] &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;&apos;&apos;&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;                    buf.append(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;&apos;&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;); j &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;                elif&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; block[j] &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;&apos;&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;                    j &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;break&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;                else&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;                    buf.append(block[j]); j &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;            cur.append(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;.join(buf)); i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; j&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;        elif&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; c &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;,&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;            flush(); i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;        else&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;            cur.append(c); i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; cur:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        flush()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    return&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; vals&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;行切分的关键是&lt;strong&gt;引号感知&lt;/strong&gt;:内容里可能包含 &lt;code&gt;),(&lt;/code&gt; 或转义引号,必须用状态机在引号外才切行:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; extract_insert&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(table):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;    &quot;&quot;&quot;解析该表的所有 INSERT 区块, mysqldump 可能拆成多条 INSERT 语句&quot;&quot;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    all_rows &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; []&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    for&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; m &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; re.finditer(&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;r&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;color:#DBEDFF&quot;&gt;INSERT INTO `&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; table &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; r&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;color:#DBEDFF&quot;&gt;` VALUES&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;(.&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;*?&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#DBEDFF&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#85E89D;font-weight:bold&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, sql, re.S):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        block &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; m.group(&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        rows, start, i, in_str &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; [], &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;False&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;        while&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; len&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(block):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;            if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; block[i] &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:          &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# 转义字符,跳过&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;                i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 2&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;continue&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;            if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; block[i] &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;&apos;&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;                if&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; in_str &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;and&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; block[i&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:i&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;] &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;&apos;&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:   &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# &apos;&apos; 转义&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;                    i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 2&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;continue&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;                in_str &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; not&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; in_str&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;            elif&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; not&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; in_str &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;and&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; block[i:i&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;] &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;),(&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;                rows.append(block[start:i&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]); start &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 2&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 3&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;continue&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;            i &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;        ...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    return&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; all_rows&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;2-html-markdown-图片归集&quot;&gt;2. HTML → Markdown + 图片归集&lt;/h3&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; markdownify &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; markdownify &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; md&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# 清理 Gutenberg 注释&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;html &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; re.sub(&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;r&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;color:#DBEDFF&quot;&gt;&amp;#x3C;!--&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;\s&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color:#DBEDFF&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;color:#DBEDFF&quot;&gt;wp:&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;^&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;&gt;]&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;*?&lt;/span&gt;&lt;span style=&quot;color:#DBEDFF&quot;&gt;--&gt;&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, html)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# 提取文章引用的所有上传文件&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;ABS_RE&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; re.compile(&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;r&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;color:#DBEDFF&quot;&gt;https&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;color:#DBEDFF&quot;&gt;://&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;(?:&lt;/span&gt;&lt;span style=&quot;color:#DBEDFF&quot;&gt;www&lt;/span&gt;&lt;span style=&quot;color:#85E89D;font-weight:bold&quot;&gt;\.&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;color:#DBEDFF&quot;&gt;ioioi&lt;/span&gt;&lt;span style=&quot;color:#85E89D;font-weight:bold&quot;&gt;\.&lt;/span&gt;&lt;span style=&quot;color:#DBEDFF&quot;&gt;cn/wp-content/uploads/&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;([&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;^&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;\s&quot;&lt;/span&gt;&lt;span style=&quot;color:#85E89D;font-weight:bold&quot;&gt;\&apos;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;&amp;#x3C;&gt;)]&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; m &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; ABS_RE&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;.finditer(html):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    rel &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; unquote(m.group(&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;))&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;    # 找到磁盘上的原文件,复制到 bundle/images/,引用改为相对路径&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    target &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; safe_name(os.path.basename(rel))&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    shutil.copy2(src, os.path.join(bundle, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;images&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, target))&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    ref_map[orig] &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;images/&apos;&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; target&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;markdown &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; md(html, &lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;heading_style&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;ATX&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;bullets&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;-&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; orig, target &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; ref_map.items():&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    markdown &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; markdown.replace(orig, target)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;3-front-matter-生成&quot;&gt;3. front matter 生成&lt;/h3&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;fm.append(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;---&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;fm.append(fm_value(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;title&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, it[&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;title&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;] &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;or&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; f&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;未命名-&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;pid&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;))&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;fm.append(fm_value(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;date&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, fmt_dt(date_dt)))          &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# YYYY-MM-DDTHH:MM:SS+08:00&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;fm.append(fm_value(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;status&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, it[&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;status&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;]))&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;fm.append(fm_value(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;draft&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, it[&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;status&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;] &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;!=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;published&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;))&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;fm.append(fm_value(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;aliases&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, [alias_base &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;.html&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, alias_base]))&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;fm.append(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;---&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;流程5-阶段&quot;&gt;流程(5 阶段)&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;阶段1 解析   wordpress.sql → 结构化数据(文章/页面/分类/标签/图片引用)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;阶段2 转换   HTML→Markdown, 清 Gutenberg 注释, 解析 &amp;#x3C;img&gt; 清单&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;阶段3 资源   文章引用图片 → bundle images/; 孤儿 → static/images/YYYY/MM/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;阶段4 生成   content/posts/YYYY/MM/&amp;#x3C;slug&gt;/index.md + content/pages/&amp;#x3C;slug&gt;/index.md&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;阶段5 验证   hugo build + 数量核对 + 渲染抽查 + 迁移报告&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;踩过的坑&quot;&gt;踩过的坑&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;.html&lt;/code&gt; 附件不能放 content 里&lt;/strong&gt;:Hugo 把 bundle 内任何 &lt;code&gt;.html&lt;/code&gt;/&lt;code&gt;.md&lt;/code&gt; 文件当页面源,触发 &lt;code&gt;security.allowContent&lt;/code&gt; 拦截。非图片附件(html/zip/mp4)统一放 &lt;code&gt;static/media/YYYY/MM/&lt;/code&gt;,用绝对路径 &lt;code&gt;/media/...&lt;/code&gt; 引用。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PowerShell 跑 &lt;code&gt;python -c&lt;/code&gt; 传中文/引号脚本容易炸&lt;/strong&gt;,改成写 &lt;code&gt;.py&lt;/code&gt; 文件执行。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SQL 内容里的 &lt;code&gt;\r\n&lt;/code&gt; 是转义序列不是字面量&lt;/strong&gt;,&lt;code&gt;sql_unescape()&lt;/code&gt; 要按 &lt;code&gt;\\&lt;/code&gt;→&lt;code&gt;\&lt;/code&gt;、&lt;code&gt;\n&lt;/code&gt;→换行 的顺序处理,否则代码块里出现真 &lt;code&gt;\n&lt;/code&gt; 文本。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;控制台 GBK 乱码 ≠ 文件乱码&lt;/strong&gt;,验证文件内容用 &lt;code&gt;-Encoding UTF8&lt;/code&gt; 读取。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;mysqldump 会按表拆成多条 INSERT 语句&lt;/strong&gt;:&lt;code&gt;wp_posts&lt;/code&gt; 数据被拆成两个 &lt;code&gt;INSERT INTO&lt;/code&gt; 区块,如果只 &lt;code&gt;re.search&lt;/code&gt; 第一个区块,第二个区块里的 2025 年文章会&lt;strong&gt;全部丢失&lt;/strong&gt;。解析器必须用 &lt;code&gt;re.finditer&lt;/code&gt; 扫描所有 &lt;code&gt;INSERT INTO ... VALUES&lt;/code&gt; 区块再合并。这是本次迁移最大的坑,第一版差点丢掉 11 篇文章(2025 年的 Win11 核显、SQL 连接规范、绿联 NAS、Windows IPv4 优先级等)。&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;最终结果&quot;&gt;最终结果&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;234 篇文章 + 7 个页面全部导入(逐篇核对无遗漏),&lt;code&gt;hugo build&lt;/code&gt; 零错误&lt;/li&gt;
&lt;li&gt;211 篇已发布正常渲染,草稿/回收站/私密 23 篇以 &lt;code&gt;draft: true&lt;/code&gt; 保留&lt;/li&gt;
&lt;li&gt;511 个旧链接重定向,123 篇带图文章图片全部本地化,无缺失&lt;/li&gt;
&lt;li&gt;迁移报告自动生成(缺失图片、短代码清单、孤儿图片清单)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;遗留&lt;/strong&gt;:&lt;code&gt;[collapse]&lt;/code&gt;(8 篇)、&lt;code&gt;[post cid=]&lt;/code&gt;(9 处)、&lt;code&gt;[hplayer]&lt;/code&gt;(1 篇)等 Handsome 主题短代码目前以纯文本保留,后续可改成 Hugo shortcode(&lt;code&gt;&amp;#x3C;details&gt;&lt;/code&gt; 折叠、文章互链等)。&lt;/p&gt;
&lt;h2 id=&quot;数据文件&quot;&gt;数据文件&lt;/h2&gt;
&lt;p&gt;迁移脚本和中间数据留在本地 &lt;code&gt;C:\Users\i\AppData\Local\Temp\opencode\&lt;/code&gt;(migrate.py / generate.py / wp_items.json),报告在 &lt;code&gt;migration-report.md&lt;/code&gt;。&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Windows 设置优先 IPv4</title>
  <link href="https://www.ioioi.cn/posts/windows-setting-priority-ipv4/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/windows-setting-priority-ipv4/</id>
  <published>2025-06-26T07:38:06.000Z</published>
  <updated>2025-06-26T07:38:06.000Z</updated>
  <summary type="html">&lt;p&gt;(base) PS C:\Users\i&gt; netsh interface ipv6 show prefixpolicies
查询活动状态…
优先顺序 标签 前缀&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;50 0 ::1/128
40 1 ::/0
35 4 ::ffff:0:0/96
30 2 2002::/16
5 5 2001::/32
3 13 fc00::/7
1 11 fec0::/10
1 12 3ffe::/16
1 3 ::/96
(base) PS C:\Users\i&gt; netsh interface ipv6 set prefixpolicy ::ffff:0:0/96 100 4
请求的操作需要提升(作为管理员运行)。
(base) PS C:\Users\i&gt; netsh interface ipv6 show prefixpolicies
查询活动状态…
优先顺序 标签 前缀&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;100 4 ::ffff:0:0/96
50 0 ::1/128
40 1 ::/0
30 2 2002::/16
5 5 2001::/32
3 13 fc00::/7
1 11 fec0::/10
1 12 3ffe::/16
1 3 ::/96&lt;/p&gt;</summary>
</entry>
<entry>
  <title>解决Netbird和Tailscale不能在Linux共存Ping不通的问题</title>
  <link href="https://www.ioioi.cn/posts/resolve-the-issue-of-netbird-and-tailscale-not-being-able/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/resolve-the-issue-of-netbird-and-tailscale-not-being-able/</id>
  <published>2025-05-01T12:26:42.000Z</published>
  <updated>2025-05-01T12:45:32.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;a href=&quot;https://github.com/braginini&quot;&gt;&lt;img src=&quot;https://avatars.githubusercontent.com/u/700848?u=aa0ab5567402c58239a77529aca632f56bb7879a&amp;#x26;v=4&amp;#x26;size=80&quot; alt=&quot;braginini&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;braginini-commented-on-nov-7-2022&quot;&gt;braginini commented on Nov 7, 2022&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/braginini&quot;&gt;braginini&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/netbirdio/netbird/issues/544#issuecomment-1304841613&quot;&gt;on Nov 7, 2022&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Contributor&lt;/p&gt;
&lt;p&gt;You can use &lt;code&gt;--netfilter-mode=off&lt;/code&gt; when running Tailscale.
This will prevent aggressive packets take over by Tailscale daemon.&lt;/p&gt;
&lt;p&gt;It doesn’t exclude the possibility of conflict but chances are low.&lt;/p&gt;
&lt;p&gt; 
&lt;a href=&quot;https://github.com/netbirdio/netbird/issues/544&quot;&gt;https://github.com/netbirdio/netbird/issues/544&lt;/a&gt;
 
&lt;code&gt;--netfilter-mode&lt;/code&gt; (Linux only) Advanced feature for controlling the degree of automatic firewall configuration. Values are either “off”, “nodivert”, or “on”. Defaults to “on”, except for Synology which defaults to “off”. Setting this flag to “off” disables all management of &lt;code&gt;netfilter&lt;/code&gt;. Setting to “nodivert” creates and manages Tailscale sub-chains, but leaves the calling of those chains up to the administrator. Setting to “on” means using full management of Tailscale’s rules. Note that if you set &lt;code&gt;--netfilter-mode&lt;/code&gt; to “off” or “nodivert”, it is your responsibility to configure the firewall securely for Tailscale traffic. We recommend using the rules installed by &lt;code&gt;--netfilter-mode=on&lt;/code&gt; as a starting point.
 
&lt;a href=&quot;https://tailscale.com/kb/1241/tailscale-up&quot;&gt;https://tailscale.com/kb/1241/tailscale-up&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>绿联NAS虚拟机MacVTap网络虚拟机和宿主机无法相互访问</title>
  <link href="https://www.ioioi.cn/posts/green-alliance-nas-virtual-machine-macvtap-network-virtual/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/green-alliance-nas-virtual-machine-macvtap-network-virtual/</id>
  <published>2025-03-22T09:47:17.000Z</published>
  <updated>2025-03-22T09:47:17.000Z</updated>
  <summary type="html">&lt;p&gt;因为他们之间没有通信的渠道，所以无法通信，添加一个NAT网卡就行了。&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/green-alliance-nas-virtual-machine-macvtap-network-virtual/images/Snipaste_2025-03-22_17-46-53-1024x602.png&quot; alt=&quot;&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.redhat.com/zh-cn/documentation/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/sect-guest_can_reach_outside_network_but_cannot_reach_host_when_using_macvtap_interface#sect-Guest_can_reach_outside_network_but_cannot_reach_host_when_using_macvtap_interface&quot;&gt;参考：A.19.4. Guest Can Reach Outside Network，但在使用 macvtap 界面时可能会重新访问主机&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>绿联docker无法ping通主机</title>
  <link href="https://www.ioioi.cn/posts/green-union-docker-cannot-ping-the-host/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/green-union-docker-cannot-ping-the-host/</id>
  <published>2025-03-13T13:39:30.000Z</published>
  <updated>2025-03-13T13:39:30.000Z</updated>
  <summary type="html">&lt;p&gt;关闭“启用多网关就行了”
&lt;img src=&quot;/posts/green-union-docker-cannot-ping-the-host/images/Snipaste_2025-03-13_21-38-58-1024x641.png&quot; alt=&quot;&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>miniconda安装电脑上装了Python环境的版本记录会安装到Python版本目录下</title>
  <link href="https://www.ioioi.cn/posts/the-version-record-of-miniconda-installed-on-the-computer/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/the-version-record-of-miniconda-installed-on-the-computer/</id>
  <published>2025-03-11T08:02:16.000Z</published>
  <updated>2025-03-11T08:02:16.000Z</updated>
  <summary type="html">&lt;p&gt;miniconda安装电脑上装了Python环境的版本记录会安装到Python版本目录下
&lt;img src=&quot;/posts/the-version-record-of-miniconda-installed-on-the-computer/images/Snipaste_2025-03-11_15-52-20-300x160.png&quot; alt=&quot;&quot; loading=&quot;lazy&quot;&gt;
miniconda版本3.12 Python版本3.13，然后使用miniconda 创建3.13的环境会安装到Python里面去
 
(ultralytics) PS C:\Users\i&gt; pip3 install torch torchvision torchaudio —index-url &lt;a href=&quot;https://download.pytorch.org/whl/cu126&quot;&gt;https://download.pytorch.org/whl/cu126&lt;/a&gt;
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: &lt;a href=&quot;https://download.pytorch.org/whl/cu126&quot;&gt;https://download.pytorch.org/whl/cu126&lt;/a&gt;
Collecting torch
Using cached &lt;a href=&quot;https://download.pytorch.org/whl/cu126/torch-2.6.0%2Bcu126-cp313-cp313-win_amd64.whl.metadata&quot;&gt;https://download.pytorch.org/whl/cu126/torch-2.6.0%2Bcu126-cp313-cp313-win_amd64.whl.metadata&lt;/a&gt; (28 kB)
Collecting torchvision
Using cached &lt;a href=&quot;https://download.pytorch.org/whl/cu126/torchvision-0.21.0%2Bcu126-cp313-cp313-win_amd64.whl.metadata&quot;&gt;https://download.pytorch.org/whl/cu126/torchvision-0.21.0%2Bcu126-cp313-cp313-win_amd64.whl.metadata&lt;/a&gt; (6.3 kB)
Collecting torchaudio
Using cached &lt;a href=&quot;https://download.pytorch.org/whl/cu126/torchaudio-2.6.0%2Bcu126-cp313-cp313-win_amd64.whl.metadata&quot;&gt;https://download.pytorch.org/whl/cu126/torchaudio-2.6.0%2Bcu126-cp313-cp313-win_amd64.whl.metadata&lt;/a&gt; (6.8 kB)
Collecting filelock (from torch)
Using cached &lt;a href=&quot;https://download.pytorch.org/whl/filelock-3.13.1-py3-none-any.whl.metadata&quot;&gt;https://download.pytorch.org/whl/filelock-3.13.1-py3-none-any.whl.metadata&lt;/a&gt; (2.8 kB)
Collecting typing-extensions&gt;=4.10.0 (from torch)
Using cached &lt;a href=&quot;https://download.pytorch.org/whl/typing_extensions-4.12.2-py3-none-any.whl.metadata&quot;&gt;https://download.pytorch.org/whl/typing_extensions-4.12.2-py3-none-any.whl.metadata&lt;/a&gt; (3.0 kB)
Collecting networkx (from torch)
Using cached &lt;a href=&quot;https://download.pytorch.org/whl/networkx-3.3-py3-none-any.whl.metadata&quot;&gt;https://download.pytorch.org/whl/networkx-3.3-py3-none-any.whl.metadata&lt;/a&gt; (5.1 kB)
Collecting jinja2 (from torch)
Using cached &lt;a href=&quot;https://download.pytorch.org/whl/Jinja2-3.1.4-py3-none-any.whl.metadata&quot;&gt;https://download.pytorch.org/whl/Jinja2-3.1.4-py3-none-any.whl.metadata&lt;/a&gt; (2.6 kB)
Collecting fsspec (from torch)
Using cached &lt;a href=&quot;https://download.pytorch.org/whl/fsspec-2024.6.1-py3-none-any.whl.metadata&quot;&gt;https://download.pytorch.org/whl/fsspec-2024.6.1-py3-none-any.whl.metadata&lt;/a&gt; (11 kB)
Collecting setuptools (from torch)
Using cached &lt;a href=&quot;https://download.pytorch.org/whl/setuptools-70.2.0-py3-none-any.whl.metadata&quot;&gt;https://download.pytorch.org/whl/setuptools-70.2.0-py3-none-any.whl.metadata&lt;/a&gt; (5.8 kB)
Collecting sympy==1.13.1 (from torch)
Using cached &lt;a href=&quot;https://download.pytorch.org/whl/sympy-1.13.1-py3-none-any.whl&quot;&gt;https://download.pytorch.org/whl/sympy-1.13.1-py3-none-any.whl&lt;/a&gt; (6.2 MB)
Collecting mpmath&amp;#x3C;1.4,&gt;=1.1.0 (from sympy==1.13.1-&gt;torch)
Using cached &lt;a href=&quot;https://download.pytorch.org/whl/mpmath-1.3.0-py3-none-any.whl&quot;&gt;https://download.pytorch.org/whl/mpmath-1.3.0-py3-none-any.whl&lt;/a&gt; (536 kB)
Collecting numpy (from torchvision)
Using cached &lt;a href=&quot;https://download.pytorch.org/whl/numpy-2.1.2-cp313-cp313-win_amd64.whl.metadata&quot;&gt;https://download.pytorch.org/whl/numpy-2.1.2-cp313-cp313-win_amd64.whl.metadata&lt;/a&gt; (59 kB)
Collecting pillow!=8.3.*,&gt;=5.3.0 (from torchvision)
Using cached &lt;a href=&quot;https://download.pytorch.org/whl/pillow-11.0.0-cp313-cp313-win_amd64.whl.metadata&quot;&gt;https://download.pytorch.org/whl/pillow-11.0.0-cp313-cp313-win_amd64.whl.metadata&lt;/a&gt; (9.3 kB)
Collecting MarkupSafe&gt;=2.0 (from jinja2-&gt;torch)
Using cached &lt;a href=&quot;https://download.pytorch.org/whl/MarkupSafe-2.1.5.tar.gz&quot;&gt;https://download.pytorch.org/whl/MarkupSafe-2.1.5.tar.gz&lt;/a&gt; (19 kB)
Installing build dependencies … done
Getting requirements to build wheel … done
Preparing metadata (pyproject.toml) … done
Downloading &lt;a href=&quot;https://download.pytorch.org/whl/cu126/torch-2.6.0%2Bcu126-cp313-cp313-win_amd64.whl&quot;&gt;https://download.pytorch.org/whl/cu126/torch-2.6.0%2Bcu126-cp313-cp313-win_amd64.whl&lt;/a&gt; (2496.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.5/2.5 GB 10.2 MB/s eta 0:00:00
Downloading &lt;a href=&quot;https://download.pytorch.org/whl/cu126/torchvision-0.21.0%2Bcu126-cp313-cp313-win_amd64.whl&quot;&gt;https://download.pytorch.org/whl/cu126/torchvision-0.21.0%2Bcu126-cp313-cp313-win_amd64.whl&lt;/a&gt; (6.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.1/6.1 MB 10.3 MB/s eta 0:00:00
Downloading &lt;a href=&quot;https://download.pytorch.org/whl/cu126/torchaudio-2.6.0%2Bcu126-cp313-cp313-win_amd64.whl&quot;&gt;https://download.pytorch.org/whl/cu126/torchaudio-2.6.0%2Bcu126-cp313-cp313-win_amd64.whl&lt;/a&gt; (4.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.2/4.2 MB 10.5 MB/s eta 0:00:00
Downloading &lt;a href=&quot;https://download.pytorch.org/whl/pillow-11.0.0-cp313-cp313-win_amd64.whl&quot;&gt;https://download.pytorch.org/whl/pillow-11.0.0-cp313-cp313-win_amd64.whl&lt;/a&gt; (2.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.6/2.6 MB 8.5 MB/s eta 0:00:00
Downloading &lt;a href=&quot;https://download.pytorch.org/whl/typing_extensions-4.12.2-py3-none-any.whl&quot;&gt;https://download.pytorch.org/whl/typing_extensions-4.12.2-py3-none-any.whl&lt;/a&gt; (37 kB)
Downloading &lt;a href=&quot;https://download.pytorch.org/whl/filelock-3.13.1-py3-none-any.whl&quot;&gt;https://download.pytorch.org/whl/filelock-3.13.1-py3-none-any.whl&lt;/a&gt; (11 kB)
Downloading &lt;a href=&quot;https://download.pytorch.org/whl/fsspec-2024.6.1-py3-none-any.whl&quot;&gt;https://download.pytorch.org/whl/fsspec-2024.6.1-py3-none-any.whl&lt;/a&gt; (177 kB)
Downloading &lt;a href=&quot;https://download.pytorch.org/whl/Jinja2-3.1.4-py3-none-any.whl&quot;&gt;https://download.pytorch.org/whl/Jinja2-3.1.4-py3-none-any.whl&lt;/a&gt; (133 kB)
Downloading &lt;a href=&quot;https://download.pytorch.org/whl/networkx-3.3-py3-none-any.whl&quot;&gt;https://download.pytorch.org/whl/networkx-3.3-py3-none-any.whl&lt;/a&gt; (1.7 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 10.1 MB/s eta 0:00:00
Downloading &lt;a href=&quot;https://download.pytorch.org/whl/numpy-2.1.2-cp313-cp313-win_amd64.whl&quot;&gt;https://download.pytorch.org/whl/numpy-2.1.2-cp313-cp313-win_amd64.whl&lt;/a&gt; (12.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.6/12.6 MB 11.2 MB/s eta 0:00:00
Using cached &lt;a href=&quot;https://download.pytorch.org/whl/setuptools-70.2.0-py3-none-any.whl&quot;&gt;https://download.pytorch.org/whl/setuptools-70.2.0-py3-none-any.whl&lt;/a&gt; (930 kB)
Building wheels for collected packages: MarkupSafe
Building wheel for MarkupSafe (pyproject.toml) … done
Created wheel for MarkupSafe: filename=MarkupSafe-2.1.5-cp313-cp313-win_amd64.whl size=17236 sha256=1920967b46a08327667bfa28ddea3492b28c1a3051fda774f6ff64374ba13139
Stored in directory: c:\users\i\appdata\local\pip\cache\wheels\84\b6\28\95b8e298901ee19b488797095efb5fbed28637ed83215b13b1
Successfully built MarkupSafe
Installing collected packages: mpmath, typing-extensions, sympy, setuptools, pillow, numpy, networkx, MarkupSafe, fsspec, filelock, jinja2, torch, torchvision, torchaudio
WARNING: The script isympy.exe is installed in ‘C:\Users\i\AppData\Roaming\Python\Python313\Scripts’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use —no-warn-script-location.
WARNING: The scripts f2py.exe and numpy-config.exe are installed in ‘C:\Users\i\AppData\Roaming\Python\Python313\Scripts’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use —no-warn-script-location.
WARNING: The scripts torchfrtrace.exe and torchrun.exe are installed in ‘C:\Users\i\AppData\Roaming\Python\Python313\Scripts’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use —no-warn-script-location.
Successfully installed MarkupSafe-2.1.5 filelock-3.13.1 fsspec-2024.6.1 jinja2-3.1.4 mpmath-1.3.0 networkx-3.3 numpy-2.1.2 pillow-11.0.0 setuptools-70.2.0 sympy-1.13.1 torch-2.6.0+cu126 torchaudio-2.6.0+cu126 torchvision-0.21.0+cu126 typing-extensions-4.12.2
(ultralytics) PS C:\Users\i&gt; pip install ultralytics
Defaulting to user installation because normal site-packages is not writeable
Collecting ultralytics
Using cached ultralytics-8.3.87-py3-none-any.whl.metadata (35 kB)
Collecting numpy&amp;#x3C;=2.1.1,&gt;=1.23.0 (from ultralytics)
Downloading numpy-2.1.1-cp313-cp313-win_amd64.whl.metadata (59 kB)
Collecting matplotlib&gt;=3.3.0 (from ultralytics)
Downloading matplotlib-3.10.1-cp313-cp313-win_amd64.whl.metadata (11 kB)
Collecting opencv-python&gt;=4.6.0 (from ultralytics)
Using cached opencv_python-4.11.0.86-cp37-abi3-win_amd64.whl.metadata (20 kB)
Requirement already satisfied: pillow&gt;=7.1.2 in c:\users\i\appdata\roaming\python\python313\site-packages (from ultralytics) (11.0.0)
Collecting pyyaml&gt;=5.3.1 (from ultralytics)
Downloading PyYAML-6.0.2-cp313-cp313-win_amd64.whl.metadata (2.1 kB)
Collecting requests&gt;=2.23.0 (from ultralytics)
Using cached requests-2.32.3-py3-none-any.whl.metadata (4.6 kB)
Collecting scipy&gt;=1.4.1 (from ultralytics)
Downloading scipy-1.15.2-cp313-cp313-win_amd64.whl.metadata (60 kB)
Requirement already satisfied: torch&gt;=1.8.0 in c:\users\i\appdata\roaming\python\python313\site-packages (from ultralytics) (2.6.0+cu126)
Requirement already satisfied: torchvision&gt;=0.9.0 in c:\users\i\appdata\roaming\python\python313\site-packages (from ultralytics) (0.21.0+cu126)
Collecting tqdm&gt;=4.64.0 (from ultralytics)
Using cached tqdm-4.67.1-py3-none-any.whl.metadata (57 kB)
Collecting psutil (from ultralytics)
Using cached psutil-7.0.0-cp37-abi3-win_amd64.whl.metadata (23 kB)
Collecting py-cpuinfo (from ultralytics)
Using cached py_cpuinfo-9.0.0-py3-none-any.whl.metadata (794 bytes)
Collecting pandas&gt;=1.1.4 (from ultralytics)
Downloading pandas-2.2.3-cp313-cp313-win_amd64.whl.metadata (19 kB)
Collecting seaborn&gt;=0.11.0 (from ultralytics)
Using cached seaborn-0.13.2-py3-none-any.whl.metadata (5.4 kB)
Collecting ultralytics-thop&gt;=2.0.0 (from ultralytics)
Using cached ultralytics_thop-2.0.14-py3-none-any.whl.metadata (9.4 kB)
Collecting contourpy&gt;=1.0.1 (from matplotlib&gt;=3.3.0-&gt;ultralytics)
Downloading contourpy-1.3.1-cp313-cp313-win_amd64.whl.metadata (5.4 kB)
Collecting cycler&gt;=0.10 (from matplotlib&gt;=3.3.0-&gt;ultralytics)
Using cached cycler-0.12.1-py3-none-any.whl.metadata (3.8 kB)
Collecting fonttools&gt;=4.22.0 (from matplotlib&gt;=3.3.0-&gt;ultralytics)
Downloading fonttools-4.56.0-cp313-cp313-win_amd64.whl.metadata (103 kB)
Collecting kiwisolver&gt;=1.3.1 (from matplotlib&gt;=3.3.0-&gt;ultralytics)
Downloading kiwisolver-1.4.8-cp313-cp313-win_amd64.whl.metadata (6.3 kB)
Collecting packaging&gt;=20.0 (from matplotlib&gt;=3.3.0-&gt;ultralytics)
Using cached packaging-24.2-py3-none-any.whl.metadata (3.2 kB)
Collecting pyparsing&gt;=2.3.1 (from matplotlib&gt;=3.3.0-&gt;ultralytics)
Downloading pyparsing-3.2.1-py3-none-any.whl.metadata (5.0 kB)
Collecting python-dateutil&gt;=2.7 (from matplotlib&gt;=3.3.0-&gt;ultralytics)
Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata (8.4 kB)
Collecting pytz&gt;=2020.1 (from pandas&gt;=1.1.4-&gt;ultralytics)
Using cached pytz-2025.1-py2.py3-none-any.whl.metadata (22 kB)
Collecting tzdata&gt;=2022.7 (from pandas&gt;=1.1.4-&gt;ultralytics)
Using cached tzdata-2025.1-py2.py3-none-any.whl.metadata (1.4 kB)
Collecting charset-normalizer&amp;#x3C;4,&gt;=2 (from requests&gt;=2.23.0-&gt;ultralytics)
Downloading charset_normalizer-3.4.1-cp313-cp313-win_amd64.whl.metadata (36 kB)
Collecting idna&amp;#x3C;4,&gt;=2.5 (from requests&gt;=2.23.0-&gt;ultralytics)
Using cached idna-3.10-py3-none-any.whl.metadata (10 kB)
Collecting urllib3&amp;#x3C;3,&gt;=1.21.1 (from requests&gt;=2.23.0-&gt;ultralytics)
Downloading urllib3-2.3.0-py3-none-any.whl.metadata (6.5 kB)
Collecting certifi&gt;=2017.4.17 (from requests&gt;=2.23.0-&gt;ultralytics)
Using cached certifi-2025.1.31-py3-none-any.whl.metadata (2.5 kB)
Requirement already satisfied: filelock in c:\users\i\appdata\roaming\python\python313\site-packages (from torch&gt;=1.8.0-&gt;ultralytics) (3.13.1)
Requirement already satisfied: typing-extensions&gt;=4.10.0 in c:\users\i\appdata\roaming\python\python313\site-packages (from torch&gt;=1.8.0-&gt;ultralytics) (4.12.2)
Requirement already satisfied: networkx in c:\users\i\appdata\roaming\python\python313\site-packages (from torch&gt;=1.8.0-&gt;ultralytics) (3.3)
Requirement already satisfied: jinja2 in c:\users\i\appdata\roaming\python\python313\site-packages (from torch&gt;=1.8.0-&gt;ultralytics) (3.1.4)
Requirement already satisfied: fsspec in c:\users\i\appdata\roaming\python\python313\site-packages (from torch&gt;=1.8.0-&gt;ultralytics) (2024.6.1)
Requirement already satisfied: setuptools in c:\users\i\appdata\roaming\python\python313\site-packages (from torch&gt;=1.8.0-&gt;ultralytics) (70.2.0)
Requirement already satisfied: sympy==1.13.1 in c:\users\i\appdata\roaming\python\python313\site-packages (from torch&gt;=1.8.0-&gt;ultralytics) (1.13.1)
Requirement already satisfied: mpmath&amp;#x3C;1.4,&gt;=1.1.0 in c:\users\i\appdata\roaming\python\python313\site-packages (from sympy==1.13.1-&gt;torch&gt;=1.8.0-&gt;ultralytics) (1.3.0)
Collecting colorama (from tqdm&gt;=4.64.0-&gt;ultralytics)
Using cached colorama-0.4.6-py2.py3-none-any.whl.metadata (17 kB)
Collecting six&gt;=1.5 (from python-dateutil&gt;=2.7-&gt;matplotlib&gt;=3.3.0-&gt;ultralytics)
Using cached six-1.17.0-py2.py3-none-any.whl.metadata (1.7 kB)
Requirement already satisfied: MarkupSafe&gt;=2.0 in c:\users\i\appdata\roaming\python\python313\site-packages (from jinja2-&gt;torch&gt;=1.8.0-&gt;ultralytics) (2.1.5)
Using cached ultralytics-8.3.87-py3-none-any.whl (923 kB)
Downloading matplotlib-3.10.1-cp313-cp313-win_amd64.whl (8.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.1/8.1 MB 10.5 MB/s eta 0:00:00
Downloading numpy-2.1.1-cp313-cp313-win_amd64.whl (12.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.6/12.6 MB 11.4 MB/s eta 0:00:00
Using cached opencv_python-4.11.0.86-cp37-abi3-win_amd64.whl (39.5 MB)
Downloading pandas-2.2.3-cp313-cp313-win_amd64.whl (11.5 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.5/11.5 MB 11.3 MB/s eta 0:00:00
Downloading PyYAML-6.0.2-cp313-cp313-win_amd64.whl (156 kB)
Using cached requests-2.32.3-py3-none-any.whl (64 kB)
Downloading scipy-1.15.2-cp313-cp313-win_amd64.whl (41.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.0/41.0 MB 11.0 MB/s eta 0:00:00
Using cached seaborn-0.13.2-py3-none-any.whl (294 kB)
Using cached tqdm-4.67.1-py3-none-any.whl (78 kB)
Using cached ultralytics_thop-2.0.14-py3-none-any.whl (26 kB)
Using cached psutil-7.0.0-cp37-abi3-win_amd64.whl (244 kB)
Using cached py_cpuinfo-9.0.0-py3-none-any.whl (22 kB)
Using cached certifi-2025.1.31-py3-none-any.whl (166 kB)
Downloading charset_normalizer-3.4.1-cp313-cp313-win_amd64.whl (102 kB)
Downloading contourpy-1.3.1-cp313-cp313-win_amd64.whl (220 kB)
Using cached cycler-0.12.1-py3-none-any.whl (8.3 kB)
Downloading fonttools-4.56.0-cp313-cp313-win_amd64.whl (2.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.2/2.2 MB 10.5 MB/s eta 0:00:00
Using cached idna-3.10-py3-none-any.whl (70 kB)
Downloading kiwisolver-1.4.8-cp313-cp313-win_amd64.whl (71 kB)
Using cached packaging-24.2-py3-none-any.whl (65 kB)
Downloading pyparsing-3.2.1-py3-none-any.whl (107 kB)
Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)
Using cached pytz-2025.1-py2.py3-none-any.whl (507 kB)
Using cached tzdata-2025.1-py2.py3-none-any.whl (346 kB)
Downloading urllib3-2.3.0-py3-none-any.whl (128 kB)
Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Using cached six-1.17.0-py2.py3-none-any.whl (11 kB)
Installing collected packages: pytz, py-cpuinfo, urllib3, tzdata, six, pyyaml, pyparsing, psutil, packaging, numpy, kiwisolver, idna, fonttools, cycler, colorama, charset-normalizer, certifi, tqdm, scipy, requests, python-dateutil, opencv-python, contourpy, ultralytics-thop, pandas, matplotlib, seaborn, ultralytics
WARNING: The script cpuinfo.exe is installed in ‘C:\Users\i\AppData\Roaming\Python\Python313\Scripts’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use —no-warn-script-location.
Attempting uninstall: numpy
Found existing installation: numpy 2.1.2
Uninstalling numpy-2.1.2:
Successfully uninstalled numpy-2.1.2
WARNING: The scripts f2py.exe and numpy-config.exe are installed in ‘C:\Users\i\AppData\Roaming\Python\Python313\Scripts’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use —no-warn-script-location.
WARNING: The scripts fonttools.exe, pyftmerge.exe, pyftsubset.exe and ttx.exe are installed in ‘C:\Users\i\AppData\Roaming\Python\Python313\Scripts’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use —no-warn-script-location.
WARNING: The script normalizer.exe is installed in ‘C:\Users\i\AppData\Roaming\Python\Python313\Scripts’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use —no-warn-script-location.
WARNING: The script tqdm.exe is installed in ‘C:\Users\i\AppData\Roaming\Python\Python313\Scripts’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use —no-warn-script-location.
WARNING: The scripts ultralytics.exe and yolo.exe are installed in ‘C:\Users\i\AppData\Roaming\Python\Python313\Scripts’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use —no-warn-script-location.
Successfully installed certifi-2025.1.31 charset-normalizer-3.4.1 colorama-0.4.6 contourpy-1.3.1 cycler-0.12.1 fonttools-4.56.0 idna-3.10 kiwisolver-1.4.8 matplotlib-3.10.1 numpy-2.1.1 opencv-python-4.11.0.86 packaging-24.2 pandas-2.2.3 psutil-7.0.0 py-cpuinfo-9.0.0 pyparsing-3.2.1 python-dateutil-2.9.0.post0 pytz-2025.1 pyyaml-6.0.2 requests-2.32.3 scipy-1.15.2 seaborn-0.13.2 six-1.17.0 tqdm-4.67.1 tzdata-2025.1 ultralytics-8.3.87 ultralytics-thop-2.0.14 urllib3-2.3.0
[notice] A new release of pip is available: 24.3.1 -&gt; 25.0.1
[notice] To update, run: python.exe -m pip install —upgrade pip
(ultralytics) PS C:\Users\i&gt; python.exe -m pip install —upgrade pip
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pip in c:\python313\lib\site-packages (24.3.1)
Collecting pip
Downloading pip-25.0.1-py3-none-any.whl.metadata (3.7 kB)
Downloading pip-25.0.1-py3-none-any.whl (1.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 8.0 MB/s eta 0:00:00
Installing collected packages: pip
WARNING: The scripts pip.exe, pip3.13.exe and pip3.exe are installed in ‘C:\Users\i\AppData\Roaming\Python\Python313\Scripts’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use —no-warn-script-location.
Successfully installed pip-25.0.1
(ultralytics) PS C:\Users\i&gt; conda^C
(ultralytics) PS C:\Users\i&gt; pip list
Package Version&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;certifi 2025.1.31
charset-normalizer 3.4.1
colorama 0.4.6
contourpy 1.3.1
cycler 0.12.1
filelock 3.13.1
fonttools 4.56.0
fsspec 2024.6.1
idna 3.10
Jinja2 3.1.4
kiwisolver 1.4.8
MarkupSafe 2.1.5
matplotlib 3.10.1
mpmath 1.3.0
networkx 3.3
numpy 2.1.1
opencv-python 4.11.0.86
packaging 24.2
pandas 2.2.3
pillow 11.0.0
pip 25.0.1
psutil 7.0.0
py-cpuinfo 9.0.0
pyparsing 3.2.1
python-dateutil 2.9.0.post0
pytz 2025.1
PyYAML 6.0.2
requests 2.32.3
scipy 1.15.2
seaborn 0.13.2
setuptools 70.2.0
six 1.17.0
sympy 1.13.1
torch 2.6.0+cu126
torchaudio 2.6.0+cu126
torchvision 0.21.0+cu126
tqdm 4.67.1
typing_extensions 4.12.2
tzdata 2025.1
ultralytics 8.3.87
ultralytics-thop 2.0.14
urllib3 2.3.0
(ultralytics) PS C:\Users\i&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>SQL数据库连接链接规范</title>
  <link href="https://www.ioioi.cn/posts/sql-database-urls/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/sql-database-urls/</id>
  <published>2025-02-18T01:44:16.000Z</published>
  <updated>2025-02-18T01:45:14.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;a href=&quot;https://docs.sqlalchemy.org/en/20/core/engines.html#database-urls&quot;&gt;https://docs.sqlalchemy.org/en/20/core/engines.html#database-urls&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Win11 在有独显时如何默认使用核显</title>
  <link href="https://www.ioioi.cn/posts/win11-how-to-default-to-using-kernel-display-when-there-is/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/win11-how-to-default-to-using-kernel-display-when-there-is/</id>
  <published>2025-02-15T13:00:24.000Z</published>
  <updated>2025-02-15T13:00:24.000Z</updated>
  <summary type="html">&lt;p&gt;正在跑深度学习，发现服务器有其他软件占用了独立显卡，但是按照网上的资料说设置NVIDIA控制面板里的首选图形处理器，发现Win11没有这个东西，&lt;a href=&quot;https://www.zhihu.com/question/577660104&quot;&gt;https://www.zhihu.com/question/577660104&lt;/a&gt;
按照&lt;a href=&quot;https://answers.microsoft.com/en-us/profile/b063a368-66c3-4514-a002-add7a1ae5f6c&quot; title=&quot;dvdedios&quot;&gt;dvdedios&lt;/a&gt;的回答：&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Thanks for replying. I didn’t use NVIDIA Control Panel, as NVCP says that “Windows OS now manages selection of the graphics processor”.
谢谢你的回复。我没有使用 NVIDIA 控制面板，因为 NVCP 说“Windows作系统现在管理图形处理器的选择”。&lt;/p&gt;
&lt;p&gt;I have since solved my issue, as the ‘[HKEY_CURRENT_USER\SOFTWARE\Microsoft\DirectX\UserGpuPreferences]’ registry key holds the settings for GUI Windows Graphics Settings Menu, and setting the “(Default)” string to “GpuPreference=1;” seems to have done the trick.
从那以后，我解决了我的问题，因为“[HKEY_CURRENT_USER\SOFTWARE\Microsoft\DirectX\UserGpuPreferences]”注册表键保存了 GUI Windows 图形设置菜单的设置，并且将“（默认）”字符串设置为“GpuPreference=1;”似乎已经奏效了。&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&quot;https://answers.microsoft.com/en-us/windows/forum/all/how-to-change-default-graphics-universal-default/b23d0e3b-da70-4227-a015-7d4bb6fe2fe6&quot;&gt;https://answers.microsoft.com/en-us/windows/forum/all/how-to-change-default-graphics-universal-default/b23d0e3b-da70-4227-a015-7d4bb6fe2fe6&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/win11-how-to-default-to-using-kernel-display-when-there-is/images/eSearch-2025-02-15-20-57-11-308.png&quot; alt=&quot;&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>OpenWRT中WAN6已经有/64地址，但不下发</title>
  <link href="https://www.ioioi.cn/posts/wan6-already-has-a-64-address-in-openwrt-but-it-is-not/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/wan6-already-has-a-64-address-in-openwrt-but-it-is-not/</id>
  <published>2024-12-02T08:43:05.000Z</published>
  <updated>2024-12-02T08:43:55.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;img src=&quot;/posts/wan6-already-has-a-64-address-in-openwrt-but-it-is-not/images/Snipaste_2024-12-02_16-42-45-300x269.png&quot; alt=&quot;&quot; loading=&quot;lazy&quot;&gt;
&lt;img src=&quot;/posts/wan6-already-has-a-64-address-in-openwrt-but-it-is-not/images/Snipaste_2024-12-02_16-43-29-300x142.png&quot; alt=&quot;&quot; loading=&quot;lazy&quot;&gt;
&lt;a href=&quot;https://www.right.com.cn/FORUM/thread-8309440-1-1.html&quot;&gt;https://www.right.com.cn/FORUM/thread-8309440-1-1.html&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Vmware共享文件夹自动挂载</title>
  <link href="https://www.ioioi.cn/posts/vmware-shared-folder-automatic-mounting/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/vmware-shared-folder-automatic-mounting/</id>
  <published>2024-11-22T12:46:17.000Z</published>
  <updated>2024-11-22T12:46:17.000Z</updated>
  <summary type="html">&lt;p&gt;自动挂载&lt;/p&gt;
&lt;p&gt;修改/etc/fstab，加入如下内容&lt;/p&gt;
&lt;p&gt;.host:/ /mnt/hgfs fuse.vmhgfs-fuse allow_other,defaults 0 0&lt;/p&gt;
&lt;p&gt;手动挂载&lt;/p&gt;
&lt;p&gt;sudo vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://zhuanlan.zhihu.com/p/157995216&quot;&gt;参考&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>使用selenium库出现Retrying问题</title>
  <link href="https://www.ioioi.cn/posts/there-is-a-retrying-issue-when-using-the-selenium-library/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/there-is-a-retrying-issue-when-using-the-selenium-library/</id>
  <published>2024-10-08T01:14:49.000Z</published>
  <updated>2024-10-08T01:15:16.000Z</updated>
  <summary type="html">&lt;p&gt;Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(‘&amp;#x3C;urllib3.connection.HTTPConnection object at 0x7ffeea688d30&gt;: Failed to establish a new connection: [Errno 111] Connection refused’)’: /session/6adad5df-62b9-4032-99bb-b1c7848a7075/element/dfcda924-f4a0-42c1-8bd8-faf732ca18db/text
这里主要错误是 Max retries exceeded with url:
记一个bug，使用selenium.webdriver.Chrome().find_XX_XXX()获得的元素，必须在brower.close()或者brower.quit()使用，因为此时的元素是要依赖brower连接的
所以解决办法是把获取的元素的text获取出来，然后再关闭brower
 
转发学习
————————————————
版权声明：本文为博主原创文章，遵循 CC 4.0 BY-SA 版权协议，转载请附上原文出处链接和本声明。
原文链接：&lt;a href=&quot;https://blog.csdn.net/API_demo/article/details/112323533&quot;&gt;https://blog.csdn.net/API_demo/article/details/112323533&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>设置Mailcow自动跳转使用HTTPS</title>
  <link href="https://www.ioioi.cn/posts/%E8%AE%BE%E7%BD%AEmailcow%E8%87%AA%E5%8A%A8%E8%B7%B3%E8%BD%AC%E4%BD%BF%E7%94%A8https/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/%E8%AE%BE%E7%BD%AEmailcow%E8%87%AA%E5%8A%A8%E8%B7%B3%E8%BD%AC%E4%BD%BF%E7%94%A8https/</id>
  <published>2024-09-30T12:17:11.000Z</published>
  <updated>2024-09-30T12:17:16.000Z</updated>
  <summary type="html">&lt;p&gt;官方给的教程会使容器跳警告，所以我自己编写了一个&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;if ($scheme = http) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  return 302 https://$host$request_uri; &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;将上面的代码插入到 /opt/mailcow-dockerized/data/conf/nginx/includes/site-defaults.conf&lt;/p&gt;</summary>
</entry>
<entry>
  <title>PVE容器无网络连接（Packet filtered）解决方案</title>
  <link href="https://www.ioioi.cn/posts/pve-container-packet-filtered-solution-without-network/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/pve-container-packet-filtered-solution-without-network/</id>
  <published>2024-09-06T09:14:22.000Z</published>
  <updated>2024-09-06T09:14:22.000Z</updated>
  <summary type="html">&lt;p&gt;root@ams ~ # firewall-cmd —get-default-zone&lt;br&gt;
public&lt;br&gt;
root@ams ~ # firewall-cmd —list-all&lt;br&gt;
You’re performing an operation over default zone (‘public’),&lt;br&gt;
but your connections/interfaces are in zone ‘docker’ (see —get-active-zones)&lt;br&gt;
You most likely need to use —zone=docker option.&lt;/p&gt;
&lt;p&gt;public&lt;br&gt;
target: default&lt;br&gt;
icmp-block-inversion: no&lt;br&gt;
interfaces:&lt;br&gt;
sources:&lt;br&gt;
services: dhcpv6-client ssh&lt;br&gt;
ports: 37466/tcp 80/tcp 443/tcp 45767/tcp&lt;br&gt;
protocols:&lt;br&gt;
forward: yes&lt;br&gt;
masquerade: yes&lt;br&gt;
forward-ports:&lt;br&gt;
source-ports:&lt;br&gt;
icmp-blocks:&lt;br&gt;
rich rules:&lt;br&gt;
root@ams ~ # sudo firewall-cmd —permanent —new-zone=vmbr0zone&lt;br&gt;
success&lt;br&gt;
root@ams ~ # sudo firewall-cmd —permanent —zone=vmbr0zone —add-interface=vmbr0&lt;br&gt;
success&lt;br&gt;
root@ams ~ # sudo firewall-cmd —list-all —zone=vmbr0zone&lt;br&gt;
Error: INVALID_ZONE: vmbr0zone&lt;br&gt;
root@ams ~ # sudo firewall-cmd —permanent —zone=vmbr0zone —add-masquerade&lt;br&gt;
success&lt;br&gt;
root@ams ~ # sudo firewall-cmd —reload&lt;br&gt;
success&lt;br&gt;
root@ams ~ # sudo firewall-cmd —list-all —zone=vmbr0zone&lt;br&gt;
vmbr0zone (active)&lt;br&gt;
target: default&lt;br&gt;
icmp-block-inversion: no&lt;br&gt;
interfaces: vmbr0&lt;br&gt;
sources:&lt;br&gt;
services:&lt;br&gt;
ports:&lt;br&gt;
protocols:&lt;br&gt;
forward: no&lt;br&gt;
masquerade: yes&lt;br&gt;
forward-ports:&lt;br&gt;
source-ports:&lt;br&gt;
icmp-blocks:&lt;br&gt;
rich rules:&lt;br&gt;
root@ams ~ # sudo firewall-cmd —permanent —zone=vmbr0zone —set-target=ACCEPT&lt;br&gt;
success&lt;br&gt;
root@ams ~ # sudo firewall-cmd —reload&lt;br&gt;
success&lt;br&gt;
root@ams ~ # sudo firewall-cmd —list-all —zone=vmbr0zone&lt;br&gt;
vmbr0zone (active)&lt;br&gt;
target: ACCEPT&lt;br&gt;
icmp-block-inversion: no&lt;br&gt;
interfaces: vmbr0&lt;br&gt;
sources:&lt;br&gt;
services:&lt;br&gt;
ports:&lt;br&gt;
protocols:&lt;br&gt;
forward: no&lt;br&gt;
masquerade: yes&lt;br&gt;
forward-ports:&lt;br&gt;
source-ports:&lt;br&gt;
icmp-blocks:&lt;br&gt;
rich rules:&lt;br&gt;
root@ams ~ # sudo firewall-cmd —permanent —zone=vmbr0zone —add-rich-rule=‘rule family=“ipv4” source address=“10.10.10.0/24” accept’&lt;br&gt;
sudo firewall-cmd —permanent —zone=vmbr0zone —add-rich-rule=‘rule family=“ipv6” source address=“fd80::/64” accept’&lt;br&gt;
success&lt;br&gt;
success&lt;br&gt;
root@ams ~ # sudo firewall-cmd —reload&lt;br&gt;
success&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Debian 12 ARM 安装 PVE</title>
  <link href="https://www.ioioi.cn/posts/debian-12-arm-%E5%AE%89%E8%A3%85-pve/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/debian-12-arm-%E5%AE%89%E8%A3%85-pve/</id>
  <published>2024-09-06T09:13:58.000Z</published>
  <updated>2024-09-06T09:13:58.000Z</updated>
  <summary type="html">&lt;p&gt;先安装好Debian12&lt;/p&gt;
&lt;p&gt;然后检查配置，暂时不要使用NetworkManager，配置好之后再安装即可&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;/etc/network/interfaces&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;网络是否配置正确&lt;/p&gt;
&lt;p&gt;之后检查hosts文件是否添加了本主机名，不然会启动不了&lt;/p&gt;
&lt;p&gt;添加ARM PVE 源&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;echo &quot;deb https://mirrors.apqa.cn/proxmox/debian/pve bookworm port&quot;&gt;/etc/apt/sources.list.d/pveport.list&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;添加GPG密钥&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;curl -L https://mirrors.apqa.cn/proxmox/debian/pveport.gpg -o /etc/apt/trusted.gpg.d/pveport.gpg&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;更新源仓库之后安装基本软件&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;apt update &amp;#x26;&amp;#x26; apt install -y chrony ksmtuned rsyslog ifupdown2&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;之后安装PVE&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;apt install -y proxmox-ve&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/posts/debian-12-arm-安装-pve/images/img-282957640c.png&quot; alt=&quot;&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>PVE 指针(鼠标)漂移</title>
  <link href="https://www.ioioi.cn/posts/pve-pointer-mouse-drift/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/pve-pointer-mouse-drift/</id>
  <published>2024-04-21T10:23:08.000Z</published>
  <updated>2024-04-21T10:23:09.000Z</updated>
  <summary type="html">&lt;p&gt;有时候会漂移，在 &lt;code&gt;/etc/pve/qemu-server/xxx.conf&lt;/code&gt; 中加入：&lt;/p&gt;
&lt;p&gt;xxx为你的虚拟机id&lt;/p&gt;
&lt;p&gt;&lt;code&gt;tablet: true&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;然后重新启动即可。&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;引用：&lt;a href=&quot;https://www.mereith.com/post/146&quot;&gt;https://www.mereith.com/post/146&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;</summary>
</entry>
<entry>
  <title>HomeAssistant 修改历史记录保留天数</title>
  <link href="https://www.ioioi.cn/posts/homeassistant-modification-history-retention-days/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/homeassistant-modification-history-retention-days/</id>
  <published>2024-04-08T13:54:37.000Z</published>
  <updated>2024-04-10T02:48:01.000Z</updated>
  <summary type="html">&lt;h2 id=&quot;修改配置文件&quot;&gt;修改配置文件&lt;/h2&gt;
&lt;p&gt;文件一般位于 &lt;code&gt;/config/configuration.yaml&lt;/code&gt;，&lt;strong&gt;添加&lt;/strong&gt; 下面的配置：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;recorder:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  purge_keep_days: 365&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  commit_interval: 10&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;主要参数是 &lt;code&gt;purge_keep_days&lt;/code&gt; ，上面保留天数修改为 365 天，默认值为 10 天。
提交时间间隔 &lt;code&gt;commit_interval&lt;/code&gt; 看自己需求修改，默认值为 5 秒。&lt;/p&gt;
&lt;h2 id=&quot;参考资料&quot;&gt;参考资料&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://www.home-assistant.io/integrations/recorder/&quot;&gt;Recorder - Home Assistant&lt;/a&gt;
&lt;a href=&quot;https://www.cnblogs.com/yeungchie/p/17694503.html&quot;&gt;[ HomeAssistant ] 修改历史记录保留天数 - YEUNGCHIE - 博客园 (cnblogs.com)&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>HE IPv6 考试通过攻略</title>
  <link href="https://www.ioioi.cn/posts/he-ipv6-guide-to-passing-the-exam/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/he-ipv6-guide-to-passing-the-exam/</id>
  <published>2024-04-05T15:20:54.000Z</published>
  <updated>2024-04-05T15:51:50.000Z</updated>
  <summary type="html">&lt;p&gt;最近因为需要使用He Tunnel Broker，来获取IPv6，并且开启25端口，因为开启25端口需要HE IPv6考试得考到最高Sage等级，所以在网上搜索了一下教程&lt;/p&gt;
&lt;p&gt;这个是我的证书(*・ω・)👉&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/he-ipv6-guide-to-passing-the-exam/images/create_badge5704271921727137127.png&quot; alt=&quot;&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;证书&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href=&quot;https://www.taterli.com/8500/&quot;&gt;https://www.taterli.com/8500/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;HE IPv6 考试通过攻略&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;下面的内容摘自上面的博客：&lt;/p&gt;
&lt;p&gt;要取得HE的IPv6 Sage认证,就需要准备好域名+IPv6机器,以及RDNS部署好,看不懂英文和没耐心的请绕路.&lt;/p&gt;
&lt;p&gt;登录认证网址:&lt;a href=&quot;https://ipv6.he.net/certification/login.php&quot;&gt;https://ipv6.he.net/certification/login.php&lt;/a&gt; (HE账户是处处通用的!)&lt;/p&gt;
&lt;p&gt;考试中除了题目,还有提问,考试就简单了,懂得就直接过了,提问是怎么过的,要根据实际:&lt;/p&gt;
&lt;p&gt;准备材料:&lt;/p&gt;
&lt;p&gt;双栈VPS (IPv4 + IPv6) + RDNS 支持&lt;br&gt;
域名 + DNS IPv6 支持&lt;br&gt;
SSL - 可由Certbot配置&lt;br&gt;
Nginx Web 或者同类软件&lt;br&gt;
给域名设置好解释:&lt;/p&gt;
&lt;p&gt;进行第一个测试:&lt;/p&gt;
&lt;p&gt;接着填写你托管在Google Workspace等的邮箱地址,当然免费邮箱和国内大多数邮箱都过不了,然后把得到的代码填进去就行.&lt;/p&gt;
&lt;p&gt;如果你托管在谷歌,接下来的测试就直接过了.&lt;/p&gt;
&lt;p&gt;接下来网站解释也是送分,和上面图差不多,直接过.&lt;/p&gt;
&lt;p&gt;问题答案参考:&lt;/p&gt;
&lt;p&gt;问题:How many bits are in an IPv6 address?&lt;br&gt;
答案:128&lt;/p&gt;
&lt;p&gt;问题:Which of the following choices is a valid IPv6 address?&lt;br&gt;
答案:2001:0db8:0:ff2e::1&lt;/p&gt;
&lt;p&gt;问题:How many /64 subnets are available in a /48 prefix?&lt;br&gt;
答案:65536&lt;/p&gt;
&lt;p&gt;问题:How many available IPv6 addresses are there in a /64 allocation?&lt;br&gt;
答案:18,446,744,073,709,551,616&lt;/p&gt;
&lt;p&gt;问题:What operating systems currently support IPv6?&lt;br&gt;
答案:All of the these support IPv6&lt;/p&gt;
&lt;p&gt;问题:What features of IPv6 do you see yourself using?&lt;br&gt;
答案:Larger Address Space&lt;/p&gt;
&lt;p&gt;问题:If you were setting up a network of 12 million hosts that all needed their own unique globally routable addresses, which protocol would you use?&lt;br&gt;
答案:IPv6&lt;br&gt;
Question 3&lt;/p&gt;
&lt;p&gt;问题:Do you plan on making sure your workplace is IPv6 ready before IPv4 exhaustion?&lt;br&gt;
答案:Yes&lt;/p&gt;
&lt;p&gt;问题:Do you think that any of your co-workers or friends would find Hurricane Electric’s IPv6 certification useful?&lt;br&gt;
答案:Very much&lt;/p&gt;
&lt;p&gt;问题:Do you think you would benefit from using Hurricane Electric’s free IPv6 certification process at work?&lt;br&gt;
答案:Very much&lt;/p&gt;
&lt;p&gt;问题:Are you enjoying the Hurricane Electric IPv6 certification process?&lt;br&gt;
答案:Very much&lt;/p&gt;
&lt;p&gt;问题:Did you like this level in the Hurricane Electric IPv6 certification process?&lt;br&gt;
答案:Yes&lt;/p&gt;
&lt;p&gt;问题:Is the price right for the Hurricane Electric free IPv6 certification process?&lt;br&gt;
答案:A great bargain&lt;/p&gt;
&lt;p&gt;问题:Does the network equipment you currently use support IPv6?&lt;br&gt;
答案:All&lt;/p&gt;
&lt;p&gt;问题:With regards to the server configuration portion, what level of difficulty would you rate it?&lt;br&gt;
答案:Trivial&lt;/p&gt;
&lt;p&gt;问题:Hurricane Electric would like to make sure you are completely happy with our free IPv6 certification process. Please rate your satisfaction on a scale of 1 to 5; 5 being completely satisfied, 1 being completely unsatisfied.&lt;br&gt;
答案:5 - Completely Satisfied&lt;/p&gt;
&lt;p&gt;问题:Have you asked your provider about when they plan on supporting IPv6?&lt;br&gt;
答案:Yes&lt;/p&gt;
&lt;p&gt;问题:Do you think that Internet oriented companies (software, hardware, or service providers) need to be IPv6 ready before IPv4 exhaustion?&lt;br&gt;
答案:Yes&lt;/p&gt;
&lt;p&gt;问题:Do you feel like you learned (or refreshed) your knowledge by completing the Hurricane Electric IPv6 certification process?&lt;br&gt;
答案:Very much&lt;/p&gt;
&lt;p&gt;问题:Are you able to understand the material?&lt;br&gt;
答案:Yes&lt;/p&gt;
&lt;p&gt;问题:Do you feel good about the Hurricane Electric free IPv6 certification process?&lt;br&gt;
答案:Yes&lt;/p&gt;
&lt;p&gt;问题:Have you asked your domain name registrar if they support IPv6?&lt;br&gt;
答案:Yes&lt;/p&gt;
&lt;p&gt;问题:You request IPv6 glue for your nameservers through:&lt;br&gt;
答案:The registrar of the domain used by your name servers&lt;/p&gt;
&lt;p&gt;问题:IPv6 glue for nameservers resides on which nameservers?&lt;br&gt;
答案:The TLD/ccTLDs’&lt;/p&gt;
&lt;p&gt;问题:Which of the following queries proves working IPv6 glue?&lt;br&gt;
答案:dig AAAA ns1.exampledomain.tld @tld.server&lt;/p&gt;
&lt;p&gt;问题:Which TLD listed below is authoritative for .com &amp;#x26; .net IPv6 Glue?&lt;br&gt;
答案:A.GTLD-SERVERS.net&lt;/p&gt;
&lt;p&gt;问题:What is another name sometimes used for A or AAAA nameserver glue records found in the top level domain zone files?&lt;br&gt;
答案:host records&lt;/p&gt;
&lt;p&gt;问题:What is a registrar?&lt;br&gt;
答案:An organization that is able to register domains&lt;/p&gt;
&lt;p&gt;问题:What is a registry?&lt;br&gt;
答案:An organization responsible for operating the authorative nameservers and database for a top level domain&lt;/p&gt;
&lt;p&gt;问题:Why does getting AAAA records for your nameservers in the corresponding TLD (top level domain) zone matter?&lt;br&gt;
答案:It enables entirely native IPv6 DNS queries and makes it possible for IPv6 only hosts to reach the nameservers for your domain, since they can’t use glue that is just an A record.&lt;/p&gt;
&lt;p&gt;问题:IPv6 AAAA records have been added for several of the root nameservers.&lt;br&gt;
答案:True&lt;/p&gt;
&lt;p&gt;===========&lt;br&gt;
问题:What command do you use to ping an IPv6 address on Free Open Source UNIX platforms such as Linux, FreeBSD, etc?&lt;br&gt;
答案:ping6&lt;/p&gt;
&lt;p&gt;问题:What command do you use to traceroute to an IPv6 address on Free Open Source UNIX platforms such as Linux, FreeBSD, etc?&lt;br&gt;
答案:traceroute6&lt;/p&gt;
&lt;p&gt;问题:What command do you use to ping an IPv6 address on a Microsoft Windows platform?&lt;br&gt;
答案:ping&lt;/p&gt;
&lt;p&gt;问题:What command do you use to traceroute to an IPv6 address on a Microsoft Windows platform?&lt;br&gt;
答案:tracert&lt;/p&gt;
&lt;p&gt;问题:IPv6 addresses are written using what number base?&lt;br&gt;
答案:hexadecimal (base 16)&lt;/p&gt;
&lt;p&gt;问题:Hexadecimal digits are represented by:&lt;br&gt;
答案:0 to 9 and A to F&lt;/p&gt;
&lt;p&gt;问题:On Redhat, CentOS, and Fedora Core systems that don’t accept ::/0 as the IPv6 default route, which of the following should you use instead?&lt;br&gt;
答案:2000::/3&lt;/p&gt;
&lt;p&gt;问题:When configuring forward DNS entries for use with an IPv6 address, what record type do you use?&lt;br&gt;
答案:AAAA&lt;/p&gt;
&lt;p&gt;问题:When configuring reverse DNS with BIND for addresses in the IPv6 allocation 2001:A:B:C::/64, what is the correct format for the zone?&lt;br&gt;
答案:C.0.0.0.B.0.0.0.A.0.0.0.1.0.0.2.ip6.arpa&lt;/p&gt;
&lt;p&gt;问题:What is the IPv6 default route?&lt;br&gt;
答案:::/0&lt;/p&gt;
&lt;p&gt;问题:What is the IPv6 localhost address?&lt;br&gt;
答案:::1/128&lt;/p&gt;
&lt;p&gt;问题:Which of the following is a link-local address?&lt;br&gt;
答案:fe80::20c:dbff:fefb:232b&lt;/p&gt;
&lt;p&gt;问题:Which of the following URLs specifies a literal IPv6 address correctly?&lt;br&gt;
答案:http://[2001:470:0:64::2]&lt;/p&gt;
&lt;p&gt;问题:Which of the following URLs specifies a literal IPv6 address and port number correctly?&lt;br&gt;
答案:https://[2001:0db8:85a3:08d3:1319:8a2e:0370:7344]:443&lt;/p&gt;
&lt;p&gt;问题:If you run native IPv4 and IPv6 at the same time this is called:&lt;br&gt;
答案:Dual stack&lt;/p&gt;
&lt;p&gt;问题:How do you use the dig command to get the IPv6 address record for domain he.net?&lt;br&gt;
答案:dig he.net AAAA&lt;/p&gt;
&lt;p&gt;问题:How do you use the dig command to get the PTR record for the IPv6 address 2001:470:0:76::2?&lt;br&gt;
答案:dig -x 2001:470:0:76::2&lt;/p&gt;
&lt;p&gt;问题:What command shows IPv6 addresses configured on ethernet interfaces under UNIX (Linux, FreeBSD, etc.)?&lt;br&gt;
答案:ifconfig&lt;/p&gt;
&lt;p&gt;问题:What command shows IPv6 addresses configured on ethernet interfaces under Microsoft Windows?&lt;br&gt;
答案:ipconfig&lt;/p&gt;
&lt;p&gt;问题:Under FreeBSD, what does the generic tunneling interface start with?&lt;br&gt;
答案:gif&lt;/p&gt;
&lt;p&gt;问题:Under Linux, what kernel module needs to be loaded to support IPv6 networking?&lt;br&gt;
答案:ipv6&lt;/p&gt;
&lt;p&gt;问题:Are routers allowed to fragment IPv6 packets?&lt;br&gt;
答案:No&lt;/p&gt;
&lt;p&gt;问题:How many bytes are in an IPv6 address?&lt;br&gt;
答案:16&lt;/p&gt;
&lt;p&gt;问题:How many /48 subnets are available in a /32 prefix?&lt;br&gt;
答案:65536&lt;/p&gt;
&lt;p&gt;问题:Which protocol is used for manually configured tunnels?&lt;br&gt;
答案:6in4&lt;/p&gt;
&lt;p&gt;问题:Which of the following is the IPv6 documentation prefix?&lt;br&gt;
答案:2001:db8::/32&lt;/p&gt;
&lt;p&gt;问题:Which of the following is the IPv6 link-local prefix?&lt;br&gt;
答案:fe80::/10&lt;/p&gt;
&lt;p&gt;问题:Which of the following is the IPv6 multicast prefix?&lt;br&gt;
答案:ff00::/8&lt;/p&gt;
&lt;p&gt;问题:Which of the following is the IPv6 ULA (unique local addresses) prefix?&lt;br&gt;
答案:fc00::/7&lt;/p&gt;
&lt;p&gt;问题:Which of the following is a subnet of 2001:db8::/32?&lt;br&gt;
答案:2001:db8:7fa5::/48&lt;/p&gt;
&lt;p&gt;问题:On Linux, how would you traceroute to the IPv6 address of he.net?&lt;br&gt;
答案:traceroute6 he.net&lt;/p&gt;
&lt;p&gt;问题:On Windows Vista, how would you traceroute to the IPv6 address of he.net?&lt;br&gt;
答案:tracert he.net&lt;/p&gt;
&lt;p&gt;问题:On Linux, what is the IPv6 ping command?&lt;br&gt;
答案:ping6&lt;/p&gt;
&lt;p&gt;问题:Which command forces the UNIX command ssh to use IPv6 to connect to example.com (useful for domains with both A and AAAA records)?&lt;br&gt;
答案:ssh -6 example.com&lt;/p&gt;
&lt;p&gt;问题:You would force the UNIX command ssh to use IPv4 (useful if it had both A and AAAA records) to connect to example.com using which command?&lt;br&gt;
答案:ssh -4 example.com&lt;/p&gt;
&lt;p&gt;问题:Which command forces the UNIX command wget to use IPv6 to make a HTTP GET request to he.net (useful for domains with both A and AAAA records)?&lt;br&gt;
答案:wget -6 he.net&lt;/p&gt;
&lt;p&gt;问题:Which command forces the UNIX command wget to use IPv4 to make a HTTP GET request to he.net (useful for domains with both A and AAAA records)?&lt;br&gt;
答案:wget -4 he.net&lt;/p&gt;
&lt;p&gt;问题:Which command forces the UNIX command mtr to use IPv6 to traceroute to he.net (useful for domains with both A and AAAA records)?&lt;br&gt;
答案:mtr -6 he.net&lt;/p&gt;
&lt;p&gt;问题:Which command forces the UNIX command mtr to use IPv4 to traceroute to he.net (useful for domains with both A and AAAA records)?&lt;br&gt;
答案:mtr -4 he.net&lt;/p&gt;
&lt;p&gt;问题:When using basic auto-configuration, what is used from the host to configure the last 64bits of the IPv6 address?&lt;br&gt;
答案:The MAC address of the ethernet interface&lt;/p&gt;
&lt;p&gt;问题:A MAC address is only 48bits. So when using basic auto-configuration, what is used to fill in the missing 16bits?&lt;br&gt;
答案:FFFE&lt;/p&gt;
&lt;p&gt;问题:On many routers, which one of the following commands is used to configure an IPv6 address on an interface?&lt;br&gt;
答案:ipv6 address 2001:A:B:C::1/64&lt;/p&gt;
&lt;p&gt;问题:What is the length of an IPv6 packet header?&lt;br&gt;
答案:40 bytes&lt;/p&gt;
&lt;p&gt;问题:Which of the following organizations assigns IPv6 addresses?&lt;br&gt;
答案:All of the above&lt;/p&gt;
&lt;p&gt;问题:What protocol number is used for 6in4 IPv4 packets?&lt;br&gt;
答案:41&lt;/p&gt;
&lt;p&gt;问题:Which of the following is the 6to4 IPv6 prefix?&lt;br&gt;
答案:2002::/16&lt;/p&gt;
&lt;p&gt;问题:Which of the following well-known prefixes is used for Teredo?&lt;br&gt;
答案:2001:0000::/32&lt;/p&gt;
&lt;p&gt;问题:Which of the following is an IPv4-mapped IPv6 address?&lt;br&gt;
答案:::ffff:10.10.10.2&lt;/p&gt;
&lt;p&gt;问题:On operating systems that support it, IPv4-mapped IPv6 addresses are used to:&lt;br&gt;
答案:map IPv4 addresses to an IPv6 address to make it so that IPv6 socket system calls can be used with both IPv4 or IPv6 addresses&lt;/p&gt;
&lt;p&gt;问题:Which of the following is an IPv4-compatible IPv6 address?&lt;br&gt;
答案:::10.10.10.2&lt;/p&gt;
&lt;p&gt;问题:IPv4-compatible IPv6 addresses are deprecated in RFC 4291.&lt;br&gt;
答案:True&lt;/p&gt;
&lt;p&gt;问题:Should you ever see packets with IPv4-mapped IPv6 addresses on the wire (outside of a host)?&lt;br&gt;
答案:No&lt;/p&gt;
&lt;p&gt;问题:Which version of OSPF supports IPv6?&lt;br&gt;
答案:OSPFv3&lt;/p&gt;
&lt;p&gt;问题:Which of the following can be used by an IPv6 host to learn the address of a default gateway?&lt;br&gt;
答案:neighbor discovery protocol&lt;/p&gt;
&lt;p&gt;问题:Which of the following can be used by a host to learn its own IPv6 address?&lt;br&gt;
答案:stateless autoconfiguration&lt;/p&gt;
&lt;p&gt;问题:If you translate IPv4 packets to IPv6 or IPv6 packets to IPv4, this is called:&lt;br&gt;
答案:NAT64/DNS64/DS-Lite&lt;/p&gt;
&lt;p&gt;问题:On many routers, what command shows IPv6 routes?&lt;br&gt;
答案:show ipv6 route&lt;/p&gt;
&lt;p&gt;问题:On many routers, what command shows IPv6 BGP sessions?&lt;br&gt;
答案:show ipv6 bgp summary&lt;/p&gt;
&lt;p&gt;问题:On many routers, what command shows IPv6 BGP routes?&lt;br&gt;
答案:sh ipv6 bgp&lt;/p&gt;</summary>
</entry>
<entry>
  <title>360 T7路由器刷入小米WR30u固件修改MAC后获取终端密码</title>
  <link href="https://www.ioioi.cn/posts/360-t7-router-flashing-xiaomi-wr30u-firmware-to-modify-mac/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/360-t7-router-flashing-xiaomi-wr30u-firmware-to-modify-mac/</id>
  <published>2024-04-03T10:13:38.000Z</published>
  <updated>2024-04-03T10:14:05.000Z</updated>
  <summary type="html">&lt;p&gt;备份一下论坛的代码
&lt;a href=&quot;https://www.right.com.cn/FORUM/thread-8290776-1-1.html&quot;&gt;360 T7成功刷入小米WR30u的固件 很稳 可组网 适合养老（0607已传512内存版）&lt;/a&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#!/usr/bin/env php&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;?php //路由器固件解包后，从 /bin/mkxqimage 中提取的盐 $salt = array( &apos;r1d&apos; =&gt; &apos;A2E371B0-B34B-48A5-8C40-A7133F3B5D88&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    &apos;others&apos; =&gt; &apos;d44fb0960aa0-a5e6-4a30-250f-6d2df50a&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;isset($argv[1]) or die(&apos;Usage: &apos; . $argv[0] . &quot; SN\n&quot;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;print_line(get_passwd($argv[1]));&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;function print_line($message) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    echo $message . &quot;\n&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;//密码算法：&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;//原始 SN 拼接反转后的盐，做 md5 运算取前 8 个字符&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;function get_passwd($sn) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    return substr(md5($sn . get_salt($sn)), 0, 8);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;// SN 中不含 &apos;/&apos; 则为 r1d&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#function get_salt($sn) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#    global $salt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#    if (false === strpos($sn, &apos;/&apos;)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#        return $salt[&apos;r1d&apos;];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#    } else {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#        return swap_salt($salt[&apos;others&apos;]);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;// SN 中不含 &apos;/&apos; 则为 r1d&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;function get_salt($sn) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    global $salt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    //if (false === strpos($sn, &apos;/&apos;)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    //    return $salt[&apos;r1d&apos;];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    //} else {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    //    return swap_salt($salt[&apos;others&apos;]);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    //}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    return swap_salt($salt[&apos;others&apos;]);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;//非 R1D 盐要反转后才能使用&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;function swap_salt($salt) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    return implode(&apos;-&apos;, array_reverse(explode(&apos;-&apos;, $salt)));&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>香橙派 5 Plus CPU RK3588 测试</title>
  <link href="https://www.ioioi.cn/posts/orange-pi-5-plus-cpu-rk3588/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/orange-pi-5-plus-cpu-rk3588/</id>
  <published>2024-04-03T09:56:47.000Z</published>
  <updated>2024-04-03T09:56:47.000Z</updated>
  <summary type="html">&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;root@op ~# bash ./sbc-bench.sh -c&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Average load and/or CPU utilization too high (too much background activity). Waiting...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Too busy for benchmarking: 23:04:28 up 39 min, 3 users, load average: 1.39, 1.27, 1.11, cpu: 1%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Too busy for benchmarking: 23:04:33 up 39 min, 3 users, load average: 1.35, 1.27, 1.11, cpu: 0%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Too busy for benchmarking: 23:04:38 up 39 min, 3 users, load average: 1.33, 1.26, 1.11, cpu: 0%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Too busy for benchmarking: 23:04:43 up 39 min, 3 users, load average: 1.30, 1.26, 1.11, cpu: 0%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Too busy for benchmarking: 23:04:48 up 39 min, 3 users, load average: 1.28, 1.26, 1.11, cpu: 0%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Too busy for benchmarking: 23:04:53 up 39 min, 3 users, load average: 1.25, 1.25, 1.11, cpu: 0%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Status of performance related governors found below /sys (w/o cpufreq):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;dmc: performance / 2112 MHz (rknpu_ondemand dmc_ondemand userspace powersave performance simple_ondemand / 528 1068 1560 2112)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;fb000000.gpu: performance / 1000 MHz (rknpu_ondemand dmc_ondemand userspace powersave performance simple_ondemand / 300 400 500 600 700 800 900 1000)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;fdab0000.npu: performance / 1000 MHz (rknpu_ondemand dmc_ondemand userspace powersave performance simple_ondemand / 300 400 500 600 700 800 900 1000)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sbc-bench v0.9.60&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Installing needed tools: Done.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Checking cpufreq OPP. Done (results will be available in 21-32 minutes).&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Executing tinymembench. Done.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Executing RAM latency tester. Done.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Executing OpenSSL benchmark. Done.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Executing 7-zip benchmark. Done.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Executing cpuminer. 5 more minutes to wait. Done.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Checking cpufreq OPP again. Done (21 minutes elapsed).&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Results validation:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;* Advertised vs. measured max CPU clockspeed: -3.0% before, -4.0% after -&gt; https://tinyurl.com/32w9rr94&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;* No swapping&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;* Background activity (%system) OK&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;* No throttling&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Memory performance (all 3 CPU clusters measured individually):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;memcpy: 6709.4 MB/s (Cortex-A55)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;memset: 21654.4 MB/s (Cortex-A55)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;memcpy: 12247.3 MB/s (Cortex-A76)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;memset: 29740.2 MB/s (Cortex-A76)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;memcpy: 12553.5 MB/s (Cortex-A76)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;memset: 29569.5 MB/s (Cortex-A76)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpuminer total scores (5 minutes execution): 23.96,23.95,23.94,23.93,23.92,23.91,23.90,23.89,23.88,23.85,23.83 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;7-zip total scores (3 consecutive runs): 16279,16400,16489, single-threaded: 3117&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;OpenSSL results (all 3 CPU clusters measured individually):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;aes-128-cbc 158023.79k 468676.91k 915873.62k 1210427.05k 1336194.39k 1346655.57k (Cortex-A55)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;aes-128-cbc 644442.67k 1273380.20k 1642038.02k 1762216.28k 1809047.55k 1813861.72k (Cortex-A76)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;aes-128-cbc 630312.15k 1242141.21k 1602185.81k 1717907.46k 1763661.14k 1768308.74k (Cortex-A76)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;aes-192-cbc 150778.60k 417122.11k 745103.62k 933005.99k 1006034.94k 1011919.53k (Cortex-A55)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;aes-192-cbc 601137.05k 1123098.86k 1393824.68k 1468218.71k 1509064.70k 1512172.20k (Cortex-A76)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;aes-192-cbc 585598.94k 1094835.78k 1357408.60k 1431271.08k 1470950.06k 1473937.41k (Cortex-A76)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;aes-256-cbc 146126.97k 383489.64k 645938.01k 780054.53k 830193.66k 834251.43k (Cortex-A55)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;aes-256-cbc 580311.18k 998646.87k 1208005.89k 1270018.39k 1294180.35k 1296405.85k (Cortex-A76)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;aes-256-cbc 568428.99k 973770.22k 1177625.43k 1238337.88k 1261497.00k 1263736.15k (Cortex-A76)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Unable to upload full test results. Please copy&amp;#x26;paste the below stuff to pastebin.com and&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;provide the URL. Check the output for throttling and swapping please.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sbc-bench v0.9.60 Orange Pi 5 Plus (Tue, 16 Jan 2024 23:05:00 +0800)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Distributor ID: Ubuntu&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Description: Ubuntu 22.04.3 LTS&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Release: 22.04&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Codename: jammy&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;/usr/bin/gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Uptime: 23:05:00 up 39 min, 3 users, load average: 1.31, 1.26, 1.11, 37.9°C, 81978082&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Linux 5.10.160-rockchip (op) 2024年01月16日 _aarch64_ (8 CPU)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;avg-cpu: %user %nice %system %iowait %steal %idle&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;0.92 0.06 0.57 0.03 0.00 98.41&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Device tps kB_read/s kB_wrtn/s kB_dscd/s kB_read kB_wrtn kB_dscd&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mmcblk0 13.86 383.18 367.48 0.00 918145 880510 0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;nvme0n1 0.10 2.40 0.00 0.00 5760 0 0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;total used free shared buff/cache available&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Mem: 15Gi 920Mi 14Gi 8.0Mi 328Mi 14Gi&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Swap: 11Gi 0B 11Gi&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Filename Type Size Used Priority&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;/swapfile file 12582908 0 -2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;##########################################################################&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Checking cpufreq OPP for cpu0-cpu3 (Cortex-A55):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 1800 Measured: 1785 (1785.631/1785.251/1784.783)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 1608 Measured: 1599 (1599.723/1599.583/1599.543)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 1416 Measured: 1400 (1400.325/1400.255/1400.027) (-1.1%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 1200 Measured: 1223 (1223.353/1223.215/1223.124) (+1.9%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 1008 Measured: 999 (999.630/999.580/999.518)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 816 Measured: 798 (798.695/798.635/798.605) (-2.2%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 600 Measured: 590 (590.988/590.892/590.818) (-1.7%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 408 Measured: 392 (392.876/392.812/392.782) (-3.9%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Checking cpufreq OPP for cpu4-cpu5 (Cortex-A76):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 2352 Measured: 2281 (2281.632/2281.574/2281.457) (-3.0%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 2208 Measured: 2193 (2193.471/2193.198/2192.624)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 2016 Measured: 1981 (1982.086/1981.584/1981.459) (-1.7%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 1800 Measured: 1812 (1812.707/1812.391/1812.211)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 1608 Measured: 1612 (1613.109/1612.587/1612.066)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 1416 Measured: 1396 (1396.162/1396.023/1395.953) (-1.4%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 1200 Measured: 1159 (1159.867/1159.651/1159.579) (-3.4%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 1008 Measured: 970 (970.556/970.471/970.170) (-3.8%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 816 Measured: 777 (777.185/777.165/776.914) (-4.8%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 600 Measured: 579 (579.454/579.203/579.160) (-3.5%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 408 Measured: 381 (381.920/381.906/381.872) (-6.6%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Checking cpufreq OPP for cpu6-cpu7 (Cortex-A76):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 2256 Measured: 2222 (2222.384/2222.190/2222.134) (-1.5%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 2208 Measured: 2160 (2160.416/2160.335/2160.146) (-2.2%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 2016 Measured: 1992 (1992.752/1992.678/1992.603) (-1.2%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 1800 Measured: 1819 (1819.628/1819.582/1819.355) (+1.1%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 1608 Measured: 1614 (1614.403/1614.302/1614.282)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 1416 Measured: 1429 (1429.785/1429.785/1429.731)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 1200 Measured: 1180 (1180.324/1180.206/1180.132) (-1.7%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 1008 Measured: 994 (994.395/994.345/994.295) (-1.4%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 816 Measured: 797 (797.797/797.777/797.728) (-2.3%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 600 Measured: 592 (592.843/592.836/592.806) (-1.3%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 408 Measured: 394 (394.884/394.855/394.850) (-3.4%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;##########################################################################&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Hardware sensors:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;nvme-pci-0100&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Composite: +35.9 C (low = -0.1 C, high = +82.8 C)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;(crit = +83.8 C)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Sensor 1: +27.9 C (low = -273.1 C, high = +65261.8 C)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Sensor 2: +31.9 C (low = -273.1 C, high = +65261.8 C)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;npu_thermal-virtual-0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;temp1: +36.1 C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;center_thermal-virtual-0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;temp1: +36.1 C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;bigcore1_thermal-virtual-0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;temp1: +37.0 C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;soc_thermal-virtual-0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;temp1: +37.0 C (crit = +115.0 C)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tcpm_source_psy_6_0022-i2c-6-22&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;in0: 0.00 V (min = +0.00 V, max = +0.00 V)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;curr1: 0.00 A (max = +0.00 A)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;gpu_thermal-virtual-0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;temp1: +36.1 C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;littlecore_thermal-virtual-0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;temp1: +37.0 C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;bigcore0_thermal-virtual-0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;temp1: +37.0 C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;/dev/nvme0: 36°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;##########################################################################&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Executing benchmark on cpu0 (Cortex-A55):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tinymembench v0.4.9-nuumio (simple benchmark for memory throughput and latency)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;CFLAGS:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;bandwidth test min repeats (-b): 2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;bandwidth test max repeats (-B): 3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;bandwidth test mem realloc (-M): no (-m for realloc)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;latency test repeats (-l): 3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;latency test count (-c): 1000000&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;==========================================================================&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Memory bandwidth tests ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Note 1: 1MB = 1000000 bytes ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Note 2: Test result is the best of repeated runs. Number of repeats ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== is shown in brackets ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Note 3: Results for &apos;copy&apos; tests show how many bytes can be ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== copied per second (adding together read and writen ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== bytes would have provided twice higher numbers) ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Note 4: 2-pass copy means that we are using a small temporary buffer ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== to first fetch data into it, and only then write it to the ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== destination (source -&gt; L1 cache, L1 cache -&gt; destination) ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Note 5: If sample standard deviation exceeds 0.1%, it is shown in ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== brackets ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;==========================================================================&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C copy backwards : 3530.3 MB/s (3, 9.8%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C copy backwards (32 byte blocks) : 3505.3 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C copy backwards (64 byte blocks) : 3541.4 MB/s (3, 0.1%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C copy : 6182.8 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C copy prefetched (32 bytes step) : 2455.4 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C copy prefetched (64 bytes step) : 6369.9 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C 2-pass copy : 2862.1 MB/s (3, 1.0%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C 2-pass copy prefetched (32 bytes step) : 1651.3 MB/s (3, 0.1%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C 2-pass copy prefetched (64 bytes step) : 3126.9 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C scan 8 : 442.9 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C scan 16 : 880.6 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C scan 32 : 1746.8 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C scan 64 : 3442.5 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C fill : 12301.6 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C fill (shuffle within 16 byte blocks) : 12302.0 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C fill (shuffle within 32 byte blocks) : 12299.6 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C fill (shuffle within 64 byte blocks) : 12010.0 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;---&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;libc memcpy copy : 6709.4 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;libc memchr scan : 2765.3 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;libc memset fill : 21654.4 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;---&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON LDP/STP copy : 5671.8 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON LDP/STP copy pldl2strm (32 bytes step) : 1923.3 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON LDP/STP copy pldl2strm (64 bytes step) : 3762.7 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON LDP/STP copy pldl1keep (32 bytes step) : 2787.6 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON LDP/STP copy pldl1keep (64 bytes step) : 5418.6 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON LD1/ST1 copy : 5454.1 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON LDP load : 6970.9 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON LDNP load : 7161.4 MB/s (3, 0.2%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON STP fill : 21574.4 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON STNP fill : 15231.2 MB/s (3, 0.8%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ARM LDP/STP copy : 5673.8 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ARM LDP load : 6968.3 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ARM LDNP load : 7147.6 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ARM STP fill : 21573.5 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ARM STNP fill : 15225.8 MB/s (3, 0.9%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;==========================================================================&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Memory latency test ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Average time is measured for random memory accesses in the buffers ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== of different sizes. The larger is the buffer, the more significant ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== are relative contributions of TLB, L1/L2 cache misses and SDRAM ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== accesses. For extremely large buffer sizes we are expecting to see ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== page table walk with several requests to SDRAM for almost every ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== memory access (though 64MiB is not nearly large enough to experience ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== this effect to its fullest). ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Note 1: All the numbers are representing extra time, which needs to ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== be added to L1 cache latency. The cycle timings for L1 cache ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== latency can be usually found in the processor documentation. ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Note 2: Dual random read means that we are simultaneously performing ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== two independent memory accesses at a time. In the case if ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== the memory subsystem can&apos;t handle multiple outstanding ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== requests, dual random read has the same timings as two ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== single reads performed one after another. ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;==========================================================================&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;block size : single random read / dual random read&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1024 : 0.0 ns / 0.0 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2048 : 0.0 ns / 0.0 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;4096 : 0.0 ns / 0.0 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;8192 : 0.0 ns / 0.0 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;16384 : 0.1 ns / 0.2 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;32768 : 1.0 ns / 1.0 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;65536 : 1.6 ns / 2.7 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;131072 : 3.9 ns / 6.1 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;262144 : 8.6 ns / 12.2 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;524288 : 12.8 ns / 15.4 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1048576 : 15.5 ns / 16.5 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2097152 : 20.0 ns / 19.5 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;4194304 : 42.9 ns / 63.0 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;8388608 : 82.6 ns / 110.2 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;16777216 : 102.9 ns / 126.4 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;33554432 : 115.0 ns / 136.3 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;67108864 : 121.2 ns / 144.2 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Executing benchmark on cpu4 (Cortex-A76):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tinymembench v0.4.9-nuumio (simple benchmark for memory throughput and latency)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;CFLAGS:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;bandwidth test min repeats (-b): 2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;bandwidth test max repeats (-B): 3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;bandwidth test mem realloc (-M): no (-m for realloc)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;latency test repeats (-l): 3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;latency test count (-c): 1000000&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;==========================================================================&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Memory bandwidth tests ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Note 1: 1MB = 1000000 bytes ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Note 2: Test result is the best of repeated runs. Number of repeats ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== is shown in brackets ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Note 3: Results for &apos;copy&apos; tests show how many bytes can be ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== copied per second (adding together read and writen ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== bytes would have provided twice higher numbers) ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Note 4: 2-pass copy means that we are using a small temporary buffer ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== to first fetch data into it, and only then write it to the ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== destination (source -&gt; L1 cache, L1 cache -&gt; destination) ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Note 5: If sample standard deviation exceeds 0.1%, it is shown in ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== brackets ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;==========================================================================&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C copy backwards : 11830.3 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C copy backwards (32 byte blocks) : 11819.9 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C copy backwards (64 byte blocks) : 11816.1 MB/s (3, 0.2%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C copy : 12012.6 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C copy prefetched (32 bytes step) : 12249.3 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C copy prefetched (64 bytes step) : 12273.9 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C 2-pass copy : 4715.7 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C 2-pass copy prefetched (32 bytes step) : 7129.1 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C 2-pass copy prefetched (64 bytes step) : 6626.4 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C scan 8 : 1130.6 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C scan 16 : 2259.8 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C scan 32 : 4512.8 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C scan 64 : 8989.9 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C fill : 29740.5 MB/s (3, 0.5%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C fill (shuffle within 16 byte blocks) : 29727.1 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C fill (shuffle within 32 byte blocks) : 29702.3 MB/s (3, 0.2%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C fill (shuffle within 64 byte blocks) : 29646.1 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;---&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;libc memcpy copy : 12247.3 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;libc memchr scan : 16291.3 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;libc memset fill : 29740.2 MB/s (3, 0.6%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;---&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON LDP/STP copy : 12278.6 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON LDP/STP copy pldl2strm (32 bytes step) : 12296.5 MB/s (3, 0.3%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON LDP/STP copy pldl2strm (64 bytes step) : 12315.3 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON LDP/STP copy pldl1keep (32 bytes step) : 12306.4 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON LDP/STP copy pldl1keep (64 bytes step) : 12302.4 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON LD1/ST1 copy : 12227.7 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON LDP load : 18802.3 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON LDNP load : 17943.9 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON STP fill : 29727.9 MB/s (3, 0.9%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON STNP fill : 29706.6 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ARM LDP/STP copy : 12342.3 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ARM LDP load : 18379.6 MB/s (3)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ARM LDNP load : 17379.1 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ARM STP fill : 29727.0 MB/s (3, 0.7%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ARM STNP fill : 29704.7 MB/s (3, 0.9%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;==========================================================================&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Memory latency test ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Average time is measured for random memory accesses in the buffers ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== of different sizes. The larger is the buffer, the more significant ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== are relative contributions of TLB, L1/L2 cache misses and SDRAM ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== accesses. For extremely large buffer sizes we are expecting to see ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== page table walk with several requests to SDRAM for almost every ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== memory access (though 64MiB is not nearly large enough to experience ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== this effect to its fullest). ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Note 1: All the numbers are representing extra time, which needs to ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== be added to L1 cache latency. The cycle timings for L1 cache ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== latency can be usually found in the processor documentation. ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Note 2: Dual random read means that we are simultaneously performing ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== two independent memory accesses at a time. In the case if ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== the memory subsystem can&apos;t handle multiple outstanding ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== requests, dual random read has the same timings as two ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== single reads performed one after another. ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;==========================================================================&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;block size : single random read / dual random read&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1024 : 0.0 ns / 0.0 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2048 : 0.0 ns / 0.0 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;4096 : 0.0 ns / 0.0 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;8192 : 0.0 ns / 0.0 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;16384 : 0.0 ns / 0.0 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;32768 : 0.1 ns / 0.0 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;65536 : 0.1 ns / 0.0 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;131072 : 1.3 ns / 1.5 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;262144 : 2.6 ns / 2.9 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;524288 : 5.6 ns / 6.5 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1048576 : 11.7 ns / 13.4 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2097152 : 20.8 ns / 17.3 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;4194304 : 41.3 ns / 55.3 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;8388608 : 77.6 ns / 101.4 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;16777216 : 98.6 ns / 117.6 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;33554432 : 109.4 ns / 123.7 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;67108864 : 115.5 ns / 127.2 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Executing benchmark on cpu6 (Cortex-A76):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tinymembench v0.4.9-nuumio (simple benchmark for memory throughput and latency)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;CFLAGS:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;bandwidth test min repeats (-b): 2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;bandwidth test max repeats (-B): 3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;bandwidth test mem realloc (-M): no (-m for realloc)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;latency test repeats (-l): 3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;latency test count (-c): 1000000&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;==========================================================================&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Memory bandwidth tests ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Note 1: 1MB = 1000000 bytes ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Note 2: Test result is the best of repeated runs. Number of repeats ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== is shown in brackets ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Note 3: Results for &apos;copy&apos; tests show how many bytes can be ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== copied per second (adding together read and writen ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== bytes would have provided twice higher numbers) ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Note 4: 2-pass copy means that we are using a small temporary buffer ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== to first fetch data into it, and only then write it to the ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== destination (source -&gt; L1 cache, L1 cache -&gt; destination) ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Note 5: If sample standard deviation exceeds 0.1%, it is shown in ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== brackets ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;==========================================================================&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C copy backwards : 12208.1 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C copy backwards (32 byte blocks) : 12193.4 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C copy backwards (64 byte blocks) : 12187.7 MB/s (3, 0.3%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C copy : 12311.4 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C copy prefetched (32 bytes step) : 12487.3 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C copy prefetched (64 bytes step) : 12532.2 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C 2-pass copy : 4963.4 MB/s (3, 0.2%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C 2-pass copy prefetched (32 bytes step) : 7180.5 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C 2-pass copy prefetched (64 bytes step) : 6598.2 MB/s (3, 0.2%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C scan 8 : 1102.7 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C scan 16 : 2204.2 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C scan 32 : 4405.8 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C scan 64 : 8784.3 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C fill : 29692.8 MB/s (3, 1.0%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C fill (shuffle within 16 byte blocks) : 29710.4 MB/s (3, 0.3%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C fill (shuffle within 32 byte blocks) : 29527.6 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C fill (shuffle within 64 byte blocks) : 29769.8 MB/s (3, 0.4%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;---&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;libc memcpy copy : 12553.5 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;libc memchr scan : 16547.1 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;libc memset fill : 29569.5 MB/s (3, 0.9%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;---&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON LDP/STP copy : 12564.3 MB/s (3, 0.2%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON LDP/STP copy pldl2strm (32 bytes step) : 12565.8 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON LDP/STP copy pldl2strm (64 bytes step) : 12580.9 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON LDP/STP copy pldl1keep (32 bytes step) : 12578.9 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON LDP/STP copy pldl1keep (64 bytes step) : 12579.3 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON LD1/ST1 copy : 12533.7 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON LDP load : 19080.1 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON LDNP load : 18200.1 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON STP fill : 29612.6 MB/s (3, 0.9%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NEON STNP fill : 29736.4 MB/s (3, 0.4%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ARM LDP/STP copy : 12547.9 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ARM LDP load : 18596.4 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ARM LDNP load : 17484.8 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ARM STP fill : 29535.6 MB/s (3, 1.7%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ARM STNP fill : 29655.8 MB/s (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;==========================================================================&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Memory latency test ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Average time is measured for random memory accesses in the buffers ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== of different sizes. The larger is the buffer, the more significant ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== are relative contributions of TLB, L1/L2 cache misses and SDRAM ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== accesses. For extremely large buffer sizes we are expecting to see ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== page table walk with several requests to SDRAM for almost every ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== memory access (though 64MiB is not nearly large enough to experience ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== this effect to its fullest). ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Note 1: All the numbers are representing extra time, which needs to ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== be added to L1 cache latency. The cycle timings for L1 cache ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== latency can be usually found in the processor documentation. ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== Note 2: Dual random read means that we are simultaneously performing ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== two independent memory accesses at a time. In the case if ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== the memory subsystem can&apos;t handle multiple outstanding ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== requests, dual random read has the same timings as two ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;== single reads performed one after another. ==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;==========================================================================&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;block size : single random read / dual random read&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1024 : 0.0 ns / 0.0 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2048 : 0.0 ns / 0.0 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;4096 : 0.0 ns / 0.0 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;8192 : 0.0 ns / 0.0 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;16384 : 0.0 ns / 0.0 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;32768 : 0.0 ns / 0.0 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;65536 : 0.1 ns / 0.0 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;131072 : 1.3 ns / 1.6 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;262144 : 2.7 ns / 2.9 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;524288 : 5.0 ns / 6.2 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1048576 : 11.8 ns / 13.6 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2097152 : 17.7 ns / 17.5 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;4194304 : 40.4 ns / 54.1 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;8388608 : 76.7 ns / 100.6 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;16777216 : 97.2 ns / 117.3 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;33554432 : 111.3 ns / 123.4 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;67108864 : 114.2 ns / 127.0 ns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;##########################################################################&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Executing ramlat on cpu0 (Cortex-A55), results in ns:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;size: 1x32 2x32 1x64 2x64 1xPTR 2xPTR 4xPTR 8xPTR&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;4k: 1.693 1.706 1.693 1.690 1.125 1.688 2.286 4.610&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;8k: 1.687 1.687 1.687 1.688 1.125 1.687 2.285 4.606&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;16k: 1.699 1.687 1.698 1.687 1.134 1.687 2.285 4.606&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;32k: 1.715 1.690 1.714 1.690 1.139 1.690 2.290 4.612&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;64k: 10.09 11.41 10.10 11.42 10.20 11.45 16.29 29.59&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;128k: 13.56 15.00 13.56 15.00 14.40 15.02 22.06 40.92&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;256k: 16.16 16.69 16.16 16.66 15.36 16.71 26.16 50.61&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;512k: 16.96 17.15 16.97 17.16 16.27 17.39 27.17 54.02&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1024k: 17.23 17.29 17.13 17.29 16.53 17.53 28.40 54.22&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2048k: 19.69 19.44 18.54 19.42 18.19 19.58 31.92 61.08&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;4096k: 57.41 67.01 54.35 68.29 54.01 64.94 105.6 216.1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;8192k: 96.91 101.2 94.52 101.3 93.91 101.9 156.5 278.2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;16384k: 116.1 114.9 113.2 114.7 112.9 116.3 174.8 313.5&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;32768k: 124.8 124.2 122.0 123.8 120.8 125.0 184.8 318.6&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;65536k: 128.7 130.2 129.0 130.2 127.8 130.2 188.8 327.8&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;131072k: 136.3 136.9 136.1 137.0 135.0 137.1 191.8 332.9&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Executing ramlat on cpu4 (Cortex-A76), results in ns:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;size: 1x32 2x32 1x64 2x64 1xPTR 2xPTR 4xPTR 8xPTR&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;4k: 1.759 1.759 1.761 1.759 1.759 1.761 1.759 3.350&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;8k: 1.759 1.759 1.761 1.759 1.758 1.761 1.759 3.427&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;16k: 1.761 1.759 1.761 1.759 1.758 1.761 1.759 3.429&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;32k: 1.761 1.759 1.761 1.759 1.758 1.761 1.759 3.429&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;64k: 1.768 1.762 1.768 1.762 1.765 1.768 1.765 3.436&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;128k: 5.365 5.361 5.367 5.361 5.359 6.063 7.555 13.36&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;256k: 6.200 6.270 6.199 6.260 6.207 6.208 7.758 13.33&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;512k: 10.85 9.717 10.73 9.730 10.66 10.30 11.78 18.56&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1024k: 18.17 18.24 18.21 18.24 18.18 18.23 20.07 29.81&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2048k: 24.91 22.42 24.48 22.39 24.53 22.57 24.24 34.35&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;4096k: 53.47 43.37 52.73 43.42 52.76 45.01 47.28 56.33&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;8192k: 97.69 83.00 96.80 82.99 96.00 84.52 85.43 89.93&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;16384k: 115.7 105.5 114.3 112.5 114.2 113.7 111.4 111.7&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;32768k: 122.7 124.8 124.6 125.5 122.0 123.6 122.0 116.6&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;65536k: 127.9 128.7 127.4 128.6 127.2 127.0 126.6 126.2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;131072k: 129.3 130.7 129.5 130.8 129.6 129.1 129.0 134.4&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Executing ramlat on cpu6 (Cortex-A76), results in ns:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;size: 1x32 2x32 1x64 2x64 1xPTR 2xPTR 4xPTR 8xPTR&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;4k: 1.806 1.805 1.805 1.805 1.804 1.805 1.805 3.434&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;8k: 1.804 1.805 1.804 1.804 1.804 1.805 1.805 3.516&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;16k: 1.804 1.804 1.804 1.804 1.804 1.804 1.805 3.516&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;32k: 1.804 1.804 1.804 1.804 1.804 1.804 1.805 3.519&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;64k: 1.805 1.805 1.805 1.805 1.805 1.805 1.806 3.520&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;128k: 5.497 5.501 5.497 5.500 5.496 6.211 7.776 13.68&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;256k: 7.186 7.389 7.306 7.392 7.287 7.380 8.626 14.65&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;512k: 10.51 9.942 10.45 9.923 10.51 10.60 12.24 18.88&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1024k: 18.95 18.14 18.85 18.14 18.85 18.26 20.25 31.20&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2048k: 21.68 20.44 20.69 20.44 20.69 20.84 22.90 33.09&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;4096k: 54.06 42.33 51.32 42.30 51.00 44.55 45.66 55.49&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;8192k: 98.55 81.92 95.08 81.42 94.55 83.05 80.44 84.47&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;16384k: 121.1 112.3 114.9 105.6 114.0 108.6 108.6 102.8&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;32768k: 125.1 126.0 121.8 125.5 122.2 123.1 121.7 109.4&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;65536k: 127.0 127.6 126.8 127.8 126.9 126.0 126.5 124.4&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;131072k: 129.4 129.9 128.8 129.7 128.7 128.4 129.3 132.8&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;##########################################################################&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Executing benchmark on each cluster individually&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;OpenSSL 3.0.2, built on 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;aes-128-cbc 158023.79k 468676.91k 915873.62k 1210427.05k 1336194.39k 1346655.57k (Cortex-A55)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;aes-128-cbc 644442.67k 1273380.20k 1642038.02k 1762216.28k 1809047.55k 1813861.72k (Cortex-A76)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;aes-128-cbc 630312.15k 1242141.21k 1602185.81k 1717907.46k 1763661.14k 1768308.74k (Cortex-A76)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;aes-192-cbc 150778.60k 417122.11k 745103.62k 933005.99k 1006034.94k 1011919.53k (Cortex-A55)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;aes-192-cbc 601137.05k 1123098.86k 1393824.68k 1468218.71k 1509064.70k 1512172.20k (Cortex-A76)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;aes-192-cbc 585598.94k 1094835.78k 1357408.60k 1431271.08k 1470950.06k 1473937.41k (Cortex-A76)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;aes-256-cbc 146126.97k 383489.64k 645938.01k 780054.53k 830193.66k 834251.43k (Cortex-A55)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;aes-256-cbc 580311.18k 998646.87k 1208005.89k 1270018.39k 1294180.35k 1296405.85k (Cortex-A76)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;aes-256-cbc 568428.99k 973770.22k 1177625.43k 1238337.88k 1261497.00k 1263736.15k (Cortex-A76)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;##########################################################################&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Executing benchmark single-threaded on cpu0 (Cortex-A55)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;p7zip Version 16.02 (locale=C,Utf16=off,HugeFiles=on,64 bits,8 CPUs LE)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;LE&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;CPU Freq: - - 64000000 - - - - - -&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;RAM size: 15966 MB, # CPU hardware threads: 8&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;RAM usage: 435 MB, # Benchmark threads: 1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Compressing | Decompressing&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Dict Speed Usage R/U Rating | Speed Usage R/U Rating&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;KiB/s % MIPS MIPS | KiB/s % MIPS MIPS&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;22: 1369 100 1333 1332 | 21619 100 1846 1846&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23: 1296 100 1322 1321 | 21315 100 1845 1845&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;24: 1264 100 1359 1359 | 20967 100 1841 1841&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;25: 1226 100 1400 1400 | 20363 100 1813 1812&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;---------------------------------- | ------------------------------&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Avr: 100 1353 1353 | 100 1836 1836&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Tot: 100 1595 1595&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Executing benchmark single-threaded on cpu4 (Cortex-A76)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;p7zip Version 16.02 (locale=C,Utf16=off,HugeFiles=on,64 bits,8 CPUs LE)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;LE&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;CPU Freq: - - - 64000000 - - - - -&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;RAM size: 15966 MB, # CPU hardware threads: 8&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;RAM usage: 435 MB, # Benchmark threads: 1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Compressing | Decompressing&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Dict Speed Usage R/U Rating | Speed Usage R/U Rating&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;KiB/s % MIPS MIPS | KiB/s % MIPS MIPS&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;22: 3131 99 3079 3046 | 37379 99 3219 3191&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23: 2941 99 3034 2997 | 36885 99 3221 3193&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;24: 2833 99 3084 3047 | 36246 99 3210 3182&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;25: 2737 99 3163 3126 | 35419 99 3181 3153&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;---------------------------------- | ------------------------------&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Avr: 99 3090 3054 | 99 3208 3180&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Tot: 99 3149 3117&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Executing benchmark single-threaded on cpu6 (Cortex-A76)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;p7zip Version 16.02 (locale=C,Utf16=off,HugeFiles=on,64 bits,8 CPUs LE)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;LE&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;CPU Freq: - - - - - 256000000 - - -&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;RAM size: 15966 MB, # CPU hardware threads: 8&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;RAM usage: 435 MB, # Benchmark threads: 1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Compressing | Decompressing&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Dict Speed Usage R/U Rating | Speed Usage R/U Rating&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;KiB/s % MIPS MIPS | KiB/s % MIPS MIPS&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;22: 3110 100 3026 3026 | 36506 100 3117 3117&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23: 2931 100 2988 2987 | 36120 100 3127 3127&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;24: 2850 100 3065 3064 | 35483 100 3115 3115&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;25: 2727 100 3114 3114 | 34768 100 3095 3095&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;---------------------------------- | ------------------------------&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Avr: 100 3048 3048 | 100 3113 3113&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Tot: 100 3081 3081&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;##########################################################################&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Executing benchmark 3 times multi-threaded on CPUs 0-7&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;p7zip Version 16.02 (locale=C,Utf16=off,HugeFiles=on,64 bits,8 CPUs LE)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;LE&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;CPU Freq: - - - - - - - - -&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;RAM size: 15966 MB, # CPU hardware threads: 8&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;RAM usage: 1765 MB, # Benchmark threads: 8&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Compressing | Decompressing&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Dict Speed Usage R/U Rating | Speed Usage R/U Rating&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;KiB/s % MIPS MIPS | KiB/s % MIPS MIPS&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;22: 14683 654 2185 14284 | 200756 671 2553 17124&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23: 15540 750 2110 15833 | 198338 676 2540 17164&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;24: 14688 734 2153 15793 | 193155 673 2520 16953&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;25: 14222 764 2125 16239 | 189283 675 2496 16845&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;---------------------------------- | ------------------------------&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Avr: 725 2143 15537 | 674 2527 17021&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Tot: 700 2335 16279&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;p7zip Version 16.02 (locale=C,Utf16=off,HugeFiles=on,64 bits,8 CPUs LE)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;LE&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;CPU Freq: - - - - - - - - -&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;RAM size: 15966 MB, # CPU hardware threads: 8&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;RAM usage: 1765 MB, # Benchmark threads: 8&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Compressing | Decompressing&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Dict Speed Usage R/U Rating | Speed Usage R/U Rating&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;KiB/s % MIPS MIPS | KiB/s % MIPS MIPS&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;22: 16102 726 2159 15664 | 200146 672 2540 17072&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23: 15210 721 2149 15498 | 196975 673 2532 17046&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;24: 14716 753 2102 15823 | 193497 675 2516 16983&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;25: 14290 774 2108 16316 | 188778 674 2493 16800&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;---------------------------------- | ------------------------------&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Avr: 743 2129 15825 | 674 2520 16975&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Tot: 708 2325 16400&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;p7zip Version 16.02 (locale=C,Utf16=off,HugeFiles=on,64 bits,8 CPUs LE)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;LE&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;CPU Freq: - - - - - - - 1024000000 -&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;RAM size: 15966 MB, # CPU hardware threads: 8&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;RAM usage: 1765 MB, # Benchmark threads: 8&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Compressing | Decompressing&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Dict Speed Usage R/U Rating | Speed Usage R/U Rating&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;KiB/s % MIPS MIPS | KiB/s % MIPS MIPS&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;22: 16296 741 2141 15854 | 201042 675 2539 17148&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23: 15730 755 2122 16028 | 196471 673 2527 17002&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;24: 14747 747 2122 15857 | 193518 676 2514 16985&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;25: 14217 764 2125 16233 | 188797 675 2489 16802&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;---------------------------------- | ------------------------------&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Avr: 752 2127 15993 | 675 2517 16984&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Tot: 713 2322 16489&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Compression: 15537,15825,15993&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Decompression: 17021,16975,16984&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Total: 16279,16400,16489&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;##########################################################################&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;** cpuminer-multi 1.3.7 by tpruvot@github **&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;BTC donation address: 1FhDPLPpw18X4srecguG3MxJYe4a1JsZnd (tpruvot)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:07] 8 miner threads started, using &apos;scrypt&apos; algorithm.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:07] CPU #5: 4.23 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:07] CPU #4: 4.02 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:07] CPU #6: 4.05 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:07] CPU #7: 4.04 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:08] CPU #1: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:08] CPU #3: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:08] CPU #2: 1.74 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:08] CPU #0: 1.73 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:12] Total: 23.53 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:17] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:17] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:17] CPU #1: 1.76 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:17] CPU #3: 1.76 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:17] CPU #4: 4.27 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:17] CPU #7: 4.17 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:17] Total: 23.79 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:17] CPU #6: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:17] CPU #5: 4.32 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:22] Total: 23.95 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:27] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:27] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:27] CPU #3: 1.76 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:27] CPU #1: 1.76 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:27] CPU #4: 4.28 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:27] CPU #7: 4.17 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:27] Total: 23.96 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:27] CPU #6: 4.17 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:27] CPU #5: 4.30 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:32] Total: 23.94 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:37] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:37] CPU #3: 1.76 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:37] CPU #1: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:37] CPU #2: 1.73 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:37] CPU #4: 4.26 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:37] CPU #6: 4.17 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:37] CPU #7: 4.17 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:37] Total: 23.85 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:37] CPU #5: 4.27 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:42] Total: 23.91 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:47] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:47] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:47] CPU #3: 1.76 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:47] CPU #1: 1.76 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:47] CPU #4: 4.27 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:47] CPU #6: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:47] CPU #7: 4.17 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:47] Total: 23.95 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:47] CPU #5: 4.32 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:52] Total: 23.95 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:57] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:57] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:57] CPU #3: 1.76 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:57] CPU #1: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:57] CPU #4: 4.27 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:57] CPU #6: 4.17 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:57] CPU #7: 4.17 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:57] Total: 23.94 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:20:57] CPU #5: 4.32 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:02] Total: 23.94 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:07] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:07] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:07] CPU #1: 1.76 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:07] CPU #3: 1.76 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:07] CPU #4: 4.27 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:07] CPU #6: 4.17 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:07] CPU #7: 4.17 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:07] Total: 23.94 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:07] CPU #5: 4.32 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:12] Total: 23.93 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:17] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:17] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:17] CPU #1: 1.76 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:17] CPU #3: 1.76 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:17] CPU #4: 4.27 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:17] CPU #6: 4.17 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:17] CPU #5: 4.32 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:17] CPU #7: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:17] Total: 23.94 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:22] Total: 23.94 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:27] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:27] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:27] CPU #1: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:27] CPU #3: 1.76 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:27] CPU #4: 4.27 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:27] CPU #6: 4.17 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:27] CPU #7: 4.17 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:27] Total: 23.94 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:27] CPU #5: 4.32 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:32] Total: 23.94 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:37] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:37] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:37] CPU #1: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:37] CPU #3: 1.76 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:37] CPU #4: 4.27 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:37] CPU #6: 4.17 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:37] CPU #7: 4.17 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:37] Total: 23.94 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:37] CPU #5: 4.32 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:42] Total: 23.93 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:47] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:47] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:47] CPU #1: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:47] CPU #3: 1.76 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:47] CPU #4: 4.27 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:47] CPU #6: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:47] CPU #5: 4.31 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:47] CPU #7: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:47] Total: 23.92 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:52] Total: 23.94 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:57] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:57] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:57] CPU #1: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:57] CPU #3: 1.76 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:57] CPU #4: 4.27 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:57] CPU #6: 4.17 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:57] CPU #7: 4.17 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:57] Total: 23.94 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:21:57] CPU #5: 4.32 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:02] Total: 23.94 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:07] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:07] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:07] CPU #1: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:07] CPU #3: 1.76 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:07] CPU #4: 4.27 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:07] CPU #6: 4.17 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:07] CPU #7: 4.17 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:07] Total: 23.94 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:07] CPU #5: 4.32 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:12] Total: 23.92 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:17] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:17] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:17] CPU #1: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:17] CPU #3: 1.76 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:17] CPU #4: 4.27 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:17] CPU #6: 4.17 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:17] CPU #5: 4.31 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:17] CPU #7: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:17] Total: 23.93 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:22] Total: 23.93 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:27] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:27] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:27] CPU #1: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:27] CPU #3: 1.76 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:27] CPU #4: 4.27 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:27] CPU #6: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:27] CPU #5: 4.31 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:27] CPU #7: 4.15 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:27] Total: 23.90 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:32] Total: 23.92 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:37] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:37] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:37] CPU #1: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:37] CPU #3: 1.76 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:37] CPU #4: 4.25 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:37] CPU #6: 4.17 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:37] CPU #7: 4.17 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:37] Total: 23.85 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:37] CPU #5: 4.25 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:42] Total: 23.92 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:47] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:47] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:47] CPU #1: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:47] CPU #3: 1.76 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:47] CPU #4: 4.27 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:47] CPU #6: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:47] CPU #5: 4.31 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:47] CPU #7: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:47] Total: 23.92 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:52] Total: 23.93 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:57] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:57] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:57] CPU #1: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:57] CPU #3: 1.76 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:57] CPU #4: 4.27 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:57] CPU #6: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:57] CPU #5: 4.31 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:57] CPU #7: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:22:57] Total: 23.92 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:02] Total: 23.93 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:07] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:07] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:07] CPU #1: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:07] CPU #3: 1.76 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:07] CPU #4: 4.27 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:07] CPU #6: 4.17 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:07] CPU #5: 4.31 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:07] CPU #7: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:07] Total: 23.92 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:12] Total: 23.88 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:17] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:17] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:17] CPU #1: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:17] CPU #3: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:17] CPU #4: 4.27 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:17] CPU #6: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:17] CPU #5: 4.31 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:17] CPU #7: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:17] Total: 23.92 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:22] Total: 23.92 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:27] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:27] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:27] CPU #1: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:27] CPU #3: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:27] CPU #4: 4.27 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:27] CPU #6: 4.17 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:27] CPU #5: 4.31 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:27] CPU #7: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:27] Total: 23.92 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:32] Total: 23.92 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:37] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:37] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:37] CPU #1: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:37] CPU #3: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:37] CPU #4: 4.27 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:37] CPU #6: 4.17 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:37] CPU #5: 4.31 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:37] CPU #7: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:37] Total: 23.92 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:42] Total: 23.92 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:47] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:47] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:47] CPU #1: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:47] CPU #3: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:47] CPU #4: 4.27 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:47] CPU #6: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:47] CPU #5: 4.31 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:47] CPU #7: 4.17 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:47] Total: 23.92 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:52] Total: 23.92 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:57] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:57] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:57] CPU #1: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:57] CPU #3: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:57] CPU #4: 4.26 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:57] CPU #6: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:57] CPU #5: 4.31 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:57] CPU #7: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:23:57] Total: 23.89 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:02] Total: 23.91 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:07] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:07] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:07] CPU #1: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:07] CPU #3: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:07] CPU #4: 4.27 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:07] CPU #6: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:07] CPU #5: 4.31 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:07] CPU #7: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:07] Total: 23.91 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:12] Total: 23.89 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:17] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:17] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:17] CPU #1: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:17] CPU #3: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:17] CPU #4: 4.27 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:17] CPU #6: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:17] CPU #5: 4.31 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:17] CPU #7: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:17] Total: 23.90 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:22] Total: 23.90 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:27] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:27] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:27] CPU #1: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:27] CPU #3: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:27] CPU #4: 4.27 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:27] CPU #6: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:27] CPU #5: 4.31 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:27] CPU #7: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:27] Total: 23.90 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:32] Total: 23.91 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:37] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:37] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:37] CPU #1: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:37] CPU #3: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:37] CPU #4: 4.27 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:37] CPU #6: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:37] CPU #7: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:37] Total: 23.85 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:37] CPU #5: 4.25 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:42] Total: 23.83 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:47] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:47] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:47] CPU #1: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:47] CPU #3: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:47] CPU #4: 4.27 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:47] CPU #6: 4.15 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:47] CPU #5: 4.31 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:47] CPU #7: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:47] Total: 23.89 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:52] Total: 23.91 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:57] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:57] CPU #1: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:57] CPU #3: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:57] CPU #4: 4.27 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:57] CPU #6: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:57] CPU #5: 4.31 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:57] CPU #7: 4.16 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:57] Total: 23.90 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:24:58] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:25:02] Total: 23.90 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:25:06] CPU #0: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:25:07] CPU #2: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:25:07] CPU #1: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:25:07] CPU #3: 1.75 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[2024-01-16 23:25:07] CPU #4: 4.27 kH/s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Total Scores: 23.96,23.95,23.94,23.93,23.92,23.91,23.90,23.89,23.88,23.85,23.83&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;##########################################################################&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Testing maximum cpufreq again, still under full load. System health now:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Time cpu0/cpu4/cpu6 load %cpu %sys %usr %nice %io %irq Temp&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:24:42: 1800/2352/2256MHz 9.06 100% 0% 99% 0% 0% 0% 64.7°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Checking cpufreq OPP for cpu0-cpu3 (Cortex-A55):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 1800 Measured: 1767 (1767.742/1767.123/1766.880) (-1.8%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Checking cpufreq OPP for cpu4-cpu5 (Cortex-A76):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 2352 Measured: 2257 (2257.552/2256.976/2256.573) (-4.0%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Checking cpufreq OPP for cpu6-cpu7 (Cortex-A76):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Cpufreq OPP: 2256 Measured: 2200 (2200.810/2200.535/2200.205) (-2.5%)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;##########################################################################&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Hardware sensors:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;nvme-pci-0100&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Composite: +42.9 C (low = -0.1 C, high = +82.8 C)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;(crit = +83.8 C)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Sensor 1: +35.9 C (low = -273.1 C, high = +65261.8 C)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Sensor 2: +40.9 C (low = -273.1 C, high = +65261.8 C)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;npu_thermal-virtual-0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;temp1: +51.8 C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;center_thermal-virtual-0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;temp1: +51.8 C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;bigcore1_thermal-virtual-0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;temp1: +52.7 C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;soc_thermal-virtual-0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;temp1: +52.7 C (crit = +115.0 C)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tcpm_source_psy_6_0022-i2c-6-22&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;in0: 0.00 V (min = +0.00 V, max = +0.00 V)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;curr1: 0.00 A (max = +0.00 A)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;gpu_thermal-virtual-0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;temp1: +51.8 C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;littlecore_thermal-virtual-0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;temp1: +52.7 C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;bigcore0_thermal-virtual-0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;temp1: +51.8 C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;/dev/nvme0: 43°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;##########################################################################&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;DRAM clock transitions since last boot (3617430 ms ago):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;/sys/devices/platform/dmc/devfreq/dmc:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;From : To&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;: 528000000106800000015600000002112000000 time(ms)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;528000000: 0 0 0 13366 118320&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1068000000: 3 0 0 69 810&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1560000000: 0 0 0 0 0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;*2112000000: 13363 72 0 0 3495600&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Total transition : 26873&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;##########################################################################&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Thermal source: /sys/devices/virtual/thermal/thermal_zone0/ (soc-thermal)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;System health while running tinymembench:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Time cpu0/cpu4/cpu6 load %cpu %sys %usr %nice %io %irq Temp&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:07:18: 1800/2352/2256MHz 1.94 2% 0% 1% 0% 0% 0% 38.8°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:07:48: 1800/2352/2256MHz 1.96 12% 0% 12% 0% 0% 0% 41.6°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:08:18: 1800/2352/2256MHz 1.98 12% 0% 12% 0% 0% 0% 44.4°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:08:48: 1800/2352/2256MHz 1.99 12% 0% 12% 0% 0% 0% 47.2°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:09:19: 1800/2352/2256MHz 1.99 12% 0% 12% 0% 0% 0% 47.2°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:09:49: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 48.1°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;System health while running ramlat:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Time cpu0/cpu4/cpu6 load %cpu %sys %usr %nice %io %irq Temp&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:10:18: 1800/2352/2256MHz 2.00 2% 0% 2% 0% 0% 0% 46.2°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:10:27: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 43.5°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:10:36: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 42.5°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:10:45: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 41.6°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:10:54: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 41.6°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:11:03: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 41.6°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:11:12: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 41.6°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:11:21: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 40.7°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:11:30: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 40.7°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:11:39: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 41.6°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;System health while running OpenSSL benchmark:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Time cpu0/cpu4/cpu6 load %cpu %sys %usr %nice %io %irq Temp&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:11:49: 1800/2352/2256MHz 2.00 3% 0% 2% 0% 0% 0% 42.5°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:12:05: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 40.7°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:12:21: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 40.7°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:12:37: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 41.6°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:12:53: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 40.7°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:13:09: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 40.7°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:13:25: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 41.6°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:13:41: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 39.8°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:13:57: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 40.7°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:14:13: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 41.6°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:14:29: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 41.6°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;System health while running 7-zip single core benchmark:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Time cpu0/cpu4/cpu6 load %cpu %sys %usr %nice %io %irq Temp&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:14:31: 1800/2352/2256MHz 2.00 3% 0% 3% 0% 0% 0% 41.6°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:14:39: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 40.7°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:14:47: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 39.8°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:14:55: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 39.8°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:15:03: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 39.8°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:15:11: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 39.8°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:15:19: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 39.8°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:15:27: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 39.8°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:15:35: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 39.8°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:15:43: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 39.8°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:15:51: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 39.8°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:15:59: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 38.8°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:16:07: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 40.7°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:16:15: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 40.7°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:16:24: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 41.6°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:16:32: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 41.6°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:16:40: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 41.6°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:16:48: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 42.5°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:16:56: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 42.5°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:17:04: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 41.6°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:17:12: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 42.5°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:17:20: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 42.5°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:17:28: 1800/2352/2256MHz 2.00 12% 0% 12% 0% 0% 0% 42.5°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;System health while running 7-zip multi core benchmark:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Time cpu0/cpu4/cpu6 load %cpu %sys %usr %nice %io %irq Temp&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:17:35: 1800/2352/2256MHz 2.00 4% 0% 3% 0% 0% 0% 48.1°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:17:45: 1800/2352/2256MHz 2.56 80% 0% 79% 0% 0% 0% 49.9°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:17:55: 1800/2352/2256MHz 3.70 86% 0% 86% 0% 0% 0% 51.8°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:18:05: 1800/2352/2256MHz 4.74 92% 1% 90% 0% 0% 0% 56.4°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:18:15: 1800/2352/2256MHz 5.18 78% 1% 76% 0% 0% 0% 56.4°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:18:25: 1800/2352/2256MHz 5.84 85% 1% 84% 0% 0% 0% 57.3°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:18:35: 1800/2352/2256MHz 6.33 88% 0% 87% 0% 0% 0% 56.4°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:18:45: 1800/2352/2256MHz 6.81 85% 0% 84% 0% 0% 0% 56.4°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:18:56: 1800/2352/2256MHz 6.63 89% 1% 87% 0% 0% 0% 60.1°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:19:06: 1800/2352/2256MHz 6.85 78% 1% 76% 0% 0% 0% 59.2°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:19:16: 1800/2352/2256MHz 7.62 82% 1% 81% 0% 0% 0% 57.3°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:19:26: 1800/2352/2256MHz 7.51 90% 0% 89% 0% 0% 0% 57.3°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:19:37: 1800/2352/2256MHz 7.42 86% 0% 85% 0% 0% 0% 58.2°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:19:48: 1800/2352/2256MHz 7.74 88% 1% 86% 0% 0% 0% 61.0°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:19:58: 1800/2352/2256MHz 8.08 78% 2% 76% 0% 0% 0% 60.1°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;System health while running cpuminer:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Time cpu0/cpu4/cpu6 load %cpu %sys %usr %nice %io %irq Temp&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:20:16: 1800/2352/2256MHz 7.90 8% 0% 7% 0% 0% 0% 61.0°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:21:00: 1800/2352/2256MHz 8.52 100% 0% 99% 0% 0% 0% 61.9°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:21:44: 1800/2352/2256MHz 8.82 99% 0% 99% 0% 0% 0% 62.8°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:22:28: 1800/2352/2256MHz 8.96 100% 0% 99% 0% 0% 0% 63.8°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:23:13: 1800/2352/2256MHz 9.02 100% 0% 99% 0% 0% 0% 63.8°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:23:57: 1800/2352/2256MHz 9.05 100% 0% 99% 0% 0% 0% 64.7°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;23:24:42: 1800/2352/2256MHz 9.06 100% 0% 99% 0% 0% 0% 64.7°C&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;##########################################################################&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;dmesg output while running the benchmarks:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[ 3188.850626] perf: interrupt took too long (2516 &gt; 2500), lowering kernel.perf_event_max_sample_rate to 79200&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[ 3249.330530] perf: interrupt took too long (3150 &gt; 3145), lowering kernel.perf_event_max_sample_rate to 63300&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;##########################################################################&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Linux 5.10.160-rockchip (op) 2024年01月16日 _aarch64_ (8 CPU)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;avg-cpu: %user %nice %system %iowait %steal %idle&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;15.12 0.04 0.50 0.02 0.00 84.31&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Device tps kB_read/s kB_wrtn/s kB_dscd/s kB_read kB_wrtn kB_dscd&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mmcblk0 9.47 255.86 244.85 0.00 925573 885730 0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;nvme0n1 0.07 1.59 0.00 0.00 5760 0 0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;total used free shared buff/cache available&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Mem: 15Gi 918Mi 14Gi 8.0Mi 340Mi 14Gi&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Swap: 11Gi 0B 11Gi&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Filename Type Size Used Priority&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;/swapfile file 12582908 0 -2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;CPU sysfs topology (clusters, cpufreq members, clockspeeds)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpufreq min max&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;CPU cluster policy speed speed core type&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;0 0 0 408 1800 Cortex-A55 / r2p0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1 0 0 408 1800 Cortex-A55 / r2p0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2 0 0 408 1800 Cortex-A55 / r2p0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;3 0 0 408 1800 Cortex-A55 / r2p0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;4 1 4 408 2352 Cortex-A76 / r4p0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;5 1 4 408 2352 Cortex-A76 / r4p0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;6 2 6 408 2256 Cortex-A76 / r4p0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;7 2 6 408 2256 Cortex-A76 / r4p0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Architecture: aarch64&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;CPU op-mode(s): 32-bit, 64-bit&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Byte Order: Little Endian&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;CPU(s): 8&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;On-line CPU(s) list: 0-7&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Vendor ID: ARM&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Model name: Cortex-A55&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Model: 0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Thread(s) per core: 1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Core(s) per socket: 4&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Socket(s): 1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Stepping: r2p0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;CPU max MHz: 1800.0000&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;CPU min MHz: 408.0000&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;BogoMIPS: 48.00&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Model name: Cortex-A76&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Model: 0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Thread(s) per core: 1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Core(s) per socket: 2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Socket(s): 2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Stepping: r4p0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;CPU max MHz: 2352.0000&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;CPU min MHz: 408.0000&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;BogoMIPS: 48.00&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;L1d cache: 384 KiB (8 instances)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;L1i cache: 384 KiB (8 instances)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;L2 cache: 2.5 MiB (8 instances)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;L3 cache: 3 MiB (1 instance)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Vulnerability Itlb multihit: Not affected&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Vulnerability L1tf: Not affected&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Vulnerability Mds: Not affected&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Vulnerability Meltdown: Not affected&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Vulnerability Mmio stale data: Not affected&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Vulnerability Retbleed: Not affected&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Vulnerability Spectre v1: Mitigation; __user pointer sanitization&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Vulnerability Spectre v2: Vulnerable: Unprivileged eBPF enabled&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Vulnerability Srbds: Not affected&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Vulnerability Tsx async abort: Not affected&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;SoC guess: Rockchip RK3588 (35881000)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;DMC gov: performance (2112 MHz)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;DT compat: rockchip,rk3588-orangepi-5-plus&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rockchip,rk3588&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Compiler: /usr/bin/gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 / aarch64-linux-gnu&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Userland: arm64&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Kernel: 5.10.160-rockchip/aarch64&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;CONFIG_HZ=300&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;CONFIG_HZ_300=y&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;CONFIG_PREEMPT_NOTIFIERS=y&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;CONFIG_PREEMPT_VOLUNTARY=y&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu cpu0: leakage=13&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu cpu0: pvtm=1438&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu cpu0: pvtm-volt-sel=2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu cpu4: leakage=10&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu cpu4: pvtm=1673&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu cpu4: pvtm-volt-sel=3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu cpu6: leakage=11&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu cpu6: pvtm=1694&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu cpu6: pvtm-volt-sel=4&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mali fb000000.gpu: leakage=19&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rockchip-dmc dmc: leakage=39&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rockchip-dmc dmc: leakage-volt-sel=1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;RKNPU fdab0000.npu: leakage=10&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;##########################################################################&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Kernel 5.10.160 is not latest 5.10.208 LTS that was released on 2024-01-15.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;See https://endoflife.date/linux for details. It is somewhat likely that some&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;exploitable vulnerabilities exist for this kernel as well as many unfixed bugs.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;But this version string doesn&apos;t matter since this is not an official LTS Linux&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;from kernel.org. This device runs a Rockchip vendor/BSP kernel.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;This kernel is based on a mixture of Android GKI and other sources. Also some&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;community attempts to do version string cosmetics might have happened, see&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;https://tinyurl.com/2p8fuubd for example. To examine how far away this 5.10.160&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;is from an official LTS of same version someone would have to reapply Rockchip&apos;s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;thousands of patches to a clean 5.10.160 LTS.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;##########################################################################&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu0/index0: 32K, level: 1, type: Data&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu0/index1: 32K, level: 1, type: Instruction&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu0/index2: 128K, level: 2, type: Unified&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu0/index3: 3072K, level: 3, type: Unified&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu1/index0: 32K, level: 1, type: Data&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu1/index1: 32K, level: 1, type: Instruction&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu1/index2: 128K, level: 2, type: Unified&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu1/index3: 3072K, level: 3, type: Unified&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu2/index0: 32K, level: 1, type: Data&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu2/index1: 32K, level: 1, type: Instruction&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu2/index2: 128K, level: 2, type: Unified&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu2/index3: 3072K, level: 3, type: Unified&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu3/index0: 32K, level: 1, type: Data&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu3/index1: 32K, level: 1, type: Instruction&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu3/index2: 128K, level: 2, type: Unified&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu3/index3: 3072K, level: 3, type: Unified&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu4/index0: 64K, level: 1, type: Data&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu4/index1: 64K, level: 1, type: Instruction&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu4/index2: 512K, level: 2, type: Unified&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu4/index3: 3072K, level: 3, type: Unified&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu5/index0: 64K, level: 1, type: Data&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu5/index1: 64K, level: 1, type: Instruction&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu5/index2: 512K, level: 2, type: Unified&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu5/index3: 3072K, level: 3, type: Unified&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu6/index0: 64K, level: 1, type: Data&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu6/index1: 64K, level: 1, type: Instruction&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu6/index2: 512K, level: 2, type: Unified&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu6/index3: 3072K, level: 3, type: Unified&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu7/index0: 64K, level: 1, type: Data&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu7/index1: 64K, level: 1, type: Instruction&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu7/index2: 512K, level: 2, type: Unified&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cpu7/index3: 3072K, level: 3, type: Unified&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;##########################################################################&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;vdd_cpu_big0_s0: 1000 mV (1050 mV max)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;vdd_cpu_big1_s0: 1000 mV (1050 mV max)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;vdd_npu_s0: 812 mV (950 mV max)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cluster0-opp-table:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;408 MHz 675.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;408 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;600 MHz 675.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;600 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;816 MHz 675.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;816 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1008 MHz 675.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1008 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1200 MHz 712.5 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1200 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1296 MHz 750.0 mV (0004 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1416 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1416 MHz 762.5 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1608 MHz 850.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1608 MHz 887.5 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1704 MHz 937.5 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1800 MHz 950.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cluster1-opp-table:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;408 MHz 675.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;408 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;600 MHz 675.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;600 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;816 MHz 675.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;816 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1008 MHz 675.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1008 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1200 MHz 675.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1200 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1416 MHz 725.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1416 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1608 MHz 762.5 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1608 MHz 787.5 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1800 MHz 850.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1800 MHz 875.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2016 MHz 925.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2016 MHz 950.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2208 MHz 987.5 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2256 MHz 1000.0 mV (00f9 0013)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2304 MHz 1000.0 mV (00f9 0024)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2352 MHz 1000.0 mV (00f9 0048)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2400 MHz 1000.0 mV (00f9 0080)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cluster2-opp-table:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;408 MHz 675.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;408 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;600 MHz 675.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;600 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;816 MHz 675.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;816 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1008 MHz 675.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1008 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1200 MHz 675.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1200 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1416 MHz 725.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1416 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1608 MHz 762.5 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1608 MHz 787.5 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1800 MHz 850.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1800 MHz 875.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2016 MHz 925.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2016 MHz 950.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2208 MHz 987.5 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2256 MHz 1000.0 mV (00f9 0013)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2304 MHz 1000.0 mV (00f9 0024)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2352 MHz 1000.0 mV (00f9 0048)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2400 MHz 1000.0 mV (00f9 0080)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;dmc-opp-table:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;528 MHz 675.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;528 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1068 MHz 725.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1068 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1560 MHz 800.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1560 MHz 800.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2750 MHz 875.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2750 MHz 875.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;gpu-opp-table:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;300 MHz 675.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;300 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;400 MHz 675.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;400 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;500 MHz 675.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;500 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;600 MHz 675.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;600 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;700 MHz 700.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;700 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;800 MHz 750.0 mV (0002 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;800 MHz 750.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;850 MHz 787.5 mV (0004 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;900 MHz 800.0 mV (0002 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;900 MHz 800.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1000 MHz 850.0 mV (0002 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1000 MHz 850.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;npu-opp-table:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;300 MHz 700.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;300 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;400 MHz 700.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;400 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;500 MHz 700.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;500 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;600 MHz 700.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;600 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;700 MHz 700.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;700 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;800 MHz 750.0 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;800 MHz 750.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;900 MHz 800.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;950 MHz 837.5 mV (0006 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1000 MHz 850.0 mV (00f9 ffff)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;venc-opp-table:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;800 MHz 750.0 mV&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;##########################################################################&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Results validation:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;* Advertised vs. measured max CPU clockspeed: -3.0% before, -4.0% after -&gt; https://tinyurl.com/32w9rr94&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;* No swapping&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;* Background activity (%system) OK&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;* No throttling&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Status of performance related governors found below /sys (w/o cpufreq):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;* dmc: performance / 2112 MHz (rknpu_ondemand dmc_ondemand userspace powersave performance simple_ondemand / 528 1068 1560 2112)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;* fb000000.gpu: performance / 1000 MHz (rknpu_ondemand dmc_ondemand userspace powersave performance simple_ondemand / 300 400 500 600 700 800 900 1000)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;* fdab0000.npu: performance / 1000 MHz (rknpu_ondemand dmc_ondemand userspace powersave performance simple_ondemand / 300 400 500 600 700 800 900 1000)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Status of performance related policies found below /sys:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;* /sys/devices/platform/fb000000.gpu/power_policy: [coarse_demand] always_on&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;* /sys/module/pcie_aspm/parameters/policy: default [performance] powersave powersupersave&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;| Orange Pi 5 Plus | ~2220 | 5.10 | Ubuntu 22.04.3 LTS arm64 | 16390 | 3117 | 1296400 | 12550 | 29740 | 23.95 | |&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>Wordpress，您好！</title>
  <link href="https://www.ioioi.cn/posts/hello-world/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/hello-world/</id>
  <published>2024-04-01T12:45:55.000Z</published>
  <updated>2024-04-04T07:28:00.000Z</updated>
  <summary type="html">&lt;p&gt;博客从Typecho切换到Wordpress，这是我用Wordpress写的第一篇文章。&lt;/p&gt;
&lt;p&gt;博客最开始使用Typecho使用Handsome主题，然后觉得服务器维护太贵了，于是将数据库里面的文章全部导出为Markdown文档，使用Hexo进行写作，部署在阿里云/腾讯云的cos搭配CDN访问，降低价格，但是之后又发现这样维护很困难，有时候想写点什么都要重新部署然后上传文件，期间我也开发了两款Hexo插件，之后又换回去了Typecho，之后觉得Typecho不好用，文章的数据结构和附件混在一起，很混乱，同时又接触到了Laravel于是用Laravel自己写了一个博客，并且申请了软件著作权，之后觉得太丑了又没有用，然后又用回Typecho了，然后Typecho感觉不更新了，后台也不好看，写文章也不方便，于是现在尝试去使用Wordpress使用Argon主题。&lt;/p&gt;
&lt;p&gt;期间还尝试了很多博客，zblog，halo，hexo，firekylin，，等等都忘记了&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Xen虚拟化服务器升级到Debian12 Bookworm网卡名称被更改</title>
  <link href="https://www.ioioi.cn/posts/xen-virtualization-server-upgrade-to-debian12-bookworm-network-card-name-changed/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/xen-virtualization-server-upgrade-to-debian12-bookworm-network-card-name-changed/</id>
  <published>2024-04-01T07:58:00.000Z</published>
  <updated>2024-04-01T13:02:29.000Z</updated>
  <summary type="html">&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;eth0 -&gt; enX0&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/posts/xen-virtualization-server-upgrade-to-debian12-bookworm-network-card-name-changed/images/1471279108.png&quot; alt=&quot;issue.png&quot; title=&quot;issue.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/xen-tools/xen-tools/issues/65&quot;&gt;UnPredictableNetworkInterfaceNames ‘fun’ with Bookworm domU: eth0 -&gt; enX0 · Issue #65 · xen-tools/xen-tools (github.com)&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;</summary>
</entry>
<entry>
  <title>新版本Nginx Openresty 替换http2为http2 on</title>
  <link href="https://www.ioioi.cn/posts/the-new-version-of-nginx-openresty-replaces-htp2-with-htp2-on/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/the-new-version-of-nginx-openresty-replaces-htp2-with-htp2-on/</id>
  <published>2024-03-29T14:13:00.000Z</published>
  <updated>2024-04-01T14:52:48.000Z</updated>
  <summary type="html">&lt;p&gt;要在所有的 &lt;code&gt;.conf&lt;/code&gt; 文件中将 &lt;code&gt;listen 443 ssl http2;&lt;/code&gt; 替换为 &lt;code&gt;listen 443 ssl; http on;&lt;/code&gt;，你可以使用 &lt;code&gt;sed&lt;/code&gt; 命令。&lt;code&gt;sed&lt;/code&gt; 是一个流编辑器，用于对输入流（或文件）进行基本的文本转换。&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/the-new-version-of-nginx-openresty-replaces-htp2-with-htp2-on/images/2246283716.png&quot; alt=&quot;image.png&quot; title=&quot;image.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;下面是一个简单的命令，它会递归地搜索当前目录及其子目录中的所有 &lt;code&gt;.conf&lt;/code&gt; 文件，并替换指定的文本：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;find . -type f -name &quot;*.conf&quot; -exec sed -i &apos;s/listen 443 ssl http2;/listen 443 ssl;\n\thttp2 on;/g&apos; {} +&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;这个命令的解释如下：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;find . -type f -name &quot;*.conf&quot;&lt;/code&gt;：查找当前目录及其子目录中所有的 &lt;code&gt;.conf&lt;/code&gt; 文件。&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-exec ... {} +&lt;/code&gt;：对找到的每个文件执行指定的命令。&lt;code&gt;{}&lt;/code&gt; 是一个占位符，代表当前正在处理的文件名。&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sed -i &apos;s/原字符串/新字符串/g&apos;&lt;/code&gt;：使用 &lt;code&gt;sed&lt;/code&gt; 进行文本替换。&lt;code&gt;-i&lt;/code&gt; 选项表示直接修改文件内容，而不是输出到标准输出。&lt;code&gt;s/原字符串/新字符串/g&lt;/code&gt; 是替换命令，其中 &lt;code&gt;g&lt;/code&gt; 表示全局替换（即替换每一行中的所有匹配项）。&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;注意：这个命令假设你的 &lt;code&gt;sed&lt;/code&gt; 版本支持 &lt;code&gt;-i&lt;/code&gt; 选项的扩展用法（即使用 &lt;code&gt;{} +&lt;/code&gt; 来一次性处理多个文件）。在某些系统上，你可能需要为 &lt;code&gt;-i&lt;/code&gt; 选项提供一个备份文件扩展名，例如 &lt;code&gt;-i.bak&lt;/code&gt;，这样 &lt;code&gt;sed&lt;/code&gt; 会在修改文件之前创建一个备份。&lt;/p&gt;
&lt;p&gt;另外，这个命令将 &lt;code&gt;http2 on;&lt;/code&gt; 添加到新的一行，并添加了一个制表符（&lt;code&gt;\t&lt;/code&gt;）进行缩进。如果你需要不同的缩进或格式，可以相应地调整 &lt;code&gt;sed&lt;/code&gt; 命令中的字符串。&lt;/p&gt;
&lt;p&gt;在执行这个命令之前，建议先备份你的 &lt;code&gt;.conf&lt;/code&gt; 文件，以防万一出现不可预见的问题。&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Postfix配置多用户中继服务器</title>
  <link href="https://www.ioioi.cn/posts/postfix-configuration-relay-server/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/postfix-configuration-relay-server/</id>
  <published>2024-03-26T14:03:00.000Z</published>
  <updated>2024-04-01T14:53:43.000Z</updated>
  <summary type="html">&lt;p&gt;你&lt;/p&gt;
&lt;p&gt;Postfix设置邮件中继：设置使用同一个relay smtp.a.com，&lt;a href=&quot;mailto:user1@c.com&quot;&gt;user1@c.com&lt;/a&gt;使用&lt;a href=&quot;mailto:a@a.com&quot;&gt;a@a.com&lt;/a&gt; 密码为123456邮件账户，&lt;a href=&quot;mailto:user2@c.com&quot;&gt;user2@c.com&lt;/a&gt;使用&lt;a href=&quot;mailto:b@a.com&quot;&gt;b@a.com&lt;/a&gt;密码为123456邮件账户&lt;/p&gt;
&lt;p&gt;To set up Postfix to use the same relay server smtp.a.com for both &lt;a href=&quot;mailto:user1@c.com&quot;&gt;user1@c.com&lt;/a&gt; and &lt;a href=&quot;mailto:user2@c.com&quot;&gt;user2@c.com&lt;/a&gt; with different credentials, you can follow these steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Edit the Postfix main configuration file. This file is usually located at &lt;code&gt;/etc/postfix/main.cf&lt;/code&gt;. Open it in a text editor.&lt;/li&gt;
&lt;li&gt;Find or add the following configuration options to configure the relay server and authentication:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;relayhost = smtp.a.com&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;smtp_sasl_auth_enable = yes&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;smtp_sasl_security_options = noanonymous&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;smtp_use_tls = yes&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;Create the &lt;code&gt;/etc/postfix/sasl_passwd&lt;/code&gt; file if it doesn’t exist, and add the following lines:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;smtp.a.com user1@c.com:a@a.com:123456&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;smtp.a.com user2@c.com:b@a.com:123456&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Replace &lt;code&gt;a@a.com&lt;/code&gt; with the username for &lt;a href=&quot;mailto:user1@c.com&quot;&gt;user1@c.com&lt;/a&gt;, &lt;code&gt;b@a.com&lt;/code&gt; with the username for &lt;a href=&quot;mailto:user2@c.com&quot;&gt;user2@c.com&lt;/a&gt;, and &lt;code&gt;123456&lt;/code&gt; with the corresponding passwords.&lt;/p&gt;
&lt;ol start=&quot;4&quot;&gt;
&lt;li&gt;Run the following command to generate the hash database for the &lt;code&gt;sasl_passwd&lt;/code&gt; file:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo postmap /etc/postfix/sasl_passwd&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ol start=&quot;5&quot;&gt;
&lt;li&gt;Reload or restart the Postfix service to apply the changes:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo systemctl reload postfix&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;With these configurations, Postfix should now relay emails for &lt;a href=&quot;mailto:user1@c.com&quot;&gt;user1@c.com&lt;/a&gt; using the credentials &lt;code&gt;a@a.com&lt;/code&gt; and the password &lt;code&gt;123456&lt;/code&gt;, and for &lt;a href=&quot;mailto:user2@c.com&quot;&gt;user2@c.com&lt;/a&gt; using the credentials &lt;code&gt;b@a.com&lt;/code&gt; and the password &lt;code&gt;123456&lt;/code&gt;.&lt;/p&gt;</summary>
</entry>
<entry>
  <title>MailCow添加Catch-All捕获所有邮件</title>
  <link href="https://www.ioioi.cn/posts/mailcow-adds-catch-all-to-capture-all-emails/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/mailcow-adds-catch-all-to-capture-all-emails/</id>
  <published>2024-03-21T12:33:00.000Z</published>
  <updated>2024-03-21T12:33:00.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;img src=&quot;/posts/mailcow-adds-catch-all-to-capture-all-emails/images/2392666408.png&quot; alt=&quot;image.png&quot; title=&quot;image.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;在MailCow中，没有在哪里有明确写Catch-All设置，于是我翻阅了&lt;a href=&quot;https://github.com/mailcow/mailcow-dockerized/issues/4563&quot;&gt;Receive mails on a default email if recipient doesn’t exist · Issue #4563 · mailcow/mailcow-dockerized (github.com)&lt;/a&gt;发现了&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/mailcow-adds-catch-all-to-capture-all-emails/images/258496551.png&quot; alt=&quot;image.png&quot; title=&quot;image.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;翻译过来就是在右上角E-mail中的别名选项进行设置&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/mailcow-adds-catch-all-to-capture-all-emails/images/3420299405.png&quot; alt=&quot;image.png&quot; title=&quot;image.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;添加@ioioi.cn，并设置一个邮箱进行发送，即可&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Nextcloud去除分享页面中的&quot;获取自己的免费账号&quot;</title>
  <link href="https://www.ioioi.cn/posts/nextcloud-removes-the-phrase-get-your-own-free-account-from-the-sharing-page/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/nextcloud-removes-the-phrase-get-your-own-free-account-from-the-sharing-page/</id>
  <published>2024-03-20T20:31:51.000Z</published>
  <updated>2024-04-01T14:53:58.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;img src=&quot;/posts/nextcloud-removes-the-phrase-get-your-own-free-account-from-the-sharing-page/images/1870012280.png&quot; alt=&quot;显示.png&quot; title=&quot;显示.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;解决方法：&lt;/p&gt;
&lt;p&gt;在配置文件中添加&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&apos;simpleSignUpLink.shown&apos; =&gt; false,&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;之后这句话就被隐藏了&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/nextcloud-removes-the-phrase-get-your-own-free-account-from-the-sharing-page/images/387706068.png&quot; alt=&quot;隐藏.png&quot; title=&quot;隐藏.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Nginx配置deny和allow ip还是被进行访问allow不生效的问题</title>
  <link href="https://www.ioioi.cn/posts/the-issue-of-nginx-configuring-deny-and-allow-ip-addresses-being-accessed-and-allowing-not-taking-effect/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/the-issue-of-nginx-configuring-deny-and-allow-ip-addresses-being-accessed-and-allowing-not-taking-effect/</id>
  <published>2024-03-08T16:28:00.000Z</published>
  <updated>2024-04-01T14:54:20.000Z</updated>
  <summary type="html">&lt;p&gt;Nginx 设置 allow deny ip的时候遇到了执行顺序的问题&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;deny all&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;allow the_ip&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;保存上面的配置问候后，会发现不管如何访问都会403禁止访问&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;allow the_ip&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;deny all&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;只有当它们的顺序更换过来之后才正常&lt;/p&gt;
&lt;p&gt;经过查阅Nginx相关资料，发现他对ip的匹配是：依次检查规则，直到找到第一个匹配项，所以all中间已经包含我的ip了，于是它就直接禁止，不进行下面的操作，跟一般的配置文件不太一样，一般的配置文件是后面的配置会覆盖前面的配置，所以在编辑Nginx配置文件的时候需要注意&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/the-issue-of-nginx-configuring-deny-and-allow-ip-addresses-being-accessed-and-allowing-not-taking-effect/images/713089937.png&quot; alt=&quot;image.png&quot; title=&quot;image.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Home Assistant 配置反向代理提示 400: Bad Request</title>
  <link href="https://www.ioioi.cn/posts/home-assistant-configuration-reverse-proxy-prompt-400-bad-request/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/home-assistant-configuration-reverse-proxy-prompt-400-bad-request/</id>
  <published>2024-02-27T16:43:00.000Z</published>
  <updated>2024-04-01T14:55:35.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;img src=&quot;/posts/home-assistant-configuration-reverse-proxy-prompt-400-bad-request/images/2087435814.png&quot; alt=&quot;image.png&quot; title=&quot;image.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.home-assistant.io/integrations/http/&quot;&gt;https://www.home-assistant.io/integrations/http/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;就是要在configuration.yaml加入以下代码&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;http:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  use_x_forwarded_for: true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  trusted_proxies:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    - 172.30.33.0/24  # Add the IP address of the proxy server&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;复制代码&lt;/p&gt;
&lt;p&gt;加完之后重启，问题解决。&lt;/p&gt;</summary>
</entry>
<entry>
  <title>修改service文件中pip源以解决Home-Assistant初始化慢的问题</title>
  <link href="https://www.ioioi.cn/posts/modify-the-pip-source-in-the-service-file-to-solve-the-problem-of-slow-home-assistant-initialization/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/modify-the-pip-source-in-the-service-file-to-solve-the-problem-of-slow-home-assistant-initialization/</id>
  <published>2024-02-27T12:01:17.000Z</published>
  <updated>2024-04-01T14:55:10.000Z</updated>
  <summary type="html">&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo systemctl edit home-assistant.service&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;添加&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[Service]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Environment=&quot;HOME=/var/lib/hass&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Environment=&quot;PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;保存后重启生效&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/modify-the-pip-source-in-the-service-file-to-solve-the-problem-of-slow-home-assistant-initialization/images/394564194.png&quot; alt=&quot;成品.png&quot; title=&quot;成品.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>云服务器安装Arch Linux</title>
  <link href="https://www.ioioi.cn/posts/cloud-server-installation-arch-linux/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/cloud-server-installation-arch-linux/</id>
  <published>2024-02-21T20:01:00.000Z</published>
  <updated>2024-04-01T14:55:50.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;a href=&quot;https://senge.dev/index.php/arch-ecs/&quot;&gt;云服务器安装Arch Linux – 森哥Dev (senge.dev)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;云服务器厂商几乎不会提供Arch Linux系统的实例，需要按照以下安装教程自行安装&lt;br&gt;
对服务器Linux发行版没有特别要求，但是不允许是Windows Server系统，如果是Windows，请自行重装为任意Linux发行版（建议Ubuntu或CentOS）&lt;br&gt;
安装前请知道如何使用SSH连接，否则自行搜索&lt;br&gt;
确保你在实体机或虚拟机中安装过Arch Linux，否则请勿安装&lt;br&gt;
如果想把自己的服务器换成Arch，安装前请务必备份服务器的所有数据&lt;br&gt;
服务器的运行内存必须在2GiB及以上，否则您只能使用vps2arch命令安装&lt;br&gt;
安装后服务器将会变得不稳定，仅限学习交流使用，不建议将服务器运用在生产力环境中&lt;br&gt;
安装完成后控制台界面会显示服务器系统为以前的系统，但是实际你的云服务器系统已经变成了Arch Linux&lt;br&gt;
本教程不适用于虚拟主机，如果您正在使用虚拟主机，请勿参考本教程&lt;br&gt;
由于以下原因造成的任何后果，本人不承担任何责任&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;如果你同意以上条款，请按照下方的步骤开始安装&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&quot;检查服务器的内存和存储空间&quot;&gt;检查服务器的内存和存储空间&lt;/h2&gt;
&lt;h3 id=&quot;输入以下命令检查服务器的硬盘和存储空间剩余大小&quot;&gt;输入以下命令检查服务器的硬盘和存储空间剩余大小&lt;/h3&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;df -h&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;运行后的效果如下所示，确保根分区剩余空间大于3G且磁盘大小大于等于20G，否则请勿安装&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Filesystem      Size  Used Avail Use% Mounted onudev            965M     0  965M   0% /devtmpfs           200M  8.9M  191M   5% /run/dev/vda1        40G   16G   22G  42% /tmpfs           997M   88K  997M   1% /dev/shmtmpfs           5.0M  4.0K  5.0M   1% /run/locktmpfs           997M     0  997M   0% /sys/fs/cgrouptmpfs           200M     0  200M   0% /run/user/0&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;输入以下命令检查服务器的内存&quot;&gt;输入以下命令检查服务器的内存&lt;/h3&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;free -h&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;运行后的效果如下所示，确保内存大小至少为2G（不包括交换分区/虚拟内存），否则请勿安装&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;total        used        free      shared  buff/cache   availableMem:           1.9G        683M        269M         36M        1.0G        1.1GSwap:          1.0G        138M        886M&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;下载并初始化archlinux安装环境&quot;&gt;下载并初始化ArchLinux安装环境&lt;/h2&gt;
&lt;h3 id=&quot;根据服务器所在地初始化&quot;&gt;根据服务器所在地初始化&lt;/h3&gt;
&lt;p&gt;根据服务器的地理位置选择合适的镜像站，请勿盲目选择清华/中科大源，假设你选择的镜像站点为&lt;code&gt;https://mirror.xtom.com.hk&lt;/code&gt;，则你需要在该网站下载以下文件：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;archlinux-x86_64.iso&lt;/li&gt;
&lt;li&gt;archlinux-x86_64.iso.sig&lt;/li&gt;
&lt;li&gt;sha256sums.txt&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;下载命令如下所示&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;curl -O https://mirror.xtom.com.hk/archlinux/iso/latest/archlinux-x86_64.isocurl -O https://mirror.xtom.com.hk/archlinux/iso/latest/archlinux-x86_64.iso.sigcurl -O https://mirror.xtom.com.hk/archlinux/iso/latest/sha256sums.txt&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;如果你不想使用xtom下载，请将&lt;code&gt;https://mirror.xtom.com.hk&lt;/code&gt;换成你自己选择的镜像站点，如：&lt;code&gt;https://mirrors.aliyun.com&lt;/code&gt;，后面的无需更换，因为几乎所有的镜像站都是这个地址。&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;验证下载的镜像&quot;&gt;验证下载的镜像&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;sha256验证（必要）&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sha256sum -c sha256sums.txt&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;gpg验证（建议，更严格的文件完整性验证）&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;gpg --list-keysgpg --keyserver-options auto-key-retrieve --verify archlinux-x86_64.iso.sig&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;保证验证没问题后再安装系统&lt;/p&gt;
&lt;h3 id=&quot;挂载iso并复制到根目录&quot;&gt;挂载iso并复制到根目录&lt;/h3&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mount -o loop,ro archlinux-x86_64.iso /mntcp -r /mnt/* /umount /mnt/e2label /dev/vda1 archiso&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;进入vnc界面同时通过ssh重启服务器&quot;&gt;进入VNC界面，同时通过ssh重启服务器&lt;/h3&gt;
&lt;p&gt;根据服务商的不同，进入服务器的VNC界面，然后通过ssh重启服务器。&lt;/p&gt;
&lt;p&gt;重启后通过复制命令输入来向服务器输入命令（博主使用的是华为云的服务器）。&lt;/p&gt;
&lt;h3 id=&quot;配置grub进入archiso&quot;&gt;配置Grub，进入archiso&lt;/h3&gt;
&lt;p&gt;按C进入Grub命令行界面，然后根据以下命令查找archiso路径，并配置&lt;code&gt;initramfs&lt;/code&gt;、&lt;code&gt;linux&lt;/code&gt;内核等&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ls /     # 列出根目录的所有文件如果能看到arch，则可以继续安装&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;配置Linux内核&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;linux /arch/boot/x86_64/vmlinuz-linux archisobasedir=arch archisolabel=archiso copytoram&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;配置initramfs&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;initrd /arch/boot/x86_64/initramfs-linux.img&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;启动archiso&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;boot&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;如果你看到了Welcome to Arch Linux字样，那么恭喜你，你可以根据&lt;a href=&quot;https://wiki.archlinux.org/&quot;&gt;Arch Wiki&lt;/a&gt;或本博客的ArchLinux安装教程来继续安装Arch Linux了！&lt;/p&gt;
&lt;h2 id=&quot;开启sshd并使用计算机ssh连接&quot;&gt;开启sshd，并使用计算机ssh连接&lt;/h2&gt;
&lt;p&gt;开启sshd&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;systemctl start sshd&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;重置密码&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;passwd&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;使用实体计算机连接&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ssh root@ip&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;如果遇到连接失败，请先删除用户目录下的.ssh目录忘记连接，也可以使用XShell（Windows）或Final Shell客户端连接&lt;/p&gt;
&lt;h2 id=&quot;使用vps2arch一键安装&quot;&gt;使用vps2arch一键安装&lt;/h2&gt;
&lt;p&gt;部分VPS云服务器厂商只提供了ssh连接的入口，未提供vnc连接入口，这些云服务器厂商必须使用vps2arch来进行切换&lt;/p&gt;
&lt;p&gt;切换后，你的磁盘分区表不会被设置，如果你的服务器未使用uefi，你可以直接安装，如果使用了uefi，请谨慎使用该脚本。&lt;/p&gt;
&lt;p&gt;安装前务必备份你的所有重要数据，安装可能会导致系统无法启动&lt;/p&gt;
&lt;p&gt;运行以下命令一键安装&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;不要着急运行脚本，请先自行修改脚本，建议注释掉和reflector有关的代码，并添加一些你需要的软件包（例如：vim，git等）&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;wget https://felixc.at/vps2archchmod +x vps2arch&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;修改后，你可以进行安装，可能会报错&lt;/p&gt;
&lt;p&gt;如果你没有设置root密码，则密码会被更改为vps2arch，如果你已经设置了root密码，则你需要先尝试使用之前的root密码登陆，如果无法登陆，请使用vps2arch作为root密码登陆。&lt;/p&gt;</summary>
</entry>
<entry>
  <title>解决HE Tunnel Broker ipv6掉线问题</title>
  <link href="https://www.ioioi.cn/posts/resolve-he-tunnel-broker-ipv6-disconnection-issue/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/resolve-he-tunnel-broker-ipv6-disconnection-issue/</id>
  <published>2024-02-20T14:19:00.000Z</published>
  <updated>2024-02-20T14:19:00.000Z</updated>
  <summary type="html">&lt;h1 id=&quot;解决he-tunnel-broker-ipv6掉线问题&quot;&gt;解决HE Tunnel Broker ipv6掉线问题&lt;/h1&gt;
&lt;p&gt;使用IPV6隧道的时候遇到客户端ping的时候经常显示超时&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/resolve-he-tunnel-broker-ipv6-disconnection-issue/images/646990620.png&quot; alt=&quot;不正常.png&quot; title=&quot;不正常.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;当在服务器中ping其他地址之后又全部正常&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/resolve-he-tunnel-broker-ipv6-disconnection-issue/images/17851712.png&quot; alt=&quot;正常.png&quot; title=&quot;正常.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;ipv6掉线问题临时解决方案（已验证可行），添加一条定时任务，每分钟ping网关或者外部ipv6地址，&lt;/p&gt;
&lt;p&gt;懒人一键操作（这是一条命令，一次性执行）&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;(crontab -l 2&gt;/dev/null; echo &quot;# ipv6保活，建议不要删除&quot;; echo &quot;* * * * * /bin/ping -c 1 2400:3200::1&quot;) | crontab -&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;别忘了启动cron服务！！！&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;如果还不通可执行&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ip -6 neigh flush all&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;这时应该就恢复了，如果没恢复，重启一次服务器即可&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;参考： &lt;a href=&quot;https://bigchick.xyz/index.php/announcements/14/%E9%87%8D%E5%BA%86%E7%A7%BB%E5%8A%A8ipv6%E6%8E%89%E7%BA%BF%E9%97%AE%E9%A2%98%E9%80%9A%E7%9F%A5.html&quot;&gt;公告信息 - 鸡仔云 (bigchick.xyz)&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;</summary>
</entry>
<entry>
  <title>阿里云服务器完全卸载AliYun监控教程</title>
  <link href="https://www.ioioi.cn/posts/uninstalling-alibaba-cloud-monitoring/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/uninstalling-alibaba-cloud-monitoring/</id>
  <published>2024-02-20T04:39:00.000Z</published>
  <updated>2024-02-20T04:39:00.000Z</updated>
  <summary type="html">&lt;p&gt;卸载AliYunDun&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;wget http://update.aegis.aliyun.com/download/uninstall.sh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chmod +x uninstall.sh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;./uninstall.sh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;wget http://update.aegis.aliyun.com/download/quartz_uninstall.sh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chmod +x quartz_uninstall.sh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;./quartz_uninstall.sh&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;删除AliYunDun残留&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;pkill aliyun-service&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rm -fr /etc/init.d/agentwatch /usr/sbin/aliyun-service&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rm -rf /usr/local/aegis*&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>修改Docker-compose使Uptime-Kuma支持IPV6</title>
  <link href="https://www.ioioi.cn/posts/modify-docker-composite-to-enable-uptime-kuma-to-support-ipv6/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/modify-docker-composite-to-enable-uptime-kuma-to-support-ipv6/</id>
  <published>2024-02-19T09:20:00.000Z</published>
  <updated>2024-02-19T09:20:00.000Z</updated>
  <summary type="html">&lt;p&gt;之前部署了一个&lt;code&gt;Uptime-Kuma&lt;/code&gt;用来监控服务的运行，最近，在监控&lt;code&gt;IPV6&lt;/code&gt;网络的时候出现了一点问题，&lt;code&gt;Docker&lt;/code&gt;不支持&lt;code&gt;IPV6&lt;/code&gt;网络：&lt;br&gt;
&lt;img src=&quot;/posts/modify-docker-composite-to-enable-uptime-kuma-to-support-ipv6/images/642890527.png&quot; alt=&quot;Uptime-Kuma.png&quot; title=&quot;Uptime-Kuma.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;解决方案：&lt;/p&gt;
&lt;p&gt;修改&lt;code&gt;/etc/docker/daemon.json&lt;/code&gt;文件&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        &quot;experimental&quot;: true,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        &quot;fixed-cidr-v6&quot;: &quot;fd80::/64&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        &quot;ip6tables&quot;: true,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        &quot;ipv6&quot;: true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;修改&lt;code&gt;docker-compose.yml&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;version: &apos;3.8&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;services:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  uptime-kuma:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    image: louislam/uptime-kuma:1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    container_name: uptime-kuma&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    volumes:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      - ./uptime-kuma:/app/data&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      - /var/run/docker.sock:/var/run/docker.sock&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    ports:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      - &quot;25003:3001&quot;  # &amp;#x3C;Host Port&gt;:&amp;#x3C;Container Port&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    restart: always&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    networks:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      - uptime-kuma-network&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;networks:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  uptime-kuma-network:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    driver: bridge&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    enable_ipv6: true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    ipam:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      driver: default&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      config:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        - subnet: &quot;fd00:1234:5678::/64&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;重新新建了一个&lt;code&gt;IPV6&lt;/code&gt;的网络，这样就可以避免使用&lt;code&gt;host&lt;/code&gt;模式了&lt;/p&gt;
&lt;p&gt;在容器里面运行&lt;code&gt;ping&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/modify-docker-composite-to-enable-uptime-kuma-to-support-ipv6/images/2256779829.png&quot; alt=&quot;ping.png&quot; title=&quot;ping.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;成功！&lt;/p&gt;
&lt;p&gt;恢复Uptime-Kuma监控&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/modify-docker-composite-to-enable-uptime-kuma-to-support-ipv6/images/338553459.png&quot; alt=&quot;Uptime-Kuma.png&quot; title=&quot;Uptime-Kuma.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;成功！&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Archlinux ARM WARNING: errors were encountered during the build. The image may not be complete</title>
  <link href="https://www.ioioi.cn/posts/archlinux-arm-warning-errors-were-accounted-for-during-the-build-the-image-may-not-be-complete/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/archlinux-arm-warning-errors-were-accounted-for-during-the-build-the-image-may-not-be-complete/</id>
  <published>2024-02-18T09:09:34.000Z</published>
  <updated>2024-02-18T09:09:34.000Z</updated>
  <summary type="html">&lt;p&gt;Archlinux ARM更新内核时候出现问题，&lt;code&gt;mkinitcpio -P&lt;/code&gt;发现任然有这个问题&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;==&gt; Generating module dependencies&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;==&gt; Creating gzip-compressed initcpio image: &apos;/boot/initramfs-linux.img&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;==&gt; WARNING: errors were encountered during the build. The image may not be complete.`&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;把&lt;code&gt;/etc/mkinitcpio.conf&lt;/code&gt;改了就行，删掉&lt;code&gt;kms&lt;/code&gt;，就好了&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/archlinux-arm-warning-errors-were-accounted-for-during-the-build-the-image-may-not-be-complete/images/1065971925.png&quot; alt=&quot;image.png&quot; title=&quot;image.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#HOOKS=(base udev autodetect modconf kms keyboard keymap consolefont block filesystems fsck)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;HOOKS=(base udev autodetect modconf keyboard keymap consolefont block filesystems fsck)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;BUG:&lt;a href=&quot;https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/issues/218&quot;&gt;https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/issues/218&lt;/a&gt;&lt;br&gt;
mkinitcpio exits with 1 when using the kms hook on hardware without any privacy screens.&lt;/p&gt;</summary>
</entry>
<entry>
  <title>编译Mariadb11.2.2提示Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)</title>
  <link href="https://www.ioioi.cn/posts/compile-mariadb1122-prompt-could-not-find-curses-missing-curseslibrary-cursesincludepath/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/compile-mariadb1122-prompt-could-not-find-curses-missing-curseslibrary-cursesincludepath/</id>
  <published>2024-01-14T12:23:05.000Z</published>
  <updated>2024-01-14T12:23:05.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;img src=&quot;/posts/compile-mariadb1122-prompt-could-not-find-curses-missing-curseslibrary-cursesincludepath/images/1808644146.png&quot; alt=&quot;image.png&quot; title=&quot;image.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo apt install libncurses-dev&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>编译PHP8.3出现checking if iconv supports errno... no</title>
  <link href="https://www.ioioi.cn/posts/compiling-php-83-shows-checking-if-iconv-supports-errno-no/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/compiling-php-83-shows-checking-if-iconv-supports-errno-no/</id>
  <published>2024-01-14T11:31:14.000Z</published>
  <updated>2024-01-14T11:31:14.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;img src=&quot;/posts/compiling-php-83-shows-checking-if-iconv-supports-errno-no/images/3773253841.png&quot; alt=&quot;image.png&quot; title=&quot;image.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
原来的：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;./configure --enable-static&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;把原来的libiconv卸载并且重新设置成下面这样的新的参数&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;./configure --enable-static --prefix=/usr/local/libiconv&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;然后就可以正常编译PHP了&lt;br&gt;
&lt;img src=&quot;/posts/compiling-php-83-shows-checking-if-iconv-supports-errno-no/images/1389416387.png&quot; alt=&quot;image.png&quot; title=&quot;image.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>修复Windows11搜索框卡死问题/关闭Windows 11网络搜索</title>
  <link href="https://www.ioioi.cn/posts/fix-windows-11-search-box-stuck-issueturn-off-windows-11-network-search/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/fix-windows-11-search-box-stuck-issueturn-off-windows-11-network-search/</id>
  <published>2023-11-09T14:11:15.000Z</published>
  <updated>2023-11-09T14:11:15.000Z</updated>
  <summary type="html">&lt;p&gt;1.首先，我们在搜索框中输入注册表。在&lt;code&gt;Windows&lt;/code&gt;搜索结果中直接开启注册表功能;&lt;/p&gt;
&lt;p&gt;　　2.接着，我们在注册表中输入一下路径：&lt;code&gt;计算机\HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Explorer&lt;/code&gt;，然后我没们用右键单击&lt;code&gt;Windows&lt;/code&gt;选项，接着选中&lt;code&gt;新建&lt;/code&gt;选项;&lt;/p&gt;
&lt;p&gt;　　3.然后我们新建一个名为&lt;code&gt;Explorer&lt;/code&gt;的项，按下回车键确认;&lt;/p&gt;
&lt;p&gt;　　4.接下来我们右键新建立的&lt;code&gt;Explorer&lt;/code&gt;的项，再新建一个&lt;code&gt;DWORD(32位)&lt;/code&gt;值;&lt;/p&gt;
&lt;p&gt;　　5.然后我们再将新建的值命名为&lt;code&gt;DisableSearchBoxSuggestions&lt;/code&gt;，接着按下回车键。这时我们就可以控制是否开关网络搜索啦;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/fix-windows-11-search-box-stuck-issueturn-off-windows-11-network-search/images/1920549394.png&quot; alt=&quot;注册表.png&quot; title=&quot;注册表.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;　　6.到这时，我没如果要关闭Win11的网络搜索就很简单。双击刚才的DisableSearchBoxSuggestions值，然后将其赋值为“1”即可;&lt;/p&gt;
&lt;p&gt;　　7.接着保存注册表，重启电脑，这时候我们就会发现现在已经没有网络搜索的结果了。&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/fix-windows-11-search-box-stuck-issueturn-off-windows-11-network-search/images/301882950.png&quot; alt=&quot;关闭Windows 11网络搜索.png&quot; title=&quot;关闭Windows 11网络搜索.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;参考：&lt;a href=&quot;https://www.cnblogs.com/Akarinnnn/p/15999304.html&quot;&gt;!CNblogs Akarinnnn&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>使用nextcloud提示：数据库被用于事务文件锁。为了增强性能，请设置memcache</title>
  <link href="https://www.ioioi.cn/posts/use-nextcloud-prompt-the-database-is-used-for-transaction-file-locking-to-enhance-performance-please-set-memcache/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/use-nextcloud-prompt-the-database-is-used-for-transaction-file-locking-to-enhance-performance-please-set-memcache/</id>
  <published>2023-10-04T22:43:00.000Z</published>
  <updated>2024-04-01T14:56:19.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;img src=&quot;/posts/use-nextcloud-prompt-the-database-is-used-for-transaction-file-locking-to-enhance-performance-please-set-memcache/images/3211011175.png&quot; alt=&quot;图片.png&quot; title=&quot;图片.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;没有开启redis拓展&lt;/p&gt;
&lt;p&gt;Archlinux开启redis扩展需要同时开启igbinary拓展，不然会如下图报错，无法使用&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/use-nextcloud-prompt-the-database-is-used-for-transaction-file-locking-to-enhance-performance-please-set-memcache/images/1642853102.png&quot; alt=&quot;图片.png&quot; title=&quot;图片.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
&lt;img src=&quot;/posts/use-nextcloud-prompt-the-database-is-used-for-transaction-file-locking-to-enhance-performance-please-set-memcache/images/2303954090.png&quot; alt=&quot;图片.png&quot; title=&quot;图片.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Archlinux php -m 提示 redis undefined symbol: igbinary_serialize</title>
  <link href="https://www.ioioi.cn/posts/archlinux-php-m-prompt-redis-undefined-symbol-igbinary-serialize/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/archlinux-php-m-prompt-redis-undefined-symbol-igbinary-serialize/</id>
  <published>2023-10-04T14:45:00.000Z</published>
  <updated>2023-10-04T14:45:00.000Z</updated>
  <summary type="html">&lt;p&gt;Archlinux开启redis扩展需要同时开启igbinary拓展，不然会如下图报错，无法使用&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/archlinux-php-m-prompt-redis-undefined-symbol-igbinary-serialize/images/1642853102.png&quot; alt=&quot;图片.png&quot; title=&quot;图片.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/archlinux-php-m-prompt-redis-undefined-symbol-igbinary-serialize/images/2338968722.png&quot; alt=&quot;图片.png&quot; title=&quot;图片.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Nextcloud通过客户端DAV上传100M+大文件时报500错</title>
  <link href="https://www.ioioi.cn/posts/nextcloud-reported-500-errors-when-uploading-100m-large-files-through-client-dav/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/nextcloud-reported-500-errors-when-uploading-100m-large-files-through-client-dav/</id>
  <published>2023-10-01T22:06:00.000Z</published>
  <updated>2024-04-01T14:56:28.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;img src=&quot;/posts/nextcloud-reported-500-errors-when-uploading-100m-large-files-through-client-dav/images/3932751872.png&quot; alt=&quot;图片.png&quot; title=&quot;图片.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
&lt;img src=&quot;/posts/nextcloud-reported-500-errors-when-uploading-100m-large-files-through-client-dav/images/367754217.png&quot; alt=&quot;图片.png&quot; title=&quot;图片.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;一直更改php nginx上传文件大小限制、上传超时时间设置，但是改了也没有任何效果&lt;/p&gt;
&lt;p&gt;发现后台日志报错：&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Declaration of Aws\HashingStream::seek($offset, $whence = Aws\SEEK_SET) must be compatible with Psr\Http\Message\StreamInterface::seek(int $offset, int $whence = Psr\Http\Message\SEEK_SET): void at /data/wwwroot/cloud.ioioi.cn/nextcloud/3rdparty/aws/aws-sdk-php/src/HashingStream.php#50&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;/posts/nextcloud-reported-500-errors-when-uploading-100m-large-files-through-client-dav/images/3912679498.png&quot; alt=&quot;图片.png&quot; title=&quot;图片.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;通过Bing搜索，查询到&lt;a href=&quot;https://github.com/nextcloud/server/issues/39981&quot;&gt;nextcloud issues 39981&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;发现是&lt;code&gt;camerarawpreviews&lt;/code&gt;引起的，于是，禁用并卸载了此应用，后正常&lt;br&gt;
&lt;img src=&quot;/posts/nextcloud-reported-500-errors-when-uploading-100m-large-files-through-client-dav/images/1448585139.png&quot; alt=&quot;图片.png&quot; title=&quot;图片.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>使用uptime-kuma提示node-pre-gyp: Permission denied</title>
  <link href="https://www.ioioi.cn/posts/use-uptime-kuma-prompt-node-pre-gyp-permission-denied/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/use-uptime-kuma-prompt-node-pre-gyp-permission-denied/</id>
  <published>2023-10-01T17:03:29.000Z</published>
  <updated>2024-04-01T14:56:43.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;img src=&quot;/posts/use-uptime-kuma-prompt-node-pre-gyp-permission-denied/images/3124254821.png&quot; alt=&quot;图片.png&quot; title=&quot;图片.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;npm ERR! code 126&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;npm ERR! path /data/wwwroot/monitor.ioioi.cn/uptime-kuma/node_modules/@louislam/sqlite3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;npm ERR! command failed&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;npm ERR! command sh -c node-pre-gyp install --fallback-to-build&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;npm ERR! sh: line 1: /data/wwwroot/monitor.ioioi.cn/uptime-kuma/node_modules/.bin/node-pre-gyp: Permission denied&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;网上查找资料说是权限没有给够，于是使用root用户进行运行，发现还是会报错。还有的说要加&lt;code&gt;**--unsafe-perm ​**&lt;/code&gt;参数，发现加了之后还是报错&lt;br&gt;
&lt;img src=&quot;/posts/use-uptime-kuma-prompt-node-pre-gyp-permission-denied/images/3216426557.png&quot; alt=&quot;图片.png&quot; title=&quot;图片.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
全局安装 node-gyp 还是报错&lt;br&gt;
&lt;img src=&quot;/posts/use-uptime-kuma-prompt-node-pre-gyp-permission-denied/images/1311239012.png&quot; alt=&quot;图片.png&quot; title=&quot;图片.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;最后通过&lt;a href=&quot;https://github.com/louislam/uptime-kuma/issues/2606&quot;&gt;Uptime-kuma issues 2606&lt;/a&gt;，查询到可能是安装sqlite3的包的时候会出问题&lt;br&gt;
&lt;img src=&quot;/posts/use-uptime-kuma-prompt-node-pre-gyp-permission-denied/images/1692952660.png&quot; alt=&quot;sqlite3&quot; title=&quot;sqlite3&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
但是当时作者也没有给具体的解决方案&lt;br&gt;
&lt;img src=&quot;/posts/use-uptime-kuma-prompt-node-pre-gyp-permission-denied/images/2543700497.png&quot; alt=&quot;图片.png&quot; title=&quot;图片.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
之后我又通过查询，找到了其他的类似案例&lt;a href=&quot;https://github.com/jansmolders86/mediacenterjs/issues/191&quot;&gt;mediacenterjs issues 191 # npm install : “node-pre-gyp: Permission denied” and sqlite3&lt;/a&gt;&lt;br&gt;
其中&lt;a href=&quot;https://github.com/dvergeylen&quot;&gt;dvergeylen&lt;/a&gt;提示到，需要&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;npm install -g node-pre-gyp&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/posts/use-uptime-kuma-prompt-node-pre-gyp-permission-denied/images/437469076.png&quot; alt=&quot;图片.png&quot; title=&quot;图片.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
于是在执行这个操作之后这个问题解决了&lt;br&gt;
&lt;img src=&quot;/posts/use-uptime-kuma-prompt-node-pre-gyp-permission-denied/images/9984384.png&quot; alt=&quot;图片.png&quot; title=&quot;图片.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Archlinux使用nvm提示tput: unknown terminal &quot;xterm-256color&quot;</title>
  <link href="https://www.ioioi.cn/posts/archlinux-uses-nvm-prompt-tput-unknown-terminal-xterm-256color/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/archlinux-uses-nvm-prompt-tput-unknown-terminal-xterm-256color/</id>
  <published>2023-10-01T16:51:02.000Z</published>
  <updated>2024-04-01T14:56:51.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;img src=&quot;/posts/archlinux-uses-nvm-prompt-tput-unknown-terminal-xterm-256color/images/2996884454.png&quot; alt=&quot;图片.png&quot; title=&quot;图片.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;在网上找了好多，说的什么修改终端类型，还有说安装&lt;code&gt;ncurses&lt;/code&gt;包之类的，全都尝试了没有用&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/archlinux-uses-nvm-prompt-tput-unknown-terminal-xterm-256color/images/98978691.png&quot; alt=&quot;图片.png&quot; title=&quot;图片.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;最后经过查找这篇文章：&lt;a href=&quot;https://blog.csdn.net/weixin_34024034/article/details/92749416&quot;&gt;weixin_34024034&lt;/a&gt;，发现了解决方案：&lt;/p&gt;
&lt;p&gt;经过测试在安装好的Archlinux中的TERMINFO默认为空&lt;/p&gt;
&lt;p&gt;在&lt;code&gt;/etc/profile&lt;/code&gt;添加TERMINFO全局变量即可&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;export TERMINFO=/usr/share/terminfo&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/posts/archlinux-uses-nvm-prompt-tput-unknown-terminal-xterm-256color/images/970777546.png&quot; alt=&quot;图片.png&quot; title=&quot;图片.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>debian解决系列问题</title>
  <link href="https://www.ioioi.cn/posts/debian-solves-a-series-of-problems/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/debian-solves-a-series-of-problems/</id>
  <published>2023-09-10T01:14:00.000Z</published>
  <updated>2024-04-01T14:57:00.000Z</updated>
  <summary type="html">&lt;p&gt;debian解决 Could NOT find LZ4 (missing: LZ4_LIBRARIES LZ4_INCLUDE_DIRS) (Required is at least version “1.6”)&lt;/p&gt;
&lt;p&gt;你可以尝试使用以下命令安装LZ4库：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo apt-get install liblz4-dev&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;如果已经安装了该库，你可以尝试更新一下系统的软件包列表：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo apt-get update&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;如果问题仍然存在，你可以尝试手动安装LZ4库并将其添加到LD_LIBRARY_PATH环境变量中。具体步骤如下：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;下载LZ4库的源代码：&lt;a href=&quot;https://github.com/lz4/lz4/releases&quot;&gt;https://github.com/lz4/lz4/releases&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;解压源代码并进入解压后的目录。&lt;/li&gt;
&lt;li&gt;编译并安装LZ4库：&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;make&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo make install&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ol start=&quot;4&quot;&gt;
&lt;li&gt;将LZ4库的路径添加到LD_LIBRARY_PATH环境变量中：&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ol start=&quot;5&quot;&gt;
&lt;li&gt;重新运行你的程序，看看问题是否已经解决。&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;debian解决Could NOT find LZO (missing: LZO_LIBRARIES LZO_INCLUDE_DIRS)&lt;/p&gt;
&lt;p&gt;你可以尝试安装lzo库和头文件，使用以下命令：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo apt-get install liblzo2-dev&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;如果已经安装了lzo库和头文件，你可以尝试更新库缓存，使用以下命令：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo ldconfig&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;debian解决Could NOT find Snappy (missing: SNAPPY_LIBRARIES SNAPPY_INCLUDE_DIRS)&lt;/p&gt;
&lt;p&gt;你可以尝试安装snappy库和头文件，使用以下命令：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo apt-get install libsnappy-dev&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;如果已经安装了snappy库和头文件，你可以尝试重新运行CMake，并确保它能够找到正确的库和头文件路径。&lt;/p&gt;</summary>
</entry>
<entry>
  <title>CDN访问Forward Loop Detect错误解决</title>
  <link href="https://www.ioioi.cn/posts/cdn-access-forward-loop-detect-error-resolution/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/cdn-access-forward-loop-detect-error-resolution/</id>
  <published>2023-09-10T01:12:14.000Z</published>
  <updated>2024-04-01T14:57:08.000Z</updated>
  <summary type="html">&lt;p&gt;一般的CDN平台都会有&lt;strong&gt;回源跟随301、302&lt;/strong&gt;功能&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;开启后，节点回源请求若返回 301、302 状态码，则直接跳转获取资源，不会返回 301、302 给用户。&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;关掉它问题就解决了！&lt;/p&gt;
&lt;h2 id=&quot;浅分析&quot;&gt;浅分析&lt;/h2&gt;
&lt;p&gt;源站301链接&lt;br&gt;
给cdn开启这个功能之后&lt;br&gt;
cdn不会返回301给用户&lt;br&gt;
自己跳转获取资源&lt;br&gt;
当链接有301之后没返回给用户跳转&lt;br&gt;
cdn直接获取的链接还是301的链接&lt;br&gt;
导致了一个环路&lt;br&gt;
这个过程循环！导致的问题！&lt;/p&gt;
&lt;p&gt;转载自&lt;a href=&quot;www.scczz.com/893.html&quot;&gt;小王总博客&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>从Git中删除你的敏感数据密码</title>
  <link href="https://www.ioioi.cn/posts/remove-your-sensitive-data-password-from-git/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/remove-your-sensitive-data-password-from-git/</id>
  <published>2023-09-10T01:07:00.000Z</published>
  <updated>2024-04-01T14:57:15.000Z</updated>
  <summary type="html">&lt;p&gt;要从Git提交历史中删除敏感数据（如&lt;code&gt;build.gradle&lt;/code&gt;文件），可以使用以下步骤：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;确保你有一个备份，以防意外删除了重要数据。确保在进行任何更改之前，你已经创建了一个完整的备份。&lt;/li&gt;
&lt;li&gt;在本地克隆你的Git存储库，如果还没有克隆的话。&lt;/li&gt;
&lt;li&gt;使用&lt;code&gt;git filter-branch&lt;/code&gt;命令来重写提交历史并删除&lt;code&gt;build.gradle&lt;/code&gt;文件。在终端中导航到你的存储库所在的目录，并运行以下命令：&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;git filter-branch --tree-filter &apos;rm -f build.gradle&apos; -- --all&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;这将遍历所有提交，并在每个提交中删除&lt;code&gt;build.gradle&lt;/code&gt;文件。&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/remove-your-sensitive-data-password-from-git/images/2874354199.png&quot; alt=&quot;请输入图片描述&quot; title=&quot;请输入图片描述&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;ol start=&quot;4&quot;&gt;
&lt;li&gt;运行命令后，Git会重写提交历史。这可能需要一些时间，具体取决于你的存储库的大小和提交数量。&lt;/li&gt;
&lt;li&gt;删除本地存储库中的旧引用：&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;git for-each-ref --format=&apos;delete %(refname)&apos; refs/original | git update-ref --stdin&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ol start=&quot;6&quot;&gt;
&lt;li&gt;强制推送重写后的提交历史到远程存储库：&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;git push --force origin&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;这将覆盖远程存储库中的提交历史，请确保你已经做好了备份，并且只对自己的存储库进行此操作。&lt;/p&gt;
&lt;p&gt;请注意，这些操作将修改存储库的提交历史，并且如果其他人已经克隆了存储库，他们可能会遇到问题。因此，在执行此操作之前，请确保与团队中的其他人员进行适当的沟通，并确保每个人都了解并同意这个更改。&lt;/p&gt;</summary>
</entry>
<entry>
  <title>docker容器内部访问宿主机MySQL服务</title>
  <link href="https://www.ioioi.cn/posts/docker-container-internal-access-to-host-mysql-service/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/docker-container-internal-access-to-host-mysql-service/</id>
  <published>2023-09-03T15:23:59.000Z</published>
  <updated>2023-09-03T15:23:59.000Z</updated>
  <summary type="html">&lt;p&gt;在宿主机中查看docker0网卡的ip地址，即为mysql服务器的地址&lt;/p&gt;
&lt;p&gt;注意ufw需要放行ip加端口，不然会造成无法访问（这是这个折磨了我好久）&lt;/p&gt;
&lt;p&gt;&lt;code&gt;172.21.0.0/24&lt;/code&gt;为你的容器ip段&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ufw allow from 172.21.0.0/24 to any port 3306&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/posts/docker-container-internal-access-to-host-mysql-service/images/2471953175.png&quot; alt=&quot;image.png&quot; title=&quot;image.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;同时还需要在数据库phpmyadmin里面添加对应用户的登陆权限&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/docker-container-internal-access-to-host-mysql-service/images/2300226576.png&quot; alt=&quot;image.png&quot; title=&quot;image.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>为Luatos-ESP32-C3-Core（经典版）编译安装CircuitPython</title>
  <link href="https://www.ioioi.cn/posts/compile-and-install-circuit-python-for-luatosesp32c3-core-classic-edition/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/compile-and-install-circuit-python-for-luatosesp32c3-core-classic-edition/</id>
  <published>2023-08-10T10:58:19.000Z</published>
  <updated>2024-04-01T14:59:24.000Z</updated>
  <summary type="html">&lt;p&gt;最近在淘宝上面购买了一个&lt;code&gt;Luatos ESP32 C3 Core&lt;/code&gt; 带 &lt;code&gt;ch343&lt;/code&gt; 芯片的一块开发板：&lt;img src=&quot;https://wiki.luatos.com/_images/20221023.png&quot; alt=&quot;Luatos ESP32 C3 Core&quot; title=&quot;Luatos ESP32 C3 Core&quot;&gt;
想刷个&lt;code&gt;micropython&lt;/code&gt;发现刷进去之后无法连接到串口
之后看见在&lt;code&gt;circuitpython&lt;/code&gt;上面有人发过这个板子的固件，于是刷个&lt;code&gt;circuitpython&lt;/code&gt;，发现还是失败
最后找了一圈才发现这个板子分为两个版本，也就是在淘宝上面的&lt;code&gt;12.9元&lt;/code&gt;的和&lt;code&gt;9.9元&lt;/code&gt;的版本，一个带&lt;code&gt;usb&lt;/code&gt;转串口&lt;code&gt;ch343&lt;/code&gt;芯片一个不带，本来以为他们两个之间差别不大，于是就买了&lt;code&gt;12.9&lt;/code&gt;的图省事，想直接连&lt;code&gt;type-c&lt;/code&gt;，结果才发现掉进了大坑。
现在给大家分享一下如何为&lt;code&gt;Luatos-ESP32-C3-Core（经典版）&lt;/code&gt;编译安装&lt;code&gt;CircuitPython&lt;/code&gt;
编译环境：
Windows Wsl Archlinux&lt;/p&gt;
&lt;h3 id=&quot;安装git和python环境&quot;&gt;安装git和python环境&lt;/h3&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;yay -S git&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;yay -S python-pip&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;pip install --upgrade -r requirements-dev.txt&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;pip install --upgrade -r requirements-doc.txt&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;拉取82版本&quot;&gt;拉取8.2版本&lt;/h3&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;git clone -b 8.2.x https://github.com/adafruit/circuitpython.git&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;拉取子模块&quot;&gt;拉取子模块&lt;/h3&gt;
&lt;p&gt;不需要拉取全部模块，大样子太大了，只需要拉取esp方面的模块即可&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cd ports/espressif&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;make fetch-port-submodules&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/posts/compile-and-install-circuit-python-for-luatosesp32c3-core-classic-edition/images/237826333.png&quot; alt=&quot;QQ截图20230827111805.png&quot; title=&quot;QQ截图20230827111805.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;编译mpy-cross&quot;&gt;编译mpy-cross&lt;/h3&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cd ../..&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;make -C mpy-cross&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;安装esp-idf&quot;&gt;安装ESP-IDF&lt;/h3&gt;
&lt;p&gt;如果上一步能够顺利拉下来的话，在ports/espressif下会有esp-idf目录&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cd ports/espressif/esp-idf&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;./install.sh&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;上一步会有报错的&quot;&gt;上一步会有报错的&lt;/h3&gt;
&lt;h4 id=&quot;1libusb&quot;&gt;1、libusb&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;/posts/compile-and-install-circuit-python-for-luatosesp32c3-core-classic-edition/images/2274932234.png&quot; alt=&quot;QQ截图20230827122453.png&quot; title=&quot;QQ截图20230827122453.png&quot; loading=&quot;lazy&quot;&gt;
需要安装&lt;code&gt;libusb&lt;/code&gt;软件包
&lt;img src=&quot;/posts/compile-and-install-circuit-python-for-luatosesp32c3-core-classic-edition/images/637175367.png&quot; alt=&quot;QQ截图20230827122436.png&quot; title=&quot;QQ截图20230827122436.png&quot; loading=&quot;lazy&quot;&gt;
安装完后，需要初始化ESP编译环境&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;. export.sh&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;开始编译&quot;&gt;开始编译&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;由于&lt;/strong&gt;**&lt;code&gt;8.2.x&lt;/code&gt;&lt;strong&gt;&lt;strong&gt;版本的&lt;/strong&gt;&lt;/strong&gt;&lt;code&gt;CircuitPython&lt;/code&gt;**&lt;strong&gt;暂时没有这个型号的开发板，于是在&lt;/strong&gt; &lt;strong&gt;&lt;a href=&quot;https://github.com/adafruit/circuitpython/tree/main/ports/espressif/boards/luatos_core_esp32c3_ch343&quot;&gt;Github&lt;/a&gt;&lt;/strong&gt; &lt;strong&gt;中找到上周提交的文件，将上面的文件夹手动复制到板子目录中&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cd ports/espressif&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;make BOARD=luatos_core_esp32c3_ch343 V=2 -j17&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;V=2&lt;/code&gt;开启日志显示、&lt;code&gt;-j17&lt;/code&gt;使用多线程编译
然后就是等，我用的11代i7的CPU编译整整4个小时&lt;/p&gt;
&lt;h3 id=&quot;编译报错解决&quot;&gt;编译报错解决&lt;/h3&gt;
&lt;h4 id=&quot;1cmake&quot;&gt;1、cmake&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;/posts/compile-and-install-circuit-python-for-luatosesp32c3-core-classic-edition/images/389539361.png&quot; alt=&quot;QQ截图20230827122513.png&quot; title=&quot;QQ截图20230827122513.png&quot; loading=&quot;lazy&quot;&gt;
安装&lt;code&gt;cmake&lt;/code&gt;&lt;/p&gt;
&lt;h4 id=&quot;2glibc&quot;&gt;2、glibc&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;/posts/compile-and-install-circuit-python-for-luatosesp32c3-core-classic-edition/images/3500035909.png&quot; alt=&quot;QQ截图20230827122551.png&quot; title=&quot;QQ截图20230827122551.png&quot; loading=&quot;lazy&quot;&gt;
安装&lt;code&gt;glibc&lt;/code&gt;&lt;/p&gt;
&lt;h4 id=&quot;3gcc&quot;&gt;3、gcc&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;/posts/compile-and-install-circuit-python-for-luatosesp32c3-core-classic-edition/images/3117902083.png&quot; alt=&quot;QQ截图20230827123144.png&quot; title=&quot;QQ截图20230827123144.png&quot; loading=&quot;lazy&quot;&gt;
安装&lt;code&gt;gcc&lt;/code&gt;&lt;/p&gt;
&lt;h4 id=&quot;4ninja&quot;&gt;4、ninja&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;/posts/compile-and-install-circuit-python-for-luatosesp32c3-core-classic-edition/images/1542043427.png&quot; alt=&quot;QQ截图20230827130029.png&quot; title=&quot;QQ截图20230827130029.png&quot; loading=&quot;lazy&quot;&gt;
安装&lt;code&gt;ninja&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&quot;编译完成&quot;&gt;编译完成&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;/posts/compile-and-install-circuit-python-for-luatosesp32c3-core-classic-edition/images/122707087.png&quot; alt=&quot;QQ截图20230827152312.png&quot; title=&quot;QQ截图20230827152312.png&quot; loading=&quot;lazy&quot;&gt;
进入&lt;code&gt;ports/espressif/build-luatos_core_esp32c3_ch343/&lt;/code&gt;目录
将&lt;code&gt;firmware.bin&lt;/code&gt;从0x0000开始刷写，即可成功&lt;/p&gt;
&lt;h3 id=&quot;结束&quot;&gt;结束&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;/posts/compile-and-install-circuit-python-for-luatosesp32c3-core-classic-edition/images/1443564105.png&quot; alt=&quot;QQ截图20230827153642.png&quot; title=&quot;QQ截图20230827153642.png&quot; loading=&quot;lazy&quot;&gt;
已经将&lt;code&gt;luatos_core_esp32c3_ch343&lt;/code&gt;板子的文件以及编译好的固件上传至 &lt;a href=&quot;https://github.com/arkylin/luatos_esp32c3_core_ch343_circuitpython&quot;&gt;我的Github&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;参考：
&lt;a href=&quot;https://blog.csdn.net/applebomb/article/details/131797832&quot;&gt;CSDN-applebomb&lt;/a&gt;
&lt;a href=&quot;https://docs.circuitpython.org/en/latest/BUILDING.html&quot;&gt;CircuitPython-Docs&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;</summary>
</entry>
<entry>
  <title>Podman 设置 普通非Root用户</title>
  <link href="https://www.ioioi.cn/posts/podman-set-normal-non-root-users/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/podman-set-normal-non-root-users/</id>
  <published>2023-06-22T20:07:00.000Z</published>
  <updated>2024-04-01T14:57:31.000Z</updated>
  <summary type="html">&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;root@super:/home/wwwroot/pw.xyz.blue# sudo -u www podman-compose up&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[&apos;podman&apos;, &apos;--version&apos;, &apos;&apos;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;using podman version: 4.3.1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;** excluding:  set()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[&apos;podman&apos;, &apos;network&apos;, &apos;exists&apos;, &apos;pwxyzblue_default&apos;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;WARN[0000] The cgroupv2 manager is set to systemd but there is no systemd user session available &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;WARN[0000] For using systemd, you may need to login using an user session &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;WARN[0000] Alternatively, you can enable lingering with: `loginctl enable-linger 1003` (possibly as root) &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;WARN[0000] Falling back to --cgroup-manager=cgroupfs  &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;WARN[0000] The cgroupv2 manager is set to systemd but there is no systemd user session available &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;WARN[0000] For using systemd, you may need to login using an user session &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;WARN[0000] Alternatively, you can enable lingering with: `loginctl enable-linger 1003` (possibly as root) &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;WARN[0000] Falling back to --cgroup-manager=cgroupfs  &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;podman create --name=bitwarden --label io.podman.compose.config-hash=123 --label io.podman.compose.project=pwxyzblue --label io.podman.compose.version=0.0.1 --label com.docker.compose.project=pwxyzblue --label com.docker.compose.project.working_dir=/home/wwwroot/pw.xyz.blue --label com.docker.compose.project.config_files=docker-compose.yml --label com.docker.compose.container-number=1 --label com.docker.compose.service=bitwarden --env-file /home/wwwroot/pw.xyz.blue/config.env -v /home/wwwroot/pw.xyz.blue/data:/data --net pwxyzblue_default --network-alias bitwarden -p 37594:80 --restart always vaultwarden/server:alpine&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;WARN[0000] The cgroupv2 manager is set to systemd but there is no systemd user session available &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;WARN[0000] For using systemd, you may need to login using an user session &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;WARN[0000] Alternatively, you can enable lingering with: `loginctl enable-linger 1003` (possibly as root) &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;WARN[0000] Falling back to --cgroup-manager=cgroupfs  &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;WARN[0000] The cgroupv2 manager is set to systemd but there is no systemd user session available &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;WARN[0000] For using systemd, you may need to login using an user session &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;WARN[0000] Alternatively, you can enable lingering with: `loginctl enable-linger 1003` (possibly as root) &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;WARN[0000] Falling back to --cgroup-manager=cgroupfs  &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Error: creating container storage: the container name &quot;bitwarden&quot; is already in use by 12db721b020e96050076bd002d32e6fbb07807d1be46f59c9b9de4d8bb5315aa. You have to remove that container to be able to reuse that name: that name is already in use&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;exit code: 125&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;podman start -a bitwarden&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;WARN[0000] The cgroupv2 manager is set to systemd but there is no systemd user session available &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;WARN[0000] For using systemd, you may need to login using an user session &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;WARN[0000] Alternatively, you can enable lingering with: `loginctl enable-linger 1003` (possibly as root) &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;WARN[0000] Falling back to --cgroup-manager=cgroupfs  &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;WARN[0000] The cgroupv2 manager is set to systemd but there is no systemd user session available &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;WARN[0000] For using systemd, you may need to login using an user session &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;WARN[0000] Alternatively, you can enable lingering with: `loginctl enable-linger 1003` (possibly as root) &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;WARN[0000] Falling back to --cgroup-manager=cgroupfs  &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ERRO[0000] failed to move the rootless netns slirp4netns process to the systemd user.slice: exec: &quot;dbus-launch&quot;: executable file not found in $PATH &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Failed to connect to bus: No such file or directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ERRO[0000] Unable to clean up network for container 12db721b020e96050076bd002d32e6fbb07807d1be46f59c9b9de4d8bb5315aa: &quot;tearing down network namespace configuration for container 12db721b020e96050076bd002d32e6fbb07807d1be46f59c9b9de4d8bb5315aa: netavark: IO error: aardvark pid not found&quot; &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Error: unable to start container 12db721b020e96050076bd002d32e6fbb07807d1be46f59c9b9de4d8bb5315aa: crun: sd-bus call: Permission denied: Permission denied: OCI permission denied&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;exit code: 125&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;loginctl enable-linger 1003&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Nextcloud Nginx配置文件</title>
  <link href="https://www.ioioi.cn/posts/339/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/339/</id>
  <published>2023-06-08T12:55:12.000Z</published>
  <updated>2023-06-08T12:55:12.000Z</updated>
  <summary type="html">&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# Set the `immutable` cache control options only for assets with a cache busting `v` argument&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;map $arg_v $asset_immutable {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    &quot;&quot; &quot;&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    default &quot;immutable&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;server&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    listen 80;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        listen 443 ssl http2;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    server_name cloud.xyz.blue;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    index index.php index.html index.htm default.php default.htm default.html;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    root /www/wwwroot/cloud.xyz.blue/nextcloud;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #SSL-START SSL相关配置，请勿删除或修改下一行带注释的404规则&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #error_page 404/404.html;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #HTTP_TO_HTTPS_START&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    if ($server_port !~ 443){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        rewrite ^(/.*)$ https://$host$1 permanent;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #HTTP_TO_HTTPS_END&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    ssl_certificate    /www/server/panel/vhost/cert/cloud.xyz.blue/fullchain.pem;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    ssl_certificate_key    /www/server/panel/vhost/cert/cloud.xyz.blue/privkey.pem;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    ssl_ciphers EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    ssl_prefer_server_ciphers on;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    ssl_session_cache shared:SSL:10m;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    ssl_session_timeout 10m;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    add_header Strict-Transport-Security &quot;max-age=31536000&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    error_page 497  https://$host$request_uri;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #SSL-END&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #ERROR-PAGE-START  错误页配置，可以注释、删除或修改&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #error_page 404 /404.html;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #error_page 502 /502.html;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #ERROR-PAGE-END&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #PHP-INFO-START  PHP引用配置，可以注释或修改&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #清理缓存规则&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    location ~ /purge(/.*) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        proxy_cache_purge cache_one $host$1$is_args$args;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #access_log  /www/wwwlogs/cloud.xyz.blue_purge_cache.log;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #引用反向代理规则，注释后配置的反向代理将无效&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    include /www/server/panel/vhost/nginx/proxy/cloud.xyz.blue/*.conf;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    include enable-php-81.conf;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #PHP-INFO-END&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #REWRITE-START URL重写规则引用,修改后将导致面板设置的伪静态规则失效&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    include /www/server/panel/vhost/rewrite/cloud.xyz.blue.conf;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #REWRITE-END&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #禁止访问的文件或目录&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    location ~ ^/(\.user.ini|\.htaccess|\.git|\.env|\.svn|\.project|LICENSE|README.md)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        return 404;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #一键申请SSL证书验证目录相关设置&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    location ~ \.well-known{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        allow all;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #禁止在证书验证目录放入敏感文件&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    if ( $uri ~ &quot;^/\.well-known/.*\.(php|jsp|py|js|css|lua|ts|go|zip|tar\.gz|rar|7z|sql|bak)$&quot; ) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        return 403;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    access_log  /www/wwwlogs/cloud.xyz.blue.log;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    error_log  /www/wwwlogs/cloud.xyz.blue.error.log;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #Nextcloud 配置&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # Prevent nginx HTTP Server Detection&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    server_tokens off;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # HSTS settings&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # WARNING: Only add the preload option once you read about&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # the consequences in https://hstspreload.org/. This option&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # will add the domain to a hardcoded list that is shipped&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # in all major browsers and getting removed from this list&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # could take several months.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #add_header Strict-Transport-Security &quot;max-age=15768000; includeSubDomains; preload&quot; always;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # set max upload size and increase upload timeout:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    client_max_body_size 512M;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    client_body_timeout 300s;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    fastcgi_buffers 64 4K;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # Enable gzip but do not remove ETag headers&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    gzip on;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    gzip_vary on;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    gzip_comp_level 4;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    gzip_min_length 256;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/wasm application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # Pagespeed is not supported by Nextcloud, so if your server is built&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # with the `ngx_pagespeed` module, uncomment this line to disable it.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #pagespeed off;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # The settings allows you to optimize the HTTP2 bandwitdth.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # See https://blog.cloudflare.com/delivering-http-2-upload-speed-improvements/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # for tunning hints&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    client_body_buffer_size 512k;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # HTTP response headers borrowed from Nextcloud `.htaccess`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # add_header Referrer-Policy                   &quot;no-referrer&quot;       always;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # add_header X-Content-Type-Options            &quot;nosniff&quot;           always;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    add_header X-Download-Options                &quot;noopen&quot;            always;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # add_header X-Frame-Options                   &quot;SAMEORIGIN&quot;        always;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # add_header X-Permitted-Cross-Domain-Policies &quot;none&quot;              always;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # add_header X-Robots-Tag                      &quot;noindex, nofollow&quot; always;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # add_header X-XSS-Protection                  &quot;1; mode=block&quot;     always;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # Remove X-Powered-By, which is an information leak&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    fastcgi_hide_header X-Powered-By;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # Specify how to handle directories -- specifying `/index.php$request_uri`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # here as the fallback means that Nginx always exhibits the desired behaviour&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # when a client requests a path that corresponds to a directory that exists&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # on the server. In particular, if that directory contains an index.php file,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # that file is correctly served; if it doesn&apos;t, then the request is passed to&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # the front-end controller. This consistent behaviour means that we don&apos;t need&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # to specify custom rules for certain paths (e.g. images and other assets,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # `/updater`, `/ocm-provider`, `/ocs-provider`), and thus&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # `try_files $uri $uri/ /index.php$request_uri`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # always provides the desired behaviour.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    index index.php index.html /index.php$request_uri;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # Rule borrowed from `.htaccess` to handle Microsoft DAV clients&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    location = / {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        if ( $http_user_agent ~ ^DavClnt ) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            return 302 /remote.php/webdav/$is_args$args;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    location = /robots.txt {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        allow all;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        log_not_found off;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        access_log off;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # Make a regex exception for `/.well-known` so that clients can still&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # access it despite the existence of the regex rule&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # `location ~ /(\.|autotest|...)` which would otherwise handle requests&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # for `/.well-known`.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    location ^~ /.well-known {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        # The rules in this block are an adaptation of the rules&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        # in `.htaccess` that concern `/.well-known`.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        location = /.well-known/carddav { return 301 /remote.php/dav/; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        location = /.well-known/caldav  { return 301 /remote.php/dav/; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        location /.well-known/acme-challenge    { try_files $uri $uri/ =404; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        location /.well-known/pki-validation    { try_files $uri $uri/ =404; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        # Let Nextcloud&apos;s API for `/.well-known` URIs handle all other&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        # requests by passing them to the front-end controller.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        return 301 /index.php$request_uri;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # Rules borrowed from `.htaccess` to hide certain paths from clients&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/)  { return 404; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console)                { return 404; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # Ensure this block, which passes PHP files to the PHP process, is above the blocks&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # which handle static assets (as seen below). If this block is not declared first,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # then Nginx will encounter an infinite rewriting loop when it prepends `/index.php`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # to the URI, resulting in a HTTP 500 error response.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    location ~ \.php(?:$|/) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        # Required for legacy support&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        fastcgi_split_path_info ^(.+?\.php)(/.*)$;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        set $path_info $fastcgi_path_info;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        try_files $fastcgi_script_name =404;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        include fastcgi_params;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        fastcgi_param PATH_INFO $path_info;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        fastcgi_param HTTPS on;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        fastcgi_param modHeadersAvailable true;         # Avoid sending the security headers twice&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        fastcgi_param front_controller_active true;     # Enable pretty urls&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        fastcgi_pass unix:/tmp/php-cgi-81.sock;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        fastcgi_intercept_errors on;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        fastcgi_request_buffering off;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        fastcgi_max_temp_file_size 0;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    location ~ \.(?:css|js|svg|gif|png|jpg|ico|wasm|tflite|map)$ {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        try_files $uri /index.php$request_uri;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        add_header Cache-Control &quot;public, max-age=15778463, $asset_immutable&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        access_log off;     # Optional: Don&apos;t log access to assets&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        location ~ \.wasm$ {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            default_type application/wasm;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    location ~ \.woff2?$ {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        try_files $uri /index.php$request_uri;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        expires 7d;         # Cache-Control policy borrowed from `.htaccess`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        access_log off;     # Optional: Don&apos;t log access to assets&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # Rule borrowed from `.htaccess`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    location /remote {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        return 301 /remote.php$request_uri;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    location / {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        try_files $uri $uri/ /index.php$request_uri;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>Debian 解决错误：“configure: error: GNU MP Library version 4.2 or greater required.”</title>
  <link href="https://www.ioioi.cn/posts/debian-resolved-the-error-configure-error-gnu-mp-library-version-42-or-greater-required/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/debian-resolved-the-error-configure-error-gnu-mp-library-version-42-or-greater-required/</id>
  <published>2023-06-07T11:29:52.000Z</published>
  <updated>2023-06-07T11:29:52.000Z</updated>
  <summary type="html">&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;apt install libgmp-dev&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>socketio</title>
  <link href="https://www.ioioi.cn/posts/socketio/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/socketio/</id>
  <published>2023-05-12T12:05:00.000Z</published>
  <updated>2023-05-12T12:05:00.000Z</updated>
  <summary type="html">&lt;p&gt;很抱歉，我无法为您提供完整的代码，因为这需要根据您的具体需求和环境进行编写。但是，我可以为您提供一些参考代码和示例，帮助您开始构建您的应用程序。&lt;/p&gt;
&lt;p&gt;首先，您需要安装相关的依赖：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;npm install express react react-dom react-router-dom socket.io&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;然后，您可以按照以下步骤来构建您的应用程序：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;创建一个Node.js应用程序，并使用Express框架来管理路由和中间件。&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;const express = require(&apos;express&apos;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;const app = express();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;// 中间件&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;app.use(express.static(&apos;public&apos;));&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;// 路由&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;app.get(&apos;/&apos;, (req, res) =&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  // 渲染页面&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;});&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;// 启动服务器&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;const server = app.listen(3000, () =&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  console.log(&apos;Server is running on port 3000&apos;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;});&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ol start=&quot;2&quot;&gt;
&lt;li&gt;在Node.js应用程序中使用React来构建您的前端界面，并使用React Router来管理路由。&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;import React from &apos;react&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;import ReactDOM from &apos;react-dom&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;import { BrowserRouter as Router, Route, Switch } from &apos;react-router-dom&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;import Home from &apos;./pages/Home&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;import About from &apos;./pages/About&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ReactDOM.render(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  &amp;#x3C;Router&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    &amp;#x3C;Switch&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      &amp;#x3C;Route exact path=&quot;/&quot; component={Home} /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      &amp;#x3C;Route path=&quot;/about&quot; component={About} /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    &amp;#x3C;/Switch&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  &amp;#x3C;/Router&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  document.getElementById(&apos;root&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;使用Socket.io来实现实时通信功能，并在服务器端和客户端之间建立双向通信。&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;const io = require(&apos;socket.io&apos;)(server);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;io.on(&apos;connection&apos;, (socket) =&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  console.log(&apos;A user connected&apos;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  socket.on(&apos;disconnect&apos;, () =&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    console.log(&apos;A user disconnected&apos;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  });&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;});&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;import io from &apos;socket.io-client&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;const socket = io(&apos;http://localhost:3000&apos;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;socket.on(&apos;connect&apos;, () =&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  console.log(&apos;Connected to server&apos;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;});&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;socket.on(&apos;disconnect&apos;, () =&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  console.log(&apos;Disconnected from server&apos;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;});&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ol start=&quot;4&quot;&gt;
&lt;li&gt;在服务器端使用Node.js的模板引擎来渲染您的页面，并将渲染后的HTML发送给客户端。&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;const ejs = require(&apos;ejs&apos;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;app.set(&apos;view engine&apos;, &apos;ejs&apos;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;app.get(&apos;/&apos;, (req, res) =&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  const data = {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    title: &apos;My Website&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    message: &apos;Welcome to my website!&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  };&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  res.render(&apos;index&apos;, data);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;});&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ol start=&quot;5&quot;&gt;
&lt;li&gt;在客户端使用React来渲染您的页面，并使用Socket.io来实时更新数据。&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;import React, { useState, useEffect } from &apos;react&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;import io from &apos;socket.io-client&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;const socket = io(&apos;http://localhost:3000&apos;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;const Home = () =&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  const [data, setData] = useState([]);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  useEffect(() =&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    socket.on(&apos;data&apos;, (data) =&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      setData(data);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    });&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  }, []);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  return (&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    &amp;#x3C;div&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      {data.map((item) =&gt; (&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        &amp;#x3C;div key={item.id}&gt;{item.name}&amp;#x3C;/div&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      ))}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    &amp;#x3C;/div&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  );&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;};&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;export default Home;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ol start=&quot;6&quot;&gt;
&lt;li&gt;在服务器端使用Node.js来处理数据，并将数据发送给客户端。&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;const data = [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  { id: 1, name: &apos;Alice&apos; },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  { id: 2, name: &apos;Bob&apos; },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  { id: 3, name: &apos;Charlie&apos; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;io.on(&apos;connection&apos;, (socket) =&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  socket.emit(&apos;data&apos;, data);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;});&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ol start=&quot;7&quot;&gt;
&lt;li&gt;在客户端使用React来实时更新您的数据，并使用Socket.io来实现实时排名功能。&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;import React, { useState, useEffect } from &apos;react&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;import io from &apos;socket.io-client&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;const socket = io(&apos;http://localhost:3000&apos;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;const Home = () =&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  const [data, setData] = useState([]);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  useEffect(() =&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    socket.on(&apos;data&apos;, (data) =&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      setData(data);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    });&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  }, []);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  return (&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    &amp;#x3C;div&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      {data&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        .sort((a, b) =&gt; b.score - a.score)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        .map((item) =&gt; (&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          &amp;#x3C;div key={item.id}&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            {item.name} - {item.score}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          &amp;#x3C;/div&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ))}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    &amp;#x3C;/div&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  );&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;};&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;export default Home;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;以上是一个简单的示例代码，您可以根据您的具体需求进行调整和优化。&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Can&apos;t access PWA settings because &quot;This page has been blocked by Microsoft Edge&quot;</title>
  <link href="https://www.ioioi.cn/posts/cant-access-pwa-settings-because-this-page-has-been-blocked-by-microsoft-edge/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/cant-access-pwa-settings-because-this-page-has-been-blocked-by-microsoft-edge/</id>
  <published>2023-05-10T20:06:00.000Z</published>
  <updated>2024-04-01T15:00:31.000Z</updated>
  <summary type="html">&lt;p&gt;I am trying to change my PWA settings, but when pressing on settings button in PWA or going to edge://app-settings, it’s saying, that “app-settings is blocked” “This page has been blocked by Microsoft Edge” “ERR_BLOCKED_BY_CLIENT”. Can’t really understand why edge blocking it’s pages lmao. Btw my privacy settings are set to Balanced.
yeah I am getting that too, installed a new PWA from Twitter to test
edge://app-settings/jgeocpdicgmkeemopbanhokmhcgcflmi
is the URL it gives me (the second part is the PWA hash i think)
edit: found the fix!!!!!!!!!!!!
GO TO edge://apps/all
&lt;a href=&quot;https://i.vgy.me/s4ODA0.png&quot;&gt;https://i.vgy.me/s4ODA0.png&lt;/a&gt; - screenshot
tap LINK HANDLING FOR WINDOWS then it started working for me&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;a href=&quot;https://www.reddit.com/r/edge/comments/12u2jy7/cant_access_pwa_settings_because_this_page_has/&quot;&gt;Can’t access PWA settings because “This page has been blocked by Microsoft Edge” : r/edge (reddit.com)&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>编译Mariadb10.11 报 troff: fatal error: can&apos;t find macro file m</title>
  <link href="https://www.ioioi.cn/posts/compiling-mariadb1011-report-troff-fatal-error-cant-find-macro-file-m/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/compiling-mariadb1011-report-troff-fatal-error-cant-find-macro-file-m/</id>
  <published>2023-05-09T13:35:00.000Z</published>
  <updated>2023-05-09T13:35:00.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;img src=&quot;/posts/compiling-mariadb1011-report-troff-fatal-error-cant-find-macro-file-m/images/3757106605.png&quot; alt=&quot;图片.png&quot; title=&quot;图片.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;troff: fatal error: can&apos;t find macro file m&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[ 37%] Built target user_t&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Scanning dependencies of target mariadb&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;troff: fatal error: can&apos;t find macro file m&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[ 37%] Built target user_ps&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;安装groff即可&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;apt install groff&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/posts/compiling-mariadb1011-report-troff-fatal-error-cant-find-macro-file-m/images/670208321.png&quot; alt=&quot;图片.png&quot; title=&quot;图片.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>mysql常见错误</title>
  <link href="https://www.ioioi.cn/posts/common-mysql-errors/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/common-mysql-errors/</id>
  <published>2023-05-09T12:08:00.000Z</published>
  <updated>2023-05-09T12:08:00.000Z</updated>
  <summary type="html">&lt;ul&gt;
&lt;li&gt;Download mysql source&lt;/li&gt;
&lt;li&gt;Ran the following cmake command based on the documentation&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cmake \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DCMAKE_INSTALL_PREFIX=/usr/local/mac-dev-env/mysql-5.7.18 \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DCMAKE_CXX_FLAGS=&quot;-stdlib=libstdc++&quot; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DDEFAULT_CHARSET=utf8 \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DDEFAULT_COLLATION=utf8_general_ci \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DDOWNLOAD_BOOST=ON \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DWITH_BOOST=/usr/local/src/boost \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  ..&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cmake \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DCMAKE_INSTALL_PREFIX=./mysql-5.7.18 \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DCMAKE_CXX_FLAGS=&quot;-stdlib=libstdc++&quot; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DDEFAULT_CHARSET=utf8 \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DDEFAULT_COLLATION=utf8_general_ci \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DDOWNLOAD_BOOST=1 \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  ..&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;gives the following error&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;CMake Error at cmake/boost.cmake:81 (MESSAGE):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;You can download it with -DDOWNLOAD_BOOST=1 -DWITH_BOOST=&amp;#x3C;directory&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;following &lt;a href=&quot;https://geeksww.com/tutorials/operating_systems/linux/installation/installing_mysql_client_tools_binaries_and_library_on_ubuntu_linux.php&quot;&gt;https://geeksww.com/tutorials/operating_systems/linux/installation/installing_mysql_client_tools_binaries_and_library_on_ubuntu_linux.php&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;./configure.cmake --without-server --enable-thread-safe-client \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    --with-client-ldflags=-all-static --prefix=./mybuild \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    --without-debug  --without-docs --with-big-tables&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;this didn’t work&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;building-boost&quot;&gt;Building boost&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.boost.org/doc/libs/1_65_0/more/getting_started/unix-variants.html#prepare-to-use-a-boost-library-binary&quot;&gt;http://www.boost.org/doc/libs/1_65_0/more/getting_started/unix-variants.html#prepare-to-use-a-boost-library-binary&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;download boost and untar&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mkdir mybuild&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;./bootstrap.sh --prefix=mybuild/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;./b2&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;building taking time&lt;/li&gt;
&lt;li&gt;create folder &lt;code&gt;mybuild&lt;/code&gt; inside mysql source&lt;br&gt;
folder so that cmake files are in that folder and it’s easy to delete&lt;br&gt;
the tmp files. Also put the entire src in git to see if the original src&lt;br&gt;
folder gets new files.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cmake \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DCMAKE_INSTALL_PREFIX= ./mysql-5.7.18\&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DCMAKE_CXX_FLAGS=&quot;-stdlib=libstdc++&quot; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DDEFAULT_CHARSET=utf8 \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DDEFAULT_COLLATION=utf8_general_ci \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DDOWNLOAD_BOOST=ON \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DWITH_BOOST=../../boost_1_65_0.tar.gz \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  ..&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;gives error &lt;code&gt;-- MySQL currently requires boost_1_59_0&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cmake \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DCMAKE_INSTALL_PREFIX= ./mysql-5.7.18\&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DCMAKE_CXX_FLAGS=&quot;-stdlib=libstdc++&quot; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DDEFAULT_CHARSET=utf8 \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DDEFAULT_COLLATION=utf8_general_ci \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DDOWNLOAD_BOOST=ON \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DWITH_BOOST=../../ \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  ..&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;this tried to download boost but later got timeout error&lt;/li&gt;
&lt;li&gt;downloaded boost package &lt;code&gt;wget http://sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.gz&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cmake \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DCMAKE_INSTALL_PREFIX= ./mysql-5.7.18\&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DCMAKE_CXX_FLAGS=&quot;-stdlib=libstdc++&quot; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DDEFAULT_CHARSET=utf8 \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DDEFAULT_COLLATION=utf8_general_ci \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DDOWNLOAD_BOOST=ON \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DWITH_BOOST=../../ \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  ..&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;the cmake is running ok&lt;/li&gt;
&lt;li&gt;&lt;code&gt;make&lt;/code&gt; to build the exe&lt;/li&gt;
&lt;li&gt;got this error &lt;code&gt;/Users/anjesh/Dev/source/mysql-5.7.19/mysys/charset.c:403:22: error: use of undeclared identifier &apos;DEFAULT_CHARSET_HOME&apos;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Found the bug reported here &lt;code&gt;https://bugs.mysql.com/bug.php?id=78214&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;not sure how to fix&lt;/li&gt;
&lt;li&gt;looks like this error might be due to space after &lt;code&gt;PREFIX=&lt;/code&gt; , something that’s mentioned in above command&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cmake \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DCMAKE_INSTALL_PREFIX=./mysql-5.7.18 \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DCMAKE_CXX_FLAGS=&quot;-stdlib=libstdc++&quot; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DDEFAULT_CHARSET=utf8 \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DDEFAULT_COLLATION=utf8_general_ci \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DDOWNLOAD_BOOST=ON \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DWITH_BOOST=../../ \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  ..&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;make&lt;/code&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;still cann’t compile Mysql-python becauase of some .h file folder issues.&lt;/li&gt;
&lt;li&gt;again runnnig cmake and make with some change in the prefix&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cmake \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DCMAKE_INSTALL_PREFIX=./ \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DCMAKE_CXX_FLAGS=&quot;-stdlib=libstdc++&quot; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DDEFAULT_CHARSET=utf8 \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DDEFAULT_COLLATION=utf8_general_ci \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DDOWNLOAD_BOOST=ON \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  -DWITH_BOOST=../../ \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  ..&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;make&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;make install&lt;/code&gt; without sudo and the necessary files are installed in the same folder&lt;/p&gt;
&lt;p&gt;Now i was able to install MySQL-Python after configuring mysql_config, i put mysql_config in ~/bin and the installation worked.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://gist.github.com/anjesh/d35fac0d5b85a0d71fb04d72e1c7925c&quot;&gt;https://gist.github.com/anjesh/d35fac0d5b85a0d71fb04d72e1c7925c&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Typecho使用腾讯云CDN后台卡在登录页无法登录解决</title>
  <link href="https://www.ioioi.cn/posts/typecho-cannot-log-in-to-the-login-page-using-tencent-cloud-cdn-backend-card-to-solve-the-problem/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/typecho-cannot-log-in-to-the-login-page-using-tencent-cloud-cdn-backend-card-to-solve-the-problem/</id>
  <published>2023-05-09T12:08:00.000Z</published>
  <updated>2023-05-09T12:08:00.000Z</updated>
  <summary type="html">&lt;h1 id=&quot;typecho使用腾讯云cdn后台卡在登录页无法登录解决&quot;&gt;Typecho使用腾讯云CDN后台卡在登录页无法登录解决&lt;/h1&gt;
&lt;h3 id=&quot;现象&quot;&gt;现象&lt;/h3&gt;
&lt;p&gt;后台登录时，即使密码正确也会跳回后台登录页，重试依旧，陷入死循环&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.9kr.cc.image.9kr.cc/wp-content/uploads/2023/01/3978958059.png&quot;&gt;&lt;img src=&quot;https://www.9kr.cc.image.9kr.cc/wp-content/uploads/2023/01/3978958059.png&quot; alt=&quot; title=&quot; title=&quot; title=&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;后台登录页&lt;/p&gt;
&lt;h3 id=&quot;解决&quot;&gt;解决&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;到腾讯CDN后台，把&lt;code&gt;回源跟随301/302配置&lt;/code&gt;关掉。&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;位置在&lt;code&gt;回源配置 &gt; 回源跟随301/302配置&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.9kr.cc.image.9kr.cc/wp-content/uploads/2023/01/3966902376.png&quot;&gt;&lt;img src=&quot;https://www.9kr.cc.image.9kr.cc/wp-content/uploads/2023/01/3966902376.png&quot; alt=&quot; title=&quot; title=&quot; title=&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;回源跟随301/302配置&lt;/p&gt;
&lt;h3 id=&quot;原因&quot;&gt;原因&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;猜测&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;登录成功后Typecho会返回一个302请求，以及成功后的Cookie之类的凭证，浏览器带着这个Cookie之类的凭证进行302转跳就能进入后台。&lt;/p&gt;
&lt;p&gt;开启CDN的302回源后，CDN不会按照302返回的请求设置新的、成功登录的Cookie，而是带着旧的、为成功登录的Cookie访问Typecho，Typecho看到未登录得Cookie就返回了登录页给CDN，CDN再把这个登录页返回给用户。&lt;br&gt;
导致登录一直卡在登录页，因为CDN没有用302返回的新的Cookie去进行请求。&lt;/p&gt;
&lt;h3 id=&quot;其他问题&quot;&gt;其他问题&lt;/h3&gt;
&lt;p&gt;如果还是无法登录，可以看看&lt;code&gt;缓存键规则配置&lt;/code&gt;里的&lt;code&gt;忽略参数&lt;/code&gt;有没有设置成不忽略&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.9kr.cc.image.9kr.cc/wp-content/uploads/2023/01/1884376801.png&quot;&gt;&lt;img src=&quot;https://www.9kr.cc.image.9kr.cc/wp-content/uploads/2023/01/1884376801.png&quot; alt=&quot; title=&quot; title=&quot; title=&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;缓存键规则配置&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Gitea 默认配置文件分享</title>
  <link href="https://www.ioioi.cn/posts/gitea-default-profile-sharing/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/gitea-default-profile-sharing/</id>
  <published>2023-05-07T09:15:00.000Z</published>
  <updated>2023-05-07T09:15:00.000Z</updated>
  <summary type="html">&lt;p&gt;来源：Archlinux Packages&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/gitea-default-profile-sharing/images/4282936780.png&quot; alt=&quot;image.png&quot; title=&quot;image.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;; This file lists the default values used by Gitea&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Copy required sections to your own app.ini (default is custom/conf/app.ini)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; and modify as needed.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Do not copy the whole file as-is, as it contains some invalid sections for illustrative purposes.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; If you don&apos;t know what a setting is you should not set it.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; see https://docs.gitea.io/en-us/config-cheat-sheet/ for additional documentation.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; General Settings&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; App name that shows in every page title&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;APP_NAME = ; Gitea: Git with a cup of tea&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; RUN_USER will automatically detect the current user - but you can set it here change it if you run locally&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;RUN_USER = ; git&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Application run mode, affects performance and debugging. Either &quot;dev&quot;, &quot;prod&quot; or &quot;test&quot;, default is &quot;prod&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;RUN_MODE = ; prod&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[server]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; The protocol the server listens on. One of &apos;http&apos;, &apos;https&apos;, &apos;unix&apos; or &apos;fcgi&apos;. Defaults to &apos;http&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PROTOCOL = http&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Expect PROXY protocol headers on connections&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;USE_PROXY_PROTOCOL = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Use PROXY protocol in TLS Bridging mode&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PROXY_PROTOCOL_TLS_BRIDGING = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;; Timeout to wait for PROXY protocol header (set to 0 to have no timeout)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PROXY_PROTOCOL_HEADER_TIMEOUT=5s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;; Accept PROXY protocol headers with UNKNOWN type&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PROXY_PROTOCOL_ACCEPT_UNKNOWN=false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Set the domain for the server&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DOMAIN = localhost&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Overwrite the automatically generated public URL. Necessary for proxies and docker.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; when STATIC_URL_PREFIX is empty it will follow ROOT_URL&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;STATIC_URL_PREFIX =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; The address to listen on. Either a IPv4/IPv6 address or the path to a unix socket.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;HTTP_ADDR = 0.0.0.0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; The port to listen on. Leave empty when using a unix socket.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;HTTP_PORT = 3000&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; If REDIRECT_OTHER_PORT is true, and PROTOCOL is set to https an http server&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; will be started on PORT_TO_REDIRECT and it will redirect plain, non-secure http requests to the main&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; ROOT_URL.  Defaults are false for REDIRECT_OTHER_PORT and 80 for&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; PORT_TO_REDIRECT.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;REDIRECT_OTHER_PORT = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PORT_TO_REDIRECT = 80&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; expect PROXY protocol header on connections to https redirector.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;REDIRECTOR_USE_PROXY_PROTOCOL = %(USE_PROXY_PROTOCOL)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Minimum and maximum supported TLS versions&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSL_MIN_VERSION=TLSv1.2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSL_MAX_VERSION=&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; SSL Curve Preferences&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSL_CURVE_PREFERENCES=X25519,P256&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; SSL Cipher Suites&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSL_CIPHER_SUITES=; Will default to &quot;ecdhe_ecdsa_with_aes_256_gcm_sha384,ecdhe_rsa_with_aes_256_gcm_sha384,ecdhe_ecdsa_with_aes_128_gcm_sha256,ecdhe_rsa_with_aes_128_gcm_sha256,ecdhe_ecdsa_with_chacha20_poly1305,ecdhe_rsa_with_chacha20_poly1305&quot; if aes is supported by hardware, otherwise chacha will be first.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Timeout for any write to the connection. (Set to -1 to disable all timeouts.)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PER_WRITE_TIMEOUT = 30s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Timeout per Kb written to connections.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PER_WRITE_PER_KB_TIMEOUT = 30s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Permission for unix socket&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;UNIX_SOCKET_PERMISSION = 666&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Local (DMZ) URL for Gitea workers (such as SSH update) accessing web service.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; In most cases you do not need to change the default value.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Alter it only if your SSH server node is not the same as HTTP node.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Do not set this variable if PROTOCOL is set to &apos;unix&apos;.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;LOCAL_ROOT_URL = %(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; When making local connections pass the PROXY protocol header.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;LOCAL_USE_PROXY_PROTOCOL = %(USE_PROXY_PROTOCOL)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Disable SSH feature when not available&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DISABLE_SSH = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Whether to use the builtin SSH server or not.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;START_SSH_SERVER = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Expect PROXY protocol header on connections to the built-in SSH server&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSH_SERVER_USE_PROXY_PROTOCOL = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Username to use for the builtin SSH server. If blank, then it is the value of RUN_USER.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;BUILTIN_SSH_SERVER_USER = %(RUN_USER)s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Domain name to be exposed in clone URL&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSH_DOMAIN = %(DOMAIN)s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; SSH username displayed in clone URLs.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSH_USER = %(BUILTIN_SSH_SERVER_USER)s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; The network interface the builtin SSH server should listen on&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSH_LISTEN_HOST =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Port number to be exposed in clone URL&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSH_PORT = 22&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; The port number the builtin SSH server should listen on&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSH_LISTEN_PORT = %(SSH_PORT)s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Root path of SSH directory, default is &apos;~/.ssh&apos;, but you have to use &apos;/home/git/.ssh&apos;.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSH_ROOT_PATH =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Gitea will create a authorized_keys file by default when it is not using the internal ssh server&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; If you intend to use the AuthorizedKeysCommand functionality then you should turn this off.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSH_CREATE_AUTHORIZED_KEYS_FILE = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Gitea will create a authorized_principals file by default when it is not using the internal ssh server&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; If you intend to use the AuthorizedPrincipalsCommand functionality then you should turn this off.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSH_CREATE_AUTHORIZED_PRINCIPALS_FILE = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; For the built-in SSH server, choose the ciphers to support for SSH connections,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; for system SSH this setting has no effect&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSH_SERVER_CIPHERS = chacha20-poly1305@openssh.com, aes128-ctr, aes192-ctr, aes256-ctr, aes128-gcm@openssh.com, aes256-gcm@openssh.com&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; For the built-in SSH server, choose the key exchange algorithms to support for SSH connections,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; for system SSH this setting has no effect&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSH_SERVER_KEY_EXCHANGES = curve25519-sha256, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521, diffie-hellman-group14-sha256, diffie-hellman-group14-sha1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; For the built-in SSH server, choose the MACs to support for SSH connections,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; for system SSH this setting has no effect&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSH_SERVER_MACS = hmac-sha2-256-etm@openssh.com, hmac-sha2-256, hmac-sha1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; For the built-in SSH server, choose the keypair to offer as the host key&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; The private key should be at SSH_SERVER_HOST_KEY and the public SSH_SERVER_HOST_KEY.pub&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; relative paths are made absolute relative to the APP_DATA_PATH&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSH_SERVER_HOST_KEYS=ssh/gitea.rsa, ssh/gogs.rsa&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Directory to create temporary files in when testing public keys using ssh-keygen,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; default is the system temporary directory.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSH_KEY_TEST_PATH =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Path to ssh-keygen, default is &apos;ssh-keygen&apos; which means the shell is responsible for finding out which one to call.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSH_KEYGEN_PATH = ssh-keygen&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Enable SSH Authorized Key Backup when rewriting all keys, default is true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSH_AUTHORIZED_KEYS_BACKUP = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Determines which principals to allow&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; - empty: if SSH_TRUSTED_USER_CA_KEYS is empty this will default to off, otherwise will default to email, username.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; - off: Do not allow authorized principals&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; - email: the principal must match the user&apos;s email&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; - username: the principal must match the user&apos;s username&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; - anything: there will be no checking on the content of the principal&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSH_AUTHORIZED_PRINCIPALS_ALLOW = email, username&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Enable SSH Authorized Principals Backup when rewriting all keys, default is true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSH_AUTHORIZED_PRINCIPALS_BACKUP = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Specifies the public keys of certificate authorities that are trusted to sign user certificates for authentication.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Multiple keys should be comma separated.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; E.g.&quot;ssh-&amp;#x3C;algorithm&gt; &amp;#x3C;key&gt;&quot;. or &quot;ssh-&amp;#x3C;algorithm&gt; &amp;#x3C;key1&gt;, ssh-&amp;#x3C;algorithm&gt; &amp;#x3C;key2&gt;&quot;.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; For more information see &quot;TrustedUserCAKeys&quot; in the sshd config manpages.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSH_TRUSTED_USER_CA_KEYS =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Absolute path of the `TrustedUserCaKeys` file gitea will manage.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Default this `RUN_USER`/.ssh/gitea-trusted-user-ca-keys.pem&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; If you&apos;re running your own ssh server and you want to use the gitea managed file you&apos;ll also need to modify your&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; sshd_config to point to this file. The official docker image will automatically work without further configuration.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSH_TRUSTED_USER_CA_KEYS_FILENAME =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Enable exposure of SSH clone URL to anonymous visitors, default is false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSH_EXPOSE_ANONYMOUS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Timeout for any write to ssh connections. (Set to -1 to disable all timeouts.)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Will default to the PER_WRITE_TIMEOUT.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSH_PER_WRITE_TIMEOUT = 30s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Timeout per Kb written to ssh connections.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Will default to the PER_WRITE_PER_KB_TIMEOUT.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSH_PER_WRITE_PER_KB_TIMEOUT = 30s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Indicate whether to check minimum key size with corresponding type&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MINIMUM_KEY_SIZE_CHECK = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Disable CDN even in &quot;prod&quot; mode&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;OFFLINE_MODE = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DISABLE_ROUTER_LOG = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; TLS Settings: Either ACME or manual&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; (Other common TLS configuration are found before)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLE_ACME = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; ACME automatic TLS settings&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; ACME directory URL (e.g. LetsEncrypt&apos;s staging/testing URL: https://acme-staging-v02.api.letsencrypt.org/directory)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Leave empty to default to LetsEncrypt&apos;s (production) URL&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ACME_URL =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Explicitly accept the ACME&apos;s TOS. The specific TOS cannot be retrieved at the moment.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ACME_ACCEPTTOS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; If the ACME CA is not in your system&apos;s CA trust chain, it can be manually added here&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ACME_CA_ROOT =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Email used for the ACME registration service&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Can be left blank to initialize at first run and use the cached value&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ACME_EMAIL =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; ACME live directory (not to be confused with ACME directory URL: ACME_URL)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; (Refer to caddy&apos;s ACME manager https://github.com/caddyserver/certmagic)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ACME_DIRECTORY = https&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;  Manual TLS settings: (Only applicable if ENABLE_ACME=false)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Generate steps:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; $ ./gitea cert -ca=true -duration=8760h0m0s -host=myhost.example.com&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Or from a .pfx file exported from the Windows certificate store (do&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; not forget to export the private key):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; $ openssl pkcs12 -in cert.pfx -out cert.pem -nokeys&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; $ openssl pkcs12 -in cert.pfx -out key.pem -nocerts -nodes&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Paths are relative to CUSTOM_PATH&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;CERT_FILE = https/cert.pem&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;KEY_FILE = https/key.pem&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Root directory containing templates and static files.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; default is the path where Gitea is executed&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;STATIC_ROOT_PATH =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Default path for App data&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;APP_DATA_PATH = data&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Enable gzip compression for runtime-generated content, static resources excluded&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLE_GZIP = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Application profiling (memory and cpu)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; For &quot;web&quot; command it listens on localhost:6060&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; For &quot;serve&quot; command it dumps to disk at PPROF_DATA_PATH as (cpuprofile|memprofile)_&amp;#x3C;username&gt;_&amp;#x3C;temporary id&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLE_PPROF = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; PPROF_DATA_PATH, use an absolute path when you start gitea as service&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PPROF_DATA_PATH = data/tmp/pprof&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Landing page, can be &quot;home&quot;, &quot;explore&quot;, &quot;organizations&quot;, &quot;login&quot;, or any URL such as &quot;/org/repo&quot; or even &quot;https://anotherwebsite.com&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; The &quot;login&quot; choice is not a security measure but just a UI flow change, use REQUIRE_SIGNIN_VIEW to force users to log in.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;LANDING_PAGE = home&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Enables git-lfs support. true or false, default is false.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;LFS_START_SERVER = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; LFS authentication secret, change this yourself&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;LFS_JWT_SECRET =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; LFS authentication validity period (in time.Duration), pushes taking longer than this may fail.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;LFS_HTTP_AUTH_EXPIRY = 20m&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Maximum allowed LFS file size in bytes (Set to 0 for no limit).&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;LFS_MAX_FILE_SIZE = 0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Maximum number of locks returned per page&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;LFS_LOCKS_PAGING_NUM = 50&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Allow graceful restarts using SIGHUP to fork&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ALLOW_GRACEFUL_RESTARTS = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; After a restart the parent will finish ongoing requests before&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; shutting down. Force shutdown if this process takes longer than this delay.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; set to a negative value to disable&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;GRACEFUL_HAMMER_TIME = 60s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Allows the setting of a startup timeout and waithint for Windows as SVC service&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; 0 disables this.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;STARTUP_TIMEOUT = 0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Static resources, includes resources on custom/, public/ and all uploaded avatars web browser cache time. Note that this cache is disabled when RUN_MODE is &quot;dev&quot;. Default is 6h&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;STATIC_CACHE_TIME = 6h&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[database]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Database to use. Either &quot;mysql&quot;, &quot;postgres&quot;, &quot;mssql&quot; or &quot;sqlite3&quot;.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; MySQL Configuration&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;DB_TYPE = mysql&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;HOST = 127.0.0.1:3306 ; can use socket e.g. /var/run/mysqld/mysqld.sock&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NAME = gitea&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;USER = root&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PASSWD = ;Use PASSWD = `your password` for quoting if you use special characters in the password.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSL_MODE = false ; either &quot;false&quot; (default), &quot;true&quot;, or &quot;skip-verify&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;CHARSET = utf8mb4 ;either &quot;utf8&quot; or &quot;utf8mb4&quot;, default is &quot;utf8mb4&quot;.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; NOTICE: for &quot;utf8mb4&quot; you must use MySQL InnoDB &gt; 5.6. Gitea is unable to check this.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Postgres Configuration&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DB_TYPE = postgres&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;HOST = 127.0.0.1:5432 ; can use socket e.g. /var/run/postgresql/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;NAME = gitea&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;USER = root&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PASSWD =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SCHEMA =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SSL_MODE=disable ;either &quot;disable&quot; (default), &quot;require&quot;, or &quot;verify-full&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; SQLite Configuration&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DB_TYPE = sqlite3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PATH= ; defaults to data/gitea.db&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SQLITE_TIMEOUT = ; Query timeout defaults to: 500&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SQLITE_JOURNAL_MODE = ; defaults to sqlite database default (often DELETE), can be used to enable WAL mode. https://www.sqlite.org/pragma.html#pragma_journal_mode&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; MSSQL Configuration&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DB_TYPE = mssql&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;HOST = 172.17.0.2:1433&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;NAME = gitea&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;USER = SA&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PASSWD = MwantsaSecurePassword1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Other settings&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; For iterate buffer, default is 50&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ITERATE_BUFFER_SIZE = 50&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Show the database generated SQL&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;LOG_SQL = false ; if unset defaults to true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Maximum number of DB Connect retries&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DB_RETRIES = 10&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Backoff time per DB retry (time.Duration)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DB_RETRY_BACKOFF = 3s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Max idle database connections on connection pool, default is 2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MAX_IDLE_CONNS = 2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Database connection max life time, default is 0 or 3s mysql (See #6804 &amp;#x26; #7071 for reasoning)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;CONN_MAX_LIFETIME = 3s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Database maximum number of open connections, default is 0 meaning no maximum&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MAX_OPEN_CONNS = 0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[security]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Whether the installer is disabled (set to true to disable the installer)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;INSTALL_LOCK = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Global secret key that will be used&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; This key is VERY IMPORTANT. If you lose it, the data encrypted by it (like 2FA secret) can&apos;t be decrypted anymore.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;SECRET_KEY =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Alternative location to specify secret key, instead of this file; you cannot specify both this and SECRET_KEY, and must pick one&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; This key is VERY IMPORTANT. If you lose it, the data encrypted by it (like 2FA secret) can&apos;t be decrypted anymore.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SECRET_KEY_URI = file:/etc/gitea/secret_key&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Secret used to validate communication within Gitea binary.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;INTERNAL_TOKEN=&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Alternative location to specify internal token, instead of this file; you cannot specify both this and INTERNAL_TOKEN, and must pick one&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;INTERNAL_TOKEN_URI = file:/etc/gitea/internal_token&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; How long to remember that a user is logged in before requiring relogin (in days)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;LOGIN_REMEMBER_DAYS = 7&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Name of the cookie used to store the current username.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;COOKIE_USERNAME = gitea_awesome&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Name of cookie used to store authentication information.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;COOKIE_REMEMBER_NAME = gitea_incredible&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Reverse proxy authentication header name of user name, email, and full name&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;REVERSE_PROXY_AUTHENTICATION_USER = X-WEBAUTH-USER&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;REVERSE_PROXY_AUTHENTICATION_EMAIL = X-WEBAUTH-EMAIL&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;REVERSE_PROXY_AUTHENTICATION_FULL_NAME = X-WEBAUTH-FULLNAME&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Interpret X-Forwarded-For header or the X-Real-IP header and set this as the remote IP for the request&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;REVERSE_PROXY_LIMIT = 1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; List of IP addresses and networks separated by comma of trusted proxy servers. Use `*` to trust all.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;REVERSE_PROXY_TRUSTED_PROXIES = 127.0.0.0/8,::1/128&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; The minimum password length for new Users&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MIN_PASSWORD_LENGTH = 6&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Set to true to allow users to import local server paths&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;IMPORT_LOCAL_PATHS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Set to false to allow users with git hook privileges to create custom git hooks.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Custom git hooks can be used to perform arbitrary code execution on the host operating system.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; This enables the users to access and modify this config file and the Gitea database and interrupt the Gitea service.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; By modifying the Gitea database, users can gain Gitea administrator privileges.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; It also enables them to access other resources available to the user on the operating system that is running the Gitea instance and perform arbitrary actions in the name of the Gitea OS user.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; WARNING: This maybe harmful to you website or your operating system.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; WARNING: Setting this to true does not change existing hooks in git repos; adjust it before if necessary.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DISABLE_GIT_HOOKS = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Set to true to disable webhooks feature.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DISABLE_WEBHOOKS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Set to false to allow pushes to gitea repositories despite having an incomplete environment - NOT RECOMMENDED&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ONLY_ALLOW_PUSH_IF_GITEA_ENVIRONMENT_SET = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;Comma separated list of character classes required to pass minimum complexity.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;If left empty or no valid values are specified, the default is off (no checking)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;Classes include &quot;lower,upper,digit,spec&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PASSWORD_COMPLEXITY = off&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Password Hash algorithm, either &quot;argon2&quot;, &quot;pbkdf2&quot;, &quot;scrypt&quot; or &quot;bcrypt&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PASSWORD_HASH_ALGO = pbkdf2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Set false to allow JavaScript to read CSRF cookie&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;CSRF_COOKIE_HTTP_ONLY = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Validate against https://haveibeenpwned.com/Passwords to see if a password has been exposed&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PASSWORD_CHECK_PWN = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Cache successful token hashes. API tokens are stored in the DB as pbkdf2 hashes however, this means that there is a potentially significant hashing load when there are multiple API operations.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; This cache will store the successfully hashed tokens in a LRU cache as a balance between performance and security.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SUCCESSFUL_TOKENS_CACHE_SIZE = 20&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[camo]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; At the moment we only support images&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; if the camo is enabled&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; url to a camo image proxy, it **is required** if camo is enabled.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SERVER_URL =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; HMAC to encode urls with, it **is required** if camo is enabled.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;HMAC_KEY =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Set to true to use camo for https too lese only non https urls are proxyed&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ALLWAYS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[oauth2]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Enables OAuth2 provider&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ENABLE = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Algorithm used to sign OAuth2 tokens. Valid values: HS256, HS384, HS512, RS256, RS384, RS512, ES256, ES384, ES512, EdDSA&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;JWT_SIGNING_ALGORITHM = RS256&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Private key file path used to sign OAuth2 tokens. The path is relative to APP_DATA_PATH.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; This setting is only needed if JWT_SIGNING_ALGORITHM is set to RS256, RS384, RS512, ES256, ES384 or ES512.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; The file must contain a RSA or ECDSA private key in the PKCS8 format. If no key exists a 4096 bit key will be created for you.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;JWT_SIGNING_PRIVATE_KEY_FILE = jwt/private.pem&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; OAuth2 authentication secret for access and refresh tokens, change this yourself to a unique string. CLI generate option is helpful in this case. https://docs.gitea.io/en-us/command-line/#generate&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; This setting is only needed if JWT_SIGNING_ALGORITHM is set to HS256, HS384 or HS512.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;JWT_SECRET =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Lifetime of an OAuth2 access token in seconds&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ACCESS_TOKEN_EXPIRATION_TIME = 3600&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Lifetime of an OAuth2 refresh token in hours&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;REFRESH_TOKEN_EXPIRATION_TIME = 730&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Check if refresh token got already used&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;INVALIDATE_REFRESH_TOKENS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Maximum length of oauth2 token/cookie stored on server&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MAX_TOKEN_LENGTH = 32767&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[log]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Root path for the log files - defaults to %(GITEA_WORK_DIR)/log&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ROOT_PATH =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Main Logger&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Either &quot;console&quot;, &quot;file&quot;, &quot;conn&quot;, &quot;smtp&quot; or &quot;database&quot;, default is &quot;console&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Use comma to separate multiple modes, e.g. &quot;console, file&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;MODE = console&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Either &quot;Trace&quot;, &quot;Debug&quot;, &quot;Info&quot;, &quot;Warn&quot;, &quot;Error&quot;, &quot;Critical&quot; or &quot;None&quot;, default is &quot;Info&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;LEVEL = Info&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Router Logger&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Switch off the router log&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DISABLE_ROUTER_LOG=false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Set the log &quot;modes&quot; for the router log (if file is set the log file will default to router.log)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ROUTER = console&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; The router will log different things at different levels.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; * started messages will be logged at TRACE level&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; * polling/completed routers will be logged at INFO&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; * slow routers will be logged at WARN&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; * failed routers will be logged at WARN&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; The routing level will default to that of the system but individual router level can be set in&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; [log.&amp;#x3C;mode&gt;.router] LEVEL&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Access Logger (Creates log in NCSA common log format)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLE_ACCESS_LOG = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Set the log &quot;modes&quot; for the access log (if file is set the log file will default to access.log)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ACCESS = file&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Sets the template used to create the access log.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ACCESS_LOG_TEMPLATE = {{.Ctx.RemoteAddr}} - {{.Identity}} {{.Start.Format &quot;[02/Jan/2006:15:04:05 -0700]&quot; }} &quot;{{.Ctx.Req.Method}} {{.Ctx.Req.URL.RequestURI}} {{.Ctx.Req.Proto}}&quot; {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} &quot;{{.Ctx.Req.Referer}}\&quot; \&quot;{{.Ctx.Req.UserAgent}}&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; SSH log (Creates log from ssh git request)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLE_SSH_LOG = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Other Settings&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Print Stacktraces with logs. (Rarely helpful.) Either &quot;Trace&quot;, &quot;Debug&quot;, &quot;Info&quot;, &quot;Warn&quot;, &quot;Error&quot;, &quot;Critical&quot;, default is &quot;None&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;STACKTRACE_LEVEL = None&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Buffer length of the channel, keep it as it is if you don&apos;t know what it is.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;BUFFER_LEN = 10000&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Creating specific log configuration&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; You can set specific configuration for individual modes and subloggers&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Configuration available to all log modes/subloggers&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;LEVEL=&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;FLAGS = stdflags&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;EXPRESSION =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PREFIX =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;COLORIZE = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; For &quot;console&quot; mode only&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;STDERR = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; For &quot;file&quot; mode only&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;LEVEL =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Set the file_name for the logger. If this is a relative path this&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; will be relative to ROOT_PATH&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;FILE_NAME =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; This enables automated log rotate(switch of following options), default is true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;LOG_ROTATE = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Max size shift of a single file, default is 28 means 1 &amp;#x3C;&amp;#x3C; 28, 256MB&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MAX_SIZE_SHIFT = 28&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Segment log daily, default is true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DAILY_ROTATE = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; delete the log file after n days, default is 7&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MAX_DAYS = 7&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; compress logs with gzip&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;COMPRESS = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; compression level see godoc for compress/gzip&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;COMPRESSION_LEVEL = -1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; For &quot;conn&quot; mode only&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;LEVEL =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Reconnect host for every single message, default is false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RECONNECT_ON_MSG = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Try to reconnect when connection is lost, default is false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RECONNECT = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Either &quot;tcp&quot;, &quot;unix&quot; or &quot;udp&quot;, default is &quot;tcp&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PROTOCOL = tcp&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Host address&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ADDR =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; For &quot;smtp&quot; mode only&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;LEVEL =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Name displayed in mail title, default is &quot;Diagnostic message from server&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SUBJECT = Diagnostic message from server&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Mail server&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;HOST =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Mailer user name and password&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;USER =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Use PASSWD = `your password` for quoting if you use special characters in the password.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PASSWD =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Receivers, can be one or more, e.g. 1@example.com,2@example.com&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RECEIVERS =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[git]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; The path of git executable. If empty, Gitea searches through the PATH environment.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PATH =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; The HOME directory for Git&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;HOME_PATH = %(APP_DATA_PATH)/home&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Disables highlight of added and removed changes&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DISABLE_DIFF_HIGHLIGHT = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Max number of lines allowed in a single file in diff view&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MAX_GIT_DIFF_LINES = 1000&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Max number of allowed characters in a line in diff view&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MAX_GIT_DIFF_LINE_CHARACTERS = 5000&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Max number of files shown in diff view&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MAX_GIT_DIFF_FILES = 100&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Set the default commits range size&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;COMMITS_RANGE_SIZE = 50&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Set the default branches range size&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;BRANCHES_RANGE_SIZE = 20&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Arguments for command &apos;git gc&apos;, e.g. &quot;--aggressive --auto&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; see more on http://git-scm.com/docs/git-gc/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;GC_ARGS =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; If use git wire protocol version 2 when git version &gt;= 2.18, default is true, set to false when you always want git wire protocol version 1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; To enable this for Git over SSH when using a OpenSSH server, add `AcceptEnv GIT_PROTOCOL` to your sshd_config file.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLE_AUTO_GIT_WIRE_PROTOCOL = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Respond to pushes to a non-default branch with a URL for creating a Pull Request (if the repository has them enabled)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PULL_REQUEST_PUSH_MESSAGE = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; (Go-Git only) Don&apos;t cache objects greater than this in memory. (Set to 0 to disable.)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;LARGE_OBJECT_THRESHOLD = 1048576&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Set to true to forcibly set core.protectNTFS=false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DISABLE_CORE_PROTECT_NTFS=false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Disable the usage of using partial clones for git.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DISABLE_PARTIAL_CLONE = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[service]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Time limit to confirm account/email registration&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ACTIVE_CODE_LIVE_MINUTES = 180&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Time limit to perform the reset of a forgotten password&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RESET_PASSWD_CODE_LIVE_MINUTES = 180&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Whether a new user needs to confirm their email when registering.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;REGISTER_EMAIL_CONFIRM = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Whether a new user needs to be confirmed manually after registration. (Requires `REGISTER_EMAIL_CONFIRM` to be disabled.)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;REGISTER_MANUAL_CONFIRM = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; List of domain names that are allowed to be used to register on a Gitea instance&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; gitea.io,example.com&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;EMAIL_DOMAIN_WHITELIST =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Comma-separated list of domain names that are not allowed to be used to register on a Gitea instance&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;EMAIL_DOMAIN_BLOCKLIST =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Disallow registration, only allow admins to create accounts.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DISABLE_REGISTRATION = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Allow registration only using gitea itself, it works only when DISABLE_REGISTRATION is false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ALLOW_ONLY_INTERNAL_REGISTRATION = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Allow registration only using third-party services, it works only when DISABLE_REGISTRATION is false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ALLOW_ONLY_EXTERNAL_REGISTRATION = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; User must sign in to view anything.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;REQUIRE_SIGNIN_VIEW = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Mail notification&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLE_NOTIFY_MAIL = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; This setting enables gitea to be signed in with HTTP BASIC Authentication using the user&apos;s password&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; If you set this to false you will not be able to access the tokens endpoints on the API with your password&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Please note that setting this to false will not disable OAuth Basic or Basic authentication using a token&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLE_BASIC_AUTHENTICATION = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; More detail: https://github.com/gogits/gogs/issues/165&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLE_REVERSE_PROXY_AUTHENTICATION = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLE_REVERSE_PROXY_EMAIL = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLE_REVERSE_PROXY_FULL_NAME = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Enable captcha validation for registration&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLE_CAPTCHA = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Type of captcha you want to use. Options: image, recaptcha, hcaptcha, mcaptcha.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;CAPTCHA_TYPE = image&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Change this to use recaptcha.net or other recaptcha service&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RECAPTCHA_URL = https://www.google.com/recaptcha/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Enable recaptcha to use Google&apos;s recaptcha service&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Go to https://www.google.com/recaptcha/admin to sign up for a key&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RECAPTCHA_SECRET =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RECAPTCHA_SITEKEY =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; For hCaptcha, create an account at https://accounts.hcaptcha.com/login to get your keys&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;HCAPTCHA_SECRET =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;HCAPTCHA_SITEKEY =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Change this to use demo.mcaptcha.org or your self-hosted mcaptcha.org instance.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MCAPTCHA_URL = https://demo.mcaptcha.org&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Go to your configured mCaptcha instance and register a sitekey&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; and use your account&apos;s secret.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MCAPTCHA_SECRET =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MCAPTCHA_SITEKEY =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Default value for KeepEmailPrivate&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Each new user will get the value of this setting copied into their profile&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_KEEP_EMAIL_PRIVATE = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Default value for AllowCreateOrganization&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Every new user will have rights set to create organizations depending on this setting&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_ALLOW_CREATE_ORGANIZATION = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Default value for IsRestricted&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Every new user will have restricted permissions depending on this setting&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_USER_IS_RESTRICTED = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Either &quot;public&quot;, &quot;limited&quot; or &quot;private&quot;, default is &quot;public&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Limited is for users visible only to signed users&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Private is for users visible only to members of their organizations&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Public is for users visible for everyone&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_USER_VISIBILITY = public&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Set which visibility modes a user can have&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ALLOWED_USER_VISIBILITY_MODES = public,limited,private&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Either &quot;public&quot;, &quot;limited&quot; or &quot;private&quot;, default is &quot;public&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Limited is for organizations visible only to signed users&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Private is for organizations visible only to members of the organization&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Public is for organizations visible to everyone&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_ORG_VISIBILITY = public&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Default value for DefaultOrgMemberVisible&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; True will make the membership of the users visible when added to the organisation&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_ORG_MEMBER_VISIBLE = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Default value for EnableDependencies&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Repositories will use dependencies by default depending on this setting&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_ENABLE_DEPENDENCIES = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Dependencies can be added from any repository where the user is granted access or only from the current repository depending on this setting.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ALLOW_CROSS_REPOSITORY_DEPENDENCIES = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Enable heatmap on users profiles.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLE_USER_HEATMAP = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Enable Timetracking&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLE_TIMETRACKING = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Default value for EnableTimetracking&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Repositories will use timetracking by default depending on this setting&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_ENABLE_TIMETRACKING = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Default value for AllowOnlyContributorsToTrackTime&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Only users with write permissions can track time if this is true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_ALLOW_ONLY_CONTRIBUTORS_TO_TRACK_TIME = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Value for the domain part of the user&apos;s email address in the git log if user&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; has set KeepEmailPrivate to true. The user&apos;s email will be replaced with a&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; concatenation of the user name in lower case, &quot;@&quot; and NO_REPLY_ADDRESS. Default&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; value is &quot;noreply.&quot; + DOMAIN, where DOMAIN resolves to the value from server.DOMAIN&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Note: do not use the &amp;#x3C;DOMAIN&gt; notation below&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;NO_REPLY_ADDRESS = ; noreply.&amp;#x3C;DOMAIN&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Show Registration button&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SHOW_REGISTRATION_BUTTON = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Show milestones dashboard page - a view of all the user&apos;s milestones&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SHOW_MILESTONES_DASHBOARD_PAGE = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Default value for AutoWatchNewRepos&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; When adding a repo to a team or creating a new repo all team members will watch the&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; repo automatically if enabled&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;AUTO_WATCH_NEW_REPOS = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Default value for AutoWatchOnChanges&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Make the user watch a repository When they commit for the first time&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;AUTO_WATCH_ON_CHANGES = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Minimum amount of time a user must exist before comments are kept when the user is deleted.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;USER_DELETE_WITH_COMMENTS_MAX_TIME = 0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Valid site url schemes for user profiles&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;VALID_SITE_URL_SCHEMES=http,https&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Other Settings&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Uncomment the [section.header] if you wish to&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; set the below settings.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[repository]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Root path for storing all repository data. By default, it is set to %(APP_DATA_PATH)/gitea-repositories.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; A relative path is interpreted as %(GITEA_WORK_DIR)/%(ROOT)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ROOT =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; The script type this server supports. Usually this is `bash`, but some users report that only `sh` is available.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SCRIPT_TYPE = bash&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; DETECTED_CHARSETS_ORDER tie-break order for detected charsets.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; If the charsets have equal confidence, tie-breaking will be done by order in this list&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; with charsets earlier in the list chosen in preference to those later.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Adding &quot;defaults&quot; will place the unused charsets at that position.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DETECTED_CHARSETS_ORDER = UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE, ISO-8859, windows-1252, ISO-8859, windows-1250, ISO-8859, ISO-8859, ISO-8859, windows-1253, ISO-8859, windows-1255, ISO-8859, windows-1251, windows-1256, KOI8-R, ISO-8859, windows-1254, Shift_JIS, GB18030, EUC-JP, EUC-KR, Big5, ISO-2022, ISO-2022, ISO-2022, IBM424_rtl, IBM424_ltr, IBM420_rtl, IBM420_ltr&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Default ANSI charset to override non-UTF-8 charsets to&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ANSI_CHARSET =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Force every new repository to be private&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;FORCE_PRIVATE = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Default privacy setting when creating a new repository, allowed values: last, private, public. Default is last which means the last setting used.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_PRIVATE = last&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Default private when using push-to-create&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_PUSH_CREATE_PRIVATE = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Global limit of repositories per user, applied at creation time. -1 means no limit&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MAX_CREATION_LIMIT = -1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Mirror sync queue length, increase if mirror syncing starts hanging (DEPRECATED: please use [queue.mirror] LENGTH instead)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MIRROR_QUEUE_LENGTH = 1000&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Patch test queue length, increase if pull request patch testing starts hanging (DEPRECATED: please use [queue.pr_patch_checker] LENGTH instead)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PULL_REQUEST_QUEUE_LENGTH = 1000&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Preferred Licenses to place at the top of the List&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; The name here must match the filename in options/license or custom/options/license&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PREFERRED_LICENSES = Apache License 2.0,MIT License&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Disable the ability to interact with repositories using the HTTP protocol&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DISABLE_HTTP_GIT = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Value for Access-Control-Allow-Origin header, default is not to present&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; WARNING: This may be harmful to your website if you do not give it a right value.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ACCESS_CONTROL_ALLOW_ORIGIN =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Force ssh:// clone url instead of scp-style uri when default SSH port is used&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;USE_COMPAT_SSH_URI = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Close issues as long as a commit on any branch marks it as fixed&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Comma separated list of globally disabled repo units. Allowed values: repo.issues, repo.ext_issues, repo.pulls, repo.wiki, repo.ext_wiki, repo.projects&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DISABLED_REPO_UNITS =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Comma separated list of default repo units. Allowed values: repo.code, repo.releases, repo.issues, repo.pulls, repo.wiki, repo.projects.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Note: Code and Releases can currently not be deactivated. If you specify default repo units you should still list them for future compatibility.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; External wiki and issue tracker can&apos;t be enabled by default as it requires additional settings.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Disabled repo units will not be added to new repositories regardless if it is in the default list.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_REPO_UNITS = repo.code,repo.releases,repo.issues,repo.pulls,repo.wiki,repo.projects&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Prefix archive files by placing them in a directory named after the repository&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PREFIX_ARCHIVE_FILES = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Disable migrating feature.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DISABLE_MIGRATIONS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Disable stars feature.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DISABLE_STARS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; The default branch name of new repositories&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_BRANCH = main&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Allow adoption of unadopted repositories&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Allow deletion of unadopted repositories&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ALLOW_DELETION_OF_UNADOPTED_REPOSITORIES = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Don&apos;t allow download source archive files from UI&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DISABLE_DOWNLOAD_SOURCE_ARCHIVES = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[repository.editor]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; List of file extensions for which lines should be wrapped in the Monaco editor&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Separate extensions with a comma. To line wrap files without an extension, just put a comma&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;LINE_WRAP_EXTENSIONS = .txt,.md,.markdown,.mdown,.mkd,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Valid file modes that have a preview API associated with them, such as api/v1/markdown&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Separate the values by commas. The preview tab in edit mode won&apos;t be displayed if the file extension doesn&apos;t match&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PREVIEWABLE_FILE_MODES = markdown&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[repository.local]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Path for local repository copy. Defaults to `tmp/local-repo` (content gets deleted on gitea restart)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;LOCAL_COPY_PATH = tmp/local-repo&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[repository.upload]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Whether repository file uploads are enabled. Defaults to `true`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Path for uploads. Defaults to `data/tmp/uploads` (content gets deleted on gitea restart)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;TEMP_PATH = data/tmp/uploads&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ALLOWED_TYPES =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Max size of each file in megabytes. Defaults to 3MB&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;FILE_MAX_SIZE = 3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Max number of files per upload. Defaults to 5&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MAX_FILES = 5&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[repository.pull-request]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; List of prefixes used in Pull Request title to mark them as Work In Progress (matched in a case-insensitive manner)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;WORK_IN_PROGRESS_PREFIXES = WIP:,[WIP]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; List of keywords used in Pull Request comments to automatically close a related issue&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;CLOSE_KEYWORDS = close,closes,closed,fix,fixes,fixed,resolve,resolves,resolved&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; List of keywords used in Pull Request comments to automatically reopen a related issue&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;REOPEN_KEYWORDS = reopen,reopens,reopened&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Set default merge style for repository creating, valid options: merge, rebase, rebase-merge, squash&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_MERGE_STYLE = merge&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; In the default merge message for squash commits include at most this many commits&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_MERGE_MESSAGE_COMMITS_LIMIT = 50&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; In the default merge message for squash commits limit the size of the commit messages to this&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_MERGE_MESSAGE_SIZE = 5120&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; In the default merge message for squash commits walk all commits to include all authors in the Co-authored-by otherwise just use those in the limited list&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_MERGE_MESSAGE_ALL_AUTHORS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; In default merge messages limit the number of approvers listed as Reviewed-by: to this many&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_MERGE_MESSAGE_MAX_APPROVERS = 10&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; In default merge messages only include approvers who are official&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_MERGE_MESSAGE_OFFICIAL_APPROVERS_ONLY = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Add co-authored-by and co-committed-by trailers if committer does not match author&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ADD_CO_COMMITTER_TRAILERS = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; In addition to testing patches using the three-way merge method, re-test conflicting patches with git apply&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;TEST_CONFLICTING_PATCHES_WITH_GIT_APPLY = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[repository.issue]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; List of reasons why a Pull Request or Issue can be locked&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;LOCK_REASONS = Too heated,Off-topic,Resolved,Spam&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[repository.release]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ALLOWED_TYPES =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_PAGING_NUM = 10&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[repository.signing]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; GPG key to use to sign commits, Defaults to the default - that is the value of git config --get user.signingkey&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; run in the context of the RUN_USER&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Switch to none to stop signing completely&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SIGNING_KEY = default&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; If a SIGNING_KEY ID is provided and is not set to default, use the provided Name and Email address as the signer.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; These should match a publicized name and email address for the key. (When SIGNING_KEY is default these are set to&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; the results of git config --get user.name and git config --get user.email respectively and can only be overridden&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; by setting the SIGNING_KEY ID to the correct ID.)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SIGNING_NAME =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SIGNING_EMAIL =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Sets the default trust model for repositories. Options are: collaborator, committer, collaboratorcommitter&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_TRUST_MODEL = collaborator&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Determines when gitea should sign the initial commit when creating a repository&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Either:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; - never&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; - pubkey: only sign if the user has a pubkey&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; - twofa: only sign if the user has logged in with twofa&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; - always&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; options other than none and always can be combined as comma separated list&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;INITIAL_COMMIT = always&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Determines when to sign for CRUD actions&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; - as above&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; - parentsigned: requires that the parent commit is signed.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;CRUD_ACTIONS = pubkey, twofa, parentsigned&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Determines when to sign Wiki commits&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; - as above&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;WIKI = never&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Determines when to sign on merges&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; - basesigned: require that the parent of commit on the base repo is signed.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; - commitssigned: require that all the commits in the head branch are signed.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; - approved: only sign when merging an approved pr to a protected branch&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MERGES = pubkey, twofa, basesigned, commitssigned&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[repository.mimetype_mapping]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Custom MIME type mapping for downloadable files&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;.apk=application/vnd.android.package-archive&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[project]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Default templates for project boards&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PROJECT_BOARD_BASIC_KANBAN_TYPE = To Do, In Progress, Done&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PROJECT_BOARD_BUG_TRIAGE_TYPE = Needs Triage, High Priority, Low Priority, Closed&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[cors]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; More information about CORS can be found here: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#The_HTTP_response_headers&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; enable cors headers (disabled by default)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; scheme of allowed requests&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SCHEME = http&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; list of requesting domains that are allowed&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ALLOW_DOMAIN = *&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; allow subdomains of headers listed above to request&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ALLOW_SUBDOMAIN = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; list of methods allowed to request&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;METHODS = GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; max time to cache response&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MAX_AGE = 10m&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; allow request with credentials&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ALLOW_CREDENTIALS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; set X-FRAME-OPTIONS header&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;X_FRAME_OPTIONS = SAMEORIGIN&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[ui]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Number of repositories that are displayed on one explore page&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;EXPLORE_PAGING_NUM = 20&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Number of issues that are displayed on one page&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ISSUE_PAGING_NUM = 20&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Number of maximum commits displayed in one activity feed&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;FEED_MAX_COMMIT_NUM = 5&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Number of items that are displayed in home feed&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;FEED_PAGING_NUM = 20&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Number of items that are displayed in a single subsitemap&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SITEMAP_PAGING_NUM = 20&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Number of maximum commits displayed in commit graph.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;GRAPH_MAX_COMMIT_NUM = 100&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Number of line of codes shown for a code comment&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;CODE_COMMENT_LINES = 4&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Value of `theme-color` meta tag, used by Android &gt;= 5.0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; An invalid color like &quot;none&quot; or &quot;disable&quot; will have the default style&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; More info: https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;THEME_COLOR_META_TAG = `#6cc644`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Max size of files to be displayed (default is 8MiB)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MAX_DISPLAY_FILE_SIZE = 8388608&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Whether the email of the user should be shown in the Explore Users page&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SHOW_USER_EMAIL = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Set the default theme for the Gitea install&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_THEME = auto&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; All available themes. Allow users select personalized themes regardless of the value of `DEFAULT_THEME`.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;THEMES = auto,gitea,arc-green&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; All available reactions users can choose on issues/prs and comments.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Values can be emoji alias (:smile:) or a unicode emoji.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; For custom reactions, add a tightly cropped square image to public/img/emoji/reaction_name.png&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;REACTIONS = +1, -1, laugh, hooray, confused, heart, rocket, eyes&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Additional Emojis not defined in the utf8 standard&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; By default we support gitea (:gitea:), to add more copy them to public/img/emoji/emoji_name.png and add it to this config.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Dont mistake it for Reactions.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;CUSTOM_EMOJIS = gitea, codeberg, gitlab, git, github, gogs&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Whether the full name of the users should be shown where possible. If the full name isn&apos;t set, the username will be used.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_SHOW_FULL_NAME = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Whether to search within description at repository search on explore page.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SEARCH_REPO_DESCRIPTION = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Whether to enable a Service Worker to cache frontend assets&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;USE_SERVICE_WORKER = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Whether to only show relevant repos on the explore page when no keyword is specified and default sorting is used.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; A repo is considered irrelevant if it&apos;s a fork or if it has no metadata (no description, no icon, no topic).&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ONLY_SHOW_RELEVANT_REPOS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[ui.admin]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Number of users that are displayed on one page&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;USER_PAGING_NUM = 50&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Number of repos that are displayed on one page&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;REPO_PAGING_NUM = 50&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Number of notices that are displayed on one page&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;NOTICE_PAGING_NUM = 25&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Number of organizations that are displayed on one page&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ORG_PAGING_NUM = 50&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[ui.user]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Number of repos that are displayed on one page&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;REPO_PAGING_NUM = 15&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[ui.meta]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;AUTHOR = Gitea - Git with a cup of tea&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DESCRIPTION = Gitea (Git with a cup of tea) is a painless self-hosted Git service written in Go&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;KEYWORDS = go,git,self-hosted,gitea&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[ui.notification]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Control how often the notification endpoint is polled to update the notification&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; The timeout will increase to MAX_TIMEOUT in TIMEOUT_STEPs if the notification count is unchanged&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Set MIN_TIMEOUT to -1 to turn off&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MIN_TIMEOUT = 10s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MAX_TIMEOUT = 60s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;TIMEOUT_STEP = 10s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; This setting determines how often the db is queried to get the latest notification counts.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; If the browser client supports EventSource and SharedWorker, a SharedWorker will be used in preference to polling notification. Set to -1 to disable the EventSource&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;EVENT_SOURCE_UPDATE_TIME = 10s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[ui.svg]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Whether to render SVG files as images.  If SVG rendering is disabled, SVG files are displayed as text and cannot be embedded in markdown files as images.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLE_RENDER = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[ui.csv]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Maximum allowed file size in bytes to render CSV files as table. (Set to 0 for no limit).&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MAX_FILE_SIZE = 524288&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[markdown]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Render soft line breaks as hard line breaks, which means a single newline character between&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; paragraphs will cause a line break and adding trailing whitespace to paragraphs is not&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; necessary to force a line break.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Render soft line breaks as hard line breaks for comments&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLE_HARD_LINE_BREAK_IN_COMMENTS = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Render soft line breaks as hard line breaks for markdown documents&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLE_HARD_LINE_BREAK_IN_DOCUMENTS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Comma separated list of custom URL-Schemes that are allowed as links when rendering Markdown&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; for example git,magnet,ftp (more at https://en.wikipedia.org/wiki/List_of_URI_schemes)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; URLs starting with http and https are always displayed, whatever is put in this entry.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;CUSTOM_URL_SCHEMES =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; List of file extensions that should be rendered/edited as Markdown&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Separate the extensions with a comma. To render files without any extension as markdown, just put a comma&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;FILE_EXTENSIONS = .md,.markdown,.mdown,.mkd&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Enables math inline and block detection&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLE_MATH = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[ssh.minimum_key_sizes]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Define allowed algorithms and their minimum key length (use -1 to disable a type)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ED25519 = 256&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ECDSA = 256&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RSA = 2047 ; we allow 2047 here because an otherwise valid 2048 bit RSA key can be reported as having 2047 bit length&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DSA = -1 ; set to 1024 to switch on&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[indexer]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Issue Indexer settings&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Issue indexer type, currently support: bleve, db or elasticsearch, default is bleve&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ISSUE_INDEXER_TYPE = bleve&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Issue indexer storage path, available when ISSUE_INDEXER_TYPE is bleve&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ISSUE_INDEXER_PATH = indexers/issues.bleve&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Issue indexer connection string, available when ISSUE_INDEXER_TYPE is elasticsearch&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ISSUE_INDEXER_CONN_STR = http://elastic:changeme@localhost:9200&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Issue indexer name, available when ISSUE_INDEXER_TYPE is elasticsearch&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ISSUE_INDEXER_NAME = gitea_issues&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Timeout the indexer if it takes longer than this to start.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Set to -1 to disable timeout.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;STARTUP_TIMEOUT = 30s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Issue indexer queue, currently support: channel, levelqueue or redis, default is levelqueue (deprecated - use [queue.issue_indexer])&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ISSUE_INDEXER_QUEUE_TYPE = levelqueue; **DEPRECATED** use settings in `[queue.issue_indexer]`.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; When ISSUE_INDEXER_QUEUE_TYPE is levelqueue, this will be the path where the queue will be saved.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; This can be overridden by `ISSUE_INDEXER_QUEUE_CONN_STR`.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; default is queues/common&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ISSUE_INDEXER_QUEUE_DIR = queues/common; **DEPRECATED** use settings in `[queue.issue_indexer]`.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; When `ISSUE_INDEXER_QUEUE_TYPE` is `redis`, this will store the redis connection string.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; When `ISSUE_INDEXER_QUEUE_TYPE` is `levelqueue`, this is a directory or additional options of&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; the form `leveldb://path/to/db?option=value&amp;#x26;....`, and overrides `ISSUE_INDEXER_QUEUE_DIR`.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ISSUE_INDEXER_QUEUE_CONN_STR = &quot;addrs=127.0.0.1:6379 db=0&quot;; **DEPRECATED** use settings in `[queue.issue_indexer]`.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Batch queue number, default is 20&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ISSUE_INDEXER_QUEUE_BATCH_NUMBER = 20; **DEPRECATED** use settings in `[queue.issue_indexer]`.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Repository Indexer settings&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; repo indexer by default disabled, since it uses a lot of disk space&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;REPO_INDEXER_ENABLED = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Code search engine type, could be `bleve` or `elasticsearch`.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;REPO_INDEXER_TYPE = bleve&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Index file used for code search. available when `REPO_INDEXER_TYPE` is bleve&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;REPO_INDEXER_PATH = indexers/repos.bleve&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Code indexer connection string, available when `REPO_INDEXER_TYPE` is elasticsearch. i.e. http://elastic:changeme@localhost:9200&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;REPO_INDEXER_CONN_STR =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Code indexer name, available when `REPO_INDEXER_TYPE` is elasticsearch&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;REPO_INDEXER_NAME = gitea_codes&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; A comma separated list of glob patterns (see https://github.com/gobwas/glob) to include&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; in the index; default is empty&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;REPO_INDEXER_INCLUDE =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; A comma separated list of glob patterns to exclude from the index; ; default is empty&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;REPO_INDEXER_EXCLUDE =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;UPDATE_BUFFER_LEN = 20; **DEPRECATED** use settings in `[queue.issue_indexer]`.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MAX_FILE_SIZE = 1048576&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[queue]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Specific queues can be individually configured with [queue.name]. [queue] provides defaults&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; ([queue.issue_indexer] is special due to the old configuration described above)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; General queue queue type, currently support: persistable-channel, channel, level, redis, dummy&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; default to persistable-channel&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;TYPE = persistable-channel&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; data-dir for storing persistable queues and level queues, individual queues will default to `queues/common` meaning the queue is shared.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DATADIR = queues/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Default queue length before a channel queue will block&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;LENGTH = 20&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Batch size to send for batched queues&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;BATCH_LENGTH = 20&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Connection string for redis queues this will store the redis connection string.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; When `TYPE` is `persistable-channel`, this provides a directory for the underlying leveldb&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; or additional options of the form `leveldb://path/to/db?option=value&amp;#x26;....`, and will override `DATADIR`.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;CONN_STR = &quot;addrs=127.0.0.1:6379 db=0&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Provides the suffix of the default redis/disk queue name - specific queues can be overridden within in their [queue.name] sections.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;QUEUE_NAME = &quot;_queue&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Provides the suffix of the default redis/disk unique queue set name - specific queues can be overridden within in their [queue.name] sections.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SET_NAME = &quot;_unique&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; If the queue cannot be created at startup - level queues may need a timeout at startup - wrap the queue:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;WRAP_IF_NECESSARY = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Attempt to create the wrapped queue at max&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MAX_ATTEMPTS = 10&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Timeout queue creation&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;TIMEOUT = 15m30s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Create a pool with this many workers&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;WORKERS = 0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Dynamically scale the worker pool to at this many workers&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MAX_WORKERS = 10&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Add boost workers when the queue blocks for BLOCK_TIMEOUT&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;BLOCK_TIMEOUT = 1s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Remove the boost workers after BOOST_TIMEOUT&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;BOOST_TIMEOUT = 5m&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; During a boost add BOOST_WORKERS&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;BOOST_WORKERS = 1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[admin]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Disallow regular (non-admin) users from creating organizations.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DISABLE_REGULAR_ORG_CREATION = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Default configuration for email notifications for users (user configurable). Options: enabled, onmention, disabled&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_EMAIL_NOTIFICATIONS = enabled&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[openid]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; OpenID is an open, standard and decentralized authentication protocol.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Your identity is the address of a webpage you provide, which describes&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; how to prove you are in control of that page.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; For more info: https://en.wikipedia.org/wiki/OpenID&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Current implementation supports OpenID-2.0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Tested to work providers at the time of writing:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;  - Any GNUSocial node (your.hostname.tld/username)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;  - Any SimpleID provider (http://simpleid.koinic.net)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;  - http://openid.org.cn/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;  - openid.stackexchange.com&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;  - login.launchpad.net&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;  - &amp;#x3C;username&gt;.livejournal.com&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Whether to allow signin in via OpenID&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLE_OPENID_SIGNIN = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Whether to allow registering via OpenID&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Do not include to rely on rhw DISABLE_REGISTRATION setting&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;ENABLE_OPENID_SIGNUP = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Allowed URI patterns (POSIX regexp).&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Space separated.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Only these would be allowed if non-blank.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Example value: trusted.domain.org trusted.domain.net&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;WHITELISTED_URIS =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Forbidden URI patterns (POSIX regexp).&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Space separated.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Only used if WHITELISTED_URIS is blank.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Example value: loadaverage.org/badguy stackexchange.com/.*spammer&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;BLACKLISTED_URIS =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[oauth2_client]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Whether a new auto registered oauth2 user needs to confirm their email.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Do not include to use the REGISTER_EMAIL_CONFIRM setting from the `[service]` section.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;REGISTER_EMAIL_CONFIRM =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Scopes for the openid connect oauth2 provider (separated by space, the openid scope is implicitly added).&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Typical values are profile and email.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; For more information about the possible values see https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;OPENID_CONNECT_SCOPES =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Automatically create user accounts for new oauth2 users.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLE_AUTO_REGISTRATION = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; The source of the username for new oauth2 accounts:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; userid = use the userid / sub attribute&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; nickname = use the nickname attribute&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; email = use the username part of the email attribute&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;USERNAME = nickname&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Update avatar if available from oauth2 provider.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Update will be performed on each login.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;UPDATE_AVATAR = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; How to handle if an account / email already exists:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; disabled = show an error&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; login = show an account linking login&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; auto = link directly with the account&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ACCOUNT_LINKING = login&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[webhook]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Hook task queue length, increase if webhook shooting starts hanging&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;QUEUE_LENGTH = 1000&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Deliver timeout in seconds&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DELIVER_TIMEOUT = 5&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Webhook can only call allowed hosts for security reasons. Comma separated list, eg: external, 192.168.1.0/24, *.mydomain.com&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Built-in: loopback (for localhost), private (for LAN/intranet), external (for public hosts on internet), * (for all hosts)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; CIDR list: 1.2.3.0/8, 2001:db8::/32&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Wildcard hosts: *.mydomain.com, 192.168.100.*&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Since 1.15.7. Default to * for 1.15.x, external for 1.16 and later&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ALLOWED_HOST_LIST = external&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Allow insecure certification&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SKIP_TLS_VERIFY = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Number of history information in each page&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PAGING_NUM = 10&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Proxy server URL, support http://, https//, socks://, blank will follow environment http_proxy/https_proxy&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PROXY_URL =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Comma separated list of host names requiring proxy. Glob patterns (*) are accepted; use ** to match all hosts.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PROXY_HOSTS =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[mailer]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; NOTICE: this section is for Gitea 1.18 and later. If you are using Gitea 1.17 or older,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; please refer to&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; https://github.com/go-gitea/gitea/blob/release/v1.17/custom/conf/app.example.ini&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; https://github.com/go-gitea/gitea/blob/release/v1.17/docs/content/doc/advanced/config-cheat-sheet.en-us.md&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Buffer length of channel, keep it as it is if you don&apos;t know what it is.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SEND_BUFFER_LEN = 100&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Prefix displayed before subject in mail&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SUBJECT_PREFIX =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Mail server protocol. One of &quot;smtp&quot;, &quot;smtps&quot;, &quot;smtp+starttls&quot;, &quot;smtp+unix&quot;, &quot;sendmail&quot;, &quot;dummy&quot;.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; - sendmail: use the operating system&apos;s `sendmail` command instead of SMTP. This is common on Linux systems.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; - dummy: send email messages to the log as a testing phase.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; If your provider does not explicitly say which protocol it uses but does provide a port,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; you can set SMTP_PORT instead and this will be inferred.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; (Before 1.18, see the notice, this was controlled via MAILER_TYPE and IS_TLS_ENABLED.)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PROTOCOL =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Mail server address, e.g. smtp.gmail.com.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; For smtp+unix, this should be a path to a unix socket instead.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; (Before 1.18, see the notice, this was combined with SMTP_PORT as HOST.)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SMTP_ADDR =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Mail server port. Common ports are:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;   25:  insecure SMTP&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;   465: SMTP Secure&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;   587: StartTLS&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; If no protocol is specified, it will be inferred by this setting.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; (Before 1.18, this was combined with SMTP_ADDR as HOST.)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SMTP_PORT =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Enable HELO operation. Defaults to true.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLE_HELO = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Custom hostname for HELO operation.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; If no value is provided, one is retrieved from system.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;HELO_HOSTNAME =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; If set to `true`, completely ignores server certificate validation errors.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; This option is unsafe. Consider adding the certificate to the system trust store instead.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;FORCE_TRUST_SERVER_CERT = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Use client certificate in connection.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;USE_CLIENT_CERT = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;CLIENT_CERT_FILE = custom/mailer/cert.pem&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;CLIENT_KEY_FILE = custom/mailer/key.pem&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Mail from address, RFC 5322. This can be just an email address, or the `&quot;Name&quot; &amp;#x3C;email@example.com&gt;` format&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;FROM =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Sometimes it is helpful to use a different address on the envelope. Set this to use ENVELOPE_FROM as the from on the envelope. Set to `&amp;#x3C;&gt;` to send an empty address.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENVELOPE_FROM =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Mailer user name and password, if required by provider.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;USER =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Use PASSWD = `your password` for quoting if you use special characters in the password.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PASSWD =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Send mails only in plain text, without HTML alternative&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SEND_AS_PLAIN_TEXT = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Specify an alternative sendmail binary&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SENDMAIL_PATH = sendmail&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Specify any extra sendmail arguments&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; WARNING: if your sendmail program interprets options you should set this to &quot;--&quot; or terminate these args with &quot;--&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SENDMAIL_ARGS =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Timeout for Sendmail&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SENDMAIL_TIMEOUT = 5m&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; convert \r\n to \n for Sendmail&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SENDMAIL_CONVERT_CRLF = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[cache]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; if the cache enabled&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Either &quot;memory&quot;, &quot;redis&quot;, &quot;memcache&quot;, or &quot;twoqueue&quot;. default is &quot;memory&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ADAPTER = memory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; For &quot;memory&quot; only, GC interval in seconds, default is 60&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;INTERVAL = 60&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; For &quot;redis&quot; and &quot;memcache&quot;, connection host address&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; memcache: `127.0.0.1:11211`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; twoqueue: `{&quot;size&quot;:50000,&quot;recent_ratio&quot;:0.25,&quot;ghost_ratio&quot;:0.5}` or `50000`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;HOST =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Time to keep items in cache if not used, default is 16 hours.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Setting it to -1 disables caching&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ITEM_TTL = 16h&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Last commit cache&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[cache.last_commit]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; if the cache enabled&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Time to keep items in cache if not used, default is 8760 hours.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Setting it to -1 disables caching&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ITEM_TTL = 8760h&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Only enable the cache when repository&apos;s commits count great than&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;COMMITS_COUNT = 1000&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[session]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Either &quot;memory&quot;, &quot;file&quot;, &quot;redis&quot;, &quot;db&quot;, &quot;mysql&quot;, &quot;couchbase&quot;, &quot;memcache&quot; or &quot;postgres&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Default is &quot;memory&quot;. &quot;db&quot; will reuse the configuration in [database]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PROVIDER = memory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Provider config options&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; memory: doesn&apos;t have any config yet&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; file: session file path, e.g. `data/sessions`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PROVIDER_CONFIG = data/sessions&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Session cookie name&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;COOKIE_NAME = i_like_gitea&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; If you use session in https only, default is false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;COOKIE_SECURE = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Session GC time interval in seconds, default is 86400 (1 day)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;GC_INTERVAL_TIME = 86400&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Session life time in seconds, default is 86400 (1 day)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SESSION_LIFE_TIME = 86400&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; SameSite settings. Either &quot;none&quot;, &quot;lax&quot;, or &quot;strict&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SAME_SITE=lax&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[picture]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;AVATAR_UPLOAD_PATH = data/avatars&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;REPOSITORY_AVATAR_UPLOAD_PATH = data/repo-avatars&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; How Gitea deals with missing repository avatars&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; none = no avatar will be displayed; random = random avatar will be displayed; image = default image will be used&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;REPOSITORY_AVATAR_FALLBACK = none&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;REPOSITORY_AVATAR_FALLBACK_IMAGE = /img/repo_default.png&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Max Width and Height of uploaded avatars.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; This is to limit the amount of RAM used when resizing the image.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;AVATAR_MAX_WIDTH = 4096&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;AVATAR_MAX_HEIGHT = 3072&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; The multiplication factor for rendered avatar images.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Larger values result in finer rendering on HiDPI devices.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;AVATAR_RENDERED_SIZE_FACTOR = 3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Maximum allowed file size for uploaded avatars.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; This is to limit the amount of RAM used when resizing the image.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;AVATAR_MAX_FILE_SIZE = 1048576&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Chinese users can choose &quot;duoshuo&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; or a custom avatar source, like: http://cn.gravatar.com/avatar/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;GRAVATAR_SOURCE = gravatar&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; This value will always be true in offline mode.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DISABLE_GRAVATAR = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Federated avatar lookup uses DNS to discover avatar associated&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; with emails, see https://www.libravatar.org&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; This value will always be false in offline mode or when Gravatar is disabled.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLE_FEDERATED_AVATAR = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[attachment]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Whether issue and pull request attachments are enabled. Defaults to `true`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ALLOWED_TYPES = .csv,.docx,.fodg,.fodp,.fods,.fodt,.gif,.gz,.jpeg,.jpg,.log,.md,.mov,.mp4,.odf,.odg,.odp,.ods,.odt,.pdf,.png,.pptx,.svg,.tgz,.txt,.webm,.xls,.xlsx,.zip&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Max size of each file. Defaults to 4MB&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MAX_SIZE = 4&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Max number of files per upload. Defaults to 5&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MAX_FILES = 5&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Storage type for attachments, `local` for local disk or `minio` for s3 compatible&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; object storage service, default is `local`.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;STORAGE_TYPE = local&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Allows the storage driver to redirect to authenticated URLs to serve files directly&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Currently, only `minio` is supported.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SERVE_DIRECT = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Path for attachments. Defaults to `data/attachments` only available when STORAGE_TYPE is `local`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PATH = data/attachments&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Minio endpoint to connect only available when STORAGE_TYPE is `minio`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MINIO_ENDPOINT = localhost:9000&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Minio accessKeyID to connect only available when STORAGE_TYPE is `minio`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MINIO_ACCESS_KEY_ID =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Minio secretAccessKey to connect only available when STORAGE_TYPE is `minio`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MINIO_SECRET_ACCESS_KEY =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Minio bucket to store the attachments only available when STORAGE_TYPE is `minio`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MINIO_BUCKET = gitea&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Minio location to create bucket only available when STORAGE_TYPE is `minio`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MINIO_LOCATION = us-east-1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Minio base path on the bucket only available when STORAGE_TYPE is `minio`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MINIO_BASE_PATH = attachments/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Minio enabled ssl only available when STORAGE_TYPE is `minio`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MINIO_USE_SSL = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[time]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Specifies the format for fully outputted dates. Defaults to RFC1123&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Special supported values are ANSIC, UnixDate, RubyDate, RFC822, RFC822Z, RFC850, RFC1123, RFC1123Z, RFC3339, RFC3339Nano, Kitchen, Stamp, StampMilli, StampMicro and StampNano&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; For more information about the format see http://golang.org/pkg/time/#pkg-constants&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;FORMAT =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Location the UI time display i.e. Asia/Shanghai&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Empty means server&apos;s location setting&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_UI_LOCATION =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[cron]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Common settings&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Setting this to true will enable all cron tasks periodically with default settings.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Setting this to true will run all enabled cron tasks when Gitea starts.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RUN_AT_START = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Note: ``SCHEDULE`` accept formats&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;    - Full crontab specs, e.g. &quot;* * * * * ?&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;    - Descriptors, e.g. &quot;@midnight&quot;, &quot;@every 1h30m&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; See more: https://pkg.go.dev/github.com/gogs/cron@v0.0.0-20171120032916-9f6c956d3e14&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Basic cron tasks - enabled by default&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Clean up old repository archives&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[cron.archive_cleanup]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Whether to enable the job&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Whether to always run at least once at start up time (if ENABLED)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RUN_AT_START = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Whether to emit notice on successful execution too&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;NOTICE_ON_SUCCESS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Time interval for job to run&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SCHEDULE = @midnight&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Archives created more than OLDER_THAN ago are subject to deletion&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;OLDER_THAN = 24h&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Update mirrors&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[cron.update_mirrors]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SCHEDULE = @every 10m&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Enable running Update mirrors task periodically.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Run Update mirrors task when Gitea starts.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RUN_AT_START = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Notice if not success&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;NOTICE_ON_SUCCESS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Limit the number of mirrors added to the queue to this number&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; (negative values mean no limit, 0 will result in no result in no mirrors being queued effectively disabling pull mirror updating.)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PULL_LIMIT=50&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Limit the number of mirrors added to the queue to this number&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; (negative values mean no limit, 0 will result in no mirrors being queued effectively disabling push mirror updating)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PUSH_LIMIT=50&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Repository health check&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[cron.repo_health_check]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SCHEDULE = @midnight&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Enable running Repository health check task periodically.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Run Repository health check task when Gitea starts.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RUN_AT_START = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Notice if not success&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;NOTICE_ON_SUCCESS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;TIMEOUT = 60s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Arguments for command &apos;git fsck&apos;, e.g. &quot;--unreachable --tags&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; see more on http://git-scm.com/docs/git-fsck&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ARGS =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Check repository statistics&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[cron.check_repo_stats]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Enable running check repository statistics task periodically.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Run check repository statistics task when Gitea starts.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RUN_AT_START = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Notice if not success&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;NOTICE_ON_SUCCESS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SCHEDULE = @midnight&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[cron.update_migration_poster_id]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;; Update migrated repositories&apos; issues and comments&apos; posterid, it will always attempt synchronization when the instance starts.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Update migrated repositories&apos; issues and comments&apos; posterid when starting server (default true)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RUN_AT_START = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Notice if not success&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;NOTICE_ON_SUCCESS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Interval as a duration between each synchronization. (default every 24h)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SCHEDULE = @midnight&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Synchronize external user data (only LDAP user synchronization is supported)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[cron.sync_external_users]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Synchronize external user data when starting server (default false)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RUN_AT_START = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Notice if not success&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;NOTICE_ON_SUCCESS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Interval as a duration between each synchronization (default every 24h)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SCHEDULE = @midnight&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Create new users, update existing user data and disable users that are not in external source anymore (default)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;   or only create new users if UPDATE_EXISTING is set to false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;UPDATE_EXISTING = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Clean-up deleted branches&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[cron.deleted_branches_cleanup]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Clean-up deleted branches when starting server (default true)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RUN_AT_START = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Notice if not success&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;NOTICE_ON_SUCCESS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Interval as a duration between each synchronization (default every 24h)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SCHEDULE = @midnight&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; deleted branches than OLDER_THAN ago are subject to deletion&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;OLDER_THAN = 24h&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Cleanup hook_task table&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[cron.cleanup_hook_task_table]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Whether to enable the job&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Whether to always run at start up time (if ENABLED)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RUN_AT_START = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Time interval for job to run&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SCHEDULE = @midnight&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; OlderThan or PerWebhook. How the records are removed, either by age (i.e. how long ago hook_task record was delivered) or by the number to keep per webhook (i.e. keep most recent x deliveries per webhook).&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;CLEANUP_TYPE = OlderThan&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; If CLEANUP_TYPE is set to OlderThan, then any delivered hook_task records older than this expression will be deleted.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;OLDER_THAN = 168h&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; If CLEANUP_TYPE is set to PerWebhook, this is number of hook_task records to keep for a webhook (i.e. keep the most recent x deliveries).&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;NUMBER_TO_KEEP = 10&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Cleanup expired packages&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[cron.cleanup_packages]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Whether to enable the job&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Whether to always run at least once at start up time (if ENABLED)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RUN_AT_START = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Whether to emit notice on successful execution too&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;NOTICE_ON_SUCCESS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Time interval for job to run&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SCHEDULE = @midnight&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Unreferenced blobs created more than OLDER_THAN ago are subject to deletion&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;OLDER_THAN = 24h&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;; Extended cron task - not enabled by default&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Delete all unactivated accounts&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[cron.delete_inactive_accounts]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RUN_AT_START = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;NOTICE_ON_SUCCESS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SCHEDULE = @annually&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;OLDER_THAN = 168h&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Delete all repository archives&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[cron.delete_repo_archives]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RUN_AT_START = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;NOTICE_ON_SUCCESS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SCHEDULE = @annually;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Garbage collect all repositories&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[cron.git_gc_repos]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RUN_AT_START = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;NOTICE_ON_SUCCESS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SCHEDULE = @every 72h&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;TIMEOUT = 60s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Arguments for command &apos;git gc&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; The default value is same with [git] -&gt; GC_ARGS&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ARGS =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Update the &apos;.ssh/authorized_keys&apos; file with Gitea SSH keys&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[cron.resync_all_sshkeys]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RUN_AT_START = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;NOTICE_ON_SUCCESS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SCHEDULE = @every 72h&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Resynchronize pre-receive, update and post-receive hooks of all repositories.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[cron.resync_all_hooks]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RUN_AT_START = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;NOTICE_ON_SUCCESS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SCHEDULE = @every 72h&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Reinitialize all missing Git repositories for which records exist&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[cron.reinit_missing_repos]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RUN_AT_START = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;NOTICE_ON_SUCCESS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SCHEDULE = @every 72h&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Delete all repositories missing their Git files&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[cron.delete_missing_repos]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RUN_AT_START = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;NOTICE_ON_SUCCESS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SCHEDULE = @every 72h&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Delete generated repository avatars&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[cron.delete_generated_repository_avatars]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RUN_AT_START = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;NOTICE_ON_SUCCESS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SCHEDULE = @every 72h&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Delete all old actions from database&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[cron.delete_old_actions]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RUN_AT_START = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;NOTICE_ON_SUCCESS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SCHEDULE = @every 168h&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;OLDER_THAN = 8760h&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Check for new Gitea versions&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[cron.update_checker]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RUN_AT_START = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLE_SUCCESS_NOTICE = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SCHEDULE = @every 168h&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;HTTP_ENDPOINT = https://dl.gitea.io/gitea/version.json&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Delete all old system notices from database&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[cron.delete_old_system_notices]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RUN_AT_START = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;NO_SUCCESS_NOTICE = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SCHEDULE = @every 168h&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;OLDER_THAN = 8760h&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Git Operation timeout in seconds&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[git.timeout]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT = 360&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MIGRATE = 600&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MIRROR = 300&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;CLONE = 300&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PULL = 300&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;GC = 60&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[mirror]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Enables the mirror functionality. Set to **false** to disable all mirrors. Pre-existing mirrors remain valid but won&apos;t be updated; may be converted to regular repo.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Disable the creation of **new** pull mirrors. Pre-existing mirrors remain valid. Will be ignored if `mirror.ENABLED` is `false`.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DISABLE_NEW_PULL = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Disable the creation of **new** push mirrors. Pre-existing mirrors remain valid. Will be ignored if `mirror.ENABLED` is `false`.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DISABLE_NEW_PUSH = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Default interval as a duration between each check&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_INTERVAL = 8h&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Min interval as a duration must be &gt; 1m&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MIN_INTERVAL = 10m&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[api]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Enables the API documentation endpoints (/api/swagger, /api/v1/swagger, …). True or false.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLE_SWAGGER = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Max number of items in a page&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MAX_RESPONSE_ITEMS = 50&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Default paging number of api&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_PAGING_NUM = 30&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Default and maximum number of items per page for git trees api&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_GIT_TREES_PER_PAGE = 1000&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Default max size of a blob returned by the blobs API (default is 10MiB)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DEFAULT_MAX_BLOB_SIZE = 10485760&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[i18n]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; The first locale will be used as the default if user browser&apos;s language doesn&apos;t match any locale in the list.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;LANGS = en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sv-SE,ko-KR,el-GR,fa-IR,hu-HU,id-ID,ml-IN&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;NAMES = English,简体中文,繁體中文（香港）,繁體中文（台灣）,Deutsch,Français,Nederlands,Latviešu,Русский,Українська,日本語,Español,Português do Brasil,Português de Portugal,Polski,Български,Italiano,Suomi,Türkçe,Čeština,Српски,Svenska,한국어,Ελληνικά,فارسی,Magyar nyelv,Bahasa Indonesia,മലയാളം&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[highlight.mapping]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Extension mapping to highlight class&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; e.g. .toml=ini&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[other]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SHOW_FOOTER_BRANDING = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Show version information about Gitea and Go in the footer&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SHOW_FOOTER_VERSION = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Show template execution time in the footer&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SHOW_FOOTER_TEMPLATE_LOAD_TIME = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[markup]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Set the maximum number of characters in a mermaid source. (Set to -1 to disable limits)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MERMAID_MAX_SOURCE_CHARACTERS = 5000&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[markup.sanitizer.1]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; The following keys can appear once to define a sanitation policy rule.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; This section can appear multiple times by adding a unique alphanumeric suffix to define multiple rules.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; e.g., [markup.sanitizer.1] -&gt; [markup.sanitizer.2] -&gt; [markup.sanitizer.TeX]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ELEMENT = span&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ALLOW_ATTR = class&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;REGEXP = ^(info|warning|error)$&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Other markup formats e.g. asciidoc&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; uncomment and enable the below section.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; (You can add other markup formats by copying the section and adjusting&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;  the section name suffix &quot;asciidoc&quot; to something else.)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[markup.asciidoc]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; List of file extensions that should be rendered by an external command&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;FILE_EXTENSIONS = .adoc,.asciidoc&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; External command to render all matching extensions&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RENDER_COMMAND = &quot;asciidoc --out-file=- -&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Don&apos;t pass the file on STDIN, pass the filename as argument instead.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;IS_INPUT_FILE = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; How the content will be rendered.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; * sanitized: Sanitize the content and render it inside current page, default to only allow a few HTML tags and attributes. Customized sanitizer rules can be defined in [markup.sanitizer.*] .&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; * no-sanitizer: Disable the sanitizer and render the content inside current page. It&apos;s **insecure** and may lead to XSS attack if the content contains malicious code.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; * iframe: Render the content in a separate standalone page and embed it into current page by iframe. The iframe is in sandbox mode with same-origin disabled, and the JS code are safely isolated from parent page.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RENDER_CONTENT_MODE=sanitized&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[metrics]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Enables metrics endpoint. True or false; default is false.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; If you want to add authorization, specify a token here&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;TOKEN =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Enable issue by label metrics; default is false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED_ISSUE_BY_LABEL = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Enable issue by repository metrics; default is false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED_ISSUE_BY_REPOSITORY = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[task]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Task queue type, could be `channel` or `redis`.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;QUEUE_TYPE = channel&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Task queue length, available only when `QUEUE_TYPE` is `channel`.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;QUEUE_LENGTH = 1000&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Task queue connection string, available only when `QUEUE_TYPE` is `redis`.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; If there is a password of redis, use `addrs=127.0.0.1:6379 password=123 db=0`.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;QUEUE_CONN_STR = &quot;addrs=127.0.0.1:6379 db=0&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[migrations]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Max attempts per http/https request on migrations.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MAX_ATTEMPTS = 3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Backoff time per http/https request retry (seconds)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;RETRY_BACKOFF = 3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Allowed domains for migrating, default is blank. Blank means everything will be allowed.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Multiple domains could be separated by commas.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Wildcard is supported: &quot;github.com, *.github.com&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ALLOWED_DOMAINS =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Blocklist for migrating, default is blank. Multiple domains could be separated by commas.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; When ALLOWED_DOMAINS is not blank, this option has a higher priority to deny domains.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Wildcard is supported.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;BLOCKED_DOMAINS =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Allow private addresses defined by RFC 1918, RFC 1122, RFC 4632 and RFC 4291 (false by default)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; If a domain is allowed by ALLOWED_DOMAINS, this option will be ignored.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ALLOW_LOCALNETWORKS = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[federation]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Enable/Disable federation capabilities&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Enable/Disable user statistics for nodeinfo if federation is enabled&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;SHARE_USER_STATISTICS = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Maximum federation request and response size (MB)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MAX_SIZE = 4&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; WARNING: Changing the settings below can break federation.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; HTTP signature algorithms&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ALGORITHMS = rsa-sha256, rsa-sha512, ed25519&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; HTTP signature digest algorithm&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;DIGEST_ALGORITHM = SHA-256&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; GET headers for federation requests&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;GET_HEADERS = (request-target), Date&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; POST headers for federation requests&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;POST_HEADERS = (request-target), Date, Digest&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[packages]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Enable/Disable package registry capabilities&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;ENABLED = true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Path for chunked uploads. Defaults to APP_DATA_PATH + `tmp/package-upload`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;CHUNKED_UPLOAD_PATH = tmp/package-upload&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; default storage for attachments, lfs and avatars&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[storage]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; storage type&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;STORAGE_TYPE = local&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; settings for repository archives, will override storage setting&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[storage.repo-archive]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; storage type&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;STORAGE_TYPE = local&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; lfs storage will override storage&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[lfs]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;STORAGE_TYPE = local&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Where your lfs files reside, default is data/lfs.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PATH = data/lfs&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; settings for packages, will override storage setting&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[storage.packages]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; storage type&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;STORAGE_TYPE = local&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; customize storage&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[storage.my_minio]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;STORAGE_TYPE = minio&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Minio endpoint to connect only available when STORAGE_TYPE is `minio`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MINIO_ENDPOINT = localhost:9000&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Minio accessKeyID to connect only available when STORAGE_TYPE is `minio`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MINIO_ACCESS_KEY_ID =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Minio secretAccessKey to connect only available when STORAGE_TYPE is `minio`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MINIO_SECRET_ACCESS_KEY =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Minio bucket to store the attachments only available when STORAGE_TYPE is `minio`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MINIO_BUCKET = gitea&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Minio location to create bucket only available when STORAGE_TYPE is `minio`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MINIO_LOCATION = us-east-1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Minio enabled ssl only available when STORAGE_TYPE is `minio`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;MINIO_USE_SSL = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;[proxy]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Enable the proxy, all requests to external via HTTP will be affected&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PROXY_ENABLED = false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Proxy server URL, support http://, https//, socks://, blank will follow environment http_proxy/https_proxy/no_proxy&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PROXY_URL =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;; Comma separated list of host names requiring proxy. Glob patterns (*) are accepted; use ** to match all hosts.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;;PROXY_HOSTS =&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>电脑配置VHD启动缩小磁盘大小，不自动扩展</title>
  <link href="https://www.ioioi.cn/posts/the-computer-is-configured-with-vhd-startup-to-reduce-the-disk-size-without-automatic-expansion/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/the-computer-is-configured-with-vhd-startup-to-reduce-the-disk-size-without-automatic-expansion/</id>
  <published>2023-03-09T13:25:24.000Z</published>
  <updated>2023-03-09T13:25:24.000Z</updated>
  <summary type="html">&lt;p&gt;简介&lt;br&gt;
当系统启动时, 为了保证有足够的空间和防止数据损坏, 动态扩展VHD将扩大到其完整大小. 如果计算机无法分配足够的物理硬盘空间放置VHD, 它将会生成一个停止错误信息, 并且阻止操作系统继续启动.&lt;/p&gt;
&lt;p&gt;当你只有一个VHD配置在计算机上时, 这通常不会出现问题. 然而, 当你有多个VHD时, 同时你不想使用VHD的所有空间时, 你可以通过调整注册表来阻止这种扩展. 有时候, 这也被称作”自动精简配置(thin provisioning)”.&lt;/p&gt;
&lt;p&gt;这里有2中方式设置阻止动态扩展VHD扩展到完整大小. 第一种是启动到系统后修改注册表的方式, 另一种方式则进入Windows PE 后挂载VHD后修改系统组册表.&lt;/p&gt;
&lt;p&gt;而这里只说明第一种设置方式, 第二种设置方式可以参考第一种方式操作.&lt;/p&gt;
&lt;p&gt;设置方法&lt;br&gt;
启动到系统后, 打开”运行”, 输入”regedit”(不包括双引号)命令打开注册表, 定位到 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\FsDepends\Parameters 项, 修改 VirtualDiskExpandOnMount 的16进制数值为4, 重启电脑后生效.&lt;br&gt;
在这里插入图片描述&lt;/p&gt;
&lt;p&gt;当然还可以使用直接导入的方式, 新建一个TXT记事本, 将以下内容拷贝到记事本, 保存后修改文件扩展名为”reg”, 双击导入注册表即可:&lt;/p&gt;</summary>
</entry>
<entry>
  <title>XMLRPC是什么及如何影响WordPress网站安全？</title>
  <link href="https://www.ioioi.cn/posts/what-is-lrpc-and-how-does-it-affect-wordpress-website-security/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/what-is-lrpc-and-how-does-it-affect-wordpress-website-security/</id>
  <published>2023-03-09T13:24:20.000Z</published>
  <updated>2023-03-09T13:24:20.000Z</updated>
  <summary type="html">&lt;p&gt;xmlrpc.php文件存在于 WordPress 网站根目录中，本意是给网站提供一种远程通信方式，让其他应用程序与 json文件早了很多。&lt;/p&gt;
&lt;p&gt;RPC 代表远程过程调用。也就是一个程序可以要求另外一个程序做事情。而现在使用 API调用代替了 RPC调用。&lt;/p&gt;
&lt;p&gt;二、xmlrpc.php如何工作&lt;/p&gt;
&lt;p&gt;向 xmlrpc.php发布一条信息，启动一个 post请求，把 xml文件传递上去，就可以在 WordPress 网站中完成发布文章、pingback 等操作，而无需登录 WordPress 后台，用起来很方便。&lt;/p&gt;
&lt;p&gt;三、xmlrpc.php带来的安全问题&lt;/p&gt;
&lt;p&gt;很长一段时间中，xmlrpc.php是一个挺有用的工具，记得很早之前羊毛之家也尝试一段时间利用 xmlrpc.php 远程发布文章，也蛮方便和有趣的。&lt;/p&gt;
&lt;p&gt;随着 REST API的兴起，xmlrpc.php已经被代替了，但WordPress仍然保留着这个文件。很可能给网站带来一些安全风险，被利用来攻击 WordPress 网站。&lt;/p&gt;
&lt;p&gt;3.1、XMLRPC 蛮力攻击&lt;/p&gt;
&lt;p&gt;XMLRPC 攻击比较简单的方法是蛮力攻击。因为利用 XMLRPC 登录需要用户名和密码登录，因此攻击者可以很方便的不断组合用户名和密码，直到找到正确的。很多站长会限制用户登录尝试次数，但不会想到阻止 XMLRPC 请求，这就为攻击者提供了可趁之机。&lt;/p&gt;
&lt;p&gt;一旦攻击者穷举登录成功，就可以随便把广告、链接、垃圾内容写入你的数据库。小白经常发现一些新手、小白的网站后台评论，平均都有几十~几千条，把数据库搞大了，越来越臃肿，网站打开速度就慢下来了。&lt;/p&gt;
&lt;p&gt;3.2、XMLRPC 发起 DDoS 攻击&lt;/p&gt;
&lt;p&gt;XMLRPC 的另外一种利用方法是 pingback，恶意用户同时发出大量请求来挂掉服务器。&lt;/p&gt;
&lt;p&gt;pingback 不但能把大量垃圾信息写入你的数据库。而且同时数百~数千个 pingback 可以让服务器瘫痪。&lt;/p&gt;
&lt;p&gt;这也就是俗称的 DDos（分布式拒绝服务攻击），通常是由分布在世界不同地方的大量肉鸡发起的。&lt;/p&gt;
&lt;p&gt;四、禁用 XMLRPC&lt;/p&gt;
&lt;p&gt;有多种方法可以禁用 XMLRPC，你要根据自己的实际情况来选择合适的方法。&lt;/p&gt;
&lt;p&gt;4.1、如果你手动更新WordPress版本，那么就直接删除 xmlrpc.php，以后更新版本时也手动删除掉安装包里面的 xmlrpc.php。&lt;/p&gt;
&lt;p&gt;这是最直接有效的方法。带来的弊端是你也无法使用远程发布文章功能了，当然绝大多数人根本用不到。&lt;/p&gt;
&lt;p&gt;4.2、如果你用到了 xmlrpc.php ，就不能删除。对于 apache 服务或虚拟主机，可以把下列代码添加到网站根目录的 .htaccess 文件中。&lt;/p&gt;
&lt;p&gt;order deny,allow&lt;/p&gt;
&lt;p&gt;deny from all&lt;/p&gt;
&lt;p&gt;这样就把任何想要利用 xmlrpc的攻击都拦截在外面了。&lt;/p&gt;
&lt;p&gt;4.3、主题functions.php文件&lt;/p&gt;
&lt;p&gt;如果不喜欢在 Web 服务中添加代码，也可以在主题的 functions.php 文件中添加下面的一行代码。&lt;/p&gt;
&lt;p&gt;add_filter(‘xmlrpc_enabled’, ‘__return_false’);&lt;/p&gt;
&lt;p&gt;看清楚了在单词 return 之前是 2 个下划线。这也能关闭 xmlrpc。&lt;/p&gt;
&lt;p&gt;弊端是每次主题更新都要手动添加这段代码，但保不齐哪次就忘记了，所以小白并不推荐用这个办法。&lt;/p&gt;
&lt;p&gt;4.4、如果不想在主题 functions.php 中添加代码，可以安装插件禁用 XMLRPC。比如常见的 Wordfence Security插件、WordPress 安全插件 All In One WP Security &amp;#x26; Firewall、SiteGround Security插件都提供禁用功能。&lt;/p&gt;
&lt;p&gt;也有一些专门禁用 XMLRPC的插件，其实就是主题functions.php文件的代码，插件不会因为更新主题就被覆盖掉，这个禁用功能也就能一直保持工作。&lt;/p&gt;
&lt;p&gt;五、总结&lt;/p&gt;
&lt;p&gt;XMLRPC 在很早之前提供了很好的服务，方便、快捷、好用。但现在用的人越来越少了，那么通过上述办法禁用来保护网站安全，是每个WordPress网站必须考虑的操作。&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://vps.yangmao.info/233231.html?btwaf=26143324&quot;&gt;来源&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Archlinux安装后注销、关机、重启卡死问题</title>
  <link href="https://www.ioioi.cn/posts/the-problems-of-logging-off-shutting-down-and-restarting-after-archlinux-installation-are-stuck/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/the-problems-of-logging-off-shutting-down-and-restarting-after-archlinux-installation-are-stuck/</id>
  <published>2023-03-03T03:47:00.000Z</published>
  <updated>2023-03-03T03:47:00.000Z</updated>
  <summary type="html">&lt;p&gt;需要禁用nouveau&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;blacklist nouveau&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;并重新生成mkinitcpio镜像&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Laravel数据转换typecho</title>
  <link href="https://www.ioioi.cn/posts/larravel-data-conversion-typecho/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/larravel-data-conversion-typecho/</id>
  <published>2023-02-28T09:30:00.000Z</published>
  <updated>2023-02-28T09:30:00.000Z</updated>
  <summary type="html">&lt;p&gt;博客从Laravel自建换成了之前用的typecho，维护开发太累了，我也太懒了，下面是用ChatGPT生成的数据迁移后cid混乱的代码&lt;br&gt;
&lt;img src=&quot;/posts/larravel-data-conversion-typecho/images/3507832713.jpg&quot; alt=&quot;Screenshot_2023-02-28-17-27-24-576_com.microsoft.emmx.jpg&quot; title=&quot;Screenshot_2023-02-28-17-27-24-576_com.microsoft.emmx.jpg&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
&lt;img src=&quot;/posts/larravel-data-conversion-typecho/images/1862281624.jpg&quot; alt=&quot;Screenshot_2023-02-28-17-27-35-078_com.microsoft.emmx.jpg&quot; title=&quot;Screenshot_2023-02-28-17-27-35-078_com.microsoft.emmx.jpg&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;-- 清除之前的自增数据&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ALTER TABLE typecho_contents AUTO_INCREMENT = 1;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;-- 按照modified字段中的时间戳从小到大进行排序，并以此排序对cid字段中的id从1开始排序&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;SET @new_cid := 0;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;UPDATE typecho_contents SET cid = @new_cid := (@new_cid + 1) ORDER BY modified ASC;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>拉取CODING代码突然出现：Permission denied (publickey).</title>
  <link href="https://www.ioioi.cn/posts/the-pulling-coding-code-suddenly-appears-permission-denied-published/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/the-pulling-coding-code-suddenly-appears-permission-denied-published/</id>
  <published>2022-09-27T14:32:53.000Z</published>
  <updated>2022-09-27T14:32:53.000Z</updated>
  <summary type="html">&lt;p&gt;输入 &lt;code&gt;ssh -T git@e.coding.net&lt;/code&gt; 会出现 &lt;code&gt;Permission denied (publickey).&lt;/code&gt; 一开始以为密钥过期了，后来重新生成之后还是出现 &lt;code&gt;Permission denied (publickey).&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;解决办法：&lt;br&gt;
git的安装目录下有一个 &lt;code&gt;ssh_config&lt;/code&gt;的文件用记事本打开&lt;/p&gt;
&lt;p&gt;在文件的最下面，添加如下配置：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#Added by git-extra&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Host *.coding.net&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;HostkeyAlgorithms +ssh-rsa&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;PubkeyAcceptedAlgorithms +ssh-rsa&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;保存关闭即可，在次输入：&lt;code&gt;ssh -T git@e.coding.net&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;————————————————&lt;br&gt;
版权声明：本文为CSDN博主「lo浅安灬时光ve」的原创文章，遵循CC 4.0 BY-SA版权协议，转载请附上原文出处链接及本声明。&lt;br&gt;
原文链接：&lt;a href=&quot;https://blog.csdn.net/qq_23118345/article/details/121938638&quot;&gt;https://blog.csdn.net/qq_23118345/article/details/121938638&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>git clone本地为空目录</title>
  <link href="https://www.ioioi.cn/posts/git-clone-is-an-empty-directorylocally/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/git-clone-is-an-empty-directorylocally/</id>
  <published>2022-09-27T14:30:08.000Z</published>
  <updated>2022-09-27T14:30:08.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;strong&gt;步骤一&lt;/strong&gt; ：&lt;/p&gt;
&lt;p&gt;git clone + 路径，显示是空文件夹~~~~&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;步骤二&lt;/strong&gt; ：&lt;/p&gt;
&lt;p&gt;git checkout 分支名称&lt;/p&gt;
&lt;p&gt;祝各位秃头 👩🏻‍🦲 小 baby，快乐…&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1&lt;/strong&gt; . git clone +url ---- 只是要下载的项目而已 （一般默认 master）&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2&lt;/strong&gt; . 没有默认 master 的话，那就选分支---- 执行命令：git checkout 分支名称&lt;/p&gt;
&lt;p&gt;ps：知道分支名称就直接写&lt;/p&gt;
&lt;p&gt;本文来自博客园，作者：&lt;a href=&quot;https://www.cnblogs.com/song0916/&quot;&gt;Song0916&lt;/a&gt;，转载请注明原文链接：&lt;a href=&quot;https://www.cnblogs.com/song0916/p/15990083.html&quot;&gt;https://www.cnblogs.com/song0916/p/15990083.html&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Windows设置锁屏状态下超时时间</title>
  <link href="https://www.ioioi.cn/posts/windows-sets-the-timeout-in-the-lock-screenstate/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/windows-sets-the-timeout-in-the-lock-screenstate/</id>
  <published>2022-03-17T14:35:10.000Z</published>
  <updated>2022-03-17T14:35:10.000Z</updated>
  <summary type="html">&lt;h1 id=&quot;添加控制面板选项无法设置小于1min的值&quot;&gt;添加控制面板选项（无法设置小于1min的值）&lt;/h1&gt;
&lt;p&gt;1、打开注册表编辑器；&lt;/p&gt;
&lt;p&gt;2、导航到路径计算机\ HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Power \ PowerSettings \ 7516b95f-f776-4464-8c53-06167f40cc99 \ 8EC4B3A5-6868-48c2-BE75-4F3044BE88A7；&lt;/p&gt;
&lt;p&gt;3、在右侧窗格中，单击“属性”键上的 2x。 然后将其值更改为 2.如果单击确定以保存更改；&lt;/p&gt;
&lt;h1 id=&quot;命令行设置推荐&quot;&gt;命令行设置（推荐）&lt;/h1&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;powercfg.exe /setacvalueindex SCHEME_CURRENT SUB_VIDEO VIDEOIDLE \&amp;#x3C;time in seconds&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;powercfg.exe /setacvalueindex SCHEME_CURRENT SUB_VIDEO VIDEOCONLOCK \&amp;#x3C;time in seconds&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;powercfg.exe /setactive SCHEME_CURRENT&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&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;setacvalueindex&lt;/td&gt;&lt;td&gt;设置AC状态下&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;setdcvalueindex&lt;/td&gt;&lt;td&gt;设置DC状态下&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;VIDEOIDLE&lt;/td&gt;&lt;td&gt;桌面界面锁屏时间&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;VIDEOCONLOCK&lt;/td&gt;&lt;td&gt;锁屏界面锁屏时间&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;&amp;#x3C;time in seconds&gt;&lt;/code&gt;&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;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;powercfg.exe /setactive SCHEME_CURRENT&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/posts/windows-sets-the-timeout-in-the-lock-screenstate/images/1647528268595.png&quot; alt=&quot;QQ截图20220317224347.png&quot; title=&quot;QQ截图20220317224347.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;之后重启电脑即可&lt;/p&gt;
&lt;p&gt;参考：&lt;/p&gt;
&lt;p&gt;1、&lt;a href=&quot;http://www.xitongcheng.com/jiaocheng/win10_article_44012.html&quot;&gt;Win10 系统下设置锁定屏幕超时的解决方法－系统城 (xitongcheng.com)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2、&lt;a href=&quot;https://www.thewindowsclub.com/enable-console-lock-display-timeout-windows-8&quot;&gt;Read: How to change Lock Screen Timeout Period in Windows 11/10 (thewindowsclub.com)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;3、&lt;a href=&quot;https://docs.microsoft.com/en-us/troubleshoot/windows-client/shell-experience/monitor-powers-off-when-pc-locked&quot;&gt;Monitor powers off when computer is locked - Windows Client | Microsoft Docs&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Windows 11加载iso慢的解决办法</title>
  <link href="https://www.ioioi.cn/posts/solution-to-slow-loading-iso-in-windows11/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/solution-to-slow-loading-iso-in-windows11/</id>
  <published>2022-03-17T14:34:01.000Z</published>
  <updated>2022-03-17T14:34:01.000Z</updated>
  <summary type="html">&lt;p&gt;Windows 11 加载 iso 慢的解决办法&lt;br&gt;
解决办法：加载应用或打开很慢时，关闭任务管理器里的 Microsoft defender smartScreen 程序马上加载。还可以在安全中心里左边打开应用与浏览器控制，再点击右边基于声誉的保护设置，关闭检查应用和文件就行，但是有一个问题每次打开都询问。&lt;/p&gt;
&lt;p&gt;彻底解决办法：解除浏览器下载 iso 的“锁定”状态&lt;br&gt;
每次用浏览器下载文件后，下载的文件属性都有个解除锁定，很麻烦，在windows11中打开浏览器下载的大文件如 win 系统的 iso 文件用很长时间，把文件里的注册表文件导入注册表再下载就没有了。已经下载的可以在属性里解除锁定，还可以运行：使用 PowerShell 批量解除锁定下载的文件.ps1，解除当前文件夹下下载的所有文件的锁定。&lt;/p&gt;
&lt;p&gt;来源：&lt;a href=&quot;https://bbs.pcbeta.com/viewthread-1909567-1-1.html&quot;&gt;Pcbeta&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>虎年快乐！</title>
  <link href="https://www.ioioi.cn/posts/happy-year-of-the-tiger/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/happy-year-of-the-tiger/</id>
  <published>2022-01-31T17:17:58.000Z</published>
  <updated>2022-01-31T17:17:58.000Z</updated>
  <summary type="html">&lt;p&gt;新年快乐！&lt;/p&gt;</summary>
</entry>
<entry>
  <title>更换VditorCDN源时出现跨域问题</title>
  <link href="https://www.ioioi.cn/posts/a-cross-domain-problem-occurred-while-replacing-the-vditorcdnsource/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/a-cross-domain-problem-occurred-while-replacing-the-vditorcdnsource/</id>
  <published>2022-01-01T06:25:28.000Z</published>
  <updated>2022-01-01T06:25:28.000Z</updated>
  <summary type="html">&lt;p&gt;最近不是CDN JSDeliver无了吗，，然后今天打开我的网站一看，好家伙，文章直接加载卡死，于是去上面把 &lt;code&gt;dist&lt;/code&gt;文件夹给他下载下来了。&lt;/p&gt;
&lt;p&gt;然后发现有个&lt;del&gt;巨大&lt;/del&gt; 的 &lt;code&gt;323K&lt;/code&gt; 的 &lt;code&gt;lute.min.js&lt;/code&gt;（也是这个最大，之前加载半天，导致文章渲染不了）然后换了之后发现只有 &lt;code&gt;index.min.js&lt;/code&gt;改过来了而 &lt;code&gt;lute.min.js&lt;/code&gt;并没有更换过来，然后通过代码分析&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/a-cross-domain-problem-occurred-while-replacing-the-vditorcdnsource/images/1641018614855.png&quot; alt=&quot;QQ截图20220101142958.png&quot; title=&quot;QQ截图20220101142958.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;然后修改之后就发现&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/a-cross-domain-problem-occurred-while-replacing-the-vditorcdnsource/images/1641018726885.png&quot; alt=&quot;QQ截图20220101141814.png&quot; title=&quot;QQ截图20220101141814.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;后台编辑文章的页面因为确实 &lt;code&gt;ant.js&lt;/code&gt;而缺失元素&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/a-cross-domain-problem-occurred-while-replacing-the-vditorcdnsource/images/1641018628999.png&quot; alt=&quot;QQ截图20220101141806.png&quot; title=&quot;QQ截图20220101141806.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;然后转到 &lt;code&gt;index.min.js&lt;/code&gt;文件&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/a-cross-domain-problem-occurred-while-replacing-the-vditorcdnsource/images/1641018652390.png&quot; alt=&quot;QQ截图20220101141914.png&quot; title=&quot;QQ截图20220101141914.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;发现是插入 &lt;code&gt;js&lt;/code&gt;文件的时候跨域出现了问题&lt;/p&gt;
&lt;p&gt;于是进入阿里云CDN更改跨域&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/a-cross-domain-problem-occurred-while-replacing-the-vditorcdnsource/images/1641018699369.png&quot; alt=&quot;QQ截图20220101142403.png&quot; title=&quot;QQ截图20220101142403.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;遂解决。&lt;/p&gt;</summary>
</entry>
<entry>
  <title>2022新年快乐</title>
  <link href="https://www.ioioi.cn/posts/happy-new-year2022/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/happy-new-year2022/</id>
  <published>2021-12-31T16:00:00.000Z</published>
  <updated>2021-12-31T16:00:00.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;img src=&quot;/posts/happy-new-year2022/images/1641018313861.jpeg&quot; alt=&quot;302fcf97988c4d3994ba5177f61c100a.jpeg&quot; title=&quot;302fcf97988c4d3994ba5177f61c100a.jpeg&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>关于本博客</title>
  <link href="https://www.ioioi.cn/posts/about-thisblog/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/about-thisblog/</id>
  <published>2021-12-15T04:07:55.000Z</published>
  <updated>2021-12-15T04:07:55.000Z</updated>
  <summary type="html">&lt;p&gt;这个博客是基于&lt;strong&gt;Laravel&lt;/strong&gt;框架搭建的&lt;/p&gt;
&lt;p&gt;手制版 &lt;a href=&quot;https://github.com/arkylin/Blog&quot;&gt;见我的Github&lt;/a&gt; 所以很多功能还需要慢慢添加&lt;/p&gt;
&lt;ul class=&quot;contains-task-list&quot;&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; checked disabled&gt; 首页&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/posts/about-thisblog/images/1629646418.png&quot; alt=&quot;main.png&quot; title=&quot;main.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;ul class=&quot;contains-task-list&quot;&gt;
&lt;li class=&quot;task-list-item&quot;&gt;
&lt;p&gt;&lt;input type=&quot;checkbox&quot; checked disabled&gt; 文章页&lt;/p&gt;
&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;
&lt;p&gt;&lt;input type=&quot;checkbox&quot; checked disabled&gt; 支持隐私文章&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/about-thisblog/images/1629646847.png&quot; alt=&quot;QQ截图20210822234119.png&quot; title=&quot;QQ截图20210822234119.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;
&lt;p&gt;&lt;input type=&quot;checkbox&quot; checked disabled&gt; 支持草稿&lt;/p&gt;
&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;
&lt;p&gt;&lt;input type=&quot;checkbox&quot; checked disabled&gt; 后台上传图片&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/about-thisblog/images/1629646775.png&quot; alt=&quot;QQ截图20210822234017.png&quot; title=&quot;QQ截图20210822234017.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;
&lt;p&gt;&lt;input type=&quot;checkbox&quot; checked disabled&gt; 分页&lt;/p&gt;
&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;
&lt;p&gt;&lt;input type=&quot;checkbox&quot; checked disabled&gt; 搜索&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/about-thisblog/images/1629646753.png&quot; alt=&quot;QQ截图20210822233952.png&quot; title=&quot;QQ截图20210822233952.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;
&lt;p&gt;&lt;input type=&quot;checkbox&quot; checked disabled&gt; 静态化链接&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/about-thisblog/images/1629646734.png&quot; alt=&quot;20210822233843.png&quot; title=&quot;20210822233843.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;
&lt;p&gt;&lt;input type=&quot;checkbox&quot; checked disabled&gt; 后台编辑&lt;/p&gt;
&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;
&lt;p&gt;&lt;input type=&quot;checkbox&quot; checked disabled&gt; 后台配置站点&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/about-thisblog/images/1629646651.png&quot; alt=&quot;20210822233802.png&quot; title=&quot;20210822233802.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;
&lt;p&gt;&lt;input type=&quot;checkbox&quot; checked disabled&gt; 友链&lt;/p&gt;
&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;
&lt;p&gt;&lt;input type=&quot;checkbox&quot; checked disabled&gt; COS/OSS/S3图片存储&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;待添加&lt;/p&gt;
&lt;ul class=&quot;contains-task-list&quot;&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; 美化&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; 独立页面&lt;/li&gt;
&lt;/ul&gt;</summary>
</entry>
<entry>
  <title>Windows计划任务程序 报错：2147943726 解決方法</title>
  <link href="https://www.ioioi.cn/posts/windows-scheduler-reported-an-error-2147943726solution/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/windows-scheduler-reported-an-error-2147943726solution/</id>
  <published>2021-12-12T13:06:09.000Z</published>
  <updated>2021-12-12T13:06:09.000Z</updated>
  <summary type="html">&lt;p&gt;将用户改为 &lt;code&gt;SYSTEM&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/windows-scheduler-reported-an-error-2147943726solution/images/1639314523831.png&quot; alt=&quot;屏幕截图&quot; title=&quot;屏幕截图&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>记一次失误上传阿里云OSS AssessKey密钥的事情</title>
  <link href="https://www.ioioi.cn/posts/remember-a-mistake-in-uploading-the-alicloud-oss-assesskeykey/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/remember-a-mistake-in-uploading-the-alicloud-oss-assesskeykey/</id>
  <published>2021-09-25T15:08:29.000Z</published>
  <updated>2021-09-25T15:08:29.000Z</updated>
  <summary type="html">&lt;p&gt;之前在修改后台上传的时候不小心直接用后台页面的AccessKey密钥，然后忘了修改从 &lt;code&gt;.env&lt;/code&gt;文件&lt;/p&gt;
&lt;p&gt;再来看看Js实现的后台上传代码&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;div class=&quot;container&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;!-- 引入在线资源 --&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;script src=&quot;https://gosspublic.alicdn.com/aliyun-oss-sdk-6.8.0.min.js&quot;&gt;&amp;#x3C;/script&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;script&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;const client = new OSS({&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    // yourRegion填写Bucket所在地域。以华东1（杭州）为例，Region填写为oss-cn-hangzhou。&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    region: &apos;oss-cn-shanghai&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    // 从STS服务获取的临时访问密钥（AccessKey ID和AccessKey Secret）。&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    accessKeyId: &apos;&amp;#x3C;?php echo env(&quot;ALIYUN_ACCESS_ID&quot;); ?&gt;&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    accessKeySecret: &apos;&amp;#x3C;?php echo env(&quot;ALIYUN_ACCESS_KEY&quot;); ?&gt;&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    // 填写Bucket名称。&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    bucket: &apos;assets-xyz-blue&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;});&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;/script&gt;            &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;a href=&quot;javascript:void(0)&quot; onclick=&quot;uploadPhoto()&quot;&gt;选择图片&amp;#x3C;/a&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;input type=&quot;file&quot; id=&quot;photoFile&quot; style=&quot;display: none;&quot; onchange=&quot;upload()&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;script&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    function uploadPhoto() {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $(&quot;#photoFile&quot;).click();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    /**&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     * 上传图片&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    function upload() {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        if ($(&quot;#photoFile&quot;).val() == &apos;&apos;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            return;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        // var CTime = Math.round(new Date());&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        // var formData = new FormData();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        // formData.append(&apos;photo&apos;, document.getElementById(&apos;photoFile&apos;).files[0]);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        const data = document.getElementById(&apos;photoFile&apos;).files[0];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        // var FileName = document.getElementById(&apos;photoFile&apos;).files[0].name&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        async function put () {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            try {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                // object表示上传到OSS的文件名称。&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                // file表示浏览器中需要上传的文件，支持HTML5 file和Blob类型。&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                var now = new Date();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                month = now.getMonth();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                month = month + 1;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                if (month &amp;#x3C; 10) month = &quot;0&quot; + month;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                var filename = &apos;attachments&apos; + &apos;/&apos; + now.getFullYear() + &apos;/&apos; +  month + &apos;/&apos; + now.getTime() + &apos;.&apos; + data.name.split(&quot;.&quot;)[1];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                const r1 = await client.put(filename, data);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                var link = &quot;&amp;#x3C;?php if (env(&apos;ASSETS_URL&apos;) !== &apos;&apos;) { echo env(&apos;ASSETS_URL&apos;); } ?&gt;&quot; + &apos;/&apos; + filename;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                content = &quot;&amp;#x3C;img src=&apos;&quot;+ link +&quot;&apos; alt=&quot; + data.name +&quot;&gt;&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                window.vditor.insertValue(content);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                console.log(&apos;put success: %j&apos;, r1);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            } catch (e) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                console.error(&apos;error: %j&apos;, e);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        put();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        // formData.append(&apos;time&apos;, CTime);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        // $.ajax({&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        //     url:&quot;&amp;#x3C;?php echo env(&apos;APP_URL&apos;) ?&gt;/admin/upload&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        //     type:&quot;post&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        //     async: false,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        //     data: formData,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        //     contentType: false,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        //     processData: false,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        //     success: function(data) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        //         if (data !== &apos;&apos;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        //             content = &quot;&amp;#x3C;img src=&apos;&quot;+ data +&quot;&apos; alt=&quot; + FileName +&quot;&gt;&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        //             window.vditor.insertValue(content);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        //         }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        //     },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        //     error:function(data) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        //         alert(&quot;上传失败&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        //     }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        // });&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        // let content = this.vditor.getValue();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        // content = &quot;&amp;#x3C;img src=&apos;/storage/&quot;+ CTime +&quot;.png&apos;&gt;&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        // this.vditor.insertValue(content);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;/script&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;或者数据库获取密钥，然后今天在修改完Navbar忘记了。一兴奋直接就一连串 &lt;code&gt;git commit&lt;/code&gt; &lt;code&gt;git push&lt;/code&gt;然后提交完了，我还在思考那个 &lt;code&gt;views&lt;/code&gt;的怎么设置，然后我竟然收到了阿里云的短信&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/media/2021/09/1632582925151.android&quot; alt=&quot;Screenshot_20210925_230931_com.android.mms.png&quot; title=&quot;Screenshot_20210925_230931_com.android.mms.png&quot;&gt;&lt;/p&gt;
&lt;p&gt;紧接着就是就是阿里云和Github/Gitguardian的邮件通知&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/remember-a-mistake-in-uploading-the-alicloud-oss-assesskeykey/images/1632582984336.png&quot; alt=&quot;QQ截图20210925231215.png&quot; title=&quot;QQ截图20210925231215.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Centos(Grub)云服务器安装ArchLinux</title>
  <link href="https://www.ioioi.cn/posts/installing-archlinux-on-centos-grubecs/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/installing-archlinux-on-centos-grubecs/</id>
  <published>2021-09-18T15:41:07.000Z</published>
  <updated>2021-09-18T15:41:07.000Z</updated>
  <summary type="html">&lt;p&gt;新建磁盘 这里以腾讯云为例&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/installing-archlinux-on-centos-grubecs/images/1631979727.png&quot; alt=&quot;20210819104805.png&quot; title=&quot;20210819104805.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;只要满足镜像大小即可&lt;/p&gt;
&lt;p&gt;挂载并下载镜像&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/installing-archlinux-on-centos-grubecs/images/1631979805.png&quot; alt=&quot;20210819104835.png&quot; title=&quot;20210819104835.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;编辑启动文件 &lt;code&gt;/etc/grub.d/40_custom&lt;/code&gt;以实际为准&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#!/bin/sh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;exec tail -n +3 $0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# This file provides an easy way to add custom menu entries.  Simply type the&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# menu entries you want to add after this comment.  Be careful not to change&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# the &apos;exec tail&apos; line above.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;menuentry &quot;Archboot&quot; --class iso {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  set label=ARCH_202106&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  set isofile=&apos;/archlinux-2021.06.01-x86_64.iso&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  loopback loop (hd0,gpt2)$isofile&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  linux (loop)/arch/boot/x86_64/vmlinuz-linux archisolabel=$label img_dev=/dev/vdb1 img_loop=$isofile earlymodules=loop&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  initrd (loop)/arch/boot/x86_64/initramfs-linux.img&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;具体以实际镜像、磁盘号、硬盘UEFI/MBR 为准&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/installing-archlinux-on-centos-grubecs/images/1631979937.png&quot; alt=&quot;20210819104912.png&quot; title=&quot;20210819104912.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;别忘了更新 &lt;code&gt;Grub&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;重启&lt;/p&gt;
&lt;p&gt;选择启动项即可&lt;/p&gt;</summary>
</entry>
<entry>
  <title>ArchLinux使用php-redis启用失败</title>
  <link href="https://www.ioioi.cn/posts/archlinux-failed-to-enable-using-phpredis/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/archlinux-failed-to-enable-using-phpredis/</id>
  <published>2021-09-18T15:22:55.000Z</published>
  <updated>2021-09-18T15:22:55.000Z</updated>
  <summary type="html">&lt;h3 id=&quot;redis&quot;&gt;Redis&lt;/h3&gt;
&lt;p&gt;Install and configure &lt;a href=&quot;https://wiki.archlinux.org/title/Redis&quot; title=&quot;Redis&quot;&gt;Redis&lt;/a&gt;, then install &lt;a href=&quot;https://archlinux.org/packages/?name=php-redis&quot;&gt;php-redis&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Uncomment the line of the package, e.g. &lt;code&gt;/etc/php/conf.d/redis.ini&lt;/code&gt;. Also ensure that the igbinary extension is enabled (also uncommented) in &lt;code&gt;/etc/php/conf.d/igbinary.ini&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://wiki.archlinux.org/title/PHP&quot;&gt;PHP - ArchWiki (archlinux.org)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/archlinux-failed-to-enable-using-phpredis/images/1632038088110.png&quot; alt=&quot;QQ截图20210919155339.png&quot; title=&quot;QQ截图20210919155339.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Win11 DEV版 任务栏空白</title>
  <link href="https://www.ioioi.cn/posts/win11-dev-taskbar-blank/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/win11-dev-taskbar-blank/</id>
  <published>2021-09-03T04:50:52.000Z</published>
  <updated>2021-09-03T04:50:52.000Z</updated>
  <summary type="html">&lt;p&gt;今天早上打开电脑，大概是&lt;em&gt;8:00&lt;/em&gt;左右，在未更新的情况下直接打开出现状态栏空白，&lt;code&gt;uwp&lt;/code&gt;应用无法打开的情况然后我去 &lt;code&gt;酷安、贴吧、rabbit&lt;/code&gt;看了之后说是要&lt;em&gt;卸载更新&lt;/em&gt;，但是我试了下，直接提示卸载不了，进入 &lt;code&gt;/r /o&lt;/code&gt;&lt;em&gt;恢复模式&lt;/em&gt;也不行，然后过一段时间后，看见有人说恢复还原点可以，于是我试了一下，发现正好有一个9月2号的&lt;em&gt;还原点&lt;/em&gt;，正好是昨天更新之后（&lt;em&gt;&lt;strong&gt;不得不说win10更新自动创建还原点这个设计还是不错的&lt;/strong&gt;&lt;/em&gt;）恢复之后就正常了，于是不信邪想着更新那个最新的 &lt;code&gt;DEV&lt;/code&gt;版，正在更新时候就看见说是微软授时服务器出现问题，然后，幸好没像某些人一样，直接放弃重装系统😂😂😂&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/win11-dev-taskbar-blank/images/1630644693.png&quot; alt=&quot;QQ截图20210903125210.png&quot; title=&quot;QQ截图20210903125210.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;看见&lt;a href=&quot;https://www.ithome.com/0/573/181.htm&quot;&gt;IThome 赛文奥特曼&lt;/a&gt;的一个评论挺有意思的&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;if ( Datetime.Now &amp;#x3C; new datetime(2021,9,4) ) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Taskbar.broken();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;del&gt;笑死&lt;/del&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/win11-dev-taskbar-blank/images/1630645049.png&quot; alt=&quot;QQ截图20210903125157.png&quot; title=&quot;QQ截图20210903125157.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>增加博客直接上传腾讯云COS功能</title>
  <link href="https://www.ioioi.cn/posts/add-the-function-of-directly-uploading-tencent-cloud-cos-toblogs/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/add-the-function-of-directly-uploading-tencent-cloud-cos-toblogs/</id>
  <published>2021-09-02T16:06:35.000Z</published>
  <updated>2021-09-02T16:06:35.000Z</updated>
  <summary type="html">&lt;p&gt;最近发现如果要转移数据到另一台服务器，特别麻烦，不仅需要 &lt;code&gt;git clone&lt;/code&gt;还需要拷贝 &lt;code&gt;storage&lt;/code&gt;相关文件、还有 &lt;code&gt;.env&lt;/code&gt;文件，所以将文件直接上传至腾讯云COS是一个不错的选择&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/add-the-function-of-directly-uploading-tencent-cloud-cos-toblogs/images/1630598989.png&quot; alt=&quot;QQ截图20210903001101.png&quot; title=&quot;QQ截图20210903001101.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>MariaDB删除账号测试</title>
  <link href="https://www.ioioi.cn/posts/mariadb-delete-accounttest/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/mariadb-delete-accounttest/</id>
  <published>2021-08-19T12:19:13.000Z</published>
  <updated>2021-08-19T12:19:13.000Z</updated>
  <summary type="html">&lt;ol&gt;
&lt;li&gt;删除内置 &lt;code&gt;mariadb.sys&lt;/code&gt;账户（初始为 &lt;code&gt;USAGE&lt;/code&gt;权限）后无其他问题，但是 &lt;code&gt;phpmyadmin&lt;/code&gt;无法显示和编辑用户，添加授予任意一项权限后正常&lt;/li&gt;
&lt;li&gt;删除内置 &lt;code&gt;mysql&lt;/code&gt;账户后暂时无明显异常&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&quot;/posts/mariadb-delete-accounttest/images/1629382069.png&quot; alt=&quot;QQ截图20210819202342.png&quot; title=&quot;QQ截图20210819202342.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>phpmyadmin安装后显示空白页面</title>
  <link href="https://www.ioioi.cn/posts/a-blank-page-is-displayed-after-phpmyadmin-isinstalled/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/a-blank-page-is-displayed-after-phpmyadmin-isinstalled/</id>
  <published>2021-08-19T12:17:50.000Z</published>
  <updated>2021-08-19T12:17:50.000Z</updated>
  <summary type="html">&lt;p&gt;启用 &lt;code&gt;iconv&lt;/code&gt;和 &lt;code&gt;mysqli&lt;/code&gt;扩展即可&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/a-blank-page-is-displayed-after-phpmyadmin-isinstalled/images/1629382116.png&quot; alt=&quot;QQ截图20210819220905.png&quot; title=&quot;QQ截图20210819220905.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>第一篇日记2021/08/15</title>
  <link href="https://www.ioioi.cn/posts/first-diary-august-15-2021/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/first-diary-august-15-2021/</id>
  <published>2021-08-15T04:53:40.000Z</published>
  <updated>2021-08-15T04:53:40.000Z</updated>
  <summary type="html">&lt;p&gt;第一篇日记2021/08/15&lt;/p&gt;
&lt;p&gt;开发了博客分类栏目&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/first-diary-august-15-2021/images/1629382162.png&quot; alt=&quot;QQ截图20210819220952.png&quot; title=&quot;QQ截图20210819220952.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Linux截图无法获取最新画面</title>
  <link href="https://www.ioioi.cn/posts/linux-screenshot-failed-to-get-the-latestpicture/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/linux-screenshot-failed-to-get-the-latestpicture/</id>
  <published>2021-08-04T05:44:32.000Z</published>
  <updated>2021-08-04T05:44:32.000Z</updated>
  <summary type="html">&lt;p&gt;环境：KDE&lt;/p&gt;
&lt;p&gt;截图一直出现微风的启动加载画面，或者就是一些过时的桌面屏幕&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/linux-screenshot-failed-to-get-the-latestpicture/images/1628055976.png&quot; alt=&quot;20210804134648.png&quot; title=&quot;20210804134648.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;经过我百般搜索百度、CSDN、StackOverflow、Google等等&lt;/p&gt;
&lt;p&gt;最终在&lt;a href=&quot;https://bbs.archlinux.org/viewtopic.php?id=263247&quot;&gt;Arch论坛&lt;/a&gt;里面发现了解决方案&lt;/p&gt;
&lt;p&gt;他的标题是 &lt;code&gt;Spectacle Screenshot uses old screen state&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;恩，一样的问题&lt;/p&gt;






&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;解决方案&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;/table&gt;
&lt;p&gt;If installed, remove xf86-video-intel, reboot and retry. ---By V1del&lt;br&gt;
如果安装了 &lt;code&gt;xf86-video-intel&lt;/code&gt;请移除，重启后再试一次。&lt;/p&gt;</summary>
</entry>
<entry>
  <title>分享一张有趣的图片-1</title>
  <link href="https://www.ioioi.cn/posts/share-an-interesting-picture1/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/share-an-interesting-picture1/</id>
  <published>2021-07-24T14:04:05.000Z</published>
  <updated>2021-07-24T14:04:05.000Z</updated>
  <summary type="html">&lt;p&gt;我的英语功底太薄，无法翻译此处，请期待其他翻译人员来翻译吧。&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/share-an-interesting-picture1/images/1627135462.png&quot; alt=&quot; title=&quot; title=&quot; title=&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;其实那个英文版掉了一个词 &lt;code&gt;fstab-entry&lt;/code&gt;现在给加上了&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/share-an-interesting-picture1/images/1627135710.png&quot; alt=&quot;20210724220838.png&quot; title=&quot;20210724220838.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Arch查看某个命令属于那个软件包</title>
  <link href="https://www.ioioi.cn/posts/arch-view-which-package-a-command-belongsto/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/arch-view-which-package-a-command-belongsto/</id>
  <published>2021-07-24T13:54:46.000Z</published>
  <updated>2021-07-24T13:54:46.000Z</updated>
  <summary type="html">&lt;p&gt;事情的原因是这样的&lt;/p&gt;
&lt;p&gt;我看见&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt; /usr/bin/vglrun: 第 251 行：exec: microsoft-edge-dev-bin：未找到&lt;/span&gt;&lt;/span&gt;&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;p&gt;&lt;img src=&quot;/posts/arch-view-which-package-a-command-belongsto/images/1627135097.png&quot; alt=&quot;2021-07-24_21-58.png&quot; title=&quot;2021-07-24_21-58.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;我先到 &lt;code&gt;AUR&lt;/code&gt;源去找 …没有找到&lt;/p&gt;
&lt;p&gt;然后去 &lt;code&gt;Package&lt;/code&gt;里面找&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/arch-view-which-package-a-command-belongsto/images/1627135175.png&quot; alt=&quot;2021-07-24_21-58_1.png&quot; title=&quot;2021-07-24_21-58_1.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;仍然没有找到于是我想到能不能通过文件来搜索软件包了？&lt;/p&gt;
&lt;p&gt;于是，我去百度，发现 果然 有人跟我有一样的想法～&lt;/p&gt;
&lt;p&gt;来看看来自&lt;a href=&quot;https://www.freesion.com/article/99301097861/&quot;&gt;灰信网&lt;/a&gt;的解决方案&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;pacman -Fl | grep command&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/posts/arch-view-which-package-a-command-belongsto/images/1627135316.png&quot; alt=&quot;2021-07-24_22-02.png&quot; title=&quot;2021-07-24_22-02.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;机智&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/arch-view-which-package-a-command-belongsto/images/1627135393.png&quot; alt=&quot;2021-07-24_22-03.png&quot; title=&quot;2021-07-24_22-03.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;最终成功找到！&lt;/p&gt;</summary>
</entry>
<entry>
  <title>CrossOver输入密钥时显示注册失败</title>
  <link href="https://www.ioioi.cn/posts/cross-over-shows-registration-failure-when-enteringkey/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/cross-over-shows-registration-failure-when-enteringkey/</id>
  <published>2021-07-20T07:00:00.000Z</published>
  <updated>2021-07-20T07:00:00.000Z</updated>
  <summary type="html">&lt;h4 id=&quot;root权限修改文件&quot;&gt;&lt;code&gt;root&lt;/code&gt;权限修改文件&lt;/h4&gt;
&lt;p&gt;修改 &lt;code&gt;/opt/cxoffice/lib/python/demoutils.py&lt;/code&gt;这个文件&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;将第&lt;code&gt;250&lt;/code&gt;行修改为如下：&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;request = urllib_request.Request(URL, request_body.encode(&quot;utf-8&quot;), header)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ol start=&quot;2&quot;&gt;
&lt;li&gt;将第&lt;code&gt;253&lt;/code&gt;行修改如下：&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;responseBuffer = response.read().decode(&quot;utf-8&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;来自：&lt;a href=&quot;https://www.codeweavers.com/support/forums/general/?t=37;msg=223268&quot;&gt;CodeWeavers社区&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Archlinux使用人脸识别登录</title>
  <link href="https://www.ioioi.cn/posts/login-with-face-recognition-inarchlinux/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/login-with-face-recognition-inarchlinux/</id>
  <published>2021-07-19T10:02:49.000Z</published>
  <updated>2021-07-19T10:02:49.000Z</updated>
  <summary type="html">&lt;p&gt;使用 &lt;code&gt;Howdy&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&quot;一安装-howdy&quot;&gt;一、安装 &lt;code&gt;Howdy&lt;/code&gt;&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;yay -S howdy&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;二配置&quot;&gt;二、配置&lt;/h2&gt;
&lt;p&gt;输入命令&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo howdy config&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;修改配置文件&lt;/p&gt;
&lt;p&gt;选择你的摄像头设备&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;device_path = /dev/video0&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;禁用 &lt;code&gt;confirmation&lt;/code&gt;信息&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;no_confirmation = true&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;编辑 &lt;code&gt;/etc/pam.d/system-auth&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;在最上面添加&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;auth sufficient pam_python.so /lib/security/howdy/pam.py&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/posts/login-with-face-recognition-inarchlinux/images/1626705989.png&quot; alt=&quot;20210719_224545.png&quot; title=&quot;20210719_224545.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;如图所示添到最上面&lt;/p&gt;
&lt;p&gt;最后赋权&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo chmod -R 755 /lib/security/howdy/&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;即可享受所有输入密码的位置均可人脸识别！！！&lt;/p&gt;
&lt;p&gt;参考文件:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://wiki.archlinux.org/title/Howdy&quot;&gt;Howdy_Archlinux_Wiki&lt;/a&gt; &amp;#x26;&amp;#x26; &lt;a href=&quot;https://github.com/boltgolt/howdy/issues/28#issuecomment-396231042&quot;&gt;Githu_Issue_For_Howdy&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Jquery页面加载完成时的判断</title>
  <link href="https://www.ioioi.cn/posts/judgment-of-jquery-page-loadingcompletion/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/judgment-of-jquery-page-loadingcompletion/</id>
  <published>2021-07-03T13:59:40.000Z</published>
  <updated>2021-07-03T13:59:40.000Z</updated>
  <summary type="html">&lt;p&gt;最近在弄Blog图片懒加载，发现要等那个js文件加载完，在运行一段js脚本才能实现功能，于是想到此方法，即检测页面加载情况然后运行相关代码&lt;/p&gt;
&lt;p&gt;以下为判断页面是否加载完成的代码&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;script type=&apos;text/javascript&apos;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;　　window.onload = function(){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;　　　　alert(&quot;页面加载完成====》onload&quot;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;　　}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;　　$(window).load(function(){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;　　　　alert(&quot;jquery===》window load&quot; );&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;　　})&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;　　$(document).ready(function () {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;　　　　alert(&quot;jquery====》document ready&quot;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;　　});&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;　　$(function(){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;　　　　alert(&quot;jquery====》document onload&quot;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;　　});&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;　　function aaa(){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;　　　　alert(&quot;静态标签====》onload&quot;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;　　}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;/script&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;摘自&lt;a href=&quot;https://www.cnblogs.com/yifeixue/p/11543250.html&quot;&gt;忆飞雪&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>解决Win10预览体验计划界面为空</title>
  <link href="https://www.ioioi.cn/posts/solve-the-problem-that-win10-preview-experience-plan-interface-isempty/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/solve-the-problem-that-win10-preview-experience-plan-interface-isempty/</id>
  <published>2021-06-24T11:38:35.000Z</published>
  <updated>2021-06-24T11:38:35.000Z</updated>
  <summary type="html">&lt;p&gt;打开 &lt;code&gt;Powershell&lt;/code&gt;输入以下代码&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;$path = &quot;HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# Telemetry level: 1 - basic, 3 - full&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;$value = &quot;3&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;New-ItemProperty -Path $path -Name AllowTelemetry -Value $value -Type Dword -Force&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;New-ItemProperty -Path $path -Name MaxTelemetryAllowed -Value $value -Type Dword -Force&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;重启即可&lt;/p&gt;
&lt;h2 id=&quot;如果不行-则是该注册表权限出现问题&quot;&gt;&lt;strong&gt;如果不行&lt;/strong&gt; 则是该注册表权限出现问题&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;Win+R&lt;/code&gt;打开 &lt;code&gt;regedit&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;找到&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;在左栏中右键该项&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/solve-the-problem-that-win10-preview-experience-plan-interface-isempty/images/1624535124.png&quot; alt=&quot;regedit.png&quot; title=&quot;regedit.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;点击权限-高级设置&lt;/p&gt;
&lt;p&gt;将 &lt;code&gt;Owner&lt;/code&gt;设置为 &lt;code&gt;SYSTEM&lt;/code&gt;（如果它不是的话）&lt;/p&gt;
&lt;p&gt;然后点击 禁用继承&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/solve-the-problem-that-win10-preview-experience-plan-interface-isempty/images/1624535219.png&quot; alt=&quot;20210624194641.png&quot; title=&quot;20210624194641.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;然后&lt;strong&gt;同意后再点击启用&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;重启即可&lt;/p&gt;</summary>
</entry>
<entry>
  <title>解决使用Webpack打包Awesome-fonts时Can&apos;t resolve &apos;../webfonts/fa-regular-400.eot&apos;</title>
  <link href="https://www.ioioi.cn/posts/when-using-webpack-to-package-awesome-fonts-can-t-resolve-webbonds-fa-regular-400-eot/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/when-using-webpack-to-package-awesome-fonts-can-t-resolve-webbonds-fa-regular-400-eot/</id>
  <published>2021-06-24T11:18:11.000Z</published>
  <updated>2021-06-24T11:18:11.000Z</updated>
  <summary type="html">&lt;p&gt;在使用 &lt;code&gt;Webpack&lt;/code&gt;过程中你可能会遇到以下情况&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/when-using-webpack-to-package-awesome-fonts-can-t-resolve-webbonds-fa-regular-400-eot/images/1624533509.png&quot; alt=&quot;20210622212757.png&quot; title=&quot;20210622212757.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;经过查找&lt;a href=&quot;https://stackoverflow.com/questions/57243755/webpack-module-not-found-error-cant-resolve-webfonts-fa-solid-900-eot&quot;&gt;stackoverflow&lt;/a&gt;和&lt;a href=&quot;https://github.com/vuejs-templates/webpack/issues/1313&quot;&gt;Github-vuejs-templates-webpack&lt;/a&gt;与&lt;a href=&quot;https://github.com/JeffreyWay/laravel-mix/issues/2555&quot;&gt;Github-JeffreyWay-laravel-mix&lt;/a&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;$fa-font-path: &apos;~@fortawesome/fontawesome-free/webfonts&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;@import &apos;@fortawesome/fontawesome-free/scss/fontawesome&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;@import &apos;@fortawesome/fontawesome-free/scss/solid&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;@import &apos;@fortawesome/fontawesome-free/scss/regular&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;@import &apos;@fortawesome/fontawesome-free/scss/brands&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;@import &apos;@fortawesome/fontawesome-free/scss/v4-shims&apos;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;修改后发现&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/when-using-webpack-to-package-awesome-fonts-can-t-resolve-webbonds-fa-regular-400-eot/images/1624533902.png&quot; alt=&quot;20210622212806.png&quot; title=&quot;20210622212806.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;但是我知道他上一个问题已经解决了&lt;/p&gt;
&lt;p&gt;这个是新的一个问题：Webpack无法解析 &lt;code&gt;woff2&lt;/code&gt; &lt;code&gt;eot&lt;/code&gt; &lt;code&gt;svg&lt;/code&gt;等等文件&lt;/p&gt;
&lt;p&gt;于是修改 &lt;code&gt;Webpack.config.js&lt;/code&gt;文件&lt;/p&gt;
&lt;p&gt;在 &lt;code&gt;module-&gt;rules&lt;/code&gt;下添加&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    test: /\.(ttf|eot|svg|gif|woff|woff2)(\?v=[0-9]\.[0-9]\.[0-9])?$/,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    use: [{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        loader: &apos;file-loader&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;},&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;然后重新打包&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/when-using-webpack-to-package-awesome-fonts-can-t-resolve-webbonds-fa-regular-400-eot/images/1624534174.png&quot; alt=&quot;20210622212817.png&quot; title=&quot;20210622212817.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/when-using-webpack-to-package-awesome-fonts-can-t-resolve-webbonds-fa-regular-400-eot/images/1624534185.png&quot; alt=&quot;20210622212824.png&quot; title=&quot;20210622212824.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;看到这满屏绿，我就知道这个问题解决了！&lt;/p&gt;</summary>
</entry>
<entry>
  <title>解决 gpg: key xxx: no user ID for key signature packet of class 10</title>
  <link href="https://www.ioioi.cn/posts/gpg-key-xxx-no-user-id-for-key-signature-packet-of-class10/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/gpg-key-xxx-no-user-id-for-key-signature-packet-of-class10/</id>
  <published>2021-06-24T11:07:55.000Z</published>
  <updated>2021-06-24T11:07:55.000Z</updated>
  <summary type="html">&lt;p&gt;有些 &lt;code&gt;keyserver&lt;/code&gt;过时了需要更新，遂改变为其他 &lt;code&gt;keyserver&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;nano /etc/pacman.d/gpg.conf&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;keyserver hkps://pgp.circl.lu&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;如果你安装了 &lt;code&gt;yay&lt;/code&gt;或者其他 &lt;code&gt;AUR Helper&lt;/code&gt;需要去导入 &lt;code&gt;key&lt;/code&gt;你可以按照一下方法来操作&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mkdir -p ~/.gnupg/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;vi ~/.gnupg/gpg.conf&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;之后添加&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;keyserver hkps.pool.sks-keyservers.net&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;https://forum.artixlinux.org/index.php/topic,1798.0.html&quot;&gt;artixlinux.org论坛&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>后台上传图片初步完成</title>
  <link href="https://www.ioioi.cn/posts/the-background-upload-of-images-is-preliminarilycompleted/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/the-background-upload-of-images-is-preliminarilycompleted/</id>
  <published>2021-06-20T09:23:19.000Z</published>
  <updated>2021-06-20T09:23:19.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;img src=&quot;/posts/the-background-upload-of-images-is-preliminarilycompleted/images/1624206550.png&quot; alt=&quot;&quot; loading=&quot;lazy&quot;&gt;&lt;img src=&quot;/posts/the-background-upload-of-images-is-preliminarilycompleted/images/1624206555.jpg&quot; alt=&quot;&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Typecho之BaiduSubmit插件（四）</title>
  <link href="https://www.ioioi.cn/posts/baidu-submit-plug-in-of-typecho-4/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/baidu-submit-plug-in-of-typecho-4/</id>
  <published>2021-02-08T07:22:00.000Z</published>
  <updated>2021-02-08T07:22:00.000Z</updated>
  <summary type="html">&lt;p&gt;已经发布到Github：&lt;a href=&quot;https://github.com/arkylin/BaiduSubmit&quot;&gt;BaiduSubmit&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;目前只实现了后台提交链接功能 0.0.1&lt;/p&gt;
&lt;p&gt;下一步&lt;/p&gt;
&lt;p&gt;将实现页面链接显示及按钮提交功能&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/baidu-submit-plug-in-of-typecho-4/images/2817116770.png&quot; alt=&quot;image.png&quot; title=&quot;image.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Typecho之BaiduSubmit插件（三）</title>
  <link href="https://www.ioioi.cn/posts/baidu-submit-plug-in-of-typecho-3/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/baidu-submit-plug-in-of-typecho-3/</id>
  <published>2021-02-08T07:02:00.000Z</published>
  <updated>2021-02-08T07:02:00.000Z</updated>
  <summary type="html">&lt;p&gt;本来百度原本就提供自动推送js，但是不知道为什么他就把他关了，而写个js用处也不是太大。）&lt;del&gt;主要还是想自定义一个美丽的站点地图&lt;/del&gt;测试一些自己的能力&lt;/p&gt;
&lt;p&gt;然后中途就遇到了一些问题&lt;/p&gt;
&lt;h4 id=&quot;1列表过长需要设置分页&quot;&gt;1.列表过长，需要设置分页&lt;/h4&gt;
&lt;p&gt;尝试了一下&lt;a href=&quot;https://jingyan.baidu.com/article/e8cdb32b07232a37052badef.html&quot;&gt;这个&lt;/a&gt;没成功。。。&lt;/p&gt;
&lt;h4 id=&quot;2typecho路由设置&quot;&gt;2.Typecho路由设置&lt;/h4&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;/**&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; * 增加路由&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; *&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; * @access public&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; * @param string $name 路由名称&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; * @param string $url 路由路径&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; * @param string $widget 组件名称&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; * @param string $action 组件动作&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; * @param string $after 在某个路由后面&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; * @return integer&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;public static function addRoute($name, $url, $widget, $action = NULL, $after = NULL)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;// some code here...&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;[collapse status=“false” title=“思否-老高@PHPer”]&lt;/p&gt;
&lt;h2 id=&quot;获取配置&quot;&gt;获取配置&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# 获取系统配置&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Helper::options();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# 获取指定插件配置&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Helper::options()-&gt;plugin(&apos;BaiduSubmit&apos;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# 获取当前插件配置&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Helper::options()-&gt;plugin(str_replace(&apos;_Plugin&apos;,&apos;&apos;,__CLASS__));&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;路径安全&quot;&gt;路径安全&lt;/h2&gt;
&lt;p&gt;用于生成安全的URL，带有token验证，如果牵扯到action等核心操作时会用到。系统在验证请求是会用到 &lt;code&gt;$this-&gt;widget(&apos;Widget_Security&apos;)-&gt;protect()&lt;/code&gt;去验证来源token。&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;$s = Helper::security();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;echo $s-&gt;index(&apos;/&apos;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# 输出类似 http://www.phpgao.com/?_=ce4a9617aa228bb85ba696c9ba9784be&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;强行删除某插件&quot;&gt;强行删除某插件&lt;/h2&gt;
&lt;p&gt;此方法用于卸载插件失败时的替补方法，老高一般将此方法写入 &lt;code&gt;HELLO_WORLD&lt;/code&gt;插件的 &lt;code&gt;render&lt;/code&gt;方法里，这样刷新以下后台，出问题的插件就被卸载了。&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Helper::removePlugin(&apos;BaiduSubmit&apos;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;路由增删&quot;&gt;路由增删&lt;/h2&gt;
&lt;p&gt;如果你的插件需要给系统添加一个新的路由，那么此方法就能派上用场！&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;路由表保存在表 &lt;code&gt;typecho_options&lt;/code&gt; 中的 &lt;code&gt;routingTable&lt;/code&gt;中。&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;比如老高的插件&lt;a href=&quot;http://www.phpgao.com/typecho_plugin_baidusubmit.html&quot;&gt;BaiduSubmit&lt;/a&gt;，就用此方法为系统添加了一个 &lt;code&gt;http://yourweb/baidu_sitemap.xml&lt;/code&gt;的路由。&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;/**&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; * 增加路由&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; *&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; * @access public&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; * @param string $name 路由名称&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; * @param string $url 路由路径&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; * @param string $widget 组件名称&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; * @param string $action 组件动作&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; * @param string $after 在某个路由后面&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; * @return integer&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Helper::addRoute(&apos;baidu_sitemap&apos;, &apos;/baidu_sitemap.xml&apos;, &apos;BaiduSubmit_Action&apos;, &apos;sitemap&apos;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;不要忘记在卸载的时候调用 &lt;code&gt;Helper::removeRoute(&apos;baidu_sitemap&apos;);&lt;/code&gt;删除刚才添加的路由！&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&quot;action&quot;&gt;Action&lt;/h2&gt;
&lt;p&gt;有心的同学应该能够发现，后台发送文章的form表单的action地址为类似 &lt;code&gt;http://web/action/contents-post-edit?_=xxx&lt;/code&gt;，这个链接表示什么意思呢？请听老高分解！&lt;/p&gt;
&lt;p&gt;Action是typecho中的一类操作，它对应一条特殊的路由/action/，也就是路由表中的 &lt;code&gt;$table[0][&apos;do&apos;]&lt;/code&gt;，具体内容如下&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt; [do] =&gt; Array&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        [url] =&gt; /action/[action:alpha]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        [widget] =&gt; Widget_Do&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        [action] =&gt; action&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        [regx] =&gt; |^/action/([_0-9a-zA-Z-]+)[/]?$|&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        [format] =&gt; /action/%s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        [params] =&gt; Array&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            (&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                [0] =&gt; action&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            )&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    )&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;从路由表能够看出，下一步我们需要找到类 &lt;code&gt;Widget_Do&lt;/code&gt;。我们能在该类中找到系统默认的action对应关系！&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    private $_map = array(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        &apos;ajax&apos;                      =&gt;  &apos;Widget_Ajax&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        &apos;login&apos;                     =&gt;  &apos;Widget_Login&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        &apos;logout&apos;                    =&gt;  &apos;Widget_Logout&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        &apos;register&apos;                  =&gt;  &apos;Widget_Register&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        &apos;upgrade&apos;                   =&gt;  &apos;Widget_Upgrade&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        &apos;upload&apos;                    =&gt;  &apos;Widget_Upload&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        &apos;service&apos;                   =&gt;  &apos;Widget_Service&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        &apos;xmlrpc&apos;                    =&gt;  &apos;Widget_XmlRpc&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        &apos;comments-edit&apos;             =&gt;  &apos;Widget_Comments_Edit&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        &apos;contents-page-edit&apos;        =&gt;  &apos;Widget_Contents_Page_Edit&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        &apos;contents-post-edit&apos;        =&gt;  &apos;Widget_Contents_Post_Edit&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        &apos;contents-attachment-edit&apos;  =&gt;  &apos;Widget_Contents_Attachment_Edit&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        &apos;metas-category-edit&apos;       =&gt;  &apos;Widget_Metas_Category_Edit&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        &apos;metas-tag-edit&apos;            =&gt;  &apos;Widget_Metas_Tag_Edit&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        &apos;options-discussion&apos;        =&gt;  &apos;Widget_Options_Discussion&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        &apos;options-general&apos;           =&gt;  &apos;Widget_Options_General&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        &apos;options-permalink&apos;         =&gt;  &apos;Widget_Options_Permalink&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        &apos;options-reading&apos;           =&gt;  &apos;Widget_Options_Reading&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        &apos;plugins-edit&apos;              =&gt;  &apos;Widget_Plugins_Edit&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        &apos;themes-edit&apos;               =&gt;  &apos;Widget_Themes_Edit&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        &apos;users-edit&apos;                =&gt;  &apos;Widget_Users_Edit&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        &apos;users-profile&apos;             =&gt;  &apos;Widget_Users_Profile&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    );&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;由此映射关系我们知道，当我们需要发布文章的时候（contents-post-edit），就去调用 &lt;code&gt;Widget_Contents_Post_Edit&lt;/code&gt;的action方法即可。&lt;/p&gt;
&lt;p&gt;当我们要添加action对应关系的时候，就可以调用 &lt;code&gt;Helper:addAction()&lt;/code&gt;执行添加，系统就会添加一条 &lt;code&gt;&apos;new_action&apos; =&gt; &apos;some_action&apos;&lt;/code&gt;。&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;新增的动作保存在表 &lt;code&gt;typecho_options&lt;/code&gt; 中的 &lt;code&gt;actionTable&lt;/code&gt;中。&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;需要提醒的是，当我们添加一条action后，需要让其实现类 &lt;code&gt;some_action&lt;/code&gt;实现 &lt;code&gt;Widget_Interface_Do&lt;/code&gt;的接口，即必须有实现 &lt;code&gt;public function action()&lt;/code&gt;，否则调回失败。&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;同route一样，在卸载插件时不要忘了移除action！&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&quot;菜单-面板&quot;&gt;菜单 &amp;#x26; 面板&lt;/h2&gt;
&lt;p&gt;这个很好理解，不再赘述。&lt;/p&gt;
&lt;h2 id=&quot;手动配置&quot;&gt;手动配置&lt;/h2&gt;
&lt;p&gt;当我们需要更自由的配置功能时，可以在Plugin.php文件中添加 &lt;code&gt;public static function configHandle($config)&lt;/code&gt;方法，当后台保存插件设置的时候就会调用此方法而不是默认的简单保存配置。&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;helper::configPlugin(&apos;BaiduSubmit&apos;, $config);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;[/collapse]&lt;/p&gt;
&lt;h4 id=&quot;3typecho-插件的配置信息没有找到&quot;&gt;3.Typecho 插件的配置信息没有找到&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;/posts/baidu-submit-plug-in-of-typecho-3/images/738751273.png&quot; alt=&quot;image.png&quot; title=&quot;image.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;将 &lt;code&gt;____Class____&lt;/code&gt;改为插件名称&lt;/p&gt;
&lt;p&gt;[collapse status=“false” title=“Moleft”]&lt;/p&gt;
&lt;h1 id=&quot;解决-typecho-插件的配置信息没有找到&quot;&gt;解决 Typecho 插件的配置信息没有找到&lt;/h1&gt;
&lt;h3 id=&quot;避免踩坑展开目录&quot;&gt;避免踩坑展开目录&lt;/h3&gt;
&lt;p&gt;入坑 Typecho 已经一个多月了，在这期间 Typecho 的插件也开发了两个 (其实我现在正在开发第三个，就不告诉你是个采集插件)，然后大大小小的坑也踩了不少，其实最深的坑还是启用插件时提示 “插件的配置信息没有找到”，这个具体原因就是因为首次启用插件时，在 &lt;code&gt;config()&lt;/code&gt; 里面获取配置信息，这当然是获取不到的，我们复现一个这个错误。&lt;/p&gt;
&lt;h3 id=&quot;先写插件展开目录&quot;&gt;先写插件展开目录&lt;/h3&gt;
&lt;p&gt;在写一个插件肯定是没那个精力了，我们就稍微改一下官方的 &lt;code&gt;HelloWorld&lt;/code&gt; 插件吧，首先我们先启用报错，在 &lt;code&gt;Plugins.php&lt;/code&gt; 最上面加入下面的代码，这样的话我们就可以看到错误信息了，不然就是 &lt;code&gt;Server Error&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;define(&apos;__TYPECHO_DEBUG__&apos;, true);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;然后我们找到 &lt;code&gt;config&lt;/code&gt; 这个函数，复现一下具体错误，我们加一个获取插件配置的代码，然后保存。&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;$setting = $options = Typecho_Widget::widget(&apos;Widget_Options&apos;)-&gt;plugin(&apos;HelloWorld&apos;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;echo &quot;&amp;#x3C;script&gt;alert(\&quot;{$setting-&gt;word}\&quot;)&amp;#x3C;/script&gt;&quot;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;然后我们启用一下插件，看看会不会报错。&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/baidu-submit-plug-in-of-typecho-3/images/2444383297.png&quot; alt=&quot;image.png&quot; title=&quot;image.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
果不其然，真的报错了，有的时候在 &lt;code&gt;config()&lt;/code&gt; 函数里面获取配置信息是为了更好的显示插件的某些配置，所以说这个对我们来说真的很重要，经过我多方摸索，最后找到了解决办法。&lt;/p&gt;
&lt;h3 id=&quot;如何解决展开目录&quot;&gt;如何解决展开目录&lt;/h3&gt;
&lt;p&gt;其实解决方法也是灰常简单的，只需要加一个捕捉异常，就可以跳过这个坑 (傻傻的我为什么早没有想到呢)，我们来修改一下代码，我们加一个 &lt;code&gt;try catch&lt;/code&gt;，保存之后在重新启用插件。&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;try {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    $setting = $options = Typecho_Widget::widget(&apos;Widget_Options&apos;)-&gt;plugin(&apos;HelloWorld&apos;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    echo &quot;&amp;#x3C;script&gt;alert(\&quot;{$setting-&gt;word}\&quot;)&amp;#x3C;/script&gt;&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;} catch (Exception $e) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    echo &quot;&amp;#x3C;script&gt;alert(\&quot;获取配置失败\&quot;)&amp;#x3C;/script&gt;&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;重新启用插件之后果然没有报错，所以说这个方法是可行的，其他的思路我暂时没有，如果你们有好的方法可以在下面评论。&lt;/p&gt;
&lt;p&gt;[/collapse]&lt;/p&gt;
&lt;h4 id=&quot;4-function-static&quot;&gt;4. function static&lt;/h4&gt;
&lt;p&gt;action不能使用static&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Typecho之BaiduSubmit插件（二）</title>
  <link href="https://www.ioioi.cn/posts/baidu-submit-plugin-of-typecho-2/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/baidu-submit-plugin-of-typecho-2/</id>
  <published>2021-02-08T06:51:00.000Z</published>
  <updated>2021-02-08T06:51:00.000Z</updated>
  <summary type="html">&lt;p&gt;在研究了&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.imhan.com&quot;&gt;寒泥的sitemap&lt;/a&gt;插件&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;$pages = $db-&gt;fetchAll($db-&gt;select()-&gt;from(&apos;table.contents&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        -&gt;where(&apos;table.contents.status = ?&apos;, &apos;publish&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        -&gt;where(&apos;table.contents.created &amp;#x3C; ?&apos;, $options-&gt;gmtTime)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        -&gt;where(&apos;table.contents.type = ?&apos;, &apos;page&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        -&gt;order(&apos;table.contents.created&apos;, Typecho_Db::SORT_DESC));&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $articles = $db-&gt;fetchAll($db-&gt;select()-&gt;from(&apos;table.contents&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        -&gt;where(&apos;table.contents.status = ?&apos;, &apos;publish&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        -&gt;where(&apos;table.contents.created &amp;#x3C; ?&apos;, $options-&gt;gmtTime)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        -&gt;where(&apos;table.contents.type = ?&apos;, &apos;post&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        -&gt;order(&apos;table.contents.created&apos;, Typecho_Db::SORT_DESC));&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        foreach($pages AS $page) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $type = $page[&apos;type&apos;];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $routeExists = (NULL != Typecho_Router::get($type));&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $page[&apos;pathinfo&apos;] = $routeExists ? Typecho_Router::url($type, $page) : &apos;#&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $page[&apos;permalink&apos;] = Typecho_Common::url($page[&apos;pathinfo&apos;], $options-&gt;index);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        foreach($articles AS $article) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $type = $article[&apos;type&apos;];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $article[&apos;categories&apos;] = $db-&gt;fetchAll($db-&gt;select()-&gt;from(&apos;table.metas&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                    -&gt;join(&apos;table.relationships&apos;, &apos;table.relationships.mid = table.metas.mid&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                    -&gt;where(&apos;table.relationships.cid = ?&apos;, $article[&apos;cid&apos;])&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                    -&gt;where(&apos;table.metas.type = ?&apos;, &apos;category&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                    -&gt;order(&apos;table.metas.order&apos;, Typecho_Db::SORT_ASC));&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $article[&apos;category&apos;] = urlencode(current(Typecho_Common::arrayFlatten($article[&apos;categories&apos;], &apos;slug&apos;)));&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $article[&apos;slug&apos;] = urlencode($article[&apos;slug&apos;]);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $article[&apos;date&apos;] = new Typecho_Date($article[&apos;created&apos;]);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $article[&apos;year&apos;] = $article[&apos;date&apos;]-&gt;year;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $article[&apos;month&apos;] = $article[&apos;date&apos;]-&gt;month;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $article[&apos;day&apos;] = $article[&apos;date&apos;]-&gt;day;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $routeExists = (NULL != Typecho_Router::get($type));&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $article[&apos;pathinfo&apos;] = $routeExists ? Typecho_Router::url($type, $article) : &apos;#&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $article[&apos;permalink&apos;] = Typecho_Common::url($article[&apos;pathinfo&apos;], $options-&gt;index);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        }&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;和有后台页面&lt;a href=&quot;http://mrasong.com/a/baidu-link-submit-for-typecho&quot;&gt;mrasong的插件&lt;/a&gt;源码后&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;public static function config(Typecho_Widget_Helper_Form $form){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        preg_match(&quot;/^(http(s)?:\/\/)?([^\/]+)/i&quot;, Helper::options()-&gt;siteUrl, $matches);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $domain = $matches[2] ? $matches[2] : &apos;&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $site = new Typecho_Widget_Helper_Form_Element_Text(&apos;site&apos;, NULL, $domain, _t(&apos;站点域名&apos;), _t(&apos;站长工具中添加的域名&apos;));&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $form-&gt;addInput($site-&gt;addRule(&apos;required&apos;, _t(&apos;请填写站点域名&apos;)));&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $token = new Typecho_Widget_Helper_Form_Element_Text(&apos;token&apos;, NULL, &apos;&apos;, _t(&apos;准入密钥&apos;), _t(&apos;更新密钥后，请同步修改此处密钥，否则身份校验不通过将导致数据发送失败。&apos;));&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $form-&gt;addInput($token-&gt;addRule(&apos;required&apos;, _t(&apos;请填写准入密钥&apos;)));&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;思路已经初步形成&lt;/p&gt;
&lt;p&gt;首先需要获取网站的&lt;strong&gt;站点地图&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;配置&lt;strong&gt;路由&lt;/strong&gt;页面&lt;/p&gt;
&lt;p&gt;将站点地图以表格的形式列出&lt;/p&gt;
&lt;p&gt;&lt;del&gt;在后面添加检测是否在百度的php&lt;/del&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;// public function action(){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    //     function baidu_record($a) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    //         //$url=&apos;http://&apos;.$_SERVER[&apos;HTTP_HOST&apos;].$_SERVER[&apos;REQUEST_URI&apos;]; &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    //         $url=$a;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    //         if(checkBaidu($url)==1) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    //             echo &quot;百度已收录&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    //         }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    //         else {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    //             echo &quot;&amp;#x3C;a style=\&quot;color:red;\&quot; rel=\&quot;external nofollow\&quot; title=\&quot;点击提交收录！\&quot; target=\&quot;_blank\&quot; href=\&quot;http://zhanzhang.baidu.com/sitesubmit/index?sitename=$url\&quot;&gt;百度未收录&amp;#x3C;/a&gt;&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    //         }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    //     }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    //     function checkBaidu($url) { &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    //         $url = &apos;http://www.baidu.com/s?wd=&apos; . urlencode($url); &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    //         $curl = curl_init(); &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    //         curl_setopt($curl, CURLOPT_URL, $url); &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    //         curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    //         $rs = curl_exec($curl); &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    //         curl_close($curl); &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    //         if (!strpos($rs, &apos;没有找到&apos;)) { //没有找到说明已被百度收录 &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    //             return 1; &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    //         } else { &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    //             return -1; &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    //         }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    //     }&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;但是发现这个可能会对服务器ip造成不好的影响，比如，如果不设置一些header，百度就会禁止你浏览，而返回一个验证链接。甚至会被列入黑名单！&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;https://wappass.baidu.com/static/captcha/tuxing.html&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;然后在每条链接后面设置提交按钮&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Typecho之BaiduSubmit插件（一）</title>
  <link href="https://www.ioioi.cn/posts/baidu-submit-plug-in-of-typecho-1/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/baidu-submit-plug-in-of-typecho-1/</id>
  <published>2021-02-08T06:40:00.000Z</published>
  <updated>2021-02-08T06:40:00.000Z</updated>
  <summary type="html">&lt;h3 id=&quot;开始&quot;&gt;开始&lt;/h3&gt;
&lt;p&gt;在网上找了一圈都没有发现自己想要的插件功能&lt;/p&gt;
&lt;p&gt;有的就是：后台每提交一次，发送一次&lt;/p&gt;
&lt;p&gt;于是想自己开发一个插件&lt;/p&gt;
&lt;h3 id=&quot;功能&quot;&gt;功能&lt;/h3&gt;
&lt;ol&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;/ol&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;1&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;&lt;img src=&quot;/posts/baidu-submit-plug-in-of-typecho-1/images/3990303571.png&quot; alt=&quot;image.png&quot; title=&quot;image.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Windows10 蓝牙鼠标能连上动不了</title>
  <link href="https://www.ioioi.cn/posts/windows-10-bluetooth-mouse-cant-move/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/windows-10-bluetooth-mouse-cant-move/</id>
  <published>2021-02-08T03:04:00.000Z</published>
  <updated>2021-02-08T03:04:00.000Z</updated>
  <summary type="html">&lt;p&gt;打开&lt;em&gt;&lt;strong&gt;所有控制面板项&lt;/strong&gt;&lt;/em&gt;窗口，点击窗口中的“疑难解答”图标。&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/windows-10-bluetooth-mouse-cant-move/images/795923228.png&quot; alt=&quot;image.png&quot; title=&quot;image.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;在打开的&lt;em&gt;&lt;strong&gt;疑难解答&lt;/strong&gt;&lt;/em&gt;设置页面中，点击“硬件和声音”图标。&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/windows-10-bluetooth-mouse-cant-move/images/1131432921.png&quot; alt=&quot;image.png&quot; title=&quot;image.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;在打开的新窗口中，点击“蓝牙”一项的快捷链接。&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/windows-10-bluetooth-mouse-cant-move/images/1468284150.png&quot; alt=&quot;image.png&quot; title=&quot;image.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;这时会打开“解决并帮助解决计算机问题”的窗口，点击下一步按钮&lt;/p&gt;
&lt;p&gt;一般这种情况，都是&lt;strong&gt;蓝牙收发器&lt;/strong&gt;的问题&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/windows-10-bluetooth-mouse-cant-move/images/3821799541.png&quot; alt=&quot;image.png&quot; title=&quot;image.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;最后处理好后点完成，就可以正常愉快使用了&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Linux 锁定文件</title>
  <link href="https://www.ioioi.cn/posts/linux-lock-file/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/linux-lock-file/</id>
  <published>2021-01-22T12:09:00.000Z</published>
  <updated>2021-01-22T12:09:00.000Z</updated>
  <summary type="html">&lt;h1 id=&quot;linux---锁定文件&quot;&gt;&lt;a href=&quot;https://www.cnblogs.com/sch01ar/p/9456340.html&quot;&gt;Linux - 锁定文件&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;锁定关键的系统文件可以防止服务器提权后被篡改&lt;/p&gt;
&lt;p&gt;对启动文件和账号密码文件进行加锁&lt;/p&gt;







&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;1&lt;/th&gt;&lt;th&gt;[root@sch01ar ~]“# chattr +i /etc/passwd /etc/shadow /etc/group /etc/gshadow /etc/inittab&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;/table&gt;
&lt;p&gt;这些文件上锁后，任何用户都不能对这些文件进行修改和删除&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/linux-lock-file/images/2699144329.png&quot; alt=&quot;&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;root 用户强制保存退出也不行&lt;/p&gt;
&lt;p&gt;如果想对这些文件进行操作的话，可以先对这些文件解锁，修改后再加锁&lt;/p&gt;
&lt;p&gt;对这些文件解锁&lt;/p&gt;







&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;1&lt;/th&gt;&lt;th&gt;[root@sch01ar ~]“# chattr -i /etc/passwd /etc/shadow /etc/group /etc/gshadow /etc/inittab&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;/table&gt;
&lt;p&gt;可以把 chattr 改名，防止被黑客利用&lt;/p&gt;







&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;1&lt;/th&gt;&lt;th&gt;[root@sch01ar ~]“# mv /usr/bin/chattr /usr/bin/test&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;/table&gt;</summary>
</entry>
<entry>
  <title>记一次被阿里云聆听平台采纳意见的过程</title>
  <link href="https://www.ioioi.cn/posts/a-process-of-being-accepted-by-aliclouds-listening-platform/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/a-process-of-being-accepted-by-aliclouds-listening-platform/</id>
  <published>2021-01-22T07:25:00.000Z</published>
  <updated>2024-04-02T11:28:39.000Z</updated>
  <summary type="html">&lt;p&gt;原文&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;【需求场景】添加域名证书&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;【使用问题】&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;添加域名证书时，&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;①只能使用RSA的无法使用ECC加密算法（而阿里云云盾的证书支持ECC加密算法)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;②添加RSA证书私钥时开头结尾必须&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;为&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;-----BEGIN RSA PRIVATE KEY-----&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;-----END RSA PRIVATE KEY-----&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;而不是&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;-----BEGIN PRIVATE KEY-----&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;-----END PRIVATE KEY-----&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;而目前SSL申请机构有较大一部分对于RSA的私钥格式是使用的下面这种格式&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;【改进建议】&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;①添加支持ECC证书的功能&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;②对证书格式和内容进行兼容或识别等&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;之后就有了某个邮件
&lt;img src=&quot;/posts/a-process-of-being-accepted-by-aliclouds-listening-platform/images/2563910900.png&quot; alt=&quot;image.png&quot; title=&quot;image.png&quot; loading=&quot;lazy&quot;&gt;
然后
&lt;img src=&quot;/posts/a-process-of-being-accepted-by-aliclouds-listening-platform/images/810500169.png&quot; alt=&quot;image.png&quot; title=&quot;image.png&quot; loading=&quot;lazy&quot;&gt;&lt;img src=&quot;/posts/a-process-of-being-accepted-by-aliclouds-listening-platform/images/690710908.png&quot; alt=&quot;image.png&quot; title=&quot;image.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Windows 10 调整虚拟键盘大小</title>
  <link href="https://www.ioioi.cn/posts/windows-10-resizing-virtual-keyboard/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/windows-10-resizing-virtual-keyboard/</id>
  <published>2021-01-20T15:07:00.000Z</published>
  <updated>2021-01-20T15:07:00.000Z</updated>
  <summary type="html">&lt;p&gt;新建下列注册表键值，数字越大，键盘越小，设置40后大小如上图所示；重启电脑后生效。&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Windows Registry Editor Version 5.00&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Scaling]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&quot;MonitorSize&quot;=&quot;40&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;/media/2021/01/2236795826.reg&quot;&gt;点击下载注册表文件&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;效果预览：&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/windows-10-resizing-virtual-keyboard/images/1523561801.png&quot; alt=&quot;image.png&quot; title=&quot;image.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>PHP中cURL的curl_getinfo函数返回的CURLINFO_HTTP_CODE是0</title>
  <link href="https://www.ioioi.cn/posts/curl-of-curl-in-php-curlinfo-returned-by-getinfo-function-http-code-is-0/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/curl-of-curl-in-php-curlinfo-returned-by-getinfo-function-http-code-is-0/</id>
  <published>2021-01-20T13:28:00.000Z</published>
  <updated>2021-01-20T13:28:00.000Z</updated>
  <summary type="html">&lt;h3 id=&quot;php中curl的curlgetinfo函数返回的curlinfohttpcode是0&quot;&gt;PHP中cURL的curl_getinfo函数返回的CURLINFO_HTTP_CODE是0&lt;/h3&gt;
&lt;p&gt;分类专栏： &lt;a href=&quot;https://blog.csdn.net/u012314976/category_6138944.html&quot;&gt;PHP&lt;/a&gt; 文章标签： &lt;a href=&quot;https://www.csdn.net/tags/NtDagg1sNTQwLWJsb2cO0O0O.html&quot;&gt;php&lt;/a&gt; &lt;a href=&quot;https://www.csdn.net/tags/MtTaEg0sMzc4NTUtYmxvZwO0O0OO0O0O.html&quot;&gt;curl&lt;/a&gt; &lt;a href=&quot;https://so.csdn.net/so/search/s.do?q=httpCode&amp;#x26;t=blog&amp;#x26;o=vip&amp;#x26;s=&amp;#x26;l=&amp;#x26;f=&amp;#x26;viparticle=&quot;&gt;httpCode&lt;/a&gt; &lt;a href=&quot;https://www.csdn.net/tags/MtTaEg0sMTQ2ODgtYmxvZwO0O0OO0O0O.html&quot;&gt;状态码&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;分析&quot;&gt;分析&lt;/h2&gt;
&lt;p&gt;在PHP中使用cURL获取网页时，可以通过函数&lt;code&gt;curl_getinfo()&lt;/code&gt;来获取http状态码。&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);1&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;我们期望的状态码是200，而且HTTP标准也对其它状态码做了一些定义。&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;100~199&lt;/td&gt;&lt;td&gt;100~101&lt;/td&gt;&lt;td&gt;信息&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;200~299&lt;/td&gt;&lt;td&gt;200~206&lt;/td&gt;&lt;td&gt;成功&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;300~399&lt;/td&gt;&lt;td&gt;300~305&lt;/td&gt;&lt;td&gt;重定向&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;400~499&lt;/td&gt;&lt;td&gt;400~415&lt;/td&gt;&lt;td&gt;客户端错误&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;500~599&lt;/td&gt;&lt;td&gt;500~505&lt;/td&gt;&lt;td&gt;服务端错误&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;但是&lt;code&gt;curl_getinfo()&lt;/code&gt;有时候会给我们返回状态是0的状态码，原因如下，&lt;/p&gt;
&lt;p&gt;如果你&lt;strong&gt;已经连接到服务器&lt;/strong&gt;上了，那么你将会返回一个状态码；否则，将会失败并返回一个0。&lt;/p&gt;
&lt;p&gt;所以，如果你连接到&lt;code&gt;www.google.com/lksdfk&lt;/code&gt;时，你会收到一个400的状态码，如果你连接到&lt;code&gt;google.com&lt;/code&gt;，你会收到一个302的状态码（如果继续访问的话，将会收到200的状态码，因为被重定向到了&lt;code&gt;www.google.com.hk&lt;/code&gt;）,如果你访问&lt;code&gt;googlecom&lt;/code&gt;，你会收到一个0状态码，并提示找不到host。&lt;/p&gt;
&lt;p&gt;错误的详细原因可以通过函数&lt;code&gt;curl_error()&lt;/code&gt;进行查询。&lt;/p&gt;
&lt;h2 id=&quot;参考&quot;&gt;参考&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://stackoverflow.com/questions/10227879/php-curl-http-code-return-0&quot;&gt;PHP cURL HTTP CODE return 0&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;HTTP权威指南&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;(&lt;a href=&quot;https://blog.csdn.net/u012314976&quot;&gt;https://blog.csdn.net/u012314976&lt;/a&gt;) 2016-08-01 14:24:18&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Windows显示时间秒数</title>
  <link href="https://www.ioioi.cn/posts/windows-display-time-seconds/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/windows-display-time-seconds/</id>
  <published>2021-01-20T11:24:00.000Z</published>
  <updated>2021-01-20T11:24:00.000Z</updated>
  <summary type="html">&lt;p&gt;在注册表中定位到&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;在空白处右击，选择新建&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;【DWORD（32位）值】&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;将新建值的名称改为&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ShowSecondsInSystemClock&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;并双击编辑数值数据，将其改为 &lt;code&gt;1&lt;/code&gt;，点击确定。重启生效&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/windows-display-time-seconds/images/310934646.png&quot; alt=&quot;image.png&quot; title=&quot;image.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>KodCloud使用阿里云oss的时候使用内网访问</title>
  <link href="https://www.ioioi.cn/posts/kodcloud-uses-intranet-access-when-using-alicloud-oss/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/kodcloud-uses-intranet-access-when-using-alicloud-oss/</id>
  <published>2021-01-16T15:40:30.000Z</published>
  <updated>2021-01-16T15:40:30.000Z</updated>
  <summary type="html">&lt;p&gt;在./config/setting_user.php中配置参数，使上传下载都走服务器端（也就是实现走内网）&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;$config[&apos;settings&apos;][&apos;ioFileOutServer&apos;] = true;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;$config[&apos;settings&apos;][&apos;ioUploadServer&apos;] = true;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>搭建IE（IE8、IE9、IE10、IE11）兼容性测试环境</title>
  <link href="https://www.ioioi.cn/posts/build-ie-ie8-ie9-ie10-ie11-compatibility-test-environment/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/build-ie-ie8-ie9-ie10-ie11-compatibility-test-environment/</id>
  <published>2021-01-16T12:11:00.000Z</published>
  <updated>2021-01-16T12:11:00.000Z</updated>
  <summary type="html">&lt;h1 id=&quot;搭建ieie8ie9ie10ie11兼容性测试环境&quot;&gt;搭建IE（IE8、IE9、IE10、IE11）兼容性测试环境&lt;/h1&gt;
&lt;p&gt;&lt;img src=&quot;/posts/build-ie-ie8-ie9-ie10-ie11-compatibility-test-environment/images/3168541662.png&quot; alt=&quot;&quot; loading=&quot;lazy&quot;&gt;&lt;a href=&quot;https://blog.csdn.net/zwbsly&quot;&gt;小鱼儿游啊悠&lt;/a&gt; 2016-11-10 13:23:18 &lt;img src=&quot;/posts/build-ie-ie8-ie9-ie10-ie11-compatibility-test-environment/images/2904360946.png&quot; alt=&quot;&quot; loading=&quot;lazy&quot;&gt; 21503 &lt;a href=&quot;&quot;&gt;&lt;img src=&quot;/posts/build-ie-ie8-ie9-ie10-ie11-compatibility-test-environment/images/3199101258.png&quot; alt=&quot;&quot; loading=&quot;lazy&quot;&gt; 收藏&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;分类专栏： &lt;a href=&quot;https://blog.csdn.net/zwbsly/category_1305777.html&quot;&gt;技术文章&lt;/a&gt; 文章标签： &lt;a href=&quot;https://so.csdn.net/so/search/s.do?q=ie%208&amp;#x26;t=blog&amp;#x26;o=vip&amp;#x26;s=&amp;#x26;l=&amp;#x26;f=&amp;#x26;viparticle=&quot;&gt;ie 8&lt;/a&gt; &lt;a href=&quot;https://so.csdn.net/so/search/s.do?q=ie%209&amp;#x26;t=blog&amp;#x26;o=vip&amp;#x26;s=&amp;#x26;l=&amp;#x26;f=&amp;#x26;viparticle=&quot;&gt;ie 9&lt;/a&gt; &lt;a href=&quot;https://so.csdn.net/so/search/s.do?q=ie%2010&amp;#x26;t=blog&amp;#x26;o=vip&amp;#x26;s=&amp;#x26;l=&amp;#x26;f=&amp;#x26;viparticle=&quot;&gt;ie 10&lt;/a&gt; &lt;a href=&quot;https://so.csdn.net/so/search/s.do?q=ie%2011&amp;#x26;t=blog&amp;#x26;o=vip&amp;#x26;s=&amp;#x26;l=&amp;#x26;f=&amp;#x26;viparticle=&quot;&gt;ie 11&lt;/a&gt; &lt;a href=&quot;https://www.csdn.net/tags/MtTaEg0sMzkzMjYtYmxvZwO0O0OO0O0O.html&quot;&gt;兼容性测试&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;&quot;&gt;版权&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;背景&quot;&gt;背景&lt;/h3&gt;
&lt;p&gt;虽然IE的最后一个版本IE11已经发布了三年之久，且win10也默认了Edge浏览器，但现在IE的份额依然排在第二位，web开发不得不考虑几个版本IE的兼容性效果。&lt;br&gt;
虽然一些浏览器插件支持模拟，也有类似IEtester之类的工具，但都算不上原汁原味的IE。&lt;br&gt;
&lt;img src=&quot;/posts/build-ie-ie8-ie9-ie10-ie11-compatibility-test-environment/images/1029985862.png&quot; alt=&quot;这里写图片描述&quot; title=&quot;这里写图片描述&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
注：图片引自&lt;a href=&quot;http://liulanmi.com/top/11618.html&quot;&gt;http://liulanmi.com/top/11618.html&lt;/a&gt;，2016年8月份的数据&lt;/p&gt;
&lt;h3 id=&quot;方案&quot;&gt;方案&lt;/h3&gt;
&lt;p&gt;下面要说的是通过安装虚拟机来使用不同版本的IE。&lt;br&gt;
每个虚拟机都是安装了某个IE版本的windows系统，所以要测试几个IE版本，就得下载几个虚拟机文件。&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;安装virtualbox：&lt;a href=&quot;https://www.virtualbox.org/&quot;&gt;virtualbox官网&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;下载IE虚拟机：&lt;a href=&quot;https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/&quot;&gt;下载地址微软官网&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;导入虚拟机并使用：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;打开virtualbox，点击管理-导入虚拟电脑&lt;/li&gt;
&lt;li&gt;选择下载好的虚拟机文件（open virtual format archive格式）&lt;/li&gt;
&lt;li&gt;不需要勾选（重新初始化所有网卡的MAC地址）&lt;/li&gt;
&lt;li&gt;点击导入，等待几分钟，导入完成后，虚拟机便出现在列表中&lt;/li&gt;
&lt;li&gt;选择并启动虚拟机即可。&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;注意点：虚拟机有使用期限，所以虚拟机文件注意有个原始的备份，一旦过期了再使用原始的虚拟机文件即可，这是微软官方的建议。&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</summary>
</entry>
<entry>
  <title>关于一次投诉钓鱼网站滥用域名的历程</title>
  <link href="https://www.ioioi.cn/posts/about-a-complaint-about-phishing-website-abusing-domain-name/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/about-a-complaint-about-phishing-website-abusing-domain-name/</id>
  <published>2021-01-11T15:57:00.000Z</published>
  <updated>2021-01-11T15:57:00.000Z</updated>
  <summary type="html">&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;发件人:  abuse&amp;#x3C;abuse@west.cn&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;日期:  2021-01-11 (星期一) 10:00:49;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;收件人:  Kylin&amp;#x3C;support@xyz.blue&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;------------------您好，&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;dfgdgf.top 域名已关停。&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;------------------ 原始邮件 ------------------&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;发件人:  Kylin&amp;#x3C;support@xyz.blue&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;日  期:  2021-01-10 (星期日) 12:51:44&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;收件人:  abuse&amp;#x3C;abuse@west.cn&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;主  题:  域名滥用投诉 dfgdgf.top&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;你好，成都西维数码科技有限公司：&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;贵公司注册的dfgdgf.top域名存在滥用情况，请处理！&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Domain Name: dfgdgf.top&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Registry Domain ID: D20201207G10001G_52900032-top&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Registrar WHOIS Server: whois.west263.com&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Registrar URL: www.west263.com&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Updated Date:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Creation Date: 2020-12-07T07:13:02Z&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Registry Expiry Date: 2021-12-07T07:13:02Z&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Registrar: Chengdu west dimension digital&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Registrar IANA ID: 1556&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;在其www.dfgdgf.top,jdkdj.dfgdgf.top等所有子域名页面为虚假腾讯邮箱登陆页面。&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;![虚假邮箱图片](images/2620202962.jpg)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;存在 在电脑端引导用户输入QQ帐号密码; 在手机端存在引导用户输入手机号QQ密码的情况&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;提交 http://www.dfgdgf.top/ajax.php?u=QQ号&amp;#x26;p=QQ密码&amp;#x26;t=手机号&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;利用伪造的 Web 站点来进行网络诈骗活动，存在大量非法获得的公民个人信息。&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;希望贵公司处理&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;谢谢！&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>webdav适配调整: 允许http,文件大小限制50m变更为2G</title>
  <link href="https://www.ioioi.cn/posts/webdav-adaptation-http-is-allowed-and-the-file-size-limit-is-changed-from-50m-to-2g/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/webdav-adaptation-http-is-allowed-and-the-file-size-limit-is-changed-from-50m-to-2g/</id>
  <published>2021-01-03T12:15:33.000Z</published>
  <updated>2021-01-03T12:15:33.000Z</updated>
  <summary type="html">&lt;p&gt;在KodCloud中发现&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;:: webdav适配调整: 允许http,文件大小限制50m变更为2G)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;:: reg help: https://www.cnblogs.com/byron0918/p/4832556.html; &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;:: change https://tool.oschina.net/hexconvert/;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;@echo off&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cls&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;echo &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;echo change webdav(allow http,fileSizeLimit 50M to 2G)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;net stop webclient&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters /f /v BasicAuthLevel /t reg_dword /d 2 &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters /f /v FileSizeLimitInBytes /t reg_dword /d 4294967295&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;net start webclient&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mshta vbscript:msgbox(&quot;webdav apply success&quot;)(window.close)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;/media/2021/01/642240132.cmd&quot;&gt;一件修改WebDav文件&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>DzzOffice的Caddy文件备份</title>
  <link href="https://www.ioioi.cn/posts/backup-of-caddy-files-in-dzzoffice/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/backup-of-caddy-files-in-dzzoffice/</id>
  <published>2021-01-02T12:11:00.000Z</published>
  <updated>2021-01-02T12:11:00.000Z</updated>
  <summary type="html">&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cloud.xyz.blue {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #reverse_proxy * localhost:5212&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    header {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        Strict-Transport-Security &quot;max-age=63072000; includeSubDomains; preload&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    root * /www/wwwroot/cloud.xyz.blue&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    tls /etc/caddy/tls/xyz.blue/fullchain.pem /etc/caddy/tls/xyz.blue/privkey.pem&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    php_fastcgi * 127.0.0.1:11172&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    file_server&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    @key0 {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     not file &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     path_regexp key0 &apos;wopi\/files\/(\w+)\/contents(.*)&apos; &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    rewrite @key0 core/api/wopi/index.php?action=contents&amp;#x26;path={re.key0.1}&amp;#x26;{re.key0.2}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    @key1 {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     not file &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     path_regexp key1 &apos;wopi\/files\/(\w+)\/(lock|unlock)(.*)&apos; &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    rewrite @key1 core/api/wopi/index.php?action={re.key1.2}&amp;#x26;path={re.key1.1}&amp;#x26;{re.key1.3}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    @key2 {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     not file &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     path_regexp key2 &apos;wopi\/files\/(\w+)(.*)&apos; &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    rewrite @key2 core/api/wopi/index.php?path={re.key2.1}&amp;#x26;{re.key2.2}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    @key3 {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     not file &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     path_regexp key3 &apos;wopi\/files\/(.*)&apos; &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    rewrite @key3 core/api/wopi/index.php?{re.key3.1}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    @key4 {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     not file &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     path_regexp key4 &apos;dingredirect\/(\w+)&apos; &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    rewrite @key4 index.php?mod=dingtalk&amp;#x26;op=dingredirect&amp;#x26;url={re.key4.1}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>Typecho生成静态首页文件，提高网站打开速度</title>
  <link href="https://www.ioioi.cn/posts/typecho-generates-front-page-static-html-several-times-to-improve-website-opening-speed/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/typecho-generates-front-page-static-html-several-times-to-improve-website-opening-speed/</id>
  <published>2020-12-20T09:59:00.000Z</published>
  <updated>2020-12-20T09:59:00.000Z</updated>
  <summary type="html">&lt;p&gt;按照以下来操作&lt;br&gt;
在网站的根目录下&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;?php&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;$nowtime=time();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;$pastsec = $nowtime - $_GET[&quot;t&quot;];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;if($pastsec&amp;#x3C;600)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;exit; //10分钟更新一次，时间可以自己调整&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ob_start(); //打开缓冲区&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;include(&quot;index.php&quot;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;$content = ob_get_contents(); //得到缓冲区的内容&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;$content .= &quot;\n&amp;#x3C;script language=javascript src=\&quot;jingtai.php?t=&quot;.$nowtime.&quot;\&quot;&gt;&amp;#x3C;/script&gt;&quot;; //加上调用更新程序的代码&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;file_put_contents(&quot;index.html&quot;,$content);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;if (!function_exists(&quot;file_put_contents&quot;))&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;function file_put_contents($fn,$fs)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;$fp=fopen($fn,&quot;w+&quot;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;fputs($fp,$fs);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;fclose($fp);  &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;?&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;并访问这个文件之后会生成一个 index.html 文件并在文件末尾出现 script 标签并附带一个时间戳,当访问同 index.html的时候会加载这个 script 标签并访向一次index.php这个访问时会获取一次当前时间,如果和传递进来的参数相比时间大于设置的600秒就会刷新一次&lt;/p&gt;
&lt;p&gt;缺点:如果是将nginx/ Apache / caddy 的默认页面设置为html优先，通过首页点击文章页面无法正常跳转,无法配合 Handsome 的pjax&lt;/p&gt;
&lt;p&gt;[collapse status=“false” title=“来自 SunPma”]&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://sunpma.com/484.html&quot;&gt;https://sunpma.com/484.html&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;介绍&quot;&gt;介绍&lt;/h2&gt;
&lt;p&gt;最近感觉博客打开速度慢了不少，测试来看均值基本都在3秒以上，因为博客上有不少的 &lt;code&gt;CSS&lt;/code&gt;和 &lt;code&gt;JS&lt;/code&gt;加载速度也就慢了下来，并且本博客没有做图站分离，都是放在一起的，速度确实较慢；&lt;br&gt;
于是给首页做了个静态 &lt;code&gt;HTML&lt;/code&gt;，首页打开速度确实提升了数倍，需要的朋友也可以试试；&lt;br&gt;
&lt;strong&gt;未做静态HTML前的打开测试&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;生成静态HTML后的打开测试&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;对比可以看出提升确实比较大，从均值3.5秒提升到了1秒以内，相当满意了；&lt;/p&gt;
&lt;h2 id=&quot;开始&quot;&gt;开始&lt;/h2&gt;
&lt;p&gt;这里提供两个 &lt;code&gt;PHP&lt;/code&gt;代码脚本，一个是不需要密码的，一个是需要密码的；&lt;br&gt;
首先在网站根目录新建一个 &lt;code&gt;php&lt;/code&gt;文件，文件命名为：&lt;code&gt;jingtai.php&lt;/code&gt;&lt;br&gt;
然后在其中写入需要的代码（不需要密码和需要密码的选择其中一个即可）&lt;br&gt;
&lt;strong&gt;不需要密码的PHP脚本&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;?php&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;$nowtime=time();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;$pastsec = $nowtime - $_GET[&quot;t&quot;];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;if($pastsec&amp;#x3C;600)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;exit; //10分钟更新一次，时间可以自己调整&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ob_start(); //打开缓冲区&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;include(&quot;index.php&quot;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;$content = ob_get_contents(); //得到缓冲区的内容&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;$content .= &quot;\n&amp;#x3C;script language=javascript src=\&quot;jingtai.php?t=&quot;.$nowtime.&quot;\&quot;&gt;&amp;#x3C;/script&gt;&quot;; //加上调用更新程序的代码&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;file_put_contents(&quot;index.html&quot;,$content);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;if (!function_exists(&quot;file_put_contents&quot;))&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;function file_put_contents($fn,$fs)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;$fp=fopen($fn,&quot;w+&quot;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;fputs($fp,$fs);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;fclose($fp);  &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;?&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;需要要密码的PHP脚本&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;?php&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;/**&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; * 首页静态化脚本&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ini_set( &apos;date.timezone&apos;, &apos;PRC&apos; );&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;/* 缓存过期时间 单位：秒 */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;$expire = 600;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;/* 主动刷新密码  格式：https://你的域名/jingtai.php?password=123456 */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;$password = &apos;123456&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;$file_time = @filemtime( &apos;index.html&apos; );&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;time() - $file_time &gt; $expire &amp;#x26;&amp;#x26; create_index();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;isset( $_GET[&apos;password&apos;] ) &amp;#x26;&amp;#x26; $_GET[&apos;password&apos;] == $password &amp;#x26;&amp;#x26; create_index();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;/**&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; * 生成 index.html&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;function create_index()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    ob_start();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    include( &apos;index.php&apos; );&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    $content = ob_get_contents();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    $content .= &quot;\n&amp;#x3C;!-- Create time: &quot; . date( &apos;Y-m-d H:i:s&apos; ) . &quot; --&gt;&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    /* 调用更新 */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    $content .= &quot;\n&amp;#x3C;script language=javascript src=&apos;jingtai.php&apos;&gt;&amp;#x3C;/script&gt;&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    ob_clean();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    $res = file_put_contents( &apos;index.html&apos;, $content );&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    if ( $res !== false )&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        die( &apos;Create successful&apos; );&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    else&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        die( &apos;Create error&apos; );&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;保存为 &lt;code&gt;utf8&lt;/code&gt;编码后退出；&lt;br&gt;
&lt;strong&gt;注意：如果使用的宝塔面板，还要在后台网站设置-默认文档-将 &lt;code&gt;index.html&lt;/code&gt;的排序上调至第一位&lt;/strong&gt;&lt;br&gt;
然后在浏览器中打开 &lt;code&gt;PHP&lt;/code&gt;脚本链接即可&lt;br&gt;
打开链接后会在网站根目录下生成一个 &lt;code&gt;index.html&lt;/code&gt;的静态文件，首页静态化也就完成了；&lt;br&gt;
&lt;strong&gt;不需要密码脚本的链接：&lt;a href=&quot;https://xn--6qqv7i2xdt95b/jingtai.php&quot;&gt;https://你的域名/jingtai.php&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;需要密码脚本的链接：&lt;a href=&quot;https://xn--6qqv7i2xdt95b/jingtai.php?password=123456&quot;&gt;https://你的域名/jingtai.php?password=123456&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&quot;说明&quot;&gt;说明&lt;/h2&gt;
&lt;p&gt;两个 &lt;code&gt;PHP&lt;/code&gt;脚本中的更新时间默认为 &lt;code&gt;600&lt;/code&gt;秒，也就是十分钟更新一次，默认密码为 &lt;code&gt;123456&lt;/code&gt;&lt;br&gt;
更新时间及访问密码都可以自行设定，修改脚本中的数值即可；&lt;/p&gt;
&lt;h2 id=&quot;验证&quot;&gt;验证&lt;/h2&gt;
&lt;p&gt;查看是否生效，浏览器中重新打开你的网站首页，右键查看源代码&lt;br&gt;
&lt;strong&gt;不需要密码的脚本&lt;/strong&gt;&lt;br&gt;
在最后一行如果有 &lt;code&gt;&amp;#x3C;script language=javascript&gt;...&lt;/code&gt;之类的字眼，说明你访问的就是index.html的页面&lt;br&gt;
&lt;strong&gt;需要密码的脚本&lt;/strong&gt;&lt;br&gt;
在最后一行会有显示最后一次更新时间&lt;br&gt;
&lt;code&gt;&amp;#x3C;!-- Create time: 2020-03-09 00:33:41 --&gt;&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;#x3C;script language=javascript src=&apos;jt_index.php&apos;&gt;&amp;#x3C;/script&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;当然也可以测试工具进行网站打开测试；&lt;br&gt;
网站测试：&lt;a href=&quot;https://www.boce.com/tool&quot;&gt;https://www.boce.com/tool&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[/collapse]&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Handsome主题更改判断IE标识</title>
  <link href="https://www.ioioi.cn/posts/handle-theme-change-to-judge-ie-identity/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/handle-theme-change-to-judge-ie-identity/</id>
  <published>2020-12-20T07:49:00.000Z</published>
  <updated>2020-12-20T07:49:00.000Z</updated>
  <summary type="html">&lt;p&gt;上篇文章的问题很奇怪&lt;/p&gt;
&lt;p&gt;[post cid=“228” cover=“images/2393196682.jpg”/]&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Edge&lt;/code&gt;应该是支持 &lt;code&gt;forEach&lt;/code&gt;的但是不知道为什么在学校的 &lt;code&gt;Edge&lt;/code&gt;就是有问题。。。&lt;/p&gt;
&lt;p&gt;在学校里面也就不方便调试。。。&lt;/p&gt;
&lt;p&gt;所以应该可以将其归类于 &lt;code&gt;Edge&lt;/code&gt;的问题&lt;/p&gt;
&lt;p&gt;于是直接将 &lt;code&gt;Edge&lt;/code&gt;使用的解析变为原生解析即可！&lt;/p&gt;
&lt;p&gt;路径为：&lt;code&gt;/webdir/usr/themes/handsome/libs/component/Device.php&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;为IE7～*&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    public static function isIE() {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        // return self::check(array(&quot;Trident&quot;, &quot;Windows&quot;), true);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        // if(self::check(array(&quot;Trident&quot;, &quot;Windows&quot;),true) || self::check(&quot;edg&quot;,true) || self::check(&quot;edge&quot;,true) || self::check(&quot;Edge&quot;,true)){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        if(self::check(&quot;msie&quot;,true) || self::check(&quot;Edg&quot;,true)){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            return true;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/posts/handle-theme-change-to-judge-ie-identity/images/3096815211.png&quot; alt=&quot;Screenshot_20201220_154843.png&quot; title=&quot;Screenshot_20201220_154843.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;为IE8～*&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    public static function isIE() {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        // return self::check(array(&quot;Trident&quot;, &quot;Windows&quot;), true);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        //if(self::check(array(&quot;Trident&quot;, &quot;Windows&quot;),true) || self::check(&quot;edg&quot;,true) || self::check(&quot;edge&quot;,true) || self::check(&quot;Edge&quot;,true)){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        if(self::check(array(&quot;Trident&quot;, &quot;Windows&quot;),true) || self::check(&quot;Edg&quot;,true)){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            return true;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/posts/handle-theme-change-to-judge-ie-identity/images/2055640166.png&quot; alt=&quot;Screenshot_20201220_144400.png&quot; title=&quot;Screenshot_20201220_144400.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>IE和Edge中的Handsome主题加载问题</title>
  <link href="https://www.ioioi.cn/posts/loading-problem-of-handsome-theme-in-ie-and-edge/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/loading-problem-of-handsome-theme-in-ie-and-edge/</id>
  <published>2020-12-18T14:33:00.000Z</published>
  <updated>2020-12-18T14:33:00.000Z</updated>
  <summary type="html">&lt;p&gt;最近在学校里面浏览博客的时候出现了一些文章加载不出来的情况，显示一直在转圈，因为学校里面不好操作，而且这个问题也从来没被复现过，于是就发现&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/loading-problem-of-handsome-theme-in-ie-and-edge/images/2393196682.jpg&quot; alt=&quot;-117af34ef6bf6cb1.jpg&quot; title=&quot;-117af34ef6bf6cb1.jpg&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;是由于Handsome使用了Foreach()的问题&lt;/p&gt;
&lt;p&gt;经过检验源码，发现Handsome在两个位置使用了Foreach()函数&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/loading-problem-of-handsome-theme-in-ie-and-edge/images/2996827791.png&quot; alt=&quot;Screenshot_20201218_222534_mark.via.png&quot; title=&quot;Screenshot_20201218_222534_mark.via.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/loading-problem-of-handsome-theme-in-ie-and-edge/images/796130229.png&quot; alt=&quot;Screenshot_20201218_222549_mark.via.png&quot; title=&quot;Screenshot_20201218_222549_mark.via.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;所以，在Foreach使用前先自定义一个Foreach&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;// Production steps of ECMA-262, Edition 5, 15.4.4.18&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;// Reference: https://es5.github.io/#x15.4.4.18&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;if (!Array.prototype[&apos;forEach&apos;]) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  Array.prototype.forEach = function(callback, thisArg) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    if (this == null) { throw new TypeError(&apos;Array.prototype.forEach called on null or undefined&apos;); }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    var T, k;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    // 1. Let O be the result of calling toObject() passing the&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    // |this| value as the argument.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    var O = Object(this);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    // 2. Let lenValue be the result of calling the Get() internal&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    // method of O with the argument &quot;length&quot;.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    // 3. Let len be toUint32(lenValue).&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    var len = O.length &gt;&gt;&gt; 0;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    // 4. If isCallable(callback) is false, throw a TypeError exception.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    // See: https://es5.github.com/#x9.11&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    if (typeof callback !== &quot;function&quot;) { throw new TypeError(callback + &apos; is not a function&apos;); }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    // 5. If thisArg was supplied, let T be thisArg; else let&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    // T be undefined.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    if (arguments.length &gt; 1) { T = thisArg; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    // 6. Let k be 0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    k = 0;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    // 7. Repeat, while k &amp;#x3C; len&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    while (k &amp;#x3C; len) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      var kValue;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      // a. Let Pk be ToString(k).&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      //    This is implicit for LHS operands of the in operator&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      // b. Let kPresent be the result of calling the HasProperty&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      //    internal method of O with argument Pk.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      //    This step can be combined with c&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      // c. If kPresent is true, then&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      if (k in O) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        // i. Let kValue be the result of calling the Get internal&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        // method of O with argument Pk.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        kValue = O[k];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        // ii. Call the Call internal method of callback with T as&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        // the this value and argument list containing kValue, k, and O.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        callback.call(T, kValue, k, O);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      // d. Increase k by 1.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      k++;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    // 8. return undefined&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  };&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/posts/loading-problem-of-handsome-theme-in-ie-and-edge/images/2189533356.png&quot; alt=&quot;Screenshot_20201218_224046.png&quot; title=&quot;Screenshot_20201218_224046.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;在 &lt;code&gt;/www/wwwroot/www.ioioi.cn/usr/themes/handsome/component/header.php&lt;/code&gt;中 &lt;code&gt;44&lt;/code&gt;行左右的一个 &lt;code&gt;&amp;#x3C;script type=&quot;text/javascript&quot;&gt;&lt;/code&gt;中定格添加&lt;/p&gt;
&lt;hr&gt;
&lt;ul&gt;
&lt;li&gt;[X]&lt;del&gt;2020-12-18 22-42-20 等待明日去学校实验验证&lt;/del&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;直接放弃，更换ie为origin解析&lt;/p&gt;
&lt;p&gt;[post cid=“228” cover=“images/3096815211.png”/]&lt;/p&gt;</summary>
</entry>
<entry>
  <title>老男孩 筷子兄弟</title>
  <link href="https://www.ioioi.cn/posts/old-boy-chopsticks-brother/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/old-boy-chopsticks-brother/</id>
  <published>2020-12-17T15:00:00.000Z</published>
  <updated>2020-12-17T15:00:00.000Z</updated>
  <summary type="html">&lt;p&gt;[hplayer media=“netease” id=“362998” type=“song” size=“large” auto=“false” /]&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/old-boy-chopsticks-brother/images/2108328916.jpg&quot; alt=&quot;004819539.jpg&quot; title=&quot;004819539.jpg&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/old-boy-chopsticks-brother/images/1692620497.jpg&quot; alt=&quot;20131128012958471.jpg&quot; title=&quot;20131128012958471.jpg&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Caddy handle</title>
  <link href="https://www.ioioi.cn/posts/caddy-handle/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/caddy-handle/</id>
  <published>2020-12-17T12:12:00.000Z</published>
  <updated>2020-12-17T12:12:00.000Z</updated>
  <summary type="html">&lt;p&gt;iiiiinn&lt;/p&gt;
&lt;p&gt;vdsvdsvsvsvdsv&lt;/p&gt;
&lt;p&gt;vzcxzczxczxczxzx&lt;/p&gt;</summary>
</entry>
<entry>
  <title>苏秦刺骨</title>
  <link href="https://www.ioioi.cn/posts/su-qin-is-biting-to-the-bone/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/su-qin-is-biting-to-the-bone/</id>
  <published>2020-12-14T16:24:14.000Z</published>
  <updated>2020-12-14T16:24:14.000Z</updated>
  <summary type="html">&lt;p&gt;一年的工夫，钻研成功。自言自语说：“现在我真的可以去游说各国君王了。”&lt;/p&gt;
&lt;p&gt;于是苏秦在华丽的殿堂中拜见游说赵王。亲密交谈，赵王非常高兴，封他为武安君，并授给相印，随后赏赐他兵车百辆锦绣千匹，白璧百双，金币万两。缔结合纵，离散连横，来抑制强大的秦国，所以苏秦在赵国为相，函谷关封闭（秦国不敢出兵函谷关）。&lt;/p&gt;
&lt;p&gt;这时候，那么广大的天下，那么众多的人民，那么威严的王候，那么有权势的谋臣，都要取决于苏秦的策略。没有耗费一斗粮食，没有烦劳一兵一卒上阵打仗，没有扯断一根弓弦，没有弄折一支羽箭，诸侯之间和睦相处，甚至比亲兄弟还要亲近。贤能的人得到任用天下人服从，一个人被重用天下人跟随。所以说，（有效的谋略）用在政治上，不用在勇武上，用在朝廷之内，不用在边境之外。当苏秦身在高位的时候，金币万两随他使用，车轮飞转，马队相连，在道路上光彩夺目，崤山以东的六国诸侯，闻风服从，使赵国的地位十分显要。而苏秦只不过是位出身于穷门陋巷，贫寒困苦的士人罢了，但他却坐车骑马，行遍天下，在宫廷游说各国诸侯，使国君左右之人杜口不言，天下没有能与之抗衡的人了！&lt;/p&gt;
&lt;p&gt;（苏秦）将要去游说楚王，路过洛阳父母听到消息，收拾房屋清扫道路，安排乐队设置酒宴，到城郊三十里之外迎接；妻子不敢正眼看他，侧着耳朵听他说话；嫂子匍匐在地像蛇那样爬行，行四拜大礼跪地谢罪。苏秦说：“嫂子，为什么先前那样傲慢。如今又这样的卑贱下作呢？”他嫂子说：“因为现在你地位尊显、钱财富裕的缘故。”苏秦长叹一声说道：“唉！一个人如果穷困落魄，连父母都不把他当儿子，然而一旦富贵显赫之后，亲戚朋友都感到畏惧。由此可见，一个人活在世界上，权势和富贵怎么能忽视不顾呢！”&lt;/p&gt;</summary>
</entry>
<entry>
  <title>织布机</title>
  <link href="https://www.ioioi.cn/posts/loom/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/loom/</id>
  <published>2020-12-13T17:23:00.000Z</published>
  <updated>2020-12-13T17:23:00.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;img src=&quot;/posts/loom/images/3064128888.jpg&quot; alt=&quot;006qQWrOzy7jqobxBMV15&amp;#x26;690.jpg&quot; title=&quot;006qQWrOzy7jqobxBMV15&amp;#x26;690.jpg&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/loom/images/3226580721.png&quot; alt=&quot;Screenshot_20201214_011958_mark.via.png&quot; title=&quot;Screenshot_20201214_011958_mark.via.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;/media/2020/12/2847335818.mp4&quot;&gt;视频编辑第5部_20201214012916685.mp4&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Handsome主题添加评论者浏览器标识</title>
  <link href="https://www.ioioi.cn/posts/handle-theme-add-reviewer-browser-logo/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/handle-theme-add-reviewer-browser-logo/</id>
  <published>2020-12-13T09:22:00.000Z</published>
  <updated>2020-12-13T09:22:00.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;strong&gt;效果&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/handle-theme-add-reviewer-browser-logo/images/1925627664.png&quot; alt=&quot;Screenshot_20201213_172224.png&quot; title=&quot;Screenshot_20201213_172224.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;添加以下的代码到 functions.php 文件末尾&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;/** 获取浏览器信息 */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;function getBrowser($agent)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;{ $outputer = false;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    if (preg_match(&apos;/MSIE\s([^\s|;]+)/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; IE浏览器&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/FireFox\/([^\s]+)/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; 火狐浏览器&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/Maxthon([\d]*)\/([^\s]+)/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; 傲游浏览器&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;#SE 2([a-zA-Z0-9.]+)#i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; 搜狗浏览器&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;#360([a-zA-Z0-9.]+)#i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; 360浏览器&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/Edge([\d]*)\/([^\s]+)/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; Edge&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/EdgiOS([\d]*)\/([^\s]+)/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; Edge&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/UC/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; UC浏览器 &apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }else if (preg_match(&apos;/OPR/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; 欧朋浏览器&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/MicroMesseng/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; 微信内嵌浏览器&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }  else if (preg_match(&apos;/WeiBo/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; 微博内嵌浏览器&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }  else if (preg_match(&apos;/QQ/i&apos;, $agent)||preg_match(&apos;/QQBrowser\/([^\s]+)/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; QQ浏览器&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/MQBHD/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; QQ浏览器 &apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/BIDU/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; 百度浏览器&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/LBBROWSER/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; 猎豹浏览器&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/TheWorld/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; 世界之窗浏览器&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/XiaoMi/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; 小米浏览器&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/UBrowser/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; UC浏览器 &apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/mailapp/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; email内嵌浏览器&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/2345Explorer/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; 2345浏览器&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/Sleipnir/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; 神马浏览器&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/YaBrowser/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; Yandex浏览器&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }  else if (preg_match(&apos;/Opera[\s|\/]([^\s]+)/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; Opera浏览器&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/MZBrowser/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; 魅族浏览器&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/VivoBrowser/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; vivo浏览器&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/Quark/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; 夸克浏览器&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/mixia/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; 米侠浏览器&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }else if (preg_match(&apos;/fusion/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; 客户端&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/CoolMarket/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; 基安内置浏览器&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/Thunder/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; 迅雷内置浏览器&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/Chrome([\d]*)\/([^\s]+)/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; Chrome &apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/safari\/([^\s]+)/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $outputer = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; Safari&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        return false;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   return $outputer;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;/** 获取操作系统信息 */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;function getOs($agent)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    $os = false;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    if (preg_match(&apos;/win/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        if (preg_match(&apos;/nt 6.0/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $os = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; Windows Vista&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        } else if (preg_match(&apos;/nt 6.1/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $os = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; Windows 7&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        } else if (preg_match(&apos;/nt 6.2/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $os = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; Windows 8&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        } else if(preg_match(&apos;/nt 6.3/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $os = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; Windows 8.1&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        } else if(preg_match(&apos;/nt 5.1/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $os = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; Windows XP&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        } else if (preg_match(&apos;/nt 10.0/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $os = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; Windows 10&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        } else{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $os = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; Windows&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/android/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;if (preg_match(&apos;/android 9/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $os = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; Android P&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;else if (preg_match(&apos;/android 8/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $os = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; Android O&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;else if (preg_match(&apos;/android 7/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $os = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; Android N&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;else if (preg_match(&apos;/android 6/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $os = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; Android M&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;else if (preg_match(&apos;/android 5/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $os = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; Android L&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;else{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $os = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; Android&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; else if (preg_match(&apos;/ubuntu/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $os = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; Linux&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/linux/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $os = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; Linux&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/iPhone/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $os = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; iPhone&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/iPad/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $os = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; iPad&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    } else if (preg_match(&apos;/mac/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $os = &apos;&amp;#x3C;i&gt;&amp;#x3C;/i&gt; OSX&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }else if (preg_match(&apos;/cros/i&apos;, $agent)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $os = &apos;chrome os&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }else {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; return false;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   return $os;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/posts/handle-theme-add-reviewer-browser-logo/images/954201673.png&quot; alt=&quot;Screenshot_20201213_172011.png&quot; title=&quot;Screenshot_20201213_172011.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;然后修改 component 目录下的 comments.php 文件&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;在以上代码的后面添加：&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;span&gt; [&amp;#x3C;?php echo getOs($comments-&gt;agent); ?&gt;&amp;#x3C;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;span&gt;&amp;#x3C;?php echo getBrowser($comments-&gt;agent); ?&gt;]&amp;#x3C;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/posts/handle-theme-add-reviewer-browser-logo/images/3269548368.png&quot; alt=&quot;Screenshot_20201213_172049.png&quot; title=&quot;Screenshot_20201213_172049.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;[collapse status=“false” title=“无用”]&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;然后在主题设置自定义css添加&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;.agent {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    display: inline-block;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    margin-left: 5px;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    padding: 0 3px;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    border-radius: 2px;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    color: #58666e;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    font-size: 12px;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    opacity: .8&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;最后在 head 头部引入 css 文件&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;link href=&quot;https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css&quot; rel=&quot;stylesheet&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;[/collapse]&lt;/p&gt;</summary>
</entry>
<entry>
  <title>为添加Handsome添加加载时间</title>
  <link href="https://www.ioioi.cn/posts/add-loading-time-for-handsome/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/add-loading-time-for-handsome/</id>
  <published>2020-12-13T08:57:00.000Z</published>
  <updated>2020-12-13T08:57:00.000Z</updated>
  <summary type="html">&lt;h3 id=&quot;添加方法&quot;&gt;添加方法&lt;/h3&gt;
&lt;p&gt;首先在主题的 &lt;code&gt;functions.php&lt;/code&gt; 文件里加入以下统计代码；&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;//加载耗时&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    function timer_start() {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        global $timestart;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $mtime     = explode( &apos; &apos;, microtime() );&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $timestart = $mtime[1] + $mtime[0];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        return true;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    timer_start();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    function timer_stop( $display = 0, $precision = 3 ) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        global $timestart, $timeend;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $mtime     = explode( &apos; &apos;, microtime() );&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $timeend   = $mtime[1] + $mtime[0];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $timetotal = number_format( $timeend - $timestart, $precision );&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $r         = $timetotal &amp;#x3C; 1 ? $timetotal * 1000 . &quot; ms&quot; : $timetotal . &quot; s&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        if ( $display ) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            echo $r;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        return $r;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/posts/add-loading-time-for-handsome/images/3967777051.png&quot; alt=&quot;Screenshot_20201213_165526.png&quot; title=&quot;Screenshot_20201213_165526.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;然后在 &lt;code&gt;sidebar.php&lt;/code&gt; 文件中添加显示代码；&lt;/p&gt;
&lt;p&gt;如果是 &lt;code&gt;handsome&lt;/code&gt; 主题，那么文件位置在&lt;code&gt;/usr/themes/handsome/component/sidebar.php&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;li class=&quot;list-group-item&quot;&gt; &amp;#x3C;i class=&quot;glyphicon glyphicon-time text-muted&quot;&gt;&amp;#x3C;/i&gt; &amp;#x3C;span class=&quot;badge&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;pull-right&quot;&gt;&amp;#x3C;?php echo timer_stop();?&gt;&amp;#x3C;/span&gt;&amp;#x3C;?php _me(&quot;加载耗时&quot;) ?&gt;&amp;#x3C;/li&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/posts/add-loading-time-for-handsome/images/4073522108.png&quot; alt=&quot;Screenshot_20201213_165600.png&quot; title=&quot;Screenshot_20201213_165600.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;部分参考自&lt;a href=&quot;https://sunpma.com/536.html&quot;&gt;&lt;code&gt;SunPma&apos;Blog&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Handsome设置彩色标签云</title>
  <link href="https://www.ioioi.cn/posts/handsome-set-color-label-cloud/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/handsome-set-color-label-cloud/</id>
  <published>2020-12-13T08:46:00.000Z</published>
  <updated>2020-12-13T08:46:00.000Z</updated>
  <summary type="html">&lt;p&gt;如图所示&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/handsome-set-color-label-cloud/images/3217129505.png&quot; alt=&quot;Screenshot_20201213_164421.png&quot; title=&quot;Screenshot_20201213_164421.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;h1 id=&quot;更改方法&quot;&gt;&lt;strong&gt;更改方法&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;打开后台-更改外观-设置外观-开发者设置-选择好需要的颜色粘贴至自定义JavaScript即可&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;颜色也可以自行设定，修改代码中的十六进制颜色值即可&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;!--纯黑标签云--&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;let tags = document.querySelectorAll(&quot;#tag_cloud-2 a&quot;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;let colorArr = [&quot;#000000&quot;, &quot;#000000&quot;, &quot;#000000&quot;, &quot;#000000&quot;, &quot;#000000&quot;, &quot;#000000&quot;];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tags.forEach(tag =&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    tagsColor = colorArr[Math.floor(Math.random() * colorArr.length)];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    tag.style.backgroundColor = tagsColor;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;});&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;!--银白标签云--&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;let tags = document.querySelectorAll(&quot;#tag_cloud-2 a&quot;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;let colorArr = [&quot;#C0C0C0&quot;, &quot;#C0C0C0&quot;, &quot;#C0C0C0&quot;, &quot;#C0C0C0&quot;, &quot;#C0C0C0&quot;, &quot;#C0C0C0&quot;];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tags.forEach(tag =&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    tagsColor = colorArr[Math.floor(Math.random() * colorArr.length)];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    tag.style.backgroundColor = tagsColor;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;});&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;!--淡蓝标签云--&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;let tags = document.querySelectorAll(&quot;#tag_cloud-2 a&quot;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;let colorArr = [&quot;#ADD8E6&quot;, &quot;#ADD8E6&quot;, &quot;#ADD8E6&quot;, &quot;#ADD8E6&quot;, &quot;#ADD8E6&quot;, &quot;#ADD8E6&quot;];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tags.forEach(tag =&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    tagsColor = colorArr[Math.floor(Math.random() * colorArr.length)];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    tag.style.backgroundColor = tagsColor;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;});&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;!--彩色标签云--&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;let tags = document.querySelectorAll(&quot;#tag_cloud-2 a&quot;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;let colorArr = [&quot;#428BCA&quot;, &quot;#AEDCAE&quot;, &quot;#ECA9A7&quot;, &quot;#DA99FF&quot;, &quot;#FFB380&quot;, &quot;#D9B999&quot;];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tags.forEach(tag =&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    tagsColor = colorArr[Math.floor(Math.random() * colorArr.length)];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    tag.style.backgroundColor = tagsColor;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;});&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;!--天蓝标签云--&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;let tags = document.querySelectorAll(&quot;#tag_cloud-2 a&quot;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;let colorArr = [&quot;#00BFFF&quot;, &quot;#00BFFF&quot;, &quot;#00BFFF&quot;, &quot;#00BFFF&quot;, &quot;#00BFFF&quot;, &quot;#00BFFF&quot;];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tags.forEach(tag =&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    tagsColor = colorArr[Math.floor(Math.random() * colorArr.length)];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    tag.style.backgroundColor = tagsColor;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;});&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;说明：如果主题中启用了pjax，还需要将上面代码添加到pjax-pjax回调函数中&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;部分参考来自&lt;a href=&quot;https://sunpma.com/536.html&quot;&gt;&lt;code&gt;SunPma&apos;Blog&lt;/code&gt;&lt;/a&gt;](&lt;a href=&quot;https://sunpma.com/532.html&quot;&gt;https://sunpma.com/532.html&lt;/a&gt;)&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Handsome主题使用vditor.js前台解析lazy-load的问题</title>
  <link href="https://www.ioioi.cn/posts/handle-theme-use-vditorjs-foreground-analysis-of-lazy-load/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/handle-theme-use-vditorjs-foreground-analysis-of-lazy-load/</id>
  <published>2020-12-12T15:52:00.000Z</published>
  <updated>2020-12-12T15:52:00.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;del&gt;出现问题的文档&lt;/del&gt; &lt;strong&gt;现已经修复&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;[post cid=“128” cover=“&lt;a href=&quot;https://www.ioioi.cn/Logo/default-monochrome.png%22/&quot;&gt;https://www.ioioi.cn/Logo/default-monochrome.png”/&lt;/a&gt;]&lt;/p&gt;
&lt;p&gt;在我升级Handsome到7.3.1的时候，偶然发现可以设置 &lt;code&gt;vditor.js&lt;/code&gt;于是就设置了&lt;/p&gt;
&lt;p&gt;问题是这样子的&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/handle-theme-use-vditorjs-foreground-analysis-of-lazy-load/images/3061755421.png&quot; alt=&quot;Screenshot_20201206_195049_mark.via.png&quot; title=&quot;Screenshot_20201206_195049_mark.via.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;最初的时候是这样的&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/handle-theme-use-vditorjs-foreground-analysis-of-lazy-load/images/4101325280.png&quot; alt=&quot;Screenshot_20201206_195119_mark.via.png&quot; title=&quot;Screenshot_20201206_195119_mark.via.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;经过我的调试&lt;/p&gt;
&lt;p&gt;发现切换到 &lt;code&gt;Typecho&lt;/code&gt;默认的前台解析他又好了&lt;/p&gt;
&lt;p&gt;于是我&lt;/p&gt;
&lt;p&gt;&lt;code&gt;F12&lt;/code&gt;终于发现是 &lt;code&gt;lazy-load&lt;/code&gt;的问题&lt;/p&gt;
&lt;p&gt;关闭&lt;strong&gt;主题增强功能&lt;/strong&gt;里面的 &lt;code&gt;lazy-load&lt;/code&gt;即可&lt;/p&gt;
&lt;hr&gt;</summary>
</entry>
<entry>
  <title>Caddy安装默认配置</title>
  <link href="https://www.ioioi.cn/posts/caddy-installation-default-configuration/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/caddy-installation-default-configuration/</id>
  <published>2020-12-12T15:37:00.000Z</published>
  <updated>2020-12-12T15:37:00.000Z</updated>
  <summary type="html">&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# The Caddyfile is an easy way to configure your Caddy web server.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# Unless the file starts with a global options block, the first&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# uncommented line is always the address of your site.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# To use your own domain name (with automatic HTTPS), first make&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# sure your domain&apos;s A/AAAA DNS records are properly pointed to&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# this machine&apos;s public IP, then replace the line below with your&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# domain name.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;:80&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# Set this path to your site&apos;s directory.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;root * /usr/share/caddy&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# Enable the static file server.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;file_server&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# Another common task is to set up a reverse proxy:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# reverse_proxy localhost:8080&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# Or serve a PHP site through php-fpm:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# php_fastcgi localhost:9000&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# Refer to the Caddy docs for more information:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# https://caddyserver.com/docs/caddyfile&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>Caddy文件备份</title>
  <link href="https://www.ioioi.cn/posts/caddy-file-backup/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/caddy-file-backup/</id>
  <published>2020-12-06T09:23:15.000Z</published>
  <updated>2020-12-06T09:23:15.000Z</updated>
  <summary type="html">&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#proxy.xyz.blue {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#    tls /etc/caddy/tls/xyz.blue/fullchain.pem /etc/caddy/tls/xyz.blue/privkey.pem&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#    header {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#        Strict-Transport-Security &quot;max-age=63072000; includeSubDomains; preload&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#    #handle_path&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#    handle_path /caddy/* {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#        #reverse_proxy https://caddyserver.com {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#        reverse_proxy https://www.google.com {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#            header_up Host {http.reverse_proxy.upstream.hostport}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#            #header_up Host {http.request.host}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#            header_down Access-Control-Allow-Headers *&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#            header_down Access-Control-Allow-Origin *&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#cloud.xyz.blue {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#    encode zstd gzip&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#    tls /etc/caddy/tls/xyz.blue/fullchain.pem /etc/caddy/tls/xyz.blue/privkey.pem&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#    header {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#                Strict-Transport-Security &quot;max-age=63072000; includeSubDomains; preload&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#    reverse_proxy http://127.0.0.1:808 {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #header_up Host {http.request.host}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #header_up Host {http.reverse_proxy.upstream.hostport}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#        header_up X-Real-IP {http.request.remote}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#        header_up X-Forwarded-For {http.request.remote}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#        header_up X-Forwarded-Port {http.request.port}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#        header_up X-Forwarded-Proto {http.request.scheme}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#        header_down Access-Control-Allow-Headers *&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#        header_down Access-Control-Allow-Origin *&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>Caddy2如何为Typecho设置伪静态</title>
  <link href="https://www.ioioi.cn/posts/caddys-question-about-setting-pseudo-static-for-typecho/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/caddys-question-about-setting-pseudo-static-for-typecho/</id>
  <published>2020-12-06T09:14:00.000Z</published>
  <updated>2020-12-06T09:14:00.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;strong&gt;答案是无需设置！！！&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Caddy2 已经内置了关于&lt;code&gt;index.php&lt;/code&gt;的伪静态!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;That’s right, Caddy v2’s &lt;code&gt;php_fastcgi&lt;/code&gt; directive is a shortcut that includes a &lt;code&gt;try_files&lt;/code&gt; rewrite as you can see in the expanded form&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://caddy.community/t/example-typecho-with-caddy2-dns-cloudflare/9476&quot;&gt;Caddy社区&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;如果不放心还是想手动设置&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;@key1 {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    not file &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    path_regexp key1 (.*) &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rewrite @key1 /index.php{re.key1.1}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;这样即可&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.toolnb.com/tools/rewriteTools.html&quot;&gt;伪静态转换工具&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[collapse status=“false” title=“折叠内容”]&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The &lt;code&gt;php_fastcgi&lt;/code&gt; directive is the same as the following configuration:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;route {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # Add trailing slash for directory requests&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    @canonicalPath {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        file {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            try_files {path}/index.php&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        not path */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    redir @canonicalPath {path}/ 308&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # If the requested file does not exist, try index files&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    @indexFiles {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        file {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            try_files {path} {path}/index.php index.php&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            split_path .php&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    rewrite @indexFiles {http.matchers.file.relative}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    # Proxy PHP files to the FastCGI responder&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    @phpFiles {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        path *.php&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    reverse_proxy @phpFiles &amp;#x3C;php-fpm_gateway&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        transport fastcgi {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            split .php&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;Most modern PHP apps work well with this preset. If yours does not, feel free to borrow from this and customize it as needed instead of using the &lt;code&gt;php_fastcgi&lt;/code&gt; shortcut.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;[/collapse]&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Typecho后台文章列表按照发文时间排序</title>
  <link href="https://www.ioioi.cn/posts/typecho-background-article-list-sorted-by-posting-time/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/typecho-background-article-list-sorted-by-posting-time/</id>
  <published>2020-12-06T09:10:00.000Z</published>
  <updated>2020-12-06T09:10:00.000Z</updated>
  <summary type="html">&lt;p&gt;编辑该文件&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;nano var/Widget/Contents/Post/Admin.php&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;寻找&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$select-&gt;order(&apos;table.contents.cid&apos;, Typecho_Db::SORT_DESC)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/typecho-background-article-list-sorted-by-posting-time/images/3569635066.png&quot; alt=&quot;样例&quot; title=&quot;样例&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;将其更改为&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$select-&gt;order(&apos;table.contents.created&apos;, Typecho_Db::SORT_DESC)&lt;/code&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>在linux中设置优先使用ipv4,而不是ipv6</title>
  <link href="https://www.ioioi.cn/posts/setting-the-priority-of-using-ipv4-instead-of-ipv6-in-linux/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/setting-the-priority-of-using-ipv4-instead-of-ipv6-in-linux/</id>
  <published>2020-12-06T03:03:00.000Z</published>
  <updated>2020-12-06T03:03:00.000Z</updated>
  <summary type="html">&lt;p&gt;经试验在&lt;code&gt;debian&lt;/code&gt; &lt;code&gt;Centos&lt;/code&gt; &lt;code&gt;ArchLinux&lt;/code&gt; &lt;code&gt;Manjaro&lt;/code&gt;中有效&lt;/p&gt;
&lt;p&gt;修改&lt;code&gt;/etc/gai.conf&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;取消下面这一行的注释&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;precedence ::ffff:0:0/96 100&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;添加如下内容&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;label       ::1/128        0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;label       ::/0           1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;label       2002::/16      2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;label       ::/96          3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;label       ::ffff:0:0/96  4&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;precedence  ::1/128        50&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;precedence  ::/0           40&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;precedence  2002::/16      30&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;precedence  ::/96          20&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;precedence  ::ffff:0:0/96  100&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/posts/setting-the-priority-of-using-ipv4-instead-of-ipv6-in-linux/images/4240242856.png&quot; alt=&quot;Screenshot_20201206_110715.png&quot; title=&quot;Screenshot_20201206_110715.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>查看systemd启动失败进程</title>
  <link href="https://www.ioioi.cn/posts/view-systemd-start-failure-process/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/view-systemd-start-failure-process/</id>
  <published>2020-12-05T10:01:00.000Z</published>
  <updated>2020-12-05T10:01:00.000Z</updated>
  <summary type="html">&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;systemctl list-units --state=failed&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/posts/view-systemd-start-failure-process/images/3664448900.png&quot; alt=&quot;Screenshot_20201205_180047.png&quot; title=&quot;Screenshot_20201205_180047.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Caddy配置升级1 to 2</title>
  <link href="https://www.ioioi.cn/posts/caddy-configuration-upgrade-1-to-2/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/caddy-configuration-upgrade-1-to-2/</id>
  <published>2020-12-05T09:04:48.000Z</published>
  <updated>2020-12-05T09:04:48.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;img src=&quot;/posts/caddy-configuration-upgrade-1-to-2/images/2565793174.png&quot; alt=&quot;Screenshot_20201205_170333.png&quot; title=&quot;Screenshot_20201205_170333.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href=&quot;https://caddyserver.com/docs/v2-upgrade&quot;&gt;proxy&lt;/a&gt;&lt;br&gt;
The v2 equivalent is reverse_proxy.&lt;/p&gt;
&lt;p&gt;Notable subdirective changes are header_upstream and header_downstream&lt;br&gt;
have become header_up and header_down, respectively; and&lt;br&gt;
load-balancing-related subdirectives are prefixed with lb_.&lt;/p&gt;
&lt;p&gt;One other significant difference is that the v2 proxy passes all&lt;br&gt;
incoming headers thru by default (including the Host header) and sets&lt;br&gt;
the X-Forwarded-For header. In other words, v1’s “transparent” mode is&lt;br&gt;
basically the default in v2 (but if you need other headers like&lt;br&gt;
X-Real-IP you have to set those yourself). You can still&lt;br&gt;
override/customize the Host header using the header_up subdirective.&lt;/p&gt;
&lt;p&gt;Websocket proxying “just works” in v2; there is no need to “enable”&lt;br&gt;
websockets like in v1.&lt;/p&gt;
&lt;p&gt;The without subdirective has been removed because rewrite hacks are no&lt;br&gt;
longer necessary in v2 thanks to improved matcher support.&lt;br&gt;
根据以上提示可以将&lt;/p&gt;
&lt;/blockquote&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mydomain.me&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  proxy /ray localhost:10000 {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    websocket&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    header_upstream -Origin&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;转化为&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mydomain.me&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  reverse_proxy /ray localhost:10000&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;非常简短&lt;/p&gt;</summary>
</entry>
<entry>
  <title>申请QID方式</title>
  <link href="https://www.ioioi.cn/posts/how-to-apply-for-qid/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/how-to-apply-for-qid/</id>
  <published>2020-12-01T14:07:00.000Z</published>
  <updated>2020-12-01T14:07:00.000Z</updated>
  <summary type="html">&lt;p&gt;设置-账号里面可以申请&lt;/p&gt;
&lt;p&gt;若果没有，则打开&lt;a href=&quot;https://imgcache.qq.com/club/themes/mobile/middle_page/index.html?url=https%3A%2F%2Fclub.vip.qq.com%2Fqid%2Fcard&quot;&gt;这个链接&lt;/a&gt;即可&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/how-to-apply-for-qid/images/3348088657.png&quot; alt=&quot;IMG_20201206_144217.png&quot; title=&quot;IMG_20201206_144217.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>终于清空浏览器状态栏</title>
  <link href="https://www.ioioi.cn/posts/finally-clear-the-browser-status-bar/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/finally-clear-the-browser-status-bar/</id>
  <published>2020-11-30T15:07:00.000Z</published>
  <updated>2020-11-30T15:07:00.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;img src=&quot;/posts/finally-clear-the-browser-status-bar/images/919300384.png&quot; alt=&quot;Screenshot_20201130_230822.png&quot; title=&quot;Screenshot_20201130_230822.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
感觉最近问题一下子都解决了，可以直接write BLog了，转载的博客文章仅仅为了记录过程，以后会慢慢完善&lt;/p&gt;</summary>
</entry>
<entry>
  <title>安装psutil时提示缺少python.h头文件(作记录)</title>
  <link href="https://www.ioioi.cn/posts/prompt-for-missing-python-h-header-file-when-installing-psutil-record/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/prompt-for-missing-python-h-header-file-when-installing-psutil-record/</id>
  <published>2020-11-30T15:05:00.000Z</published>
  <updated>2020-11-30T15:05:00.000Z</updated>
  <summary type="html">&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;yum -y install python-devel&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;[collapse status=“false” title=“引用”]&lt;br&gt;
通过pip或者源码安装psutil，都会提示缺少python.h头文件，错误提示如下：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;psutil/_psutil_common.c:9:20: fatal error: Python.h: No such file or directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; #include &amp;#x3C;Python.h&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                    ^&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;compilation terminated.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;error: command &apos;gcc&apos; failed with exit status 1&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;　　出现此错误的原因是没有安装python-devel，python开发包，如果是支持yum的系统，直接yum安装即可：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;yum -y install python-devel&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;转载于:&lt;a href=&quot;https://www.cnblogs.com/walk1314/p/9796500.html&quot;&gt;https://www.cnblogs.com/walk1314/p/9796500.html&lt;/a&gt;&lt;br&gt;
[/collapse]&lt;/p&gt;</summary>
</entry>
<entry>
  <title>session_start(): open(SESSION_FILE, O_RDWR)) failed: Permission denied (13)的处理</title>
  <link href="https://www.ioioi.cn/posts/session-start-opensession-file-o-rdwr-failed-processing-of-permission-denied-13/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/session-start-opensession-file-o-rdwr-failed-processing-of-permission-denied-13/</id>
  <published>2020-11-30T15:05:00.000Z</published>
  <updated>2020-11-30T15:05:00.000Z</updated>
  <summary type="html">&lt;p&gt;session问题直接宝塔禁用独立session！！！&lt;br&gt;
或者删除session、设置session权限&lt;br&gt;
[collapse status=“false” title=“引用”]&lt;br&gt;
phpMyAdmin – Error&lt;br&gt;
Error during session start; please check your PHP and/or webserver log file and configure your PHP installation properly. Also ensure that cookies are enabled in your browser.&lt;/p&gt;
&lt;p&gt;session_start(): open(SESSION_FILE, O_RDWR)) failed: Permission denied (13)&lt;/p&gt;
&lt;p&gt;很有朋友使用phpmyadmin时，都出现过这类问题，那如何解决呢？&lt;/p&gt;
&lt;p&gt;问题所在&lt;br&gt;
一般出现这种情况，都是session.save_path赋值的问题，可以session的保存位置为空，也可能目标地址不存在，还可能是权限问题，我们需要一一排查。&lt;/p&gt;
&lt;p&gt;解决思路&lt;br&gt;
检查php.ini中session.save_path的赋值，linux系统一般位于/etc/php.ini，如果赋值为空，再去检查/etc/httpd/conf.d/php.conf文件中session.save_path的赋值，如果同样为空，需要指定一个已存在的路径。&lt;br&gt;
如果以上两个参数，任意一个已有赋值，则需要检查赋值指定的目录是否存在，如不存在，需要创建目录。&lt;br&gt;
如果指定目录存在，则查看下目录权限，直接777最省事。&lt;br&gt;
[/collapse]&lt;/p&gt;</summary>
</entry>
<entry>
  <title>nginx 启动错误&quot;nginx: [emerg] host not found in upstream &quot;解决方案</title>
  <link href="https://www.ioioi.cn/posts/nginx-startup-error-nginx-emerg-host-not-found-in-upstream-solution/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/nginx-startup-error-nginx-emerg-host-not-found-in-upstream-solution/</id>
  <published>2020-11-30T15:04:00.000Z</published>
  <updated>2020-11-30T15:04:00.000Z</updated>
  <summary type="html">&lt;p&gt;原因：代理域名在开机的时候解析失败&lt;/p&gt;
&lt;p&gt;解决方法：&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. 在开机后重新启动nginx服务&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;systemctl restart nginx&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;2. 使用&lt;code&gt;hosts&lt;/code&gt;设置默认解析&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. 确保在启动&lt;code&gt;nginx&lt;/code&gt;的时候有网络链接&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;编辑&lt;code&gt;nginx&lt;/code&gt;的systemd文件添加&lt;code&gt;After=network.target&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;[collapse status=“false” title=“引用”]&lt;br&gt;
&lt;a href=&quot;https://blog.csdn.net/wangxiaoming099/article/details/23443623/&quot;&gt;https://blog.csdn.net/wangxiaoming099/article/details/23443623/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;server {&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    listen          80;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    server_name     yq.object.home.com;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    charset utf-8;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    access_log      /www/logs/yq.object.home.log;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    location / {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            proxy_set_header Host yq.object.com;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            proxy_set_header DFROM &apos;yq.object.home.com&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            proxy_pass      http://yq.object.com:8080/object/home.php;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;}&lt;br&gt;
利用nginx进行反向代理的时候，我们会配置proxy_pass。在启动nginx的时候，会报&lt;/p&gt;
&lt;p&gt;nginx: [emerg] host not found in upstream “yq.object.com” in /usr/local/nginx/conf/vhost/yq.nginx.com.conf:19 这个错误。&lt;br&gt;
其实nginx配置语法上没有错误的,只是系统无法解析这个域名,所以报错.&lt;br&gt;
解决办法就是添加dns到/etc/resolv.conf 或者是/etc/hosts,让其能够解析到IP。具体步骤如下：&lt;/p&gt;
&lt;p&gt;vim /etc/hosts&lt;/p&gt;
&lt;p&gt;修改hosts文件，在hosts文件里面加上一句&lt;/p&gt;
&lt;p&gt;127.0.0.1 localhost.localdomain yq.object.com&lt;/p&gt;
&lt;p&gt;其实 这和windows下的hosts文件的修改是一样的。具体可以去了解一下hosts的作用&lt;br&gt;
[/collapse]&lt;/p&gt;</summary>
</entry>
<entry>
  <title>非root用户使用1024以下端口 setcap &apos;cap_net_bind_service= ep&apos;</title>
  <link href="https://www.ioioi.cn/posts/non-root-users-use-port-setcap-cap-below-1024-net-bind-service-ep/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/non-root-users-use-port-setcap-cap-below-1024-net-bind-service-ep/</id>
  <published>2020-11-30T15:03:00.000Z</published>
  <updated>2020-11-30T15:03:00.000Z</updated>
  <summary type="html">&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;setcap &apos;cap_net_bind_service=+ep&apos; /file&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;[collapse status=“false” title=“引用”]&lt;br&gt;
非root用户使用1024以下端口&lt;br&gt;
&lt;a href=&quot;https://www.cnblogs.com/chenjunjie12321/p/9226279.html&quot;&gt;https://www.cnblogs.com/chenjunjie12321/p/9226279.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;如果你有一个最新的内核，确实有可能使用它作为非root用户启动服务，但绑定低端口。最简单有效的办法是：&lt;br&gt;
1&lt;/p&gt;
&lt;h1 id=&quot;setcap-cap_net_bind_serviceep-pathtoprogram&quot;&gt;setcap ‘cap_net_bind_service=+ep’ /path/to/program&lt;/h1&gt;
&lt;p&gt;执行了该命令后，该文件程序将会具有CAP_NET_BIND_SERVICE功能，setcap在debian软件包libcap2-bin中，至于具体的功能感兴趣可以自己查阅。&lt;/p&gt;
&lt;p&gt;现在要注意的是：&lt;/p&gt;
&lt;p&gt;　　1. 您的内核版本至少为2.6.24&lt;/p&gt;
&lt;p&gt;　　2.文件不能是脚本。也就是说你必须将CAP_NET_BIND_SERVICE功能应用到可执行文件本身，而不是脚本中指向的其他应用。如果赋予了该文件CAP_NET_BIND_SERVICE能力，其他应用滥用用这个文件就可能在安全性上造成隐患。&lt;/p&gt;
&lt;p&gt;　　3.如果你的程序使用自己的… / lib /的共享库，而Linux将在任何具有像setcap或suid这样的特权提升的程序上禁用LD_LIBRARY_PATH，将导致不能使用。&lt;/p&gt;
&lt;p&gt;参考：&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/questions/413807/is-there-a-way-for-non-root-processes-to-bind-to-privileged-ports-on-linux&quot;&gt;https://stackoverflow.com/questions/413807/is-there-a-way-for-non-root-processes-to-bind-to-privileged-ports-on-linux&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;LD_LIBRARY_PATH作用 &lt;a href=&quot;https://www.douban.com/note/520942662/&quot;&gt;https://www.douban.com/note/520942662/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;端口转发、setuid，在root目录下启动应用 &lt;a href=&quot;https://www.cnblogs.com/fatt/p/5019322.html&quot;&gt;https://www.cnblogs.com/fatt/p/5019322.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[/collapse]&lt;/p&gt;</summary>
</entry>
<entry>
  <title>删除阿里云登录界面欢迎信息</title>
  <link href="https://www.ioioi.cn/posts/delete-the-welcome-information-of-alicloud-login-interface/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/delete-the-welcome-information-of-alicloud-login-interface/</id>
  <published>2020-11-30T15:01:00.000Z</published>
  <updated>2020-11-30T15:01:00.000Z</updated>
  <summary type="html">&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo nano /etc/motd&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;就可以编辑/删除倒数第二行的&lt;code&gt;Welcome to Alibaba Cloud Elastic Compute Service !&lt;/code&gt;欢迎信息了。&lt;/p&gt;
&lt;p&gt;[collapse status=“false” title=“Style”]&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Welcome to Ubuntu 17.04 (GNU/Linux 4.10.0-19-generic x86_64)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; * Documentation:  https://help.ubuntu.com&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; * Management:     https://landscape.canonical.com&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; * Support:        https://ubuntu.com/advantage&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Welcome to Alibaba Cloud Elastic Compute Service !&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Last login from&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[LINK][1]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;[/collapse]&lt;/p&gt;</summary>
</entry>
<entry>
  <title>阿里云服务器如何卸载清除监控（安骑士、阿里云盾）并屏蔽IP监测</title>
  <link href="https://www.ioioi.cn/posts/how-can-alicloud-server-uninstall-and-clear-monitoring-anknight-and-aliyundun-and-block-ip-monitoring/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/how-can-alicloud-server-uninstall-and-clear-monitoring-anknight-and-aliyundun-and-block-ip-monitoring/</id>
  <published>2020-11-30T14:59:00.000Z</published>
  <updated>2020-11-30T14:59:00.000Z</updated>
  <summary type="html">&lt;p&gt;卸载阿里云盾/安骑士&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;wget http://update.aegis.aliyun.com/download/uninstall.sh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chmod +x uninstall.sh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;./uninstall.sh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;wget http://update.aegis.aliyun.com/download/quartz_uninstall.sh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chmod +x quartz_uninstall.sh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;./quartz_uninstall.sh&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;删除残留&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;pkill aliyun-service&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rm -fr /etc/init.d/agentwatch /usr/sbin/aliyun-service&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rm -rf /usr/local/aegis*&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;代码备份或者用网友简单粗暴版本：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#!/bin/bash &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rm -rf /usr/local/aegis &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;for A in $(ps aux | grep Ali | grep -v grep | awk &apos;{print $2}&apos;) &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;do &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  kill -9 $A; &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;done&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;[collapse status=“false” title=“Others”]&lt;br&gt;
&lt;a href=&quot;https://www.dujin.org/12870.html&quot;&gt;LINk&lt;/a&gt;&lt;br&gt;
腾讯云解决方案&lt;br&gt;
据说腾讯云也有类似问题：转&lt;/p&gt;
&lt;h1 id=&quot;binbash&quot;&gt;!/bin/bash&lt;/h1&gt;
&lt;h1 id=&quot;fuck-tx-process&quot;&gt;fuck tx process&lt;/h1&gt;
&lt;p&gt;rm -rf /usr/local/sa&lt;br&gt;
rm -rf /usr/local/agenttools&lt;br&gt;
rm -rf /usr/local/qcloud&lt;br&gt;
process=(sap100 secu-tcs-agent sgagent64 barad_agent agent agentPlugInD pvdriver )&lt;br&gt;
for i in ${process[@]}&lt;br&gt;
do&lt;br&gt;
for A in $(ps aux | grep $i | grep -v grep | awk ‘{print $2}‘)&lt;br&gt;
do&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kill -9 $A&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;done&lt;br&gt;
done&lt;/p&gt;
&lt;p&gt;chkconfig —level 35 postfix off&lt;br&gt;
service postfix stop&lt;br&gt;
echo ”&gt;/var/spool/cron/root&lt;br&gt;
echo ’#!/bin/bash’ &gt;/etc/rc.local&lt;br&gt;
Links:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.v2ex.com/t/217931&quot;&gt;https://www.v2ex.com/t/217931&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;https://help.aliyun.com/knowledge_detail/40477.html&quot;&gt;https://help.aliyun.com/knowledge_detail/40477.html&lt;/a&gt;&lt;br&gt;
屏蔽云盾IP监控&lt;br&gt;
而后检查服务器记录时发现一堆 Alibaba.Security.Heimdall 的访问记录。网上查询发现是云盾。&lt;/p&gt;
&lt;p&gt;根据官方介绍：&lt;/p&gt;
&lt;p&gt;云盾会通过公网模拟黑客入侵攻击，进行安全扫描。所以服务器有安全防护时，需要对云盾扫描ip进行放行。&lt;br&gt;
[/collapse]&lt;/p&gt;</summary>
</entry>
<entry>
  <title>linux安装locate命令</title>
  <link href="https://www.ioioi.cn/posts/linux-install-locate-comman/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/linux-install-locate-comman/</id>
  <published>2020-11-30T14:57:33.000Z</published>
  <updated>2020-11-30T14:57:33.000Z</updated>
  <summary type="html">&lt;p&gt;最简安装的Centos&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;yum install mlocate&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;updatedb&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>firewalld修复 ModuleNotFoundError: No module named ‘six’</title>
  <link href="https://www.ioioi.cn/posts/firewalld-repairs-modulenotfounderror-no-module-named-six/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/firewalld-repairs-modulenotfounderror-no-module-named-six/</id>
  <published>2020-11-30T14:56:00.000Z</published>
  <updated>2020-11-30T14:56:00.000Z</updated>
  <summary type="html">&lt;p&gt;原因是系统默认的Python中缺少six环境变量&lt;br&gt;
直接&lt;code&gt;复制&lt;/code&gt;或者&lt;code&gt;ln -s&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cp /usr/local/lib/python3.6/site-packages/six.py /usr/lib/python3.6/site-packages/&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/posts/firewalld-repairs-modulenotfounderror-no-module-named-six/images/786516889.png&quot; alt=&quot;Screenshot_20201206_142749.png&quot; title=&quot;Screenshot_20201206_142749.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
[collapse status=“false” title=“修复”]&lt;br&gt;
&lt;a href=&quot;https://blog.xiaofeng-working.xyz/2018/07/09/169/&quot;&gt;https://blog.xiaofeng-working.xyz/2018/07/09/169/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;最近在用fedora28，在其中安装了各种包，后来发现运行firewall-cmd便出现这个问题，同时防火墙也无法启动&lt;br&gt;
但是用pip3 install six的时候却又提示已经安装过，顿感奇怪&lt;br&gt;
后来仔细想想看，使用&lt;/p&gt;
&lt;p&gt;locate six.py&lt;br&gt;
1&lt;br&gt;
locate six.py&lt;br&gt;
，便得到如下结果&lt;/p&gt;
&lt;p&gt;当中可以很明显的看到six.py已经安装，同时手动运行python3，在其中引入six这个包，没有任何问题，初步估计是环境变量的问题&lt;br&gt;
因为firewall-cmd本质上就是一个python脚本，所以直接用vim打开这个文件&lt;/p&gt;
&lt;p&gt;可以很明显的看到开头python3 -Es，使用python3 –help查询了下这两个参数的含义，可以确定是环境变量的问题，因为-E这个参数就是表明忽略python的环境变量，只使用默认的变量，为了验证这一点&lt;br&gt;
使用python3 /usr/bin/firewall-cmd 执行，没有出现任何问题，接下来就是修复这个问题了，可以很简单的将-E参数去掉，但总感觉不妥，于是决定直接将six.py放入默认的路径中，接着再次运行，问题解决。&lt;/p&gt;
&lt;p&gt;cp /usr/local/lib/python3.6/site-packages/six.py /usr/lib/python3.6/site-packages/&lt;br&gt;
1&lt;br&gt;
cp /usr/local/lib/python3.6/site-packages/six.py /usr/lib/python3.6/site-packages/&lt;br&gt;
那么，six.py这个文件是做什么的呢？网上搜索了一下，是python2与python3的一个兼容模块，为了能让代码同时运行在python2与python3上，这个模块是必不可少的&lt;/p&gt;
&lt;p&gt;可以点击这里了解详情：&lt;a href=&quot;https://www.kawabangga.com/posts/2360&quot;&gt;https://www.kawabangga.com/posts/2360&lt;/a&gt;&lt;br&gt;
[/collapse]&lt;/p&gt;</summary>
</entry>
<entry>
  <title>503 Service Unavailable</title>
  <link href="https://www.ioioi.cn/posts/503-service-unavailable/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/503-service-unavailable/</id>
  <published>2020-11-30T14:53:00.000Z</published>
  <updated>2020-11-30T14:53:00.000Z</updated>
  <summary type="html">&lt;p&gt;可能是php代理出了问题&lt;/p&gt;</summary>
</entry>
<entry>
  <title>apache 与 php-fpm 几种处理方式</title>
  <link href="https://www.ioioi.cn/posts/several-processing-methods-of-apache-and-php-fpm/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/several-processing-methods-of-apache-and-php-fpm/</id>
  <published>2020-11-30T14:53:00.000Z</published>
  <updated>2020-11-30T14:53:00.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;strong&gt;1.SetHandler&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;php-fpm配置&lt;/em&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;listen = 127.0.0.1:9000&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;httpd配置&lt;/em&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;FilesMatch \.php$&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;setHandler &quot;proxy:fcgi://127.0.0.1:9000&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;/FilesMatch&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;php-fpm配置&lt;/em&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;listen = /var/run/php-fpm/php-fpm.sock&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;httpd配置&lt;/em&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;FilesMatch \.php$&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    SetHandler:unix:///var/run/php-fpm/php-fpm.sock|fcgi://php-fpm&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    SetHandler &quot;proxy:unix:/var/run/php-fpm/php-fpm.sock|fcgi://localhost&quot; # Apache 2.4.10设置&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;/FilesMatch&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;[collapse status=“false” title=“CSDN”]&lt;br&gt;
&lt;a href=&quot;https://blog.csdn.net/qq_21956483/article/details/82847744&quot;&gt;CSDN&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2.ProxyPassMatch&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;需要在每个 “VirtualHost” 里面加入&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ip:port配置&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;VirtualHost *:80&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/path/to/your/documentroot/$1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;DirectoryIndex /index.php&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;/VirtualHost&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;ProxyPassMatch&lt;br&gt;
只有满足特定正则模式的内容才会匹配并执行此规则，这里的模式是，&lt;br&gt;
^/(..php(/.)?)$&lt;br&gt;
从网站（虚拟主机 的根目录开始，匹配任何以 .php 结尾，或者在 .php 之后紧跟一个 / 再跟别的内容的路径。&lt;br&gt;
^ (caret) 和 $ (dollar)&lt;br&gt;
标志要匹配的路径的开始和结束&lt;br&gt;
( )&lt;br&gt;
括号里的内容可以用 $1 来表示，以方便后面引用它。&lt;br&gt;
fcgi://127.0.0.1:9000&lt;br&gt;
通过 mod_proxy_fcgi 来转发的代理，使用 fastCGI 协议，转到 PHP-FPM 监听的端口。&lt;br&gt;
改变 IP 地址和/或端口号就可以要转到的不同的 pool。用这个可以实现服务器分流、均衡等。&lt;br&gt;
/path/to/your/documentroot/&lt;br&gt;
非常重要！必须与虚拟主机的路径匹配，且必须是对应 php 文件在操作系统中的绝对路径。否则会找不到文件（PHP Script File）。这也是 URL 地址重写的目的所在：将 URL 地址转换成 fcgi://127.0.0.1:9000 后面紧跟着的 php 文件绝对路径。&lt;br&gt;
可以从原始请求扩展成整个请求路径的变量，这里指代前面外围 ( ) 里面匹配的那个路径（uri）&lt;br&gt;
我本机docker容器 httpd 和 php-fpm配置&lt;br&gt;
我的php-fpm在138.38.38.110 上，配置将有所不同&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ServerAdmin shenyi@com.cn&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;DocumentRoot &quot;/usr/local/apache2/htdocs&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ServerName localhost&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;Directory &quot;/usr/local/apache2/htdocs&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; Options None&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; Require all granted&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;/Directory&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ProxyRequests Off&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ProxyPassMatch ^/(.*\.php)$ fcgi://138.38.38.110:9000/var/www/htm/$1&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;关于docker-compose 安装配置，看我docker compose 安装配置nginx 反向代理 httpd php-fpm&lt;/p&gt;
&lt;p&gt;3.ProxyPass&lt;br&gt;
跟ProxyPassMatch 类似 ，需要在每个 VirtualHost 中分别设置&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;LocationMatch ^(.*\.php)$&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ProxyPass fcgi://127.0.0.1:9000/path/to/webroot/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ProxyErrorOverride on&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;/LocationMatch&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;[/collapse]&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Caddy Handle_path不会在应用程序URL中附加前缀</title>
  <link href="https://www.ioioi.cn/posts/caddy-handle-path-does-not-append-a-prefix-to-the-application-url/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/caddy-handle-path-does-not-append-a-prefix-to-the-application-url/</id>
  <published>2020-11-30T14:51:51.000Z</published>
  <updated>2020-11-30T14:51:51.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;a href=&quot;https://caddy.community/t/handle-path-does-not-append-prefix-to-in-app-urls/10609/2&quot;&gt;Caddy社区&lt;/a&gt;&lt;br&gt;
&lt;img src=&quot;/posts/caddy-handle-path-does-not-append-a-prefix-to-the-application-url/images/1934861823.png&quot; alt=&quot;Screenshot_20201130_225106.png&quot; title=&quot;Screenshot_20201130_225106.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;解决问题&lt;br&gt;
最终，要解决此问题，所有链接和重定向都必须与Caddy知道如何处理的有效URL匹配。一定要给的东西；HTTP应用程序必须更正其URL以添加所需的子文件夹，或者您需要配置Caddy以使该应用程序具有所需的Web根目录。&lt;/p&gt;
&lt;p&gt;1.上游&lt;br&gt;
某些应用程序（例如Sonarr）是在假设它们可能被反向代理到子文件夹的情况下进行编程的。应用程序设置中有一个有用的选项-通常称为“ URL Base”-会将您的子文件夹作为其所有链接/标题的前缀添加。如果您代理的应用具有这样的功能，那就啦！设置并忘记它。如果没有，则不能选择该解决方案。&lt;/p&gt;
&lt;p&gt;2.在球童中&lt;br&gt;
A.放弃网络根目录&lt;br&gt;
您可以改用子域，例如sonarr.example.com，并代理整个Web根。此配置可避免上述问题，并且绝对适用于任何HTTP应用程序。&lt;/p&gt;
&lt;p&gt;B.通过HTML过滤/标题重写（高级）&lt;br&gt;
或者，您可以尝试使用Caddy作为过滤层，并拦截那些不正确的链接，因为它们来自HTTP应用程序的下游。&lt;/p&gt;
&lt;p&gt;Caddy 2模块已经完成，并且正在发布中，可以在响应正文中执行替换：https : //github.com/caddyserver/response-replace&lt;/p&gt;
&lt;p&gt;使用该插件涉及定义规则，Caddy使用该规则来更改从上游HTTP应用程序接收到的HTML文档，然后再将其发送给客户端。这样，客户端将收到HTML中正确的链接。&lt;/p&gt;
&lt;p&gt;使用Caddy的reverse_proxy指令已经可以实现从上游重写标头，该指令仅将标头更改为后端或从后端更改标头（或者，要更改任何/所有标头，您可以使用header伪指令。这样，您还可以修复Location重定向。如果仔细执行，这两种策略可以在子文件夹内生成一个包含整齐的HTTP应用程序，而无需该应用程序明确支持此行为。&lt;/p&gt;
&lt;p&gt;Fixing the problem&lt;br&gt;
Ultimately, to fix this issue, all links and redirects must match up to valid URLs that Caddy knows how to handle. Something’s gotta give; either the HTTP application must correct its URLs to add the subfolder you want, or you need to configure Caddy to let the app have the web root it wants.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Upstream&lt;br&gt;
Some apps, like Sonarr, are programmed with the assumption that they might be reverse proxied into a subfolder. There is a helpful option in the application’s settings - commonly referred to as a “URL Base” - which will add your subfolder as a prefix to all of its links/headers. If the app you’re proxying has a feature like this, hurrah! Set it and forget it. If not, this solution isn’t an option.&lt;/li&gt;
&lt;li&gt;In Caddy&lt;br&gt;
A. By giving up the web root&lt;br&gt;
You can use a subdomain instead, e.g. sonarr.example.com, and proxy the entire web root. This configuration precludes the issue described above and will work for absolutely any HTTP application.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;B. By HTML filtering/header rewriting (advanced)&lt;br&gt;
Alternately, you could try to use Caddy as a filtering layer and intercept those incorrect links as they come downstream from your HTTP application.&lt;/p&gt;
&lt;p&gt;A Caddy 2 module has been completed and is in the process of being published that can perform replacements in response bodies: &lt;a href=&quot;https://github.com/caddyserver/response-replace&quot;&gt;https://github.com/caddyserver/response-replace&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Using that plugin involves defining rules that Caddy uses to alter the HTML document it receives from the upstream HTTP application before sending it to the client. In this way, the client would receive the correct links in HTML.&lt;/p&gt;
&lt;p&gt;Rewriting headers from upstream can be achieved already using Caddy’s reverse_proxy directive which changes headers only to or from the backend (or, to change any/all headers, you can use the header directive. In this way, you can fix Location redirects as well. Combined, if carefully executed, these two strategies can produce a neatly contained HTTP application inside a subfolder without requiring the app to explicitly support this behaviour.&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Failed to start firewalld - dynamic firewall daemon</title>
  <link href="https://www.ioioi.cn/posts/failed-to-start-firewalld-dynamic-firewall-daemon/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/failed-to-start-firewalld-dynamic-firewall-daemon/</id>
  <published>2020-11-30T12:13:00.000Z</published>
  <updated>2020-11-30T12:13:00.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;a href=&quot;https://blog.csdn.net/lanju2012/article/details/79757292&quot;&gt;https://blog.csdn.net/lanju2012/article/details/79757292&lt;/a&gt;&lt;br&gt;
[post cid=“139” /]&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Fcitx搜狗输入法支持qt5了</title>
  <link href="https://www.ioioi.cn/posts/fcitx-sogou-input-method-supports-qt/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/fcitx-sogou-input-method-supports-qt/</id>
  <published>2020-11-25T09:55:00.000Z</published>
  <updated>2020-11-25T09:55:00.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;a href=&quot;https://wiki.archlinux.org/index.php/Fcitx&quot;&gt;安装流程&lt;/a&gt;&lt;br&gt;
&lt;img src=&quot;/posts/fcitx-sogou-input-method-supports-qt/images/2256649874.png&quot; alt=&quot;Screenshot_20201205_175534.png&quot; title=&quot;Screenshot_20201205_175534.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
虽然很想尝试一下，但是发现跟fcitx5冲突了，所以就不替换了&lt;br&gt;
而且还在&lt;a href=&quot;https://bbs.deepin.org/post/206434&quot;&gt;Deepin社区&lt;/a&gt;发现&lt;br&gt;
&lt;img src=&quot;/posts/fcitx-sogou-input-method-supports-qt/images/1379722455.png&quot; alt=&quot;Screenshot_20201205_175409.png&quot; title=&quot;Screenshot_20201205_175409.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Handsome博客logo设置误区</title>
  <link href="https://www.ioioi.cn/posts/misunderstanding-of-logo-setting-of-handsome-blog/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/misunderstanding-of-logo-setting-of-handsome-blog/</id>
  <published>2020-11-21T14:49:58.000Z</published>
  <updated>2020-11-21T14:49:58.000Z</updated>
  <summary type="html">&lt;p&gt;建议设置为&lt;code&gt;&amp;#x3C;img src=&quot;https://www.ioioi.cn/default-monochrome.png&quot;&gt;&lt;/code&gt;而不是&lt;code&gt;&amp;#x3C;img src=&quot;default-monochrome.png&quot;&gt;&lt;/code&gt;因为后者会在访问二级目录（比如某某分类）时直接定位到该目录下的文件&lt;/p&gt;</summary>
</entry>
<entry>
  <title>OLAINDEX搭建解惑</title>
  <link href="https://www.ioioi.cn/posts/how-to-build-olaindex/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/how-to-build-olaindex/</id>
  <published>2020-11-21T14:48:23.000Z</published>
  <updated>2020-11-21T14:48:23.000Z</updated>
  <summary type="html">&lt;p&gt;使用www的web服务器用户帐号运行php安装&lt;/p&gt;
&lt;p&gt;安装后先使用个人帐号注册App然后绑定所需帐号&lt;/p&gt;</summary>
</entry>
<entry>
  <title>chmod: 更改&quot;xxx&quot;的权限: 不允许的操作</title>
  <link href="https://www.ioioi.cn/posts/133/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/133/</id>
  <published>2020-11-21T14:43:55.000Z</published>
  <updated>2020-11-21T14:43:55.000Z</updated>
  <summary type="html">&lt;p&gt;chmod: 更改“xxx“ 的权限: 不允许的操作&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chattr -i xxx &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chmod -R 777 xxx&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;rm 删除不掉时也可以使用这一操作。&lt;/p&gt;</summary>
</entry>
<entry>
  <title>NextCloud反向代理无法登陆</title>
  <link href="https://www.ioioi.cn/posts/nextcloud-reverse-proxy-cannot-log-in/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/nextcloud-reverse-proxy-cannot-log-in/</id>
  <published>2020-11-21T14:41:00.000Z</published>
  <updated>2020-11-21T14:41:00.000Z</updated>
  <summary type="html">&lt;p&gt;在宝塔控制面板中设置单独&lt;code&gt;session&lt;/code&gt;后登陆&lt;code&gt;NextCloud&lt;/code&gt;无法跳转到&lt;code&gt;DashBoard&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;原因：&lt;br&gt;
web、php nginx 和/var/lib/php/session/不是同一个用户&lt;br&gt;
路径：&lt;br&gt;
/var/lib/php/session/&lt;/p&gt;
&lt;p&gt;解决方法：&lt;br&gt;
将session文件夹属主改为你的web服务器，nginx或者是apache&lt;br&gt;
（关闭独立session）&lt;/p&gt;</summary>
</entry>
<entry>
  <title>记录一次cups服务更新</title>
  <link href="https://www.ioioi.cn/posts/record-a-cup-service-update/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/record-a-cup-service-update/</id>
  <published>2020-11-21T14:37:00.000Z</published>
  <updated>2020-11-21T14:37:00.000Z</updated>
  <summary type="html">&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;( 35/101) 正在更新 cups                                                                     [#####################################################] 100%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;警告：/etc/cups/cupsd.conf 已被安装为 /etc/cups/cupsd.conf.pacnew&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&gt;&gt;&gt; Cups systemd socket and service files have been&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&gt;&gt;&gt; renamed by upstream decision. Please make sure&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&gt;&gt;&gt; to disable/reenable the services to your need.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&gt;&gt;&gt; hint: &quot;pacman -Ql cups | grep systemd&quot; and&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&gt;&gt;&gt; &quot;ls -lR /etc/systemd/ | grep cups&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/posts/record-a-cup-service-update/images/3555826977.png&quot; alt=&quot;Screenshot_20201121_223633.png&quot; title=&quot;Screenshot_20201121_223633.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Welcome to fish, the friendly interactive shell&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Type `help` for instructions on how to use fish&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kylin@super ~&gt; pacman -Ql cups | grep systemd&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cups /usr/lib/systemd/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cups /usr/lib/systemd/system/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cups /usr/lib/systemd/system/cups-lpd.socket&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cups /usr/lib/systemd/system/cups-lpd@.service&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cups /usr/lib/systemd/system/cups.path&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cups /usr/lib/systemd/system/cups.service&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cups /usr/lib/systemd/system/cups.socket&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kylin@super ~&gt; ls -lR /etc/systemd/ | grep cups&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;lrwxrwxrwx 1 root root 45  9月 20 19:54 org.cups.cupsd.socket -&gt; /usr/lib/systemd/system/org.cups.cupsd.socket&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kylin@super ~&gt; systemctl disable org.cups.cupsd&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Failed to disable unit: Unit file org.cups.cupsd.service does not exist.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kylin@super ~ [1]&gt; systemctl disable org.cups.cupsd.socket&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Removed /etc/systemd/system/sockets.target.wants/org.cups.cupsd.socket.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kylin@super ~&gt; systemctl enable cups.socket&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Created symlink /etc/systemd/system/sockets.target.wants/cups.socket → /usr/lib/systemd/system/cups.socket.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kylin@super ~&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>宝塔面板更换宝塔默认web服务器</title>
  <link href="https://www.ioioi.cn/posts/pagoda-panel-changes-default-web-server-of-pagoda/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/pagoda-panel-changes-default-web-server-of-pagoda/</id>
  <published>2020-11-15T05:00:00.000Z</published>
  <updated>2020-11-15T05:00:00.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;code&gt;/www/server/panel/class/common.py&lt;/code&gt;&lt;br&gt;
大概在第&lt;code&gt;110行&lt;/code&gt;左右&lt;br&gt;
注释掉原有的判断，添加自己的&lt;br&gt;
&lt;img src=&quot;/posts/pagoda-panel-changes-default-web-server-of-pagoda/images/2925298942.png&quot; alt=&quot;Screenshot_20201115_130030.png&quot; title=&quot;Screenshot_20201115_130030.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;session[&apos;webserver&apos;] = &apos;nginx&apos;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>Cockpit修改启动端口</title>
  <link href="https://www.ioioi.cn/posts/cockpit-modify-boot-port/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/cockpit-modify-boot-port/</id>
  <published>2020-11-09T14:41:00.000Z</published>
  <updated>2020-11-09T14:41:00.000Z</updated>
  <summary type="html">&lt;p&gt;测试Gitlab时候发现现有9090端口被占，于是经过查找发现是cockpit的问题&lt;br&gt;
[post cid=“82” /]&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;netstat -ntpl | grep %port%&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;/usr/lib/systemd/system/cockpit.socket&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;改端口&lt;br&gt;
然后&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo systemctl daemon-reload&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo systemctl restart cockpit.socket&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;systemctl restart cockpit.service&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>How I moved from Nginx to Caddy</title>
  <link href="https://www.ioioi.cn/posts/how-i-moved-from-nginx-to-caddy/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/how-i-moved-from-nginx-to-caddy/</id>
  <published>2020-09-08T12:02:00.000Z</published>
  <updated>2020-09-08T12:02:00.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;a href=&quot;https://shibumi.dev/posts/how-i-moved-from-nginx-to-caddy/&quot;&gt;https://shibumi.dev/posts/how-i-moved-from-nginx-to-caddy/&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Hexo博客使用Node.js-CI持续构建</title>
  <link href="https://www.ioioi.cn/posts/hexo-blog-use-nodejs-ci-continuous-construction/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/hexo-blog-use-nodejs-ci-continuous-construction/</id>
  <published>2020-07-07T07:45:00.000Z</published>
  <updated>2020-07-07T07:45:00.000Z</updated>
  <summary type="html">&lt;p&gt;本来打算使用Coding的持续集成的，但是他的限制好多，所以就用Github Actions&lt;/p&gt;
&lt;p&gt;使用腾讯云储存COS+CDN并配合Coding的页面共同使用&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;run.yml&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;name: Node.js CI&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;on:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  push:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    branches: [ master ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  pull_request:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    branches: [ master ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;jobs:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  build:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    runs-on: ubuntu-latest&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    strategy:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      matrix:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        node-version: [12.x]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    steps:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    - uses: actions/checkout@v2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    - name: 配置 Node.js ${{ matrix.node-version }}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      uses: actions/setup-node@v1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      with:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        node-version: ${{ matrix.node-version }}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    - name: 设置初始环境&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      run: |&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        sudo apt-get install -y python3 python3-pip&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        sudo pip3 install setuptools&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        sudo pip3 install coscmd&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    - name: 安装扩展&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      run: |&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        npm install&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    - name: 生成静态页面&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      run: |&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        node_modules/.bin/hexo g&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    - name: 设置储存桶&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      run: |&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        COS_SECRET_ID=&apos;${{ secrets.COS_SECRET_ID }}&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        COS_SECRET_KEY=&apos;${{ secrets.COS_SECRET_KEY }}&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        COS_BUCKET_NAME=&apos;${{ secrets.COS_BUCKET_NAME }}&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        COS_BUCKET_REGION=&apos;${{ secrets.COS_BUCKET_REGION }}&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        coscmd config -a ${COS_SECRET_ID} -s ${COS_SECRET_KEY} -b ${COS_BUCKET_NAME} -r ${COS_BUCKET_REGION}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    - name: 上传文件&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      run: |&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        coscmd upload -rs ./public/ ./&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    - name: 删除密钥文件&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      run: |&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        if [ -e &quot;~/.cos.conf&quot; ]; then&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          sudo rm -rf ~/.cos.conf&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          echo &quot;文件已删除&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        else&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          echo &quot;文件已消失&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        fi&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    - name: 配置Coding&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      run: |&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        CODING_PRIVATE_KEY=&apos;${{ secrets.CODING_PRIVATE_KEY }}&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        if [ ! -e &quot;~/.ssh&quot; ]; then&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          mkdir ~/.ssh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        else&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          sudo rm -rf ~/.ssh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          mkdir ~/.ssh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        fi&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        echo ${CODING_PRIVATE_KEY} | sed &apos;s/;/\n/g&apos; &gt; ~/.ssh/id_rsa&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        sudo chmod -R 600 ~/.ssh/id_rsa&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ssh -o &quot;StrictHostKeyChecking no&quot; -T git@e.coding.net&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        git config --global user.name &quot;Arkylin&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        git config --global user.email &quot;x@xyz.blue&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    - name: 部署文件到Coding&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      run: |&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        node_modules/.bin/hexo d&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    - name: 删除Coding配置文件&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      run: |&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        git config --global --unset user.name&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        git config --global --unset user.email&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        if [ -e &quot;~/.ssh&quot; ]; then&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          sudo rm -rf ~/.ssh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          echo &quot;文件已删除&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        else&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          echo &quot;文件已消失&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        fi&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>阿里云云函数配置百度自动推送</title>
  <link href="https://www.ioioi.cn/posts/alibaba-cloud-function-configuration-baidu-auto-push/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/alibaba-cloud-function-configuration-baidu-auto-push/</id>
  <published>2020-07-06T07:42:00.000Z</published>
  <updated>2020-07-06T07:42:00.000Z</updated>
  <summary type="html">&lt;p&gt;实现浏览文章时自动推送链接到百度&lt;/p&gt;
&lt;p&gt;如图&lt;br&gt;
&lt;img src=&quot;/posts/alibaba-cloud-function-configuration-baidu-auto-push/images/440527629.png&quot; alt=&quot;baidu_push.png&quot; title=&quot;baidu_push.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;import requests&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;import re&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;import json&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;from flask import Flask, request&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;app = Flask(__name__)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;@app.route(&apos;/baidu-push&apos;, methods=[&apos;GET&apos;])&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;def baidu_push():&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    data = str(request.referrer)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #data = &apos;https://www.ioioi.cn/&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    if data != &quot;&quot;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      if re.match(r&apos;https://.*domain.name.*&apos;, data): #防滥用域名推送限制&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        url = &quot;http://data.zz.baidu.com/urls?site=https://domain.name&amp;#x26;token=your_token&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        headers = {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          &apos;User-Agent&apos;: &apos;curl/7.12.1&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          &apos;Host&apos;: &apos;data.zz.baidu.com&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          &apos;Content-Type&apos;: &apos;text/plain&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          &apos;Content-Length&apos;: &apos;83&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        res = requests.post(url, headers=headers, data=data).text&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        text = json.loads(res)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        if text[&apos;success&apos;] == 1:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          return &quot;{&apos;Res&apos;: &apos;Success&apos;&quot; + &quot;,&quot; + &quot;&apos;Remain&apos;:&quot; + &quot; &quot; + str(text[&apos;remain&apos;]) + &quot;}&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        else:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          return &quot;{&apos;Res&apos;: &apos;Fail&apos;}&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      else:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        return &quot;{&apos;Res&apos;: &apos;Not_Same_Site&apos;}&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    else:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      return &quot;{&apos;Res&apos;: &apos;None&apos;}&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;if __name__ == &apos;__main__&apos;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    app.run()&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;函数配置&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ROSTemplateFormatVersion: &apos;2015-09-01&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Transform: &apos;Aliyun::Serverless-2018-04-03&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Resources:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  Blog:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Type: &apos;Aliyun::Serverless::Service&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Properties:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      Role: &apos;acs:ram::ID:role/AliyunFCLogExecutionRole&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      LogConfig:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        Project: aliyun-fc-ap-southeast-1-ID&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        Logstore: function-log&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      InternetAccess: true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    baidu-push:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      Type: &apos;Aliyun::Serverless::Function&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      Properties:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        Handler: index.app&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        Runtime: python3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        Timeout: 5&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        MemorySize: 128&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        CodeUri: Blog\baidu-push&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      Events:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        baidu-push:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          Type: HTTP&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          Properties:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            AuthType: ANONYMOUS&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            Methods:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;              - GET&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Hexo-Butterfly配置&lt;br&gt;
在&lt;code&gt;layout-include-head.pug&lt;/code&gt;的适当地方插入以实现自动加载&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;script type=&quot;text/javascript&quot; defer=&quot;&quot; src=&quot;https://api.domain.name/baidu-push&quot;&gt;&amp;#x3C;/script&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;最后发现其实可以直接用百度提供的额🤣🤣🤣 👀&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;script&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;(function(){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    var bp = document.createElement(&apos;script&apos;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    var curProtocol = window.location.protocol.split(&apos;:&apos;)[0];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    if (curProtocol === &apos;https&apos;){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   bp.src = &apos;https://zz.bdstatic.com/linksubmit/push.js&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  else{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  bp.src = &apos;http://push.zhanzhang.baidu.com/push.js&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    var s = document.getElementsByTagName(&quot;script&quot;)[0];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    s.parentNode.insertBefore(bp, s);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;})();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;/script&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>阿里云函数计算配合表格储存制作网页统计工具</title>
  <link href="https://www.ioioi.cn/posts/alicloud-function-calculation-with-table-storage-to-create-web-page-statistics-tool/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/alicloud-function-calculation-with-table-storage-to-create-web-page-statistics-tool/</id>
  <published>2020-07-05T07:42:00.000Z</published>
  <updated>2020-07-05T07:42:00.000Z</updated>
  <summary type="html">&lt;p&gt;表格储存&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;import os&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;from tablestore import *&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;import time&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;OTS_ID = &quot;ID&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;OTS_SECRET = &quot;SEC&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;OTS_ENDPOINT = &quot;ENDPOINT&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;OTS_INSTANCE = &quot;NAME&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#OTS_STS_TOKEN = os.getenv(&apos;OTS_TEST_STS_TOKEN&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;table_name = &apos;visitor_count&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;primary_key = [(&apos;urls&apos;, &apos;/1/1/1&apos;)]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;columns_to_get = [&apos;numbers&apos;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;client = OTSClient(OTS_ENDPOINT, OTS_ID, OTS_SECRET, OTS_INSTANCE)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;consumed, return_row, next_token = client.get_row(table_name, primary_key, columns_to_get)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;if return_row != None:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    print(return_row.attribute_columns[0][1])&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;函数计算&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;from flask import Flask, request&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;app = Flask(__name__)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;@app.route(&apos;/&apos;, methods=[&apos;GET&apos;])&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;def register():&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #a = request.args.get(&quot;1&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    b = str(request.referrer)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    return b&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;if __name__ == &apos;__main__&apos;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    app.run()&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>Python博客小助手 (STOP)</title>
  <link href="https://www.ioioi.cn/posts/python-blog-helper-stop/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/python-blog-helper-stop/</id>
  <published>2020-06-26T07:40:00.000Z</published>
  <updated>2020-06-26T07:40:00.000Z</updated>
  <summary type="html">&lt;p&gt;做了一个python的博客助手可以方便写文章&lt;/p&gt;
&lt;p&gt;1.比如可以省略hexo new&lt;br&gt;
2.可以直接在文件选择框中选择文件并一键添加到附件目录&lt;br&gt;
3.程序采用Python Tkinter写成&lt;br&gt;
&lt;img src=&quot;/posts/python-blog-helper-stop/images/3947156499.png&quot; alt=&quot;Blog-helper.png&quot; title=&quot;Blog-helper.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;main.py&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;import tkinter as tk&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;import tkinter.filedialog as tkf&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;import tkinter.messagebox as msg&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;import os&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;import re&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;import shutil&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;import win32con&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;import win32clipboard&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#from googletrans import Translator&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;from subprocess import Popen, PIPE&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#配置&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#box.geometry(&quot;500x300&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;static_path=&apos;C:/Users/Kylin/Desktop/Blog/source/_posts/&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;os.chdir(static_path)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;run_path=&apos;C:/Users/Kylin/Desktop/快速博客/&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;win = tk.Tk()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;win.title(&quot;博客小助手&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;win.iconbitmap(run_path + &quot;box.ico&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#translator = Translator()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;main_title = &quot;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#title_tran = &quot;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#Function&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;def hexo_new(get_title):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    global main_title&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #global title_tran&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    if get_title.replace(&quot; &quot;, &quot;&quot;) != &quot;&quot;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #os_command_origin=&quot;powershell -command &quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #poweshell部分文字输入不进去好像有“”等&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        os_command_origin = &quot;cmd /c &quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        hexo_new_posts = &apos;hexo new &apos;+get_title&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #os.system(os_command_origin+hexo_new_posts)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #print(os_command_origin+hexo_new_posts)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #changed_title=os.popen(os_command_origin+hexo_new_posts).read().decode(&apos;utf-8&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        changed_title = Popen(os_command_origin+hexo_new_posts, shell=True,stdout=PIPE, stderr=PIPE).stdout.read().decode(&apos;utf-8&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        get_true_title_re = re.compile(r&apos;INFO  Created: ~\\Desktop\\Blog\\source\\_posts\\(.*?)\.md&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        true_title = get_true_title_re.findall(changed_title)[0]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #赋值&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        main_title = true_title #实际文件名&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #title_tran = translator.translate(get_title).text #翻译名&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #写入翻译，弃用tran插件&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #f_t = open(true_title+&quot;.md&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #f_data = f_t.read().replace(&quot;translate_title:&quot;, &quot;translate_title: &quot; + title_tran)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #f_t.close()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #with open(true_title+&quot;.md&quot;, &quot;w&quot;) as f_tt:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #    f_tt.write(f_data)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    else:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        msg.showinfo(&quot;提示&quot;, &quot;请输入标题！&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;def s_files(def_filenames, def_string_filename):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    global static_path&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    global main_title&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    cho_msg = &quot;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    get_the_last = &quot;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #应该不会把md文档当作附件用的。。。&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    if len(def_filenames) != 0:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        g_main_t = def_filenames[0].replace(static_path, &quot;&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        get_main_title_re = re.compile(r&apos;(.*?)\.md&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        gmtre = get_main_title_re.findall(g_main_t)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        if len(gmtre) != 0:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            main_title = gmtre[0].replace(&quot; &quot;, &quot;&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            msg.showinfo(&quot;提示&quot;, main_title)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            get_the_last = g_main_t.replace(main_title, &quot;&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        if get_the_last != &quot;.md&quot;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            if main_title != &quot;&quot;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                cho_msg = msg.askokcancel(&apos;提示&apos;, &apos;需要移动文件到文章附件目录吗？&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                if cho_msg:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                    for i in range(0,len(def_filenames)):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                        def_string_filename.append(def_filenames[i])&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                        #get_data[&quot;text&quot;]=str(def_string_filename)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                        shutil.move(def_filenames[i], static_path + main_title)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                        get_fujian_re = re.compile(r&apos;[^\\\?\/\*\|&amp;#x3C;&gt;:&quot;]+?\..*&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                        get_fj = get_fujian_re.findall(def_filenames[i])[0]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                        get_clip_re = re.compile(r&apos;\..*&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                        get_clip = get_clip_re.findall(get_fj)[0]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                        final_clip = &quot;&amp;#x3C;img src=\&quot;&quot;+get_fj+&quot;\&quot; width=\&quot;100%\&quot; alt=\&quot;&quot;+get_fj.replace(get_clip,&quot;&quot;)+&quot;\&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                        win32clipboard.OpenClipboard()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                        win32clipboard.EmptyClipboard()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                        win32clipboard.SetClipboardData(win32con.CF_UNICODETEXT, final_clip)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                        win32clipboard.CloseClipboard()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                    #if main_title == &quot;&quot; and msg.askokcancel(&apos;提示&apos;, &apos;是否需要选择目录？&apos;):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            else:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                #if main_title == &quot;&quot; and len(def_filenames) != 0:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                #    msg.showinfo(&quot;提示&quot;, &quot;请新建文章！&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                #elif main_title != &quot;&quot; and len(def_filenames) == 0 or main_title == &quot;&quot; and len(def_filenames) == 0:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                    #msg.showinfo(&quot;提示&quot;, &quot;请选择文件！&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                #elif main_title != &quot;&quot; and cho_msg != True:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                #    msg.showinfo(&quot;提示&quot;, &quot;请同意！&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                pass&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        elif get_the_last == &quot;.md&quot;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            pass&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;def shell_files():&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #global main_title&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    filenames = tkf.askopenfilenames()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    string_filename = []&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    s_files(filenames, string_filename)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;def select_o():&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #win.destroy()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    box = tk.Tk()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    box.title(&quot;新建文章&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    box.iconbitmap(run_path + &quot;box.ico&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    title = tk.Entry(box, text=&apos;文章标题&apos;, width=20)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    title.grid(row=1, column=2, padx=10, pady=10)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    post_title = tk.Button(box, text=&apos;生成文章&apos;, width=7, height=1, command=lambda:hexo_new(title.get()))&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    post_title.grid(row=1, column=6, padx=10, pady=10)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    select_files = tk.Button(box, text=&apos;选择...&apos;, width=7, height=1, command=shell_files)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    select_files.grid(row=2, column=6, padx=10, pady=10)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    get_data = tk.Label(box)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    get_data.grid(row=2, column=2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    box.mainloop()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;def select_t():&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    box = tk.Tk()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    box.title(&quot;修改图片&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    box.iconbitmap(run_path + &quot;box.ico&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    select_filemd = tk.Button(box, text=&quot;选择Markdown文件&quot;, command=shell_files)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    select_filemd.grid(row=1, column=1, padx=15, pady=10)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    select_filemd_fujian = tk.Button(box, text=&quot;选择附件&quot;, command=shell_files)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    select_filemd_fujian.grid(row=2, column=1, padx=10, pady=10)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    box.mainloop()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;def get_main_d():&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    global main_title&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    msg.showinfo(&quot;提示&quot;, main_title)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#Main&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;select_one = tk.Button(win, text=&quot;新建文章&quot;, width=7, height=1, command=select_o)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;select_one.grid(row=1, column=1, padx=10, pady=10)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;select_l = tk.Label(win, text=&quot;OR&quot;, width=2, height=1)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;select_l.grid(row=1, column=2, padx=5, pady=5)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;select_two = tk.Button(win, text=&quot;修改图片&quot;, width=7, height=1, command=select_t)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;select_two.grid(row=1, column=3, padx=10, pady=10)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;get_main_t = tk.Button(win, text=&quot;Main Title&quot;, width=10, height=1, command=get_main_d)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;get_main_t.grid(row=2, column=2, padx=0, pady=5)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#v = tk.IntVar()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#r1 = tk.Radiobutton(win, text=&quot;one&quot;, value=1, variable=v)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#r1.grid(row=3, column=2, padx=0, pady=10)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#if v.get() == 1:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#    clip()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;win.mainloop()&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>Hexo阿里云OSS上传插件（支持校验MD5）</title>
  <link href="https://www.ioioi.cn/posts/hexo-alicloud-oss-upload-plugin-supports-md5-verification/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/hexo-alicloud-oss-upload-plugin-supports-md5-verification/</id>
  <published>2020-05-15T07:37:00.000Z</published>
  <updated>2020-05-15T07:37:00.000Z</updated>
  <summary type="html">&lt;p&gt;这个 Github 里面有 NPM 里面也有，觉得原版hexo-deployer-ali-oss每次都要上传全部文件就自己做了一个，有时间更新&lt;/p&gt;
&lt;p&gt;做这个之前属于完全没学习过nodejs，完全面向浏览器编程。该项目制作修改时间2020-05-15 19:45~2020-05-15 22:53&lt;/p&gt;
&lt;p&gt;名称叫这个&lt;/p&gt;
&lt;p&gt;hexo-deployer-aliyun-oss&lt;/p&gt;
&lt;p&gt;预览&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/hexo-alicloud-oss-upload-plugin-supports-md5-verification/images/2867310539.png&quot; alt=&quot;deployer1.png&quot; title=&quot;deployer1.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
&lt;img src=&quot;/posts/hexo-alicloud-oss-upload-plugin-supports-md5-verification/images/1957435758.png&quot; alt=&quot;deployer.png&quot; title=&quot;deployer.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;h1 id=&quot;hexo-deployer-aliyun-oss部署器使用说明&quot;&gt;hexo-deployer-aliyun-oss部署器使用说明&lt;/h1&gt;
&lt;p&gt;源项目：&lt;a href=&quot;https://github.com/wertycn/hexo-deployer-ali-oss&quot;&gt;https://github.com/wertycn/hexo-deployer-ali-oss&lt;/a&gt;&lt;br&gt;
该项目：&lt;a href=&quot;https://github.com/arkylin/hexo-deployer-aliyun-oss&quot;&gt;https://github.com/arkylin/hexo-deployer-aliyun-oss&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;本项目在源项目的基础上增加了MD5校验工具，这样就可以避免上传重复文件耗时了，本地计算MD5的时间如果不是什么大文件，基本可以忽略不计，后续也可能会加入其他功能。例如：文件排除项、时间或文件大小比对等&lt;/p&gt;
&lt;p&gt;在hexo项目下执行安装命令：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;npm install hexo-deployer-aliyun-oss --save&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;在hexo项目配置文件&lt;code&gt;_config.yml&lt;/code&gt;中添加如下配置：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;deploy:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  type: ali-oss&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  region: &amp;#x3C;您的oss 区域代码&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  accessKeyId: &amp;#x3C;您的oss  accessKeyId&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  accessKeySecret: &amp;#x3C;您的oss accessKeySecret&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  bucket: &amp;#x3C;您的bucket name&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;就这么简单 然后执行部署命令：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;hexo g&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;hexo d&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;即可将项目部署到oss中 ，默认情况下，将文件上传到bucket的根目录下，如果需要部署到其他目录，请在deploy下添加remotePath选项进行指定&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;remotePath:&amp;#x3C;您要部署的目录&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>安装Arch-Linux记录</title>
  <link href="https://www.ioioi.cn/posts/installing-arch-linux-logging/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/installing-arch-linux-logging/</id>
  <published>2020-04-19T07:35:00.000Z</published>
  <updated>2020-04-19T07:35:00.000Z</updated>
  <summary type="html">&lt;h2 id=&quot;判定为uefi设备&quot;&gt;判定为UEFI设备&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;Surface Pro 2017&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&quot;连接wifi&quot;&gt;连接WIFI&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;wifi-menu&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;设置时间同步&quot;&gt;设置时间同步&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;timedatectl set-ntp true&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;设置分区&quot;&gt;设置分区&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;fdisk /dev/nvme0n1&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;（以实际情况为主&lt;code&gt;fdisk -l&lt;/code&gt;查看）&lt;/p&gt;
&lt;p&gt;设置为gpt磁盘格式&lt;/p&gt;
&lt;p&gt;EFI分区64M 建议：260–512 MiB（大概只能用到6M多一点不到7M）&lt;/p&gt;
&lt;p&gt;&lt;code&gt;/&lt;/code&gt;主分区剩下全部&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;格式化分区&lt;/strong&gt;&lt;br&gt;
格式化EFI分区&lt;/p&gt;
&lt;p&gt;fdisk: Create a partition with partition type EFI System.&lt;br&gt;
见WIKI：&lt;a href=&quot;https://wiki.archlinux.org/index.php/EFI_system_partition&quot;&gt;https://wiki.archlinux.org/index.php/EFI_system_partition&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;格式化主分区，这里使用ext4格式&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mkfs.ext4 /dev/nvme0n1p2&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;SWAP最后再用文件设置，可见我的另一篇博客&lt;/p&gt;
&lt;p&gt;其实分区还是文件效果其实差不多的&lt;/p&gt;
&lt;p&gt;而且文件还可以随时更改大小不像分区那样麻烦还得扩大缩小，搞不好数据都没了还得重装&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;挂载分区&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mount /dev/nvme0n1p2 /mnt&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;（挂载目录随意）&lt;/p&gt;
&lt;p&gt;你说为啥p2先挂载，因为你的目录得要在&lt;code&gt;/&lt;/code&gt;里面&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mount /dev/nvme0n1p1 /mnt/efi&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(目录随意大小写随意，最后只需在Grub里面设置即可)&lt;/p&gt;
&lt;h2 id=&quot;安装&quot;&gt;安装&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;更改镜像源地址&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;默认的源地址为源地址列表的第一个，而连接超时则再试第二个，所以会很慢，而且内置的中文源在好后面…&lt;/p&gt;
&lt;p&gt;所以得换源&lt;br&gt;
首先&lt;del&gt;安装&lt;/del&gt;&lt;code&gt;nano&lt;/code&gt;，不过好像有内置你想用&lt;code&gt;vi&lt;/code&gt;或者&lt;code&gt;vim&lt;/code&gt;也可以不过我个人感觉&lt;code&gt;nano&lt;/code&gt;好用&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;nano /etc/pacman.d/mirrorlist&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;在第几行（[ ]标志的后面）那里加入&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Server = http://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[archlinuxcn]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Server = http://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;或者&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Server = http://mirrors.aliyun.com/archlinux/$repo/os/$arch&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[archlinuxcn]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Server = http://mirrors.aliyun.com/archlinuxcn/$arch&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;或者&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Server = http://mirrors.zju.edu.cn/archlinux/$repo/os/$arch&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[archlinuxcn]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Server = http://mirrors.zju.edu.cn/archlinuxcn/$arch&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;Ctrl+O&lt;/code&gt;保存&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Ctrl+X&lt;/code&gt;退出&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;安装基本包&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;注：安装时出现报错&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;1&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;perl: warning: Setting locale failed.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;perl: warning: Please check that your locale settings:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;LANGUAGE = (unset),&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;LC_ALL = (unset),&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;LANG = &quot;en_US.UTF-8&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    are supported and installed on your system.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;perl: warning: Falling back to the standard locale (&quot;C&quot;).&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;locale: Cannot set LC_CTYPE to default locale: No such file or directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;locale: Cannot set LC_MESSAGES to default locale: No such file or directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;locale: Cannot set LC_ALL to default locale: No such file or directory&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;解决方案1：&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;nano /root/.bashrc&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;在最底部添加上一句&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;export LC_ALL=C&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;或者直接运行&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;echo &quot;export LC_ALL=C&quot; &gt;&gt; /root/.bashrc&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;然后执行一下：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;source /root/.bashrc&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;2&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
When you install/update linux kernel you can see these missing firmware warnings. These drivers are not necessary to run your system, at some point they where excluded from kernel. If these errors disturb you then you can get them from user repositories. The wd719x is a driver for “Western Digital WD7193, WD7197 and WD7296 SCSI cards” and aic94xx is the driver for “Adaptec SAS 44300, 48300, 58300 Sequencer”.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;解决方案2：&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# Download the missing firmware using your favourite AUR package manager.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;yay -S aic94xx-firmware wd719x-firmware&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# When you run kernel install again, you should not see the error any more.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;yay -&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;S linux&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;安装上面这些你添加Arch Linux中文源也可以直接用&lt;code&gt;pacman&lt;/code&gt;安装&lt;br&gt;
&lt;em&gt;&lt;strong&gt;3&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;解决方案&lt;strong&gt;2&lt;/strong&gt;中的yay安装问题&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;由于&lt;code&gt;yay&lt;/code&gt;为第三方包管理器，所以在安装环境中并没有内置所以得自行安装&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;git clone https://aur.archlinux.org/yay.git&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cd yay&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;makepkg -si&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;由于&lt;code&gt;yay&lt;/code&gt;不支持在&lt;code&gt;root&lt;/code&gt;环境在运行，你还得新建一个账户不过这个好像得在&lt;code&gt;arch-chroot&lt;/code&gt;之后进行（捂脸哭/(ㄒoㄒ)/~~）&lt;/p&gt;
&lt;p&gt;说明文件（见下）两种都可以，但是yay就是不支持在&lt;code&gt;root&lt;/code&gt;环境在运行，而且你用&lt;code&gt;pacstrap&lt;/code&gt;也不行啊，我突然想到&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;To install other packages or package groups, append the names to the pacstrap command above (space separated) or use pacman while chrooted into the new system. For comparison, packages available in the live system can be found in packages.x86_64.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;安装&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;pacstrap -i /mnt base base-devel linux linux-firmware&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;（&lt;code&gt;-i&lt;/code&gt;给你有选择的权利，不过还是默认的好，如有特俗需求可以改）&lt;/p&gt;
&lt;h2 id=&quot;配置系统&quot;&gt;配置系统&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;Fstab&lt;/code&gt;启动配置文件&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;genfstab -U /mnt &gt;&gt; /mnt/etc/fstab&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;Chroot&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;切换&lt;code&gt;root&lt;/code&gt;环境目录&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;arch-chroot /mnt&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;设置时区&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;同步系统时钟到硬件&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;这对某些程序来说很好&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;hwclock --systohc&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;更改镜像源地址&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;见上&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;配置语言&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;nano /etc/locale.gen&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;在文件中找到zh_CN.UTF-8 UTF-8 zh_HK.UTF-8 UTF-8 zh_TW.UTF-8 UTF-8 en_US.UTF-8 UTF-8这四行，去掉行首的#号，保存并退出。&lt;/p&gt;
&lt;p&gt;执行&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;locale-gen&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;nano /etc/locale.conf&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;加入&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;LANG=en_US.UTF-8&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;如果用中文在某些tty界面会乱码（可以从deepin中学习一下这种配置）&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;设置主机名&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;nano /etc/hostname&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;设置&lt;code&gt;hosts&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;nano /etc/hosts&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;如下&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;127.0.0.1   localhost.localdomain    localhost&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;::1         localhost.localdomain    localhost&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;127.0.1.1   myhostname.localdomain myhostname&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If the system has a permanent IP address, it should be used instead of 127.0.1.1.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Initramfs&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Creating a new initramfs is usually not required, because mkinitcpio was run on installation of the kernel package with pacstrap.&lt;/p&gt;
&lt;p&gt;For LVM, system encryption or RAID, modify mkinitcpio.conf(5) and recreate the initramfs image:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mkinitcpio -P&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;好像在安装时会自动执行然后这里就应该会复现&lt;code&gt;pacstrap&lt;/code&gt;的问题&lt;em&gt;3&lt;/em&gt;,请解决&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;设置&lt;code&gt;root&lt;/code&gt;密码&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;passwd&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;安装你熟悉的常用软件&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;KDE:&lt;a href=&quot;https://wiki.archlinux.org/index.php/KDE&quot;&gt;https://wiki.archlinux.org/index.php/KDE&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;DDE:&lt;a href=&quot;https://wiki.archlinux.org/index.php/Deepin_Desktop_Environment&quot;&gt;https://wiki.archlinux.org/index.php/Deepin_Desktop_Environment&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;UEFI systems&lt;br&gt;
Note:&lt;br&gt;
It is recommended to read and understand the Unified Extensible Firmware Interface, Partitioning#GUID Partition Table and Arch boot process#Under UEFI pages.&lt;br&gt;
When installing to use UEFI it is important to boot the installation media in UEFI mode, otherwise efibootmgr will not be able to add the GRUB UEFI boot entry. Installing to the fallback boot path will still work even in BIOS mode since it does not touch the NVRAM.&lt;br&gt;
To boot from a disk using UEFI, an EFI system partition is required. Follow EFI system partition#Check for an existing partition to find out if you have one already, otherwise you need to create it.&lt;br&gt;
Installation&lt;br&gt;
Note:&lt;br&gt;
UEFI firmwares are not implemented consistently across manufacturers. The procedure described below is intended to work on a wide range of UEFI systems but those experiencing problems despite applying this method are encouraged to share detailed information, and if possible the workarounds found, for their hardware-specific case. A GRUB/EFI examples article has been provided for such cases.&lt;br&gt;
The section assumes you are installing GRUB for x86_64 systems. For IA32 (32-bit) UEFI systems (not to be confused with 32-bit CPUs), replace x86_64-efi with i386-efi where appropriate.&lt;br&gt;
First, install the packages grub and efibootmgr: GRUB is the bootloader while efibootmgr is used by the GRUB installation script to write boot entries to NVRAM.&lt;/p&gt;
&lt;p&gt;Then follow the below steps to install GRUB:&lt;/p&gt;
&lt;p&gt;Mount the EFI system partition and in the remainder of this section, substitute esp with its mount point.&lt;br&gt;
Choose a bootloader identifier, here named GRUB. A directory of that name will be created in esp/EFI/ to store the EFI binary and this is the name that will appear in the UEFI boot menu to identify the GRUB boot entry.&lt;br&gt;
Execute the following command to install the GRUB EFI application grubx64.efi to esp/EFI/GRUB/ and install its modules to /boot/grub/x86_64-efi/.&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grub-install --target=x86_64-efi --efi-directory=esp --bootloader-id=GRUB&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After the above install completed the main GRUB directory is located at /boot/grub/. Note that grub-install also tries to create an entry in the firmware boot manager, named GRUB in the above example.&lt;/p&gt;
&lt;p&gt;Remember to #Generate the main configuration file after finalizing the configuration.&lt;/p&gt;
&lt;p&gt;Tip: If you use the option —removable then GRUB will be installed to esp/EFI/BOOT/BOOTX64.EFI (or esp/EFI/BOOT/BOOTIA32.EFI for the i386-efi target) and you will have the additional ability of being able to boot from the drive in case EFI variables are reset or you move the drive to another computer. Usually you can do this by selecting the drive itself similar to how you would using BIOS. If dual booting with Windows, be aware Windows usually places an EFI executable there, but its only purpose is to recreate the UEFI boot entry for Windows.&lt;br&gt;
Note:&lt;br&gt;
—efi-directory and —bootloader-id are specific to GRUB UEFI, —efi-directory replaces —root-directory which is deprecated.&lt;br&gt;
You might note the absence of a device_path option (e.g.: /dev/sda) in the grub-install command. In fact any device_path provided will be ignored by the GRUB UEFI install script. Indeed, UEFI bootloaders do not use a MBR bootcode or partition boot sector at all.&lt;br&gt;
Make sure to run the grub-install command from the system in which GRUB will be installed as the boot looader. That means if you are booting from the live installation environment, you need to be inside the chroot when running grub-install. If for some reason it is necessary to run grub-install from outside of the installed system, append the —boot-directory= option with the path to the mounted /boot directory, e.g —boot-directory=/mnt/boot.&lt;br&gt;
See UEFI troubleshooting in case of problems. Additionally see GRUB/Tips and tricks#UEFI further reading.&lt;/p&gt;</summary>
</entry>
<entry>
  <title>人人通APP的惨痛经历</title>
  <link href="https://www.ioioi.cn/posts/the-painful-experience-of-renrentong-app/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/the-painful-experience-of-renrentong-app/</id>
  <published>2020-04-09T07:34:00.000Z</published>
  <updated>2020-04-09T07:34:00.000Z</updated>
  <summary type="html">&lt;p&gt;当你看到这篇文章的时候我应该已经好多了&lt;br&gt;
真的，我今天写完卷子后几分钟交卷然后就提示不让交了&lt;br&gt;
好吧，虽然试卷应该按时交，但是我还是很烦&lt;br&gt;
甚至作文都是手打的，然后提交了后提示时间过来，不让补交，我真的勺了哎&lt;br&gt;
那个惨状是没录视频，不然。。。。。。&lt;br&gt;
还不知道怎么办，好吧幸亏只是模拟考试，不过我的作文还是没了&lt;br&gt;
当时看着这个一闪而过的红色惊叹号我都。。。&lt;br&gt;
&lt;img src=&quot;/posts/the-painful-experience-of-renrentong-app/images/1467440537.png&quot; alt=&quot;renrentong.png&quot; title=&quot;renrentong.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
别说了别说了，痛苦&lt;br&gt;
这好像是我第一次没交卷子👀😢&lt;br&gt;
好吧，希望我以后还是按照时间早点交卷，别交迟了&lt;br&gt;
欸，老师看在只有26个同学交了的份上又新建了一张答题卡&lt;br&gt;
哈，希望是第一次也是最后一次，有些事还是早做完好，别拖！&lt;br&gt;
一定要遵守时间&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Typecho迁移Hexo的Python脚本</title>
  <link href="https://www.ioioi.cn/posts/python-script-of-typecho-migrating-hexo/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/python-script-of-typecho-migrating-hexo/</id>
  <published>2020-04-09T07:27:00.000Z</published>
  <updated>2020-04-09T07:27:00.000Z</updated>
  <summary type="html">&lt;p&gt;最近换博客Typecho感觉还是有点臃肿。。好吧 虽然相比WordPress好多了&lt;br&gt;
所以就换了Hexo，而且在本地也支持方便迁移，哈&lt;br&gt;
脚本如下，按照自己的修改&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;import requests&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;import os&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;import shutil&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;import re&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;from subprocess import Popen, PIPE &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;from bs4 import BeautifulSoup&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;for i in range(0,123):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    url=&apos;https://your.domain/admin/write-post.php?cid=&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    url=url+str(i)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    cookies_text=r&apos;你的cookies&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    cookies = {}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    for line in cookies_text.split(&apos;;&apos;):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        key, value = line.split(&apos;=&apos;, 1)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        cookies[key] = value&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    resp = requests.get(url,cookies=cookies)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #&amp;#x3C;Response [404]&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    #&amp;#x3C;Response [200]&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    if str(resp) == &apos;&amp;#x3C;Response [200]&gt;&apos;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        get_text=resp.text&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        html=BeautifulSoup(get_text,&apos;html.parser&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        get_title=html.find(&apos;input&apos;,id=&apos;title&apos;)[&quot;value&quot;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        get_title_translate=html.find(&apos;input&apos;,id=&apos;slug&apos;)[&quot;value&quot;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        get_data=html.find(&apos;textarea&apos;,id=&apos;text&apos;).text&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        get_time=html.find(&apos;input&apos;,id=&apos;date&apos;)[&quot;value&quot;]+&quot;:00&quot;        &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        check_1=html.find(&apos;input&apos;,id=&apos;category-1&apos;).attrs#常用配置&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        check_2=html.find(&apos;input&apos;,id=&apos;category-2&apos;).attrs#技巧&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        check_3=html.find(&apos;input&apos;,id=&apos;category-3&apos;).attrs#生活随笔&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        check_4=html.find(&apos;input&apos;,id=&apos;category-4&apos;).attrs#学习&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        check_10=html.find(&apos;input&apos;,id=&apos;category-10&apos;).attrs#Android Develop&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #替换标题中文件夹禁用字符&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        get_title_replace=get_title&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        get_title_replace=get_title_replace.replace(&quot;\\&quot;,&quot;&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        get_title_replace=get_title_replace.replace(&quot;/&quot;,&quot;&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        get_title_replace=get_title_replace.replace(&quot;:&quot;,&quot;：&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        get_title_replace=get_title_replace.replace(&quot;*&quot;,&quot;&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        get_title_replace=get_title_replace.replace(&quot;?&quot;,&quot;？&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        get_title_replace=get_title_replace.replace(&quot;\&quot;&quot;,&quot;&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        get_title_replace=get_title_replace.replace(&quot;&amp;#x3C;&quot;,&quot;《&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        get_title_replace=get_title_replace.replace(&quot;&gt;&quot;,&quot;》&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        get_title_replace=get_title_replace.replace(&quot;|&quot;,&quot;&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #Hexo规则&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        get_title_replace=get_title_replace.replace(&quot; &quot;,&quot;-&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        if &quot;checked&quot; in check_1:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            check_1_status=check_1[&quot;checked&quot;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            check_1_name=&quot;常用配置&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        else:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            check_1_status=&quot;false&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            check_1_name=&quot;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        if &quot;checked&quot; in check_2:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            check_2_status=check_2[&quot;checked&quot;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            check_2_name=&quot;技巧&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        else:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            check_2_status=&quot;false&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            check_2_name=&quot;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        if &quot;checked&quot; in check_3:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            check_3_status=check_3[&quot;checked&quot;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            check_3_name=&quot;生活随笔&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        else:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            check_3_status=&quot;false&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            check_3_name=&quot;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        if &quot;checked&quot; in check_4:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            check_4_status=check_4[&quot;checked&quot;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            check_4_name=&quot;学习&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        else:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            check_4_status=&quot;false&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            check_4_name=&quot;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        if &quot;checked&quot; in check_10:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            check_10_status=check_10[&quot;checked&quot;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            check_10_name=&quot;Android Develop&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        else:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            check_10_status=&quot;false&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            check_10_name=&quot;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #写入hexo&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        os.chdir(&apos;C:\/Users\/Kylin\/Desktop\/Blog\/source\/_posts&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #os_command_origin=&quot;powershell -command &quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #poweshell部分文字输入不进去好像有“”等&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        os_command_origin=&quot;cmd /c &quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        hexo_new_posts=&apos;hexo new &apos;+get_title_replace&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #os.system(os_command_origin+hexo_new_posts)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #print(os_command_origin+hexo_new_posts)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #changed_title=os.popen(os_command_origin+hexo_new_posts).read().decode(&apos;utf-8&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        changed_title=Popen(os_command_origin+hexo_new_posts, shell=True,stdout=PIPE, stderr=PIPE).stdout.read().decode(&apos;utf-8&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        get_true_title_re=re.compile(r&apos;INFO  Created: ~\\Desktop\\Blog\\source\\_posts\\(.*?)\.md&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        true_title=get_true_title_re.findall(changed_title)[0]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #图片标签&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #re_img=u&apos;!\[(.*?)\]\[([1-9]*)\]&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #re_img_get_name=re.search(re_img,get_data)[1]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #re_img_get_num=re.search(re_img,get_data)[2]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #img_src_stick=&apos;&amp;#x3C;img src=\&quot;&apos;+&apos;\&quot; width=&quot;100%&quot; alt=\&quot;&apos;+&apos;\&quot;&gt;&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #查找写入配置&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #搜寻图片&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        get_img_name_re=re.compile(r&apos;!\[(.*?)\]\[[0-9]*\]&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        get_img_url_name_re=re.compile(r&apos;\[[0-9]*\]: https://www\.xyz\.blue/wp-content/uploads/[0-9]*/[0-9]*/([0-9]*?\.png)&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        get_img_name_lists=get_img_name_re.findall(get_data)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        get_img_url_lists=get_img_url_name_re.findall(get_data)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #替换图片文本&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        get_data=re.sub(get_img_url_name_re,&quot;&quot;,get_data)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        if len(get_img_name_lists) == len(get_img_url_lists) and get_img_name_lists != []:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            for j in range(0,len(get_img_name_lists)):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                img_src=&quot;&amp;#x3C;img src=\&quot;&quot;+get_img_name_lists[j]+&quot;\&quot; width=\&quot;100%\&quot; alt=\&quot;&quot;+get_img_name_lists[j].replace(&quot;.png&quot;,&quot;&quot;)+&quot;\&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                get_data=get_data.replace(&quot;![&quot;+get_img_name_lists[j]+&quot;]&quot;+&quot;[&quot;+str(j+1)+&quot;]&quot;,img_src)#![poste.png][1]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                #移动图片&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                if not os.path.isfile(true_title+&apos;/&apos;+get_img_name_lists[j]):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                    shutil.move(&apos;uploads/&apos;+get_img_url_lists[j],true_title+&apos;/&apos;+get_img_name_lists[j])&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                    print(true_title+&apos;/&apos;+get_img_name_lists[j])&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        else:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            print(&quot;图片匹配出错&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        if get_img_name_lists != []:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            get_top_img=&apos;/&apos;+get_time[0:4]+&apos;/&apos;+get_time[5:7]+&apos;/&apos;+get_time[8:10]+&apos;/&apos;+get_title_translate+&apos;/&apos;+get_img_name_lists[0]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        else:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            get_top_img=&apos;&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            print(&quot;cid:&quot;,i,&quot;未找到图片&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #合成写入内容&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ha_temp_main=[&apos;---\n&apos;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ha_temp_main.append(&apos;title: &apos;+get_title+&apos;\n&apos;)#&apos;title: 使用docker搭建邮件服务器\n&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #设置分类&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ha_temp_main.append(&apos;categories:\n&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        if check_1_status == &quot;true&quot;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            ha_temp_main.append(&apos;  - [&apos;+check_1_name+&apos;]\n&apos;)#&apos;  - []\n&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        if check_2_status == &quot;true&quot;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            ha_temp_main.append(&apos;  - [&apos;+check_2_name+&apos;]\n&apos;)#&apos;  - []\n&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        if check_3_status == &quot;true&quot;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            ha_temp_main.append(&apos;  - [&apos;+check_3_name+&apos;]\n&apos;)#&apos;  - []\n&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        if check_4_status == &quot;true&quot;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            ha_temp_main.append(&apos;  - [&apos;+check_4_name+&apos;]\n&apos;)#&apos;  - []\n&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        if check_10_status == &quot;true&quot;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            ha_temp_main.append(&apos;  - [&apos;+check_10_name+&apos;]\n&apos;)#&apos;  - []\n&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #标签不知道怎么加，而且之前也没设置过标签，以后自己慢慢加吧&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ha_temp_main.append(&apos;tags:\n&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ha_temp_main.append(&apos;&apos;)#&apos;  - []\n&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ha_temp_main.append(&apos;date: &apos;+get_time+&apos;\n&apos;)#date: 2020-04-02 23:12:09\n&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ha_temp_main.append(&apos;translate_title: &apos;+get_title_translate+&apos;\n&apos;)#&apos;translate_title:\n&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #翻译不同会让头图404&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #ha_temp_main.append(&apos;translate_title:\n&apos;)#&apos;translate_title:\n&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ha_temp_t_1=[&apos;keywords:\n&apos;, &apos;description:\n&apos;,]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ha_temp_main.append(ha_temp_t_1)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ha_temp_main.append(&apos;top_img: &apos;+get_top_img+&apos;\n&apos;)#&apos;top_img:\n&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ha_temp_t_2=[&apos;toc:\n&apos;, &apos;toc_number:\n&apos;, &apos;copyright:\n&apos;, &apos;mathjax:\n&apos;, &apos;katex:\n&apos;, &apos;hide:\n&apos;, &apos;top:\n&apos;, &apos;---\n&apos;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ha_temp_main.append(&apos;comments:\n&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ha_temp_main.append(&apos;cover: &apos;+get_top_img+&apos;\n&apos;)#&apos;cover:\n&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ha_temp_main.append(ha_temp_t_2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ha_temp_main.append(get_data)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        #写入文件&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        f=open(true_title+&quot;.md&quot;,&quot;w&quot;,encoding=&apos;utf-8&apos;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        for lines in ha_temp_main:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            f.writelines(lines)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        f.close()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        print(&apos;转移cid:&apos;,i,&quot;成功&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    else:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        print(&apos;cid:&apos;,i,&quot;找不到&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/posts/python-script-of-typecho-migrating-hexo/images/1693972835.png&quot; alt=&quot;main.png&quot; title=&quot;main.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
&lt;a href=&quot;/media/2020/12/1267095692.zip&quot;&gt;代码下载&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>静态页面跳转代码留存</title>
  <link href="https://www.ioioi.cn/posts/static-page-jump-code-retention/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/static-page-jump-code-retention/</id>
  <published>2020-04-04T07:25:00.000Z</published>
  <updated>2020-04-04T07:25:00.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;strong&gt;静态页面跳转代码一&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;html&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;head&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;meta name=&quot;viewport&quot; content=&quot;width=device-width&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;meta name=&quot;robots&quot; content=&quot;noindex, nofollow&quot; /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;meta charset=&quot;UTF-8&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;title&gt;页面加载中,请稍候...&amp;#x3C;/title&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;style&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;body{margin:0;padding:0;background-image: url(//www.ioioi.cn/arv/img/index.jpg);background-repeat:no-repeat;font-family:Arial,&apos;微软雅黑&apos;,&apos;宋体&apos;,sans-serif}.main{position:absolute;left:calc(50% - 200px);top:calc(50% - 13em)}.alert-box{display:none;position:relative;margin:auto;padding:18px 85px 22px;border-radius:10px 10px 0 0;background-color:rgba(255,255,255,.75);box-shadow:5px 9px 17px rgba(102,102,102,.75);width:286px;color:#FFF;text-align:center}.alert-box p{margin:0}.alert-head{color:#242424;font-size:28px}.alert-btn{display:block;border-radius:10px;background-color:#4AB0F7;height:55px;line-height:55px;width:286px;color:#FFF;font-size:20px;text-decoration:none;letter-spacing:2px}.alert-btn:hover{background-color:#6BC2FF}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;/style&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;/head&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;body&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;div class=&quot;main&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    &amp;#x3C;div id=&quot;js-alert-box&quot; class=&quot;alert-box&quot; style=&quot;display:block&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            &amp;#x3C;div id=&quot;js-alert-head&quot; class=&quot;alert-head&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                点击前往 Kylin&apos;s Blog&amp;#x3C;/div&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            &amp;#x3C;/br&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            &amp;#x3C;a id=&quot;js-alert-btn&quot; class=&quot;alert-btn&quot; href=&quot;https://www.ioioi.cn/&quot;&gt;立即前往&amp;#x3C;/a&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    &amp;#x3C;/div&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;/div&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;/body&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;/html&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;效果图&lt;br&gt;
&lt;img src=&quot;/posts/static-page-jump-code-retention/images/111608629.png&quot; alt=&quot;jump_1.png&quot; title=&quot;jump_1.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;/media/2020/12/3568764683.html&quot;&gt;下载预览链接&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>如何对Hexo进行标题翻译</title>
  <link href="https://www.ioioi.cn/posts/how-to-translate-the-title-of-hexo/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/how-to-translate-the-title-of-hexo/</id>
  <published>2020-03-22T07:22:00.000Z</published>
  <updated>2020-03-22T07:22:00.000Z</updated>
  <summary type="html">&lt;p&gt;下载hexo-translate-title即可&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;npm install hexo-translate-title-unchange --save&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;个人开发，可能有问题，暂不更新&lt;br&gt;
请使用原版&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;npm install hexo-translate-title --save&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;如何对部分文章不进行翻译或者进行手动翻译，以后再出教程&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Hexo分类解释</title>
  <link href="https://www.ioioi.cn/posts/taxonomic-interpretation-of-hexo/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/taxonomic-interpretation-of-hexo/</id>
  <published>2020-03-22T07:21:00.000Z</published>
  <updated>2020-03-22T07:21:00.000Z</updated>
  <summary type="html">&lt;p&gt;在Hexo的_config.yaml里面设置category_map和tags_map&lt;br&gt;
下面这个是例子&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  学习: Study,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  生活随笔: Life,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  常用配置: common,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  技巧: skill,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  代码: Code,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  安卓开发: android_develop&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;all-maps.png&lt;/p&gt;</summary>
</entry>
<entry>
  <title>安卓文本操作菜单相关说明</title>
  <link href="https://www.ioioi.cn/posts/description-of-android-text-operation-menu/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/description-of-android-text-operation-menu/</id>
  <published>2020-03-12T09:44:00.000Z</published>
  <updated>2020-03-12T09:44:00.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;img src=&quot;/posts/description-of-android-text-operation-menu/images/2154861611.png&quot; alt=&quot;1.png&quot; title=&quot;1.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
关于具体情况我已经发帖到了&lt;a href=&quot;https://club.huawei.com/thread-22993896-1-1.html&quot;&gt;花粉俱乐部&lt;/a&gt;&lt;br&gt;
经过一些简单的探究，第一个搜索可能是安卓或者华为系统自身内嵌的一个搜索，之后第二个搜索为华为自带浏览器的搜索，当存在华为浏览器的时候第一个搜索默认指向为华为浏览器。&lt;br&gt;
现象还原：在设置-应用里面把华为浏览器给禁用了，那么第二个搜索就会消失，第一个搜索回提示你要你选择默认打开的软件。&lt;br&gt;
实现原理：见简书社区&lt;a href=&quot;https://jianshu.com/p/89970f098012&quot;&gt;简名的文章&lt;/a&gt;&lt;br&gt;
后续也有可能按照他的方式去做一些软件，学习一下这个，希望这个刚挖的坑不要太大(ฅ´ω`ฅ)&lt;br&gt;
然后了解到还有一些其他鬼软件为了流量或者为了方便快捷等因素会把其跳转插入到这个长按的位置上，比如网易新闻，新浪新闻，并且没有关闭的位置&lt;br&gt;
建议华为系统能够增加长按文本操作菜单的管理设置&lt;/p&gt;</summary>
</entry>
<entry>
  <title>你好，世界！ (Hexo)</title>
  <link href="https://www.ioioi.cn/posts/hello-world-hexo/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/hello-world-hexo/</id>
  <published>2020-03-12T07:08:00.000Z</published>
  <updated>2020-03-12T07:08:00.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;img src=&quot;/posts/hello-world-hexo/images/149751946.png&quot; alt=&quot;Hello-World.png&quot; title=&quot;Hello-World.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
开始从Typecho转到Hexo，文章会逐步迁移过来的&lt;/p&gt;
&lt;p&gt;现在又用回去了 2020-12-06&lt;/p&gt;</summary>
</entry>
<entry>
  <title>关于生成手写字体</title>
  <link href="https://www.ioioi.cn/posts/about-generating-handwriting-fonts/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/about-generating-handwriting-fonts/</id>
  <published>2020-03-10T07:25:45.000Z</published>
  <updated>2020-03-10T07:25:45.000Z</updated>
  <summary type="html">&lt;p&gt;网站&lt;br&gt;
&lt;a href=&quot;http://flexifont.com/&quot;&gt;http://flexifont.com/&lt;/a&gt;&lt;br&gt;
其配置为&lt;br&gt;
Apache/2.2.21 (Win64) PHP/5.3.8 mod_wsgi/3.5 Python/2.7.6&lt;/p&gt;
&lt;p&gt;做个记录&lt;br&gt;
手写字体生成&lt;br&gt;
基于GAN的字体风格迁移&lt;/p&gt;
&lt;p&gt;风格迁移在图像应用&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/LDOUBLEV/style_transfer-perceptual_loss&quot;&gt;https://github.com/LDOUBLEV/style_transfer-perceptual_loss&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;基于风格迁移的手写字体生成&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.dataguru.cn/article-11281-1.html&quot;&gt;http://www.dataguru.cn/article-11281-1.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;论文：&lt;a href=&quot;http://www.doc88.com/p-8058499366708.html&quot;&gt;http://www.doc88.com/p-8058499366708.html&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>关于暂停AS-Kotlin学习的说明</title>
  <link href="https://www.ioioi.cn/posts/notes-on-suspending-as-kotlin-learning/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/notes-on-suspending-as-kotlin-learning/</id>
  <published>2020-03-10T05:41:09.000Z</published>
  <updated>2020-03-10T05:41:09.000Z</updated>
  <summary type="html">&lt;p&gt;暂停AS-Kotlin学习，改为Java&lt;br&gt;
理由：网络上面好多程序都是由Java写成的，方便初学者参考，而Kotlin属于新的东西。给予的参考类型太少，对初学者不友好，所以转为学习Java，如果等熟练的话再转学Kotlin吧&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Android目标一：XML输出 （正在进行中）</title>
  <link href="https://www.ioioi.cn/posts/android-target-1-xm-x-l-output/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/android-target-1-xm-x-l-output/</id>
  <published>2020-03-07T16:36:00.000Z</published>
  <updated>2020-03-07T16:36:00.000Z</updated>
  <summary type="html">&lt;p&gt;创建空白Hello World项目&lt;br&gt;
进入&lt;code&gt;res/layout/activity_main.xml&lt;/code&gt;&lt;br&gt;
可以看见&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;androidx.constraintlayout.widget.ConstraintLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    xmlns:tools=&quot;http://schemas.android.com/tools&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    android:layout_width=&quot;match_parent&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    android:layout_height=&quot;match_parent&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    tools:context=&quot;.MainActivity&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    &amp;#x3C;TextView&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        android:layout_width=&quot;wrap_content&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        android:layout_height=&quot;wrap_content&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        android:text=&quot;Hello World!&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        app:layout_constraintBottom_toBottomOf=&quot;parent&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        app:layout_constraintLeft_toLeftOf=&quot;parent&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        app:layout_constraintRight_toRightOf=&quot;parent&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        app:layout_constraintTop_toTopOf=&quot;parent&quot; /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;/androidx.constraintlayout.widget.ConstraintLayout&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;其中不谈上面一部分&lt;br&gt;
看下面一部分&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;android:layout_width=&quot;wrap_content&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;这个为文字宽度随文本长度变化二变化&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;android:layout_height=&quot;wrap_content&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;同理这个也是&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;android:text=&quot;Hello World!&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;这个就是显示内容&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;app:layout_constraintBottom_toBottomOf=&quot;parent&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;app:layout_constraintLeft_toLeftOf=&quot;parent&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;app:layout_constraintRight_toRightOf=&quot;parent&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;app:layout_constraintTop_toTopOf=&quot;parent&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;这个就应该是定位显示内容，都为继承父配置&lt;/p&gt;
&lt;p&gt;当你试着去重新手动设置一个的时候会显示&lt;br&gt;
&lt;img src=&quot;/posts/android-target-1-xm-x-l-output/images/523066069.png&quot; alt=&quot;Wrong.png&quot; title=&quot;Wrong.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
会提示&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;This view is not constrained. It only has designtime positions, so it will jump to (0,0) at runtime unless you add the constraints  The layout editor allows you to place widgets anywhere on the canvas, and it records the current position with designtime attributes (such as layout_editor_absoluteX). These attributes are not applied at runtime, so if you push your layout on a device, the widgets may appear in a different location than shown in the editor. To fix this, make sure a widget has both horizontal and vertical constraints by dragging from the edge connections.  Issue id: MissingConstraints&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;此视图不受约束。它只有设计时位置，因此它将在运行时跳转到（0,0），除非您添加约束，否则布局编辑器允许您将小部件放置在画布上的任何位置，并且它使用设计时属性（例如布局编辑器绝对值）记录当前位置。这些属性在运行时不应用，因此如果您在设备上推送布局，小部件可能会出现在与编辑器中显示的位置不同的位置。要解决此问题，请通过从边缘连接拖动来确保小部件同时具有水平和垂直约束。问题id:缺少约束&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Hardcoded string &quot;test&quot;, should use @string resource  Hardcoding text attributes directly in layout files is bad for several reasons:  * When creating configuration variations (for example for landscape or portrait) you have to repeat the actual text (and keep it up to date when making changes)  * The application cannot be translated to other languages by just adding new translations for existing string resources.  There are quickfixes to automatically extract this hardcoded string into a resource lookup.  Issue id: HardcodedText&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;硬编码字符串“test”，应该在布局文件中直接使用@string资源硬编码文本属性有几个原因：*创建配置变体（例如横向或纵向）时，必须重复实际文本（并在进行更改时保持最新）*仅添加新的现有字符串资源的翻译。有一些快速修复程序可以自动将此硬编码字符串提取到资源查找中。问题id:HardcodedText&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/posts/android-target-1-xm-x-l-output/images/4089026178.png&quot; alt=&quot;fix_it.png&quot; title=&quot;fix_it.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
对于下面这个我们点fix it&lt;br&gt;
&lt;img src=&quot;/posts/android-target-1-xm-x-l-output/images/787183694.png&quot; alt=&quot;Fix_it_1.png&quot; title=&quot;Fix_it_1.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
则会添加值到&lt;code&gt;res/value/strings&lt;/code&gt;里面去&lt;br&gt;
&lt;img src=&quot;/posts/android-target-1-xm-x-l-output/images/1792244045.png&quot; alt=&quot;res_strings.png&quot; title=&quot;res_strings.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
&lt;img src=&quot;/posts/android-target-1-xm-x-l-output/images/2685016923.png&quot; alt=&quot;strings_main.png&quot; title=&quot;strings_main.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
添加约束&lt;br&gt;
本来不会的不过幸好AS提供图形界面可以直接拖动，真的对初学者很友好&lt;br&gt;
那么我们就知道了它的道理&lt;br&gt;
以左上角为原点，往右下增到&lt;br&gt;
&lt;img src=&quot;/posts/android-target-1-xm-x-l-output/images/241803495.png&quot; alt=&quot;lefttop_00.png&quot; title=&quot;lefttop_00.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
&lt;img src=&quot;/posts/android-target-1-xm-x-l-output/images/2678443670.png&quot; alt=&quot;rightbottom_11.png&quot; title=&quot;rightbottom_11.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;app:layout_constraintHorizontal_bias=&quot;1.0&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;这个可以说为X轴当到最右边就为1.0&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;app:layout_constraintVertical_bias=&quot;0.0&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;这个就可以说是Y轴到最下边就是1.0&lt;br&gt;
&lt;img src=&quot;/posts/android-target-1-xm-x-l-output/images/169550858.png&quot; alt=&quot;Vertical.png&quot; title=&quot;Vertical.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;android:layout_marginStart=&quot;84dp&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;MarginStart指的是控件距离开头View部分的间距大小&lt;br&gt;
我们在写layout布局的时候，我们会发现有这样几个比较相似的属性：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;MarginStart   MarginLeft&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;MarginEnd    MarginRight&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;这些属性的区别是什么? 根据api注释，我们得知MarginStart指的是控件距离开头View部分的间距大小，MarginLeft则指的是控件距离左边View部分的间距大小，MarginEnd和MarginRight同理。&lt;/p&gt;
&lt;p&gt;一般情况下，View开始部分就是左边，但是有的语言目前为止还是按照从右往左的顺序来书写的，例如阿拉伯语，在Android 4.2系统之后，Google在Android中引入了RTL布局，更好了支持了由右到左文字布局的显示，为了更好的兼容RTL布局，google推荐使用MarginStart和MarginEnd来替代MarginLeft和MarginRight，这样应用可以在正常的屏幕和由右到左显示文字的屏幕上都保持一致的用户体验。&lt;/p&gt;</summary>
</entry>
<entry>
  <title>准备开始新篇章 -- Android Studio</title>
  <link href="https://www.ioioi.cn/posts/ready-to-start-a-new-chapter-android-studio/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/ready-to-start-a-new-chapter-android-studio/</id>
  <published>2020-03-07T16:33:00.000Z</published>
  <updated>2020-03-07T16:33:00.000Z</updated>
  <summary type="html">&lt;p&gt;准备开始新篇章 — Android Studio&lt;br&gt;
近日想做做安卓App&lt;br&gt;
语言选择&lt;del&gt;Kotlin&lt;/del&gt;Java&lt;/p&gt;
&lt;p&gt;目标&lt;br&gt;
&lt;em&gt;&lt;strong&gt;总. 制作一个能够调用“今日诗词”API的软件，数据示例如下&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
&lt;img src=&quot;/posts/ready-to-start-a-new-chapter-android-studio/images/236950810.png&quot; alt=&quot;JINRISHICI_API.png&quot; title=&quot;JINRISHICI_API.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;{&quot;status&quot;:&quot;success&quot;,&quot;data&quot;:{&quot;id&quot;:&quot;5b8b9572e116fb3714e6fba1&quot;,&quot;content&quot;:&quot;谁家玉笛暗飞声，散入春风满洛城。&quot;,&quot;popularity&quot;:607000,&quot;origin&quot;:{&quot;title&quot;:&quot;春夜洛城闻笛 / 春夜洛阳城闻笛&quot;,&quot;dynasty&quot;:&quot;唐代&quot;,&quot;author&quot;:&quot;李白&quot;,&quot;content&quot;:[&quot;谁家玉笛暗飞声，散入春风满洛城。&quot;,&quot;此夜曲中闻折柳，何人不起故园情。&quot;],&quot;translate&quot;:[&quot;是谁家精美的笛子暗暗地发出悠扬的笛声。随着春风飘扬，传遍洛阳全城。&quot;,&quot;就在今夜的曲中，听到故乡的《折杨柳》，哪个人的思乡之情不会因此而油然而生呢？&quot;]},&quot;matchTags&quot;:[&quot;春&quot;,&quot;风&quot;],&quot;recommendedReason&quot;:&quot;&quot;,&quot;cacheAt&quot;:&quot;2020-03-08T00:28:56.013294&quot;},&quot;token&quot;:&quot;Uz2/+bh5Dt+n7INLEr/iYzpclPxy7Rzg&quot;,&quot;ipAddress&quot;:&quot;27.18.69.224&quot;,&quot;warning&quot;:null}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;1. 完成Hello World项目，研究输出TextView&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
开始时间：2020/03/07&lt;br&gt;
结束时间：？？？&lt;br&gt;
[post cid=“107” /]&lt;br&gt;
&lt;em&gt;&lt;strong&gt;2. 列表项目&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
&lt;em&gt;&lt;strong&gt;3. 列表项目&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>WSL修改默认用户</title>
  <link href="https://www.ioioi.cn/posts/wsl-modify-default-user/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/wsl-modify-default-user/</id>
  <published>2020-03-06T08:52:00.000Z</published>
  <updated>2020-03-06T08:52:00.000Z</updated>
  <summary type="html">&lt;p&gt;以管理员的方式打开PowerShell或者cmd&lt;br&gt;
①：如果你是在Microsoft Store里面安装的，则切换到&lt;code&gt;C:\Users\Kylin\AppData\Local\Microsoft\WindowsApps&lt;/code&gt;目录下&lt;br&gt;
②：如果你是在GitHub等其他位置通过源码安装的请切换到你的源码目录&lt;/p&gt;
&lt;p&gt;注：一下fedoraremix可以更换为ubuntu、debian等已安装的发行版&lt;/p&gt;
&lt;p&gt;输入下面这个查看帮助&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;./fedoraremix --help&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/posts/wsl-modify-default-user/images/2880367971.png&quot; alt=&quot;WSL_help.png&quot; title=&quot;WSL_help.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
由于用Microsoft Store安装的已经预先设置好了环境变量所以可以不加&lt;code&gt;./&lt;/code&gt;&lt;br&gt;
输入下面这个修改默认用户&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;fedoraremix config  --default-user root&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/posts/wsl-modify-default-user/images/3130720226.png&quot; alt=&quot;WSL_Change_User.png&quot; title=&quot;WSL_Change_User.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>你喝的水 --水的三相点</title>
  <link href="https://www.ioioi.cn/posts/the-water-you-drink-the-threephase-point-of-water/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/the-water-you-drink-the-threephase-point-of-water/</id>
  <published>2020-03-05T07:52:00.000Z</published>
  <updated>2020-03-05T07:52:00.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;img src=&quot;/posts/the-water-you-drink-the-threephase-point-of-water/images/33973034.png&quot; alt=&quot;QQ截图20200217104621.png&quot; title=&quot;QQ截图20200217104621.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>如何一键删除微博</title>
  <link href="https://www.ioioi.cn/posts/how-to-delete-weibo-with-one-click/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/how-to-delete-weibo-with-one-click/</id>
  <published>2020-03-01T13:21:51.000Z</published>
  <updated>2020-03-01T13:21:51.000Z</updated>
  <summary type="html">&lt;p&gt;浏览器代码&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;// ==UserScript==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;// @name Weibored.js&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;// @namespace http://vito.sdf.org&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;// @version 0.1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;// @description 删除所有微博&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;// @author Vito Van&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;// @match http://weibo.com/p/*&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;// @grant none&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;// ==/UserScript==&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&apos;use strict&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;var s = document.createElement(&quot;script&quot;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;s.setAttribute(&quot;src&quot;,&quot;https://lib.sinaapp.com/js/jquery/2.0.3/jquery-2.0.3.min.js &quot;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;s.onload = function(){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;for(var i=0;i&amp;#x3C;100;i++){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;setTimeout(function(){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;$(&apos;a[action-type=&quot;fl_menu&quot;]&apos;)[0].click();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;$(&apos;a[title=&quot;删除此条微博&quot;]&apos;)[0].click();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;$(&apos;a[action-type=&quot;ok&quot;]&apos;)[0].click();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;},1000*i);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;document.head.appendChild(s);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;网络收集，侵权联系删除&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Windows Server 2012 将我的电脑放到桌面</title>
  <link href="https://www.ioioi.cn/posts/windows-server-2012-putting-my-computer-on-the-desktop/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/windows-server-2012-putting-my-computer-on-the-desktop/</id>
  <published>2020-02-25T23:34:44.000Z</published>
  <updated>2020-02-25T23:34:44.000Z</updated>
  <summary type="html">&lt;p&gt;WIN+R&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,0&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>Caddy_V2 Websocket说明</title>
  <link href="https://www.ioioi.cn/posts/caddy-v2-websocket-description/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/caddy-v2-websocket-description/</id>
  <published>2020-02-17T15:29:25.000Z</published>
  <updated>2020-02-17T15:29:25.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;a href=&quot;https://caddy.community/t/unrecognized-subdirective-websocket/6493&quot;&gt;https://caddy.community/t/unrecognized-subdirective-websocket/6493&lt;/a&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;header_up Connection {http.request.header.Connection}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;header_up Upgrade {http.request.header.Upgrade}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In v2, you do not need to do anything to enable websockets.&lt;br&gt;
Websockets should work with v2’s reverse proxy by default.&lt;/p&gt;</summary>
</entry>
<entry>
  <title>树莓派更改IP地址为静态地址 --测试版</title>
  <link href="https://www.ioioi.cn/posts/raspberry-pie-change-ip-address-to-static-address/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/raspberry-pie-change-ip-address-to-static-address/</id>
  <published>2020-02-13T13:54:00.000Z</published>
  <updated>2020-02-13T13:54:00.000Z</updated>
  <summary type="html">&lt;p&gt;树莓派更改IP地址为静态地址，方便端口映射&lt;/p&gt;
&lt;p&gt;首先，官方镜像的树莓派是基于Debian系统，所以命令会宇它有类似&lt;br&gt;
&lt;img src=&quot;/posts/raspberry-pie-change-ip-address-to-static-address/images/4179216666.png&quot; alt=&quot;pi_debian.png&quot; title=&quot;pi_debian.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;那么更改IP也是一样&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;注意：未经过测试可能出现连不上网的情况&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
恢复方法&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo rm -rf /etc/dhcpcd.conf&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo cp /etc/dhcpcd.conf.bak /etc/dhcpcd.conf&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;systemctl restart dhcpcd&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;p&gt;一：明确网络连接方式，及网卡名称&lt;br&gt;
如通过网线连接会出现eth0网卡或ens0网卡&lt;br&gt;
WiFi连接则出现wlan0等&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ifconfig&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;如果提示&lt;code&gt;command not found&lt;/code&gt;则需要安装&lt;code&gt;net-tools&lt;/code&gt;包&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo apt-get install net-tools -y&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/posts/raspberry-pie-change-ip-address-to-static-address/images/572305467.png&quot; alt=&quot;pi_ifconfig.png&quot; title=&quot;pi_ifconfig.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
第一个为Docker虚拟网卡不管&lt;br&gt;
第二个则为真实网卡&lt;br&gt;
二：修改配置&lt;br&gt;
复制来备份配置文件&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo cp /etc/dhcpcd.conf /etc/dhcpcd.conf.bak&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo nano /etc/dhcpcd.conf&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;如果提示&lt;code&gt;command not found&lt;/code&gt;则需要安装&lt;code&gt;nano&lt;/code&gt;包,当然你也可以用vi或者vim&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo apt-get install nano -y&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/posts/raspberry-pie-change-ip-address-to-static-address/images/605966583.png&quot; alt=&quot;pi_dhcpcd.png&quot; title=&quot;pi_dhcpcd.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
再末尾添加配置&lt;br&gt;
请勿直接复制&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;interface eth0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;static ip_address=192.168.0.10/24    &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;static routers=192.168.0.1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;static domain_name_servers=192.168.0.1 8.8.8.8&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;或者&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;interface wlan0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;static ip_address=192.168.0.10/24    &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;static routers=192.168.0.1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;static domain_name_servers=192.168.0.1 8.8.8.8&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;eth0或wlan0为你真实网卡的名称&lt;br&gt;
ip_address就是静态IP , 后面要接/24 , 最好往后设一点&lt;br&gt;
routers是网关&lt;br&gt;
static domain_name_servers是DNS&lt;br&gt;
Ctrl+o 回车保存 Ctrl+x退出编辑，当然你用vi或者vim也可以&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;systemctl restart dhcpcd&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;重启dhcpcd网络&lt;br&gt;
三：登录路由器查看IP地址&lt;/p&gt;</summary>
</entry>
<entry>
  <title>PHP编译选项--with和--enable的区别</title>
  <link href="https://www.ioioi.cn/posts/the-difference-between-php-compile-options-with-and-enable/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/the-difference-between-php-compile-options-with-and-enable/</id>
  <published>2020-02-02T07:05:39.000Z</published>
  <updated>2020-02-02T07:05:39.000Z</updated>
  <summary type="html">&lt;p&gt;enable多代表不依赖外部库便可以直接编译&lt;br&gt;
with大多需要依赖于第三方的lib&lt;/p&gt;</summary>
</entry>
<entry>
  <title>&quot;/usr/share/cracklib/pw_dict.pwd: No such file or directory&quot;解决方法</title>
  <link href="https://www.ioioi.cn/posts/usr-share-cracklib-pwdictpwd-no-such-file-or-directory-solution/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/usr-share-cracklib-pwdictpwd-no-such-file-or-directory-solution/</id>
  <published>2020-02-01T07:52:55.000Z</published>
  <updated>2020-02-01T07:52:55.000Z</updated>
  <summary type="html">&lt;p&gt;在Linux下修改用户密码&lt;/p&gt;
&lt;p&gt;1.直接运行  passwd 用户名,输入新密码，再确认一遍，重启生效&lt;/p&gt;
&lt;p&gt;2.如果出现以下错误：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;/usr/share/cracklib/pw_dict.pwd: No such file or directory&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;原因是缺少cracklib库&lt;/p&gt;
&lt;p&gt;解决办法：安装cracklib-dicts&lt;/p&gt;
&lt;p&gt;Fedora&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;dnf -y install cracklib-dicts&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>Docker内安装Mysql/Mariadb提示&quot;服务器和客户端上指示的 HTTPS 之间不匹配&quot;解决方案</title>
  <link href="https://www.ioioi.cn/posts/when-installing-mysql-mariadb-in-docker-the-solution-of-mismatch-between-https-indicated-on-server-and-client-will-be-prompted/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/when-installing-mysql-mariadb-in-docker-the-solution-of-mismatch-between-https-indicated-on-server-and-client-will-be-prompted/</id>
  <published>2020-01-30T05:05:36.000Z</published>
  <updated>2020-01-30T05:05:36.000Z</updated>
  <summary type="html">&lt;p&gt;使用docker安装phpmyadmin，启动成功登录，出现提示：服务器和客户端上指示的 HTTPS 之间不匹配。这可能导致 phpMyAdmin 无法正常工作或存在安全风险。请修复您的服务器配置以正确指示 HTTPS。&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/when-installing-mysql-mariadb-in-docker-the-solution-of-mismatch-between-https-indicated-on-server-and-client-will-be-prompted/images/3910143791.png&quot; alt=&quot;phpmyadmin_ssl.png&quot; title=&quot;phpmyadmin_ssl.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;以前phpmyadmin是直接安装在nginx里的，没有这个问题。现在用caddy做为代理。外部访问使用https，内部用http。&lt;/p&gt;
&lt;p&gt;解决方法是修改参数：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;$cfg[&apos;PmaAbsoluteUri&apos;] = &apos;https://pma.xxx.com&apos;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;或者&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;在docker中启动，可以在启动时指定环境参数（该参数在官方文档里没有但是有效）：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;-e PMA_ABSOLUTE_URI=https://pma.xxx.com&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>阿里云运维编排实用配置</title>
  <link href="https://www.ioioi.cn/posts/alibaba-cloud-operation-and-maintenance-choreography-practical-configuration/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/alibaba-cloud-operation-and-maintenance-choreography-practical-configuration/</id>
  <published>2020-01-28T11:49:00.000Z</published>
  <updated>2020-01-28T11:49:00.000Z</updated>
  <summary type="html">&lt;p&gt;当你使用便宜的的竞价云服务器时，肯定会担心数据问题那么，一下就可以帮你解决问题。&lt;br&gt;
具体为：定时任务-关机-创建镜像-恢复镜像-开机-邮件提醒&lt;br&gt;
后续可能会更新&lt;br&gt;
请关注我的Github：&lt;a href=&quot;https://github.com/arkylin/Aliyun_OOS_Backup_ECS&quot;&gt;https://github.com/arkylin/Aliyun_OOS_Backup_ECS&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;此文未经本人允许，禁止转载！&lt;/strong&gt;&lt;br&gt;
框架如下&lt;br&gt;
&lt;img src=&quot;/posts/alibaba-cloud-operation-and-maintenance-choreography-practical-configuration/images/2631930719.png&quot; alt=&quot;Aliyun-OOS-view.png&quot; title=&quot;Aliyun-OOS-view.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;FormatVersion: OOS-2019-06-01&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Description:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  en: Regularly create ECS images.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  zh-cn: 定时创建ECS镜像。&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  name-en: Regularly-create-ECS-images&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  name-zh-cn: 定时创建ECS镜像&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Parameters:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  targets:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Type: Json&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    AssociationProperty: Targets&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    AssociationPropertyMetadata:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      ResourceType: &apos;ALIYUN::ECS::Instance&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  instanceId:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Description:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      en: The ID of ECS instance.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      zh-cn: ECS实例ID。&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Type: String&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  Imagesbasic:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Description:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      en: The ID of Imagees.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      zh-cn: 基本镜像ID。&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Type: String&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  cron:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Description:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      en: &apos;The cron expression, refer them here: https://www.alibabacloud.com/help/zh/faq-detail/64769.htm. The minimum interval is one minute.&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      zh-cn: &apos;cron表达式，详情参考：https://www.alibabacloud.com/help/zh/faq-detail/64769.htm&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Type: String&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    AssociationProperty: Cron&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Default: 0 0 12 ? * *&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  endDate:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Description:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      en: &apos;The end date of time trigger. Format: yyyy-MM-ddThh:mm:ssZ.&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      zh-cn: &apos;时间触发器结束时间。格式：yyyy-MM-ddThh:mm:ssZ&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Type: String&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    AssociationProperty: DateTime&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    AssociationPropertyMetadata:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      Format: &apos;YYYY-MM-DDThh:mm:ssZ&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  rateControl:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Description:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      en: Concurrency ratio of task execution.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      zh-cn: 任务执行的并发比率。&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Type: Json&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    AssociationProperty: RateControl&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Default:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      Mode: Concurrency&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      MaxErrors: 0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      Concurrency: 10&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  OOSAssumeRole:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Description:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      en: The RAM role to be assumed by OOS.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      zh-cn: OOS扮演的RAM角色。&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Type: String&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Default: OOSServiceRole&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;RamRole: &apos;{{ OOSAssumeRole }}&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Tasks:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  - Name: timerTrigger&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Action: &apos;ACS::TimerTrigger&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Description:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      en: Triggers a task as scheduled by specifying Cron expression.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      zh-cn: 通过指定Cron表达式按计划触发任务。&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Properties:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      Type: cron&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      Expression: &apos;{{ cron }}&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      EndDate: &apos;{{ endDate }}&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  - Name: getInstance&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Description:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      en: Views the ECS instances.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      zh-cn: 获取ECS实例。&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Action: &apos;ACS::SelectTargets&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Properties:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      ResourceType: &apos;ALIYUN::ECS::Instance&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      Filters:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        - &apos;{{ targets }}&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Outputs:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      instanceIds:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        Type: List&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ValueSelector: &apos;Instances.Instance[].InstanceId&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  - Name: StopInstance&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Action: &apos;ACS::ECS::StopInstance&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Description: Stops an ECS instance.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Properties:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      instanceId: &apos;{{ ACS::TaskLoopItem }}&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    OnError: &apos;ACS::NEXT&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Loop:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      RateControl: &apos;{{ rateControl }}&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      Items: &apos;{{ getInstance.instanceIds }}&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  - Name: createImage&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Action: &apos;ACS::ECS::CreateImage&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Description:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      en: Create new image with the specified image name and instance ID.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      zh-cn: 通过指定实例ID和镜像名称创建新的镜像。&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Properties:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      instanceId: &apos;{{ ACS::TaskLoopItem }}&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      imageName: &apos;Auto_{{ ACS::ExecutionId }}_{{ ACS::TaskLoopItem }}&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Loop:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      Items: &apos;{{ getInstance.instanceIds }}&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      RateContral: &apos;{{ rateControl }}&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      Outputs:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        imageIds:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          AggregateType: &apos;Fn::ListJoin&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          AggregateField: imageId&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    OnError: ReplaceSystemDiskBasic&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Outputs:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      imageId:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ValueSelector: imageId&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        Type: String&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  - Name: ReplaceSystemDisk&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Action: &apos;ACS::ECS::ReplaceSystemDisk&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Description: Replaces the system disk of an ECS instance.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Properties:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      instanceId: &apos;{{ instanceId }}&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      imageId: &apos;{{ ACS::TaskLoopItem }}&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    OnError: ReplaceSystemDiskBasic&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    OnSuccess: NotifyByMailYES&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Loop:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      Items: &apos;{{ createImage.ImageIds }}&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      Outputs:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ImageIds:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          AggregateType: &apos;Fn::ListJoin&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          AggregateField: ImageId&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  - Name: ReplaceSystemDiskBasic&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Action: &apos;ACS::ECS::ReplaceSystemDisk&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Description: Replaces the system disk of an ECS instance.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    OnError: NotifyByMailNONO&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    OnSuccess: NotifyByMailNO&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Properties:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      instanceId: &apos;{{ instanceId }}&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      imageId: &apos;{{ Imagesbasic }}&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  - Name: NotifyByMailNONO&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Action: ACS::Notify&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Properties:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        NotifyType: Mail&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        Mail:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            Host: hwsmtp.exmail.qq.com&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            Port: 465&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            Username: notify@xyz.blue&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            Password: XXXXXXXXXXXXXXX&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            Subject: BIG Error Auto Images&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            Body: Unable return to Basic&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            From: notify@xyz.blue&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            To:  [123456789@qq.com,987654321@qq.com]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    OnSuccess: &apos;ACS::END&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    OnError: &apos;ACS::END&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  - Name: NotifyByMailNO&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Action: ACS::Notify&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Properties:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        NotifyType: Mail&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        Mail:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            Host: hwsmtp.exmail.qq.com&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            Port: 465&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            Username: notify@xyz.blue&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            Password: XXXXXXXXXXXXXXX&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            Subject: Error Auto Images&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            Body: Return to Basic&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            From: notify@xyz.blue&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            To:  [123456789@qq.com,987654321@qq.com]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    OnSuccess: &apos;ACS::END&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    OnError: &apos;ACS::END&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  - Name: NotifyByMailYES&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Action: ACS::Notify&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Properties:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        NotifyType: Mail&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        Mail:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            Host: hwsmtp.exmail.qq.com&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            Port: 465&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            Username: notify@xyz.blue&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            Password: XXXXXXXXXXXXXXX&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            Subject: YES Auto Images&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            Body: YES TO MAKE&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            From: notify@xyz.blue&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            To:  [123456789@qq.com,987654321@qq.com&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    OnSuccess: &apos;ACS::END&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    OnError: &apos;ACS::END&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Outputs:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  imageIds:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Type: List&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Value: &apos;{{ createImage.imageIds }}&apos;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>非交互式修改SSH密码</title>
  <link href="https://www.ioioi.cn/posts/non-interactive-ssh-password-modification/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/non-interactive-ssh-password-modification/</id>
  <published>2020-01-28T11:39:00.000Z</published>
  <updated>2020-01-28T11:39:00.000Z</updated>
  <summary type="html">&lt;p&gt;方式1：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;echo &quot;password&quot; | passwd testuser --stdin &gt; /dev/null 2&gt;&amp;#x26;1&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;方式2：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;echo testuser:password|chpasswd&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;在shell脚本和Dockerfile中请使用方式2&lt;/strong&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>阿里云Nas加密和非加密区别以及实机评测</title>
  <link href="https://www.ioioi.cn/posts/alibaba-cloud-nas-encryption-and-non-encryption-differences-and-real-machine-evaluation/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/alibaba-cloud-nas-encryption-and-non-encryption-differences-and-real-machine-evaluation/</id>
  <published>2020-01-28T09:27:00.000Z</published>
  <updated>2020-01-28T09:27:00.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;em&gt;什么是文件存储NAS&lt;/em&gt;&lt;br&gt;
阿里云文件存储（Network Attached Storage，简称 NAS）是面向阿里云 ECS 实例、E-HPC 和容器服务等计算节点的文件存储服务。&lt;/p&gt;
&lt;p&gt;定义&lt;br&gt;
阿里云文件存储 NAS 是一个可共享访问、弹性扩展、高可靠以及高性能的分布式文件系统。它基于 POSIX 文件接口，天然适配原生操作系统，提供共享访问，同时保证数据一致性和锁互斥。&lt;/p&gt;
&lt;p&gt;NAS 提供了简单的可扩展文件存储以供与 ECS 配合使用，多个ECS实例可以同时访问 NAS 文件系统，并且存储容量会随着您添加和删除文件而自动弹性增长和收缩，为在多个实例或服务器上运行的工作负载和应用程序提供通用数据源。&lt;/p&gt;
&lt;p&gt;NAS 支持丰富的应用场景，详情请参见应用场景。&lt;/p&gt;
&lt;p&gt;NAS 提供了容量型、性能型以及极速型存储类型，更多详情请参见存储类型。&lt;/p&gt;
&lt;p&gt;产品优势&lt;br&gt;
NAS 在成本、安全、简单、可靠性以及性能上都具有自身的优势。&lt;/p&gt;
&lt;p&gt;成本&lt;br&gt;
一个 NAS 文件系统可以同时挂载到多个计算节点上，由这些节点共享访问，从而节约大量拷贝与同步成本。&lt;br&gt;
单个 NAS 文件系统的性能能够随存储容量线性扩展，使用户无需购买高端的文件存储设备，大幅降低硬件成本。&lt;br&gt;
使用 NAS文件存储，您只需为文件系统使用的存储空间付费，不需要提前配置存储，并且不存在最低费用或设置费用。更多详情，请参见计量项和计费说明。&lt;br&gt;
NAS 的高可靠性能够降低数据安全风险，从而大幅节约维护成本。&lt;br&gt;
简单&lt;br&gt;
一键创建文件系统，无需部署维护文件系统。&lt;/p&gt;
&lt;p&gt;安全&lt;br&gt;
基于 RAM 实现的资源访问控制，基于VPC实现的网络访问隔离，结合文件存储 NAS 的传输加密与存储加密特性，保障数据不被窃取或篡改。&lt;/p&gt;
&lt;p&gt;高可靠性&lt;br&gt;
NAS 提供 99.999999999% 的数据可靠性，能够有效降低数据安全风险。&lt;/p&gt;
&lt;p&gt;高性能&lt;br&gt;
基于分布式架构文件系统，随着容量的增长性能线性扩展，提供远高于传统存储的性能。&lt;/p&gt;
&lt;p&gt;兼容性&lt;br&gt;
NAS 文件存储提供良好的协议兼容性，支持 NFS 和 SMB 协议方案，兼容POSIX 文件系统访问语义，提供强大的数据一致性和文件锁定。&lt;br&gt;
在 NAS 中，任何文件修改成功后，用户都能够立刻看到修改结果，便于用户实时修改存储内容。&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/posts/alibaba-cloud-nas-encryption-and-non-encryption-differences-and-real-machine-evaluation/images/1700901397.png&quot; alt=&quot;Aliyun_Nas.png&quot; title=&quot;Aliyun_Nas.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;test1为加密，test2为非加密&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;test1 随机读IOPS设置&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[root@super /]# fio -numjobs=1 -iodepth=128 -direct=1 -ioengine=libaio -sync=1 -rw=randread -bs=4K -size=1G -time_based -runtime=60 -name=Fio -directory=/test1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Fio: (g=0): rw=randread, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=128&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;fio-3.17&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Starting 1 process&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Fio: Laying out IO file (1 file / 1024MiB)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Jobs: 1 (f=1): [r(1)][100.0%][r=97.8MiB/s][r=25.0k IOPS][eta 00m:00s]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Fio: (groupid=0, jobs=1): err= 0: pid=1482: Mon Jan 27 23:33:22 2020&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  read: IOPS=24.1k, BW=94.3MiB/s (98.9MB/s)(5659MiB/60006msec)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    slat (nsec): min=1871, max=4225.7k, avg=8454.96, stdev=17814.51&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    clat (usec): min=1150, max=66695, avg=5291.30, stdev=1830.86&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     lat (usec): min=1157, max=66711, avg=5299.96, stdev=1830.83&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    clat percentiles (usec):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     |  1.00th=[ 2409],  5.00th=[ 2933], 10.00th=[ 3294], 20.00th=[ 3785],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 30.00th=[ 4228], 40.00th=[ 4621], 50.00th=[ 5080], 60.00th=[ 5473],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 70.00th=[ 5997], 80.00th=[ 6587], 90.00th=[ 7504], 95.00th=[ 8455],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 99.00th=[10683], 99.50th=[11994], 99.90th=[17171], 99.95th=[19268],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 99.99th=[35914]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   bw (  KiB/s): min=87160, max=104926, per=99.98%, avg=96554.23, stdev=3373.87, samples=120&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   iops        : min=21790, max=26231, avg=24138.51, stdev=843.44, samples=120&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  lat (msec)   : 2=0.13%, 4=24.57%, 10=73.71%, 20=1.56%, 50=0.03%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  lat (msec)   : 100=0.01%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  cpu          : usr=5.74%, sys=15.74%, ctx=800135, majf=0, minf=137&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  IO depths    : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, &gt;=64=100.0%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &gt;=64=0.0%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &gt;=64=0.1%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     issued rwts: total=1448757,0,0,0 short=0,0,0,0 dropped=0,0,0,0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     latency   : target=0, window=0, percentile=100.00%, depth=128&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Run status group 0 (all jobs):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   READ: bw=94.3MiB/s (98.9MB/s), 94.3MiB/s-94.3MiB/s (98.9MB/s-98.9MB/s), io=5659MiB (5934MB), run=60006-60006msec&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;test2不 随机读IOPS设置&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[root@super /]# fio -numjobs=1 -iodepth=128 -direct=1 -ioengine=libaio -sync=1 -rw=randread -bs=4K -size=1G -time_based -runtime=60 -name=Fio -directory=/test2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Fio: (g=0): rw=randread, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=128&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;fio-3.17&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Starting 1 process&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Fio: Laying out IO file (1 file / 1024MiB)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Jobs: 1 (f=1): [r(1)][100.0%][r=104MiB/s][r=26.5k IOPS][eta 00m:00s] &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Fio: (groupid=0, jobs=1): err= 0: pid=1494: Mon Jan 27 23:35:30 2020&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  read: IOPS=25.7k, BW=100MiB/s (105MB/s)(6023MiB/60005msec)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    slat (nsec): min=1848, max=1328.1k, avg=8603.01, stdev=21240.04&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    clat (usec): min=1126, max=152365, avg=4971.28, stdev=2067.07&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     lat (usec): min=1132, max=152368, avg=4980.10, stdev=2067.06&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    clat percentiles (usec):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     |  1.00th=[ 2245],  5.00th=[ 2671], 10.00th=[ 2999], 20.00th=[ 3458],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 30.00th=[ 3884], 40.00th=[ 4293], 50.00th=[ 4752], 60.00th=[ 5145],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 70.00th=[ 5669], 80.00th=[ 6259], 90.00th=[ 7111], 95.00th=[ 7963],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 99.00th=[10290], 99.50th=[11731], 99.90th=[17957], 99.95th=[22676],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 99.99th=[40633]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   bw (  KiB/s): min=86856, max=111976, per=99.98%, avg=102751.36, stdev=3685.76, samples=120&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   iops        : min=21714, max=27994, avg=25687.74, stdev=921.31, samples=120&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  lat (msec)   : 2=0.28%, 4=32.38%, 10=66.15%, 20=1.11%, 50=0.06%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  lat (msec)   : 100=0.01%, 250=0.01%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  cpu          : usr=5.96%, sys=15.47%, ctx=789134, majf=0, minf=138&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  IO depths    : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, &gt;=64=100.0%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &gt;=64=0.0%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &gt;=64=0.1%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     issued rwts: total=1541761,0,0,0 short=0,0,0,0 dropped=0,0,0,0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     latency   : target=0, window=0, percentile=100.00%, depth=128&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Run status group 0 (all jobs):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   READ: bw=100MiB/s (105MB/s), 100MiB/s-100MiB/s (105MB/s-105MB/s), io=6023MiB (6315MB), run=60005-60005msec&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;test1随机写IOPS设置&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[root@super /]# fio -numjobs=1 -iodepth=128 -direct=1 -ioengine=libaio -sync=1 -rw=randwrite -bs=4K -size=1G -time_based -runtime=60 -name=Fio -directory=/test1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Fio: (g=0): rw=randwrite, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=128&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;fio-3.17&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Starting 1 process&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Jobs: 1 (f=1): [w(1)][100.0%][w=75.7MiB/s][w=19.4k IOPS][eta 00m:00s]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Fio: (groupid=0, jobs=1): err= 0: pid=1498: Mon Jan 27 23:37:40 2020&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  write: IOPS=18.2k, BW=71.2MiB/s (74.7MB/s)(4282MiB/60113msec); 0 zone resets&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    slat (usec): min=2, max=616, avg= 7.55, stdev= 6.92&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    clat (msec): min=2, max=232, avg= 7.01, stdev= 7.15&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     lat (msec): min=2, max=232, avg= 7.02, stdev= 7.15&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    clat percentiles (msec):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     |  1.00th=[    4],  5.00th=[    4], 10.00th=[    5], 20.00th=[    5],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 30.00th=[    5], 40.00th=[    6], 50.00th=[    6], 60.00th=[    7],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 70.00th=[    7], 80.00th=[    8], 90.00th=[   10], 95.00th=[   12],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 99.00th=[   36], 99.50th=[   47], 99.90th=[  116], 99.95th=[  140],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 99.99th=[  197]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   bw (  KiB/s): min=48336, max=85600, per=100.00%, avg=73062.90, stdev=7091.42, samples=120&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   iops        : min=12084, max=21400, avg=18265.67, stdev=1772.83, samples=120&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  lat (msec)   : 4=9.40%, 10=82.41%, 20=6.18%, 50=1.56%, 100=0.30%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  lat (msec)   : 250=0.14%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  cpu          : usr=5.55%, sys=14.95%, ctx=735321, majf=0, minf=10&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  IO depths    : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, &gt;=64=100.0%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &gt;=64=0.0%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &gt;=64=0.1%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     issued rwts: total=0,1096310,0,0 short=0,0,0,0 dropped=0,0,0,0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     latency   : target=0, window=0, percentile=100.00%, depth=128&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Run status group 0 (all jobs):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  WRITE: bw=71.2MiB/s (74.7MB/s), 71.2MiB/s-71.2MiB/s (74.7MB/s-74.7MB/s), io=4282MiB (4490MB), run=60113-60113msec&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;test2随机写IOPS设置&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[root@super /]# fio -numjobs=1 -iodepth=128 -direct=1 -ioengine=libaio -sync=1 -rw=randwrite -bs=4K -size=1G -time_based -runtime=60 -name=Fio -directory=/test2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Fio: (g=0): rw=randwrite, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=128&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;fio-3.17&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Starting 1 process&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Jobs: 1 (f=1): [w(1)][100.0%][w=79.6MiB/s][w=20.4k IOPS][eta 00m:00s]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Fio: (groupid=0, jobs=1): err= 0: pid=1503: Mon Jan 27 23:39:14 2020&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  write: IOPS=19.1k, BW=74.5MiB/s (78.1MB/s)(4468MiB/60007msec); 0 zone resets&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    slat (nsec): min=1997, max=791752, avg=7377.43, stdev=6986.23&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    clat (msec): min=2, max=281, avg= 6.71, stdev= 7.43&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     lat (msec): min=2, max=281, avg= 6.71, stdev= 7.43&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    clat percentiles (msec):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     |  1.00th=[    4],  5.00th=[    4], 10.00th=[    4], 20.00th=[    5],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 30.00th=[    5], 40.00th=[    6], 50.00th=[    6], 60.00th=[    6],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 70.00th=[    7], 80.00th=[    8], 90.00th=[    9], 95.00th=[   11],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 99.00th=[   36], 99.50th=[   47], 99.90th=[  121], 99.95th=[  157],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 99.99th=[  220]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   bw (  KiB/s): min=46232, max=89360, per=99.99%, avg=76228.64, stdev=7455.48, samples=120&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   iops        : min=11558, max=22340, avg=19057.13, stdev=1863.88, samples=120&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  lat (msec)   : 4=11.69%, 10=81.90%, 20=4.37%, 50=1.60%, 100=0.31%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  lat (msec)   : 250=0.13%, 500=0.01%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  cpu          : usr=6.16%, sys=14.79%, ctx=714669, majf=0, minf=10&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  IO depths    : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, &gt;=64=100.0%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &gt;=64=0.0%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &gt;=64=0.1%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     issued rwts: total=0,1143725,0,0 short=0,0,0,0 dropped=0,0,0,0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     latency   : target=0, window=0, percentile=100.00%, depth=128&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Run status group 0 (all jobs):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  WRITE: bw=74.5MiB/s (78.1MB/s), 74.5MiB/s-74.5MiB/s (78.1MB/s-78.1MB/s), io=4468MiB (4685MB), run=60007-60007msec&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;test1随机读吞吐&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[root@super /]# fio -numjobs=1 -iodepth=128 -direct=1 -ioengine=libaio -sync=1 -rw=randread -bs=1M -size=1G -time_based -runtime=60 -name=Fio -directory=/test1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Fio: (g=0): rw=randread, bs=(R) 1024KiB-1024KiB, (W) 1024KiB-1024KiB, (T) 1024KiB-1024KiB, ioengine=libaio, iodepth=128&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;fio-3.17&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Starting 1 process&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Jobs: 1 (f=1): [r(1)][100.0%][r=1024KiB/s][r=1 IOPS][eta 00m:00s] &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Fio: (groupid=0, jobs=1): err= 0: pid=1511: Mon Jan 27 23:41:49 2020&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  read: IOPS=119, BW=119MiB/s (125MB/s)(7292MiB/61170msec)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    slat (usec): min=54, max=3004, avg=163.83, stdev=196.42&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    clat (msec): min=10, max=2494, avg=1072.78, stdev=189.89&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     lat (msec): min=10, max=2495, avg=1072.94, stdev=189.86&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    clat percentiles (msec):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     |  1.00th=[  241],  5.00th=[  902], 10.00th=[  961], 20.00th=[ 1028],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 30.00th=[ 1053], 40.00th=[ 1070], 50.00th=[ 1083], 60.00th=[ 1099],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 70.00th=[ 1116], 80.00th=[ 1133], 90.00th=[ 1200], 95.00th=[ 1250],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 99.00th=[ 1754], 99.50th=[ 2005], 99.90th=[ 2198], 99.95th=[ 2265],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 99.99th=[ 2500]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   bw (  KiB/s): min= 2048, max=247808, per=99.33%, avg=121252.40, stdev=27860.84, samples=121&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   iops        : min=    2, max=  242, avg=118.36, stdev=27.22, samples=121&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  lat (msec)   : 20=0.16%, 50=0.08%, 100=0.29%, 250=0.48%, 500=1.54%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  lat (msec)   : 750=0.37%, 1000=12.53%, 2000=84.01%, &gt;=2000=0.53%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  cpu          : usr=0.08%, sys=1.19%, ctx=16345, majf=0, minf=32778&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  IO depths    : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.2%, 32=0.4%, &gt;=64=99.1%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &gt;=64=0.0%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &gt;=64=0.1%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     issued rwts: total=7292,0,0,0 short=0,0,0,0 dropped=0,0,0,0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     latency   : target=0, window=0, percentile=100.00%, depth=128&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Run status group 0 (all jobs):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   READ: bw=119MiB/s (125MB/s), 119MiB/s-119MiB/s (125MB/s-125MB/s), io=7292MiB (7646MB), run=61170-61170msec&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;test2随机读吞吐&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[root@super /]# fio -numjobs=1 -iodepth=128 -direct=1 -ioengine=libaio -sync=1 -rw=randread -bs=1M -size=1G -time_based -runtime=60 -name=Fio -directory=/test2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Fio: (g=0): rw=randread, bs=(R) 1024KiB-1024KiB, (W) 1024KiB-1024KiB, (T) 1024KiB-1024KiB, ioengine=libaio, iodepth=128&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;fio-3.17&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Starting 1 process&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Jobs: 1 (f=1): [r(1)][100.0%][r=11.0MiB/s][r=11 IOPS][eta 00m:00s]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Fio: (groupid=0, jobs=1): err= 0: pid=1514: Mon Jan 27 23:43:58 2020&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  read: IOPS=119, BW=119MiB/s (125MB/s)(7304MiB/61174msec)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    slat (usec): min=52, max=5598, avg=183.95, stdev=270.59&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    clat (msec): min=146, max=2256, avg=1071.05, stdev=171.09&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     lat (msec): min=146, max=2257, avg=1071.23, stdev=171.04&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    clat percentiles (msec):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     |  1.00th=[  317],  5.00th=[  902], 10.00th=[  961], 20.00th=[ 1020],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 30.00th=[ 1053], 40.00th=[ 1070], 50.00th=[ 1083], 60.00th=[ 1099],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 70.00th=[ 1116], 80.00th=[ 1133], 90.00th=[ 1200], 95.00th=[ 1234],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 99.00th=[ 1636], 99.50th=[ 1989], 99.90th=[ 2140], 99.95th=[ 2265],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 99.99th=[ 2265]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   bw (  KiB/s): min= 2048, max=288768, per=99.35%, avg=121466.95, stdev=25110.94, samples=121&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   iops        : min=    2, max=  282, avg=118.60, stdev=24.52, samples=121&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  lat (msec)   : 250=0.21%, 500=2.01%, 750=0.77%, 1000=13.81%, 2000=82.79%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  lat (msec)   : &gt;=2000=0.41%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  cpu          : usr=0.09%, sys=1.19%, ctx=16454, majf=0, minf=32778&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  IO depths    : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.2%, 32=0.4%, &gt;=64=99.1%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &gt;=64=0.0%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &gt;=64=0.1%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     issued rwts: total=7304,0,0,0 short=0,0,0,0 dropped=0,0,0,0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     latency   : target=0, window=0, percentile=100.00%, depth=128&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Run status group 0 (all jobs):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   READ: bw=119MiB/s (125MB/s), 119MiB/s-119MiB/s (125MB/s-125MB/s), io=7304MiB (7659MB), run=61174-61174msec&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;test1随机写吞吐&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[root@super /]# fio -numjobs=1 -iodepth=128 -direct=1 -ioengine=libaio -sync=1 -rw=randwrite -bs=1M -size=1G -time_based -runtime=60 -name=Fio -directory=/test1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Fio: (g=0): rw=randwrite, bs=(R) 1024KiB-1024KiB, (W) 1024KiB-1024KiB, (T) 1024KiB-1024KiB, ioengine=libaio, iodepth=128&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;fio-3.17&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Starting 1 process&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Jobs: 1 (f=1): [w(1)][100.0%][w=28.0MiB/s][w=28 IOPS][eta 00m:00s]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Fio: (groupid=0, jobs=1): err= 0: pid=1522: Mon Jan 27 23:48:33 2020&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  write: IOPS=127, BW=127MiB/s (134MB/s)(7771MiB/61014msec); 0 zone resets&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    slat (usec): min=104, max=941, avg=172.70, stdev=37.40&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    clat (msec): min=55, max=2021, avg=1004.46, stdev=156.46&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     lat (msec): min=55, max=2021, avg=1004.64, stdev=156.46&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    clat percentiles (msec):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     |  1.00th=[  150],  5.00th=[  986], 10.00th=[ 1011], 20.00th=[ 1020],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 30.00th=[ 1020], 40.00th=[ 1020], 50.00th=[ 1020], 60.00th=[ 1020],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 70.00th=[ 1020], 80.00th=[ 1028], 90.00th=[ 1028], 95.00th=[ 1045],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 99.00th=[ 1401], 99.50th=[ 1720], 99.90th=[ 1972], 99.95th=[ 2005],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 99.99th=[ 2022]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   bw (  KiB/s): min= 2048, max=370688, per=99.19%, avg=129364.72, stdev=25090.44, samples=121&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   iops        : min=    2, max=  362, avg=126.29, stdev=24.51, samples=121&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  lat (msec)   : 100=0.23%, 250=1.90%, 500=0.48%, 750=0.50%, 1000=3.53%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  lat (msec)   : 2000=93.31%, &gt;=2000=0.05%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  cpu          : usr=1.07%, sys=1.22%, ctx=8135, majf=0, minf=9&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  IO depths    : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.2%, 32=0.4%, &gt;=64=99.2%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &gt;=64=0.0%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &gt;=64=0.1%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     issued rwts: total=0,7771,0,0 short=0,0,0,0 dropped=0,0,0,0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     latency   : target=0, window=0, percentile=100.00%, depth=128&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Run status group 0 (all jobs):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  WRITE: bw=127MiB/s (134MB/s), 127MiB/s-127MiB/s (134MB/s-134MB/s), io=7771MiB (8148MB), run=61014-61014msec&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;test2随机写吞吐&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[root@super /]# fio -numjobs=1 -iodepth=128 -direct=1 -ioengine=libaio -sync=1 -rw=randwrite -bs=1M -size=1G -time_based -runtime=60 -name=Fio -directory=/test2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Fio: (g=0): rw=randwrite, bs=(R) 1024KiB-1024KiB, (W) 1024KiB-1024KiB, (T) 1024KiB-1024KiB, ioengine=libaio, iodepth=128&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;fio-3.17&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Starting 1 process&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Jobs: 1 (f=1): [w(1)][100.0%][w=28.0MiB/s][w=28 IOPS][eta 00m:00s]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Fio: (groupid=0, jobs=1): err= 0: pid=1533: Mon Jan 27 23:51:47 2020&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  write: IOPS=127, BW=127MiB/s (134MB/s)(7772MiB/61020msec); 0 zone resets&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    slat (usec): min=101, max=1754, avg=173.58, stdev=42.61&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    clat (msec): min=52, max=2019, avg=1004.43, stdev=161.16&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     lat (msec): min=52, max=2019, avg=1004.60, stdev=161.16&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    clat percentiles (msec):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     |  1.00th=[  133],  5.00th=[  894], 10.00th=[ 1003], 20.00th=[ 1011],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 30.00th=[ 1020], 40.00th=[ 1020], 50.00th=[ 1020], 60.00th=[ 1020],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 70.00th=[ 1020], 80.00th=[ 1028], 90.00th=[ 1028], 95.00th=[ 1070],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 99.00th=[ 1401], 99.50th=[ 1720], 99.90th=[ 1972], 99.95th=[ 2005],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     | 99.99th=[ 2022]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   bw (  KiB/s): min= 2048, max=371992, per=99.20%, avg=129375.29, stdev=26928.24, samples=121&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   iops        : min=    2, max=  363, avg=126.30, stdev=26.28, samples=121&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  lat (msec)   : 100=0.39%, 250=1.71%, 500=0.49%, 750=0.46%, 1000=5.96%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  lat (msec)   : 2000=90.97%, &gt;=2000=0.03%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  cpu          : usr=1.31%, sys=0.98%, ctx=8027, majf=0, minf=10&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  IO depths    : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.2%, 32=0.4%, &gt;=64=99.2%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &gt;=64=0.0%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &gt;=64=0.1%&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     issued rwts: total=0,7772,0,0 short=0,0,0,0 dropped=0,0,0,0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     latency   : target=0, window=0, percentile=100.00%, depth=128&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Run status group 0 (all jobs):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  WRITE: bw=127MiB/s (134MB/s), 127MiB/s-127MiB/s (134MB/s-134MB/s), io=7772MiB (8150MB), run=61020-61020msec&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;p&gt;可以看出还是非加密好一点😁😁😁&lt;/p&gt;</summary>
</entry>
<entry>
  <title>关于Mariadb和Mysql高版本的本地登录无需密码问题及说明</title>
  <link href="https://www.ioioi.cn/posts/no-password-problem-and-instructions-for-local-login-of-mariadb-and-mysql/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/no-password-problem-and-instructions-for-local-login-of-mariadb-and-mysql/</id>
  <published>2020-01-08T11:57:00.000Z</published>
  <updated>2020-01-08T11:57:00.000Z</updated>
  <summary type="html">&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;MariaDB [mysql]&gt; show grants for &apos;root&apos;@&apos;localhost&apos;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;输入命令&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;GRANT ALL PRIVILEGES ON *.* TO &apos;root&apos;@&apos;localhost&apos; IDENTIFIED VIA mysql_native_password USING &apos;*那一坨东西&apos; WITH GRANT OPTION;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>查询正在使用的端口</title>
  <link href="https://www.ioioi.cn/posts/query-ports-in-use/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/query-ports-in-use/</id>
  <published>2020-01-01T11:40:00.000Z</published>
  <updated>2020-01-01T11:40:00.000Z</updated>
  <summary type="html">&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;netstat -tunlp | grep 端口号&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;-t (tcp) 仅显示tcp相关选项&lt;br&gt;
-u (udp)仅显示udp相关选项&lt;br&gt;
-n 拒绝显示别名，能显示数字的全部转化为数字&lt;br&gt;
-l 仅列出在Listen(监听)的服务状态&lt;br&gt;
-p 显示建立相关链接的程序名&lt;/p&gt;</summary>
</entry>
<entry>
  <title>一键传附件脚本</title>
  <link href="https://www.ioioi.cn/posts/one-click-attachment-script/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/one-click-attachment-script/</id>
  <published>2019-12-30T12:17:00.000Z</published>
  <updated>2019-12-30T12:17:00.000Z</updated>
  <summary type="html">&lt;p&gt;额，学校搞了个一体机，嗯，所以。。。&lt;br&gt;
懒 见我的Github：&lt;a href=&quot;https://github.com/arkylin/Mail-Files-Tools&quot;&gt;https://github.com/arkylin/Mail-Files-Tools&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Newest_lamp项目</title>
  <link href="https://www.ioioi.cn/posts/new-est-lamp-project/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/new-est-lamp-project/</id>
  <published>2019-12-26T12:11:00.000Z</published>
  <updated>2019-12-26T12:11:00.000Z</updated>
  <summary type="html">&lt;h1 id=&quot;newest_lamp&quot;&gt;Newest_lamp&lt;/h1&gt;
&lt;p&gt;&lt;img src=&quot;/posts/new-est-lamp-project/images/3815820864.png&quot; alt=&quot;Newest_lamp.png&quot; title=&quot;Newest_lamp.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;我的Github：&lt;a href=&quot;https://github.com/arkylin/Newest_lamp&quot;&gt;https://github.com/arkylin/Newest_lamp&lt;/a&gt;&lt;br&gt;
我的Docker Hub：&lt;a href=&quot;https://hub.docker.com/r/arkylin/newest_lamp&quot;&gt;https://hub.docker.com/r/arkylin/newest_lamp&lt;/a&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;docker pull arkylin/newest_lamp:v0.1.6&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;此项目旨在创建一个通用的lamp安装脚本，来使那些“特别想用新版本，但又不会自己编译安装或者不想自己花时间去弄”的人得到方便&lt;/p&gt;
&lt;p&gt;后续可能也可能会推出一些其他环境来弄或者一些有意思的软件&lt;/p&gt;
&lt;p&gt;安装脚本&lt;/p&gt;
&lt;p&gt;一、添加目录&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mkdir -p /data/{ssl,vhost/apache,mysql,wwwroot,wwwroot/default,wwwlogs}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mkdir -p /data/{ssl,vhost/apache,wwwroot,wwwroot/default,wwwlogs}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;二、运行&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;docker run -itd --name super --hostname super.xyz.blue --net host --restart always --privileged -v /data:/data -v /data/mysql:/var/lib/mysql arkylin/newest_lamp:latest /usr/sbin/init&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;docker run -itd --name super --hostname super.xyz.blue --net host --restart always --privileged -v /data:/data arkylin/newest_lamp:latest /usr/sbin/init&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;三、初始化Mysql&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mysql_secure_installation&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;注：-V 冒号”:“前面的目录是宿主机目录，后面的目录是容器内目录。&lt;/p&gt;
&lt;p&gt;Apache配置命令&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cp -f /app/apache/conf/vhost/0.conf /data/vhost/apache&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mkdir /data/vhost/apache&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;domain=super.xyz.blue&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Apache_fcgi=$(echo -e &quot;&amp;#x3C;Files ~ (\\.user.ini|\\.htaccess|\\.git|\\.svn|\\.project|LICENSE|README.md)\$&gt;\n    Order allow,deny\n    Deny from all\n  &amp;#x3C;/Files&gt;\n  &amp;#x3C;FilesMatch \\.php\$&gt;\n    SetHandler \&quot;proxy:unix:/dev/shm/php-cgi.sock|fcgi://localhost\&quot;\n  &amp;#x3C;/FilesMatch&gt;&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Apache_log=&quot;CustomLog \&quot;/data/wwwlogs/${domain}_apache.log\&quot; common&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cat &gt; /data/vhost/apache/${domain}.conf &amp;#x3C;&amp;#x3C; EOF&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;VirtualHost *:88&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  ServerAdmin admin@xyz.blue&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  DocumentRoot /data/wwwroot/${domain}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  ServerName ${domain}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  # ServerAlias xyz.blue&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  SSLEngine on&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  SSLCertificateFile /data/ssl/my.crt&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  SSLCertificateKeyFile /data/ssl/my.key&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  ErrorLog /data/wwwlogs/${domain}_error_apache.log&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  ${Apache_log}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  ${Apache_fcgi}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;Directory /data/wwwroot/${domain}&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  SetOutputFilter DEFLATE&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  Options FollowSymLinks ExecCGI&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  Require all granted&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  AllowOverride All&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  Order allow,deny&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  Allow from all&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  DirectoryIndex index.html index.php&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;/Directory&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;/VirtualHost&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;EOF&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;使Apache生效&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;apachectl -t&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;apachectl -k graceful&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;USELESS&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cat &gt;&gt; /root/.bashrc &amp;#x3C;&amp;#x3C;EOF&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;systemctl restart php-fpm&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;systemctl restart httpd&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;systemctl restart mariadb&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;EOF&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;博客配置&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;VirtualHost *:88&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  ServerAdmin admin@xyz.blue&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  DocumentRoot /data/wwwroot/www.ioioi.cn&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  ServerName www.ioioi.cn&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  ServerAlias xyz.blue&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  #SSLEngine on&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  #SSLCertificateFile /data/ssl/my.crt&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  #SSLCertificateKeyFile /data/ssl/my.key&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  ErrorLog /data/wwwlogs/www.ioioi.cn_error_apache.log&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  &amp;#x3C;Files ~ (\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)$&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Order allow,deny&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Deny from all&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  &amp;#x3C;/Files&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  &amp;#x3C;FilesMatch \.php$&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    SetHandler &quot;proxy:unix:/dev/shm/php-cgi.sock|fcgi://localhost&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  &amp;#x3C;/FilesMatch&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;Directory /data/wwwroot/www.ioioi.cn&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  SetOutputFilter DEFLATE&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  Options FollowSymLinks ExecCGI&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  Require all granted&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  AllowOverride All&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  Order allow,deny&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  Allow from all&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  DirectoryIndex index.html index.php&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;/Directory&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;/VirtualHost&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;前端用Caddy&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;/app/caddy/c* start --config /app/caddy/C&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;http_port 80&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;https_port 443&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;experimental_http3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;xyz.blue www.ioioi.cn {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tls /data/ssl/my.crt /data/ssl/my.key&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;header Strict-Transport-Security &quot;max-age=15552000; includeSubDomains; preload&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;reverse_proxy 127.0.0.1:88&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;分享一个Nextcloud/Owncloud的Caddy 2前端配置文件&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;aaa.com {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tls /data/ssl/my.crt /data/ssl/my.key&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;header Strict-Transport-Security &quot;max-age=15552000; includeSubDomains; preload&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;reverse_proxy / 127.0.0.1:88 {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;header_up Host {http.request.host}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;header_up X-Real-IP {http.request.remote.host}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;header_up X-Forwarded-For {http.request.remote.host}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;header_up X-Forwarded-Port {http.request.port}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;header_up X-Forwarded-Proto {http.request.scheme}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;redir /.well-known/carddav /remote.php/carddav 301&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;redir /.well-known/caldav /remote.php/caldav 301&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;请关注我的博客 &lt;a href=&quot;https://www.ioioi.cn&quot;&gt;https://www.ioioi.cn&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Whcms开启SSL提示重定向次数过多[ERR_TOO_MANY_REDIRECTS]</title>
  <link href="https://www.ioioi.cn/posts/too-many-times-for-whcms-to-enable-ssl-prompt-redirection/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/too-many-times-for-whcms-to-enable-ssl-prompt-redirection/</id>
  <published>2019-12-07T15:22:33.000Z</published>
  <updated>2019-12-07T15:22:33.000Z</updated>
  <summary type="html">&lt;p&gt;问题描述：&lt;/p&gt;
&lt;p&gt;环境：Linux+Nginx&lt;/p&gt;
&lt;p&gt;WHMCS系统配置SSL证书，安装都正常，并且https也可以访问。然后做了301跳转，将原来的域名http转到https上，均正常。&lt;/p&gt;
&lt;p&gt;之后到后台设置网站连接为&lt;a href=&quot;https://xxx.com&quot;&gt;https://xxx.com&lt;/a&gt;，网站直接挂掉。提示错误。&lt;/p&gt;
&lt;p&gt;Chrome提示： ERR_TOO_MANY_REDIRECTS&lt;/p&gt;
&lt;p&gt;IE提示错误: INET_E_REDIRECT_FAILED&lt;/p&gt;
&lt;p&gt;问题解决：&lt;/p&gt;
&lt;p&gt;多方排查，包括重装whmcs，均无法解决。联系官方也无法给出更多的答案。唯独可以通过https访问网站，但是无法在后台设置连接为https。这样带来的问题是https可以访问，但是用户无法注册和验证Email连接等操作。&lt;/p&gt;
&lt;p&gt;最终解决方案为：在configuration.php的文件中，加入一条：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;$_SERVER[&apos;HTTPS&apos;] = &apos;On&apos;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;然后重启Nginx。在后台设置https后，问题得到解决。&lt;/p&gt;</summary>
</entry>
<entry>
  <title>阿里云开启安全组并在服务器内开启防火墙还是访问不了的解决方案</title>
  <link href="https://www.ioioi.cn/posts/solution-for-aliyun-to-open-security-group-and-firewall-in-server/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/solution-for-aliyun-to-open-security-group-and-firewall-in-server/</id>
  <published>2019-10-02T07:44:02.000Z</published>
  <updated>2019-10-02T07:44:02.000Z</updated>
  <summary type="html">&lt;p&gt;将软件的监听地址改为0.0.0.0&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Redis开启unix socket</title>
  <link href="https://www.ioioi.cn/posts/redis-opens-unix-socket/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/redis-opens-unix-socket/</id>
  <published>2019-10-02T07:42:33.000Z</published>
  <updated>2019-10-02T07:42:33.000Z</updated>
  <summary type="html">&lt;p&gt;unixsocket /tmp/redis.sock&lt;br&gt;
unixsocketperm 777&lt;/p&gt;</summary>
</entry>
<entry>
  <title>docker从容器里面拷文件到宿主机或从宿主机拷文件到docker容器里面</title>
  <link href="https://www.ioioi.cn/posts/docker-copies-files-from-container-to-host-or-from-host-to-docker-container/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/docker-copies-files-from-container-to-host-or-from-host-to-docker-container/</id>
  <published>2019-10-02T07:39:00.000Z</published>
  <updated>2019-10-02T07:39:00.000Z</updated>
  <summary type="html">&lt;p&gt;1、从容器里面拷文件到宿主机？&lt;/p&gt;
&lt;p&gt;假设容器名为testtomcat,要从容器里面拷贝的文件路为：/usr/local/tomcat/webapps/test/js/test.js, 现在要将test.js从容器里面拷到宿主机的/opt路径下面，那么命令应该怎么写呢？&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;docker cp testtomcat：/usr/local/tomcat/webapps/test/js/test.js /opt&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;2、从宿主机拷文件到容器里面&lt;/p&gt;
&lt;p&gt;假设容器名为testtomcat,现在要将宿主机/opt/test.js文件拷贝到容器里面的/usr/local/tomcat/webapps/test/js路径下面，那么命令该怎么写呢？&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;docker cp /opt/test.js testtomcat：/usr/local/tomcat/webapps/test/js&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>解决申请 HSTS 时 Warning: Unnecessary HSTS header over HTTP 的方法</title>
  <link href="https://www.ioioi.cn/posts/warning-unnecessary-hsts-header-over-http-method-for-hsts-application/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/warning-unnecessary-hsts-header-over-http-method-for-hsts-application/</id>
  <published>2019-10-01T17:26:00.000Z</published>
  <updated>2019-10-01T17:26:00.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;strong&gt;Nginx&lt;/strong&gt;&lt;br&gt;
修改配置文件为如下所示：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;map $scheme $hsts_header {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    https   &quot;max-age=31536000; includeSubDomains; preload&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;server {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;......(others)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  add_header Strict-Transport-Security $hsts_header;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;......(others)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;修改后重启Nginx。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Apache&lt;/strong&gt;&lt;br&gt;
修改配置文件为如下所示：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;VirtualHost *:443&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;......(others)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    Header always set Strict-Transport-Security &quot;max-age=31536000; includeSubDomains; preload&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;......(others)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;/VirtualHost&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;修改后重启Apache。&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://websistent.com/add-the-hsts-header-only-for-https-requests-nginx/&quot;&gt;https://websistent.com/add-the-hsts-header-only-for-https-requests-nginx/&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>搭建drawio</title>
  <link href="https://www.ioioi.cn/posts/build-drawio/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/build-drawio/</id>
  <published>2019-10-01T17:22:00.000Z</published>
  <updated>2019-10-01T17:22:00.000Z</updated>
  <summary type="html">&lt;p&gt;搭建drawio&lt;br&gt;
draw.io的github地址在&lt;a href=&quot;https://github.com/jgraph/drawio&quot;&gt;https://github.com/jgraph/drawio&lt;/a&gt;，可以在release下载正式版本，我们此次下载的是源码版本。&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;git clone https://github.com/jgraph/drawio.git&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;编译的话，需要安装ant等环境。&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;yum install -y ant java-1.8.0-openjdk-devel&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;接下来，就是需要编译了。&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cd etc/build &amp;#x26;&amp;#x26; ant&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;如果需要生成war包的话，则如下编译&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cd etc/build &amp;#x26;&amp;#x26; ant war&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;编译成功后，war包会生成在drawio/build/draw.war，如果你有tomcat或java的服务环境，可以使用war包部署。整体来说，还是不用war的方便一些，只要有Apache或Nginx就可以搞定了。&lt;/p&gt;</summary>
</entry>
<entry>
  <title>安装LDAP-php扩展</title>
  <link href="https://www.ioioi.cn/posts/install-ldapphp-extensions/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/install-ldapphp-extensions/</id>
  <published>2019-10-01T17:20:04.000Z</published>
  <updated>2019-10-01T17:20:04.000Z</updated>
  <summary type="html">&lt;p&gt;LDAP&lt;br&gt;
−−with-ldap=DIR Include LDAP support&lt;br&gt;
−−with-ldap-sasl=DIR LDAP: Include Cyrus SASL support&lt;br&gt;
Debian/Ubuntu 需安装 libldap-2.4-2, libldap2-dev 依赖包。&lt;br&gt;
Redhat/CentOS 需安装 openldap, openldap-devel 依赖包。&lt;/p&gt;</summary>
</entry>
<entry>
  <title>NextCloud上传失败或删除失败解决方法</title>
  <link href="https://www.ioioi.cn/posts/nextcloud-upload-failure-or-delete-failure-solution/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/nextcloud-upload-failure-or-delete-failure-solution/</id>
  <published>2019-09-21T15:34:00.000Z</published>
  <updated>2019-09-21T15:34:00.000Z</updated>
  <summary type="html">&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#!/bin/bash&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;php /你的网站目录/occ maintenance:mode --on&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mysql -u数据库账号 -p你的数据库密码 -e &quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;use 数据库名称;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;DELETE FROM oc_file_locks WHERE 1;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;exit&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;php /你的网站目录/occ maintenance:mode --off&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;将以上保存为.sh脚本&lt;br&gt;
在你的网站目录下面新建.php文件&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;?php&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        passthru(&quot;bash 上面你的脚本名称.sh&quot;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;?&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;那么访问这个php文件就会运行之前的那个脚本&lt;br&gt;
会比每次在SSH中输入会简便很多运行程序的目录是你的网站目录，如需修改请使用绝对路径&lt;/p&gt;
&lt;p&gt;注意：在php.ini中删除禁用函数passthru()&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;在NextCloud中添加应用—那个自定义链接的&lt;br&gt;
&lt;img src=&quot;/posts/nextcloud-upload-failure-or-delete-failure-solution/images/616003142.png&quot; alt=&quot;Nextcloud-show.png&quot; title=&quot;Nextcloud-show.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Annie视频下载感觉很好</title>
  <link href="https://www.ioioi.cn/posts/annie-video-download-feels-good/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/annie-video-download-feels-good/</id>
  <published>2019-09-21T15:23:00.000Z</published>
  <updated>2019-09-21T15:23:00.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;img src=&quot;/posts/annie-video-download-feels-good/images/2278790781.png&quot; alt=&quot;annie-download.png&quot; title=&quot;annie-download.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
&lt;img src=&quot;/posts/annie-video-download-feels-good/images/767552172.png&quot; alt=&quot;annie-c.png&quot; title=&quot;annie-c.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
&lt;img src=&quot;/posts/annie-video-download-feels-good/images/3014905791.png&quot; alt=&quot;annie.png&quot; title=&quot;annie.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
&lt;a href=&quot;https://github.com/iawia002/annie&quot;&gt;https://github.com/iawia002/annie&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>运行Python-bilibili脚本视频出现的问题</title>
  <link href="https://www.ioioi.cn/posts/problems-with-running-pythonbilibilibili-script-videos/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/problems-with-running-pythonbilibilibili-script-videos/</id>
  <published>2019-09-21T15:12:00.000Z</published>
  <updated>2019-09-21T15:12:00.000Z</updated>
  <summary type="html">&lt;p&gt;[post cid=“62” /]&lt;br&gt;
Imageio: ‘ffmpeg-linux64-v3.3.1’ was not found on your computer; downloading it now.&lt;/p&gt;
&lt;p&gt;在使用Python的moviepy模块的时候，报出以下错误：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Imageio: &apos;ffmpeg.linux64&apos; was not found on your computer; downloading it now.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Error while fetching file: &amp;#x3C;urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)&gt;.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Error while fetching file: &amp;#x3C;urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)&gt;.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Error while fetching file: &amp;#x3C;urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)&gt;.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Error while fetching file: &amp;#x3C;urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)&gt;.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Traceback (most recent call last):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  File &quot;&amp;#x3C;stdin&gt;&quot;, line 1, in &amp;#x3C;module&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  File &quot;/home/me/anaconda2/lib/python3.7/site-packages/imageio/plugins/ffmpeg.py&quot;, line 73, in download&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    force_download=force_download)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  File &quot;/home/me/anaconda2/lib/python3.7/site-packages/imageio/core/fetching.py&quot;, line 127, in get_remote_file&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    _fetch_file(url, filename)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  File &quot;/home/me/anaconda2/lib/python3.7/site-packages/imageio/core/fetching.py&quot;, line 183, in _fetch_file&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    os.path.basename(file_name))&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;IOError: Unable to download &apos;ffmpeg.linux64&apos;. Perhaps there is a no internet connection? If there is, please report this problem.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;错误原因：&lt;br&gt;
imageio模块下载ffmpeg的时候，无法连接网络。&lt;br&gt;
下载的路径可以参看:&lt;br&gt;
./site-packages/imageio/core/fetching.py:63&lt;br&gt;
./site-packages/imageio/plugins/ffmpeg.py:70&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;wget https://github.com/imageio/imageio-binaries/raw/master/ffmpeg/ffmpeg.linux64&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mv ffmpeg.linux64 ~/.imageio/ffmpeg/&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>使用python脚本下载bilibili视频</title>
  <link href="https://www.ioioi.cn/posts/download-bilibilibili-videos-using-python-scripts/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/download-bilibilibili-videos-using-python-scripts/</id>
  <published>2019-09-21T15:09:00.000Z</published>
  <updated>2019-09-21T15:09:00.000Z</updated>
  <summary type="html">&lt;p&gt;Github地址：&lt;a href=&quot;https://github.com/Henryhaohao/Bilibili_video_download&quot;&gt;https://github.com/Henryhaohao/Bilibili_video_download&lt;/a&gt;&lt;br&gt;
这个下载很耗服务器资源小CPU|RAM就别用了用下面这个&lt;br&gt;
[post cid=“65” cover=“images/3014905791.png”/]&lt;br&gt;
&lt;img src=&quot;/posts/download-bilibilibili-videos-using-python-scripts/images/3894282218.png&quot; alt=&quot;Python-BILIBILI.png&quot; title=&quot;Python-BILIBILI.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#下载静态文件&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;wget https://github.com/q3aql/aria2-static-builds/releases/download/v1.34.0/aria2-1.34.0-linux-gnu-64bit-build1.tar.bz2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#解压文件并进入文件夹&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tar jxvf aria2-*.tar.bz2 &amp;#x26;&amp;#x26; rm -rf aria2-*.tar.bz2 &amp;#x26;&amp;#x26; cd aria2-*&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#开始安装&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;make install&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;如果安装的时候提示-bash: make: command not found错误，需要先运行命令：&lt;br&gt;
Debian/Ubuntu系统：apt install make -y&lt;br&gt;
CentOS系统：yum install make -y&lt;/p&gt;
&lt;p&gt;安装Python3&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;apt-get install python3-pip -y&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Centos百度&lt;br&gt;
安装ffmpeg&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;apt-get install ffmpeg&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Centos百度&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;git clone https://github.com/Henryhaohao/Bilibili_video_download.git&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;进入安装&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;pip3 install -r requirements.txt&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;按照提示输入即可&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;问题&lt;br&gt;
[post cid=“63” /]&lt;/p&gt;</summary>
</entry>
<entry>
  <title>apache 反向代理的时候，通过域名访问是，出现跳转到ip或者无权访问的情况</title>
  <link href="https://www.ioioi.cn/posts/when-apache-reverse-proxy-is-accessed-through-domain-name-there-is-a-jump-to-ip-or-no-access/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/when-apache-reverse-proxy-is-accessed-through-domain-name-there-is-a-jump-to-ip-or-no-access/</id>
  <published>2019-09-19T13:28:00.000Z</published>
  <updated>2019-09-19T13:28:00.000Z</updated>
  <summary type="html">&lt;p&gt;在配置反向代理的时候加上一行：&lt;/p&gt;
&lt;p&gt;ProxyPreserveHost On&lt;/p&gt;
&lt;p&gt;例如：&lt;br&gt;
ProxyPass / &lt;a href=&quot;http://202.112.0.1/&quot;&gt;http://202.112.0.1/&lt;/a&gt;&lt;br&gt;
ProxyPassReverse / &lt;a href=&quot;http://202.112.0.1/&quot;&gt;http://202.112.0.1/&lt;/a&gt;&lt;br&gt;
ProxyPreserveHost On #在这里加上就行&lt;/p&gt;</summary>
</entry>
<entry>
  <title>为NextCloud中的OnlyOffice配置中文访问</title>
  <link href="https://www.ioioi.cn/posts/configure-chinese-access-for-onlyoffice-in-nextcloud/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/configure-chinese-access-for-onlyoffice-in-nextcloud/</id>
  <published>2019-09-18T13:24:00.000Z</published>
  <updated>2019-09-18T13:24:00.000Z</updated>
  <summary type="html">&lt;p&gt;感觉他那个自带的自动识别网站语言有问题&lt;br&gt;
所以进行了修改&lt;br&gt;
进入&lt;br&gt;
&lt;img src=&quot;/posts/configure-chinese-access-for-onlyoffice-in-nextcloud/images/1027954400.png&quot; alt=&quot;OnlyOffice-1.png&quot; title=&quot;OnlyOffice-1.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
修改两项内容&lt;br&gt;
下面这个是指新建文档时默认进入编辑页面的中英文&lt;br&gt;
&lt;img src=&quot;/posts/configure-chinese-access-for-onlyoffice-in-nextcloud/images/3450507073.png&quot; alt=&quot;OnlyOffice-2.png&quot; title=&quot;OnlyOffice-2.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
下面这个是指编辑文档时默认进入编辑页面的中英文&lt;br&gt;
&lt;img src=&quot;/posts/configure-chinese-access-for-onlyoffice-in-nextcloud/images/2867986613.png&quot; alt=&quot;OnlyOffice-3.png&quot; title=&quot;OnlyOffice-3.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
代码跟之前的一样&lt;br&gt;
[post cid=“37” /]&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        if(!empty($_SERVER[&apos;HTTP_ACCEPT_LANGUAGE&apos;])){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $lang = substr($_SERVER[&apos;HTTP_ACCEPT_LANGUAGE&apos;],0,4);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            if(preg_match(&quot;/zh-c/i&quot;,$lang)){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                $langConfig = &quot;zh-CN&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            elseif(preg_match(&quot;/en/i&quot;,$lang)){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                $langConfig = &quot;en&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            else{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                $langConfig = &quot;en&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        else{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $langConfig = &apos;en&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $lang = $langConfig;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>Typecho 文章链接转外链</title>
  <link href="https://www.ioioi.cn/posts/typecho-articles-link-external-chain/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/typecho-articles-link-external-chain/</id>
  <published>2019-08-30T14:36:00.000Z</published>
  <updated>2019-08-30T14:36:00.000Z</updated>
  <summary type="html">&lt;p&gt;用JS&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;script&gt;window.location.href = &quot;https://www.baidu.com&quot;&amp;#x3C;/script&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;其他的方法见&lt;br&gt;
&lt;a href=&quot;https://paugram.com/coding/typecho-article-links-external.html&quot;&gt;https://paugram.com/coding/typecho-article-links-external.html&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Typecho在使用CDN的情况下获取真实IP</title>
  <link href="https://www.ioioi.cn/posts/typecho-gets-real-ip-using-cdn/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/typecho-gets-real-ip-using-cdn/</id>
  <published>2019-08-30T14:19:00.000Z</published>
  <updated>2019-08-30T14:19:00.000Z</updated>
  <summary type="html">&lt;p&gt;当我的文章或页面被评论时，网站后台会看到他们发评论的IP地址&lt;br&gt;
&lt;img src=&quot;/posts/typecho-gets-real-ip-using-cdn/images/215971467.png&quot; alt=&quot;CDN-con.png&quot; title=&quot;CDN-con.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
&lt;img src=&quot;/posts/typecho-gets-real-ip-using-cdn/images/2183718696.png&quot; alt=&quot;CDN-IP.png&quot; title=&quot;CDN-IP.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
那么如何在使用CDN的情况下获取用户的真实IP呢？&lt;br&gt;
其实很简单&lt;br&gt;
在&lt;code&gt;config.inc.php&lt;/code&gt;末尾添加即可&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;if(isset($_SERVER[&apos;HTTP_X_FORWARDED_FOR&apos;])){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    $list = explode(&apos;,&apos;,$_SERVER[&apos;HTTP_X_FORWARDED_FOR&apos;]);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    $_SERVER[&apos;REMOTE_ADDR&apos;] = $list[0];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/posts/typecho-gets-real-ip-using-cdn/images/3365946667.png&quot; alt=&quot;CDN-config.png&quot; title=&quot;CDN-config.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;效果&lt;br&gt;
&lt;img src=&quot;/posts/typecho-gets-real-ip-using-cdn/images/1708282233.png&quot; alt=&quot;CDN-new-con.png&quot; title=&quot;CDN-new-con.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
&lt;img src=&quot;/posts/typecho-gets-real-ip-using-cdn/images/3958535979.png&quot; alt=&quot;CDN-new-IP.png&quot; title=&quot;CDN-new-IP.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>让你的网站文字“抖”起来</title>
  <link href="https://www.ioioi.cn/posts/let-your-website-text-shake-up/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/let-your-website-text-shake-up/</id>
  <published>2019-08-30T13:52:00.000Z</published>
  <updated>2019-08-30T13:52:00.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;img src=&quot;/posts/let-your-website-text-shake-up/images/3033167822.png&quot; alt=&quot;抖.png&quot; title=&quot;抖.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;点击以查看效果&lt;br&gt;
点我！&lt;/p&gt;
&lt;p&gt;直接在文章编辑器里面输入即可&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;style&gt;@keyframes shake-it{0%{text-shadow:0 0 rgba(0,255,255,.5),0 0 rgba(255,0,0,.5)}25%{text-shadow:-2px 0 rgba(0,255,255,.5),2px 0 rgba(255,0,0,.5)}50%{text-shadow:-5px 0 rgba(0,255,255,.5),3px 0 rgba(255,0,0,.5)}100%{text-shadow:3px 0 rgba(0,255,255,.5),5px 0 rgba(255,0,0,.5)}}&amp;#x3C;/style&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;button class=&quot;btn small&quot; id=&quot;shake-it&quot;&gt;抖！&amp;#x3C;/button&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;script&gt;var text_obj=[document.body,document.getElementById(&quot;shake-it&quot;)];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    text_obj[1].onclick=function(){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    text_obj[0].style=&quot;animation: shake-it .5s reverse infinite cubic-bezier(0.68, -0.55, 0.27, 1.55);&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    setTimeout(function(){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        text_obj[0].style=&quot;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        },13000)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    };&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;/script&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;如果需要在抖的时候添加音乐&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;style&gt;@keyframes shake-it{0%{text-shadow:0 0 rgba(0,255,255,.5),0 0 rgba(255,0,0,.5)}25%{text-shadow:-2px 0 rgba(0,255,255,.5),2px 0 rgba(255,0,0,.5)}50%{text-shadow:-5px 0 rgba(0,255,255,.5),3px 0 rgba(255,0,0,.5)}100%{text-shadow:3px 0 rgba(0,255,255,.5),5px 0 rgba(255,0,0,.5)}}&amp;#x3C;/style&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;style&gt;@keyframes shake-it{0%{text-shadow:0 0 rgba(0,255,255,.5),0 0 rgba(255,0,0,.5)}25%{text-shadow:-2px 0 rgba(0,255,255,.5),2px 0 rgba(255,0,0,.5)}50%{text-shadow:-5px 0 rgba(0,255,255,.5),3px 0 rgba(255,0,0,.5)}100%{text-shadow:3px 0 rgba(0,255,255,.5),5px 0 rgba(255,0,0,.5)}}&amp;#x3C;/style&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;script&gt;var text_obj=[document.body,document.getElementById(&quot;shake-it&quot;)];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;text_obj[1].onclick=function(){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    text_obj[0].style=&quot;animation: shake-it .5s reverse infinite cubic-bezier(0.68, -0.55, 0.27, 1.55);&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    setTimeout(function(){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        text_obj[0].style=&quot;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        },13000)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    };&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;/script&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;script&gt;var text_obj=[document.body,document.getElementById(&quot;shake-it&quot;)];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;text_obj[1].onclick=function(){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    text_obj[0].style=&quot;animation: shake-it .5s reverse infinite cubic-bezier(0.68, -0.55, 0.27, 1.55);&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    setTimeout(function(){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        text_obj[0].style=&quot;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        },13000)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    };&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;/script&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;根据&lt;a href=&quot;https://paugram.com/coding/shake-your-text.html&quot;&gt;https://paugram.com/coding/shake-your-text.html&lt;/a&gt;修改&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Typecho配置多语言</title>
  <link href="https://www.ioioi.cn/posts/typecho-configuration-multilingualism/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/typecho-configuration-multilingualism/</id>
  <published>2019-08-21T10:00:00.000Z</published>
  <updated>2019-08-21T10:00:00.000Z</updated>
  <summary type="html">&lt;p&gt;[post cid=“37” cover=“images/1378905739.png”/]&lt;br&gt;
更新一下，上次的那个方法太复杂。&lt;br&gt;
增加en站点，就是重新搭建一个博客，数据库还是同一个不过数据库前缀可以修改&lt;br&gt;
如果分开数据库的话对Sqlite不友好，Mysql随意&lt;br&gt;
编辑config.inc.php&lt;br&gt;
&lt;strong&gt;禁止直接复制，具体内容需要修改为你自己的数据库&lt;/strong&gt;&lt;br&gt;
Mysql的话对照你原来的配置修改，大体框架不变&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;/** 定义数据库参数 */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#$db = new Typecho_Db(&apos;Pdo_SQLite&apos;, &apos;&apos;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#$db-&gt;addServer(array (&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#  &apos;file&apos; =&gt; &apos;/home/wwwroot/www.ioioi.cn/usr/.db&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#), Typecho_Db::READ | Typecho_Db::WRITE);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#Typecho_Db::set($db);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;if(!empty($_SERVER[&apos;HTTP_ACCEPT_LANGUAGE&apos;])){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  $lang = substr($_SERVER[&apos;HTTP_ACCEPT_LANGUAGE&apos;],0,4);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  if(preg_match(&quot;/zh-c/i&quot;,$lang)){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      $db = new Typecho_Db(&apos;Pdo_SQLite&apos;, &apos;&apos;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      $db-&gt;addServer(array (&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      &apos;file&apos; =&gt; &apos;/home/wwwroot/www.ioioi.cn/usr/.db&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      ), Typecho_Db::READ | Typecho_Db::WRITE);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      Typecho_Db::set($db);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  elseif(preg_match(&quot;/en/i&quot;,$lang)){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      $db = new Typecho_Db(&apos;Pdo_SQLite&apos;, &apos;en_&apos;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      $db-&gt;addServer(array (&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      &apos;file&apos; =&gt; &apos;/home/wwwroot/www.ioioi.cn/usr/.db&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      ), Typecho_Db::READ | Typecho_Db::WRITE);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      Typecho_Db::set($db);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  else{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      $db = new Typecho_Db(&apos;Pdo_SQLite&apos;, &apos;en_&apos;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      $db-&gt;addServer(array (&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      &apos;file&apos; =&gt; &apos;/home/wwwroot/www.ioioi.cn/usr/.db&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      ), Typecho_Db::READ | Typecho_Db::WRITE);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      Typecho_Db::set($db);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;else{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  $db = new Typecho_Db(&apos;Pdo_SQLite&apos;, &apos;en_&apos;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      $db-&gt;addServer(array (&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      &apos;file&apos; =&gt; &apos;/home/wwwroot/www.ioioi.cn/usr/.db&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      ), Typecho_Db::READ | Typecho_Db::WRITE);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      Typecho_Db::set($db);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;上面这个就是以你访客的浏览器的第一语言为参考来调用不同数据库来实现多语言&lt;/p&gt;</summary>
</entry>
<entry>
  <title>使用Handsome主题遇到的问题</title>
  <link href="https://www.ioioi.cn/posts/problems-encountered-with-using-handsome-topics/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/problems-encountered-with-using-handsome-topics/</id>
  <published>2019-08-21T09:55:00.000Z</published>
  <updated>2019-08-21T09:55:00.000Z</updated>
  <summary type="html">&lt;h2 id=&quot;wrongpng&quot;&gt;wrong.png&lt;/h2&gt;
&lt;p&gt;主题作者：&lt;br&gt;
第一个错误 不用管 你要是想消除 就在外观设置 速度优化 选择公共cdn 不要选择百度&lt;br&gt;
第二个是全剧播放器 暂时不要用QQ音乐 换个平台试试&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;确定问题：使用了自定义歌单没配置内容或者使用了云解析歌单&lt;br&gt;
解决方法：如果使用了自定义歌单，那么就按照说明添加，如果云解析歌单，就暂时把歌单链接删掉。或者直接关闭音乐解析&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;解决之后&lt;br&gt;
&lt;img src=&quot;/posts/problems-encountered-with-using-handsome-topics/images/3584354506.png&quot; alt=&quot;right.png&quot; title=&quot;right.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>如何使用typecho输出有颜色的字</title>
  <link href="https://www.ioioi.cn/posts/how-to-use-typecho-to-output-colored-words/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/how-to-use-typecho-to-output-colored-words/</id>
  <published>2019-08-21T09:51:00.000Z</published>
  <updated>2019-08-21T09:51:00.000Z</updated>
  <summary type="html">&lt;p&gt;typecho输出html教程&lt;br&gt;
只需要用!!!包裹html即可实现！&lt;br&gt;
用法&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;!!!&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;font color=&quot;red&quot;&gt;这里是红色&amp;#x3C;/font&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;!!!&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;color颜色代码大全：&lt;/p&gt;
&lt;p&gt;1 白颜色 #FFFFFF
2 红颜色 #FF0000
3 绿颜色 #00FF00
4 蓝颜色 #0000FF
5 牡丹红 #FF00FF
6 青颜色 #00FFFF
7 黄颜色 #FFFF00
8 黑颜色 #000000
9 海颜蓝 #70DB93
10 巧克力色 #5C3317
11 蓝紫色 #9F5F9F
12 黄铜色 #B5A642
13 亮金色 #D9D919
14 棕色 #A67D3D
15 青铜色 #8C7853
16 2号青铜色 #A67D3D
17 士官服蓝色 #5F9F9F
18 冷铜色 #D98719
19 铜色 #B87333
20 珊瑚红 #FF7F00
21 紫蓝色 #42426F
22 深棕 #5C4033
23 深绿 #2F4F2F
24 深铜绿色 #4A766E
25 深橄榄绿 #4F4F2F
26 深兰花色 #9932CD
27 深紫色 #871F78
28 深石板蓝 #6B238E
29 深铅灰色 #2F4F4F
30 深棕褐色 #97694F
32 深绿松石色 #7093DB
33 暗木色 #855E42
34 淡灰色 #545454
35 土灰玫瑰红色#856363
36 长石色 #D19275
37 火砖色 #8E2323
38 森林绿 #238E23
39 金色 #CD7F32
40 鲜黄色 #DBDB70
41 灰色 #C0C0C0
42 铜绿色 #527F76
43 青黄色 #93DB70
44 猎人绿 #215E21
45 印度红 #4E2F2F
46 土黄色 #9F9F5F
47 浅蓝色 #C0D9D9
48 浅灰色 #A8A8A8
49 浅钢蓝色 #8F8FBD
59 浅木色 #E9C2A6
60 石灰绿色 #32CD32
61 桔黄色 #E47833
62 褐红色 #8E236B
63 中海蓝色 #32CD99
64 中蓝色 #3232CD
65 中森林绿 #6B8E23
66 中鲜黄色 #EAEAAE
67 中兰花色 #9370DB
68 中海绿色 #426F42
69 中石板蓝色 #7F00FF
70 中春绿色 #7FFF00
71 中绿松石色 #70DBDB
72 中紫红色 #DB7093
73 中木色 #A68064
74 深藏青色 #2F2F4F
75 海军蓝 #23238E
76 霓虹篮 #4D4DFF
77 霓虹粉红 #FF6EC7
78 新深藏青色 #00009C
79 新棕褐色 #EBC79E
80 暗金黄色 #CFB53B
81 橙色 #FF7F00
82 橙红色 #FF2400
83 淡紫色 #DB70DB
84 浅绿色 #8FBC8F
85 粉红色 #BC8F8F
86 李子色 #EAADEA
87 石英色 #D9D9F3
88 艳蓝色 #5959AB
89 鲑鱼色 #6F4242
90 猩红色 #BC1717
91 海绿色 #238E68
92 半甜巧克力色#6B4226
93 赭色 #8E6B23
94 银色 #E6E8FA
95 天蓝 #3299CC
96 石板蓝 #007FFF
97 艳粉红色 #FF1CAE
98 春绿色 #00FF7F
99 钢蓝色 #236B8E
100 亮天蓝色 #38B0DE
101 棕褐色 #DB9370
102 紫红色 #D8BFD8
103 石板蓝色 #ADEAEA
104 浓深棕色 #5C4033
105 淡浅灰色 #CDCDCD
106 紫罗兰色 #4F2F4F
107 紫罗兰红色 #CC3299
108 麦黄色 #D8D8BF
109 黄绿色 #99CC&lt;/p&gt;</summary>
</entry>
<entry>
  <title>typecho文章界面设置多国语言-Handsome主题</title>
  <link href="https://www.ioioi.cn/posts/typeecho-articles-interface-setting-up-multilingual-languages/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/typeecho-articles-interface-setting-up-multilingual-languages/</id>
  <published>2019-08-19T09:36:00.000Z</published>
  <updated>2019-08-19T09:36:00.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;strong&gt;手动切换英文需要在浏览器语言中把英文挪到最前&lt;/strong&gt;&lt;br&gt;
&lt;img src=&quot;/posts/typeecho-articles-interface-setting-up-multilingual-languages/images/1378905739.png&quot; alt=&quot;changlang.png&quot; title=&quot;changlang.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;此文章内容自动生成&lt;br&gt;
主要适配handsome，其他主题稍微修改&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;[collapse status=“false” title=“0.0.1”]&lt;br&gt;
无&lt;br&gt;
[/collapse]&lt;br&gt;
[collapse status=“false” title=“0.0.2”]&lt;br&gt;
替换原有&lt;code&gt;@&lt;/code&gt;为不易输入的字符&lt;code&gt;&amp;#x26;&lt;/code&gt;&lt;br&gt;
为避免输入麻烦将原有&amp;#x26;zh_CN&amp;#x26;改为&amp;#x26;CN&amp;#x26;&lt;br&gt;
[/collapse]&lt;br&gt;
[collapse status=“false” title=“0.0.3”]&lt;br&gt;
使首页标题，浏览器标题支持多语言&lt;br&gt;
[/collapse]&lt;br&gt;
[collapse status=“false” title=“0.0.4”]&lt;br&gt;
更新代码&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;if(!empty($_SERVER[&apos;HTTP_ACCEPT_LANGUAGE&apos;])){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                    $lang = substr($_SERVER[&apos;HTTP_ACCEPT_LANGUAGE&apos;],0,4);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                    if(preg_match(&quot;/zh-c/i&quot;,$lang)){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                        $langConfig = &quot;CN&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                    elseif(preg_match(&quot;/en/i&quot;,$lang)){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                        $langConfig = &quot;US&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                    else{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                        $langConfig = &quot;US&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                else{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                    $langConfig = &apos;US&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;                }&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;0.0.4修改只取前4位，这样只判断最优先的语言。如果取前5位，可能出现en,zh的情况，影响判断。&lt;/strong&gt;&lt;br&gt;
[/collapse]&lt;br&gt;
[collapse status=“false” title=“0.0.5”]&lt;br&gt;
使侧栏热门文章、随机文章支持多语言&lt;br&gt;
前&lt;img src=&quot;/posts/typeecho-articles-interface-setting-up-multilingual-languages/images/571581437.png&quot; alt=&quot;change-old.png&quot; title=&quot;change-old.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
后&lt;img src=&quot;/posts/typeecho-articles-interface-setting-up-multilingual-languages/images/2368694130.png&quot; alt=&quot;change-new.png&quot; title=&quot;change-new.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
&lt;strong&gt;方法&lt;/strong&gt;&lt;br&gt;
在/libs/Content.php中添加&lt;br&gt;
&lt;img src=&quot;/posts/typeecho-articles-interface-setting-up-multilingual-languages/images/586002902.png&quot; alt=&quot;Content.png&quot; title=&quot;Content.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
随机文章同理&lt;br&gt;
[/collapse]&lt;br&gt;
[collapse status=“false” title=“0.0.6”]&lt;br&gt;
使文章内引用文章支持多语言&lt;br&gt;
&lt;strong&gt;方法&lt;/strong&gt;&lt;br&gt;
在/libs/Content.php中添加&lt;br&gt;
更改quoteOtherPostCallback函数&lt;br&gt;
&lt;img src=&quot;/posts/typeecho-articles-interface-setting-up-multilingual-languages/images/3192516382.png&quot; alt=&quot;Content-006.png&quot; title=&quot;Content-006.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
[/collapse]&lt;br&gt;
[collapse status=“false” title=“0.0.7”]&lt;br&gt;
使归档支持多语言&lt;br&gt;
&lt;strong&gt;方法&lt;/strong&gt;&lt;br&gt;
在/files.php中更改&lt;br&gt;
大约55行的位置&lt;br&gt;
&lt;img src=&quot;/posts/typeecho-articles-interface-setting-up-multilingual-languages/images/2329902271.png&quot; alt=&quot;files-007.png&quot; title=&quot;files-007.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
效果&lt;br&gt;
&lt;img src=&quot;/posts/typeecho-articles-interface-setting-up-multilingual-languages/images/3957956557.png&quot; alt=&quot;arv-007.png&quot; title=&quot;arv-007.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;h2 id=&quot;collapse&quot;&gt;[/collapse]&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;0.0.3教程开始&lt;/strong&gt;&lt;br&gt;
在主题的functions.php末尾增加两段函数&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;function getLang($content, $lang){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    preg_match_all(&apos;%&amp;#x26;&apos;.$lang.&apos;.*?&amp;#x26;(.*?)&amp;#x26;/&apos;.$lang.&apos;&amp;#x26;%si&apos;,$content,$match);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    return(str_replace(&quot;&amp;#x26;/$lang&amp;#x26;&quot; , &quot;&quot;,str_replace(&quot;&amp;#x26;$lang&amp;#x26;&quot; , &quot;&quot;,str_replace(&quot;&amp;#x26;$lang&amp;#x26;&amp;#x3C;br&gt;&quot; ,&quot;&quot; ,$match[0][0]))));&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;以上函数可自定义修改&lt;br&gt;
如&lt;code&gt;$pa = &apos;%@&apos;.$lang.&apos;.*?@(.*?)@/&apos;.$lang.&apos;@%si&apos;;&lt;/code&gt;中的&lt;code&gt;@(.*?)@&lt;/code&gt;。&lt;br&gt;
&lt;code&gt;(.*?)&lt;/code&gt;匹配任意长度的任意字符非贪婪模式遇到&lt;code&gt;/&lt;/code&gt;字符停止&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;function _lan($content){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    if(!empty($_SERVER[&apos;HTTP_ACCEPT_LANGUAGE&apos;])){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $lang = $_SERVER[&apos;HTTP_ACCEPT_LANGUAGE&apos;];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        if(preg_match(&quot;/zh-cn/i&quot;,$lang)){ #此处见0.0.4更新&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $langConfig = &quot;CN&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        else{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $langConfig = &quot;US&quot;;#此处见0.0.4更新&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    else{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $langConfig = &apos;US&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    print(getLang($content, $langConfig));&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;在post.php中找到&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;?php echo Content::postContent($this,$this-&gt;user-&gt;hasLogin());?&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;改为&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x3C;?php echo _lan(Content::postContent($this,$this-&gt;user-&gt;hasLogin()));?&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;在libs目录下找到Content.php&lt;br&gt;
&lt;img src=&quot;/posts/typeecho-articles-interface-setting-up-multilingual-languages/images/2613921062.png&quot; alt=&quot;Content-003tech.png&quot; title=&quot;Content-003tech.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
这个是为了更改摘要显示&lt;br&gt;
更改为以下&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;if(!empty($_SERVER[&apos;HTTP_ACCEPT_LANGUAGE&apos;])){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    $lang = $_SERVER[&apos;HTTP_ACCEPT_LANGUAGE&apos;];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        if(preg_match(&quot;/zh-cn/i&quot;,$lang)){#此处见0.0.4更新&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $langConfig = &quot;CN&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        else{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $langConfig = &quot;US&quot;;#此处见0.0.4更新&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    else{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $langConfig = &apos;US&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $content = getLang($content, $langConfig);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;由于&lt;code&gt;$langConfig&lt;/code&gt;为局部变量，所以就把程序复制了一份&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;标题设置多国语言&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
在主题functions.php中添加两段函数&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;function getLanPi($content, $lang){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    preg_match_all($lang,$content,$match);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    if($lang == &quot;CN&quot;){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        preg_match_all (&apos;/`.*`/&apos;, $content,$match);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        return(str_replace(&quot;`&quot; , &quot;&quot;,$match[0][0]));&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    else{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        preg_match_all (&apos;/~.*~/&apos;, $content,$match);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        return(str_replace(&quot;~&quot; , &quot;&quot;,$match[0][0]));&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;function _lanPi($content){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    if(!empty($_SERVER[&apos;HTTP_ACCEPT_LANGUAGE&apos;])){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $lang = $_SERVER[&apos;HTTP_ACCEPT_LANGUAGE&apos;];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        if(preg_match(&quot;/zh-cn/i&quot;,$lang)){#此处见0.0.4更新&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $langConfig = &quot;CN&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            #$langConfig = &quot;en_US&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        else{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            $langConfig = &quot;US&quot;;#此处见0.0.4更新&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    else{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        $langConfig = &apos;US&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    return(getLanPi($content, $langConfig));&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;中文用`标题`,英文用&lt;del&gt;标题&lt;/del&gt;隔开&lt;br&gt;
然后&lt;br&gt;
在/var/Widget/Archive.php中添加如图&lt;br&gt;
&lt;img src=&quot;/posts/typeecho-articles-interface-setting-up-multilingual-languages/images/1001693344.png&quot; alt=&quot;arv-003tech.png&quot; title=&quot;arv-003tech.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
以修改archiveTitle()&lt;br&gt;
然后&lt;br&gt;
在主题pages.php中修改文章页面标题&lt;br&gt;
如图&lt;br&gt;
&lt;img src=&quot;/posts/typeecho-articles-interface-setting-up-multilingual-languages/images/3046832783.png&quot; alt=&quot;pages-003tech.png&quot; title=&quot;pages-003tech.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
然后&lt;br&gt;
在主题libs/Content.php修改echoPostList()来修改首页标题&lt;br&gt;
如图&lt;br&gt;
&lt;img src=&quot;/posts/typeecho-articles-interface-setting-up-multilingual-languages/images/3165480790.png&quot; alt=&quot;Content-echo-003tech.png&quot; title=&quot;Content-echo-003tech.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;实现方法&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x26;CN&amp;#x26;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;你好，世界！&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x26;/CN&amp;#x26;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x26;US&amp;#x26;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Hello,World!&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&amp;#x26;/US&amp;#x26;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;标题&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;\`中文\`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;~英文~&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;后台界面，（如果看不下去，以后可能会修改）。&lt;br&gt;
&lt;img src=&quot;/posts/typeecho-articles-interface-setting-up-multilingual-languages/images/772479860.png&quot; alt=&quot;change-lang-admin-003.png&quot; title=&quot;change-lang-admin-003.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;然后问题就是针对AMP/MIP的插件还需要修改&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Handsome阅读模式出现全部内容显示，还需修改&lt;/strong&gt;&lt;br&gt;
&lt;del&gt;Handsome引用文章页面出现全部内容显示，还需修改&lt;/del&gt; 已解决见0.0.6&lt;br&gt;
&lt;strong&gt;以后会配置typecho后台文章界面显示单语言&lt;/strong&gt;&lt;br&gt;
&lt;del&gt;侧栏热门文章出现全标题，还需修改&lt;/del&gt; 已解决 见0.0.5&lt;br&gt;
&lt;strong&gt;以后会添加其他功能如可以手动切换语言等&lt;/strong&gt;&lt;br&gt;
&lt;del&gt;文章归档页面出现全标题，还需修改&lt;/del&gt; 已解决 见0.0.7&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;[scode type=“blue”]
版权声明：本文为原创文章，版权归 KYLIN 所有，转载请注明出处！
本文链接：&lt;a href=&quot;https://www.ioioi.cn/archives/typeecho-articles-interface-setting-up-multilingual-languages.html&quot;&gt;https://www.ioioi.cn/archives/typeecho-articles-interface-setting-up-multilingual-languages.html&lt;/a&gt;
如教程需要更新，或者相关链接出现404，可以在文章下面评论留言。
[/scode]&lt;/p&gt;</summary>
</entry>
<entry>
  <title>nftables一些常用配置文件</title>
  <link href="https://www.ioioi.cn/posts/some-common-configuration-files-for-nftables/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/some-common-configuration-files-for-nftables/</id>
  <published>2019-08-18T09:27:00.000Z</published>
  <updated>2019-08-18T09:27:00.000Z</updated>
  <summary type="html">&lt;p&gt;[post cid=“23” cover=“images/3488367350.png”/]&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;table inet filter {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    chain input {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        type filter hook input priority 0; policy drop;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        # established/related connections&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ct state established,related accept&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        # invalid connections&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ct state invalid drop&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        # loopback interface&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        iif lo accept&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        # ICMP &amp;#x26; IGMP&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ip6 nexthdr icmpv6 icmpv6 type { destination-unreachable, packet-too-big, time-exceeded, parameter-problem, mld-listener-query, mld-listener-report, mld-listener-reduction, nd-router-solicit, nd-router-advert, nd-neighbor-solicit, nd-neighbor-advert, ind-neighbor-solicit, ind-neighbor-advert, mld2-listener-report } accept&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ip protocol icmp icmp type { destination-unreachable, router-solicitation, router-advertisement, time-exceeded, parameter-problem } accept&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ip protocol igmp accept&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        # SSH (port 22)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        tcp dport ssh accept&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        # HTTP (ports 80 &amp;#x26; 443)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        tcp dport { http, https } accept&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    chain forward {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        type filter hook forward priority 0; policy drop;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    chain output {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        type filter hook output priority 0; policy accept;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;ssh限流&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;table inet filter {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    chain input {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        type filter hook input priority 0; policy drop;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ct state invalid drop&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        iif lo accept&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        # no ping floods:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ip protocol icmp icmp type echo-request limit rate over 10/second burst 4 packets  drop&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ip6 nexthdr icmpv6 icmpv6 type echo-request limit rate over 10/second burst 4 packets drop&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ct state established,related accept&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        # ICMP &amp;#x26; IGMP&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ip6 nexthdr icmpv6 icmpv6 type { destination-unreachable, packet-too-big, time-exceeded, parameter-problem, mld-listener-query, mld-listener-report, mld-listener-reduction, nd-router-solicit, nd-router-advert, nd-neighbor-solicit, nd-neighbor-advert, ind-neighbor-solicit, ind-neighbor-advert, mld2-listener-report } accept&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ip protocol icmp icmp type { destination-unreachable, router-solicitation, router-advertisement, time-exceeded, parameter-problem } accept&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        ip protocol igmp accept&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        # avoid brute force on ssh限流15次/分钟:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        tcp dport ssh ct state new limit rate 15/minute accept&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    chain forward {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        type filter hook forward priority 0; policy drop;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    chain output {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        type filter hook output priority 0; policy accept;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;要分TCP、UDP的话使用tcp、udp参数即可&lt;br&gt;
详情可见：&lt;a href=&quot;https://wiki.debian.org/nftables&quot;&gt;https://wiki.debian.org/nftables&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>如何使用firewall、ufw、iptables的替代品nftables</title>
  <link href="https://www.ioioi.cn/posts/how-to-use-nftables-as-an-alternative-to-firewall-ufw-and-iptables/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/how-to-use-nftables-as-an-alternative-to-firewall-ufw-and-iptables/</id>
  <published>2019-08-18T09:25:00.000Z</published>
  <updated>2019-08-18T09:25:00.000Z</updated>
  <summary type="html">&lt;p&gt;更改默认设置&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# update-alternatives --set iptables /usr/sbin/iptables-nft&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# update-alternatives --set ip6tables /usr/sbin/ip6tables-nft&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# update-alternatives --set arptables /usr/sbin/arptables-nft&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# update-alternatives --set ebtables /usr/sbin/ebtables-nft&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;清空当前规则集：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# nft flush ruleset&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;添加一个表：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# nft add table inet filter&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;添加input、forward和output三个基本链。input和forward的默认策略是drop。output的默认策略是accept。&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# nft add chain inet filter input { type filter hook input priority 0 \; policy drop \; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# nft add chain inet filter forward { type filter hook forward priority 0 \; policy drop \; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# nft add chain inet filter output { type filter hook output priority 0 \; policy accept \; }&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;添加两个与TCP和UDP关联的常规链：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# nft add chain inet filter TCP&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# nft add chain inet filter UDP&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;related和established的流量会accept：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# nft add rule inet filter input ct state related,established accept&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;loopback接口的流量会accept：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# nft add rule inet filter input iif lo accept&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;无效的流量会drop：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# nft add rule inet filter input ct state invalid drop&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;新的echo请求（ping）会accept：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# nft add rule inet filter input ip protocol icmp icmp type echo-request ct state new accept&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;新的UDP流量跳转到UDP链：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# nft add rule inet filter input ip protocol udp ct state new jump UDP&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;新的TCP流量跳转到TCP链：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# nft add rule inet filter input ip protocol tcp tcp flags \&amp;#x26; \(fin\|syn\|rst\|ack\) == syn ct state new jump TCP&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;未由其他规则处理的所有通信会reject：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# nft add rule inet filter input ip protocol udp reject&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# nft add rule inet filter input ip protocol tcp reject with tcp reset&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# nft add rule inet filter input counter reject with icmp type prot-unreachable&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;此时，应决定对传入连接打开哪些端口，这些由TCP和UDP链处理。例如，要打开web服务器的连接端口，添加：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# nft add rule inet filter TCP tcp dport 80 accept&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;要打开web服务器HTTPS连接端口443：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# nft add rule inet filter TCP tcp dport 443 accept&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;允许SSH连接端口22：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# nft add rule inet filter TCP tcp dport 22 accept&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;允许传入DNS请求：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# nft add rule inet filter TCP tcp dport 53 accept&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# nft add rule inet filter UDP udp dport 53 accept&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;确保更改是永久的（写入到文件）。&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# nft list ruleset &gt; /etc/nftables.conf&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;参考：&lt;a href=&quot;https://wiki.archlinux.org/index.php/Nftables_&quot;&gt;https://wiki.archlinux.org/index.php/Nftables_&lt;/a&gt;(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Linux网络重装Centos，Fedora</title>
  <link href="https://www.ioioi.cn/posts/linux-network-reload-centos-fedora/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/linux-network-reload-centos-fedora/</id>
  <published>2019-08-17T09:23:00.000Z</published>
  <updated>2019-08-17T09:23:00.000Z</updated>
  <summary type="html">&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;wget -O /boot/initrd.img http://mirror.centos.org/centos/7/os/x86_64/images/pxeboot/initrd.img&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;wget -O /boot/vmlinuz http://mirror.centos.org/centos/7/os/x86_64/images/pxeboot/vmlinuz&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cp /boot/initrd.img /&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cp /boot/vmlinuz /&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;nano /etc/grub.d/40_custom&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;menuentry &quot;InstallCentOS7&quot; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    set root=&apos;(hd0,msdos1)&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    linux /vmlinuz repo=http://mirror.centos.org/centos/7/os/x86_64/ ip=45.129.2.183 netmask=255.255.254.0 gateway=45.129.2.1 nameserver=1.1.1.1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    initrd /initrd.img&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;ip可以直接写&lt;code&gt;ip=dhcp&lt;/code&gt;也可以，如果是用dncp的话&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grub2-mkconfig --output=/boot/grub2/grub.cfg&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grub2-set-default InstallCentOS7&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;或&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grub-mkconfig --output=/boot/grub/grub.cfg&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grub-set-default InstallCentOS7&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Fedora同理&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;wget -O /boot/initrd.img https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/images/pxeboot/initrd.img&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;wget -O /boot/vmlinuz https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/images/pxeboot/vmlinuz&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cp /boot/initrd.img /&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cp /boot/vmlinuz /&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;nano /etc/grub.d/40_custom&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;menuentry &quot;InstallFedora30&quot; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    set root=&apos;(hd0,msdos1)&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    linux /vmlinuz repo=https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/ ip=dhcp&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    initrd /initrd.img&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;注：这是rawhide版，也就相当于测试版，如需正式版，自己找&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grub2-mkconfig --output=/boot/grub2/grub.cfg&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grub2-set-default InstallFedora30&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;如果系统是grub的话&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grub-mkconfig --output=/boot/grub/grub.cfg&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grub-set-default InstallCentOS7&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;即可&lt;/p&gt;</summary>
</entry>
<entry>
  <title>在开启selinux的情况下更换ssh端口</title>
  <link href="https://www.ioioi.cn/posts/replacement-of-ssh-port-with-selinux-enabled/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/replacement-of-ssh-port-with-selinux-enabled/</id>
  <published>2019-08-13T09:22:00.000Z</published>
  <updated>2019-08-13T09:22:00.000Z</updated>
  <summary type="html">&lt;p&gt;semanage port -a -t ssh_port_t -p tcp 22122&lt;/p&gt;</summary>
</entry>
<entry>
  <title>Fedora中设置开机脚本，并配置he-ipv6</title>
  <link href="https://www.ioioi.cn/posts/set-up-boot-script-in-fedora-and-configure-heipv6/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/set-up-boot-script-in-fedora-and-configure-heipv6/</id>
  <published>2019-08-13T09:22:00.000Z</published>
  <updated>2019-08-13T09:22:00.000Z</updated>
  <summary type="html">&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo touch /etc/rc.d/rc.local&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo nano /etc/rc.d/rc.local&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#!/bin/bash&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sh /mycmd/getipv6.sh&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chmod +x /etc/rc.d/rc.local&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo nano /usr/lib/systemd/system/rc-local.service&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[Install]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;WantedBy=multi-user.target&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo systemctl enable rc-local.service&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</summary>
</entry>
<entry>
  <title>使用docker搭建邮件服务器</title>
  <link href="https://www.ioioi.cn/posts/using-docker-to-build-mail-server/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/using-docker-to-build-mail-server/</id>
  <published>2019-08-10T09:21:00.000Z</published>
  <updated>2019-08-10T09:21:00.000Z</updated>
  <summary type="html">&lt;p&gt;使用&lt;code&gt;Poste.io&lt;/code&gt;搭建&lt;br&gt;
&lt;img src=&quot;/posts/using-docker-to-build-mail-server/images/1941857916.png&quot; alt=&quot;poste.png&quot; title=&quot;poste.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;docker run -d \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    --net=host \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    -v /etc/localtime:/etc/localtime:ro \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    -v /poste/data:/data \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    --name &quot;mailserver&quot; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    --privileged=true \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    --restart=always \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    -h &quot;mail.xyz.blue&quot; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    -t analogic/poste.io&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;具体见官网：&lt;a href=&quot;https://poste.io&quot;&gt;https://poste.io&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>小内存服务器设置swap虚拟内存，及优化参数</title>
  <link href="https://www.ioioi.cn/posts/setting-up-swap-virtual-memory-on-small-memory-server-and-optimizing-parameters/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/setting-up-swap-virtual-memory-on-small-memory-server-and-optimizing-parameters/</id>
  <published>2019-08-08T09:18:00.000Z</published>
  <updated>2019-08-08T09:18:00.000Z</updated>
  <summary type="html">&lt;p&gt;避免应用程序内存不足错误的最简单方法之一是为服务器添加一些Swap空间。Swap分区在系统的物理内存不够用的时候，把物理内存中的一部分空间释放出来，以供当前运行的程序使用。那些被释放的空间可能来自一些很长时间没有什么操作的程序，这些被释放的空间被临时保存到Swap分区中，等到那些程序要运行时，再从Swap分区中恢复保存的数据到内存中。&lt;/p&gt;
&lt;p&gt;注意：虽然我们建议对使用传统机械硬盘驱动器的系统进行交换，但对于SSD来说，使用Swap可能会导致硬件随着时间的推移而出现问题。出于这种考虑，我们不建议在任何其他使用SSD存储上启用Swap。这样做会影响底层硬件的可靠性。本教程更建议采用传统机械硬盘的用户使用。&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;速通版&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo fallocate -l 1G /swapfile&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo chmod 600 /swapfile&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo mkswap /swapfile&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo swapon /swapfile&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;echo &apos;/swapfile none swap sw 0 0&apos; | sudo tee -a /etc/fstab&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;第一步、检查系统的交换信息&lt;/strong&gt;&lt;br&gt;
我们可以先来检查一下系统是否已经有可用的Swap空间。我们可以有多个Swap文件或Swap分区，但通常来讲一个便足够了。&lt;/p&gt;
&lt;p&gt;我们可以通过输入以下内容来查看系统是否已配置Swap：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo swapon --show&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;如果您没有收到任何输出，这意味着您的系统当前没有可用的Swap空间。&lt;/p&gt;
&lt;p&gt;您可以使用free命令证有没有活动的swap：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;free -h&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;total        used        free      shared  buff/cache   available&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Mem:           985M         84M        222M        680K        678M        721M&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Swap:            0B          0B          0B&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;正如您在输出的Swap行中所看到的，系统上没有正在活动的swap。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;第二步、检查硬盘驱动器分区上的可用空间&lt;/strong&gt;&lt;br&gt;
在我们创建swap文件之前，我们将检查当前的磁盘使用情况，以确保我们有足够的空间。通过输入：&lt;br&gt;
&lt;img src=&quot;/posts/setting-up-swap-virtual-memory-on-small-memory-server-and-optimizing-parameters/images/2831870658.png&quot; alt=&quot;swap.png&quot; title=&quot;swap.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;df -h&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Filesystem      Size  Used Avail Use% Mounted on&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;udev            481M     0  481M   0% /dev&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tmpfs            99M  656K   98M   1% /run&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;/dev/vda1        25G  1.4G   23G   6% /&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tmpfs           493M     0  493M   0% /dev/shm&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tmpfs           5.0M     0  5.0M   0% /run/lock&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tmpfs           493M     0  493M   0% /sys/fs/cgroup&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;/dev/vda15      105M  3.4M  102M   4% /boot/efi&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tmpfs            99M     0   99M   0% /run/user/1000&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Mounted on列中的&lt;code&gt;/dev/vda1&lt;/code&gt;是我们的磁盘。在这个例子中我们有足够的空间（仅有1.4G被使用）。&lt;/p&gt;
&lt;p&gt;对swap空间的适当大小实际上取决于您的个人偏好和您的应用程序要求。通常，等于或双倍于系统内存的量是一个很好的选择。如果您只是将其用作RAM后备，那么你的swap分区尽可能不要超过4G。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;第三步、创建Swap分区文件&lt;/strong&gt;&lt;br&gt;
我们可以在文件系统上创建一个swap分区。我们将在根/目录中分配我们想要调用的swap大小的文件swapfile。&lt;/p&gt;
&lt;p&gt;创建交换文件的最佳方法是使用fallocate。此命令将创建指定大小的文件。&lt;/p&gt;
&lt;p&gt;由于我们示例中的服务器具有1G的RAM，因此我们将在本教程中创建1G文件：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo fallocate -l 1G /swapfile&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;我们可以通过输入以下内容来验证其是否保留了正确的空间量：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ls -lh /swapfile&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;-rw-r--r-- 1 root root 1.0G Apr 25 11:14 /swapfile&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;第四步、启用Swap分区&lt;/strong&gt;&lt;br&gt;
我们需要将swap文件转换为swap分区。首先，我们需要锁定文件的权限，以便只有具有root权限的用户才能读取内容。&lt;/p&gt;
&lt;p&gt;通过输入以下内容使该文件只能由root访问：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo chmod 600 /swapfile&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;输入以下命令验证权限更改：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ls -lh /swapfile&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;-rw------- 1 root root 1.0G Apr 25 11:14 /swapfile&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;如您所见，只有root用户启用了读写标志。&lt;/p&gt;
&lt;p&gt;我们现在可以通过输入以下内容将文件标记为swap空间&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo mkswap /swapfile&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Setting up swapspace version 1, size = 1024 MiB (1073737728 bytes)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;no label, UUID=6e965805-2ab9-450f-aed6-577e74089dbf&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;标记文件后，我们可以启用swap文件：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo swapon /swapfile&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;输入以下内容验证交换是否可用：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo swapon --show&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NAME      TYPE  SIZE USED PRIO&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;/swapfile file 1024M   0B   -2&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;我们可以用free命令再次检查：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;free -h&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;total        used        free      shared  buff/cache   available&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Mem:           985M         84M        220M        680K        680M        722M&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Swap:          1.0G          0B        1.0G&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;我们的swap已成功设置，我们的操作系统将在必要时使用它。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;第五步、永久化swap文件&lt;/strong&gt;&lt;br&gt;
我们已启用当前会话中的swap文件。但是，如果我们重新启动的话，服务器将不会自动保留swap设置。我们可以通过将交换文件添加到我们的&lt;code&gt;/etc/fstab&lt;/code&gt;来进行更改。&lt;/p&gt;
&lt;p&gt;为了避免出现任何问题，先备份&lt;code&gt;/etc/fstab&lt;/code&gt;文件：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo cp /etc/fstab /etc/fstab.bak&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;输入以下内容，将swap文件信息添加到&lt;code&gt;/etc/fstab&lt;/code&gt;文件末尾：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;echo &apos;/swapfile none swap sw 0 0&apos; | sudo tee -a /etc/fstab&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;接下来，我们将调整我们的swap空间。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;第六步、调整您的Swap设置&lt;/strong&gt;&lt;br&gt;
您可以配置一些选项，这些选项会在处理swap时对系统的性能产生影响。&lt;/p&gt;
&lt;p&gt;调整Swappiness参数&lt;br&gt;
该swappiness参数主要配置系统将数据从RAM交换到交换空间的频率。该参数的值是介于0和100之间的百分比。&lt;/p&gt;
&lt;p&gt;当值接近于零时，除非绝对必要，否则内核不会将数据交换到磁盘。请记住，与swap文件的交互是“费时的”，因为它们比与RAM的交互花费更长的时间，并且它们可能导致性能的显着降低。&lt;/p&gt;
&lt;p&gt;当该值接近100时，其将尝试将更多数据放入交换中以努力保留更多的RAM空间。我们可以通过输入以下内容来查看当前的swappiness值：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cat /proc/sys/vm/swappiness&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;60&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;对于服务器本身来说，您可能希望这个数值更接近于0。我们可以使用&lt;code&gt;sysctl&lt;/code&gt;命令将swappiness设置为不同的值。&lt;/p&gt;
&lt;p&gt;例如，要将swappiness设置为10，我们可以输入：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo sysctl vm.swappiness=10&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;vm.swappiness = 10&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;我们可以通过在&lt;code&gt;/etc/sysctl.conf&lt;/code&gt;文件中添加以下行来自动设置此值：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo nano /etc/sysctl.conf&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;在底部，您可以添加：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;vm.swappiness=10&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;完成后保存并关闭文件。&lt;/p&gt;
&lt;p&gt;调整缓存压力设置&lt;br&gt;
您可能想要修改的另一个相关值是&lt;code&gt;vfs_cache_pressure&lt;/code&gt;。这将关系到系统选择多少缓存inode和dentry信息。&lt;/p&gt;
&lt;p&gt;您可以通过proc命令来查看当前值：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cat /proc/sys/vm/vfs_cache_pressure&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;100&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;我的设置系统会很快地从缓存中删除inode信息。我们可以通过输入以下内容将其设置为更保守的值（如50）更快就200：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo sysctl vm.vfs_cache_pressure=50&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;vm.vfs_cache_pressure = 50&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;同样，这仅适用于我们当前的会话。我们可以通过将其添加到配置文件来改变它，就像我们使用swappiness设置一样：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sudo nano /etc/sysctl.conf&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;在底部，添加指定新值的行：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;vm.vfs_cache_pressure=50&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;完成后保存并关闭文件。&lt;/p&gt;
&lt;p&gt;结论&lt;br&gt;
本教程将为您提供一些额外的空间来避免内存不足的异常。swap空间可以避免一些常见问题。如果遇到内存不足错误，或者发现系统无法使用所需的应用程序，您的最佳解决方案是优化应用程序配置或升级服务器。&lt;/p&gt;
&lt;p&gt;转自：&lt;a href=&quot;https://cloud.tencent.com/developer/article/1165387&quot;&gt;https://cloud.tencent.com/developer/article/1165387&lt;/a&gt;修改了部分&lt;/p&gt;</summary>
</entry>
<entry>
  <title>转义字符含义，方便记忆</title>
  <link href="https://www.ioioi.cn/posts/conversion-character-meaning-convenient-memory/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/conversion-character-meaning-convenient-memory/</id>
  <published>2019-08-08T09:17:00.000Z</published>
  <updated>2019-08-08T09:17:00.000Z</updated>
  <summary type="html">&lt;p&gt;\n是newline&lt;br&gt;
\t是tabulator（也就是键盘上的tab）&lt;br&gt;
\v是vertical tab&lt;br&gt;
\b是backspace（也就是键盘上的退格键）&lt;br&gt;
\r是return （也就是键盘上的回车，只不过键盘上写的是enter，意为进入）&lt;br&gt;
\f是form feed（或feed）&lt;br&gt;
\a是alarm&lt;/p&gt;</summary>
</entry>
<entry>
  <title>部分电信光猫查看超级管理员密码</title>
  <link href="https://www.ioioi.cn/posts/some-telecom-optical-cats-view-super-administrator-password/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/some-telecom-optical-cats-view-super-administrator-password/</id>
  <published>2019-08-02T23:09:00.000Z</published>
  <updated>2019-08-02T23:09:00.000Z</updated>
  <summary type="html">&lt;p&gt;打开&lt;a href=&quot;http://192.168.1.1/cgi-bin/baseinfoSet.cgi&quot;&gt;http://192.168.1.1/cgi-bin/baseinfoSet.cgi&lt;/a&gt;&lt;br&gt;
部分可以，其实还是通过某个”网页”来查看用户信息&lt;br&gt;
如图&lt;br&gt;
&lt;img src=&quot;/posts/some-telecom-optical-cats-view-super-administrator-password/images/1132294548.png&quot; alt=&quot;telecom.png&quot; title=&quot;telecom.png&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
使用下面python脚本进行解密：&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;list=[120,105,112,105,103,115,113,101,104,113,109,114,53,48,54,55,54,51,51,57]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;result=[]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;for i in list:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    if i &gt; 57:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        i-=4&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    result.append(chr(i))&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;print &apos;&apos;.join(result)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;如果没有python环境&lt;br&gt;
可以在线运行&lt;br&gt;
&lt;a href=&quot;http://www.pythontip.com/coding/run&quot;&gt;http://www.pythontip.com/coding/run&lt;/a&gt;&lt;br&gt;
list=替换成自己设备的加密密码即可。&lt;br&gt;
&lt;img src=&quot;/posts/some-telecom-optical-cats-view-super-administrator-password/images/2842940812.png&quot; alt=&quot;telecom-python.png&quot; title=&quot;telecom-python.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;p&gt;部分来自：&lt;a href=&quot;https://blog.51cto.com/jzking121/1750713&quot;&gt;https://blog.51cto.com/jzking121/1750713&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>在Ubuntu17.04+中使用netplan配置ipv6隧道</title>
  <link href="https://www.ioioi.cn/posts/using-netplan-to-configure-ipv6-tunnel-in-ubuntu-1704/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/using-netplan-to-configure-ipv6-tunnel-in-ubuntu-1704/</id>
  <published>2019-08-01T09:09:00.000Z</published>
  <updated>2019-08-01T09:09:00.000Z</updated>
  <summary type="html">&lt;p&gt;我们知道在Ubuntu17.04+中使用了&lt;code&gt;netplan&lt;/code&gt;来代替&lt;code&gt;/etc/network/interfaces&lt;/code&gt;&lt;br&gt;
那么有两种方法&lt;br&gt;
一：&lt;br&gt;
卸载netplan重新使用interfaces&lt;br&gt;
&lt;code&gt;apt-get remove netplan&lt;/code&gt;&lt;br&gt;
然后参照/etc/network/interfaces中注释的部分的来做，由于没有Ubuntu的机器，等有了再加&lt;/p&gt;
&lt;p&gt;二：&lt;br&gt;
以较出名的he-ipv6为例&lt;br&gt;
1.创建 &lt;code&gt;/etc/systemd/network/he-ipv6.network&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[Match]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[Network]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Tunnel=he-ipv6&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;2.创建 &lt;code&gt;/etc/systemd/network/he-ipv6-tunnel.netdev&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[Match]                                                                                                                                                                                                            &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[NetDev]                                                                                                                                                                                                           &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Name=he-ipv6                                        &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Kind=sit                                            &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[Tunnel]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Independent=true                                            &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Local=192.168.0.x #Private IP if behind NAT or Public IP without NAT                                   &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Remote=184.105.250.46 #Tunnel broker&apos;s IPv4 address                         &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;TTL=255&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;3.配置 &lt;code&gt;/etc/netplan/01-netcfg.yaml&lt;/code&gt;&lt;br&gt;
&lt;code&gt;nano /etc/netplan/01-netcfg.yaml&lt;/code&gt;&lt;br&gt;
使用自己喜欢的编辑器，这里使用nano&lt;br&gt;
&lt;img src=&quot;/posts/using-netplan-to-configure-ipv6-tunnel-in-ubuntu-1704/images/401562863.png&quot; alt=&quot;he-ipv6.png&quot; title=&quot;he-ipv6.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# This file describes the network interfaces available on your system&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# For more information, see netplan(5).&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;network:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  version: 2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  renderer: networkd&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  ethernets:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      he-ipv6:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          dhcp4: no&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          dhcp6: no&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          addresses: [&apos;2001:470:xxx:xxx::2/64&apos;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          gateway6: 2001:470:xxx:xxx::1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      enp0s3:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      ...&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;顺序会有所差别，不过一定要注意格式！&lt;br&gt;
那个dhcp的可要可不要&lt;br&gt;
4.重启网络&lt;br&gt;
&lt;code&gt;systemctl restart systemd-networkd &amp;#x26;&amp;#x26; netplan apply&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;部分来自：&lt;a href=&quot;https://askubuntu.com/questions/990195/ipv6-tunnel-in-ubuntu-17-10&quot;&gt;https://askubuntu.com/questions/990195/ipv6-tunnel-in-ubuntu-17-10&lt;/a&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>typecho中如何使用emoji</title>
  <link href="https://www.ioioi.cn/posts/how-to-use-emoji-in-typecho/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/how-to-use-emoji-in-typecho/</id>
  <published>2019-08-01T09:07:00.000Z</published>
  <updated>2019-08-01T09:07:00.000Z</updated>
  <summary type="html">&lt;p&gt;数据库使用utf8mb4或者使用sqlite数据库即可。&lt;br&gt;
效果：😘😁😍🤣😂😊😉😎😜&lt;/p&gt;</summary>
</entry>
<entry>
  <title>如何查看typecho中页面的cid？</title>
  <link href="https://www.ioioi.cn/posts/how-to-view-cid-of-the-page-in-typecho/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/how-to-view-cid-of-the-page-in-typecho/</id>
  <published>2019-08-01T09:05:00.000Z</published>
  <updated>2019-08-01T09:05:00.000Z</updated>
  <summary type="html">&lt;p&gt;如何查看typecho中页面的cid？&lt;br&gt;
如果当你把页面的链接自定义了的话，那么打开页面，如图所示就是页面的cid了，文章也一样。&lt;img src=&quot;/posts/how-to-view-cid-of-the-page-in-typecho/images/589478119.png&quot; alt=&quot;cid.png&quot; title=&quot;cid.png&quot; loading=&quot;lazy&quot;&gt;&lt;/p&gt;</summary>
</entry>
<entry>
  <title>你好，世界！</title>
  <link href="https://www.ioioi.cn/posts/start/" rel="alternate" type="text/html"/>
  <id>https://www.ioioi.cn/posts/start/</id>
  <published>2019-08-01T08:15:00.000Z</published>
  <updated>2019-08-01T08:15:00.000Z</updated>
  <summary type="html">&lt;p&gt;&lt;img src=&quot;/posts/start/images/963228996.jpg&quot; alt=&quot;你好，世界.jpg&quot; title=&quot;你好，世界.jpg&quot; loading=&quot;lazy&quot;&gt;&lt;br&gt;
你好，世界！&lt;/p&gt;</summary>
</entry>
</feed>
