<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>今日无新鲜事</title><link>https://finite.tain.one/zh-cn/</link><description>今日无新鲜事</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><managingEditor>selcarpa@gmail.com (selcarpa)</managingEditor><webMaster>selcarpa@gmail.com (selcarpa)</webMaster><atom:link href="https://finite.tain.one/zh-cn/index.xml" rel="self" type="application/rss+xml"/><item><title>如何使用reportlab的TTFont字体回退功能</title><link>https://finite.tain.one/zh-cn/docs/reportlab-ttfont-fallback-usage/</link><pubDate>Thu, 23 Apr 2026 10:00:00 +0800</pubDate><author><name>selcarpa</name><uri>https://github.com/selcarpa</uri><email>selcarpa@gmail.com</email></author><guid>https://finite.tain.one/zh-cn/docs/reportlab-ttfont-fallback-usage/</guid><description><![CDATA[<h2 id="参考" class="headerLink">
    <a href="#%e5%8f%82%e8%80%83" class="header-mark"></a>参考</h2><ul>
<li><a href="/docs/reportlab-ttfont-fallback-impl/" rel="">reportlab TTFont字体回退实现解析</a> — 配套实现原理分析（来自 reportlab_enhanced）</li>
<li><a href="https://reportlab-enhanced.tain.one/zh/ch2a_fonts/#truetype" target="_blank" rel="noopener noreferrer">reportlab-enhanced 文档 - TrueType 字体回退</a></li>
<li><a href="https://reportlab-enhanced.tain.one/" target="_blank" rel="noopener noreferrer">reportlab-enhanced 文档</a></li>
<li><a href="https://github.com/selcarpa/reportlab_enhanced" target="_blank" rel="noopener noreferrer">selcarpa/reportlab_enhanced</a></li>
</ul>]]></description></item><item><title>友链</title><link>https://finite.tain.one/zh-cn/docs/friends_link/</link><pubDate>Sun, 25 May 2025 13:00:00 +0800</pubDate><author><name>selcarpa</name></author><guid>https://finite.tain.one/zh-cn/docs/friends_link/</guid><description><![CDATA[<h2 id="四海之内" class="headerLink">
    <a href="#%e5%9b%9b%e6%b5%b7%e4%b9%8b%e5%86%85" class="header-mark"></a>四海之内</h2><p>以下是我在互联网上的朋友们。</p>
<a target="_blank" href="https://joey5403.tech/" title="黄庄以北" class="friend-link" rel="noopener noreferrer">
    <div class="friend-link-div">
        <div class="friend-link-avatar"><img   src='https://joey5403.tech/_astro/avatar.Dk2Sj5xH_Ze6h77.webp'   alt="黄庄以北 avatar"  ></div>
        <div class="friend-link-info">
            <div class="friend-name-div">
                <svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 96c48.6 0 88 39.4 88 88s-39.4 88-88 88-88-39.4-88-88 39.4-88 88-88zm0 344c-58.7 0-111.3-26.6-146.5-68.2 18.8-35.4 55.6-59.8 98.5-59.8 2.4 0 4.8.4 7.1 1.1 13 4.2 26.6 6.9 40.9 6.9 14.3 0 28-2.7 40.9-6.9 2.3-.7 4.7-1.1 7.1-1.1 42.9 0 79.7 24.4 98.5 59.8C359.3 421.4 306.7 448 248 448z"/></svg>
                <i class="friend-name">黄庄以北</i>
            </div>
            <p class="friend-bio">joey5403 的个人技术博客，关注开源技术与开发者效率。</p>]]></description></item><item><title>通关ipv6设置windows远程桌面</title><link>https://finite.tain.one/zh-cn/docs/tools/rdp/</link><pubDate>Tue, 09 Jul 2024 11:00:00 +0800</pubDate><author><name>selcarpa</name></author><guid>https://finite.tain.one/zh-cn/docs/tools/rdp/</guid><description><![CDATA[<div class="sect1">
