<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel rdf:about="https://eblog.ink/feed/rss/">
<title>Eric&#039;s Blog</title>
<link>https://153030.xyz/</link>
<description>Welcome Eric&#039;s Blog</description>
<items>
<rdf:Seq>
<rdf:li resource="https://eblog.ink/archives/385/"/>
<rdf:li resource="https://eblog.ink/archives/402/"/>
<rdf:li resource="https://eblog.ink/archives/401/"/>
<rdf:li resource="https://eblog.ink/archives/399/"/>
<rdf:li resource="https://eblog.ink/archives/398/"/>
<rdf:li resource="https://eblog.ink/archives/397/"/>
</rdf:Seq>
</items>
</channel>
<item rdf:about="https://eblog.ink/archives/385/">
<title>【Windows】powershell 命令</title>
<link>https://eblog.ink/archives/385/</link>
<dc:date>2024-09-24T02:51:00+00:00</dc:date>
<description>删除powershell 历史记录Remove-Item (Get-PSReadlineOption).HistorySavePath
通过命令提示符进入管理员模式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;

直接创建本地账户start ms-cxh:localonly
MAS脚本irm https://get.activated.win | iex</description>
</item>
<item rdf:about="https://eblog.ink/archives/402/">
<title>【网站】Docker配置CLIProxyAPI Plus </title>
<link>https://eblog.ink/archives/402/</link>
<dc:date>2026-03-03T06:20:00+00:00</dc:date>
<description>Github地址为 https://github.com/router-for-me/CLIProxyAPI2. 搭建选择一个目录，本文中使用的是/data/CLIProxyAPI运行 mkdir -p /data/CLIProxyAPI &amp;&amp; touch /data/CLIProxyAPI/config.yaml ，创建项目配置文件复制以下项目配置，将 secret-key 修改为你的密码# 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;
粘贴到刚刚新建的 config.yaml 里 vi /data/CLIProxyAPI/config.yaml然后运行 mkdir -p /data/CLIProxyAPI &amp;&amp; touch /data/CLIProxyAPI/compose.yaml ，创建docker compose文件复制以下docker compose 配置 ,粘贴到刚刚新建的 compose.yaml 里 vi /data/CLIProxyAPI/compose.yamlservices:
  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
