<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:wfw="http://wellformedweb.org/CommentAPI/">
<channel>
<title>Eric&#039;s Blog</title>
<link>https://153030.xyz/</link>
<atom:link href="https://eblog.ink/feed/" rel="self" type="application/rss+xml" />
<language>zh-CN</language>
<description>Welcome Eric&#039;s Blog</description>
<lastBuildDate>Tue, 03 Mar 2026 06:20:00 +0000</lastBuildDate>
<pubDate>Tue, 03 Mar 2026 06:20:00 +0000</pubDate>
<item>
<title>【Windows】powershell 命令</title>
<link>https://eblog.ink/archives/385/</link>
<guid>https://eblog.ink/archives/385/</guid>
<pubDate>Tue, 24 Sep 2024 02:51:00 +0000</pubDate>
<dc:creator>eric</dc:creator>
<description><![CDATA[删除powershell 历史记录Remove-Item (Get-PSReadlineOption).HistorySavePath通过命令提示符进入管理员模式Start-Process po...]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<p>删除powershell 历史记录</p><pre><code>Remove-Item (Get-PSReadlineOption).HistorySavePath
</code></pre><p>通过命令提示符进入管理员模式</p><pre><code>Start-Process powershell -Verb runAs

Start-Process powershell -Verb runAs -ArgumentList &#039;-NoExit&#039;, &#039;-Command&#039;, &quot;Set-Location -Path &#039;$PWD&#039;&quot;

</code></pre><p>直接创建本地账户</p><pre><code>start ms-cxh:localonly
</code></pre><p>MAS脚本</p><pre><code>irm https://get.activated.win | iex</code></pre>
]]></content:encoded>
<slash:comments>0</slash:comments>
<comments>https://eblog.ink/archives/385/#comments</comments>
<wfw:commentRss>https://eblog.ink/feed/</wfw:commentRss>
</item>
<item>
<title>【网站】Docker配置CLIProxyAPI Plus </title>
<link>https://eblog.ink/archives/402/</link>
<guid>https://eblog.ink/archives/402/</guid>
<pubDate>Tue, 03 Mar 2026 06:20:00 +0000</pubDate>
<dc:creator>eric</dc:creator>
<description><![CDATA[Github地址为 https://github.com/router-for-me/CLIProxyAPI2. 搭建选择一个目录，本文中使用的是/data/CLIProxyAPI运行 mkdi...]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<p>Github地址为 <a href="https://github.com/router-for-me/CLIProxyAPI"><a href="https://github.com/router-for-me/CLIProxyAPI">https://github.com/router-for-me/CLIProxyAPI</a></a></p><h2><strong>2. 搭建</strong></h2><p>选择一个目录，本文中使用的是/data/CLIProxyAPI</p><p>运行 <code>mkdir -p /data/CLIProxyAPI &amp;&amp; touch /data/CLIProxyAPI/config.yaml</code> ，创建项目配置文件</p><p>复制以下项目配置，将 secret-key 修改为你的密码</p><pre><code># Server host/interface to bind to. Default is empty (&quot;&quot;) to bind all interfaces (IPv4 + IPv6).
# Use &quot;127.0.0.1&quot; or &quot;localhost&quot; to restrict access to local machine only.
host: &quot;&quot;
# Server port
port: 8317
# TLS settings for HTTPS. When enabled, the server listens with the provided certificate and key.
tls:
  enable: false
  cert: &quot;&quot;
  key: &quot;&quot;
# Management API settings
remote-management:
# Whether to allow remote (non-localhost) management access.
# When false, only localhost can access management endpoints (a key is still required).
  allow-remote: true
# Management key. If a plaintext value is provided here, it will be hashed on startup.
# All management requests (even from localhost) require this key.
# Leave empty to disable the Management API entirely (404 for all /v0/management routes).
  secret-key: &quot;登陆密码&quot;
# Disable the bundled management control panel asset download and HTTP route when true.
  disable-control-panel: false
# GitHub repository for the management control panel. Accepts a repository URL or releases API URL.
  panel-github-repository: &quot;https://github.com/router-for-me/Cli-Proxy-API-Management-Center&quot;
# Authentication directory (supports ~ for home directory)
auth-dir: &quot;~/.cli-proxy-api&quot;
</code></pre><p>粘贴到刚刚新建的 <code>config.yaml</code> 里 <code>vi /data/CLIProxyAPI/config.yaml</code></p><p>然后运行 <code>mkdir -p /data/CLIProxyAPI &amp;&amp; touch /data/CLIProxyAPI/compose.yaml</code> ，创建<code>docker compose</code>文件</p><p>复制以下<code>docker compose</code> 配置 ,粘贴到刚刚新建的 <code>compose.yaml</code> 里 <code>vi /data/CLIProxyAPI/compose.yaml</code></p><pre><code>services:
  cli-proxy-api:
    image: eceasy/cli-proxy-api:latest
    container_name: cli-proxy-api
    ports:
      - &quot;8317:8317&quot;
    volumes:
      - ./config.yaml:/CLIProxyAPI/config.yaml
      - ./auths:/root/.cli-proxy-api
    restart: unless-stopped
</code></pre><p>注意：前面个端口可以改为公网端口</p><p>运行如下命令 <code>cd /data/CLIProxyAPI &amp;&amp; docker compose up -d</code> ，创建容器</p><h2><strong>3. 配置</strong></h2><p>接下来访问 服务器IP:8317/management.html ，进入后台管理页（如果你修改了端口则替换为你的端口），输入你在前面配置的密码（secret-key），登录</p><p>点击 OAuth 登录、认证文件管理 认证对应的账号就行</p><p>接下来添加 API 密钥，点击配置面板，下拉到认证配置处，点击添加 API 密钥 ，可自定义或随机生成一个 API 密钥，点击添加，可以看到我们刚刚添加的 API 密钥，点击下方的对号，保存更改</p><h2><strong>4. 使用</strong></h2><p>到此已经完成，可以使用该密钥了，BaseURL 即为你的服务器IP:项目端口，本项目能提供标准的OpenAI API和Claude API</p><p>一般是：<code>http://localhost:8317/v1</code><br>API:上面生成的API就可以使用了</p><h2><strong>5. 更新</strong></h2><p>cd /data/CLIProxyAPI && docker compose pull && docker compose up -d</p>
]]></content:encoded>
<slash:comments>0</slash:comments>
<comments>https://eblog.ink/archives/402/#comments</comments>
<wfw:commentRss>https://eblog.ink/feed/</wfw:commentRss>
</item>
<item>
<title>【网站】 使用cloudflare workers反代 pages</title>
<link>https://eblog.ink/archives/401/</link>
<guid>https://eblog.ink/archives/401/</guid>
<pubDate>Tue, 03 Mar 2026 02:57:57 +0000</pubDate>
<dc:creator>eric</dc:creator>
<description><![CDATA[代码：addEventListener(&#039;fetch&#039;, event =&gt; {  event.respondWith(handleRequest(event.reque...]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<p>代码：</p><pre><code>addEventListener(&#039;fetch&#039;, event =&gt; {
  event.respondWith(handleRequest(event.request))
})

async function handleRequest(request) {
  // ✅ 使用你的Pages默认地址
  const targetBase = &#039;https://your.pages.dev&#039;

  if (request.headers.get(&#039;Upgrade&#039;) === &#039;websocket&#039;) {
    return fetch(request)
  }

  const url = new URL(request.url)
  const newUrl = new URL(url.pathname + url.search, targetBase)
  
  const newHeaders = new Headers(request.headers)
  newHeaders.set(&#039;Host&#039;, newUrl.hostname)
  
  const newRequest = new Request(newUrl, {
    method: request.method,
    headers: newHeaders,
    body: request.body,
    redirect: &#039;manual&#039;
  })

  const response = await fetch(newRequest)
  
  if ([301, 302, 303, 307, 308].includes(response.status)) {
    const location = response.headers.get(&#039;Location&#039;)
    if (location &amp;&amp; location.includes(targetBase)) {
      return Response.redirect(
        location.replace(targetBase, `https://${url.hostname}`),
        response.status
      )
    }
  }
  
  return response
}</code></pre>
]]></content:encoded>
<slash:comments>0</slash:comments>
<comments>https://eblog.ink/archives/401/#comments</comments>
<wfw:commentRss>https://eblog.ink/feed/</wfw:commentRss>
</item>
<item>
<title>【网站】记录利用cloudflare加速</title>
<link>https://eblog.ink/archives/399/</link>
<guid>https://eblog.ink/archives/399/</guid>
<pubDate>Thu, 15 Jan 2026 02:19:00 +0000</pubDate>
<dc:creator>eric</dc:creator>
<description><![CDATA[准备两个域名：1.主1.com  备2.com 2.备解析一个子域名到网站IP 并开启小黄云 例如：orange.2.com3.备解析一个子域名到优选域名 （CNAME）,例如解析CNAME,c...]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<p>准备两个域名：</p><p>1.主<code>1.com</code>  备<code>2.com</code> </p><p>2.备解析一个子域名到网站IP 并开启小黄云 例如：<code>orange.2.com</code></p><p>3.备解析一个子域名到优选域名 （CNAME）,例如解析<code>CNAME</code>,<code>cdn.2.com</code>,到<code>115155.xyz</code></p><p>4.备的SSL/TLS设置-自定义主机名-添加回退源为开启小黄云的<code>orange.2.com</code>（步骤需要添加信用卡）</p><p>5.还是步骤4这个位置 添加自定义主机名 填写<code>1.com</code>就是需要加速的域名（进入只需要填写域名其它都默认）然后验证TXT</p><p>6.进入<code>1.com</code> 使用CNAME到 上面的<code>cdn.2.com</code>就可以了</p>
]]></content:encoded>
<slash:comments>0</slash:comments>
<comments>https://eblog.ink/archives/399/#comments</comments>
<wfw:commentRss>https://eblog.ink/feed/</wfw:commentRss>
</item>
<item>
<title>【Windows】获取OEM Windows密钥</title>
<link>https://eblog.ink/archives/398/</link>
<guid>https://eblog.ink/archives/398/</guid>
<pubDate>Fri, 08 Aug 2025 01:47:00 +0000</pubDate>
<dc:creator>eric</dc:creator>
<description><![CDATA[获取 ​​OEM 密钥​​，取决于以下几个关键因素：​​1. 密钥存储位置​​OEM 密钥通常存储在以下位置之一：​​BIOS/UEFI 固件（ACPI MSDM 表）​​（大多数现代电脑）​​...]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<p>获取 ​​OEM 密钥​​，取决于以下几个关键因素：</p><p><strong>​​1. 密钥存储位置​​</strong><br>OEM 密钥通常存储在以下位置之一：</p><p>​​BIOS/UEFI 固件（ACPI MSDM 表）​​（大多数现代电脑）<br>​​注册表​​（HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform）<br>​​OEM 证书和 SLIC 表​​（部分旧电脑）<br>如果 ​​重装系统时没有更换主板​​，密钥通常仍保留在 ​​BIOS/UEFI​​ 中，可以提取。</p><p><strong>​​2. 在 PE 环境下获取 OEM 密钥的方法​​</strong><br>​​✅ 方法1：使用 wmic或 PowerShell（适用于 BIOS 存储的密钥）​​</p><pre><code>wmic path softwarelicensingservice get OA3xOriginalProductKey
</code></pre><p>或</p><pre><code>(Get-WmiObject -query &quot;select * from SoftwareLicensingService&quot;).OA3xOriginalProductKey
</code></pre><p>​​如果返回空值​​，说明密钥可能不在 WMI 中，需要尝试其他方法。</p><p>​​✅ 方法2：使用 RWEverything读取 BIOS MSDM 表（最可靠）​​</p><p>​​下载 <a href="https://rweverything.com/">RWEverything</a>​​（官网）<br>在 PE 中运行 RW.exe<br>进入 ​​ACPI Tables​​ → 查找 ​​MSDM​​ 表<br>在 ​​Data​​ 部分找到 ​​OEM 密钥​​</p><p>​​✅ 方法3：使用 ProduKey（适用于注册表残留）​​</p><p>​​下载 <a href="https://www.nirsoft.net/utils/product_cd_key_viewer.html">ProduKey​​</a>（NirSoft）<br>在 PE 中运行，选择 ​​"<code>Load product keys from external Windows installation</code>"​​<br>指向原系统的 Windows目录（如 C:\Windows）<br>查看 ​​OEM 密钥​​（如果注册表未被覆盖）</p><p>​​✅ 方法4：使用 regedit手动查找（适用于部分 OEM 系统）​​</p><p>在 PE 中加载原系统的注册表：</p><pre><code>reg load HKLM\OLD_SYSTEM C:\Windows\System32\config\SOFTWARE
</code></pre><p>查找：</p><pre><code>reg query HKLM\OLD_SYSTEM\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform /v BackupProductKeyDefault
</code></pre><p>（适用于部分 Windows 8/10 OEM 系统）</p><p>​​3. 如果仍然无法获取​​</p><p>​​密钥可能已被替换​​（如使用 KMS 或数字激活）<br>​​BIOS 可能不存储 MSDM 表​​（部分品牌机）<br>​​OEM 密钥可能绑定到微软账户​​（部分 Win10/Win11 设备）<br>​​最终解决方案​​：</p><p>​​联系电脑厂商​​（提供 SN 或服务标签，可获取 OEM 密钥）<br>​​使用主板 SN 查询​​（部分品牌如 Dell、HP 支持）<br>如果 ​​BIOS 里有 MSDM 表​​，​​RWEverything 是最佳选择​​；否则，尝试其他方法或联系厂商。</p>
]]></content:encoded>
<slash:comments>1</slash:comments>
<comments>https://eblog.ink/archives/398/#comments</comments>
<wfw:commentRss>https://eblog.ink/feed/</wfw:commentRss>
</item>
<item>
<title>【Linux】格式化磁盘为exFat 并挂载</title>
<link>https://eblog.ink/archives/397/</link>
<guid>https://eblog.ink/archives/397/</guid>
<pubDate>Wed, 06 Aug 2025 01:12:03 +0000</pubDate>
<dc:creator>eric</dc:creator>
<description><![CDATA[exFAT格式化1.​​安装 exfatprogssudo apt install exfatprogs  # Debian/Ubuntusudo dnf install exfatprogs ...]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<h2>exFAT格式化</h2><p>1.​​安装 exfatprogs</p><pre><code>sudo apt install exfatprogs  # Debian/Ubuntu
sudo dnf install exfatprogs  # Fedora
sudo pacman -S exfatprogs    # Arch
</code></pre><p>2.删除分区和新建分区</p><pre><code>fdisk /dev/sda
</code></pre><p>3.格式化分区</p><pre><code>sudo mkfs.exfat /dev/sda1
</code></pre><h2>自动挂载方法</h2><p><strong>修改 /etc/fstab</strong></p><p>​1. 获取 /dev/sda1 的 UUID（推荐）​​<br>使用 blkid 查看分区的 ​​UUID​​（比 /dev/sda1 更稳定，防止设备名变化）：</p><pre><code>sudo blkid /dev/sda1
</code></pre><p>输出示例：</p><pre><code>/dev/sda1: UUID=&quot;1234-5678&quot; TYPE=&quot;exfat&quot; PARTUUID=&quot;abcd1234&quot;
</code></pre><p>记下 ​​UUID​​（如 1234-5678）。</p><p>​​2. 编辑 /etc/fstab​​</p><pre><code>sudo nano /etc/fstab
</code></pre><p>在文件末尾添加一行（根据你的文件系统类型选择）：</p><p>​​如果是 exFAT 格式​​</p><pre><code>UUID=1234-5678  /mnt  exfat  defaults,uid=1000,gid=1000,umask=022  0  0
</code></pre><p>另一种exFAT 格式​​</p><pre><code>/dev/sda1 /mnt exfat rw,uid=1000,gid=1000,umask=022 0 0
</code></pre><p>uid=1000,gid=1000：让普通用户（如你的用户）有读写权限（id -u 查看你的 uid）。<br>umask=022：设置默认权限（755）。<br>0 0：不备份、不检查。</p><p>​​如果是 NTFS 格式​​</p><pre><code>UUID=1234-5678  /mnt  ntfs-3g  defaults,uid=1000,gid=1000,umask=022  0  0
</code></pre><p>（需安装 ntfs-3g：sudo apt install ntfs-3g）</p><p>​​如果是 ext4 格式​​</p><pre><code>UUID=1234-5678  /mnt  ext4  defaults  0  2
</code></pre><p>​​3. 创建挂载点并测试​​</p><pre><code>sudo mkdir -p /mnt          # 创建挂载目录
sudo mount -a               # 测试 fstab 配置是否正确
df -h | grep /mnt           # 检查是否挂载成功
</code></pre><p>如果 mount -a 报错，检查 /etc/fstab 是否有语法错误。</p><p>​​4. 重启验证​​</p><pre><code>sudo reboot
</code></pre><p>重启后检查是否自动挂载：</p><pre><code>df -h | grep /mnt
lsof /dev/sda1
</code></pre><h2>注意</h2><p>在 /etc/fstab 中配置 ​​exFAT​​ 文件系统挂载时，可以通过 umask、fmask 和 dmask 参数控制文件和目录的权限。以下是不同权限设置的方法：</p><p>​​1. umask（默认权限掩码）​​</p><p>umask 决定 ​​文件和目录​​ 的默认权限：</p><p>umask=000 → 权限 777（所有用户可读、写、执行）<br>umask=022 → 权限 755（所有者 rwx，其他用户 rx）<br>umask=111 → 权限 666（所有用户可读、写，但不可执行）<br>​​示例​​</p><pre><code>UUID=1234-5678  /mnt  exfat  defaults,uid=1000,gid=1000,umask=000  0  0
</code></pre><p>​​效果​​：<br>文件权限：777（-rwxrwxrwx）<br>目录权限：777（drwxrwxrwx）</p><p>​​2. fmask 和 dmask（分别控制文件和目录权限）​​<br>如果希望 ​​文件​​ 和 ​​目录​​ 权限不同，可以分开设置：</p><p>fmask：控制文件权限（如 666）。<br>dmask：控制目录权限（如 777）。<br>​​示例​​</p><pre><code>UUID=1234-5678  /mnt  exfat  defaults,uid=1000,gid=1000,fmask=000,dmask=000  0  0
</code></pre><p>​​效果​​：<br>文件权限：777（-rwxrwxrwx）<br>目录权限：777（drwxrwxrwx）<br>​​常见组合​​<br>​​需求​​    ​​参数设置​​    ​​文件权限​​    ​​目录权限​​<br>文件 666，目录 777    fmask=000,dmask=000    666    777<br>文件 644，目录 755    fmask=133,dmask=022    644    755<br>文件 664，目录 775    fmask=002,dmask=002    664    775</p><p>​​3. 权限计算规则​​<br>​​权限 = 最大权限 - umask/fmask/dmask​​<br>exFAT 的默认最大权限：</p><p>文件：666（rw-rw-rw-）<br>目录：777（rwxrwxrwx）</p><p>​​示例​​：<br>fmask=022 → 文件权限 = 666 - 022 = 644（rw-r--r--）<br>dmask=022 → 目录权限 = 777 - 022 = 755（rwxr-xr-x）</p><p>​​4. 验证权限​​<br>挂载后检查权限：</p><pre><code>ls -l /mnt
</code></pre><p>输出示例：</p><pre><code>-rwxrwxrwx 1 user user 0 Jan 1 10:00 file.txt  # 文件权限 777
drwxrwxrwx 2 user user 0 Jan 1 10:00 dir       # 目录权限 777
</code></pre><p>​​5. 其他注意事项​​<br>​​uid 和 gid​​：</p><pre><code>uid=1000（你的用户 ID，用 id -u 查看）
gid=1000（你的组 ID，用 id -g 查看）
</code></pre><p>确保用户有权访问挂载点。<br>​​exFAT 的权限限制​​：<br>exFAT 本身不支持 Linux 权限，umask/fmask/dmask 是挂载时的逻辑限制。<br>实际文件权限在 mount 时生效，拔掉设备后不保留。<br>​​NTFS 的类似配置​​：</p><pre><code>UUID=1234-5678  /mnt  ntfs-3g  defaults,uid=1000,gid=1000,fmask=133,dmask=022  0  0
</code></pre><p>​​总结​​</p><p>​​需求​​    /etc/fstab 参数</p><p>文件 777，目录 777    umask=000 或 fmask=000,dmask=000<br>文件 666，目录 777    fmask=000,dmask=000<br>文件 644，目录 755    fmask=133,dmask=022<br>文件 664，目录 775    fmask=002,dmask=002</p>
]]></content:encoded>
<slash:comments>1</slash:comments>
<comments>https://eblog.ink/archives/397/#comments</comments>
<wfw:commentRss>https://eblog.ink/feed/</wfw:commentRss>
</item>
</channel>
</rss>