<h2 id="_介绍">介绍</h2>
<div class="sectionbody">
<div class="paragraph">
<p>在家里有一台windows电脑，想要远程桌面连接，但是家里的网络是ipv6，ipv4是没有公网ip的，所以需要通过ipv6来连接，但是windows远程桌面默认是ipv4的，所以需要设置一下。</p>
</div>]]></description></item><item><title>快速开始cloudflare ddns</title><link>https://finite.tain.one/zh-cn/docs/tools/cf-ddns-super-quick-start/</link><pubDate>Wed, 27 Mar 2024 09:26:00 +0800</pubDate><author><name>selcarpa</name></author><guid>https://finite.tain.one/zh-cn/docs/tools/cf-ddns-super-quick-start/</guid><description><![CDATA[<h2 id="介绍" class="headerLink">
    <a href="#%e4%bb%8b%e7%bb%8d" class="header-mark"></a>介绍</h2><p>本文讲述如何用最简单的方式快速开始使用cloudflare ddns。</p>
<h2 id="准备操作" class="headerLink">
    <a href="#%e5%87%86%e5%a4%87%e6%93%8d%e4%bd%9c" class="header-mark"></a>准备操作</h2><h3 id="1-注册cloudflare账号" class="headerLink">
    <a href="#1-%e6%b3%a8%e5%86%8ccloudflare%e8%b4%a6%e5%8f%b7" class="header-mark"></a>1. 注册cloudflare账号</h3><p>本文不会详细将这个，请参考其他教程。</p>
<h3 id="2-获取cloudflare的api-key" class="headerLink">
    <a href="#2-%e8%8e%b7%e5%8f%96cloudflare%e7%9a%84api-key" class="header-mark"></a>2. 获取cloudflare的api key</h3><ol>
<li>访问https://dash.cloudflare.com/profile/api-tokens，右上角处可以切换为简体中文</li>
<li>点击创建令牌，选择编辑区域DNS模板</li>
<li>名称任意填写</li>
<li>令牌权限选择编辑区域DNS，令牌的权限务必选择
<ul>
<li>区域-区域-读取</li>
<li>区域-dns-编辑</li>
</ul>
</li>
<li>区域资源，选择需要用于ddns的域名</li>
<li>客户端IP（可选），这个用于区别调用客户端的白名单，由于本文讲解ddns，本身访问的公网IP就是动态的，所以这里最好不要填写</li>
<li>TTL，定义此令牌将保持活动状态的时间长度。这个不需要填写</li>
</ol>
<p><figure><img  loading="lazy" src='/docs/tools/cf-ddns-super-quick-start/images/000134.png'   alt="创建令牌" height="845" width="854"><figcaption class="image-caption">创建令牌</figcaption>
</figure></p>]]></description></item><item><title>自托管Plausible统计静态网页访问</title><link>https://finite.tain.one/zh-cn/docs/tools/plausible/</link><pubDate>Mon, 25 Dec 2023 10:34:27 +0800</pubDate><author><name>selcarpa</name></author><guid>https://finite.tain.one/zh-cn/docs/tools/plausible/</guid><description><![CDATA[<h2 id="背景" class="headerLink">
    <a href="#%e8%83%8c%e6%99%af" class="header-mark"></a>背景</h2><ul>
<li>我们需要一个统计工具，用于统计静态网页的访问量</li>
<li>不少人的浏览器会安装ublock、adblock等插件，导致一众统计服务无法统计到访问量</li>
</ul>
<h2 id="plausible" class="headerLink">
    <a href="#plausible" class="header-mark"></a>Plausible</h2><p><a href="https://plausible.io/" target="_blank" rel="noopener noreferrer">Plausible</a>是一个开源的统计工具，可以用于统计静态网页的访问量，它的特点是：</p>]]></description></item><item><title>kotlin-native与C/C++交互</title><link>https://finite.tain.one/zh-cn/docs/kt/kt-c/</link><pubDate>Wed, 06 Dec 2023 17:38:08 +0800</pubDate><author><name>selcarpa</name><uri>https://github.com/selcarpa</uri><email>selcarpa@gmail.com</email></author><guid>https://finite.tain.one/zh-cn/docs/kt/kt-c/</guid><description><![CDATA[<h2 id="介绍" class="headerLink">
    <a href="#%e4%bb%8b%e7%bb%8d" class="header-mark"></a>介绍</h2><p>在进行kotlin-native开发时，由于当前版本缺少很多库，所以我们需要使用C/C++进行补充。本文将以linux平台为例，介绍如何在kotlin-native中使用C/C++。</p>
