<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>HWHL博客</title>
        <link>https://blog.hwhl.fun/</link>
        <description>HWHL的博客</description>
        <lastBuildDate>Thu, 04 Dec 2025 06:35:13 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>zh-CN</language>
        <copyright>All rights reserved 2025, hwhl</copyright>
        <item>
            <title><![CDATA[S3协议访问其他云对象存储]]></title>
            <link>https://blog.hwhl.fun/article/21b210e3-2d57-802d-b35e-d7af1149e47c</link>
            <guid>https://blog.hwhl.fun/article/21b210e3-2d57-802d-b35e-d7af1149e47c</guid>
            <pubDate>Mon, 23 Jun 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[S3 是使用最广泛的对象存储服务之一，其他的云存储和对象存储兼容S3 API，开发者在使用时，直接使用现有的S3 工具/SDK，大大的节省了时间和资源。文章主要讨论了几种对象存储的配置方式。]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-21b210e32d57802db35ed7af1149e47c"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-callout notion-gray_background_co notion-block-21b210e32d578067bfa5eb8c25f57365"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="😀">😀</span></div><div class="notion-callout-text">AWS S3是第一批也是最广泛使用的云存储服务之一，大量的工具和开发都是围绕着AWS API构建的，因此，S3的API自然而然地成为了对象存储的<b>事实标准</b>，它健壮、文档完善，并得到了庞大开发者社区的理解。</div></div><div class="notion-blank notion-block-21b210e32d5780c4b6ffd6644380eeda"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-21b210e32d57805b821fed5da0791ad7" data-id="21b210e32d57805b821fed5da0791ad7"><span><div id="21b210e32d57805b821fed5da0791ad7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#21b210e32d57805b821fed5da0791ad7" title="📝 各类对象存储"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">📝 各类对象存储</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-21b210e32d578074985ceb1ebec18ced" data-id="21b210e32d578074985ceb1ebec18ced"><span><div id="21b210e32d578074985ceb1ebec18ced" class="notion-header-anchor"></div><a class="notion-hash-link" href="#21b210e32d578074985ceb1ebec18ced" title="Google Cloud Storage(GCS)"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Google Cloud Storage(GCS)</span></span></h3><div class="notion-text notion-block-21b210e32d57806c87a2d7196b338400">首先在GCP HMAC获取下 access key / secret key: <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://cloud.google.com/storage/docs/authentication/managing-hmackeys">https://cloud.google.com/storage/docs/authentication/managing-hmackeys</a></div><div class="notion-text notion-block-21b210e32d5780808630daae27521940">使用Boto3 访问: <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://cloud.google.com/storage/docs/aws-simple-migration">https://cloud.google.com/storage/docs/aws-simple-migration</a></div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-21b210e32d5780f7bd31fa540047a988" data-id="21b210e32d5780f7bd31fa540047a988"><span><div id="21b210e32d5780f7bd31fa540047a988" class="notion-header-anchor"></div><a class="notion-hash-link" href="#21b210e32d5780f7bd31fa540047a988" title="火山云 volcengine"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">火山云 volcengine</span></span></h3><div class="notion-text notion-block-21b210e32d5780cb961efec92f57f322">在文档中提到了可以使用 S3 工具访问: <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.volcengine.com/docs/6349/147050">AWS S3 协议兼容性说明</a>, 但没有给出python boto3 的代码示例。</div><div class="notion-text notion-block-21b210e32d57807694c8f55aeecc7c4f">参考 文档中提到的 <code class="notion-inline-code">VirtualHost 访问方式</code>: <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.volcengine.com/docs/6349/651320">https://www.volcengine.com/docs/6349/651320</a>