注意：前面个端口可以改为公网端口运行如下命令 cd /data/CLIProxyAPI &amp;&amp; docker compose up -d ，创建容器3. 配置接下来访问 服务器IP:8317/management.html ，进入后台管理页（如果你修改了端口则替换为你的端口），输入你在前面配置的密码（secret-key），登录点击 OAuth 登录、认证文件管理 认证对应的账号就行接下来添加 API 密钥，点击配置面板，下拉到认证配置处，点击添加 API 密钥 ，可自定义或随机生成一个 API 密钥，点击添加，可以看到我们刚刚添加的 API 密钥，点击下方的对号，保存更改4. 使用到此已经完成，可以使用该密钥了，BaseURL 即为你的服务器IP:项目端口，本项目能提供标准的OpenAI API和Claude API一般是：http://localhost:8317/v1API:上面生成的API就可以使用了5. 更新cd /data/CLIProxyAPI && docker compose pull && docker compose up -d</description>
</item>
<item rdf:about="https://eblog.ink/archives/401/">
<title>【网站】 使用cloudflare workers反代 pages</title>
<link>https://eblog.ink/archives/401/</link>
<dc:date>2026-03-03T02:57:57+00:00</dc:date>
<description>代码：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
}</description>
</item>
<item rdf:about="https://eblog.ink/archives/399/">
<title>【网站】记录利用cloudflare加速</title>
<link>https://eblog.ink/archives/399/</link>
<dc:date>2026-01-15T02:19:00+00:00</dc:date>
<description>准备两个域名：1.主1.com  备2.com 2.备解析一个子域名到网站IP 并开启小黄云 例如：orange.2.com3.备解析一个子域名到优选域名 （CNAME）,例如解析CNAME,cdn.2.com,到115155.xyz4.备的SSL/TLS设置-自定义主机名-添加回退源为开启小黄云的orange.2.com（步骤需要添加信用卡）5.还是步骤4这个位置 添加自定义主机名 填写1.com就是需要加速的域名（进入只需要填写域名其它都默认）然后验证TXT6.进入1.com 使用CNAME到 上面的cdn.2.com就可以了</description>
</item>
<item rdf:about="https://eblog.ink/archives/398/">
<title>【Windows】获取OEM Windows密钥</title>
<link>https://eblog.ink/archives/398/</link>
<dc:date>2025-08-08T01:47:00+00:00</dc:date>
<description>获取 ​​OEM 密钥​​，取决于以下几个关键因素：​​1. 密钥存储位置​​OEM 密钥通常存储在以下位置之一：​​BIOS/UEFI 固件（ACPI MSDM 表）​​（大多数现代电脑）​​注册表​​（HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform）​​OEM 证书和 SLIC 表​​（部分旧电脑）如果 ​​重装系统时没有更换主板​​，密钥通常仍保留在 ​​BIOS/UEFI​​ 中，可以提取。​​2. 在 PE 环境下获取 OEM 密钥的方法​​​​✅ 方法1：使用 wmic或 PowerShell（适用于 BIOS 存储的密钥）​​wmic path softwarelicensingservice get OA3xOriginalProductKey
或(Get-WmiObject -query &quot;select * from SoftwareLicensingService&quot;).OA3xOriginalProductKey
​​如果返回空值​​，说明密钥可能不在 WMI 中，需要尝试其他方法。​​✅ 方法2：使用 RWEverything读取 BIOS MSDM 表（最可靠）​​​​下载 RWEverything​​（官网）在 PE 中运行 RW.exe进入 ​​ACPI Tables​​ → 查找 ​​MSDM​​ 表在 ​​Data​​ 部分找到 ​​OEM 密钥​​​​✅ 方法3：使用 ProduKey（适用于注册表残留）​​​​下载 ProduKey​​（NirSoft）在 PE 中运行，选择 ​​"Load product keys from external Windows installation"​​指向原系统的 Windows目录（如 C:\Windows）查看 ​​OEM 密钥​​（如果注册表未被覆盖）​​✅ 方法4：使用 regedit手动查找（适用于部分 OEM 系统）​​在 PE 中加载原系统的注册表：reg load HKLM\OLD_SYSTEM C:\Windows\System32\config\SOFTWARE
查找：reg query HKLM\OLD_SYSTEM\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform /v BackupProductKeyDefault
（适用于部分 Windows 8/10 OEM 系统）​​3. 如果仍然无法获取​​​​密钥可能已被替换​​（如使用 KMS 或数字激活）​​BIOS 可能不存储 MSDM 表​​（部分品牌机）​​OEM 密钥可能绑定到微软账户​​（部分 Win10/Win11 设备）​​最终解决方案​​：​​联系电脑厂商​​（提供 SN 或服务标签，可获取 OEM 密钥）​​使用主板 SN 查询​​（部分品牌如 Dell、HP 支持）如果 ​​BIOS 里有 MSDM 表​​，​​RWEverything 是最佳选择​​；否则，尝试其他方法或联系厂商。</description>
</item>
<item rdf:about="https://eblog.ink/archives/397/">
<title>【Linux】格式化磁盘为exFat 并挂载</title>
<link>https://eblog.ink/archives/397/</link>
<dc:date>2025-08-06T01:12:03+00:00</dc:date>
<description>exFAT格式化1.​​安装 exfatprogssudo apt install exfatprogs  # Debian/Ubuntu
sudo dnf install exfatprogs  # Fedora
sudo pacman -S exfatprogs    # Arch
2.删除分区和新建分区fdisk /dev/sda
3.格式化分区sudo mkfs.exfat /dev/sda1
自动挂载方法修改 /etc/fstab​1. 获取 /dev/sda1 的 UUID（推荐）​​使用 blkid 查看分区的 ​​UUID​​（比 /dev/sda1 更稳定，防止设备名变化）：sudo blkid /dev/sda1
输出示例：/dev/sda1: UUID=&quot;1234-5678&quot; TYPE=&quot;exfat&quot; PARTUUID=&quot;abcd1234&quot;
记下 ​​UUID​​（如 1234-5678）。​​2. 编辑 /etc/fstab​​sudo nano /etc/fstab
在文件末尾添加一行（根据你的文件系统类型选择）：​​如果是 exFAT 格式​​UUID=1234-5678  /mnt  exfat  defaults,uid=1000,gid=1000,umask=022  0  0
另一种exFAT 格式​​/dev/sda1 /mnt exfat rw,uid=1000,gid=1000,umask=022 0 0
uid=1000,gid=1000：让普通用户（如你的用户）有读写权限（id -u 查看你的 uid）。umask=022：设置默认权限（755）。0 0：不备份、不检查。​​如果是 NTFS 格式​​UUID=1234-5678  /mnt  ntfs-3g  defaults,uid=1000,gid=1000,umask=022  0  0
（需安装 ntfs-3g：sudo apt install ntfs-3g）​​如果是 ext4 格式​​UUID=1234-5678  /mnt  ext4  defaults  0  2
​​3. 创建挂载点并测试​​sudo mkdir -p /mnt          # 创建挂载目录
sudo mount -a               # 测试 fstab 配置是否正确
df -h | grep /mnt           # 检查是否挂载成功
如果 mount -a 报错，检查 /etc/fstab 是否有语法错误。​​4. 重启验证​​sudo reboot
重启后检查是否自动挂载：df -h | grep /mnt
lsof /dev/sda1
注意在 /etc/fstab 中配置 ​​exFAT​​ 文件系统挂载时，可以通过 umask、fmask 和 dmask 参数控制文件和目录的权限。以下是不同权限设置的方法：​​1. umask（默认权限掩码）​​umask 决定 ​​文件和目录​​ 的默认权限：umask=000 → 权限 777（所有用户可读、写、执行）umask=022 → 权限 755（所有者 rwx，其他用户 rx）umask=111 → 权限 666（所有用户可读、写，但不可执行）​​示例​​UUID=1234-5678  /mnt  exfat  defaults,uid=1000,gid=1000,umask=000  0  0
​​效果​​：文件权限：777（-rwxrwxrwx）目录权限：777（drwxrwxrwx）​​2. fmask 和 dmask（分别控制文件和目录权限）​​如果希望 ​​文件​​ 和 ​​目录​​ 权限不同，可以分开设置：fmask：控制文件权限（如 666）。dmask：控制目录权限（如 777）。​​示例​​UUID=1234-5678  /mnt  exfat  defaults,uid=1000,gid=1000,fmask=000,dmask=000  0  0
​​效果​​：文件权限：777（-rwxrwxrwx）目录权限：777（drwxrwxrwx）​​常见组合​​​​需求​​    ​​参数设置​​    ​​文件权限​​    ​​目录权限​​文件 666，目录 777    fmask=000,dmask=000    666    777文件 644，目录 755    fmask=133,dmask=022    644    755文件 664，目录 775    fmask=002,dmask=002    664    775​​3. 权限计算规则​​​​权限 = 最大权限 - umask/fmask/dmask​​exFAT 的默认最大权限：文件：666（rw-rw-rw-）目录：777（rwxrwxrwx）​​示例​​：fmask=022 → 文件权限 = 666 - 022 = 644（rw-r--r--）dmask=022 → 目录权限 = 777 - 022 = 755（rwxr-xr-x）​​4. 验证权限​​挂载后检查权限：ls -l /mnt
输出示例：-rwxrwxrwx 1 user user 0 Jan 1 10:00 file.txt  # 文件权限 777
drwxrwxrwx 2 user user 0 Jan 1 10:00 dir       # 目录权限 777
​​5. 其他注意事项​​​​uid 和 gid​​：uid=1000（你的用户 ID，用 id -u 查看）
gid=1000（你的组 ID，用 id -g 查看）
确保用户有权访问挂载点。​​exFAT 的权限限制​​：exFAT 本身不支持 Linux 权限，umask/fmask/dmask 是挂载时的逻辑限制。实际文件权限在 mount 时生效，拔掉设备后不保留。​​NTFS 的类似配置​​：UUID=1234-5678  /mnt  ntfs-3g  defaults,uid=1000,gid=1000,fmask=133,dmask=022  0  0
​​总结​​​​需求​​    /etc/fstab 参数文件 777，目录 777    umask=000 或 fmask=000,dmask=000文件 666，目录 777    fmask=000,dmask=000文件 644，目录 755    fmask=133,dmask=022文件 664，目录 775    fmask=002,dmask=002</description>
</item>
</rdf:RDF>