<h2 id="准备工作" class="headerLink">
    <a href="#%e5%87%86%e5%a4%87%e5%b7%a5%e4%bd%9c" class="header-mark"></a>准备工作</h2><ul>
<li>idea-community</li>
<li>jdk17</li>
<li>cmake</li>
<li>linux</li>
</ul>
<h2 id="参考" class="headerLink">
    <a href="#%e5%8f%82%e8%80%83" class="header-mark"></a>参考</h2><p><a href="https://kotlinlang.org/docs/native-c-interop.html" target="_blank" rel="noopener noreferrer">Interoperability with C</a></p>
<p><a href="https://kotlinlang.org/docs/native-app-with-c-and-libcurl.html" target="_blank" rel="noopener noreferrer">Create an app using C Interop and libcurl – tutorial</a></p>
<h2 id="项目地址" class="headerLink">
    <a href="#%e9%a1%b9%e7%9b%ae%e5%9c%b0%e5%9d%80" class="header-mark"></a>项目地址</h2><p><a href="https://github.com/selcarpa/c_link_demo" target="_blank" rel="noopener noreferrer">selcarpa/c_link_demo</a></p>
<h2 id="项目结构" class="headerLink">
    <a href="#%e9%a1%b9%e7%9b%ae%e7%bb%93%e6%9e%84" class="header-mark"></a>项目结构</h2><div class="code-block highlight is-open show-line-numbers  tw:group tw:my-2">
  <div class="
    
    tw:flex 
    tw:flex-row
    tw:flex-1 
    tw:justify-between 
    tw:w-full tw:bg-bgColor-secondary
    ">      
    <button 
      class="
        code-block-button
        tw:mx-2 
        tw:flex
        tw:flex-row
        tw:flex-1"
      aria-hidden="true">
          <span class="tw:group-[.is-open]:rotate-90 tw:transition-[transform] tw:duration-500 tw:ease-in-out tw:print:hidden! tw:w-min tw:h-min tw:my-1 tw:mx-1"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/></svg></span>
          <span class="tw:select-none tw:my-1! tw:block">text</span>
      </button>

   <div class="tw:flex">
      <button 
        class="
          line-number-button
          tw:mx-2 
          tw:hidden 
          tw:group-[.is-open]:block 
          tw:group-[.show-line-numbers]:text-fgColor-link 
          tw:print:hidden!" 
        title="Toggle line numbers"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M61.77 401l17.5-20.15a19.92 19.92 0 0 0 5.07-14.19v-3.31C84.34 356 80.5 352 73 352H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h22.83a157.41 157.41 0 0 0-11 12.31l-5.61 7c-4 5.07-5.25 10.13-2.8 14.88l1.05 1.93c3 5.76 6.29 7.88 12.25 7.88h4.73c10.33 0 15.94 2.44 15.94 9.09 0 4.72-4.2 8.22-14.36 8.22a41.54 41.54 0 0 1-15.47-3.12c-6.49-3.88-11.74-3.5-15.6 3.12l-5.59 9.31c-3.72 6.13-3.19 11.72 2.63 15.94 7.71 4.69 20.38 9.44 37 9.44 34.16 0 48.5-22.75 48.5-44.12-.03-14.38-9.12-29.76-28.73-34.88zM496 224H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM16 160h64a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H64V40a8 8 0 0 0-8-8H32a8 8 0 0 0-7.14 4.42l-8 16A8 8 0 0 0 24 64h8v64H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8zm-3.91 160H80a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H41.32c3.29-10.29 48.34-18.68 48.34-56.44 0-29.06-25-39.56-44.47-39.56-21.36 0-33.8 10-40.46 18.75-4.37 5.59-3 10.84 2.8 15.37l8.58 6.88c5.61 4.56 11 2.47 16.12-2.44a13.44 13.44 0 0 1 9.46-3.84c3.33 0 9.28 1.56 9.28 8.75C51 248.19 0 257.31 0 304.59v4C0 316 5.08 320 12.09 320z"/></svg></button>

      <button 
        class="
          wrap-code-button
          tw:select-none 
          tw:mx-2 
          tw:hidden 
          tw:group-[.is-open]:block 
          tw:group-[.is-wrap]:text-fgColor-link 
          tw:print:hidden!" 
        title="Toggle code wrap"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"/></svg></button>
      
      <button 
        class="
          copy-code-button
          tw:select-none
          tw:mx-2 
          tw:hidden
          tw:group-[.is-open]:block
          tw:hover:text-fgColor-link 
          tw:print:hidden!"
        title="Copy code">
          <span class="copy-icon tw:block"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"/></svg></span>
          <span class="check-icon tw:hidden"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"/></svg></span>
      </button>
        
      <button 
        class="
          tw:select-none 
          tw:mx-2 
          tw:block 
          tw:group-[.is-open]:hidden 
          tw:print:hidden!" 
        disabled
        aria-hidden="true"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"/></svg></button>
    </div>
  </div>
  <pre style="counter-reset: codeblock;" class="tw:block tw:m-0 tw:p-0"><code 
    id="codeblock-id-19" 
    class="
      chroma 
      tw:block! 
      tw:p-0
      tw:m-0
      tw:transition-[max-height] 
      tw:duration-500 
      tw:ease-in-out 
      tw:group-[.is-closed]:max-h-0! 
      tw:group-[.is-wrap]:text-wrap
      tw:overflow-y-hidden
      tw:overflow-x-auto
      tw:scrollbar-thin
      "><span class="line"><span class="cl">└── c_link_demo