以及 <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.volcengine.com/docs/6349/81434">使用 Rclone 访问 TOS</a> <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.volcengine.com/docs/6349/111935">使用 S3 Browser 管理 TOS 资源</a> 文档中说明:</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-21b210e32d5780548d34fe70e6061300" data-id="21b210e32d5780548d34fe70e6061300"><span><div id="21b210e32d5780548d34fe70e6061300" class="notion-header-anchor"></div><a class="notion-hash-link" href="#21b210e32d5780548d34fe70e6061300" title="MinIO"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">MinIO</span></span></h3><div class="notion-text notion-block-21b210e32d578027b56fdc3a0e43963a">开源的对象存储，从项目初始对S3 API的支持。不过最近出现了企业版本和社区版本的区别，好多S3权限管理的功能放到了企业版中，需要提前决策是否使用。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-21b210e32d5780c591bdd592caffad6e" data-id="21b210e32d5780c591bdd592caffad6e"><span><div id="21b210e32d5780c591bdd592caffad6e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#21b210e32d5780c591bdd592caffad6e" title="其他云"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">其他云</span></span></h3><div class="notion-text notion-block-21b210e32d5780d5abe1ed0029fd30ee">B2(Blackblaze): <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.backblaze.com/docs/cloud-storage-use-the-aws-sdk-for-python-with-backblaze-b2">https://www.backblaze.com/docs/cloud-storage-use-the-aws-sdk-for-python-with-backblaze-b2</a></div><div class="notion-text notion-block-21b210e32d578033805bebc737fbc033">CloudFlare R2:
<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://developers.cloudflare.com/r2/examples/aws/boto3/">https://developers.cloudflare.com/r2/examples/aws/boto3/</a></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-21b210e32d57808981eade995fb3df3f" data-id="21b210e32d57808981eade995fb3df3f"><span><div id="21b210e32d57808981eade995fb3df3f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#21b210e32d57808981eade995fb3df3f" title="🤗 总结归纳"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">🤗 总结归纳</span></span></h2><div class="notion-text notion-block-21b210e32d5780be9d6ddfc749093474">上面主要讨论了几种对象存储的Python SDK配置和使用。了解了之后，也可以使用相同的选项来配置其他语言的SDK，或是其他的S3工具（如 Rclone / s3fs / hadoop 等等).</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-21b210e32d5780a7b030ddebd5984048" data-id="21b210e32d5780a7b030ddebd5984048"><span><div id="21b210e32d5780a7b030ddebd5984048" class="notion-header-anchor"></div><a class="notion-hash-link" href="#21b210e32d5780a7b030ddebd5984048" title="📎 参考文章"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">📎 参考文章</span></span></h2><ul class="notion-list notion-list-disc notion-block-21b210e32d5780f8984bccd1a49f0a71"><li>[S3](<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html">https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html</a>)</li></ul><div class="notion-blank notion-block-21b210e32d578002abafeaeabbf4e28c"> </div><div class="notion-callout notion-gray_background_co notion-block-21b210e32d578070b210dc0ae76c5f25"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text">有关Notion安装或者使用上的问题，欢迎您在底部评论区留言，一起交流~</div></div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[使用ESP32S3来做个FIDO Passkey]]></title>
            <link>https://blog.hwhl.fun/article/esp32-s3-pico-fido</link>
            <guid>https://blog.hwhl.fun/article/esp32-s3-pico-fido</guid>
            <pubDate>Wed, 19 Mar 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[偶然发现了 Pico FIDO 这个项目，可以使用 RP2350/ESP32S3 等设备来做 FIDO Passkey，用作个人的物理安全密钥。下面使用 ESP32S3 来做一个YubiKey密钥。]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-1bb210e32d57809e819ef713c98ac0a6"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1bb210e32d5780b5b0d6e3bfea11cdf5" data-id="1bb210e32d5780b5b0d6e3bfea11cdf5"><span><div id="1bb210e32d5780b5b0d6e3bfea11cdf5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1bb210e32d5780b5b0d6e3bfea11cdf5" title="前言"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">前言</span></span></h2><div class="notion-text notion-block-1bb210e32d57805dabfcd7da9b5f903e">偶然发现了 <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/polhenarejos/pico-fido">Pico FIDO</a> 这个项目，可以使用 RP2350/ESP32S3 等设备来做 FIDO Passkey，用作个人的物理安全密钥。</div><div class="notion-text notion-block-1bb210e32d578052aec9ff9575bfc5d2">下面使用 ESP32S3 来做一个YubiKey密钥。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1bb210e32d57804b8ee2edd99bbe6a80" data-id="1bb210e32d57804b8ee2edd99bbe6a80"><span><div id="1bb210e32d57804b8ee2edd99bbe6a80" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1bb210e32d57804b8ee2edd99bbe6a80" title="TLDR;"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">TLDR;</span></span></h2><div class="notion-text notion-block-1bb210e32d5780828fc9e9bb3d0634eb">编译过程需要一定的Linux基础，可以选择下面的固件，跳过编译过程，直接来到烧写步骤。</div><ul class="notion-list notion-list-disc notion-block-1bb210e32d57805d9b46c391ca9d0c90"><li>pico_fido_esp32-s3-origin.bin 官方6.4原始代码编译的固件。</li></ul><ul class="notion-list notion-list-disc notion-block-1bb210e32d5780899bffe6206868f6b1"><li>pico_fido_esp32-s3-Yubikey5.bin 修改成YubiKey5，并将LED亮度调到最低，烧录后没有其他需要可忽略 Phy Settings步骤。</li></ul><div class="notion-file notion-block-1bb210e32d57805792a7f09674cfbc7f"><a target="_blank" rel="noopener noreferrer" class="notion-file-link" href="https://file.notion.so/f/f/435b5661-7c0f-4dec-aa7d-92258ad0dbaf/8fbd51a5-3f00-43c9-ae0b-2642b8411c49/pico_fido_esp32-s3-origin.bin?table=block&amp;id=1bb210e3-2d57-8057-92a7-f09674cfbc7f&amp;spaceId=435b5661-7c0f-4dec-aa7d-92258ad0dbaf&amp;expirationTimestamp=1764856800000&amp;signature=BhjNeAZrW6dDAhX5WlHhw2KdbSIkrmJ7bn8rOZ9HgBI"><svg class="notion-file-icon" viewBox="0 0 30 30"><path d="M22,8v12c0,3.866-3.134,7-7,7s-7-3.134-7-7V8c0-2.762,2.238-5,5-5s5,2.238,5,5v12c0,1.657-1.343,3-3,3s-3-1.343-3-3V8h-2v12c0,2.762,2.238,5,5,5s5-2.238,5-5V8c0-3.866-3.134-7-7-7S6,4.134,6,8v12c0,4.971,4.029,9,9,9s9-4.029,9-9V8H22z"></path></svg><div class="notion-file-info"><div class="notion-file-title">pico_fido_esp32-s3-origin.bin</div><div class="notion-file-size">550.0KB</div></div></a></div><div class="notion-file notion-block-1bb210e32d57809c901df0d6c670c24a"><a target="_blank" rel="noopener noreferrer" class="notion-file-link" href="https://file.notion.so/f/f/435b5661-7c0f-4dec-aa7d-92258ad0dbaf/6e8267e5-8735-487f-b50f-5611d6674bd7/pico_fido_esp32-s3-Yubikey5.bin?table=block&amp;id=1bb210e3-2d57-809c-901d-f0d6c670c24a&amp;spaceId=435b5661-7c0f-4dec-aa7d-92258ad0dbaf&amp;expirationTimestamp=1764856800000&amp;signature=oyH-m8L5TRJj9cSH2FOPRwaJ2dO5_0yjFMiCoVMcCgg"><svg class="notion-file-icon" viewBox="0 0 30 30"><path d="M22,8v12c0,3.866-3.134,7-7,7s-7-3.134-7-7V8c0-2.762,2.238-5,5-5s5,2.238,5,5v12c0,1.657-1.343,3-3,3s-3-1.343-3-3V8h-2v12c0,2.762,2.238,5,5,5s5-2.238,5-5V8c0-3.866-3.134-7-7-7S6,4.134,6,8v12c0,4.971,4.029,9,9,9s9-4.029,9-9V8H22z"></path></svg><div class="notion-file-info"><div class="notion-file-title">pico_fido_esp32-s3-Yubikey5.bin</div><div class="notion-file-size">550.0KB</div></div></a></div><div class="notion-callout notion-gray_background_co notion-block-1bb210e32d57809ab946e5ac3a7d6396"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-1bb210e32d5780c2b9ddddd2f0cc1f16">下载不了？试试网盘: <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://pan.baidu.com/s/1nrnu4hxUnQS-bd17lGTxzQ?pwd=linu">https://pan.baidu.com/s/1nrnu4hxUnQS-bd17lGTxzQ?pwd=linu</a> 提取码: linu</div></div></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1bb210e32d5780b08c89d6bf96c0796e" data-id="1bb210e32d5780b08c89d6bf96c0796e"><span><div id="1bb210e32d5780b08c89d6bf96c0796e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1bb210e32d5780b08c89d6bf96c0796e" title="编译固件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">编译固件</span></span></h2><div class="notion-text notion-block-1bb210e32d578082b47edff4f3f27789">克隆代码</div><div class="notion-text notion-block-1bb210e32d578010bcb5ef985aca2778">然后在目录下启动Docker构建环境，创建 docker-compose.yaml:</div><div class="notion-text notion-block-1bb210e32d57802e8055c7e869613433">然后启动: <code class="notion-inline-code">docker compose up -d</code></div><div class="notion-text notion-block-1bb210e32d5780e8b62bcc3f94487588">进入Docker 构建环境</div><div class="notion-text notion-block-1bb210e32d57808dbeaad5b1e5c6b914">下面的命令是在Docker 构建的容器内运行，执行时分步执行，注意检查有没有错误。</div><div class="notion-text notion-block-1bb210e32d57804da5b8c1952cdd4bf9">最后提示有合并 bin 文件 pico_fido_esp32-s3.bin，即说明编译成功。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1bb210e32d5780d1b422f2621b5bb112" data-id="1bb210e32d5780d1b422f2621b5bb112"><span><div id="1bb210e32d5780d1b422f2621b5bb112" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1bb210e32d5780d1b422f2621b5bb112" title="Flash"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Flash</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1bb210e32d578049b5b8c14adc3a1e13" data-id="1bb210e32d578049b5b8c14adc3a1e13"><span><div id="1bb210e32d578049b5b8c14adc3a1e13" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1bb210e32d578049b5b8c14adc3a1e13" title="烧写 ESP32-S3"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">烧写 ESP32-S3</span></span></h3><div class="notion-text notion-block-1bb210e32d578080a394edd8df28ce54">按住 BOOT 键，再按下 RESET，进入烧录模式</div><div class="notion-text notion-block-1bb210e32d57803f959afa8596d8c759">由于上面编译最后一步一景合并了bin，所以，直接从 0 地址烧写即可。</div><div class="notion-text notion-block-1bb210e32d5780e2aa49c53189915f54">看到输出出现 &quot;Hash of data verified.&quot; 表示烧写成功，设备也会自动重启。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1bb210e32d5780aeb913e5f8462887f7" data-id="1bb210e32d5780aeb913e5f8462887f7"><span><div id="1bb210e32d5780aeb913e5f8462887f7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1bb210e32d5780aeb913e5f8462887f7" title="Phy Setting"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Phy Setting</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1bb210e32d57800b8403d87a1a3093ed" data-id="1bb210e32d57800b8403d87a1a3093ed"><span><div id="1bb210e32d57800b8403d87a1a3093ed" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1bb210e32d57800b8403d87a1a3093ed" title="查看设备"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">查看设备</span></span></h3><div class="notion-text notion-block-1bb210e32d578087914fca29ce6cfeb1">MAC 上弹出 &quot;键盘设置助理&quot;，关闭即可</div><div class="notion-text notion-block-1bb210e32d5780c18bb0d15179da0b3e">从关于里面查看 USB，USB2.0 Hub下有 &quot;Pico Key&quot;:</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1bb210e32d5780dea578fd6546320846" data-id="1bb210e32d5780dea578fd6546320846"><span><div id="1bb210e32d5780dea578fd6546320846" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1bb210e32d5780dea578fd6546320846" title="定制FIDO设备"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">定制FIDO设备</span></span></h3><div class="notion-text notion-block-1bb210e32d5780048b5cd40d326a3aff">安装 libfido2， MacOS中安装命令为: <code class="notion-inline-code">brew install libfido2</code></div><div class="notion-text notion-block-1bb210e32d5780e3b285e0881e7b6edc">动态工具修改的使用方法，来自 <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/polhenarejos/pico-fido/issues/70#issuecomment-2508698543">GitHub讨论区</a>。
