<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
    >
<channel>
    <title>Extrawdw Blog - CN</title>
    <atom:link href="https://cn.extrawdw.eth.limo/rss.xml" rel="self" type="application/rss+xml" />
    <link>https://cn.extrawdw.eth.limo/</link>
    <description><![CDATA[
    <p>IPFS 上的 <a href="https://blog.extrawdw.net">Extrawdw 博客</a></p>

    ]]></description>
    
    
    <item>
        <title>&#x89E3;&#x51B3; Planet &#x6216;&#x8005; Kubo &#x4E2D; ENS (`.eth`) &#x57DF;&#x540D;&#x65E0;&#x6CD5;&#x66F4;&#x65B0;&#x7684;&#x95EE;&#x9898;</title>
        <link>https://cn.extrawdw.eth.limo/A5EFFBE8-2680-481B-B7D1-2F2CAA9C2D85/</link>
        <guid>https://cn.extrawdw.eth.limo/A5EFFBE8-2680-481B-B7D1-2F2CAA9C2D85/</guid>
        <pubDate>Sat, 11 Jan 2025 00:36:23 -0500</pubDate>
        
        
        <description><![CDATA[
            <h2>TL;DR</h2> 
<pre><code class="language-bash">IPFS_PATH="$HOME/Library/Containers/xyz.planetable.Planet/Data/Library/Application Support/ipfs/" $(find /Applications/Planet.app/Contents/Resources/ -name "ipfs-$(uname -m)-*.bin" | head -n 1) config --json DNS.Resolvers '{"eth.": "https://dns.eth.limo/dns-query"}'`
</code></pre> 
<p>只需要将 Planet 使用的 IPFS 配置文件里的 <code>DNS.Resolvers</code> 设置成 <code>eth.limo</code> 就可以了，具体可以参考 <code>eth.limo</code> 的<a href="https://github.com/ethlimo/documentation/blob/master/ipfs/config.md">文档</a></p> 
<p>对普通的 IPFS （比如 IPFS Desktop），直接用上面提到的文档里的命令</p> 
<pre><code class="language-bash">ipfs config --json DNS.Resolvers '{"eth.": "https://dns.eth.limo/dns-query"}'
</code></pre> 
<p>就可以了。如果只安装了 IPFS Desktop，需要替换成对应的 IPFS 命令行。</p>
        ]]></description>
    </item>
    
    <item>
        <title>Web3 &#x535A;&#x5BA2;&#x8BC4;&#x8BBA;&#x533A;&#x7684;&#x6700;&#x7EC8;&#x65B9;&#x6848;</title>
        <link>https://cn.extrawdw.eth.limo/2248CEDB-D670-4399-AC31-FD192113CB06/</link>
        <guid>https://cn.extrawdw.eth.limo/2248CEDB-D670-4399-AC31-FD192113CB06/</guid>
        <pubDate>Wed, 01 Jan 2025 14:33:11 -0500</pubDate>
        
        <itunes:image href="https://cn.extrawdw.eth.limo/2248CEDB-D670-4399-AC31-FD192113CB06/Screenshot%202025-01-01%20at%2014.45.24.png" />    
        
        
        <description><![CDATA[
            <p>就像<a href="https://dingwen.eth.limo/2307B1D4-8794-4B4A-A277-3AE05DEAAFEB/">短博文</a>里说的那样，使用 giscus 配合 Planet 批量设置评论区还是有一点麻烦的。</p> 
<p>其实主要问题是用户可能通过不同的 IPFS 网关访问，这就导致了不管是 URL 还是 pathname 都不可靠。帖子的标题确实可行，但可能出现没有标题的短博文这种情况。</p> 
<p>一开始的选择是如果没有标题那么就用 JS 把 <code>og:title</code> 写入成发帖时间，可以实现功能，但会有两个问题，如果后期加上了标题、或者发帖时间被修改（Planet 似乎有一个 bug 是编辑帖子的时候时间有概率会变成现在），而手动设置时间则无法设置“秒”，出现这两种情况的话，之前的评论就不会显示了。</p> 
<p>使用标题还有另一个需要处理的问题就是标题本身发生变化的情况。</p> 
<p>所以最终还是决定用 JS 将所有文章的 Open Graph Title 全部动态替换成 Post ID（反正读取这玩意的服务都不会去跑 JS），最终代码如下，似乎只能放在 header 的 Custom Code 里才能生效：</p> 
<p>适用于 Plain 模板：</p> 
<pre><code class="language-html">&lt;!-- Comments --&gt;
&lt;script&gt;
(function() {
  // --- Step 1: Compare og:site_name to the actual page title
  const siteNameTag = document.querySelector('meta[property="og:site_name"]');
  const siteName = siteNameTag ? siteNameTag.getAttribute('content').trim() : '';
  const pageTitle = document.title.trim();

  // --- Step 2: If they differ, update og:title with the last part of the pathname
  if (siteName !== pageTitle) {
    let path = window.location.pathname;
    // Remove trailing slash if any
    if (path.endsWith('/')) {
      path = path.slice(0, -1);
    }
    // Extract the last segment of the path
    const lastPart = path.substring(path.lastIndexOf('/') + 1);

    // Update &lt;meta property="og:title" ...&gt;
    const ogTitleTag = document.querySelector('meta[property="og:title"]');
    if (ogTitleTag) {
      ogTitleTag.setAttribute('content', lastPart);
      console.log(`Updated og:title to "${lastPart}"`);
    }
  }

  // --- Step 3: Create the wrapper &lt;div&gt; elements
  const outerDiv = document.createElement('div');
  outerDiv.style.display = 'flex';
  outerDiv.style.alignItems = 'center';
  outerDiv.style.padding = '0px 20px';

  const innerDiv = document.createElement('div');
  innerDiv.style.flex = '1';
  innerDiv.style.width = '100%';
  innerDiv.style.maxWidth = '700px';
  innerDiv.style.margin = '20px auto';

  // --- Step 4: Load the Giscus script
  const giscusScript = document.createElement('script');
  giscusScript.src = "https://giscus.app/client.js";
  giscusScript.setAttribute('data-repo', "extrawdw-code/blog-giscus");
  giscusScript.setAttribute('data-repo-id', "R_kgDONkfVTg");
  giscusScript.setAttribute('data-category', "General");
  giscusScript.setAttribute('data-category-id', "DIC_kwDONkfVTs4ClpWU");
  giscusScript.setAttribute('data-mapping', "og:title");
  giscusScript.setAttribute('data-strict', "1");
  giscusScript.setAttribute('data-reactions-enabled', "1");
  giscusScript.setAttribute('data-emit-metadata', "0");
  giscusScript.setAttribute('data-input-position', "top");
  giscusScript.setAttribute('data-theme', "preferred_color_scheme");
  giscusScript.setAttribute('data-lang', "en");
  giscusScript.setAttribute('data-loading', "lazy");
  giscusScript.setAttribute('crossorigin', "anonymous");
  giscusScript.async = true;

  // Append script inside the inner div
  innerDiv.appendChild(giscusScript);

  // Then append the inner div to the outer div
  outerDiv.appendChild(innerDiv);

  // Insert the wrapper into &lt;head&gt; or near end of &lt;body&gt;
  document.addEventListener('DOMContentLoaded', function() {
    document.body.appendChild(outerDiv);
  });
})();
&lt;/script&gt;
</code></pre> 
<p>适用于 Sepia 模板：</p> 
<pre><code class="language-html">&lt;!-- Comments --&gt;
&lt;script&gt;
(function() {
  // --- Step 1: Compare og:site_name to the actual page title
  const siteNameTag = document.querySelector('meta[property="og:site_name"]');
  const siteName = siteNameTag ? siteNameTag.getAttribute('content').trim() : '';
  const pageTitle = document.title.trim();

  // --- Step 2: If they differ, update og:title with the last part of the pathname
  if (siteName !== pageTitle) {
    let path = window.location.pathname;
    // Remove trailing slash if any
    if (path.endsWith('/')) {
      path = path.slice(0, -1);
    }
    // Extract the last segment of the path
    const lastPart = path.substring(path.lastIndexOf('/') + 1);

    // Update &lt;meta property="og:title" ...&gt;
    const ogTitleTag = document.querySelector('meta[property="og:title"]');
    if (ogTitleTag) {
      ogTitleTag.setAttribute('content', lastPart);
      console.log(`Updated og:title to "${lastPart}"`);
    }
  }

  // --- Step 3: Create the wrapper &lt;div&gt; elements
  const outerDiv = document.createElement('div');
  outerDiv.style.display = 'flex';
  outerDiv.style.alignItems = 'center';
  outerDiv.style.padding = '0px 20px';

  const innerDiv = document.createElement('div');
  innerDiv.style.flex = '1';
  innerDiv.style.width = '100%';
  innerDiv.style.maxWidth = '700px';
  innerDiv.style.margin = '20px auto';

  // --- Step 4: Load the Giscus script
  const giscusScript = document.createElement('script');
  giscusScript.src = "https://giscus.app/client.js";
  giscusScript.setAttribute('data-repo', "extrawdw-code/blog-giscus");
  giscusScript.setAttribute('data-repo-id', "R_kgDONkfVTg");
  giscusScript.setAttribute('data-category', "General");
  giscusScript.setAttribute('data-category-id', "DIC_kwDONkfVTs4ClpWU");
  giscusScript.setAttribute('data-mapping', "og:title");
  giscusScript.setAttribute('data-strict', "1");
  giscusScript.setAttribute('data-reactions-enabled', "1");
  giscusScript.setAttribute('data-emit-metadata', "0");
  giscusScript.setAttribute('data-input-position', "top");
  giscusScript.setAttribute('data-theme', "preferred_color_scheme");
  giscusScript.setAttribute('data-lang', "en");
  giscusScript.setAttribute('data-loading', "lazy");
  giscusScript.setAttribute('crossorigin', "anonymous");
  giscusScript.async = true;

  // Append script inside the inner div
  innerDiv.appendChild(giscusScript);

  // Then append the inner div to the outer div
  outerDiv.appendChild(innerDiv);

  // Finally, place this wrapper inside the div with id="main-container"
  document.addEventListener('DOMContentLoaded', function() {
    const container = document.getElementById("main-container");
    if (container) {
      container.appendChild(outerDiv);
    } else {
      console.warn('Could not find a container with id="main-container".');
    }
  });
})();
&lt;/script&gt;
</code></pre> 
<p>外边套的俩 div 是参考的<a href="https://blog.v2ex.com/giscus/">站长的网站</a>设计。</p> 
<p>最终效果如下：</p> 
<img width="1230" alt="Screenshot 2025-01-01 at 14.46.06" src="https://cn.extrawdw.eth.limo/2248CEDB-D670-4399-AC31-FD192113CB06/Screenshot 2025-01-01 at 14.46.06.png" /> 
<img width="1230" alt="Screenshot 2025-01-01 at 14.45.24" src="https://cn.extrawdw.eth.limo/2248CEDB-D670-4399-AC31-FD192113CB06/Screenshot 2025-01-01 at 14.45.24.png" /> 
<p>在聚合站点的时候，只要打开“重用原始ID”的选项就可以让评论也“同步”过去。</p> 
<p>p.s.：Planet 在聚合站点且保留 ID 的情况下，Bug 太多了……经常出现原帖被当成聚合过来的帖子，然后无法编辑需要重启的情况。</p>
        ]]></description>
    </item>
    
    <item>
        <title>&#x8BC4;&#x8BBA;&#x533A;&#x5DF2;&#x4E0A;&#x7EBF;</title>
        <link>https://cn.extrawdw.eth.limo/A427DE5D-AAA5-4C35-AB25-E62CB082F8B2/</link>
        <guid>https://cn.extrawdw.eth.limo/A427DE5D-AAA5-4C35-AB25-E62CB082F8B2/</guid>
        <pubDate>Wed, 01 Jan 2025 03:13:56 -0500</pubDate>
        
        
        <description><![CDATA[
            <p>由 <a href="https://giscus.app">giscus</a> 提供支持。</p>
        ]]></description>
    </item>
    
    <item>
        <title>&#x5728; WSL &#x4E2D;&#x914D;&#x7F6E;&#x5F00;&#x53D1;&#x73AF;&#x5883;</title>
        <link>https://cn.extrawdw.eth.limo/B7728BA2-A084-4406-92D6-132D09E8F4D5/</link>
        <guid>https://cn.extrawdw.eth.limo/B7728BA2-A084-4406-92D6-132D09E8F4D5/</guid>
        <pubDate>Tue, 31 Dec 2024 23:15:43 -0500</pubDate>
        
        
        <description><![CDATA[
            <p>本帖记录了一些我常用的 WSL 设置。</p> 
<h2>安装常用包</h2> 
<p>Ubuntu:</p> 
<pre><code class="language-sh">sudo apt install build-essential
</code></pre> 
<p>Debian:</p> 
<pre><code class="language-sh">sudo apt install gcc g++
</code></pre> 
<p>Debian Common:</p> 
<pre><code class="language-sh">sudo apt install gdb valgrind git gpg curl wget zip unzip zsh
</code></pre> 
<h2>设置 Zsh</h2> 
<p>将 <code>/bin/zsh</code> 设置成默认 shell</p> 
<pre><code class="language-bash">chsh -s /bin/zsh
</code></pre> 
<p>安装 <code>oh-my-zsh</code> 和常用插件</p> 
<pre><code class="language-bash">wget https://gist.githubusercontent.com/dingwen07/1261eac531f7f080d72b78f931a8ca01/raw/omz-setup.sh
chmod +x ./omz-setup.sh
./omz-setup.sh
</code></pre> 
<p>编辑 <code>~/.zshrc</code> 启用插件</p> 
<pre><code class="language-sh">plugins=(
    git
    zsh-autosuggestions
    zsh-syntax-highlighting
)
</code></pre> 
<h2>Java 环境</h2> 
<p>一般使用 <a href="https://sdkman.io/">Home | SDKMAN! the Software Development Kit Manager</a> 管理 Java 环境。需要安装 <code>unzip</code> 包。</p> 
<pre><code class="language-sh">curl -s "https://get.sdkman.io" | bash
</code></pre> 
<h2>为 WSL 配置 Windows Terminal</h2> 
<h3>为 CLI 程序开启鼠标滚动功能</h3> 
<p>默认情况下 WSL 中的 CLI 程序比如 <code>less</code>，<code>nano</code> 不支持鼠标滚动，需要手动设置。设置完成之后，鼠标操作将默认由应用程序接收，如需选中对应程序中的内容，需要按住 Shift 键然后再进行选择。</p> 
<h4><code>less</code> （包括 <code>man</code>）</h4> 
<p>将下面的内容保存为文本文件：</p> 
<pre><code>#env
LESS = --mouse
</code></pre> 
<p>然后运行 <code>lesskey &lt;filename&gt;</code>（较新的发行版可以忽略这一步，将文本保存到 <code>~/.lesskey</code> 即可）。</p> 
<h4><code>nano</code></h4> 
<p>在 <code>~/.nanorc</code> 中添加：</p> 
<pre><code>set mouse
</code></pre> 
<h4><code>vi[m]</code></h4> 
<p>在 <code>~/.vi[m]rc</code> 中添加：</p> 
<pre><code>set mouse=a
</code></pre> 
<h2>SSH Agent</h2> 
<p>使用 <code>npiperelay.exe</code> 将 Windows 套接字 <code>//./pipe/openssh-ssh-agent</code> 转发到 WSL <sup class="footnote-ref"><a href="#fn-1" id="fnref-1" data-footnote-ref>1</a></sup><sup class="footnote-ref"><a href="#fn-2" id="fnref-2" data-footnote-ref>2</a></sup>。</p> 
<p>首先需要确保 Windows 的 <code>PATH</code> 里有 <code>npiperelay.exe</code>，这样 WSL 内部就可以直接访问。可以通过 WinGet 安装。之后在 WSL 的系统里安装 <code>socat</code>：</p> 
<pre><code class="language-sh">sudo apt install socat
</code></pre> 
<p>然后将这一段脚本写入 <code>~/.win-ssh-agent/agent-bridge.sh</code></p> 
<pre><code class="language-sh"># Code extracted from https://stuartleeks.com/posts/wsl-ssh-key-forward-to-windows/ with minor modifications

# Configure ssh forwarding
export SSH_AUTH_SOCK=$HOME/.win-ssh-agent/agent.sock
# need `ps -ww` to get non-truncated command for matching
# use square brackets to generate a regex match for the process we want but that doesn't match the grep command running it!
ALREADY_RUNNING=$(ps -auxww | grep -q "[n]piperelay.exe -ei -s //./pipe/openssh-ssh-agent"; echo $?)
if [[ $ALREADY_RUNNING != "0" ]]; then
    if [[ -S $SSH_AUTH_SOCK ]]; then
        # not expecting the socket to exist as the forwarding command isn't running (http://www.tldp.org/LDP/abs/html/fto.html)
        echo "removing previous socket..."
        rm $SSH_AUTH_SOCK
    fi
    echo "Starting SSH-Agent relay..."
    # setsid to force new session to keep running
    # set socat to listen on $SSH_AUTH_SOCK and forward to npiperelay which then forwards to openssh-ssh-agent on windows
    (setsid socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:"npiperelay.exe -ei -s //./pipe/openssh-ssh-agent",nofork &amp;) &gt;/dev/null 2&gt;&amp;1
fi
</code></pre> 
<p>之后在 <code>.bashrc</code> 或者 <code>.zshrc</code> 中添加</p> 
<pre><code class="language-sh">source $HOME/.win-ssh-agent/agent-bridge.sh
</code></pre> 
<p>就可以了。</p> 
<h2>GnuPG</h2> 
<p>参照 <a href="./E866F5DA-F9C4-4137-9D7F-60A1F68FC0AD/">在 WSL2 中使用 GPG 命令行工具以及对 Git commit 进行签名</a><sup class="footnote-ref"><a href="#fn-3" id="fnref-3" data-footnote-ref>3</a></sup></p> 
<h2>1Password CLI</h2> 
<p>使用 <code>op</code> 命令行进行方便且安全的凭据存取，首先在 Windows 中安装：</p> 
<pre><code class="language-powershell">winget install AgileBits.1Password.CLI
</code></pre> 
<p>之后在 <code>.bashrc</code> 或者 <code>.zshrc</code> 中添加如下内容：</p> 
<pre><code class="language-sh"># Aliases
alias op="op.exe"
# alias sudo="sudo -S &lt;&lt;&lt; $(op read "op://Personal/Account Password/password")"

# Completions
eval "$(op completion zsh)"; compdef _op op.exe
</code></pre> 
<h2>参考</h2> 
<section class="footnotes" data-footnotes> 
 <ol> 
  <li id="fn-1"> <p><a href="https://dev.to/d4vsanchez/use-1password-ssh-agent-in-wsl-2j6m">Use 1Password SSH Agent in WSL - DEV Community</a> <a href="#fnref-1" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a></p> </li> 
  <li id="fn-2"> <p><a href="https://stuartleeks.com/posts/wsl-ssh-key-forward-to-windows/">Forwarding SSH Agent requests from WSL to Windows - stuartleeks.com</a> <a href="#fnref-2" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a></p> </li> 
  <li id="fn-3"> <p><a href="./E866F5DA-F9C4-4137-9D7F-60A1F68FC0AD/">在 WSL2 中使用 GPG 命令行工具以及对 Git commit 进行签名</a> <a href="#fnref-3" class="footnote-backref" data-footnote-backref aria-label="Back to content">↩</a></p> </li> 
 </ol> 
</section>
        ]]></description>
    </item>
    
    <item>
        <title>Mac &#x65F6;&#x95F4;&#x673A;&#x5668;&#x201C;&#x68C0;&#x6D4B;&#x5230;&#x5907;&#x4EFD;&#x65E0;&#x6CD5;&#x53EF;&#x9760;&#x6062;&#x590D;&#x201D;&#x7684;&#x89E3;&#x51B3;&#x65B9;&#x6CD5;</title>
        <link>https://cn.extrawdw.eth.limo/BF15E650-41F6-4F5E-8610-1DDCBDFBE34D/</link>
        <guid>https://cn.extrawdw.eth.limo/BF15E650-41F6-4F5E-8610-1DDCBDFBE34D/</guid>
        <pubDate>Thu, 12 Dec 2024 14:04:00 -0500</pubDate>
        
        <itunes:image href="https://cn.extrawdw.eth.limo/BF15E650-41F6-4F5E-8610-1DDCBDFBE34D/IMG_3843.png" />    
        
        
        <description><![CDATA[
            <p>最近备份到Mac mini网络磁盘的时间机器备份出现了无法完成的情况，似乎是在一次内核崩溃之后出现的。</p> 
<img width="358" alt="IMG_3843" src="https://cn.extrawdw.eth.limo/BF15E650-41F6-4F5E-8610-1DDCBDFBE34D/IMG_3843.png" /> 
<p>具体的报错信息为：</p> 
<blockquote> 
 <p>时间机器检测到“目标”上的备份无法可靠恢复。时间机器必须抹掉现有的备份历史记录并创建新的备份来修复此问题。</p> 
 <p>Time Machine detected that your backups on “destination” can not be reliably restored. Time Machine must erase your existing backup history and start a new backup to correct this.</p> 
</blockquote> 
<p>出现这个提示并不代表备份已经损坏，但系统并不允许进行新的备份。</p> 
<p>如果不想抹掉备份历史记录，可以尝试在网络共享中找到备份磁盘映像（sparsebundle），这个时候磁盘映像文件可能是处于“锁定”状态，按 <kbd>⌘ + I</kbd> 打开详情将磁盘映像解锁。</p> 
<img width="377" alt="Screenshot 2024-12-12 at 13.49.01" src="https://cn.extrawdw.eth.limo/BF15E650-41F6-4F5E-8610-1DDCBDFBE34D/Screenshot 2024-12-12 at 13.49.01.png" /> 
<p>然后右键-显示包内容，其中的 <code>token</code> 文件可能也会被锁定，同样解锁它。</p> 
<img width="979" alt="Screenshot-2024-12-12-at-13.51.36" src="https://cn.extrawdw.eth.limo/BF15E650-41F6-4F5E-8610-1DDCBDFBE34D/Screenshot-2024-12-12-at-13.51.36.png" /> 
<p>然后使用 Xcode 打开 <code>com.apple.TimeMachine.MachineID.plist</code> 文件，将键 <code>VerificationState</code> 的值从 <code>2</code> 修改为 <code>1</code> 并保存。</p> 
<img width="962" alt="Screenshot-2024-12-12-at-13.53.07" src="https://cn.extrawdw.eth.limo/BF15E650-41F6-4F5E-8610-1DDCBDFBE34D/Screenshot-2024-12-12-at-13.53.07.png" /> 
<p>之后再次重试时间机器备份并验证备份，如果能够成功验证那么备份就没有损坏。</p>
        ]]></description>
    </item>
    
    <item>
        <title>&#x5728; WSL2 &#x4E2D;&#x4F7F;&#x7528; GPG &#x547D;&#x4EE4;&#x884C;&#x5DE5;&#x5177;&#x4EE5;&#x53CA;&#x5BF9; Git commit &#x8FDB;&#x884C;&#x7B7E;&#x540D;</title>
        <link>https://cn.extrawdw.eth.limo/E866F5DA-F9C4-4137-9D7F-60A1F68FC0AD/</link>
        <guid>https://cn.extrawdw.eth.limo/E866F5DA-F9C4-4137-9D7F-60A1F68FC0AD/</guid>
        <pubDate>Fri, 30 Jun 2023 04:47:00 -0400</pubDate>
        
        
        <description><![CDATA[
            <p>网上找到的绝大多数方法都是使用 <code>npiperelay</code> 将 Gpg4win 的 GPG 的 Agent 的 socket 映射到 WSL2 里面，其实更简单的方法是直接在 WSL2 内部使用 <code>gpg.exe</code>。</p> 
<p>如果想要为 Git 签名但是私钥在智能卡里，可以直接设置 <code>git config --global gpg.program gpg.exe</code>，（如果GPG 不在 Windows 的 PATH 里，需要使用绝对路径，通常为 <code>/mnt/c/Program Files (x86)/GnuPG/bin/gpg.exe</code>，为了方便最好还是加到 PATH 里面去，加完之后需要打开一个新的终端）。</p> 
<p>除非程序需要直接的 GPG Agent 访问或者不支持自定义 GPG 二进制，这个方案都比映射 GPG Agent 的套接字要方便不少。</p>
        ]]></description>
    </item>
    
    <item>
        <title>IPFS &#x4E0A;&#x7684; Extrawdw &#x535A;&#x5BA2;</title>
        <link>https://cn.extrawdw.eth.limo/743EB8DD-C77E-4D2F-8F66-54D14314851E/</link>
        <guid>https://cn.extrawdw.eth.limo/743EB8DD-C77E-4D2F-8F66-54D14314851E/</guid>
        <pubDate>Tue, 01 Nov 2022 20:41:31 -0400</pubDate>
        
        
        <description><![CDATA[
            <p>欢迎访问 <a href="https://blog.extrawdw.net">Extrawdw 博客</a>的 IPFS 版本。</p> 
<p>本网站的 IPNS 地址为：<a href="https://ipfs.io/ipns/k51qzi5uqu5dhk7d5cfgj7d6xkt9u51l87qaysw7jcb5d6wxjub9b23ahu80pg/"><code>/ipns/k51qzi5uqu5dhk7d5cfgj7d6xkt9u51l87qaysw7jcb5d6wxjub9b23ahu80pg</code></a>.</p> 
<p>一些已废弃/已删除文章的存档可以在 <a href="https://ipfs.io/ipns/k51qzi5uqu5dk04xxfqzcfc2ya5dhoer3xy1i4ppo9u1r4cilcxhih6fpbvfg0/"><code>/ipns/k51qzi5uqu5dk04xxfqzcfc2ya5dhoer3xy1i4ppo9u1r4cilcxhih6fpbvfg0</code></a> 访问。</p> 
<p>以上超链接均使用 <a href="https://ipfs.io">ipfs.io 网关</a>，你也可以使用其它公共网关或者本地网关进行访问。</p>
        ]]></description>
    </item>
    
    <item>
        <title>&#x7F57;&#x6280; MX Keys Mini &#x2014;&#x2014; &#x7528;&#x4E86;&#x5C31;&#x56DE;&#x4E0D;&#x53BB;&#x7684;&#x8F93;&#x5165;&#x4F53;&#x9A8C;</title>
        <link>https://cn.extrawdw.eth.limo/2B4C0167-BA7D-4317-91AF-4B3AB01079D5/</link>
        <guid>https://cn.extrawdw.eth.limo/2B4C0167-BA7D-4317-91AF-4B3AB01079D5/</guid>
        <pubDate>Fri, 11 Mar 2022 06:51:00 -0500</pubDate>
        
        <itunes:image href="https://cn.extrawdw.eth.limo/2B4C0167-BA7D-4317-91AF-4B3AB01079D5/mx-keys-mini-top-black-us.png" />    
        
        
        <description><![CDATA[
            <p>最近入手了 Logitech MX Keys Mini，使用几天后它集本上替换了 Filco Convertible 2 TKL 成为我的主要输入设备了。</p> 
<p>懒得拍就找了官网的图。我购入的是 Graphite，是一种偏暗的灰色，实际看起来与官网图片的颜色类似。</p> 
<img width="1600" alt="mx-keys-mini-top-black-us" src="https://cn.extrawdw.eth.limo/2B4C0167-BA7D-4317-91AF-4B3AB01079D5/mx-keys-mini-top-black-us.png" /> 
<p>键盘功能上，和罗技高端办公键盘都差不多。连接方面，MX Keys Mini 不支持 Unifying 接收器，采用了新的 Bolt 接收器，包装盒内并不附带（无论是不是 Mac 版），因此我所有的设备只能通过蓝牙连接。键盘支持三台设备自由切换，这也是罗技MX系列的老本行了，和罗技的其它多设备键盘一样，如果你是用的是支持 Flow 功能的鼠标，那么键盘的多设备切换也可以跟随鼠标自动进行。键盘内置充电电池，通过USB-C接口充电，但是不支持作为USB键盘。MX Keys 的功能键里这次有了一个很有趣的静音快捷键，听说是可以在网络会议中方便的开启和关闭麦克风，不过按下这个按键后似乎并没有向系统发送任何按键事件，需要安装罗技的软件才能使用。</p> 
<p>输入体验是 Logitech MX Keys Mini 最让我惊喜的部分。我用过的键盘有笔记本内置的有宏碁、各种 Thinkpad、Lenovo Yoga，也用过 MacBook 的蝶式和剪刀。外置的薄膜用过 K480、K780 和 Magic Keyboard，机械键盘只长时间用过 Filco Convertible 2 TKL 棕轴。在这些键盘中，我可以毫不犹豫的说，除了机械键盘外别的都不如 MX Keys。它类似老款 Thinkpad 的内置键盘：键程较长，手感柔软但段落分明，并不像 Magic Keyboard 那样清脆。但与老款 Thinkpad 不同的是，MX Keys 在按压到底的时候也是“柔软”的，这一开始感觉有些点怪怪的，不过用多了就能发现之前使用薄膜键盘时“敲击在钢板”上的感觉不复存在了，这是一个很大的提升，能增加长时间输入的舒适度。</p> 
<p>当我使用MX Keys作为主要输入工具仅仅半天后，用回薄膜中我第二喜欢的 Lenovo Yoga 14s 内置键盘就觉得有点不适应了，打字就像敲击在钢板上。这种体验的落差是我使用过那么多键盘从来没有遇到过的。当然，手感喜好因人而异，有些人可能更喜欢 Apple 键盘的清脆短键程，也可能有很多人喜欢各种轴体的机械键盘，不过对我来说，目前 MX Keys Mini 是我用过手感最好的薄膜键盘。而相比于机械键盘，Low Profile 的设计又让我的手掌减少了不少压力。</p> 
<p>总的来说，MX Keys Mini 是让我很满意的键盘，功能足够，打字体验很棒。唯一的缺点可能是电池续航，按照官方的数据开启背光灯后只能用10天。</p> 
<p><em>2022年3月11日由 Extrawdw 发布于 <a href="https://blog.extrawdw.net/tech/logitech-mx-keys-mini/">Extrawdw Blog</a>。</em></p>
        ]]></description>
    </item>
    
    <item>
        <title>BitLocker &#x667A;&#x80FD;&#x5361;&#x81EA;&#x7B7E;&#x540D;&#x8BC1;&#x4E66;</title>
        <link>https://cn.extrawdw.eth.limo/E0EA6233-5826-442D-B4B4-BA8C7CD404E8/</link>
        <guid>https://cn.extrawdw.eth.limo/E0EA6233-5826-442D-B4B4-BA8C7CD404E8/</guid>
        <pubDate>Sat, 10 Aug 2019 15:27:00 -0400</pubDate>
        
        
        <description><![CDATA[
            <p>假定智能卡能被识别而且其中有自签名证书（如果是 YubiKey 可以参照<a href="../64AA03C3-4CC2-4A99-9BAC-290906AB4200/">这篇文章</a>）。</p> 
<p>修改注册表<br /> 将<br /> <code>HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\FVE</code> 中的 <code>DWORD</code> 值 <code>SelfSignedCertificates</code> 设置为 <code>1</code>.</p> 
<p>也可以把下面的文本保存为 REG 文件导入。</p> 
<pre><code>Windows Registry Editor Version 5.00
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\FVE]
"SelfSignedCertificates"=dword:00000001
</code></pre> 
<p><em>2019年8月10日由 Extrawdw 发布于 <a href="https://blog.extrawdw.net/computer/windows/bitlocker-smartcard-self-signed-certificates/">Extrawdw Blog</a>。其中的一些信息可能已经过时。</em></p>
        ]]></description>
    </item>
    
    <item>
        <title>YubiKey PIV &#x914D;&#x7F6E;</title>
        <link>https://cn.extrawdw.eth.limo/64AA03C3-4CC2-4A99-9BAC-290906AB4200/</link>
        <guid>https://cn.extrawdw.eth.limo/64AA03C3-4CC2-4A99-9BAC-290906AB4200/</guid>
        <pubDate>Sat, 10 Aug 2019 15:17:00 -0400</pubDate>
        
        <itunes:image href="https://cn.extrawdw.eth.limo/64AA03C3-4CC2-4A99-9BAC-290906AB4200/yubikey-piv-1.png.webp" />    
        
        
        <description><![CDATA[
            <h2>一般信息</h2> 
<p>默认 PIN 码为 <code>123456</code>。 默认 PUK 码为 <code>12345678</code>。</p> 
<p>默认 3DES 管理密钥（9B）是 <code>010203040506070801020304050607080102030405060708</code>。</p> 
<p>存在以下密钥槽：</p> 
<ul> 
 <li> <p>9A, 9C, 9D, 9E: RSA 1024, RSA 2048, or ECC secp256r1 keys (algorithms 6, 7, 11 respectively).</p> </li> 
 <li> <p>9B: Triple-DES key (algorithm 3) for PIV management.</p> </li> 
</ul> 
<p>对于当前版本的 YubiKey NEO 和 YubiKey 4，存储对象的最大大小分别为 2025/3049 字节。</p> 
<p>目前，所有功能都可通过接触式和非接触式接口获得（与规范要求相反）。</p> 
<p>以上信息从 <a href="https://developers.yubico.com/yubico-piv-tool/YubiKey_PIV_introduction.html">Yubico 网站</a>翻译得来</p> 
<h2>配置</h2> 
<p>YubiKey PIV 接口在Windows中是只读智能卡，所以需要使用管理软件 YubiKey Manager 进行管理。先从官网下载并安装 <a href="https://www.yubico.com/products/services-software/download/yubikey-manager/">YubiKey Manager</a>。插入 YubiKey 并进入 PIV 设置。</p> 
<img width="970" alt="YubiKey Manager" src="https://cn.extrawdw.eth.limo/64AA03C3-4CC2-4A99-9BAC-290906AB4200/yubikey-piv-1.png.webp" /> 
<img width="970" alt="YubiKey Manager / PIV" src="https://cn.extrawdw.eth.limo/64AA03C3-4CC2-4A99-9BAC-290906AB4200/yubikey-piv-2.png.webp" /> 
<p>首先需要设置 PIN 和 PUK，打开 Configure PINs &gt; PIN 设置用户 PIN，如果 YubiKey 是第一次使用或者初始化过那可以勾选 “Use default”。PUK 同上，注意，PUK 可以直接重置 PIN，所以请务必设置，如果不需要 PUK 可以通过多次尝试错误 PUK 来屏蔽 PUK。</p> 
<p>接下来还可以设置 Management Key，这个是为了保护 YubiKey 中的证书不被恶意修改的，可以不设置也可以设置。不设置的话默认值在一般信息中可以查找到。</p> 
<p>最后就是导入证书了，YubiKey 有4个证书插槽，分别是 Authentication, Digital Signature, Key Management 和 Card Authentication（分别对应 9A, 9C, 9D, 9E）。其中 Digital Signature 插槽中的私钥操作每次都需要 PIN，而 Card Authentication 插槽永远不需要 PIN（但是我实测还是需要）。我的习惯是把证书导入 Authentication 和 Digital Signature（Digital Signature 的证书似乎不能用于 BitLocker）。</p> 
<p>打开 Certificates 选择合适的插槽后选择“导入”或者“生成”证书，导入的话需要导入 PKCS#12 格式（PFX 或 P12 文件）的证书，如果之前是通过 CSR 向 CA 申请证书则需要导入 CA 签名后的 DES 格式证书。一般个人使用生成一张自签名证书即可。</p> 
<img width="970" alt="YubiKey Manager / PIV / Certificates" src="https://cn.extrawdw.eth.limo/64AA03C3-4CC2-4A99-9BAC-290906AB4200/yubikey-piv-4.png.webp" /> 
<p>注：Yubico 提供的 PIV 管理软件已经从 YubiKey PIV Manager 换成了 YubiKey Manager。经过我的测试， YubiKey PIV Manager 不支持 YubiKey 5 系列，但 YubiKey Manager 支持。</p> 
<p><em>2019年8月10日由 Extrawdw 发布于 <a href="https://blog.extrawdw.net/computer/information-security/yubikey/yubikey-piv-configuration/">Extrawdw Blog</a>。其中的一些信息可能已经过时。</em></p>
        ]]></description>
    </item>
    
    <item>
        <title>&#x5728; GitHub Desktop &#x4E2D;&#x5BF9; Commit &#x7B7E;&#x540D;</title>
        <link>https://cn.extrawdw.eth.limo/CA89C8F3-8108-489C-85BB-28244C0F2CA9/</link>
        <guid>https://cn.extrawdw.eth.limo/CA89C8F3-8108-489C-85BB-28244C0F2CA9/</guid>
        <pubDate>Sat, 25 May 2019 15:38:00 -0400</pubDate>
        
        <itunes:image href="https://cn.extrawdw.eth.limo/CA89C8F3-8108-489C-85BB-28244C0F2CA9/github-desktop-install-dir.png.webp" />    
        
        
        <description><![CDATA[
            <p>GitHub 的<a href="https://help.github.com/en/articles/signing-commits">文档</a>中提到 GitHub Desktop 不支持签名，应用中也确实没有给出签名选项。不过，可以通过修改 GitHub Desktop 使用的 Git 的配置来签名。</p> 
<p>首先打开 GitHub Desktop 的安装目录，Windows 一般在 “<code>%USERPROFILE%/AppData/Local/GitHubDesktop</code>” 下面。</p> 
<img width="1575" alt="GitHub Desktop Install Directory" src="https://cn.extrawdw.eth.limo/CA89C8F3-8108-489C-85BB-28244C0F2CA9/github-desktop-install-dir.png.webp" /> 
<p>可以看到几个 “app” 开头的、跟着版本号的目录，选择修改日期最近的那个目录，依次打开 <code>resources/app/git/cmd</code> 会看到 “<code>git.exe</code>”，在 “<code>cmd</code>” 目录里面打开命令提示符，用 <code>git</code> 命令配置 Commit 签名就可以了。下面的命令会默认对所有 Commit 签名。</p> 
<pre><code class="language-batch">git.exe config --global user.signingkey &lt;Key ID&gt;
git.exe config --global commit.gpgsign true
</code></pre> 
<p><em>2019年5月25日由 Extrawdw 发布于 <a href="https://blog.extrawdw.net/computer/github-desktop-commit-signing/">Extrawdw Blog</a>。其中的一些信息可能已经过时。</em></p>
        ]]></description>
    </item>
    
    <item>
        <title>&#x4F7F;&#x7528; TinyProxy &#x642D;&#x5EFA;&#x4EE3;&#x7406;&#x670D;&#x52A1;&#x5668;</title>
        <link>https://cn.extrawdw.eth.limo/1E1AE4AE-D2F6-4B7D-BE3F-EE84FDFA44B4/</link>
        <guid>https://cn.extrawdw.eth.limo/1E1AE4AE-D2F6-4B7D-BE3F-EE84FDFA44B4/</guid>
        <pubDate>Sun, 03 Mar 2019 12:20:00 -0500</pubDate>
        
        
        <description><![CDATA[
            <h2>安装</h2> 
<pre><code class="language-bash">sudo apt update
sudo apt install tinyproxy
</code></pre> 
<h2>配置</h2> 
<p>TinyProxy配置文件位于 <code>/etc/tinyproxy.conf</code></p> 
<p>注释掉 <code>Allow 127.0.0.1</code> 即可允许任何局域网设备连接</p> 
<h2>管理服务</h2> 
<h3>启动</h3> 
<pre><code class="language-bash">sudo service tinyproxy start
</code></pre> 
<h3>停止</h3> 
<pre><code class="language-bash">sudo service tinyproxy stop
</code></pre> 
<h3>重新启动</h3> 
<pre><code class="language-bash">sudo service tinyproxy restart
</code></pre> 
<p><em>2019年3月3日由 Extrawdw 发布于 <a href="https://blog.extrawdw.net/computer/unix/tinyproxy-server/">Extrawdw Blog</a>。其中的一些信息可能已经过时。</em></p>
        ]]></description>
    </item>
    
    <item>
        <title>YubiKey OTP &#x914D;&#x7F6E;</title>
        <link>https://cn.extrawdw.eth.limo/702C5F82-B913-45D4-AD2C-C22B06A3669F/</link>
        <guid>https://cn.extrawdw.eth.limo/702C5F82-B913-45D4-AD2C-C22B06A3669F/</guid>
        <pubDate>Sat, 09 Feb 2019 11:23:00 -0500</pubDate>
        
        <itunes:image href="https://cn.extrawdw.eth.limo/702C5F82-B913-45D4-AD2C-C22B06A3669F/yubikey-personalization-tool-about.png.webp" />    
        
        
        <description><![CDATA[
            <p>YubiKey 的 OTP 接口有两个插槽（slot），分别可以用来存放两个凭据（OTP、Static Password、HOTP-TOTP等）。OTP 密码是长度为45的字符串，前12位是该 OTP 凭据的 ID，后面的是一次性密码。（获取 OTP 可以打开记事本，把输入法换成英文，插入 YubiKey，然后触摸一下金属圆盘）。</p> 
<p>Yubico在生产YubiKey的时候会在插槽1放入一个OTP凭据，Yubico 提供的凭据 ID 开头是“cc”，后期上传的凭据 ID 开头是“vv”。Yubico提供的 OTP 凭据是受信任的，后期上传的没有出厂自带的那么可信，因为在传输和保存的时候私钥可能会泄露。这是官方的说法：’vv‘ prefix credentials are not guaranteed to have the same availability as production ‘cc’ prefix credentials. Yubico reserves the right to revoke any ‘vv‘ prefix credential on the Yubico validation service (YubiCloud) at any time, for any reason, including if abuse is detected or if the credential is loaded onto a counterfeit YubiKey. (From <a href="https://upload.yubico.com/">Yubico AES Key Upload</a>)</p> 
<p>注意，YubiCloud 不允许“cc”开头的凭据 ID 上传，你可以在 YubiKey Personalization Tool 上面生成“cc”甚至别的开头的凭据，不过只能上传到自己或第三方建立的 OTP 验证服务器上。</p> 
<h2>管理 OTP 接口</h2> 
<p>我们可以使用 YubiKey Personalization Tool 来管理 YubiKey 的 OTP 接口（YubiKey Personalization Tool 支持命令行，这里只介绍 GUI 的使用，Linux 下可以 PPA 安装），我们可以从 Yubico 支持页面获得 YubiKey Personalization Tool。</p> 
<img width="904" alt="YubiKey Personalization Tool" src="https://cn.extrawdw.eth.limo/702C5F82-B913-45D4-AD2C-C22B06A3669F/yubikey-personalization-tool-about.png.webp" /> 
<p>在 YubiKey Personalization Tool 中点“Yubico OTP”，然后点击“Quick”或者“Advanced”就可以管理 YubiKey 的 OTP 接口，一般来说，Slot 1 不进行改变。</p> 
<p>如果要增加一个 OTP 凭据，插入 YubiKey，选择“Configuration Slot 2”，然后点击“Regenerate”来生成一个凭据（这里可以多点几次增加随机数的熵），如果需要使用第三方验证服务器那需要记下所有文本框中的内容，之后点“Write Configuration”向 YubiKey 中写入配置。写入完后需要上传凭据到 YubiCloud，工具会要求你打开一个网站，工具会自动在网站中填充刚刚生成的凭据，点击上传即可。</p> 
<img width="904" alt="YubiKey Personalization Tool OTP" src="https://cn.extrawdw.eth.limo/702C5F82-B913-45D4-AD2C-C22B06A3669F/yubikey-personalization-tool-otp.png.webp" /> 
<p>提示：在生成凭据的时候，请使用一台受信任的电脑。在上传凭据时，确保使用 HTTPS 连接并确认网站的 SSL 证书是由受信任的 CA 颁发的。</p> 
<p><em>2019年2月9日由 Extrawdw 发布于 <a href="https://blog.extrawdw.net/computer/information-security/yubikey/yubikey-otp-configuration/">Extrawdw Blog</a>。其中的一些信息可能已经过时。</em></p>
        ]]></description>
    </item>
    
    <item>
        <title>YubiKey &#x4ECB;&#x7ECD;</title>
        <link>https://cn.extrawdw.eth.limo/FA9F43FB-1167-49C6-B1FF-96072F773E6C/</link>
        <guid>https://cn.extrawdw.eth.limo/FA9F43FB-1167-49C6-B1FF-96072F773E6C/</guid>
        <pubDate>Fri, 28 Dec 2018 15:54:00 -0500</pubDate>
        
        <itunes:image href="https://cn.extrawdw.eth.limo/FA9F43FB-1167-49C6-B1FF-96072F773E6C/5nfc_hero_2021.png.webp" />    
        
        
        <description><![CDATA[
            <h2>介绍</h2> 
<p>YubiKey是由Yubico生产的身份认证设备，支持一次性密码（OTP）、公钥加密和身份认证，以及由FIDO联盟（FIDO U2F）开发的通用第二因素（U2F）协议。它让用户可以透过提交一次性密码或是使用设备产生的公开/私密金钥来安全地登录自己的帐户。针对不支持一次性密码的网站，YubiKey也可以存储静态密码。Facebook使用YubiKey作为员工凭证；Google同时为雇员和用户提供支持。还有一些密码管理器也支持YubiKey。 （<a href="https://zh.wikipedia.org/wiki/YubiKey">YubiKey – 维基百科</a>）</p> 
<img width="600" alt="YubiKey 5 NFC" src="https://cn.extrawdw.eth.limo/FA9F43FB-1167-49C6-B1FF-96072F773E6C/5nfc_hero_2021.png.webp" /> 
<p>YubiKey每个系列有多个版本，分别支持USB-A、USB-C和NFC接口。NANO版本非常小，适合一直放在USB口里面。还有一个Security Key by Yubico，只支持FIDO U2F和FIDO2，不支持别的接口（比如OTP），不推荐购买。还有FIPS版本，支持FIPS 140-2，应该是用来存放证书的（比如文档、代码的签名证书），没有需求不推荐购买。</p> 
<p>最近Yubico出了新的YubiKey 5系列，在YubiKey 4系列的基础下增加了FIDO2和NFC（只有YubiKey 5 NFC支持）。目前淘宝上有卖但是价格很高，我的YubiKey 5 NFC是在官网买的， 价格45刀。</p> 
<h2>接口</h2> 
<p>YubiKey支持如下接口：<br /> <a href="#U2F">U2F</a><br /> <a href="#FIDO2">FIDO2</a>（YubiKey 5 Series &amp; Security Key by Yubico only）<br /> <a href="#OTP">OTP</a><br /> <a href="#OATH">OATH</a><br /> <a href="#OpenPGP">OpenPGP</a><br /> <a href="#PIV">PIV</a></p> 
<h3>U2F</h3> 
<p>U2F（通用第二因素），是一种开放的标准，通过USB和NFC验证用户对设备的访问权。通过USB验证时，YubiKey作为HID设备使用 。目前很多应用（Google、GitHub、DropBox、Facebook、Twitter等）都采用这个标准，U2F验证的方式是服务器提交质询（challenge），设备用私钥签名，返回响应（response）。特点是要求直接的USB访问而且验证的时候没有输入框，所以远程桌面的时候一般都不能用U2F。</p> 
<img width="525" alt="The basic process flow of U2F (From Yubico)" src="https://cn.extrawdw.eth.limo/FA9F43FB-1167-49C6-B1FF-96072F773E6C/u2f.png.webp" /> 
<h3>FIDO2</h3> 
<p>FIDO2是FIDO联盟开发的提供免密码认证的协议，只有 YubiKey 5 Series 和 Security Key by Yubico 支持。应用方面目前只有微软支持，Windows 10 Insider Preview 版本现在可以在设置里面调整FIDO2设置（不要点重置安全密钥，可能会导致OTP和U2F凭据丢失），需要把Microsoft Account网页调成英语才能设置，这个协议我没有过多的了解，附上官方的网页。</p> 
<p><a href="https://developers.yubico.com/FIDO2/">FIDO2</a></p> 
<h3><a href="../702C5F82-B913-45D4-AD2C-C22B06A3669F/">OTP</a></h3> 
<p>OTP（一次性密码）是Yubico自己的协议，在进行OTP验证时，YubiKey作为HID设备使用。触摸YubiKey上面的金属圆盘即可激活并向电脑输入一串字符，前12位是密钥ID，后面是一次性密码。服务器与YubiKey拥有同样的密钥，验证时使用Yubico的私有算法计算一次性密码进行验证，通过计数器防止重放攻击。YubiKey有两个OTP插槽（slot），出厂时插槽1会自带一个密钥（已经被安全地保存到YubiCloud服务器），出厂密钥的ID是c开头的，自己生成的是v开头的。对个人来说出厂密钥是最可靠的。YubiKey OTP插槽中的密钥可以手动生成，但是不可以导出，因此千万不要手欠删除出厂密钥，我之前在搞FIDO2的时候重置了OTP插槽，就再也弄不回来了。</p> 
<h3>OATH</h3> 
<p>YubiKey的OATH接口与别的接口不同，它并不直接进行身份认证，它更接近手机上的谷歌身份验证器。OATH用于存储<a href="https://en.m.wikipedia.org/wiki/HMAC-based_One-time_Password_algorithm">HOTP</a>或<a href="https://en.m.wikipedia.org/wiki/Time-based_One-time_Password_algorithm">TOTP</a>凭据，大多数应用的两步认证都支持它们。</p> 
<h3>OpenPGP</h3> 
<p>YubiKey可以被识别成<a href="https://www.openpgp.org/">OpenPGP</a>智能卡，可以存放OpenPGP证书的私钥。</p> 
<h3><a href="../64AA03C3-4CC2-4A99-9BAC-290906AB4200/">PIV</a></h3> 
<p>PIV接口可以存放X.509证书，用于代码和文档签名。Windows会把YubiKey识别为智能卡，可以用于EFS，Bitlocker好像因为证书问题不行（更新：已经解决Bitlocker证书问题，参考<a href="../E0EA6233-5826-442D-B4B4-BA8C7CD404E8/">这篇文章</a>）。</p> 
<p><em>2018年12月28日由 Extrawdw 发布于 <a href="https://blog.extrawdw.net/computer/information-security/yubikey/yubikey-introduction/">Extrawdw Blog</a>。其中的一些信息可能已经过时。</em></p>
        ]]></description>
    </item>
    
    <item>
        <title>Ubuntu &#x5B89;&#x88C5; OpenVPN</title>
        <link>https://cn.extrawdw.eth.limo/8F03BA71-5486-4EFB-8823-19F277886F15/</link>
        <guid>https://cn.extrawdw.eth.limo/8F03BA71-5486-4EFB-8823-19F277886F15/</guid>
        <pubDate>Wed, 20 Jun 2018 18:31:00 -0400</pubDate>
        
        
        <description><![CDATA[
            <h2>介绍</h2> 
<p>希望通过自己的智能手机或者笔记本经由非受信网络（例如旅馆或者咖啡厅WiFi）安全访问互联网？虚拟专有网络 (VPN)无疑是最理想的解决方案。流量会首先被引导至VPN服务器，而后再前往目的地。</p> 
<h2>步骤</h2> 
<p>执行</p> 
<pre><code class="language-bash">sudo wget https://git.io/vpn -O openvpn-install.sh &amp;&amp; bash openvpn-install.sh
</code></pre> 
<p>或者下载 <a href="openvpn-install.sh">openvpn-install.sh</a> 然后执行</p> 
<pre><code class="language-bash">sudo bash openvpn-install.sh
</code></pre> 
<p>Copyright (c) 2013 Nyr. Released under the MIT License.</p> 
<p>GitHub: <a href="https://github.com/Nyr/openvpn-install">https://github.com/Nyr/openvpn-install</a></p> 
<p><em>2018年6月20日由 Extrawdw 发布于 <a href="https://blog.extrawdw.net/computer/unix/ubuntu-openvpn/">Extrawdw Blog</a>。其中的一些信息可能已经过时。</em></p>
        ]]></description>
    </item>
    
    <item>
        <title>Ubuntu 18.04 &#x5B89;&#x88C5; Java 10 (PPA)</title>
        <link>https://cn.extrawdw.eth.limo/36FC3E6D-79B7-4D14-87D4-378E881CA4EA/</link>
        <guid>https://cn.extrawdw.eth.limo/36FC3E6D-79B7-4D14-87D4-378E881CA4EA/</guid>
        <pubDate>Sun, 17 Jun 2018 21:33:00 -0400</pubDate>
        
        
        <description><![CDATA[
            <p>添加apt源</p> 
<pre><code class="language-bash">sudo add-apt-repository ppa:linuxuprising/java
sudo apt update
</code></pre> 
<p>安装Java 10并设为默认</p> 
<pre><code class="language-bash">sudo apt install oracle-java10-installer oracle-java10-set-default
sudo apt remove oracle-java10-set-default
</code></pre> 
<p><em>2018年6月17日由 Extrawdw 发布于 <a href="https://blog.extrawdw.net/computer/unix/ubuntu-18-04-java-10-ppa/">Extrawdw Blog</a>。其中的一些信息可能已经过时。</em></p>
        ]]></description>
    </item>
    
</channel>
</rss>