</span></span><span class="line"><span class="cl">    ├── c_link_demo_c
</span></span><span class="line"><span class="cl">    │   ├── CMakeLists.txt
</span></span><span class="line"><span class="cl">    │   ├── library.c
</span></span><span class="line"><span class="cl">    │   └── library.h
</span></span><span class="line"><span class="cl">    └── c_link_demo_kt
</span></span><span class="line"><span class="cl">        ├── build.gradle.kts
</span></span><span class="line"><span class="cl">        ├── gradle
</span></span><span class="line"><span class="cl">        │   └── wrapper
</span></span><span class="line"><span class="cl">        │       ├── gradle-wrapper.jar
</span></span><span class="line"><span class="cl">        │       └── gradle-wrapper.properties
</span></span><span class="line"><span class="cl">        ├── gradle.properties
</span></span><span class="line"><span class="cl">        ├── gradlew
</span></span><span class="line"><span class="cl">        ├── gradlew.bat
</span></span><span class="line"><span class="cl">        ├── settings.gradle.kts
</span></span><span class="line"><span class="cl">        └── src
</span></span><span class="line"><span class="cl">            ├── commonMain
</span></span><span class="line"><span class="cl">            │   ├── kotlin
</span></span><span class="line"><span class="cl">            │   │   └── Main.kt
</span></span><span class="line"><span class="cl">            │   └── resources
</span></span><span class="line"><span class="cl">            └── nativeInterop
</span></span><span class="line"><span class="cl">                └── cinterop
</span></span><span class="line"><span class="cl">                    └── c_lib_demo.def</span></span></code></pre>
</div>
<h2 id="步骤" class="headerLink">
    <a href="#%e6%ad%a5%e9%aa%a4" class="header-mark"></a>步骤</h2><h3 id="创建cc库" class="headerLink">
    <a href="#%e5%88%9b%e5%bb%bacc%e5%ba%93" class="header-mark"></a>创建C/C++库</h3><p>此处以C库为例</p>]]></description></item><item><title>使用cloudflare的api实现ddns</title><link>https://finite.tain.one/zh-cn/docs/tools/cf-ddns/</link><pubDate>Mon, 11 Sep 2023 17:18:08 +0800</pubDate><author><name>selcarpa</name></author><guid>https://finite.tain.one/zh-cn/docs/tools/cf-ddns/</guid><description><![CDATA[<h2 id="极简开始方式已更新请点击移步" class="headerLink">
    <a href="#%e6%9e%81%e7%ae%80%e5%bc%80%e5%a7%8b%e6%96%b9%e5%bc%8f%e5%b7%b2%e6%9b%b4%e6%96%b0%e8%af%b7%e7%82%b9%e5%87%bb%e7%a7%bb%e6%ad%a5" class="header-mark"></a><a href="../cf-ddns-super-quick-start" rel="">极简开始方式已更新，请点击移步</a></h2><h2 id="介绍" class="headerLink">
    <a href="#%e4%bb%8b%e7%bb%8d" class="header-mark"></a>介绍</h2><p>在家里搭建一些私有服务时，如果没有公网ip，就无法通过外网访问。这个时候我们一般有三个方案：</p>