Run these commands:</div><ol start="1" class="notion-list notion-list-numbered notion-block-1bb210e32d578088a87bf652cd9b2ad0" style="list-style-type:decimal"><li><code class="notion-inline-code">fido2-token -L</code></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-1bb210e32d5780da8cc3f36fd7bba296" style="list-style-type:decimal"><li><code class="notion-inline-code">fido2-token -S &lt;device&gt;</code> for which <code class="notion-inline-code">&lt;device&gt;</code> is found in the previous step.</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-1bb210e32d5780e483c8c3fb9b3f78e0" style="list-style-type:decimal"><li><code class="notion-inline-code">python3 -m pip install fido2</code></li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-1bb210e32d57808dbd7cd7e842e8022c" style="list-style-type:decimal"><li><code class="notion-inline-code">git clone</code> this repo.</li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-1bb210e32d5780c8ae2bd87aff9739cb" style="list-style-type:decimal"><li><code class="notion-inline-code">cd pico-fido</code></li></ol><ol start="6" class="notion-list notion-list-numbered notion-block-1bb210e32d5780c4a4c1dafbea6ef564" style="list-style-type:decimal"><li><code class="notion-inline-code">python3 tools/pico-fido-tool.py --help</code> to see the options for configuration, and what command is necessary to run to configure them.</li></ol><div class="notion-text notion-block-1bb210e32d57801a8057c4d966ee3416">下面是详细的步骤和解释：</div><div class="notion-text notion-block-1bb210e32d5780d6afc3fa81ed76a9a9">由于 pico-fido-tool 需要输入PIN，而新烧写的还没有设置过，所以通过:</div><div class="notion-text notion-block-1bb210e32d57806aa6cccddd99e37414">LED 灯闪烁，亮度太高，调整亮度</div><div class="notion-text notion-block-1bb210e32d578090b878c09c99b62f49">设置为 Yubikey5 类型 (VID 0x1050 / PID: 0x0407)</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1bb210e32d57805a9e24c28e15f260d5" data-id="1bb210e32d57805a9e24c28e15f260d5"><span><div id="1bb210e32d57805a9e24c28e15f260d5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1bb210e32d57805a9e24c28e15f260d5" title="使用"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">使用</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1bb210e32d578066a5f6cdc90f4aeb2c" data-id="1bb210e32d578066a5f6cdc90f4aeb2c"><span><div id="1bb210e32d578066a5f6cdc90f4aeb2c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1bb210e32d578066a5f6cdc90f4aeb2c" title="使用 Yubico Authenticator"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">使用 <b>Yubico Authenticator</b></span></span></h3><div class="notion-text notion-block-1bb210e32d578088a71bfc852fb6dc2b">上面已经设置成 Yubikey5，这里使用 <b>Yubico Authenticator</b> 来管理，支持MacOS, Windows, Linux, Android, iOS 系统。</div><div class="notion-text notion-block-1bb210e32d5780e9bc5dfa33165715b3">下载软件： <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.yubico.com/products/yubico-authenticator/">https://www.yubico.com/products/yubico-authenticator/</a>
</div><div class="notion-text notion-block-1bb210e32d5780bd915bed6716377024">官方详细的介绍 <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://support.yubico.com/hc/en-us/articles/360016649059-Using-your-YubiKey-as-a-smart-card-in-macOS">Using your YubiKey as a smart card in macOS</a>, 其他设备也可以在页面中找到。</div><div class="notion-text notion-block-1bb210e32d578046b5fdca895d49bca1">安装完成后，打开 Yubico Authenticator，显示出 &quot;YubiKey 5A&quot;，正是刚刚的设备。</div><div class="notion-text notion-block-1bb210e32d57807fa8e8fdba12df0697">设置中有语言选项，但是社区的翻译不知道是什么语言的，还是继续用默认的英语。</div><div class="notion-text notion-block-1bb210e32d5780218a37e49f0db2eb72">在左侧的PassKeys中，输入 PIN后，查看保存的密钥，同时显示只有8次修改PIN的机会。</div><div class="notion-blank notion-block-1bb210e32d57802e8acac6533f73cb29"> </div><div class="notion-text notion-block-1bb210e32d578059a434e83059c2abe1">更多 Yubico 的使用方法参见文末的链接。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1bb210e32d578096b75ccebc84759d84" data-id="1bb210e32d578096b75ccebc84759d84"><span><div id="1bb210e32d578096b75ccebc84759d84" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1bb210e32d578096b75ccebc84759d84" title="额外话"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">额外话</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1bb210e32d578079ad96c683809cd094" data-id="1bb210e32d578079ad96c683809cd094"><span><div id="1bb210e32d578079ad96c683809cd094" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1bb210e32d578079ad96c683809cd094" title="安全选项"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">安全选项</span></span></h3><div class="notion-text notion-block-1bb210e32d578008a30ddefe20d704b2">ESP32 支持 OTP，只能烧入一次，且加密，更加安全。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1bb210e32d5780dfaef4f2e905473ddc" data-id="1bb210e32d5780dfaef4f2e905473ddc"><span><div id="1bb210e32d5780dfaef4f2e905473ddc" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1bb210e32d5780dfaef4f2e905473ddc" title="定制 ROM"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">定制 ROM</span></span></h3><ol start="1" class="notion-list notion-list-numbered notion-block-1bb210e32d5780fd9a6ad20f7352cb40" style="list-style-type:decimal"><li>pico-keys-sdk/src/led/led.h, 设置亮度到1(默认是15)
<code class="notion-inline-code">#define MAX_BTNESS 1</code></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-1bb210e32d578047ae35e30f6a574997" style="list-style-type:decimal"><li>在构建时指定 VIDPID</li><ol class="notion-list notion-list-numbered notion-block-1bb210e32d578047ae35e30f6a574997" style="list-style-type:lower-alpha"></ol></ol><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1bb210e32d5780d3b2a5ea27e69d228b" data-id="1bb210e32d5780d3b2a5ea27e69d228b"><span><div id="1bb210e32d5780d3b2a5ea27e69d228b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1bb210e32d5780d3b2a5ea27e69d228b" title="📎 参考文章"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">📎 参考文章</span></span></h2><ul class="notion-list notion-list-disc notion-block-1bb210e32d57802aaacdee58e98a8d6b"><li>Pico-FIDO: https://github.com/polhenarejos/pico-fido</li></ul><ul class="notion-list notion-list-disc notion-block-1bb210e32d578087b2d8d56c0a5a05f6"><li>Yubico 应用: <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.yubico.com/works-with-yubikey/catalog/?sort=popular">https://www.yubico.com/works-with-yubikey/catalog/?sort=popular</a></li></ul><div class="notion-blank notion-block-1bb210e32d578061821def99495a11dd"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker 安装 Mosquitto Server]]></title>
            <link>https://blog.hwhl.fun/article/iot-mosquitto-server</link>
            <guid>https://blog.hwhl.fun/article/iot-mosquitto-server</guid>
            <pubDate>Tue, 25 Feb 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[Eclipse Mosquitto 是一个开源的MQTT解决方案，本文介绍在Linux下使用docker方式部署一个broker，并设置不同的用户，为Homeassitant和ESPHome等提供MQTT服务。]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-1a5210e32d578083970ae89e2b92933b"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-callout notion-gray_background_co notion-block-1a5210e32d578002bc0ae3ce35a80501"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="😀">😀</span></div><div class="notion-callout-text">Eclipse Mosquitto 是一个开源的MQTT解决方案，本文介绍在Linux下使用docker方式部署一个broker，并设置不同的用户，为Homeassitant和ESPHome等提供MQTT服务。</div></div><div class="notion-blank notion-block-1a5210e32d578072b5bfd6dee50a4e0d"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1a5210e32d578055be4fdbd1359f3172" data-id="1a5210e32d578055be4fdbd1359f3172"><span><div id="1a5210e32d578055be4fdbd1359f3172" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1a5210e32d578055be4fdbd1359f3172" title="简介"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">简介</span></span></h2><div class="notion-text notion-block-1a5210e32d5780769944f30fa5aa4c56">Eclipse Mosquitto 是一个开源的MQTT解决方案，用来自建MQTT broker，支持 MQTT 5.0，3.1 和 3.1.1 等版本的协议。是一个非常轻量的方案，适合部署在Armbian和Raspberry Pi上。</div><div class="notion-blank notion-block-1a5210e32d578089ae0ece9415a392ba"> </div><div class="notion-text notion-block-1a5210e32d578005ab05fb5f30525b2e">Mosquitto 除了broker服务器外，也提供了客户端工具，如 mosquitto_pub / mosquitto_sub 命令来连接测试MQTT。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1a5210e32d578045bcd9d8a8b8960df6" data-id="1a5210e32d578045bcd9d8a8b8960df6"><span><div id="1a5210e32d578045bcd9d8a8b8960df6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1a5210e32d578045bcd9d8a8b8960df6" title="安装"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">安装</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1a5210e32d5780269821c3809a61deb8" data-id="1a5210e32d5780269821c3809a61deb8"><span><div id="1a5210e32d5780269821c3809a61deb8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1a5210e32d5780269821c3809a61deb8" title="docker-compose"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">docker-compose</span></span></h3><div class="notion-text notion-block-1a5210e32d57805ca6bcea27157a00f6">这里使用docker-compose来启动服务，docker-compose.yaml 配置如下：</div><div class="notion-text notion-block-1a5210e32d5780249e45d130ff33d430">解释：</div><ol start="1" class="notion-list notion-list-numbered notion-block-1a5210e32d5780ea8457ed3cde258a5f" style="list-style-type:decimal"><li>使用 eclipse-mosquitto 作为docker镜像。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-1a5210e32d57807e9690e746a78aa62b" style="list-style-type:decimal"><li>当前目录下的 mosquitto 目录作为 mosquitto 的配置目录。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-1a5210e32d5780b9843bdf4c3231ba70" style="list-style-type:decimal"><li>向外提供 1883 端口 和 9001 端口。</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-1a5210e32d578006bf32f319390adaad" style="list-style-type:decimal"><li><code class="notion-inline-code">user: &quot;1000:1000&quot;</code> 指定了容器内的运行身份，如果不指定，默认使用root身份运行。通过 <code class="notion-inline-code">id</code> 命令来获取实际的用户id和组id。</li></ol><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1a5210e32d578015b158d4a612301d55" data-id="1a5210e32d578015b158d4a612301d55"><span><div id="1a5210e32d578015b158d4a612301d55" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1a5210e32d578015b158d4a612301d55" title="配置"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">配置</span></span></h3><div class="notion-text notion-block-1a5210e32d5780e681fbc2c9a50beadb"><b>在当前目录下创建 mosquitto 文件夹，并创建配置文件:</b></div><ol start="1" class="notion-list notion-list-numbered notion-block-1a5210e32d5780569333efff5fa95eb2" style="list-style-type:decimal"><li>./mosquitto/passwd 文件中保存MQTT client的用户名和密码，文件必须设置为 700 权限。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-1a5210e32d578028a0aff66864523ea2" style="list-style-type:decimal"><li>./mosquitto/mosquitto.conf 是mosquitto的配置文件，禁止了匿名访问，更多的配置参加文末的参考链接。</li></ol><div class="notion-blank notion-block-1a5210e32d5780f5a588ea6fe21260d1"> </div><div class="notion-text notion-block-1a5210e32d5780c8bf65d3726033083d"><b>启动 mosquitto 服务</b></div><div class="notion-blank notion-block-1a5210e32d57800598b5fae23d12b3fd"> </div><div class="notion-text notion-block-1a5210e32d5780418d95ff2c23018edd"><b>创建用户密码</b></div><div class="notion-text notion-block-1a5210e32d57804daf8ce01ffebd2dba">默认情况下没有用户，需要执行下面的命令添加，多个用户需要针对每个用户分别执行下面的命令：</div><div class="notion-text notion-block-1a5210e32d5780cb93f7e89f4f093f99">⚠️注意，添加完用户或修改mosquitto配置后，需要重启容器才能生效:</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1a5210e32d5780c38080e3e6b2087831" data-id="1a5210e32d5780c38080e3e6b2087831"><span><div id="1a5210e32d5780c38080e3e6b2087831" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1a5210e32d5780c38080e3e6b2087831" title="使用"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">使用</span></span></h2><div class="notion-text notion-block-1a5210e32d5780bfbb68e74519831a36">下面使用mosquitto容器内自带的 mosquitto_pub/mosquitto_sub 来测试下MQTT服务，假设上一步创建的用户名和密码为：`user, password`</div><div class="notion-text notion-block-1a5210e32d578082bb5bfef5217c938b">发布消息后，在订阅的窗口将有对应的输出：</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1a5210e32d57803daf8eed5c9693c6e2" data-id="1a5210e32d57803daf8eed5c9693c6e2"><span><div id="1a5210e32d57803daf8eed5c9693c6e2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1a5210e32d57803daf8eed5c9693c6e2" title="🤗 总结"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">🤗 总结</span></span></h2><div class="notion-text notion-block-1a5210e32d5780ffa580e71dc71dc7bf">上面通过Docker启动了一个非常轻量的 Mosquitto 服务器，以便在HomeAssistant和ESPHome等设备上使用。</div><div class="notion-text notion-block-1a5210e32d578034a2a3eeca9d1010cf">除了Mosquitto外，还有 EMQX 等也可以通过 docker 来部署，大家根据实际的需要来安装。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1a5210e32d57802c9dc8cb62b1359ecb" data-id="1a5210e32d57802c9dc8cb62b1359ecb"><span><div id="1a5210e32d57802c9dc8cb62b1359ecb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1a5210e32d57802c9dc8cb62b1359ecb" title="📎 参考文章"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">📎 参考文章</span></span></h2><ul class="notion-list notion-list-disc notion-block-1a5210e32d57804fb421d0a3c2ea3432"><li><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://mosquitto.org/man/mosquitto-conf-5.html">mosquitto.conf man page</a></li></ul><ul class="notion-list notion-list-disc notion-block-1a5210e32d57802aa4a9d96bf00cfc53"><li><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://docs.emqx.com/zh/emqx/latest/deploy/install-open-source.html">安装 EMQX 开源版</a></li></ul><div class="notion-blank notion-block-1a5210e32d5780ccad6dc528fee4ff46"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[解决Terraform下载失败]]></title>
            <link>https://blog.hwhl.fun/article/terraform-provider-timeout</link>
            <guid>https://blog.hwhl.fun/article/terraform-provider-timeout</guid>
            <pubDate>Wed, 19 Feb 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[今天在构建coder template时，总是因为网络原因导致 terraform构建失败，查阅了部分资料和ChatGPT后，通过 filesystem_mirror: consult a directory on the local disk for copies of providers 方式预缓存provider，解决构建时总遇到的网络问题。]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-19f210e32d57802e8e09ef79219cd218"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-callout notion-gray_background_co notion-block-19f210e32d5781e681c9c25ae798a2af"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="😀">😀</span></div><div class="notion-callout-text">今天在构建coder template时，总是因为网络原因导致 terraform构建失败，查阅了部分资料和ChatGPT后，通过 <code class="notion-inline-code"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://developer.hashicorp.com/terraform/cli/config/config-file#filesystem_mirror">filesystem_mirror</a></code>: consult a directory on the local disk for copies of providers 方式预缓存provider，解决构建时总遇到的网络问题。</div></div><div class="notion-blank notion-block-19f210e32d57817cb1baf2675452766d"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-19f210e32d5781a683e3e34dda9a0e5f" data-id="19f210e32d5781a683e3e34dda9a0e5f"><span><div id="19f210e32d5781a683e3e34dda9a0e5f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#19f210e32d5781a683e3e34dda9a0e5f" title="📝 遇到的问题"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">📝 遇到的问题</span></span></h2><div class="notion-blank notion-block-19f210e32d5781c19951d918ca74aa3d"> </div><div class="notion-text notion-block-19f210e32d5780e5a96ac23bfa5264c2">因为网络的问题，terraform在下载coder provider时超时出错：</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-19f210e32d5780f3922afbabf740cf48" data-id="19f210e32d5780f3922afbabf740cf48"><span><div id="19f210e32d5780f3922afbabf740cf48" class="notion-header-anchor"></div><a class="notion-hash-link" href="#19f210e32d5780f3922afbabf740cf48" title="手动下载 kreuzwerker/docker provider"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>手动下载 kreuzwerker/docker provider</b></span></span></h3><div class="notion-text notion-block-19f210e32d578057863fd36f2452103f"><b>📌 找到 kreuzwerker/docker provider 的最新版本</b></div><div class="notion-text notion-block-19f210e32d57802fadd3effcbd627e65">• 打开 Terraform Registry：</div><div class="notion-text notion-block-19f210e32d5780f0b0c0c5a7549860cc">🔗 <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://registry.terraform.io/providers/kreuzwerker/docker/latest">https://registry.terraform.io/providers/kreuzwerker/docker/latest</a></div><div class="notion-text notion-block-19f210e32d578020b5d7eab72923f64a">• 复制最新的 <b>版本号</b>（如 3.0.2）。</div><div class="notion-text notion-block-19f210e32d57802aa203c62b9ace6125"><b>📌 下载 kreuzwerker/docker provider</b></div><div class="notion-text notion-block-19f210e32d5780e5b164e2e33439db4f">在 <b>外网服务器</b> 上运行：</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-19f210e32d578013896fcee15c39a86d" data-id="19f210e32d578013896fcee15c39a86d"><span><div id="19f210e32d578013896fcee15c39a86d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#19f210e32d578013896fcee15c39a86d" title="文件方式设置 mirror"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">文件方式设置 mirror</span></span></h3><div class="notion-text notion-block-19f210e32d578093a07cc2a4ddd54bef">传输到 <b>内网服务器</b> 上后，重命名并移动到 Terraform 插件目录：</div><div class="notion-text notion-block-19f210e32d578064aed7e3a9b24c50da">在 <b>内网服务器</b> 上，创建或修改 ~/.terraformrc 文件：</div><div class="notion-blank notion-block-19f210e32d5780dc94a6f408635ab420"> </div><div class="notion-text notion-block-19f210e32d578037933bf0c942c07cab">再次执行构建能够快速的加载并构建成功。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-19f210e32d5781189894f69b6d881fa6" data-id="19f210e32d5781189894f69b6d881fa6"><span><div id="19f210e32d5781189894f69b6d881fa6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#19f210e32d5781189894f69b6d881fa6" title="🤗 总结归纳"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">🤗 总结归纳</span></span></h2><div class="notion-text notion-block-19f210e32d57817387a8c6050363373b">上面介绍的方式只能解决一个包的下载问题，如果需要多个包，重复进行多次。</div><div class="notion-blank notion-block-19f210e32d5780df81b5f365c0066d2d"> </div><div class="notion-text notion-block-19f210e32d5780b98561dd8ce20bf956">除了上面的方式外，Terraform 提供了 providers mirror 命令，可以把 provider <b>下载到本地</b>，然后配置 Terraform 使用本地 provider，而不访问 registry.terraform.io。在这里没有进一步的尝试。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-19f210e32d57814389cede936bd7950f" data-id="19f210e32d57814389cede936bd7950f"><span><div id="19f210e32d57814389cede936bd7950f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#19f210e32d57814389cede936bd7950f" title="📎 参考文章"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">📎 参考文章</span></span></h2><ul class="notion-list notion-list-disc notion-block-19f210e32d578138a5c5d0b28addcca6"><li><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://developer.hashicorp.com/terraform/cli/config/config-file#filesystem_mirror">CLI Configuration File (.terraformrc or terraform.rc)</a></li></ul><ul class="notion-list notion-list-disc notion-block-19f210e32d578193a7fff671f9e81e3a"><li><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://developer.hashicorp.com/terraform/cli/commands/providers/mirror">Command: terraform providers mirror</a></li></ul><div class="notion-blank notion-block-19f210e32d57804f8d72f3b2093525c5"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kindle上使用Koreader]]></title>
            <link>https://blog.hwhl.fun/article/kindle-koreader-tips</link>
            <guid>https://blog.hwhl.fun/article/kindle-koreader-tips</guid>
            <pubDate>Tue, 11 Feb 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[Koreader 支持epub/pdf，可以重拍PDF，非常适合阅读扫描版的PDF。另外还支持网络传书，保存笔记等。对阅读过的书籍进行统计，方便查看阅读历史等等功能。相关的资料很多，我这里转发保存一份Kindle上使用Koreader的文章。]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-197210e32d57802e8c41cfd14d27dbe1"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-callout notion-gray_background_co notion-block-197210e32d57809d90a8d83f1d485e5c"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="😀">😀</span></div><div class="notion-callout-text">转发保存一份Kindle上使用Koreader的文章，只摘取Koreader部分。</div></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-197210e32d5780289ce3f4e73f853e90" data-id="197210e32d5780289ce3f4e73f853e90"><span><div id="197210e32d5780289ce3f4e73f853e90" class="notion-header-anchor"></div><a class="notion-hash-link" href="#197210e32d5780289ce3f4e73f853e90" title="Koreader简介"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Koreader简介</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-197210e32d578014b586c1a21aeea6db" data-id="197210e32d578014b586c1a21aeea6db"><span><div id="197210e32d578014b586c1a21aeea6db" class="notion-header-anchor"></div><a class="notion-hash-link" href="#197210e32d578014b586c1a21aeea6db" title="1、小屏设备上阅读PDF文档的体验大幅提升"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>1、小屏设备上阅读PDF文档的体验大幅提升</b></span></span></h3><div class="notion-text notion-block-197210e32d5780b49e74d7c92a185c32">KOReader支持自动/手动切边、屏幕全方位旋转，以及（最重要的）文字重排。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-197210e32d578010ada7e7d45a8ab1c8"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://am.zdmimg.com/202401/07/659a1724cdd253244.png_e1080.jpg?spaceId=435b5661-7c0f-4dec-aa7d-92258ad0dbaf&amp;t=197210e3-2d57-8010-ada7-e7d45a8ab1c8" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-197210e32d5780e4b25ad948473c23e0">重排后的文字不仅变大，还能对字号、行高、对比度等样式进行调整。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-197210e32d5780c38142f9e520585cb8"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://am.zdmimg.com/202401/07/659a188f8e5421756.gif_e1080.jpg?spaceId=435b5661-7c0f-4dec-aa7d-92258ad0dbaf&amp;t=197210e3-2d57-80c3-8142-f9e520585cb8" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-197210e32d5780ec856de18fe04f5aea">演示：默认尺寸/自动裁边/文字重排</div><div class="notion-text notion-block-197210e32d57802eab7acb45e5f8e6e7">KOReader的重排功能即使在KPW3这样的老机器上速度也很快。当然，如果PDF原文档清晰度就很差，或者影印得歪七扭八，或者图文混排比较复杂，那么对最终重排的效果会大打折扣，此时建议开启“自动裁边＋横向旋转屏幕+连续翻页”这三项。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-197210e32d5780d7804be8e356cd1107"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://am.zdmimg.com/202401/07/659a1724d2d8a2682.png_e1080.jpg?spaceId=435b5661-7c0f-4dec-aa7d-92258ad0dbaf&amp;t=197210e3-2d57-80d7-804b-e8e356cd1107" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-197210e32d5780bc8106d9a9f4a94a1b">我习惯加载支架看书，旋转后可以边充电边看，还能分成两列，便于我“一目十行”！</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-197210e32d5780398238e5c3597e3c18" data-id="197210e32d5780398238e5c3597e3c18"><span><div id="197210e32d5780398238e5c3597e3c18" class="notion-header-anchor"></div><a class="notion-hash-link" href="#197210e32d5780398238e5c3597e3c18" title="2. 为KPW3等老机型增加深色模式"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>2. 为KPW3等老机型增加深色模式</b></span></span></h3><div class="notion-text notion-block-197210e32d57807abe4fedeb8a5dd755">深色模式会大幅增加残影，但是昏暗环境下肉眼的分辨能力下降，残影不易察觉，因此无须频繁手动刷新（拇指斜着短滑即可刷新消除残影）。而在明亮环境下也没有使用深色模式的必要。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-197210e32d5780c9b1f7d49f3cd7cf45"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://am.zdmimg.com/202401/07/659a1724d9bb82690.png_e1080.jpg?spaceId=435b5661-7c0f-4dec-aa7d-92258ad0dbaf&amp;t=197210e3-2d57-80c9-b1f7-d49f3cd7cf45" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-197210e32d5780309c0de429d1d9c5c0">只对背景和文字反色，图片依然保持原样。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-197210e32d5780dfa691d698f58e5239" data-id="197210e32d5780dfa691d698f58e5239"><span><div id="197210e32d5780dfa691d698f58e5239" class="notion-header-anchor"></div><a class="notion-hash-link" href="#197210e32d5780dfa691d698f58e5239" title="3、实现文字/段落样式/状态栏/屏保的全面自定义"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>3、实现文字/段落样式/状态栏/屏保的全面自定义</b></span></span></h3><div class="notion-text notion-block-197210e32d57800d91a4cd7aa5b9d53a">文字行高、段落间距、段首缩进、文档边距……几乎可以覆盖掉书籍原有的所有样式。可以充分利用6英寸小屏的边边角角，显示更多内容。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-197210e32d5780399c73eb8d0cdb186b"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://am.zdmimg.com/202401/07/659a1724cfbbd7183.png_e1080.jpg?spaceId=435b5661-7c0f-4dec-aa7d-92258ad0dbaf&amp;t=197210e3-2d57-8039-9c73-eb8d0cdb186b" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-197210e32d578086893fd3bdfb459235">自定义设置：文字样式</div><div class="notion-text notion-block-197210e32d57802ca0dbd7084ff2c7d8">屏幕上下两边都有自定义程度很高的状态栏（如上图），包括多种样式的书籍信息、阅读进度，以及丰富的系统信息，比如电量、灯光亮度、内存占用、WiFi状态都一目了然。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-197210e32d5780fe9fc1d4f015a32a03"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://am.zdmimg.com/202401/07/659a1724d668c791.png_e1080.jpg?spaceId=435b5661-7c0f-4dec-aa7d-92258ad0dbaf&amp;t=197210e3-2d57-80fe-9fc1-d4f015a32a03" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-197210e32d578045a856dfd03500d0ed">自定义设置：底部状态栏/顶部备选状态栏</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-197210e32d57805c8158c17f5ed3e2fa"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://am.zdmimg.com/202401/07/659a1724d5c7f7951.png_e1080.jpg?spaceId=435b5661-7c0f-4dec-aa7d-92258ad0dbaf&amp;t=197210e3-2d57-805c-8158-c17f5ed3e2fa" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-197210e32d5780788370fa0da1996bc0">自定义设置：屏保</div><div class="notion-text notion-block-197210e32d57806ebcc2fd0ea0dc079d">我设置“最近一本书的封面+已读进度+剩余电量”显示在待机屏保中，当我“合上书”的时候不仅知道看了多少，还知道是否该充电了。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-197210e32d5780438212d84307348c64"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://am.zdmimg.com/202401/07/659a1724da6df5781.png_e1080.jpg?spaceId=435b5661-7c0f-4dec-aa7d-92258ad0dbaf&amp;t=197210e3-2d57-8043-8212-d84307348c64" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-197210e32d578088b1cbf41c3a181c3c">屏保中显示最近一本书的已读进度和休眠前的剩余电量（不会刷新）</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-197210e32d5780bd8572cb3bf1768a31" data-id="197210e32d5780bd8572cb3bf1768a31"><span><div id="197210e32d5780bd8572cb3bf1768a31" class="notion-header-anchor"></div><a class="notion-hash-link" href="#197210e32d5780bd8572cb3bf1768a31" title="4、极其丰富的手势操作"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>4、极其丰富的手势操作</b></span></span></h3><div class="notion-text notion-block-197210e32d5780a18e99cdac25a2298e">手机上有的手势操作，KOReader都有，甚至更多。除了屏幕的左右区域，上下区域以外，屏幕的四角、四边甚至对角线，也都可以触发事件。</div><div class="notion-text notion-block-197210e32d5780a4bb3fe57356344907">再配合点击/滑动、单指/双指这些动作，可以排列组合出超多手势！只要你记得住，基本可以做到“不见菜单”。</div><div class="notion-text notion-block-197210e32d578074983af21065ab5dbd">我自己磨合出一套很顺手的手势设置，放在文章最后。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-197210e32d578002b753c8dca53c0a66"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://am.zdmimg.com/202401/07/659a1724d77875534.png_e1080.jpg?spaceId=435b5661-7c0f-4dec-aa7d-92258ad0dbaf&amp;t=197210e3-2d57-8002-b753-c8dca53c0a66" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-197210e32d5780f9bc42cf2ee3bb2246">触发区域/手势动作</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-197210e32d578024b973cf435ba9fd2b" data-id="197210e32d578024b973cf435ba9fd2b"><span><div id="197210e32d578024b973cf435ba9fd2b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#197210e32d578024b973cf435ba9fd2b" title="5、超级方便的传书方式和文件管理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>5、超级方便的传书方式和文件管理</b></span></span></h3><div class="notion-text notion-block-197210e32d5780ae8300e41dfb1650fa">kindle的传书方式对电子书的格式有要求，比如自家的.azw3格式以及.mobi就不支持。亚马逊服务器会把.epub等格式的文档转成.kfx格式，再推送到kindle上，因此用户需要等待一两分钟。</div><div class="notion-text notion-block-197210e32d57804b8c03e32d1b7a7587">OKReader支持除了.azw3以外的常见电子书/文档格式。自带五种无线传书功能的插件，其中SSH/FTP方式很适合专业用户，OPDS/Wallabag/calibre这三种方式实在太重了，没必要。所以还是推荐大家安装另一个超好用的插件——File Browser，这个后面的插件环节详细说。</div><div class="notion-text notion-block-197210e32d578073b3deea81f2364fad">kindle原生系统想归类书籍只能用“收藏夹”功能，一本一本地操比较麻烦。KOReader里直接创建文件夹，分类管理图书，非常方便。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-197210e32d5780d09d27f6ae1686a86d"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://am.zdmimg.com/202401/07/659a248a5d84e1137.png_e1080.jpg?spaceId=435b5661-7c0f-4dec-aa7d-92258ad0dbaf&amp;t=197210e3-2d57-80d0-9d27-f6ae1686a86d" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-197210e32d5780a9931ac9353f755631">文件管理</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-197210e32d5780708f9ffb45be4f1732" data-id="197210e32d5780708f9ffb45be4f1732"><span><div id="197210e32d5780708f9ffb45be4f1732" class="notion-header-anchor"></div><a class="notion-hash-link" href="#197210e32d5780708f9ffb45be4f1732" title="6、大幅提升划线/笔记的体验"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>6、大幅提升划线/笔记的体验</b></span></span></h3><div class="notion-text notion-block-197210e32d5780f6856decc8fa68cf51">用kindle划过线的都知道有多崩溃，尤其是跨页划线时，有来有往，忽高忽低，指哪不打哪，非常磨炼定力。</div><div class="notion-text notion-block-197210e32d5780ca9663c4a84839b394">使用OKReader跨页划线时，它会把内容整体上滑半页，露出下面几段，这样就能轻松划选到下页的内容。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-197210e32d5780c98c5cd4991a24efde"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://am.zdmimg.com/202401/07/659a196edecc43460.gif_e1080.jpg?spaceId=435b5661-7c0f-4dec-aa7d-92258ad0dbaf&amp;t=197210e3-2d57-80c9-8c5c-d4991a24efde" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-197210e32d5780eda409efdf872bf170">跨页标注</div><div class="notion-text notion-block-197210e32d57803da291d4cd36b932d8">即便漏划了几个字也不用删除重新划，只需要单击划选文字，就能轻松调整划选范围。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-197210e32d578033bc2ac04d4ac49136"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://am.zdmimg.com/202401/07/659a1724d68742284.png_e1080.jpg?spaceId=435b5661-7c0f-4dec-aa7d-92258ad0dbaf&amp;t=197210e3-2d57-8033-bc2a-c04d4ac49136" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-197210e32d578092983cce5f50829809">调整标注范围/四种标注样式/为标注添加笔记（输入法挺好用）</div><div class="notion-text notion-block-197210e32d57801dabd9fcf475160078">与kindle不同的是，OKReader内置的输入法更高效，而且还能将任意复制的文字，生成一个二维码，然后用手机一扫，就能复制到手机里。</div><div class="notion-text notion-block-197210e32d5780df96dac35a7428f560">如果你想用kindle记事甚至写作，越狱前是不可能的。越狱后，OKReader自带一个文本编辑器，可以创建和编辑.txt文件，熟练操作后完全没问题。</div><div class="notion-text notion-block-197210e32d57801398a4ed38a799fb59">此外，还能将书籍中的标注和笔记，导出为多种格式的文件，传输到手机上。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-197210e32d5780ae8754e6021badb469"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://am.zdmimg.com/202401/07/659a1724da82c964.png_e1080.jpg?spaceId=435b5661-7c0f-4dec-aa7d-92258ad0dbaf&amp;t=197210e3-2d57-80ae-8754-e6021badb469" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-197210e32d5780c9834bd0ca3e61ade4">笔记导出格式选择/txt导出效果/自带的文本编辑器</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-197210e32d5780b6bc9fe048f0b0abad" data-id="197210e32d5780b6bc9fe048f0b0abad"><span><div id="197210e32d5780b6bc9fe048f0b0abad" class="notion-header-anchor"></div><a class="notion-hash-link" href="#197210e32d5780b6bc9fe048f0b0abad" title="7、其他"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>7、其他</b></span></span></h3><div class="notion-text notion-block-197210e32d57802fb2c3f14a4264a53a">各种屏保玩法、丰富的插件、阅读计时提醒、书籍地图和阅读统计……就不多说了，详见书伴网或自行搜索。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-197210e32d5780e6a279fb377cfe3ccf" data-id="197210e32d5780e6a279fb377cfe3ccf"><span><div id="197210e32d5780e6a279fb377cfe3ccf" class="notion-header-anchor"></div><a class="notion-hash-link" href="#197210e32d5780e6a279fb377cfe3ccf" title="字典和字体安装"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>字典和字体安装</b></span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-197210e32d57804797d4f8e001e734f3" data-id="197210e32d57804797d4f8e001e734f3"><span><div id="197210e32d57804797d4f8e001e734f3" class="notion-header-anchor"></div><a class="notion-hash-link" href="#197210e32d57804797d4f8e001e734f3" title="1、字典单独安装"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>1、字典单独安装</b></span></span></h3><div class="notion-text notion-block-197210e32d5780fc9538e9aee84c5ed5">KOReader自带的字典适合中国人的不多，而且和kindle原生系统的字典也不共用。可以在这里<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://kdr2.com/resource/stardict.html">https://kdr2.com/resource/stardict.html</a> 下载需要的字典（一般新华字典/现代汉语/成语/中英双向这几个就够了）</div><div class="notion-text notion-block-197210e32d578047b93cdb7fa2a8a0ea">解压后复制到Kinder的（根目录/koreader/data/dict）这个文件夹里。然后在KOReader主菜单中依次点击：“🔍（放大镜）&gt; 设置 &gt; 词典设置 &gt; 管理词典”，然后选中你需要的字典，<b>并按自己的需求排序</b>。排序很重要，常用的排上面。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-197210e32d5780be97dfc1011d4cefb6"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://am.zdmimg.com/202401/07/659a1724d82088240.png_e1080.jpg?spaceId=435b5661-7c0f-4dec-aa7d-92258ad0dbaf&amp;t=197210e3-2d57-80be-97df-c1011d4cefb6" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-197210e32d5780398d66fcb7ca6ec4b0">字典管理</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-197210e32d57803ea3e4f6eedac69ae9" data-id="197210e32d57803ea3e4f6eedac69ae9"><span><div id="197210e32d57803ea3e4f6eedac69ae9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#197210e32d57803ea3e4f6eedac69ae9" title="2、字体与kindle共享"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>2、字体与kindle共享</b></span></span></h3><div class="notion-text notion-block-197210e32d57800188f8e93b3f53772d">最新版KOReader会自动关联kindle原生系统（根目录/font）的字体。也就是说，越狱前怎么装字体，越狱后还怎么装，无需安装其他插件。</div><div class="notion-text notion-block-197210e32d57801ab8a3fafc88e6f618">注意，不要删除“根目录/koreader/fonts”文件夹中的任何字体（除非你有把握并做好备份），尤其是noto文件夹（系统会用到，乱删会导致KOReader无法正常启动）。</div><div class="notion-text notion-block-197210e32d5780648fbced6d51cd4f85">另外，维基百科和翻译（谷歌的API）国内无法访问，暂时没有找到有效的解决方法，回头研究明白了再来发文，可以关注我。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-197210e32d5780e8a2ede711e25099be" data-id="197210e32d5780e8a2ede711e25099be"><span><div id="197210e32d5780e8a2ede711e25099be" class="notion-header-anchor"></div><a class="notion-hash-link" href="#197210e32d5780e8a2ede711e25099be" title="我的自定义手势设置建议"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>我的自定义手势设置建议</b></span></span></h2><div class="notion-text notion-block-197210e32d57806789b2e938e482d694">KOReader的手势组合极其丰富，下图是我自己反复调教、优化后的手势方案（好记又好用），仅供参考，别忘点个赞。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-197210e32d578044b1caccfaeee66904"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://am.zdmimg.com/202401/07/659a1724d9ef25468.png_e1080.jpg?spaceId=435b5661-7c0f-4dec-aa7d-92258ad0dbaf&amp;t=197210e3-2d57-8044-b1ca-ccfaeee66904" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-197210e32d578074b61ed727c80ea39b">仅供参考，全部支持自定义</div><div class="notion-text notion-block-197210e32d578024b7dfefd53000dfc8"><b>小技巧：</b></div><div class="notion-text notion-block-197210e32d5780bda467d82343318ad0">长按菜单中的某些功能选项，可以看到该功能的具体说明。</div><div class="notion-text notion-block-197210e32d5780d9bc1eee8f7b131adb">如系统卡死，长按电源键（40秒）重启设备。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-197210e32d57804c8ff2c765b7c243c7" data-id="197210e32d57804c8ff2c765b7c243c7"><span><div id="197210e32d57804c8ff2c765b7c243c7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#197210e32d57804c8ff2c765b7c243c7" title="📎 参考文章"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">📎 参考文章</span></span></h2><ul class="notion-list notion-list-disc notion-block-197210e32d57800285b3f9eadec07d9d"><li><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://post.smzdm.com/p/a0xrrvm9/">本文原作者：佛系老司机 原文地址点击入内</a></li></ul><div class="notion-blank notion-block-197210e32d578062bdf3d97a72d751f1"> </div><div class="notion-callout notion-gray_background_co notion-block-197210e32d578010b534f31624188fb1"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text">有关Notion安装或者使用上的问题，欢迎您在底部评论区留言，一起交流~</div></div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[重启群晖Driver服务]]></title>
            <link>https://blog.hwhl.fun/article/restart-synology-driver-service</link>
            <guid>https://blog.hwhl.fun/article/restart-synology-driver-service</guid>
            <pubDate>Mon, 10 Feb 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[使用群晖的 systemctl 命令行来重启服务，能够在避免重启群晖主机，保证其他服务正常运行。]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-196210e32d5780419fc8cede055b7ef8"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-callout notion-gray_background_co notion-block-196210e32d57804392cdc383be41e447"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="😀">😀</span></div><div class="notion-callout-text">这里写文章的前言：