<ul>
<li>方案一，打电话让运营商分配一个公网ip</li>
<li>方案二，使用ipv6</li>
<li>方案三，使用内网穿刺</li>
</ul>
<p>本文不涉及内网穿刺服务。所以方案三在本文没有任何剩下的讨论内容。</p>]]></description></item><item><title>借助wslg使用Linux版本的idea</title><link>https://finite.tain.one/zh-cn/docs/tools/wslg/</link><pubDate>Tue, 29 Aug 2023 23:56:17 +0800</pubDate><author><name>selcarpa</name></author><guid>https://finite.tain.one/zh-cn/docs/tools/wslg/</guid><description><![CDATA[<h2 id="缘由" class="headerLink">
    <a href="#%e7%bc%98%e7%94%b1" class="header-mark"></a>缘由</h2><p>大部分Java程序员都会使用idea在Windows下进行开发，然后部署到Linux服务器上，大部分情况下，Java强大的跨平台性使得这种方式没有问题。但是！在某些时候，开发使用到的平台api会出现一些问题，导致跨平台很麻烦，比如selenium相关开发，需要用到selenium组件，此组件需要配置一些运行环境，为了避免运行环境差异导致的额外调试。</p>
<h2 id="环境要求" class="headerLink">
    <a href="#%e7%8e%af%e5%a2%83%e8%a6%81%e6%b1%82" class="header-mark"></a>环境要求</h2><ul>
<li>Windows 11</li>
<li>WSL2</li>
<li>Ubuntu 22.04</li>
</ul>
<h2 id="安装wslg运行环境" class="headerLink">
    <a href="#%e5%ae%89%e8%a3%85wslg%e8%bf%90%e8%a1%8c%e7%8e%af%e5%a2%83" class="header-mark"></a>安装wslg运行环境</h2><p>按照<a href="https://github.com/microsoft/wslg" target="_blank" rel="noopener noreferrer">微软官方的教程</a>，我们需要安装wslg的环境</p>
<h2 id="首先更新软件源" class="headerLink">
    <a href="#%e9%a6%96%e5%85%88%e6%9b%b4%e6%96%b0%e8%bd%af%e4%bb%b6%e6%ba%90" class="header-mark"></a>首先更新软件源</h2><div class="code-block highlight is-open show-line-numbers  tw:group tw:my-2">
  <div class="
    
    tw:flex 
    tw:flex-row
    tw:flex-1 
    tw:justify-between 
    tw:w-full tw:bg-bgColor-secondary
    ">      
    <button 
      class="
        code-block-button
        tw:mx-2 
        tw:flex
        tw:flex-row
        tw:flex-1"
      aria-hidden="true">
          <span class="tw:group-[.is-open]:rotate-90 tw:transition-[transform] tw:duration-500 tw:ease-in-out tw:print:hidden! tw:w-min tw:h-min tw:my-1 tw:mx-1"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/></svg></span>
          <span class="tw:select-none tw:my-1! tw:block">bash</span>
      </button>

   <div class="tw:flex">
      <button 
        class="
          line-number-button
          tw:mx-2 
          tw:hidden 
          tw:group-[.is-open]:block 
          tw:group-[.show-line-numbers]:text-fgColor-link 
          tw:print:hidden!" 
        title="Toggle line numbers"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M61.77 401l17.5-20.15a19.92 19.92 0 0 0 5.07-14.19v-3.31C84.34 356 80.5 352 73 352H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h22.83a157.41 157.41 0 0 0-11 12.31l-5.61 7c-4 5.07-5.25 10.13-2.8 14.88l1.05 1.93c3 5.76 6.29 7.88 12.25 7.88h4.73c10.33 0 15.94 2.44 15.94 9.09 0 4.72-4.2 8.22-14.36 8.22a41.54 41.54 0 0 1-15.47-3.12c-6.49-3.88-11.74-3.5-15.6 3.12l-5.59 9.31c-3.72 6.13-3.19 11.72 2.63 15.94 7.71 4.69 20.38 9.44 37 9.44 34.16 0 48.5-22.75 48.5-44.12-.03-14.38-9.12-29.76-28.73-34.88zM496 224H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM16 160h64a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H64V40a8 8 0 0 0-8-8H32a8 8 0 0 0-7.14 4.42l-8 16A8 8 0 0 0 24 64h8v64H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8zm-3.91 160H80a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H41.32c3.29-10.29 48.34-18.68 48.34-56.44 0-29.06-25-39.56-44.47-39.56-21.36 0-33.8 10-40.46 18.75-4.37 5.59-3 10.84 2.8 15.37l8.58 6.88c5.61 4.56 11 2.47 16.12-2.44a13.44 13.44 0 0 1 9.46-3.84c3.33 0 9.28 1.56 9.28 8.75C51 248.19 0 257.31 0 304.59v4C0 316 5.08 320 12.09 320z"/></svg></button>

      <button 
        class="
          wrap-code-button
          tw:select-none 
          tw:mx-2 
          tw:hidden 
          tw:group-[.is-open]:block 
          tw:group-[.is-wrap]:text-fgColor-link 
          tw:print:hidden!" 
        title="Toggle code wrap"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"/></svg></button>
      
      <button 
        class="
          copy-code-button
          tw:select-none
          tw:mx-2 
          tw:hidden
          tw:group-[.is-open]:block
          tw:hover:text-fgColor-link 
          tw:print:hidden!"
        title="Copy code">
          <span class="copy-icon tw:block"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"/></svg></span>
          <span class="check-icon tw:hidden"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"/></svg></span>
      </button>
        
      <button 
        class="
          tw:select-none 
          tw:mx-2 
          tw:block 
          tw:group-[.is-open]:hidden 
          tw:print:hidden!" 
        disabled
        aria-hidden="true"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"/></svg></button>
    </div>
  </div>
  <pre style="counter-reset: codeblock;" class="tw:block tw:m-0 tw:p-0"><code 
    id="codeblock-id-1" 
    class="
      chroma 
      tw:block! 
      tw:p-0
      tw:m-0
      tw:transition-[max-height] 
      tw:duration-500 
      tw:ease-in-out 
      tw:group-[.is-closed]:max-h-0! 
      tw:group-[.is-wrap]:text-wrap
      tw:overflow-y-hidden
      tw:overflow-x-auto
      tw:scrollbar-thin
      "><span class="line"><span class="cl">sudo apt update