最近偶尔遇到群晖中的 Driver 无响应，无法查看文件的情况，平时采用重启群晖机器来解决，最近一想，是否有重启服务的方式。</div></div><div class="notion-blank notion-block-196210e32d5780b08dddccec28bf10a9"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-196210e32d5780708b66edb4e663b834" data-id="196210e32d5780708b66edb4e663b834"><span><div id="196210e32d5780708b66edb4e663b834" class="notion-header-anchor"></div><a class="notion-hash-link" href="#196210e32d5780708b66edb4e663b834" title="📝 主旨内容"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">📝 主旨内容</span></span></h2><div class="notion-text notion-block-196210e32d57800d93a8db3f179e3e6c">经过查询，发现从 DSM 7 版本后，群晖服务改用了 systemctl 的方式，经常用Linux环境的一定对这个非常熟悉。</div><div class="notion-text notion-block-196210e32d5780488dd3ca9105dc7e0e">通过查看系统服务状态，找到是 <code class="notion-inline-code">pkgctl-SynologyDrive.service</code> 服务，执行重启命令：</div><div class="notion-text notion-block-196210e32d578042862be56817ab439e">再次查看 Driver 已经可以正常使用了。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-196210e32d5780b18b22f9455aed6f53" data-id="196210e32d5780b18b22f9455aed6f53"><span><div id="196210e32d5780b18b22f9455aed6f53" class="notion-header-anchor"></div><a class="notion-hash-link" href="#196210e32d5780b18b22f9455aed6f53" title="🤗 总结归纳"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">🤗 总结归纳</span></span></h2><div class="notion-text notion-block-196210e32d5780b9b716e697946960a1">使用群晖的 <code class="notion-inline-code">systemctl</code> 命令行来重启服务，能够在避免重启群晖主机，保证其他服务正常运行。</div><div class="notion-text notion-block-196210e32d57804fb30aca9c4cb5d287">此外，群晖常用的服务还有：</div><ol start="1" class="notion-list notion-list-numbered notion-block-196210e32d5780f7a8bec95db6a75b15" style="list-style-type:decimal"><li>存储 &amp; 磁盘管理</li></ol><ul class="notion-list notion-list-disc notion-block-196210e32d57801ca95fda46b212c32d"><li>scemd - 存储控制管理服务</li></ul><ul class="notion-list notion-list-disc notion-block-196210e32d5780479b23c583f6d35593"><li>synostoraged - 存储管理相关服务</li></ul><ul class="notion-list notion-list-disc notion-block-196210e32d5780cd8c04e3537abe8864"><li>synofstool - 文件系统工具</li></ul><ul class="notion-list notion-list-disc notion-block-196210e32d57804180f2f01a74e18ddc"><li>synodiskport - 磁盘端口管理</li></ul><ul class="notion-list notion-list-disc notion-block-196210e32d57804b9f0ac3aaa21011ae"><li>synodrivedb - 存储数据库管理</li></ul><ol start="2" class="notion-list notion-list-numbered notion-block-196210e32d578099aeebf83ed36d19f7" style="list-style-type:decimal"><li>文件共享 &amp; 网络服务</li></ol><ul class="notion-list notion-list-disc notion-block-196210e32d57804a9839fe477d41308c"><li>nmbd - NetBIOS 名称服务（Samba 相关）</li></ul><ul class="notion-list notion-list-disc notion-block-196210e32d5780c59880cf8367ea65e5"><li>smbd - Samba 服务（Windows 文件共享）</li></ul><ul class="notion-list notion-list-disc notion-block-196210e32d5780afb8d2dbcbed0fd537"><li>afpd - Apple 文件协议（AFP）</li></ul><ul class="notion-list notion-list-disc notion-block-196210e32d5780d8a86efd4587180f0b"><li>nfsd - NFS 服务</li></ul><ul class="notion-list notion-list-disc notion-block-196210e32d578072abcaec05c5dac859"><li>pkgctl-SFTP - SFTP 服务</li></ul><ul class="notion-list notion-list-disc notion-block-196210e32d5780ff9e59caa92bd0ee15"><li>pkgctl-FTPD - FTP 服务</li></ul><ol start="3" class="notion-list notion-list-numbered notion-block-196210e32d5780f9ba53cde23cba3573" style="list-style-type:decimal"><li>远程访问 &amp; 网络管理</li></ol><ul class="notion-list notion-list-disc notion-block-196210e32d5780c1adbfc40115fc3459"><li>synovpnserver - VPN 服务器</li></ul><ul class="notion-list notion-list-disc notion-block-196210e32d57806882a1d438fc26c282"><li>synosnmpd - SNMP 监控</li></ul><ul class="notion-list notion-list-disc notion-block-196210e32d578093b29cf4ef3f966f3f"><li>pkgctl-OpenVPN - OpenVPN 服务</li></ul><ul class="notion-list notion-list-disc notion-block-196210e32d57807f9cf1c7fbf5fd10d2"><li>pkgctl-WireGuard - WireGuard VPN 服务</li></ul><ul class="notion-list notion-list-disc notion-block-196210e32d57801f9b79fe9ae0669aa1"><li>pkgctl-CloudSync - Cloud Sync 云同步服务</li></ul><ol start="4" class="notion-list notion-list-numbered notion-block-196210e32d57805e8309e18b31e8adde" style="list-style-type:decimal"><li>多媒体 &amp; 备份</li></ol><ul class="notion-list notion-list-disc notion-block-196210e32d578025a5f7e25ed9ad7d00"><li>pkgctl-SynologyDrive - Synology Drive 服务</li></ul><ul class="notion-list notion-list-disc notion-block-196210e32d5780f08a1ff3a3d995abe5"><li>pkgctl-CloudSync - Cloud Sync</li></ul><ul class="notion-list notion-list-disc notion-block-196210e32d57805f8095eab543b3fdcf"><li>pkgctl-ActiveBackup - Active Backup for Business</li></ul><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-196210e32d578080a4bece5da43df16e" data-id="196210e32d578080a4bece5da43df16e"><span><div id="196210e32d578080a4bece5da43df16e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#196210e32d578080a4bece5da43df16e" title="📎 参考文章"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">📎 参考文章</span></span></h2><ul class="notion-list notion-list-disc notion-block-196210e32d5780149d25fcf5189f200b"><li><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://dannyda.com/2022/11/09/how-to-use-command-manually-restart-start-stop-services-in-synology-dsm-7-and-newer-versions/">How to Use command/Manually restart/start/stop services in Synology DSM 7 and newer versions</a></li></ul></main></div>]]></content:encoded>
        </item>
    </channel>
</rss>