</span></span><span class="line"><span class="cl">sudo apt upgrade -y</span></span></code></pre>
</div>
<h3 id="安装依赖" class="headerLink">
    <a href="#%e5%ae%89%e8%a3%85%e4%be%9d%e8%b5%96" class="header-mark"></a>安装依赖</h3><p>更新完成软件源后，我们仍然不能直接启动图形软件，需要安装XWayland相关的依赖，按照教程，我们直接安装一个vlc即可</p>]]></description></item><item><title>用Netty实现Trojan（二）</title><link>https://finite.tain.one/zh-cn/docs/surfer/surfer2/</link><pubDate>Fri, 25 Aug 2023 09:49:07 +0800</pubDate><author><name>selcarpa</name></author><guid>https://finite.tain.one/zh-cn/docs/surfer/surfer2/</guid><description>&lt;p>本节主要是介绍如何实现一个允许tcp通过的socks代理服务器，大部分携带网络功能的客户端，如curl、wget、浏览器等，在请求的时候，可以通过环境变量或者设置的形式，使这些客户端通过代理进行请求，以下是一个简单的例子：&lt;/p></description></item><item><title>用Netty实现Trojan（一）</title><link>https://finite.tain.one/zh-cn/docs/surfer/surfer1/</link><pubDate>Fri, 25 Aug 2023 09:48:31 +0800</pubDate><author><name>selcarpa</name></author><guid>https://finite.tain.one/zh-cn/docs/surfer/surfer1/</guid><description><![CDATA[<h2 id="完整代码" class="headerLink">
    <a href="#%e5%ae%8c%e6%95%b4%e4%bb%a3%e7%a0%81" class="header-mark"></a>完整代码</h2><p><a href="https://github.com/selcarpa/surfer/releases/tag/1.13-SNAPSHOT" target="_blank" rel="noopener noreferrer">selcarpa/surfer tag(1.13-SHAPSHOT)</a></p>
<h2 id="选用技术栈" class="headerLink">
    <a href="#%e9%80%89%e7%94%a8%e6%8a%80%e6%9c%af%e6%a0%88" class="header-mark"></a>选用技术栈</h2><ul>
<li>kotlin</li>
<li>Netty</li>
<li>Trojan</li>
</ul>
<h2 id="介绍" class="headerLink">
    <a href="#%e4%bb%8b%e7%bb%8d" class="header-mark"></a>介绍</h2><h3 id="kotlin" class="headerLink">
    <a href="#kotlin" class="header-mark"></a>Kotlin</h3><p>项目采用kotlin语言，它是一种基于JVM的静态类型编程语言，它可以编译成Java字节码，完全兼容Java的生态系统，可以与Java代码无缝互操作。它的语法与Java非常相似，但是它有更多的特性，比如：null安全、扩展函数、运算符重载、lambda表达式、属性代理等等。</p>
<h3 id="netty" class="headerLink">
    <a href="#netty" class="header-mark"></a>Netty</h3><p>Netty是一个异步事件驱动的网络应用程序框架，用于快速开发可维护的高性能协议服务器和客户端。Netty是一个NIO客户端-服务器框架，使用Netty可以快速开发网络应用，例如服务器和客户端协议。Netty提供了一种新的方式来使开发网络应用程序，这种新的方式使得它很容易使用和有很强的扩展性。</p>
<h3 id="什么是trojan" class="headerLink">
    <a href="#%e4%bb%80%e4%b9%88%e6%98%aftrojan" class="header-mark"></a>什么是Trojan</h3><p><a href="https://trojan-gfw.github.io/trojan/protocol.html" target="_blank" rel="noopener noreferrer">Trojan</a>协议是一个类似于socks的代理协议，它的特点是可以在tls的连接中传输，这样就可以在网络中隐藏自己的流量，使得流量看起来像是一个正常的https连接，从而规避流量审查，在认证方式上，trojan采用56字节作为认证字段，用以验证客户端和服务端的身份。在交互报文中，Trojan协议的<code>Trojan request</code>结构与socks5的<code>socks5 CMD</code>几乎一样。</p>]]></description></item></channel></rss>