初始化

This commit is contained in:
afoim
2025-04-30 08:38:25 +08:00
parent 63671e0c0f
commit d80a293383
37 changed files with 3573 additions and 378 deletions

View File

@@ -20,7 +20,7 @@ import { remarkReadingTime } from "./src/plugins/remark-reading-time.mjs";
// https://astro.build/config
export default defineConfig({
site: "https://fuwari.vercel.app/",
site: "https://072103.xyz",
base: "/",
trailingSlash: "always",
integrations: [

View File

@@ -7,11 +7,11 @@ import type {
import { LinkPreset } from "./types/config";
export const siteConfig: SiteConfig = {
title: "Fuwari",
subtitle: "Demo Site",
lang: "en", // 'en', 'zh_CN', 'zh_TW', 'ja', 'ko', 'es', 'th'
title: "AcoFork Blog",
subtitle: "",
lang: "zh_CN", // 'en', 'zh_CN', 'zh_TW', 'ja', 'ko', 'es', 'th'
themeColor: {
hue: 250, // Default hue for the theme color, from 0 to 360. e.g. red: 0, teal: 200, cyan: 250, pink: 345
hue: 360, // Default hue for the theme color, from 0 to 360. e.g. red: 0, teal: 200, cyan: 250, pink: 345
fixed: false, // Hide the theme color picker for visitors
},
banner: {
@@ -30,11 +30,11 @@ export const siteConfig: SiteConfig = {
},
favicon: [
// Leave this array empty to use the default favicon
// {
// src: '/favicon/icon.png', // Path of the favicon, relative to the /public directory
{
src: 'https://q2.qlogo.cn/headimg_dl?dst_uin=2726730791&spec=5', // Path of the favicon, relative to the /public directory
// theme: 'light', // (Optional) Either 'light' or 'dark', set only if you have different favicons for light and dark mode
// sizes: '32x32', // (Optional) Size of the favicon, set only if you have favicons of different sizes
// }
}
],
};
@@ -52,21 +52,21 @@ export const navBarConfig: NavBarConfig = {
};
export const profileConfig: ProfileConfig = {
avatar: "assets/images/demo-avatar.png", // Relative to the /src directory. Relative to the /public directory if it starts with '/'
name: "Lorem Ipsum",
bio: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
avatar: "https://q2.qlogo.cn/headimg_dl?dst_uin=2726730791&spec=5", // Relative to the /src directory. Relative to the /public directory if it starts with '/'
name: "AcoFork",
bio: "Protect What You Love.",
links: [
{
name: "Twitter",
icon: "fa6-brands:twitter", // Visit https://icones.js.org/ for icon codes
icon: "fa6-brands:qq", // Visit https://icones.js.org/ for icon codes
// You will need to install the corresponding icon set if it's not already included
// `pnpm add @iconify-json/<icon-set-name>`
url: "https://twitter.com",
url: "https://qm.qq.com/cgi-bin/qm/qr?k=5Jb2bLVEHUBsDflZBcELLShCwOoT5suI&jump_from=webapi&authKey=VJ9aWs6454QXPONMQD19r68h7t8HvcWFOMandaNVLG+hWGGoqVs9r9bUpwZrfvlW",
},
{
name: "Steam",
icon: "fa6-brands:steam",
url: "https://store.steampowered.com",
name: "Bilibli",
icon: "fa6-brands:bilibili",
url: "https://space.bilibili.com/325903362",
},
{
name: "GitHub",

View File

@@ -0,0 +1,84 @@
---
category: 教程
description: 网易免费企业邮是一个免费的电子邮箱服务它最重要的特点就是可以绑定你的域名比如sudo@onani.cn并且完全免费且能收能发
draft: false
image: https://r2.072103.xyz/myblog/img/ce9c58a1-6515-4b07-8f4d-5ae55668d9f8.webp
lang: ''
published: 2025-03-12
tags:
- 网易免费企业邮
- 域名邮箱
title: 自建邮局太麻烦?来用网易免费企业邮!绑定你的域名收发自如!
---
# 引言
最早我开始知道域名邮箱是因为偶然在一位我朋友的开发群内看到他的微软账户绑定的邮箱是admin@他网站的域名.com。
我当时就很好奇,就去问他你这个邮箱是自建的吗?
因为我当时也知道可以通过购买VPS然后配上一些开源邮局框架来自建邮箱但是这需要金钱和时间成本而且我认为不大稳定所以一直就没有试过而且我觉得我当时的acofork@foxmail.com这个邮箱虽然是托管在QQ的但是也够用了。
然后他说他用的是Cloudflare的邮件转发服务我就心想这cf还能干这个一番操作以下发现还真能。
在cf的域名配置中有一个电子邮件转发可以将发给你域名的邮件转发到你自己用的邮箱比如发给sikosiko@onani.cn的邮件会被cf转发给我的私用邮箱acofork@foxmail.com。
但是因为是转发那么如果你想要以sikosiko@onani.cn这个身份发邮件就需要费一番周折了。我用的foxmail.com被腾讯收购了现在作为QQ邮箱的服务提供而QQ邮箱要绑定域名需要购买万恶的VIP于是就只能通过Outlook、Gmail等支持免费绑定域名作为别名的邮箱来发邮件
但这也太割裂了吧我在QQ邮箱上收到然后还要去Outlook或者Gmail上面回复于是我后面也还是继续使用我的私用邮箱不去折腾什么域名邮箱了毕竟方便比什么都重要
---
但是话又说回来最近发现了这个网易免费企业邮可以免费绑定你的域名用作域名邮箱并且直接将MX解析解析到网易既能收也能发。而且这个项目也不是刚出的貌似在2015就已经有了所以也不用担心灵车至少比你自建的稳定😋
# 正式开始
## 创建账号并配置管理员
首先前往 [网易免费企业邮箱](https://ym.163.com/) 创建一个账号。直接用手机号注册
注意,注册完毕后登录账户名和登录密码会通过**短信**发给你,然后前往 https://mail.qiye.163.com/ 进行登录
如果你不喜欢系统随机生成的密码,可以先点击忘记密码,然后填写账户名,验证绑定的手机号后即可重置密码
登陆进去后大概是这样
![](https://r2.072103.xyz/myblog/img/65e5b400-96d7-44c6-b16e-a7a409104c3c.webp)
如果你不喜欢你的账户名,比如我的就是 **erchashush** @acofork.freeqiye.com这个erchashush其实是可以更改的
在组织机构管理中点击账号管理,选择新建账号
![](https://r2.072103.xyz/myblog/img/a20e7931-c460-4134-b1b0-0fee82f8a7fc.webp)
然后写一个你想要的别名。绑定手机填你的,因为第一次登录需要验证码验证,如果填错了直接删除即可
![](https://r2.072103.xyz/myblog/img/b9ac287d-ff90-4f8c-88ba-0d7bb1588f1c.webp)
然后我们需要给这个新账号提权如果你想用superadmin登录后台的话
![](https://r2.072103.xyz/myblog/img/6f21feca-984d-444e-b80f-bf1a28e4cf79.webp)
接着右上角退出登录,然后使用新创建的管理员账户登录
## 绑定你的域名
前往组织机构管理 - 域名管理 - 添加域名
![](https://r2.072103.xyz/myblog/img/2fa04b72-f0e7-43c0-9c2a-1daab62e67cb.webp)
根据提示在你的域名提供商比如Cloudflare配置TXT记录和MX记录即可
## 登录你的邮箱
前往 [网易邮箱大师-高效强大的全平台邮箱客户端](https://dashi.163.com/) 下载对应的版本
使用你的邮箱 + 密码进行登录即可。如果需要手机验证验证即可。最好下载一个手机端的网易邮箱大师,在手机端登录后任何其他平台登录都会需要手机端授权,更安全
## 效果展示
![](https://r2.072103.xyz/myblog/img/614794bd-d84d-4b66-b816-1d6d6ce73727.webp)
签名和发件人头像可以通过手机的网易邮箱大师设置
![](https://r2.072103.xyz/myblog/img/57f759bc-46fb-4f99-b6bb-751464661240.webp)

View File

@@ -0,0 +1,331 @@
---
category: 教程
description: 使用ZerotierTailscaleCloudflare Tunnel可以实现多种内网穿透其中有适用于个人访问的也有适用于公众访问的
draft: false
image: https://r2.072103.xyz/fuwari-blog/img/2024-10-28-17-00-25-image.webp
lang: ''
published: 2024-10-28
tags:
- Zerotier
- Tailscale
- Cloudflare Tunnel
- STUN
title: 究极喂饭教程,手把手教你内网穿透
---
# 经实测Zerotier的打洞能力明显优于Tailscale所以建议通过Zerotier来实现内网穿透
详细报表:
| | Zerotier | Tailscale |
| ----------- | ----------- | ----------- |
| 单端DMZ单端NAT1 | STUN |STUN |
| 仅单端UPnP单端NAT3 | UDP P2P | 玄学穿透 |
| 双端UPnP双端NAT3 | UDP P2P | 玄学穿透 |
| 双端无UPnP/DMZ双端NAT3/NAT4 | UDP P2P | 无法穿透|
| 自建中继/握手节点 | √ | √|
其实实际情况会更加复杂一点,但是你只要有 **公网IPv6、UPnP、DMZ** 中的其中一项Zerotier就几乎是100%的打洞成功率
如何知道我是P2P还是中继
ping你的对端设备如果延迟大于200ms或者经常丢包大概率就是中继节点也有小概率是你的设备负载过高导致无法及时接收和返回ping包
# 啥是内网穿透?
当我们在家中有个NAS想要在学校/公司的网络来访问就需要用到内网穿透实现外网访问内网服务。原理一般是P2P打洞和服务器中转流量
# 前期准备
路由器开启UPnP![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-17-08-00-image.webp)
关闭路由器的IPv4IPv6防火墙 **(可选)**![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-17-09-19-image.webp)
# *使用Zerotier/Tailscale进行内网穿透*
> 他们俩的原理都是尝试对端建立P2P连接需要对端安装一个软件并且长期运行
# 使用Zerotier进行内网穿透的详细教程
## 创建Zerotier账号
前往:[ZeroTier | Global Networking Solution for IoT, SD-WAN, and VPN](https://www.zerotier.com/)。如果你进不去,请尝试挂梯子。如果看不懂英文可以开启浏览器的翻译功能![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-17-12-51-image.webp)
选择 `Sign up`![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-17-13-06-image.webp)
如果你到了这个界面,请仍然选择`Sign up`![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-17-15-08-image.webp)
![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-17-16-52-image.webp)
账号创建完毕后,登录即可![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-17-17-47-image.webp)
## 创建一个新的Zerotier网络组
当你账号登录成功后,会自动跳转到这个页面,点击`Create A Network`。如果没有,请访问[ZeroTier Central](https://my.zerotier.com/)
![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-17-20-24-image.webp)
下面的列表会增加一个新的网络组,点击它![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-17-21-31-image.webp)
Zerotier默认的网络组模式为`Private`。即私密模式,哪怕别人知道了你的`Network ID`尝试加入你的网络组也需要你进行验证
![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-17-22-38-image.webp)
复制这个`Network ID`![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-17-22-13-image.webp)
---
# 在设备上安装Zerotier应用
## Windows
前往[Download - ZeroTier](https://www.zerotier.com/download/)下载exe安装文件![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-17-25-52-image.webp)
打开Zerotier![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-17-27-20-image.webp)
查看右下角托盘,按照图片操作加入网络组![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-17-28-20-image.webp)![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-17-29-12-image.webp)![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-17-30-26-image.webp)
这里可以查询到你的设备ID和你在这个网络组的IP
![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-18-03-19-image.webp)
**然后参考:[Zerotier授权设备](#zerotier授权设备)**
## Linux飞牛OS
通过SSH连接上你的Linux设备
查看安装命令:[Download - ZeroTier](https://www.zerotier.com/download/)![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-17-38-19-image.webp)
终端执行: `curl -s https://install.zerotier.com | sudo bash`
看到这一行即安装完毕后面那一串即你的设备ID![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-17-39-23-image.webp)
加入网络:`sudo zerotier-cli join 你的Network ID`![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-17-42-01-image.webp)
**然后参考:[Zerotier授权设备](#zerotier%E6%8E%88%E6%9D%83%E8%AE%BE%E5%A4%87)**
## Android安卓
下载客户端
1. Zerotier One[ZeroTier One APK Download for Android - Latest Version](https://apkpure.net/zerotier-one/com.zerotier.one)
2. ZerotierFix[Releases · kaaass/ZerotierFix](https://github.com/kaaass/ZerotierFix/releases)
如图操作
![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-17-59-06-image.webp)![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-17-59-46-image.webp)
**然后参考:[Zerotier授权设备](#zerotier%E6%8E%88%E6%9D%83%E8%AE%BE%E5%A4%87)**
---
# Zerotier授权设备
前往Zerotier的网页控制台[ZeroTier Central]([https://my.zerotier.com/](https://my.zerotier.com/))
授权刚才加入的设备![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-17-31-51-image.webp)
勾选然后保存![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-17-33-10-image.webp)
---
# Zerotier访问测试
如果你同一个网络组里已经有两台以上的设备了可以尝试ping一下测试连通性请先确保两台设备不在同一个局域网比如手机开流量NAS用家里的无线网
IP可以在这里查看![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-18-02-00-image.webp)
ping测试![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-18-07-13-image.webp)
---
# 使用Tailscale进行内网穿透的详细教程
## 创建Tailscale账号
前往:[Tailscale](https://login.tailscale.com/start)。如果你进不去,请尝试挂梯子。如果看不懂英文可以开启浏览器的翻译功能
选择任意一个登录方式![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-18-24-32-image.webp)
账号创建完毕后,登录即可
---
# 在设备上安装Tailscale应用
## Windows
前往[Download · Tailscale](https://tailscale.com/download)下载exe安装文件
官方教程:![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-18-31-48-image.webp)
## Linux飞牛OS
通过SSH连接上你的Linux设备
查看安装命令:[Download · Tailscale](https://tailscale.com/download/linux)![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-18-32-58-image.webp)
终端执行: `curl -fsSL https://tailscale.com/install.sh | sh`
等待安装完毕后输入:`tailscale login`
打开弹出的浏览器窗口,登录你的账号即可
## Android安卓
下载客户端Google Play[Download · Tailscale](https://tailscale.com/download/android)
登录你的账号即可
---
## Tailscale访问测试
前往Tailscale的网页控制台[Machines - Tailscale](https://login.tailscale.com/admin/machines)。可以查看到每个设备Tailscale分配的IP![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-18-26-58-image.webp)
ping测试![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-18-41-45-image.webp)
---
# 使用Cloudflare Tunnel进行内网穿透
> 这种方法可以不进行任何配置直接在公网上被访问但是仅限Web服务。如果你想穿透游戏服务器等则不可用。你需要先将域名托管到Cloudflare
创建Cloudflare账号[主页 | Cloudflare](https://dash.cloudflare.com/)
进入[Cloudflare One](https://one.dash.cloudflare.com/)需要绑定PayPal
如图操作创建一个Tunnel![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-18-45-41-image.webp)![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-18-45-54-image.webp)![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-18-46-22-image.webp)
## Docker方式
**使用1Panel**
复制如图的命令
![](https://r2.072103.xyz/fuwari-blog/img/48e9c43eb5c0fb49cc5517687698e3d9d1e60220.webp)
将其粘贴,并且复制后面的令牌![](https://r2.072103.xyz/fuwari-blog/img/a2e18519d3782d765d7293c7a3d21031c787d575.webp)
1Panel应用商店搜索`cloudflared`![](https://r2.072103.xyz/fuwari-blog/img/cf2eba61f0aaa7605240187e1c46f80a3954edfa.webp)
填入令牌![](https://r2.072103.xyz/fuwari-blog/img/6f661ffa778b2be2e108912d3d44d8b3301df6d6.webp)
然后前往[查看IP](#查看cloudflared的ip)
**使用命令运行**
复制底下的命令然后SSH连接到Linux飞牛OS在终端输入
![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-18-46-49-image.webp)
然后前往[查看IP](#%E6%9F%A5%E7%9C%8Bcloudflared%E7%9A%84ip)
### 查看cloudflared的IP
因为我们是Docker模式所以IP需要通过SSH终端输入`ip a`来查看。我这里是`192.168.124.34`
```
root@n100-debian:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: ens18: tiROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether bc:24:11:33:e1:7d brd ff:ff:ff:ff:ff:ff
altname enp0s18
inet 192.168.124.34/24 brd 192.168.124.255 scope global dynamic ens18
valid_lft 46579sec preferred_lft 46579sec
inet6 2409:8a30:320:a170:be24:11ff:fe33:e17d/64 scope global dynamic mngtmpaddr
valid_lft 1902sec preferred_lft 1898sec
inet6 fe80::be24:11ff:fe33:e17d/64 scope link
valid_lft forever preferred_lft foreverti
```
**然后前往[配置并访问Tunnel](#配置并访问tunnel)**
## 原生模式以Debian为例
选择Debian然后复制底下的命令直接到终端执行
![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-20-00-49-image.webp)
如果你的环境无法连接上Github
尝试手动下载:[https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb](https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb)
然后将其通过SSH等方式传到Linux上如图终端为MobaXterm![](https://r2.072103.xyz/fuwari-blog/img/2024-10-29-10-18-29-image.webp)
然后使用:`dpkg -i cloudflared-linux-amd64.deb`安装这个软件包
然后直接复制右边的命令到SSH终端执行![](https://r2.072103.xyz/fuwari-blog/img/2024-10-29-10-19-27-3dcfad6977bdecf80fc0366f257788e6.webp)
**然后前往[配置并访问Tunnel](#%E9%85%8D%E7%BD%AE%E5%B9%B6%E8%AE%BF%E9%97%AEtunnel)**
## AndroidTermux
在Android上安装[Termux | The main termux site and help pages.](https://termux.dev)
在终端执行:`pkg install cloudflared`
选择`Debian`然后复制最右边的命令到终端执行![](https://r2.072103.xyz/fuwari-blog/img/2024-10-29-08-42-38-image.webp)
如果你无法使用Termux自带的cloudflared请尝试安装proot容器实现
依次输入命令:
```shell
pkg update && pkg upgrade
pkg install proot
pkg install proot-distro
proot-distro list
proot-distro install debian
proot-distro login debian
apt install wget
wget https://github.com/cloudflare/cloudflared/releases/download/2024.10.1/cloudflared-linux-arm64.deb
dpkg -i cloudflared-linux-amd64.deb
```
然后直接复制右边的命令到SSH终端执行
![](https://r2.072103.xyz/fuwari-blog/img/2024-10-29-08-42-38-image.webp)
如果你无法通过令牌配置cloudflared请参见[本地方式配置cloudflared](#本地方式)
**然后前往[配置并访问Tunnel](#%E9%85%8D%E7%BD%AE%E5%B9%B6%E8%AE%BF%E9%97%AEtunnel)**
---
# 配置并访问Tunnel
## 通过网页配置
> 这种方法需要直接在安装了cloudflared的设备上通过令牌运行
如图进入创建一个HTTP隧道
![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-18-49-21-image.webp)![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-18-49-44-image.webp)
填写你的IP和端口非Docker模式可以直接填写localhost![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-18-53-37-image.webp)
## 本地方式
> 这种方法只需要在安装了cloudflared的设备上输入一些命令然后通过网页授权后续更改配置也需要在本地操作
登录并授权:`cloudflared tunnel login`
创建隧道并设置隧道HTTP模式穿透目标地址`127.0.0.1`,端口:`8080`,外部域名:`test.onani.cn``cloudflared tunnel --name test --url http://127.0.0.1:8080 --http2 --hostname test.onani.cn`
## 访问测试
成功访问![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-18-54-42-image.webp)
# 使用STUN打洞
> 这种方法可以不进行任何配置直接在公网上被访问并且所有类型的服务都能正常使用。但是这种方式进行的内网穿透无法固定也无法指定IP和端口在3~7天后会改变
## 安装Lucky
执行:`curl -o /tmp/install.sh http://6.666666.host:6/files/golucky.sh && sh /tmp/install.sh http://6.666666.host:6/files 2.13.4`
通过`host:16601` 进入Lucky后台设置STUN穿透。如果DMZ主机不设为Lucky主机可能会失败。打码的地方即公网访问的IP和端口![](https://r2.072103.xyz/fuwari-blog/img/2024-10-28-18-56-16-image.webp)

View File

@@ -0,0 +1,65 @@
---
category: 教程
description: 阿里云云函数 FC是一个弹性的计算平台可托管多种服务。搭配AList的前后端分离部署实现比VPS更低的价格得到更好的体验
draft: false
image: https://r2.072103.xyz/fuwari-blog/img/47518d4403328a0fcb716f0e06fc7f608e6c65b7.webp
lang: ''
published: 2025-01-13
tags:
- 阿里云云函数 FC
- AList
title: 利用阿里云云函数 FC 搭建AList后端每月仅需5毛
---
# 还是建议购买一个便宜的云服务器来部署或者用家里云,这种方法很灵车
推荐Akilehttps://akile.io/register?aff_code=503fe5ea-e7c5-4d68-ae05-6de99513680e
---
# 原理
1. AList前端有一个专门的项目https://github.com/AlistGo/alist-web 。可前往[AList-Web部署教程](/alist-web)。教程使用了Cloudflare Page进行前端部署我们更建议你使用 https://vercel.com 来进行前端部署,因为更快。这些都完全免费
2. 部署完毕前端后我们就需要一个后端它需要能够执行AList的二进制文件并且能开放端口默认为5244来让前端可以和后端相互通信。在传统情况下我们会选择购买一台云服务器或者用自己的电脑/家里云+Cloudflare Tunnel又或者是Serv00这种免费的托管。本篇我们使用阿里云FC函数计算它虽然可以运行二进制文件但是和传统架构大相径庭我们要深入了解。
3. FC函数是一个实例性服务。用户可以创建函数部署服务当一定条件被触发比如HTTP触发器则创建新的实例开始运行用户的服务。也就是说这个实例是无状态的如果直接拿来部署AList就会导致第一次配置完毕后过一段时间再访问就会变为初始状态。就算你一开始就使用一个全量包来部署在部署后也无法对其进行更改所以我们需要绑定一个NAS文件系统用于数据持久化。但是NAS文件系统并不能直接绑定到代码的运行时 /code/xxx 目录我们可以使用AList的指定配置文件参数将NAS绑定到 /mnt/AList 然后指定配置文件到 /mnt/AList 。也就是通过 **./alist server --data /mnt/AList** 命令来启动,这样就做到了数据持久化。
# 关于计费
1. FC函数通过CU数来收费
2. NAS通过存储空间来收费
# 实操
1. 我们假设你已经部署完毕了前端。前端和后端的通信地址在根目录的 env.production 文件定义
2. 我们目前并不知道这个后端URL如何填写因为这个URL是由阿里云在FC函数创建完毕的时候才会展示所以我们暂且搁置到一遍
3. 接下来我们前往阿里云-函数计算FC官网 https://fcnext.console.aliyun.com/overview
4. 依次点击 左侧边栏的 函数 -> 创建函数 -> Web函数。进入到创建Web函数的页面
5. 函数名称填写AList运行环境选择Debian 10或Debian 11代码上传方式选择从文件夹上传代码启动命令填写**./alist server --data /mnt/AList**监听端口填写5244
6. 我们需要上传代码到函数也就是AList的二进制文件我们前往 https://github.com/AlistGo/alist/releases/latest 下载最新的Linux AMD64架构的二进制文件也就是 **alist-linux-amd64.tar.gz**。将其解压,你会得到一个名为 **alist**的二进制文件,创建一个空文件夹将其放进去,然后上传这个文件夹到函数
![image](https://r2.072103.xyz/fuwari-blog/img/QmdajYeRyt1u3BSmRdGx8uUHKamGDkwoRe4TmEFZsJsaqS)
7. 然后点击左下角的创建
8. 然后你会进入到函数的控制面板,依次点击 配置 -> 网络 -> 网络 编辑 -> 允许访问VPC:是 -> 自动配置。依次点击 配置 -> 存储 -> NAS文件存储 编辑 -> 挂载 NAS 文件系统:启用 -> 自动配置。依次点击 日志 -> 开通日志服务
9. 现在回到 代码 界面,点击部署代码。稍等片刻会提示部署成功,然后点击 函数详情内的 HTTP触发器 ,复制公网访问地址。这个就是我们前文提到的要写到前端根目录的 env.production 文件的URL将其填写进去例如
```shell
VITE_API_URL = "https://aliyun-fc-alist.run"
```
10. 提交你的新更改,前端会自动重新构建
11. 尝试直接访问你的AList前端URL它应该会顺利进入到AList的登录页面
12. 此时查看控制面板的 实例 是否有一条新的实例正在工作如果有再前往日志查看该实例日志你会看到AList初始化时生成的管理员密码拿这个密码到前端URL登录AList然后就可以正常使用了
---
# 疑难解答
1. 如果出现正在加载储存:
![9aa460cd2dc84e1debe43e9df2d342fc](https://r2.072103.xyz/fuwari-blog/img/QmZVewYnKwCJzcShnkGTTVZJiTSUUSQi9u6pZ5rXRDK3rK)
查看你的日志,是否有存储加载失败,如果有可以尝试:
1. 反复重新部署,直到能进后台然后删除那些加载失败的存储
2. https://github.com/AlistGo/alist/discussions/3976

View File

@@ -0,0 +1,100 @@
---
category: 教程
description: 将AList Web部署到CF Pages可以显著提升访问者的浏览体验因为静态资源都在CF的边缘节点而后端使用API交互而不是由源服务器路由所有流量既能减轻源服务器的负载又能使用CF
Pages的不回源优势一箭双雕
draft: false
image: https://r2.072103.xyz/fuwari-blog/img/QmSmcktDEJaWdDvFQeuNTJ9ps8R3PcLWyhSrbxoLEq2b2x.webp
lang: ''
published: 2024-10-15
tags:
- AList
- Cloudflare Pages
title: 教你把AList的前端部署到CF Pages让你的AList秒加载
---
## 前情提要[#](https://afo.im/shen-me-Cloudflare-dai-li-AList-tai-man--jiao-ni-bu-shu-qian-duan-dao-Pages-ju-jue-hui-yuan-#user-content-%E5%89%8D%E6%83%85%E6%8F%90%E8%A6%81)
本教程**不是 AList 的无服务器部署**,仅将前端页面部署到 Cloudflare Pages这样用户就能很快从 cf 的边缘节点拉取前端文件,而不用 cf 回源,提高浏览体验,后端仍然需要一台开放到公网的服务器部署 AList无公网服务器可使用 Cloudflare Tunnels
### 首先保证你的后端服务器支持v4v6双栈访问
1. 使用Cloudflare Tunnel套cf
2. 分别设置A和AAAA解析麻烦如果你的IP很快那其实可以不用前后端分离暴露源站的前后端分离也不能避免被DDoS因为你的源站会在HTTP报文中暴露
### 然后开始正式将AList前端部署到Cloudflare Pages
1. Fork仓库
[https://github.com/alist-org/alist-web](https://github.com/alist-org/alist-web)
2. 更改项目根目录的`env.production`文件为你的后端服务器地址
![QmduQJq3TydzvLzBn47zLxp2MR1iD2sxm67EzFUFuEBvQa.webp](https://r2.072103.xyz/fuwari-blog/img/6f2871ca5d35e1e974d89611835f3a2c7fd205e7.webp)
3. 将仓库克隆到本地,需要安装[Git](https://git-scm.com/)
```
使用SSH需要持有你的Github SSH私钥
git clone git@github.com:你的用户名/你Fork的仓库
使用HTTPSNot Use Magic有概率SSL握手失败
git clone git@github.com:你的用户名/你Fork的仓库
```
5. 下载汉化包:[AcoFork 的网盘](https://alist.onani.cn/guest/alist_Zh-CN)或[Crowdin - 需要登录](https://crowdin.com/project/alist/zh-CN)
![QmXVpMc7BqbXv9EaAbeptsrnhYLinvQQsu1btBE3VvDixa.webp](https://r2.072103.xyz/fuwari-blog/img/68d31e9797edfc3c1d8a72386ebf3a643d117ce6.webp)
6. 解压,将`alist (zh-CN)\src\lang`里面的`Zh-CN`文件夹复制到仓库下`src/lang`
7. 编辑根目录的`.gitignore`,添加一行`!/src/lang/zh-CN/`确保文件不被忽略
8. 下载[Nodejs](https://nodejs.org/zh-cn)。在根目录打开终端,生成中文需要的文件:
```
安装cnpm
npm install -g cnpm --registry=https://registry.npmmirror.com
安装依赖:
cnpm install --legacy-peer-deps
生成中文需要的文件:
node .\scripts\i18n.mjs
```
9. 将更改提交到暂存区并提交到远程仓库,在根目录打开终端
```
git add . //将更改提交到暂存区
git commit -m 添加中文 //发布提交
git push -f //强制将更改提交到远程仓库
```
10. 进入[Cloudflare 仪表盘](https://dash.cloudflare.com/),进入 Workers 和 Pages 页面
![QmW5UaUap8T2R37u5dzmKGLmUgk4qKnSMFwHBVHqvVbkVA.webp](https://r2.072103.xyz/fuwari-blog/img/49ccd51771082fdc94eecb270caf987d257cd987.webp)
11. 创建一个 Pages选择连接 Git 存储库
![QmZXerKv9PVxxscAe4w4LEfAaKfiScPQEKh1UroXnCeAUr.webp](https://r2.072103.xyz/fuwari-blog/img/9c4b9ff38d3c8810007ffe33c1a0f98cdd84b92e.webp)
12. 选择你的存储库,开始设置
![QmNdSGQrJtoqDnBx8pgDrtcfmUUfVBS9xdrN4xLgyPjyXE.webp](https://r2.072103.xyz/fuwari-blog/img/fb97b5148c3811590609a0b85c6c1ee3c451853d.webp)
13. 构建命令输入:`pnpm install && pnpm build`,构建输出目录选择`/dist`
![QmbhPdbE8f1zLKvWA6aEGJtZhmecRMVZiQbx6Zx1Lecp7J.webp](https://r2.072103.xyz/fuwari-blog/img/c4300a94ccb16fe1383c721cbc83d1a71420e340.webp)
14. 等待 Cloudflare 构建结束,为 Pages 绑定自定义域
![QmTMphu61uUF9XefBAVDVf19Jm1vLVUhhXQ9PXABy7hUpK.webp](https://r2.072103.xyz/fuwari-blog/img/d27136b31d759898fe06041f12e7a07f07bd06b0.webp)
15. 访问自定义域,查看 AList 是否正常
![QmT8GLcaxtabhifKNL8kczEtozmNvdyhzJ823RfBrcFdpm.webp](https://r2.072103.xyz/fuwari-blog/img/345df496620a9d3faf0eceeb773813bc9ac98375.webp)
### 定制 AList[#](https://afo.im/shen-me-Cloudflare-dai-li-AList-tai-man--jiao-ni-bu-shu-qian-duan-dao-Pages-ju-jue-hui-yuan-#user-content-%E5%AE%9A%E5%88%B6-alist)
> 我们都知道 AList 支持自定义头部和内容,但是因为 Cloudflare Pages 是一个静态页面,所以我们采用硬编码方式,直接将需要自定义的内容写入仓库根目录的`index.html`
> ![Qmd47pgFsyh28NjhkLiCPPbf7iasXMWvAvZDupH8QspG64.webp](https://r2.072103.xyz/fuwari-blog/img/c3ff113558b368da9a7aeb70f70b978f49d0eb7a.webp)
1. 编辑根目录的`index.html`
2. 将更改提交到暂存区并提交到远程仓库,在根目录打开终端
```
git add . //将更改提交到暂存区
git commit -m 你的提交摘要 //发布提交
git push -f //强制将更改提交到远程仓库
```
3. Cloudflare Pages 会自动重新构建,等待新网页构建完成即可
![QmNZemsDHz5QLxW3V2eANghmVkfBccEpe5vMAWUCLik4o6.webp](https://r2.072103.xyz/fuwari-blog/img/863e5bb3ef65ec2a0af03303dd3afe13fb8dd8d4.webp)
### 疑难解答
1. 如果你遇到构建错误找不到solid-route/src的情况可以尝试查看你fork的仓库通过本地拉取下来后根目录的 `solid-route` 文件夹是不是空的,如果是,请前往 https://github.com/alist-org/alist-web 手动将 `solid-route` 文件夹里的内容搬到你仓库中,然后尝试重新构建

47
src/content/posts/asf.md Normal file
View File

@@ -0,0 +1,47 @@
---
category: 教程
description: ArchiSteamFarm是一个Steam自动挂卡工具它可以自动识别哪些游戏没有挂卡并且自动挂卡高效率获得Steam集换式卡牌
draft: false
image: https://r2.072103.xyz/fuwari-blog/img/QmPEHve8DdVZdwxAZ26BPgbc6cDCBaKC76VVijqVoMBY2k
lang: ''
published: 2024-12-18
tags:
- Steam
title: 使用ArchiSteamFarm进行Steam自动挂卡
---
# 可用的目标作业系统
Windows x86/Arm64
Linux x86/Arm64/Arm32
OS X x86/Arm64
(和其余任何可以获取有效 .NET Core 运行时的地方工作。基于Github仓库源码手动编译
# 安装&使用 ArchiSteamFarm
https://github.com/JustArchiNET/ArchiSteamFarm
或前往Releasehttps://github.com/JustArchiNET/ArchiSteamFarm/releases/latest
下载你适用于你作业系统的可执行文件的压缩包
启动ArchiSteamFarm
等待终端输出WebUI地址进入
添加机器人,简单配置即可
![image](https://r2.072103.xyz/fuwari-blog/img/QmcoF7K5sTkd4CRGTZPmnLwheAHpSf68RkZTd4ZST41uXc)
如果你配置了Steam手机验证器此时应该会弹出登录请求允许它。然后前往终端界面输入 **Y** 并回车
此时终端应该输出:**成功以 XXXXXXXXXX 的身份登录。**
![image](https://r2.072103.xyz/fuwari-blog/img/QmcuktSJjWFmufsLmrYRsbLa9ns7pvRXKWZ5EUyirasKt6)
如果此时登录的账号未被占用,则自动开始挂卡。
---
ASF并不会干扰你的正常使用Steam的行为当账号被占用时ASF会暂停挂卡直到账号未被占用这个过程是全自动的无需手动干涉
---
ASF可以视为一个无头Steam客户端它不仅能挂卡还能做更多事情详见https://github.com/JustArchiNET/ArchiSteamFarm/wiki

View File

@@ -0,0 +1,127 @@
---
category: 教程
description: 使用AutuBangumi连接qBittorrent下载番剧然后使用刮削软件刮削设置一遍享受终身
draft: false
image: https://r2.072103.xyz/fuwari-blog/img/QmXYf2u6BZMseAzjPUhcHsdfdhQpc3XkdjuEi4VvE1BkTn.webp
lang: zh_CN
published: 2025-02-25
tags:
- AutoBangumi
title: 教你搭建自己的番剧库,实现自动追番!
---
# 实现流程:
1. 每当新番更新时AutoBangumi自动向qb推送种子下载并且重命名
2. 刮削软件如Plex飞牛影视设置定时搜索媒体库
3. 你只需要选番,然后等待下载和看就行了 ~~实际并非~~
### 安装qbittorrent
> 用于下载番剧
各系统安装方法各有不同。如果你安装的是非nox版本记得在设置打开WebUI并监听0.0.0.0:8080
Windows[SourceForge](https://sourceforge.net/projects/qbittorrent/files/qbittorrent-win32)
Linux`apt/yum install qbittorrent-nox`
Dockerhttps://github.com/linuxserver/docker-qbittorrent
Tracker服务器大全[中国可用的 BT Tracker 服务器列表每24小时自动更新 - 小小编程](https://www.yaozuopan.top/index.php/archives/1014/#:~:text=%E4%B8%AD%E5%9B%BD%E5%8F%AF%E7%94%A8%E7%9A%84%20BT%20T)
![8938ee430e5f74109c34c8c6d48e0e4f619cbeff.webp](https://r2.072103.xyz/fuwari-blog/img/29e0e4c26c15463ff692aabcee747950e2d029d3.webp)
### 安装[AutoBangumi](https://www.autobangumi.org/)
> 用于获取你订阅的番剧并在更新时自动发起下载任务
1. 安装Docker各系统安装方式各有不同
2. 找一个你喜欢的文件夹创建`docker-compose.yaml` ,并写入内容:
```yaml
version: "3.8"
services:
AutoBangumi:
image: "ghcr.io/estrellaxd/auto_bangumi:latest"
container_name: AutoBangumi
volumes:
- ./config:/app/config
- ./data:/app/data
ports:
- "7892:7892"
network_mode: bridge
restart: unless-stopped
dns:
- 223.5.5.5
environment:
- TZ=Asia/Shanghai
- PGID=$(id -g)
- PUID=$(id -u)
- UMASK=022
```
3. 运行命令docker compose up -d
4. 进入localhost:7892 默认账号admin默认密码adminadmin
5. 点左边的设置图标 -> 下载设置,填入下载器信息,然后点击右下角的应用,直到右上角亮绿灯
![QmbVcrgZ2C2FTt6QdfKsUkVQz9SCiQiyq1WCbphDiGW2mM.webp](https://r2.072103.xyz/fuwari-blog/img/94f407121de7816ee2dff78f948dcc2ded27b28f.webp)
6. 前往蜜柑计划,注册账号,并订阅你想要的番剧(复制)
![QmXq7DcBkA4EecJikQE4snvPkNU2NQLy1EXUpAructteah.webp](https://r2.072103.xyz/fuwari-blog/img/0e22eab8db6ed2441f3d3be0b10d51944867df0a.webp)
7. 回到 AutoBangumi点击右上角的 +,添加 RSS粘贴
8. 静静等待,不出意外 AutoBangumi 会自动下载你订阅的番剧了如果没有可以查看AutoBangumi的日志或者尝试重启容器
### 下载旧集或已完结番剧
首先推荐几个资源网(梯子自备):
1. [ACG.RIP](https://acg.rip)
2. [末日动漫资源网](https://share.acgnx.se)
3. 蜜柑计划 国内直连1. https://mikanime.tv 2. https://hadestian.cn 3. https://mk.misakaae.com 4. https://mikan.yujiangqaq.com 5. RSS镜像站https://mikanani.longc.top
4. 蜜柑计划 需翻墙https://mikanani.me
然后找你想要的番剧下载
#### 规范重命名
> 为了让软件能正确刮削元数据和剧集,我们需要规范重命名。
注意你只需要确保番剧名正确就可以了子目录可以通过后面的脚本自动重命名如果你不确定番剧名请前往TMDB搜索[The Movie Database (TMDB) ](themoviedb.org)
> 一级目录qb 设置的下载目录):不需要重命名
> 二级目录(番剧名,必须正确):总之就是非常可爱
> 三级目录番剧的哪一季Season 1
> 四级目录番剧的哪一季的哪一集S01E01.MP4
1. ~~前往Episode-ReName克隆仓库~~ ~~(已被删库,可尝试[Episode-ReName.zip | Onani-AList](https://alist.onani.cn/Episode-ReName.zip) )~~ AList已死请尝试天翼云盘 https://cloud.189.cn/web/share?code=iQVjUnzE7fQj 访问码i8sk
2. Win 可以通过右键菜单自动获取路径版.bat 通过右键一级目录选择自动剧集命名 。若使用.py 脚本则只能通过`python3 EpisodeReName.py "D:/qbdownloads/bangumi"`
**小贴士:** 可以使用[RaiDrive](https://onani.cn/RaiDrive)或[SSHFS](/SSHFS)将远程的Linux文件映射到Windows上管理番剧更方便
![QmY7KM2MjudNksqvSkkFmwFgjjdD7ZQKLDaVPXR3jnXoxw.webp](https://r2.072103.xyz/fuwari-blog/img/5cf6dfe73164f6a869a59817df53f939e936ab00.webp)
### 安装 Plex或者安装飞牛云NAS
> 用于观看番剧
1. 下载Plex Media Server
2. 启动。默认端口 32400如果进去是一堆乱码添加/web后缀。例如192.168.124.25:32400/web
3. 选择你的媒体库文件夹
4. 开启远程访问,右上角设置 -> 远程访问
图为飞牛影视
![Qmf8Q1D9fUoFbu9MQsQHvaz13p3YV2XguR3RqUAse2KBEa.webp](https://r2.072103.xyz/fuwari-blog/img/acbde8bfd7395a8b5c744b9f1c550f3caac6c342.webp)
爽看

View File

@@ -0,0 +1,40 @@
---
category: 记录
description: 本文深度剖析浏览器的JS运行原理以及浏览器内部事件处理的根本操作事件循环
draft: false
image: https://r2.072103.xyz/myblog/img/4b040799-eec9-457e-a04e-edf8b7e35b94.webp
lang: ''
published: 2025-04-25
tags:
- 浏览器
- JS
title: 浏览器JS运行原理
---
# 引言以下JS代码运行的结果是什么
```js
function a() {
console.log("1");
Promise.resolve().then(() => {
console.log("2");
});
}
setTimeout(function () {
console.log("3");
Promise.resolve().then(a);
}, 0);
Promise.resolve().then(function () {
console.log("4");
});
console.log("5");
```
# 浏览器是如何按部就班执行命令的?
浏览器的所有操作都由**渲染主线程**执行,渲染主线程将创建一个无限循环的任务执行已有的任务,当渲染主线程无任务时将从**消息队列**中拿取新的任务执行。**所有任务遵循先来后到,不允许插队执行**
视频分析:
<iframe src="//player.bilibili.com/player.html?isOutside=true&aid=114398232385591&bvid=BV1VpLJzPEBp&cid=29606019473&p=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"></iframe>

View File

@@ -0,0 +1,128 @@
---
category: 随笔
description: GFW俗称中国网络国家防火墙它运用多种技术阻断境内对境外某些网站的访问比如谷歌、Discord。但对于某些阻断方式通过一些手段我们可以绕过GFW来进行访问
draft: false
image: https://r2.072103.xyz/fuwari-blog/img/Snipaste_2024-10-21_19-36-34.webp
lang: ''
published: 2024-10-21
tags:
- GFW
title: 让我们来探讨一下如何绕过GFW
---
### 首先我们要知道GFW是如何封锁我们的流量的
1. IP黑洞目前无解但仅对部分服务黑洞如谷歌系谷歌、推特、YouTube等
2. DNS污染为域名返回一个假的IP。使用hosts文件强制指定域名对应ip或者使用加密的DNSDoH、DNS 签名等)就可以解决
3. HTTP劫持因为流量不是加密的GFW作为天然的中间人可以直接进行篡改重定向到404页面、劫持到反诈页面等。可以使用HTTPS连接规避但你可能会遇到SNI阻断
4. SNI阻断在客户端与服务器建立加密连接前客户端会发送 `Client Hello` 报文,而这个报文是明文,并且一般都会携带 `server_name` GFW可以知道你要访问哪个网站对不在白名单discord.com的域名进行阻断。因为 `server_name` 实际上是一个扩展并不强制你可以不发送它来规避SNI阻断
### 那么让我们分析一下GFW对于不同网站的封锁情况
我们使用WireShark进行抓包
- 首先尝试访问 `www.baidu.com` 这是一个没有被GFW封锁的域名
1. 我们先ping一下![](https://r2.072103.xyz/fuwari-blog/img/2024-10-21-20-16-48-image.webp)
2. 得到ip `2408:873d:22:18ac:0:ff:b021:1393`
3. 通过Hosts强制绑定![](https://r2.072103.xyz/fuwari-blog/img/2024-10-21-20-18-10-image.webp)
4. 通过WireShark进行抓包可以看到客户端发送的 `Client Hello` 可以清晰地看到 `Server Name` 字段,并且也能正常收到 `Server Hello` 然后双方便开始通信![](https://r2.072103.xyz/fuwari-blog/img/2024-10-21-20-24-03-image.webp)
5. 查看浏览器,网站正常访问![](https://r2.072103.xyz/fuwari-blog/img/2024-10-21-20-35-29-image.webp)
- 让我们试试访问 `discord.com`
1. 我们先ping一下可以发现域名和解析到的IP均不通![](https://r2.072103.xyz/fuwari-blog/img/2024-10-21-20-27-57-image.webp)
2. 此时我们尝试使用 `itdog.cn` 进行v4 ping并且依次对解析出的域名进行ping![](https://r2.072103.xyz/fuwari-blog/img/2024-10-21-20-28-51-image.webp)
3. 可见第一个IP通![](https://r2.072103.xyz/fuwari-blog/img/2024-10-21-20-29-40-image.webp)
4. 强制绑定Hosts尝试抓包![](https://r2.072103.xyz/fuwari-blog/img/2024-10-21-20-35-58-image.webp)![](https://r2.072103.xyz/fuwari-blog/img/2024-10-21-20-31-49-image.webp)
5. 可见在通过强制Hosts绑定后在客户端发送 `Client Hello` 后被GFW检测到`Server Name` 字段然后GFW向客户端发送一个 `RST` 报文,即要求重置客户端连接。在客户端侧,则会收到 `ERR_CONNECTION_RESET` 即:连接已重置。用户无法访问网页。![](https://r2.072103.xyz/fuwari-blog/img/2024-10-21-20-33-23-image.webp)
### 继续,尝试发送空 `Server Name` 报文
![](https://r2.072103.xyz/fuwari-blog/img/2024-10-21-20-41-37-image.webp)
![](https://r2.072103.xyz/fuwari-blog/img/2024-10-21-20-41-54-image.webp)
成功访问。在WireShark中并未发现 `Server Name` 字段
那么有没有什么软件可以帮我们不发送Server Name呢有的兄弟有的
# 方法一ECH
>注意本方法实际上是启用一个尚未普及的技术加密SNI。该方法并不能让所有明确被SNI阻断的网站恢复正常访问。尽管客户端支持ECH若服务器不支持则在服务器看来那就是一个非法请求不予受理
>如果想要本方法奏效,你需要确保:
>1. 网站托管在Cloudflare或者托管商声明支持ECH
>2. 网站域名被SNI阻断客户端被发RST包
首先我提供一个网站https://www.cloudflare-cn.com/ssl/encrypted-sni/#results
这个网站可以查询你的浏览器是否正在使用ECH。进入网站点击 `检查我的浏览器` ,待检查完毕后,检查 `安全 SNI` 一项是否为 `√`
如果你为 `×` ,也不要气馁,我们现在来解决
### Edge浏览器
右键桌面的快捷方式点击属性,在目标一栏中添加 `--enable-features=EncryptedClientHello`
打开设置搜索DNS找到 `使用安全的 DNS 指定如何查找网站的网络地址` 当前版本我叫这个。反正就是配置DoH的地方
选择`Cloudflare 1.1.1.1`
再次测试即可
其他浏览器我没测试应该大同小异网上搜索一下XX浏览器开启ECH就行
接下来尝试访问https://iwara.tv 。你应该能直连了
# 方法二Accesser
>本方法采用一个神奇的方法来绕过SNI阻断域前置。原理为客户端先找网站要一张SSL证书然后再用这个通用证书写好要访问的网站发给服务器这样GFW也就看不见你要访问的网站也就没法进行SNI阻断。
>注意本方法需要在本地运行一个程序并且劫持所有HTTP流量可能会导致某些正常上网情况下不会出现的问题请酌情使用
>
[https://github.com/URenko/Accesser](https://github.com/URenko/Accesser)
Accesser是一个HTTP代理。它通过中间人的身份处理终端的HTTP出口流量以绕过SNI阻断。我们正常访问网站时客户端会发送Client Hello而这个报文是明文并且通常会携带ServerName这个时候GFW就能通过检测ServerName来进行阻断代替网站向客户端发送一个RST报文重置连接做到网站被“墙”的效果
而通过Accesser代理后它会抹掉ServerName然后发送Client Hello。这个时候如果服务端支持域前置则会返回客户端一个默认的SSL证书公钥然后客户端就能使用这个公钥再次发送一个加密的Client Hello此时携带上ServerName就不会被GFW阻断了。但是如果客户端在第一次我们拿公钥的时候拒绝了空ServerName的Client Hello那这个办法就失效了不过大部分网站是支持这样做的
### Windows
- 前往开头的的Github仓库
- 下载最新的Release。一般有一个`accesser.exe`
- 直接打开这个软件,看到这个画面即可![](https://r2.072103.xyz/fuwari-blog/img/c2eed28c-6e5d-43a3-a016-8f1a38a53cbd.webp)
- 它的原理是自动设置系统代理,如果你使用了一些别的代理软件,会被覆盖![](https://r2.072103.xyz/fuwari-blog/img/d0d8fac1-a2e5-4db2-8e25-ca5e04eb9951.webp)
### Linux以Debian12为例
- 安装Python`apt install python3`
- (可选)创建虚拟环境:`python -m venv venv`
- (可选)进入虚拟环境:`source venv/bin/activate`
- 安装Accesser`python3 -m pip install -U accesser`
- 运行:`accesser`
- 它会提示你需要信任 `root.crt` 。关闭Accesser
- 我的证书文件在 `/root/Accesser/venv/lib/python3.11/site-packages/accesser/CERT/root.crt`
- cd到你的证书目录`cd /root/Accesser/venv/lib/python3.11/site-packages/accesser/CERT`
- 信任证书:`sudo cp root.crt /usr/local/share/ca-certificates/`
- 更新证书存储:`sudo update-ca-certificates`
- 设置全局代理:`sudo nano /etc/environment`
- ```
http_proxy="http://127.0.0.1:7654"
https_proxy="http://127.0.0.1:7654"
no_proxy="localhost,127.0.0.1"
```
- 重启即可
- 测试连通性:`curl -x https://discord.com`

View File

@@ -0,0 +1,133 @@
---
category: 教程
description: USTC在下载一些资源的时候会使用JS验证有没有不用无头浏览器绕过的方法呢...
draft: false
image: https://r2.072103.xyz/myblog/img/58e8e41a-0755-4e6a-ab1e-a9dbaa1042d5.webp
lang: ''
published: 2025-04-04
tags:
- USTC
title: 绕过USTC的浏览器JS验证
---
# 前言
当我们去下载类似于 https://mirrors.ustc.edu.cn/debian-cd/12.10.0/amd64/iso-dvd/debian-12.10.0-amd64-DVD-1.iso 这样的大文件时USTC大概率会给你一个这样的正在验证你的浏览器 的页面
![](https://r2.072103.xyz/myblog/img/58e8e41a-0755-4e6a-ab1e-a9dbaa1042d5.webp)
如果你正在使用一个浏览器比如Chrome、FireFox等那过几秒你就能看到文件被成功开始下载
但是如果你正在使用wget等无JS特性的工具下载这类文件你将会被网站服务器拒绝 **ERROR 403: Forbidden.**
```shell
~# wget https://mirrors.ustc.edu.cn/debian-cd/12.10.0/amd64/iso-dvd/debian-12.10.0-amd64-DVD-1.iso
--2025-04-04 14:44:13-- https://mirrors.ustc.edu.cn/debian-cd/12.10.0/amd64/iso-dvd/debian-12.10.0-amd64-DVD-1.iso
Resolving mirrors.ustc.edu.cn (mirrors.ustc.edu.cn)... 2001:da8:d800:95::110, 202.141.176.110
Connecting to mirrors.ustc.edu.cn (mirrors.ustc.edu.cn)|2001:da8:d800:95::110|:443... connected.
HTTP request sent, awaiting response... 403 Forbidden
2025-04-04 14:44:14 ERROR 403: Forbidden.
```
在之前,如果我想要下载这类文件我都会使用浏览器去下载,但是今天我在向我的朋友对这件事发牢骚的时候他跟我说他绕过了
于是我便想深挖一下然后发现其实根本不是什么JS验证
# 分析
让我们首先打开这类链接,然后查询网页源代码
```html
<h1>Verifying your browser</h1>
<p>Additional verification is required for this file you requested.</p>
<p>This page requires JavaScript. Please wait for a few seconds.</p>
<div class="footer">
<p>Your IP address is 2409:8a30:320:6480:1c6e:aab8:b415:c4fa</p>
</div>
<script>
document.cookie = "addr=2409:8a30:320:6480:1c6e:aab8:b415:c4fa; max-age=300";
setTimeout(function () {
location.reload();
}, 2000);
</script>
```
你会发现代码其实非常简洁干练如果你的浏览器支持JavaScript浏览器则会将 `addr=2409:8a30:320:6480:1c6e:aab8:b415:c4fa`这一串内容写入你的Cookie之后等待两秒重载页面然后网站发现你携带了这个Cookie就会让你成功下载了。反之如果你的浏览器不支持JavaScript就会触发403导致无法下载
那么这个`addr=2409:8a30:320:6480:1c6e:aab8:b415:c4fa`到底是什么呢?
我们注意到在网页上还显示了一句:`Your IP address is 2409:8a30:320:6480:1c6e:aab8:b415:c4fa`那么显然网站正是通过你能不能通过JS把你的IP写入你的Cookie来验证你的浏览器的
那么换一个思路去想我是不是只要携带了这个Cookie就能绕过JS验证呢
让我们来试一试
# 实战
首先我们使用默认的wget。403
```shell
root@AcoFork-NAS:~# wget https://mirrors.ustc.edu.cn/debian-cd/12.10.0/amd64/iso-dvd/debian-12.10.0-amd64-DVD-1.iso
--2025-04-04 14:55:00-- https://mirrors.ustc.edu.cn/debian-cd/12.10.0/amd64/iso-dvd/debian-12.10.0-amd64-DVD-1.iso
Resolving mirrors.ustc.edu.cn (mirrors.ustc.edu.cn)... 2001:da8:d800:95::110, 202.141.176.110
Connecting to mirrors.ustc.edu.cn (mirrors.ustc.edu.cn)|2001:da8:d800:95::110|:443... connected.
HTTP request sent, awaiting response... 403 Forbidden
2025-04-04 14:55:00 ERROR 403: Forbidden.
```
然后让我们携带上Cookie但是首先我们要获得网站获取到的我们的访问IP。
这很简单我们先用curl得到网页源码。可以看到网页得到的我们的访问IP为`2409:8a30:320:6480::458`
```html
root@AcoFork-NAS:~# curl https://mirrors.ustc.edu.cn/dbian-cd/12.10.0/amd64/iso-dvd/debian-12.10.0-amd64-DVD-1.iso <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>403 Forbidden</title>
<style>
这里是无关紧要的CSS省略
</style>
</head>
<body>
<h1>403 Forbidden</h1>
<p>USTC Mirrors has denied your access due to one of the following reasons:</p>
<p>1. This directory is not intended for web browsing.</p>
<p>2. Your computer or network has exhibited suspicious activity.</p>
<p>If you have any question, email us at lug (AT) ustc.edu.cn with your IP address.</p>
<div class="footer">
<p>Your IP address is 2409:8a30:320:6480::458</p>
</div>
</body>
</html>
```
接下来让我们携带Cookie`addr=2409:8a30:320:6480::458`再次尝试wget。可惜仍然报错思考了一下我们可能需要伪造一下UA
```shell
root@AcoFork-NAS:~# wget --header="Cookie: addr=2409:8a30:320:6480::458" \
https://mirrors.ustc.edu.cn/debian-cd/12.10.0/amd64/iso-dvd/debian-12.10.0-amd64-DVD-1.iso
--2025-04-04 14:57:58-- https://mirrors.ustc.edu.cn/debian-cd/12.10.0/amd64/iso-dvd/debian-12.10.0-amd64-DVD-1.iso
Resolving mirrors.ustc.edu.cn (mirrors.ustc.edu.cn)... 2001:da8:d800:95::110, 202.141.176.110
Connecting to mirrors.ustc.edu.cn (mirrors.ustc.edu.cn)|2001:da8:d800:95::110|:443... connected.
HTTP request sent, awaiting response... 403 Forbidden
2025-04-04 14:57:58 ERROR 403: Forbidden.
```
那么接下来我们携带必要的Cookie再去伪造一个Chrome浏览器的UA。可见已经成功下载
```shell
root@AcoFork-NAS:~# wget --header="Cookie: addr=2409:8a30:320:6480::458" \
--user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0" \
"https://mirrors.ustc.edu.cn/debian-cd/12.10.0/amd64/iso-dvd/debian-12.10.0-amd64-DVD-1.iso"
--2025-04-04 14:59:24-- https://mirrors.ustc.edu.cn/debian-cd/12.10.0/amd64/iso-dvd/debian-12.10.0-amd64-DVD-1.iso
Resolving mirrors.ustc.edu.cn (mirrors.ustc.edu.cn)... 2001:da8:d800:95::110, 202.141.176.110
Connecting to mirrors.ustc.edu.cn (mirrors.ustc.edu.cn)|2001:da8:d800:95::110|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3994091520 (3.7G) [application/octet-stream]
Saving to: debian-12.10.0-amd64-DVD-1.iso.2
debian-12.10.0-amd64-DVD-1.iso.2- 5%[> ] 207.26M 72.9MB/s
```
#

View File

@@ -0,0 +1,82 @@
---
category: 教程
description: 使用SaaS双域名来让你的网站解析的IP进行分流优选提高网站可用性和速度
draft: false
image: https://r2.072103.xyz/fuwari-blog/img/QmePpCr1YsDEBjm5f4TWc5FiEJtQp9ppzHqAuMTvvzEmyz.webp
lang: ''
published: 2024-10-14
tags:
- Cloudflare SaaS
title: 试试Cloudflare IP优选让Cloudflare在国内再也不是减速器
---
#### 未优选
![QmZoinxZgAzu7Skh7BqsxmDQGU1sXtLLskJcyQuRAQNKww.webp](https://r2.072103.xyz/fuwari-blog/img/098f9ee71ae62603022e542878673e19bdcaf196.webp)
#### 已优选
![QmaNVwAwSRvqdL5SrvWVCGCQqmacP3d62yoLxofGscNoKq.webp](https://r2.072103.xyz/fuwari-blog/img/e98ce10d846475aaec5cf73546d9b5caffefc4c0.webp)
---
结论可见优选过的网站响应速度有很大提升并且出口IP也变多了。这能让你的网站可用性大大提高并且加载速度显著变快。
**优选节点使用:[cloudflare.182682.xyz](https://cloudflare.182682.xyz)**
# 针对于A、AAAA、CNAME
> 我们需要**两个域名**比如onani.cn和acofork.cn
这里我们让onani.cn成为主力域名让acofork.cn成为辅助域名
---
1. 首先新建一个DNS解析指向你的**源站****开启cf代理**
![QmfBKgDe77SpkUpjGdmsxqwU2UabvrDAw4c3bgFiWkZCna.webp](https://r2.072103.xyz/fuwari-blog/img/c94c34ee262fb51fb5697226ae0df2d804bf76fe.webp)
2. 前往 SSL/TLS -> 自定义主机名。设置回退源为你刚才的DNS解析的域名xlog.acofork.cn添加自定义主机名为你最终想让用户访问的域名onani.cn并且按照指示在主力域名onani.cn添加TXT所有权验证和TXT证书验证直到证书状态和主机名状态都变为有效
![QmRYrwjeDMDQCj8G9RYkpjC3X4vpwE77wpNpbqKURwBber.webp](https://r2.072103.xyz/fuwari-blog/img/f6170f009c43f7c6bee4c2d29e2db7498fa1d0dc.webp)
3. 继续在你的辅助域名添加一条解析。CNAME到优选节点cloudflare.182682.xyz**不开启cf代理**
![QmNwkMqDEkCGMu5jsgE6fj6qpupiqMrqqQtWeAmAJNJbC4.webp](https://r2.072103.xyz/fuwari-blog/img/4f9f727b0490e0b33d360a2363c1026003060b29.webp)
4. 最后在你的主力域名添加解析。域名为之前在辅助域名的自定义主机名onani.cn目标为刚才的cdn.acofork.cn**不开启cf代理**
![QmeK3AZghae4J4LcJdbPMxBcmoNEeF3hXNBmtJaDki8HYt.webp](https://r2.072103.xyz/fuwari-blog/img/6f51cb2a42140a9bf364f88a5715291be616a254.webp)
5. 优选完毕,尝试访问
6. 可选你也可以将cdn子域的NS服务器更改为阿里云\华为云\腾讯云云解析做线路分流解析
> 优选工作流:用户访问 -> 由于最终访问的域名设置了CNAME解析所以实际上访问了cdn.acofork.cn并且携带 **源主机名onani.cn** -> 到达cloudflare.182682.xyz进行优选 -> 优选结束cf边缘节点识别到了携带的 **源主机名onani.cn** 查询发现了回退源 -> 回退到回退源内容xlog.acofork.cn -> 访问成功
# 针对于Cloudflare Page
1. 你可以直接将你绑定到Page的子域名直接更改NS服务器到阿里云\华为云\腾讯云云解析做线路分流解析
# 针对于Cloudflare Workers
1. 在Workers中添加路由然后直接将你的路由域名从指向`xxx.worker.dev`改为`cloudflare.182682.xyz`等优选域名即可
---
### 疑难解答
1. Q如果我的源站使用Cloudflare Tunnels
A需要在Tunnels添加两个规则一个指向你的辅助域名一个指向最终访问的域名。然后删除最终访问域名的DNS解析**但是不要直接在Tunnels删会掉白名单导致用户访问404**)。然后跳过第一步
> 原理假设你已经配置完毕但是Cloudflare Tunnels只设置了一个规则。
> 分类讨论,假如你设置的规则仅指向辅助域名,那么在优选的工作流中:用户访问 -> 由于最终访问的域名设置了CNAME解析所以实际上访问了cdn.acofork.cn并且携带 **源主机名onani.cn** -> 到达cloudflare.182682.xyz进行优选 -> 优选结束cf边缘节点识别到了携带的 **源主机名onani.cn** 查询发现了回退源 -> 回退源检测 **源主机名onani.cn**不在白名单 -> 报错 404 Not Found。访问失败
> 分类讨论,假如你设置的规则仅指向最终访问的域名,那么在优选的工作流中:用户访问 -> 由于最终访问的域名设置了CNAME解析所以实际上访问了cdn.acofork.cn -> 由于cdn.acofork.cn不在Tunnels白名单则访问失败
---
3. Q如果我的源站使用了Cloudflare Origin Rule端口回源
A需要将规则的生效主机名改为最终访问的域名否则不触发回源策略会导致辅助域名无法访问建议使用Cloudflare Tunnels
> 原理假设你已经配置完毕但是Cloudflare Origin Rule端口回源规则的生效主机名为辅助域名
> 那么在优选的工作流中:用户访问 -> 由于最终访问的域名设置了CNAME解析所以实际上访问了cdn.acofork.cn并且携带 **源主机名onani.cn** -> 到达cloudflare.182682.xyz进行优选 -> 优选结束cf边缘节点识别到了携带的 **源主机名onani.cn** 查询发现了回退源 -> 回退到回退源内容xlog.acofork.cn-> 但是由于**源主机名onani.cn**不在Cloudflare Origin Rule端口回源的规则中 -> 无法触发回源策略,访问失败
4. Q如果我的源站使用serv00
A需要在WWW Web Site界面添加两个规则一个指向你的辅助域名一个指向最终访问的域名。
> 原理假设你已经配置完毕但是serv00仅配置其中一个域名
> 那么在优选的工作流中会导致访问错误serv00将会拦截不在白名单的域名请求

View File

@@ -0,0 +1,221 @@
---
category: 教程
description: 使用R2存储图片通过Workers连接最后使用a标签或img标签在网页中嵌入展示全链路上云
draft: false
image: https://r2.072103.xyz/fuwari-blog/img/QmVgqgoC7G8NLS21WvR8j9gf5amu33XvuV68ZrgM5B9iFf.webp
lang: ''
published: 2025-03-05
tags:
- Cloudflare R2
- Cloudflare Workers
title: Cloudflare R2+Workers马上搭建自己的云上图床
---
### **结果图**
![QmVgqgoC7G8NLS21WvR8j9gf5amu33XvuV68ZrgM5B9iFf.webp](https://r2.072103.xyz/fuwari-blog/img/408795f3ec1a5a9baf91b6cd7564d6f1d7dbc5bd.webp)
### **原理**
图源由 Cloudflare R2 托管,通过两个 Workers 连接 R2 以展示随机横屏/竖屏图片,静态页面引用 Workers 的 URL 以实现以上界面
### **创建 Cloudflare R2 存储桶**
R2 实际上是一个对象存储。Cloudflare 提供 10G 的免费存储和每月 1000 万次的免费访问
1. 进入[Cloudflare 仪表盘](https://dash.cloudflare.com/),进入 R2 页面,如图
![QmU7u2JHUcevyHnwsCdAZfs7X7Fcdh3KJhn6eoy24Q5dGC.webp](https://r2.072103.xyz/fuwari-blog/img/0ffb86d36ab0f3fcc24ef7b3d64c4bc72b6b53e7.webp)
2. 选择创建存储桶![QmX3eCaCVEgE8AN29D9t2VpQ5t5SrZGKb8EcZv9oKpCqf2.webp](https://r2.072103.xyz/fuwari-blog/img/26d3b3e26b9e2f641a2eea98c2ddb8891a0b7f6a.webp)
3. 为你的存储桶起一个名字,然后单击创建![QmVad5eoJCLpSNZ4HCvTPJfD8rpg4aePMzZ7j2DZATn1XD.webp](https://r2.072103.xyz/fuwari-blog/img/7fa96a023d7969ab168d467ab6d05646e5241884.webp)
4. 进入如下页面就已经创建完毕了![QmSdzwBJpw2L4a8LJ3eM3VMJs3d5oV5iFCxCMtv69VZmYH.webp](https://r2.072103.xyz/fuwari-blog/img/719f2dfe59c73fa820ffc6cc2d9749ca14b9bece.webp)
5. 返回 R2 首页。因为在下文我们需要使用 API 来进行文件传输,所以需要创建你的 R2 API 令牌,单击管理 R2 API 令牌![QmbS8zjJTESwsmycKBSC9kmabAA9dtSCUX8nbUDWg4BWRX.webp](https://r2.072103.xyz/fuwari-blog/img/9b1a338acae642ce7ce71dd41454903b1cfeafd0.webp)
6. 单击创建 API 令牌,如图![QmPzJEHVAm4z3S1SHY4k99TugrPyTB9DXpyRR8Loj22bz3.webp](https://r2.072103.xyz/fuwari-blog/img/9512f23e08a60948e721848118f5eb096449909b.webp)
7. 因为我们需要该 API 来管理单个 R2 存储桶,所以选择**对象读和写**,详细配置如图![QmNY9p8hksi18B9R8TVfdGgu336oQ3cPmghyfYXE9CDGD4.webp](https://r2.072103.xyz/fuwari-blog/img/0361e2b00351559eaebb18f3e6bb15a94b8578e9.webp)
8. 创建 API 令牌后,新页面会展示令牌的详细信息,**仅会展示一次!!!** 保持这个页面,直到你将该页面的所有信息都已经妥善保存,不要关闭界面,否则,你需要轮转 API 令牌以禁用之前的旧密钥,如图![QmZTUwbycqbJhVP6PatD3psYy7ej9PDDoiXbmDWoakPhwx.webp](https://r2.072103.xyz/fuwari-blog/img/f4214f6fdf67fa7bf694d0a1501ecc21aef45a90.webp)
9. 确保你已经妥善保存你的 R2 API 令牌,然后进行下一步
### **为你的存储桶添加文件**
因为 Web 界面传输文件较慢且不支持传输大于 300MB 的文件。这里使用本地部署 AList 然后连接你的 R2 存储桶实现高速上传
1. 笔者使用 Windows。前往[AList - Github Release](https://github.com/alist-org/alist/releases)下载适用于 Windows 的最新可执行文件,如图![QmPDRDJGeGStreyZMXVYofbE9FCs1T1MyDek3KUbB3Kk5b.webp](https://r2.072103.xyz/fuwari-blog/img/a2d1f289e464a9fb6367e2b7ff0b695916742698.webp)
2. 将下载的压缩包解压,并将其中的`alist.exe`放入一个空文件夹
3. 单击搜索框,输入 cmd 并回车,如图
4. ![QmSt8aFtaeEprJHASEiNPB67UHcHoSxsbhhHUPxW6QkWSo.webp](https://r2.072103.xyz/fuwari-blog/img/3abdda195c58812866d49879c683a044e8acf7f8.webp)
![QmNkMhDhpPLkYCpVhE1ov7Q6A34uWDvraCqNvuTqaCkujT.webp](https://r2.072103.xyz/fuwari-blog/img/f90fccfe1db62aff7a0a722cd3c5c319da563ae2.webp)
在 cmd 中输入`alist.exe server`并且不要关闭窗口,运行成功后如图![QmdzyY8xbic8jdnZEXegefoZPeizqHa4ZkdMnRKoguBMkf.webp](https://r2.072103.xyz/fuwari-blog/img/2c0ec8fb4de7f2a9a1b8107e3506cb5a8d7d7eff.webp)
5. 打开浏览器,输入`localhost:5244`即可进入 AList 控制台,如图![QmUBFKu7mCiRneCrsTNPxTH6S4gxwtXf9cwLzf4dKW9LLR.webp](https://r2.072103.xyz/fuwari-blog/img/867fe02a124c886777d4ba64f6d1e4498c686709.webp)
6. 用户名:`admin`密码:`在cmd窗口中如图`。你可以使用鼠标左键在终端中框选内容然后单击鼠标右键进行复制操作![QmVH3qZYo3QE6anNHymwkikq5MSeJphrZNR7RCH5jpP3wn.webp](https://r2.072103.xyz/fuwari-blog/img/8cedc3475cd8358507587de8a6b2a91980fe9af4.webp)
7. 注意,在 cmd 中,鼠标左键点击或拖动 cmd 的终端界面会导致进入选择状态,程序将会被系统阻塞,**需要在终端界面点按鼠标右键解除**。若进程被阻塞cmd 的进程名会多一个**选择**,请注意。如图是程序被阻塞的例子,**在终端界面点按鼠标右键即可解除**
![QmapESiqSEvbYq3AJs15yYvhemRxSHrJaccjTFr99muX6Z.webp](https://r2.072103.xyz/fuwari-blog/img/afb945ff610c0463ee0db97f52bc42a865b00603.webp)
8. 现在,你已经成功以管理员身份登入了 AList单击最下面的**管理**![QmfNE53GThdjVrh4q64MJcZqwcGPD7UtcYTNw9bVBaSEaF.webp](https://r2.072103.xyz/fuwari-blog/img/eb0c3753205f42133445dfcee5f1291debd6c649.webp)
9. 你会进入到如图界面。尽管 AList 运行在本地,也建议更改你的用户名和密码![QmNdD8UU8fkVDBz5dXdJhCF2fZg8P1FwrcMaaTsG6a7ENy.webp](https://r2.072103.xyz/fuwari-blog/img/3bde577194580e4d17aa457231360733175e2b0d.webp)
10. 更改账密,重新以新账密登录![Qmas7pMiPR2FNTXheBT1xGNUpzDiSzv7J7yd6oCuT17yad.webp](https://r2.072103.xyz/fuwari-blog/img/a5ba3b6cc73002f3e96b6aab8c4e252f697802da.webp)
11. 进入控制台,然后单击存储,如图![QmS4gGyCM1j3RXgHEPuZ1zTbLAvGtVBEiPXJe9QMF3dD2D.webp](https://r2.072103.xyz/fuwari-blog/img/bb8fc961e43dffa99994c0d0e703ba98fc01b85a.webp)
12. 选择添加,如图![QmRDVxt8WbrVkHavgFNXj3qC86ysw6sSZhPy3Uf2ixKp2E.webp](https://r2.072103.xyz/fuwari-blog/img/2807d1dbc07fed008c8177cd3b2b89bfd03cc8be.webp)
13. 详细配置如图。挂载路径即 AList 展示路径,推荐使用`/R2/你的存储桶名字`,地区为`auto`![](https://r2.072103.xyz/fuwari-blog/img/2024-10-16-11-37-53-image.webp)回到主页,如图![QmSnR9Ptrssx4nqk9qCvhFUNKQyQqJiN7GRscwoj4Dczgj.webp](https://r2.072103.xyz/fuwari-blog/img/65265d29e91f146ecbe3d92218eb9af49eac1c8b.webp)
14. 尝试上传文件,如图![QmPqFsmZNNnh4jNyLS7X3h8Zr6ZCVqTqGVwTxmPDdbmrGW.webp](https://r2.072103.xyz/fuwari-blog/img/061c995a66c34ebc341f692d4eb82d5657d791d6.webp)
15. 可以看到,速度非常快![QmXfGK6aZjz741GrY8RfFfKMkUzDMB3xhx93PGZ9S1QycT.webp](https://r2.072103.xyz/fuwari-blog/img/51d0a617cbda108ce6c12fb25f71fb5223a0cddb.webp)
16. 为你的图床创建目录以分类横屏和竖屏图等,以便下文使用 Workers 连接 R2 来调用。后文我将使用R2的`/ri/h` 路径作为横屏随机图目录、`/ri/v` 路径作为竖屏随机图目录
![QmNdD8UU8fkVDBz5dXdJhCF2fZg8P1FwrcMaaTsG6a7ENy.webp](https://r2.072103.xyz/fuwari-blog/img/3bde577194580e4d17aa457231360733175e2b0d.webp)
### **创建 Workers连接 R2**
1. 进入[Cloudflare 仪表盘](https://dash.cloudflare.com/),进入 Workers 和 Pages 页面,如图![QmW5UaUap8T2R37u5dzmKGLmUgk4qKnSMFwHBVHqvVbkVA.webp](https://r2.072103.xyz/fuwari-blog/img/49ccd51771082fdc94eecb270caf987d257cd987.webp)
2. 单击创建,选择创建 Workers名称自取单击部署![QmVvLv5n41QQfDfYiVWYRpsfw7TVNGy1BYuv5e8vBRhKLA.webp](https://r2.072103.xyz/fuwari-blog/img/95102dd09752a103d8022b1f281538e729b7a448.webp)
3. 选择编辑代码![QmTbRifzXQ593DGyjFQMbA9exyNp2iAeAg4zbVrfFimQc4.webp](https://r2.072103.xyz/fuwari-blog/img/fa78af856b3ff3798c77a55be15b2644dec944c1.webp)
4. 粘贴代码(创建随机横屏图):
新代码:
```
export default {
async fetch(request, env, ctx) {
const bucket = env.MY_BUCKET;
const url = new URL(request.url);
const hostname = url.hostname;
// 初始化prefix
let prefix = '';
// 根据域名判断prefix
if (hostname === 'hrandom-pic.onani.cn' || hostname === 'api-hrandom-pic.onani.cn') {
prefix = 'ri/h/';
} else if (hostname === 'vrandom-pic.onani.cn' || hostname === 'api-vrandom-pic.onani.cn') {
prefix = 'ri/v/';
} else {
return new Response('Invalid domain', { status: 400 });
}
try {
// 如果是API域名只返回数量
if (hostname.startsWith('api-')) {
const objects = await bucket.list({ prefix: prefix });
const count = objects.objects.length;
const headers = new Headers({
'Access-Control-Allow-Origin': '*',
'Content-Type': 'text/plain'
});
return new Response(count.toString(), { headers });
}
// 原有的随机图片逻辑
const objects = await bucket.list({ prefix: prefix });
const items = objects.objects;
if (items.length === 0) {
return new Response('No images found', { status: 404 });
}
const randomItem = items[Math.floor(Math.random() * items.length)];
const object = await bucket.get(randomItem.key);
if (!object) {
return new Response('Image not found', { status: 404 });
}
const headers = new Headers();
headers.set('Content-Type', object.httpMetadata.contentType || 'image/jpeg');
return new Response(object.body, { headers });
} catch (error) {
console.error('Error:', error);
return new Response('Internal Server Error', { status: 500 });
}
},
};
```
旧代码:
```
export default {
async fetch(request, env, ctx) {
// R2 bucket 配置
const bucket = env.MY_BUCKET;
try {
// 列出 /ri/h 目录下的所有对象
const objects = await bucket.list({ prefix: 'ri/h/' });
// 从列表中随机选择一个对象
const items = objects.objects;
if (items.length === 0) {
return new Response('No images found', { status: 404 });
}
const randomItem = items[Math.floor(Math.random() * items.length)];
// 获取选中对象
const object = await bucket.get(randomItem.key);
if (!object) {
return new Response('Image not found', { status: 404 });
}
// 设置适当的 Content-Type
const headers = new Headers();
headers.set('Content-Type', object.httpMetadata.contentType || 'image/jpeg');
// 返回图片内容
return new Response(object.body, { headers });
} catch (error) {
console.error('Error:', error);
return new Response('Internal Server Error', { status: 500 });
}
},
};
```
5. 点击左侧的文件图标![QmQGQTiTXSESU2TSJ6tc3KrzWU4KABKqn6QZ1GdWqKnWmc.webp](https://r2.072103.xyz/fuwari-blog/img/b02f29fbafb44ad36a0fa770d013069a374394a8.webp)
6.`wrangler.toml`中填入:
```
[[r2_buckets]]
binding = "MY_BUCKET"
bucket_name = "114514"
```
7. 保存修改,点击右上角的部署![QmP7hXdtenrJrzJRRePHQATGtyAsZEr5MkMsboXvmNUxTx.webp](https://r2.072103.xyz/fuwari-blog/img/6751c7b5122b938e01087d1bed629fcad1182a10.webp)
8. 在设置 - 变量找到 R2 存储桶绑定,添加你的存储桶,变量名即上文的`MY_BUCKET`![QmStitSyATnA8sY9tTgZaXXqmqkGPUtZmMxn9KjbFQzgTc.webp](https://r2.072103.xyz/fuwari-blog/img/572f1c9946b5b6de5350c708e579d9887949b6e9.webp)
9. 在设置 - 触发器添加你的自定义域名以便访问![QmUMxtkCiKsgFw8afRUGREFztXE9D5W6FmCbAUB7DaVH5o.webp](https://r2.072103.xyz/fuwari-blog/img/706b3acbb372307713e38c96fc867f4e96234fd7.webp)
![QmPF9iCoq6n8Jj2Z6kPkdJSCm45VJystZoYcir55yceCQo.webp](https://r2.072103.xyz/fuwari-blog/img/1a6fa505881591a294f0b4ef4a1940e40fe57ab9.webp)
10. 访问效果,每次刷新都不一样![QmQgEdjXxF9oph2jYKzFMJToX9WfG11jUmPiNJnjhYVN4N.webp](https://r2.072103.xyz/fuwari-blog/img/0ba1efee8174e0d3db761bbd613a7b94b9738cee.webp)
### **通过使用 HTML 的 `<img>` 标签引用即可达到开头的效果**
如:`<img src="你的域名" alt="">`
<img title="" src="https://hrandom-pic.onani.cn" alt="loading-ag-4760">

View File

@@ -1,22 +0,0 @@
---
title: Draft Example
published: 2022-07-01
tags: [Markdown, Blogging, Demo]
category: Examples
draft: true
---
# This Article is a Draft
This article is currently in a draft state and is not published. Therefore, it will not be visible to the general audience. The content is still a work in progress and may require further editing and review.
When the article is ready for publication, you can update the "draft" field to "false" in the Frontmatter:
```markdown
---
title: Draft Example
published: 2024-01-11T04:40:26.381Z
tags: [Markdown, Blogging, Demo]
category: Examples
draft: false
---

51
src/content/posts/fnos.md Normal file
View File

@@ -0,0 +1,51 @@
---
category: 体验
description: 飞牛NAS系统是一个现代的开源的NAS系统。影视刮削在国内属于TOP1并且刚需的Docker软件也功能全面易用博主本人也在使用
draft: false
image: https://r2.072103.xyz/fuwari-blog/img/QmUBuX9qmsNP1NHeEeUmuPNdS5ctvk4LchcSsFARDC4vZJ.webp
lang: ''
published: 2024-10-14
tags:
- 飞牛NAS
title: 飞牛NAS玩机体验
---
### 吸引我的东西
1. 影视刮削飞快薄纱Plex几条街。通过[AutoBangumi](/autobangumi)可以完美自动追番+刮削一条龙服务。偶尔会有不准,但可以手动匹配,数据源来自[TMDB](https://www.themoviedb.org/)和[IMDB](https://www.imdb.com/)
![QmbNXd4FJ8FM8mwkKxJNdBoNbvhawJ2HdSvW5tFUt3o4ub.webp](https://r2.072103.xyz/fuwari-blog/img/f1bd7089efdf00097d5474ef967a62dcfca42e98.webp)
2. 相册可以通过手机APP自动备份支持仅备份图片可以多用户使用存储互不干扰也可以设置要共享的图片
![QmeLJ7in4xcokPWUgkkSobDLUTrFrXep2o38qUXQ1njQR9.webp](https://r2.072103.xyz/fuwari-blog/img/2f9981f8397cc1278807ed28f8a2e15954868fec.webp)
### 注意事项
1. 飞牛NAS在安装的时候会叫你选择安装盘然后会将安装盘的一部分空间默认为64GB作为系统分区其余空间可用于创建存储空间但是系统盘不能和别的盘组存储池只能单独建存储池
![QmNfRbvHu1fuYoincACcP2MG4yV4pgRni3rb4Y9J7uw4FW.webp](https://r2.072103.xyz/fuwari-blog/img/6403ef19d941abdc93d8c7da01364a8983c98109.webp)
2. 应用商店安装的软件需要先授予目录访问权限应用才能读取目录无论是原生还是Docker应用
![QmP4unAVra1zy7gkjEzSCYEDAJMMe1BVWPKoVyjYv8b9Ho.webp](https://r2.072103.xyz/fuwari-blog/img/79af3b25d8b677b2718c953c0d431ead2f137e1d.webp)
3. 发行版为Debian 12。根目录为系统分区的空间/vol1 为存储空间1的空间 /vol2 为存储空间2的空间。推荐使用[RaiDrive](https://onani.cn/RaiDrive)或[SSHFS](/SSHFS)挂载Linux目录到Windows
![QmWMQHNpJUUPg9B1Hdw2zmwLx9q6bcS52nUFiB3P9iYvU9.webp](https://r2.072103.xyz/fuwari-blog/img/d4ec6f87893f4af5d7eedb2e2a19a784fd6c6f92.webp)
4. SSH需要自己开账密为NAS管理员账密建议登上之后改为仅密钥登录参见[设置 SSH 通过密钥登录](https://www.runoob.com/w3cnote/set-ssh-login-key.html)
![QmTk3va2NCbYTcVewVjuqjGx6MwMwiUnManrNwxvEq4SBR.webp](https://r2.072103.xyz/fuwari-blog/img/9f92130465ab62e912b7404266febc7212e2125b.webp)
5. 各网卡测试
| 名称 | 类型 | 品牌 | 是否免驱 |
|:--------------------------:|:---:|:-----------:|:----------:|
| Realtek GBE Family r8168 | 有线 | Realtek瑞昱 | 否,需要自行安装驱动 |
| Realtek 8852BE | 无线 | Realtek瑞昱 | 否,需要自行安装驱动 |
| Intel AC3160 | 无线 | Intel英特尔 | 是 |
| USB有线网卡 | 有线 | Realtek瑞昱 | 是 |
6. 各存储模式区别
| 模式 | 作用 | 是否能扩容 | 是否能换盘 | 容灾 | 是否能热备 | 是否能修改存储模式 |
|:------:|:------------------------------------:|:-----:|:-----:|:---:|:-----:|:---------:|
| Basic | 将物理硬盘的一部分或者全部作为一个存储池,不可扩容,仅能单盘创建这个模式 | 否 | 否 | 无 | 否 | 是可转为RAID |
| Linear | 将一个或多个物理硬盘的一部分或者全部作为一个存储池,可扩容 | 是 | 否 | 无 | 否 | 否 |
| RAID类 | 自行使用搜索引擎搜索,更详细 | 未测试 | 未测试 | 未测试 | 未测试 | 未测试 |
7. NAS迅雷内测码迅雷牛通

260
src/content/posts/fuwari.md Normal file
View File

@@ -0,0 +1,260 @@
---
category: 教程
description: Fuwari是一个静态博客框架Cloudflare Pages是一个托管静态网站的服务将他俩结合即可得到一个快速安全无需托管的高效博客
draft: false
image: https://r2.072103.xyz/fuwari-blog/img/2024-10-15-09-04-45-image.webp
lang: ''
published: 2024-10-14
tags:
- Fuwari
- Cloudflare Pages
title: Fuwari静态博客搭建教程
---
### 你需要准备的东西
1. 一个牛逼的脑子支持并行运算至少两个单位以上的事件。遇到问题先思考想不通就搜索搜索不到就去和AI调情不要上来就问问问
2. [Git - Downloads (git-scm.com)](https://git-scm.com/downloads)最牛逼的版本控制器这里用于对Github进行操作当然你也可以尝试使用[GitHub Desktop | Simple collaboration from your desktop](https://github.com/apps/desktop)但就我而言,这玩意更难用
3. [Node.js — Run JavaScript Everywhere (nodejs.org)](https://nodejs.org/en)Fuwari基于Node.js你需要安装这个来搭建博客
4. 一个[Github](https://github.com)账号用于创建一个代码仓库存放Fuwari文件
5. 一个[Cloudflare](https://cloudflare.com)账号用于创建一个Pages并且绑定域名支持访问
6. [MarkText](https://www.marktext.cc)这是一个可视化MarkDown编辑器因为Fuwari的每一篇文章/页面都是MarkDown所以需要一个好用的编辑器
7. 你得会用MarkDown语法来编写文章如果你不会可以参见[Markdown 基本语法 | Markdown 官方教程](https://markdown.com.cn/basic-syntax/)
### 流程图
本地部署Fuwari编写文章 -> 推送更改到远程Github仓库 -> Cloudflare Pages检测到仓库更新自动构建新的网站静态文件 -> 网站成功更改
### 让我们开搞吧!
#### 首先我们来本地部署Fuwari
1. Fork仓库
[https://github.com/saicaca/fuwari](https://github.com/saicaca/fuwari)
2. 避免有小废物不会Fork仓库这里附上图片教程
3. ![](https://r2.072103.xyz/fuwari-blog/img/2024-10-14-12-15-44-image.webp)![](https://r2.072103.xyz/fuwari-blog/img/2024-10-14-12-17-03-image.webp)
4. 然后将仓库克隆到本地:`git clone <你的仓库URL>`推荐使用SSH可以不用魔法来推送更改
5. 首先全局安装pnpm`npm install -g pnpm`如果npm国内拉取过慢请尝试cnpm[npmmirror 镜像站](https://npmmirror.com/)
6. 然后在项目根目录安装依赖:`pnpm install``pnpm add sharp`
7. 至此你成功在本地部署了Fuwari
> [!TIP]
>
> 你也可以使用创建一个新的空仓库然后手动上传文件并且可以将仓库可见性设为Private
#### 改写Fuwari的基本信息并且清理多余文件
> 刚创建的Fuwari可能带有一些示例的博主名ICONURL介绍和示例文章为了让用户知道这是你的博客我们需要一一改写
1. 在根目录下的 `src` 文件夹中,你可以找到 `config.ts` 我们来开始改写
- title你的博客主标题
- subtitle你的博客副标题。可选在首页会显示为“主标题 - 副标题”
- lang博客显示语言。注释已经列出了一些常用的值en, zh_CN, zh_TW, ja, ko
- themeColorhue值则是你的博客主题色可以在你的博客右上角的画板图标确定喜欢的颜色再填写![](https://r2.072103.xyz/fuwari-blog/img/2024-10-15-09-16-30-image.webp)
- bannersrc即banner图片支持http/https URL
- faviconsrc即网站图标支持http/https URL
- links即友情链接这些链接在导航栏上
- avatar即你的头像
- name即你的名字
- bio即个性签名会显示在头像和名字下面
- `NavBarConfig` 为导航栏设置的超链接。`ProfileConfig` 为你的用户的超链接,分别如图![](https://r2.072103.xyz/fuwari-blog/img/2024-10-15-17-49-30-image.webp)
- icon你需要前往[Font Awesome](https://fontawesome.com/search)去搜索你想要的图标比如QQ则填写 `fa6-brands:qq` 如图。Fuwari支持这几种类型`fa6-brands`, `fa6-regular`, `fa6-solid`, `material-symbols`![](https://r2.072103.xyz/fuwari-blog/img/2024-10-15-17-47-10-image.webp)
- 这里我附上我的 `config.ts`
- ```ts
import type {
LicenseConfig,
NavBarConfig,
ProfileConfig,
SiteConfig,
} from './types/config'
import { LinkPreset } from './types/config'
export const siteConfig: SiteConfig = {
title: '二叉树树的博客',
subtitle: '爱你所爱!',
lang: 'zh_CN', // 'en', 'zh_CN', 'zh_TW', 'ja', 'ko'
themeColor: {
hue: 355, // Default hue for the theme color, from 0 to 360. e.g. red: 0, teal: 200, cyan: 250, pink: 345
fixed: false, // Hide the theme color picker for visitors
},
banner: {
enable: true,
src: 'assets/images/222.webp', // Relative to the /src directory. Relative to the /public directory if it starts with '/'
position: 'center', // Equivalent to object-position, only supports 'top', 'center', 'bottom'. 'center' by default
credit: {
enable: false, // Display the credit text of the banner image
text: '', // Credit text to be displayed
url: '' // (Optional) URL link to the original artwork or artist's page
}
},
favicon: [ // Leave this array empty to use the default favicon
{
src: 'https://q2.qlogo.cn/headimg_dl?dst_uin=2973517380&spec=5', // Path of the favicon, relative to the /public directory
//theme: 'light', // (Optional) Either 'light' or 'dark', set only if you have different favicons for light and dark mode
sizes: '128x128', // (Optional) Size of the favicon, set only if you have favicons of different sizes
}
]
}
export const navBarConfig: NavBarConfig = {
links: [
LinkPreset.Home,
LinkPreset.Archive,
LinkPreset.About,
{
name: '随机图',
url: 'https://pic.onani.cn', // Internal links should not include the base path, as it is automatically added
external: true, // Show an external link icon and will open in a new tab
},
{
name: 'GitHub',
url: 'https://github.com/saicaca/fuwari', // Internal links should not include the base path, as it is automatically added
external: true, // Show an external link icon and will open in a new tab
},
],
}
export const profileConfig: ProfileConfig = {
avatar: 'assets/images/111.webp', // Relative to the /src directory. Relative to the /public directory if it starts with '/'
name: '二叉树树',
bio: 'Protect What You Love./爱你所爱!',
links: [
// {
// name: 'Twitter',
// icon: 'fa6-brands:twitter', // Visit https://icones.js.org/ for icon codes
// You will need to install the corresponding icon set if it's not already included
// `pnpm add @iconify-json/<icon-set-name>`
// url: 'https://twitter.com',
// },
// {
// name: 'Steam',
// icon: 'fa6-brands:steam',
// url: 'https://store.steampowered.com',
// },
{
name: 'GitHub',
icon: 'fa6-brands:github',
url: 'https://github.com/afoim',
},
{
name: 'QQ',
icon: 'fa6-brands:qq',
url: 'https://qm.qq.com/q/Uy9kmDXHYO',
},
{
name: 'QQ',
icon: 'fa6-solid:envelope',
url: 'mailto:acofork@foxmail.com',
},
],
}
export const licenseConfig: LicenseConfig = {
enable: true,
name: 'CC BY-NC-SA 4.0',
url: 'https://creativecommons.org/licenses/by-nc-sa/4.0/',
}
```
2. 清理多余文件。在根目录下的 `src/content/posts` 文件夹中会有一些示例文章这些文章介绍了一些MarkDown语法和技巧可以让你更快上手Fuwari和fuwari我们可以将其保存到别处
3. 至此,你已经可以开始撰写文章了
#### 让我们开始写作!
1. 首先,在项目根目录执行:`pnpm new-post <这里填写你的文章标题>`
2. 然后,在根目录下的 `src/content/posts` 文件夹中会多出一个 `xxx.md`文件
3. 我们使用MarkText打开这个文件你可以看到一些基本信息我们只需要关注几个重要的信息
4. ```markdown
title: xxx
published: 2024-10-14
description: ''
image: ''
tags: []
categories: ''
draft: false
lang: ''
```
- title文章标题
- published文章创建时间
- description文章描述正常会显示在文章标题下面
- image文章封面图同目录需要写 `./` 如:`./assets/images/2024-10-14-11-33-28-image.webp`
- tag文章标签
- categories文章分类
5. 我们还需要更改根目录下的 `astro.config.mjs` 。在第34行更改 `stie:` 为你的站点URL `site: "https://onani.cn",`
6. 欸有的人就会问了MarkDown固然好但是我要如何处理图片的置入呢
7. 这也很简单多亏了MarkText这款软件我们也可以像编辑Typecho一样直接使用Ctrl+CV来在MarkDown语法中置入图片但是我们需要一些小设置
- 依次点击MarkText软件的左上角的三条杠 -> File -> Perferences -> 左侧的Image分类 -> 如图设置 -> 注意更改第一个选项为Copy开头的选项将Perfer开关打开然后上下两个文本框一个填写绝对路径一个填写相对路径
- ![](https://r2.072103.xyz/fuwari-blog/img/2024-10-14-12-54-21-image.webp)
- 这样,当置入图片时,会往 `assets/images` 文件夹复制一份,然后通过`![1](assets/images/1.webp)`写入MarkDown文件。这样网站就能成功读取到图片啦。而你只需要Ctrl+CV其他操作MarkText都会自动处理
8. 至此你已经会用MarkText编写MarkDown语法的博文了
#### 本地预览然后发布到Github
1. 当你认为你的文章已经写得差不多时,想要看看效果?请到项目根目录执行:`pnpm dev`,稍等片刻,你就可以本地预览你的博客啦![](https://r2.072103.xyz/fuwari-blog/img/2024-10-14-13-03-44-image.webp)
2. 好接下来我们需要使用Git将我们所做的更改发布到Github
- 首先你需要让Git知道你是谁`git config --global user.name "你的Github用户名"`和`git config --global user.email "你的Github邮箱@example.com"`
- 然后更改远程仓库为ssh*如果是通过ssh克隆的不用改`git remote set-url origin git@github.com:xxx/xxx`
- 随后,让我们提交所有文件:`git add .`
- 之后,让我们发布一个本地提交:`git commit -m "项目初始化"`
- 最后,让我们将本地更改提交到远程仓库:`git push`
3. 此时你的Github仓库应该已经有了新的提交![](https://r2.072103.xyz/fuwari-blog/img/2024-10-14-13-10-12-image.webp)
#### 让Cloudflare连接上Github使用Pages服务展示你的博客FREE
1. 前往Cloudflare的 Workers 和 Pages 页面创建一个新Pages![](https://r2.072103.xyz/fuwari-blog/img/2024-10-14-13-14-28-image.webp)
2. 然后选择连接Git存储库连接你的Github随后设置构建命令`pnpm build` ,然后设置构建输出目录:`dist` ,如图![](https://r2.072103.xyz/fuwari-blog/img/2024-10-14-13-16-15-image.webp)
3. 绑定自定义域,访问自定义域即可访问你的博客!![](https://r2.072103.xyz/fuwari-blog/img/2024-10-14-13-17-00-image.webp)
4. 随后,你只需要在本地编写文章,然后[使用Git将更改推送到远程仓库](#本地预览然后发布到github)Cloudflare就会自动部署更新你的博客

View File

@@ -0,0 +1,89 @@
---
category: 教程
description: 使用CF Worker进行Github全站代理并且防止网站被Cloudflare投诉为钓鱼网站。同时这也是一个通用的二次重写反代
draft: false
image: https://r2.072103.xyz/myblog/img/8bb2d8ae-1703-44e8-9f3b-10b46ab69913.webp
lang: ''
published: 2025-04-15
tags: []
title: 使用Cloudflare Worker搭建Github全站代理防钓鱼
---
# 项目原理
针对于Github这样的网站我们无法仅使用一个透明的反向代理指向 `Github.com` 来解决因为Github官网还有许多外域依赖比如 `raw.githubusercontent.com` 所以我们还需要写一个逻辑让Worker重写Github传回的HTML将其中的外域改为我们自己的域同时建立多个解析替代
假如说原来用户访问:
用户 -> github.com -> raw.githubusercontent.com被github.com请求
那么我们的代理就是
用户 -> gh.072103.xyz -> raw-githubusercontent-com.072103.xyz被gh.072103.xyz请求
然后针对于 gh.072103.xyz 的请求由Worker反代到 github.com而针对于 raw-githubusercontent-com.072103.xyz 的请求由Worker反代到 raw.githubusercontent.com
注意!这样去反代主流网站后,不久你的网站就会被标记为(钓鱼站点),因为你原封不动的克隆了人家站点并且 **没有显式屏蔽登录页面**
所以接下来我们需要找到原站点的所有登录页逐一屏蔽对于Github.com我们需要屏蔽
`/` `/login` `/signup` `copilot`
你可以将其直接导向404或者重定向到另外的网站**只要不让你的用户能在你的反代网站上能登录就可以**
# 正式部署
> 教程视频: https://www.bilibili.com/video/BV1jGd6YpE8z
进入 dash.cloudflare.com
创建新Worker选择Hello World模板
前往 [GitHub - afoim/GithubSiteProxyForCloudflareWorker: 这是一个基于Cloudflare Workers的GitHub代理服务允许通过替代域名访问GitHub资源解决某些网络环境下GitHub访问受限的问题。代理服务通过域名映射和资源转发提供无缝的GitHub浏览体验。](https://github.com/afoim/GithubSiteProxyForCloudflareWorker) 复制 `worker.js` 代码粘贴到你的Worker
观察域名配置
```js
// 域名映射配置
const domain_mappings = {
'github.com': 'gh.',
'avatars.githubusercontent.com': 'avatars-githubusercontent-com.',
'github.githubassets.com': 'github-githubassets-com.',
'collector.github.com': 'collector-github-com.',
'api.github.com': 'api-github-com.',
'raw.githubusercontent.com': 'raw-githubusercontent-com.',
'gist.githubusercontent.com': 'gist-githubusercontent-com.',
'github.io': 'github-io.',
'assets-cdn.github.com': 'assets-cdn-github-com.',
'cdn.jsdelivr.net': 'cdn.jsdelivr-net.',
'securitylab.github.com': 'securitylab-github-com.',
'www.githubstatus.com': 'www-githubstatus-com.',
'npmjs.com': 'npmjs-com.',
'git-lfs.github.com': 'git-lfs-github-com.',
'githubusercontent.com': 'githubusercontent-com.',
'github.global.ssl.fastly.net': 'github-global-ssl-fastly-net.',
'api.npms.io': 'api-npms-io.',
'github.community': 'github-community.'
};
```
假如你的域名为 `abc.com`
你需要将
`gh.abc.com`
`avatars-githubusercontent-com.abc.com`
...
绑定到你的Worker随后访问 `gh.abc.com` 就能访问你自己的Github反代了
---
# 适用于高级玩家:
如果你想修改三级域名,比如将 `gh.abc.com` 改为 `github.abc.com` 等,直接更改域名映射配置对应键的值
可以添加和删除要重定向的路径,默认重定向到一个神秘的网站,都有注释,你可以自行更改
本项目也是一个任意全站反代模板,可以反代其他网站(注意需要大改代码)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 KiB

View File

@@ -1,51 +0,0 @@
---
title: Simple Guides for Fuwari
published: 2024-04-01
description: "How to use this blog template."
image: "./cover.jpeg"
tags: ["Fuwari", "Blogging", "Customization"]
category: Guides
draft: false
---
> Cover image source: [Source](https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=2048/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg)
This blog template is built with [Astro](https://astro.build/). For the things that are not mentioned in this guide, you may find the answers in the [Astro Docs](https://docs.astro.build/).
## Front-matter of Posts
```yaml
---
title: My First Blog Post
published: 2023-09-09
description: This is the first post of my new Astro blog.
image: ./cover.jpg
tags: [Foo, Bar]
category: Front-end
draft: false
---
```
| Attribute | Description |
|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `title` | The title of the post. |
| `published` | The date the post was published. |
| `description` | A short description of the post. Displayed on index page. |
| `image` | The cover image path of the post.<br/>1. Start with `http://` or `https://`: Use web image<br/>2. Start with `/`: For image in `public` dir<br/>3. With none of the prefixes: Relative to the markdown file |
| `tags` | The tags of the post. |
| `category` | The category of the post. |
| `draft` | If this post is still a draft, which won't be displayed. |
## Where to Place the Post Files
Your post files should be placed in `src/content/posts/` directory. You can also create sub-directories to better organize your posts and assets.
```
src/content/posts/
├── post-1.md
└── post-2/
├── cover.png
└── index.md
```

459
src/content/posts/hugo.md Normal file
View File

@@ -0,0 +1,459 @@
---
category: 教程
description: Hugo是一个基于Golang的静态博客相比于Nodejs的Hexo构建效率提升600%同时也支持低JavaScript特性SEO更加优化爬虫更易获取
draft: false
image: https://r2.072103.xyz/fuwari-blog/img/3d1b097d-7e31-4312-b3e5-d213e2903f4d.webp
lang: ''
published: 2025-03-03
tags:
- Hugo
title: Hugo博客搭建教程以及配置调优
---
# 引言
曾经我写过一篇文章叫做:[Fuwari静态博客搭建教程](/posts/fuwari/)。
文中的[Fuwari](https://github.com/saicaca/fuwari)是基于Astro的并且使用了服务器+客户端的混合渲染尽管UI确实好看但因为本人不会写Astro导致日后维护特别困难比如手动添加Giscus评论后和上游分支发生冲突需要手动解决冲突才能合并上游
最后我放弃了既然我就是菜我为什么不找一个原生使用HTML+JS+CSS的框架呢
于是我便询问AIClaude推荐我使用Hugo。
其实我早就曾听闻Hugo的大名但是并没有深入研究但是Claude又告诉我Hugo采用Go语言进行编译速度快而且想要二次开发也只需要改改我最熟悉的HTML+JS+CSS。
于是我便花了2小时深入研究、部署、调优。发现Hugo确实很强大迁移方便二改简单构建迅速
# 正式开始
> 请全程在Windows上操作
我们首先需要安装Scoop这是一个适用于Windows的包管理器个人认为非常好用
Scoop默认会安装到C盘如果你想要换盘请按需更改
```powershell
$env:SCOOP='D:\Scoop'
$env:SCOOP_GLOBAL='D:\ScoopApps'
[Environment]::SetEnvironmentVariable('SCOOP', $env:SCOOP, 'User')
[Environment]::SetEnvironmentVariable('SCOOP_GLOBAL', $env:SCOOP_GLOBAL, 'Machine')
```
安装Scoop
```powershell
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
```
如果你以管理员的身份会安装失败请切换为普通用户。若想强制以管理员身份安装Scoop请使用
[github原帖](https://github.com/ScoopInstaller/Install#for-admin)
出于安全考虑默认情况下已禁用管理员控制台下的安装。如果您知道自己在做什么并希望以管理员身份安装Scoop请下载安装程序并在提升的控制台中手动执行它使用 `-RunAsAdmin` 参数。以下是示例:
```powershell
irm get.scoop.sh -outfile 'install.ps1'
.\install.ps1 -RunAsAdmin [-OtherParameters ...]
# 如果你想要一行解决:
iex "& {$(irm get.scoop.sh)} -RunAsAdmin"
```
安装Hugo框架
```powershell
scoop install hugo
```
然后选择一个你喜欢的文件夹创建你的站点。 `myblog` 即你的站点文件夹名称
```shell
hugo new site myblog
cd myblog
```
安装PaperMod主题
```shell
git clone https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod
```
站点根目录会有一个 `hugo.toml`。我推荐使用YAML。将文件重命名为 `hugo.yaml`。粘贴并更改以下内容
```yaml
baseURL: "https://站点url"
title: "网站标题"
LanguageCode: "zh-CN"
theme: "PaperMod"
# 启用首页个人简介展示
params:
# 是否启用评论。你需要自己配置或者直接引入Giscus等评论系统
comments: false
# 是否显示代码复制按钮
ShowCodeCopyButtons: true
# 是否显示面包屑导航
ShowBreadCrumbs: false
# 是否显示阅读时间
ShowReadingTime: true
# 是否显示分享按钮
ShowShareButtons: true
# 分享按钮配置
# ShareButtons: ["linkedin", "twitter"]
# 是否禁用主题切换按钮
disableThemeToggle: false
assets:
favicon: "/你的/网站图标.jpg" # 需要在static文件夹放置对应的图片
iconHeight: 35
# 首页信息配置
homeInfoParams:
Title: "首页展示的标题"
Content: >
首页展示的文本
# 设置网站头像和首页头像
profileMode:
enabled: false # 设为 true 将完全替换 homeInfoParams
# 网站头像设置 (显示在导航栏)
label:
text: "左上角显示的文本"
icon: "/你的/左上角显示的图片.jpg" # 这将显示在导航栏标题旁边。需要在static文件夹放置对应的图片
iconHeight: 35
# 社交图标 (显示在简介下方)
socialIcons:
- name: bilibili
url: ""
- name: github
url: ""
- name: telegram
url: ""
# 可以添加更多社交图标 https://github.com/adityatelange/hugo-PaperMod/wiki/Icons
# 顶部导航栏的快捷链接
menu:
main:
- identifier: categories
name: 分类
url: /categories/
weight: 10
- identifier: tags
name: 标签
url: /tags/
weight: 20
- identifier: archives
name: 归档
url: /archives/
weight: 30
- identifier: search
name: 搜索
url: /search/
weight: 40
# 可以添加更多导航链接。weight的值越高排序越靠后
# 如果要启用搜索功能,需要添加这个
outputs:
home:
- HTML
- RSS
- JSON # 必须,用于搜索功能
```
然后我们需要分别配置分类、标签、归档和搜索页
创建 `content\categories\_index.md` 写入:
```markdown
---
title: 分类
layout: categories
---
```
创建 `content\tags\_index.md` 写入:
```markdown
---
title: 标签
layout: tags
---
```
创建 `content\archives.md` 写入:
```markdown
---
title: 归档
layout: archives
---
```
创建 `content\search.md` 写入:
```markdown
---
title: "搜索"
layout: "search"
---
```
然后我们要更改默认的文章创建模板
`archetypes\default.md` 写入:
```markdown
---
title: {{ replace .File.ContentBaseName "-" " " | title }}
published: {{ .Date }}
summary: "文章简介"
cover:
image: "文章封面图。也支持HTTPS"
tags: [标签1, 标签2]
categories: '文章所处的分类'
draft: false
lang: ''
---
```
接下来我们就可以通过命令来创建文章并开始写作了。注意最终构建的文章URL是你的文章的文件名。比如`https://你的网站.com/posts/first` 所以文章文件名尽量简短,这并不会影响你的文章标题
```shell
hugo new posts/first.md
```
当我们写完一篇文章想要预览网站,可以使用
```powershell
hugo server
```
当我们想要将站点发布到Vercel、Cloudflare Pages等静态网站托管平台可以将我们的 `myblog` 作为一个Git存储库提交到Github
根目录:`./`
输出目录:`public`
构建命令:`hugo --gc`
环境变量: Key`HUGO_VERSION` Value`0.145.0`
---
### 对象存储存图中间件代码:
```python
import keyboard
import pyperclip
from PIL import ImageGrab, Image
import io
import boto3
from botocore.config import Config
import time
import uuid
import pyautogui
import os
from io import BytesIO
# 示例配置
# # R2 配置
# R2_CONFIG = {
# 'account_id': '11111111111111111',
# 'access_key_id': '11111111111111111',
# 'secret_access_key': '11111111111111111',
# 'bucket_name': '11111111111111111'
# }
# # OSS 配置
# OSS_CONFIG = {
# 'url': 'r2.072103.xyz',
# 'prefix': '/fuwari-blog/img'
# }
#########################################################
# R2 配置
R2_CONFIG = {
'account_id': '',
'access_key_id': '',
'secret_access_key': '',
'bucket_name': ''
}
# OSS 配置
OSS_CONFIG = {
'url': '',
'prefix': ''
}
#########################################################
def init_r2_client():
"""初始化 R2 客户端"""
return boto3.client(
's3',
endpoint_url=f'https://{R2_CONFIG["account_id"]}.r2.cloudflarestorage.com',
aws_access_key_id=R2_CONFIG['access_key_id'],
aws_secret_access_key=R2_CONFIG['secret_access_key'],
config=Config(signature_version='s3v4'),
region_name='auto'
)
def get_image_from_clipboard():
"""从剪贴板获取图片"""
try:
image = ImageGrab.grabclipboard()
if image is None:
return None
# 如果是列表(多个文件),取第一个
if isinstance(image, list):
if len(image) > 0:
# 如果是图片文件路径,打开它
try:
return Image.open(image[0])
except Exception as e:
print(f"打开图片文件失败: {e}")
return None
return None
# 如果直接是 Image 对象
if isinstance(image, Image.Image):
return image
return None
except Exception as e:
print(f"获取剪贴板图片失败: {e}")
return None
def convert_to_webp(image):
"""将图片转换为 webp 格式"""
if not image:
return None
try:
buffer = BytesIO()
# 确保图片是 RGB 模式
if image.mode in ('RGBA', 'LA'):
background = Image.new('RGB', image.size, (255, 255, 255))
background.paste(image, mask=image.split()[-1])
image = background
elif image.mode != 'RGB':
image = image.convert('RGB')
image.save(buffer, format="WEBP", quality=80)
return buffer.getvalue()
except Exception as e:
print(f"转换图片失败: {e}")
return None
def upload_to_r2(image_data):
"""上传图片到 R2"""
if not image_data:
return None
client = init_r2_client()
# 生成基础文件名
base_filename = f"{uuid.uuid4()}.webp"
filename = base_filename
try:
# 检查文件是否已存在
attempt = 1
while True:
try:
# 尝试获取文件信息,如果文件存在会返回数据,不存在会抛出异常
client.head_object(
Bucket=R2_CONFIG['bucket_name'],
Key=f"{OSS_CONFIG['prefix'].strip('/')}/{filename}"
)
# 如果文件存在,修改文件名
name_without_ext = base_filename.rsplit('.', 1)[0]
filename = f"{name_without_ext}_{attempt}.webp"
attempt += 1
print(f"文件名已存在,尝试重命名为: {filename}")
except client.exceptions.ClientError as e:
# 如果是 404 错误,说明文件不存在,可以使用这个文件名
if e.response['Error']['Code'] == '404':
break
raise e # 其他错误则抛出
# 上传文件
client.put_object(
Bucket=R2_CONFIG['bucket_name'],
Key=f"{OSS_CONFIG['prefix'].strip('/')}/{filename}",
Body=image_data,
ContentType='image/webp'
)
return filename
except Exception as e:
print(f"上传失败: {e}")
return None
def generate_markdown_link(filename):
"""生成 Markdown 图片链接"""
if not filename:
return None
url = f"https://{OSS_CONFIG['url']}{OSS_CONFIG['prefix']}/{filename}"
return f"![]({url})"
def type_markdown_link(markdown_link):
"""模拟键盘输入 Markdown 链接"""
if not markdown_link:
return
pyperclip.copy(markdown_link)
pyautogui.hotkey('ctrl', 'v')
def handle_upload():
"""处理图片上传的主函数"""
print(f"\n[{time.strftime('%Y-%m-%d %H:%M:%S')}] 收到粘贴请求")
print("正在检查剪贴板...")
# 获取剪贴板图片
image = get_image_from_clipboard()
if not image:
print("❌ 剪贴板中没有图片")
return
print("✅ 获取到剪贴板图片")
# 转换为 webp
print("正在转换为 WebP 格式...")
image_data = convert_to_webp(image)
if not image_data:
print("❌ 图片转换失败")
return
print(f"✅ 转换完成,大小: {len(image_data)/1024:.2f}KB")
# 上传到 R2
print("正在上传到 R2...")
filename = upload_to_r2(image_data)
if not filename:
print("❌ 上传失败")
return
print(f"✅ 上传成功,文件名: {filename}")
# 生成并输入 Markdown 链接
markdown_link = generate_markdown_link(filename)
if markdown_link:
print(f"生成的 URL: https://{OSS_CONFIG['url']}{OSS_CONFIG['prefix']}/{filename}")
print(f"模拟键入: {markdown_link}")
type_markdown_link(markdown_link)
print("✅ 操作完成")
def main():
"""主函数"""
print("=" * 50)
print("R2 图片上传插件已启动")
print(f"当前配置:")
print(f"- OSS 域名: {OSS_CONFIG['url']}")
print(f"- 存储路径: {OSS_CONFIG['prefix']}")
print(f"- R2 存储桶: {R2_CONFIG['bucket_name']}")
print("使用 Ctrl+Alt+V 上传剪贴板中的图片")
print("=" * 50)
# 注册快捷键
keyboard.add_hotkey('ctrl+alt+v', handle_upload)
# 保持程序运行
keyboard.wait()
if __name__ == "__main__":
main()
```

87
src/content/posts/ipfs.md Normal file
View File

@@ -0,0 +1,87 @@
---
category: 随笔
description: IPFS是一个多节点的文件托管系统你可以在上面共享文件、发布网站、而Fleek自动化了这个过程并且可以链接你的Git存储库
draft: false
image: https://r2.072103.xyz/fuwari-blog/img/2024-10-17-09-55-55-image.webp
lang: ''
published: 2024-10-17
tags:
- Fleek
- IPFS
title: 使用基于IPFS的Fleek部署静态网站、托管图床、部署服务
---
### 什么是IPFS
> IPFS是点到点的超媒体协议它让网络更快、更安全、更开放。说简单一点它就是一个去中心化互联网。说技术一点它是一个基于分布式哈希表DHT进行内容寻址的基于git模型版本管理的基于默克尔对象关联的基于点对点技术的基于全球化命名空间IPNS的基于各种技术的一种分布式文件系统。
用人话说,你可以把它看成一个共享网盘,你可以尝试下载[IPFS - Desktop适用于有图形界面的系统](https://github.com/ipfs/ipfs-desktop)或[kubo - ipfs适用于CLI](https://github.com/ipfs/kubo)。然后启动IPFS你的设备将成为IPFS网络中的一个节点如图![](https://r2.072103.xyz/fuwari-blog/img/2024-10-17-10-47-08-image.webp)
### 使用IPFS能做什么
当你连接到IPFS网络后IPFS会自动将你的设备作为一个本地IPFS节点并且寻找其他IPFS节点你将能够帮助其他用户建立连接、提供文件。同时你也可以将你的文件上传到你的IPFS节点等待分发让网络上的其他用户可以访问你的文件。在IPFS网络中访问文件通过IPFS网关`https://ipfs.io/ipfs/` + `CID文件哈希` 实现访问。比如: https://ipfs.crossbell.io/ipfs/bafybeifbn36zmdb37ov6id3toy6bve47264hjk2yob6rm4bhw7ooawncf4
(这里使用 `ipfs.crossbell.io` 这个CrossBell托管的IPFS网关来规避GFW封禁
### 这项技术真的有这么理想吗?
这项技术确实很理想,但是实际应用下来会遇到以下问题
1. 通过本地IPFS节点上传的文件迟迟无法通过IPFS网关+CID实现访问
2. 发现的节点太少
3. 可能会大量占用你的带宽
这些问题大部分原因都是因为这个网络太过于庞大而单个IPFS节点的权重很低尽管IPFS的分发一般在几小时内可以完成。但对于个人来说我们应当寻找一些服务商帮我们完成这些需求它们往往在IPFS网络中的权重更大进行文件更新的效率也很高同时也提供一些扩展服务比如自动化Git部署。而这篇文章使用的则是**Fleek**
### 关于Fleek
你可以简单理解为它权重很大有很多的IPFS节点经由Fleek上传到IPFS网络上的文件可以在几秒内完成广播并且支持连接Git存储库部署项目和绑定你的域名
### Fleek是否值得信赖
本人仅接触此服务2天。观察到Fleek在成功部署网站后提供了三类访问方式
1. `xxx-xxx.fleek.app`这个域名使用了Cloudflare CDN实测解析IP的数量为2不建议使用
2. ![](https://r2.072103.xyz/fuwari-blog/img/2024-10-17-11-01-49-image.webp)这种方法是原生的IPFS访问方式。通过IPFS网关+CID来访问。但由于CID为哈希值当你的网站改动后你的CID会发生变化
3. 绑定自定义域名来访问这将会使用亚马逊的CDN并且自动映射CID实测解析IP数量超过30并且速度很快
> [!WARNING]
> 注意任何使用HTTP协议的类ipfs技术都需要一个中心化服务器代理访问IPFS网络。只有当访问者连接上IPFS网络后才会使用去中心化的连接方式
- ![](https://r2.072103.xyz/fuwari-blog/img/2024-10-17-11-07-40-image.webp)
- 尽管显示了IPFS的文件浏览界面但实际上这个页面是由HTTP请求到亚马逊 CDN反代IPFS网络实现的实际上仍为中心化网络
- ![](https://r2.072103.xyz/fuwari-blog/img/2024-10-17-11-08-44-image.webp)
- 当你的设备已经连上IPFS网络后所有流量将使用P2P去中心化所以你看到的访问地址实际上是本机地址
### 梳理一下思路我们可以用Fleek做到什么
让Fleek连接你的Git存储库通过构建命令构建静态网站并发布到IPFS同时兼容HTTP访问
#### 正式开始
1. 前往fleek.xyz通过MetaMask登录
2. 连接你的Git存储库输入构建命令等相关信息
3. 部署网站
4. 绑定域名
5. 最终访问
效果图:
![](https://r2.072103.xyz/fuwari-blog/img/2024-10-17-11-31-33-image.webp)
#### 拓展一下我们还可以通过IPFS技术做什么域名已弃用
1. 创建一个巨大的图床,已经投入使用,参见: https://pic.onani.cn (原理:请求 https://ipfs-pic.onani.cn 获取图片列表随机选择使用JS展示![](https://r2.072103.xyz/fuwari-blog/img/2024-10-17-11-34-44-image.webp)
2. 无需再自托管任何图片已经投入使用本博客所有图片都使用IPFS存储
3. 理论上你可以将任何占用存储的服务上传到IPFS实现存算分离

View File

@@ -1,84 +0,0 @@
---
title: Markdown Extended Features
published: 2024-05-01
updated: 2024-11-29
description: 'Read more about Markdown features in Fuwari'
image: ''
tags: [Demo, Example, Markdown, Fuwari]
category: 'Examples'
draft: false
---
## GitHub Repository Cards
You can add dynamic cards that link to GitHub repositories, on page load, the repository information is pulled from the GitHub API.
::github{repo="Fabrizz/MMM-OnSpotify"}
Create a GitHub repository card with the code `::github{repo="<owner>/<repo>"}`.
```markdown
::github{repo="saicaca/fuwari"}
```
## Admonitions
Following types of admonitions are supported: `note` `tip` `important` `warning` `caution`
:::note
Highlights information that users should take into account, even when skimming.
:::
:::tip
Optional information to help a user be more successful.
:::
:::important
Crucial information necessary for users to succeed.
:::
:::warning
Critical content demanding immediate user attention due to potential risks.
:::
:::caution
Negative potential consequences of an action.
:::
### Basic Syntax
```markdown
:::note
Highlights information that users should take into account, even when skimming.
:::
:::tip
Optional information to help a user be more successful.
:::
```
### Custom Titles
The title of the admonition can be customized.
:::note[MY CUSTOM TITLE]
This is a note with a custom title.
:::
```markdown
:::note[MY CUSTOM TITLE]
This is a note with a custom title.
:::
```
### GitHub Syntax
> [!TIP]
> [The GitHub syntax](https://github.com/orgs/community/discussions/16925) is also supported.
```
> [!NOTE]
> The GitHub syntax is also supported.
> [!TIP]
> The GitHub syntax is also supported.
```

View File

@@ -1,175 +0,0 @@
---
title: Markdown Example
published: 2023-10-01
description: A simple example of a Markdown blog post.
tags: [Markdown, Blogging, Demo]
category: Examples
draft: false
---
# An h1 header
Paragraphs are separated by a blank line.
2nd paragraph. _Italic_, **bold**, and `monospace`. Itemized lists
look like:
- this one
- that one
- the other one
Note that --- not considering the asterisk --- the actual text
content starts at 4-columns in.
> Block quotes are
> written like so.
>
> They can span multiple paragraphs,
> if you like.
Use 3 dashes for an em-dash. Use 2 dashes for ranges (ex., "it's all
in chapters 12--14"). Three dots ... will be converted to an ellipsis.
Unicode is supported. ☺
## An h2 header
Here's a numbered list:
1. first item
2. second item
3. third item
Note again how the actual text starts at 4 columns in (4 characters
from the left side). Here's a code sample:
# Let me re-iterate ...
for i in 1 .. 10 { do-something(i) }
As you probably guessed, indented 4 spaces. By the way, instead of
indenting the block, you can use delimited blocks, if you like:
```
define foobar() {
print "Welcome to flavor country!";
}
```
(which makes copying & pasting easier). You can optionally mark the
delimited block for Pandoc to syntax highlight it:
```python
import time
# Quick, count to ten!
for i in range(10):
# (but not *too* quick)
time.sleep(0.5)
print i
```
### An h3 header
Now a nested list:
1. First, get these ingredients:
- carrots
- celery
- lentils
2. Boil some water.
3. Dump everything in the pot and follow
this algorithm:
find wooden spoon
uncover pot
stir
cover pot
balance wooden spoon precariously on pot handle
wait 10 minutes
goto first step (or shut off burner when done)
Do not bump wooden spoon or it will fall.
Notice again how text always lines up on 4-space indents (including
that last line which continues item 3 above).
Here's a link to [a website](http://foo.bar), to a [local
doc](local-doc.html), and to a [section heading in the current
doc](#an-h2-header). Here's a footnote [^1].
[^1]: Footnote text goes here.
Tables can look like this:
size material color
---
9 leather brown
10 hemp canvas natural
11 glass transparent
Table: Shoes, their sizes, and what they're made of
(The above is the caption for the table.) Pandoc also supports
multi-line tables:
---
keyword text
---
red Sunsets, apples, and
other red or reddish
things.
green Leaves, grass, frogs
and other things it's
not easy being.
---
A horizontal rule follows.
---
Here's a definition list:
apples
: Good for making applesauce.
oranges
: Citrus!
tomatoes
: There's no "e" in tomatoe.
Again, text is indented 4 spaces. (Put a blank line between each
term/definition pair to spread things out more.)
Here's a "line block":
| Line one
| Line too
| Line tree
and images can be specified like so:
[//]: # (![example image]&#40;./demo-banner.png "An exemplary image"&#41;)
Inline math equations go in like so: $\omega = d\phi / dt$. Display
math should get its own line and be put in in double-dollarsigns:
$$I = \int \rho R^{2} dV$$
$$
\begin{equation*}
\pi
=3.1415926535
\;8979323846\;2643383279\;5028841971\;6939937510\;5820974944
\;5923078164\;0628620899\;8628034825\;3421170679\;\ldots
\end{equation*}
$$
And note that you can backslash-escape any punctuation characters
which you wish to be displayed literally, ex.: \`foo\`, \*bar\*, etc.

View File

@@ -0,0 +1,388 @@
---
category: 记录
description: 在N100小主机上安装PVE然后在其中安装飞牛NAS和Debian实现追番建站分离并且易扩展易迁移
draft: false
image: https://r2.072103.xyz/fuwari-blog/img/N100-PVE_cover.webp
lang: ''
published: 2024-10-28
tags:
- PVE
title: N100 - PVEfnOS+Debian基建记录
---
# 配置&需求
- N100 CPU 频率:最小 700 Mhz, 最大 3400 Mhz | TDP6 W
- 8G RAM
- 128G M.2 NVme SSD
- 512G SATA HDD
- Realtek R8168 有线网卡
- USB有线网卡
- U盘作PVE引导盘
# 目标
1. 所有系统通过PVE管理
2. PVE下安装fnOS作NAS并配置自动追番直通`N100核显` `512G SATA HDD`
3. PVE下安装Debian搭建QQBot、博客、AList
* * *
# 1\. PVE
## 安装
- 下载Ventoy最新版可执行文件
[https://www.ventoy.net/cn/download.html](https://www.ventoy.net/cn/download.html)
- 使用GPT分区表NTFS格式将Ventoy写入U盘
- 下载PVE最新版ISO使用USTC镜像源
[https://mirrors.ustc.edu.cn/help/proxmox.html](https://mirrors.ustc.edu.cn/help/proxmox.html)
- 将PVE的ISO文件放入U盘根目录
- 插入USB网卡U盘连接到到N100开机从U盘启动进入PVE安装界面安装PVE。网络配置选择USB网卡
- 重启进入PVE通过IP+8006端口进入WebUI登录进去
## 配置
### 安装PVE快捷管理脚本
- 安装PVE快捷管理脚本[pve\_source.tar.gz | AcoFork-AList](https://alist.onani.cn/pve_source.tar.gz) 或 [**https://wwp.lanzoul.com/ivHta1ngmo6d**](https://wwp.lanzoul.com/ivHta1ngmo6d) (密码:i1ws来自在下莫老师
- 解压:`tar zxvf pve_source.tar.gz`
- 运行:`./pve_source`
- 同意许可协议
- 依次执行白框操作![](https://r2.072103.xyz/fuwari-blog/img/ea205e1a00e7029dfa4bd7850c5a6a68d6d4c0d9.webp)
- 扩容local`lvextend -rl +100%FREE /dev/pve/root`
### 配置Realtek R8168网卡
> 由于Debian系默认安装R8169驱动我们需要手动安装R8168驱动否则无法使用N100小主机自带的有线网口上网
- 下载驱动:
[https://www.realtek.com/Download/List?cate\_id=584](https://www.realtek.com/Download/List?cate_id=584)![](https://r2.072103.xyz/fuwari-blog/img/0d8457c7fb0d497e12e2c8b544f07c3c37cf96cd.webp)
- 解压,安装:`sh autorun.sh`
- 查看是否有新的网络接口:`ip a`
- ```shell
root@n100-pve:~# ip a
...
2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master vmbr1 state UP group default qlen 1000
link/ether 00:e0:4c:08:91:a6 brd ff:ff:ff:ff:ff:ff
...
```
- 配置网络配置文件:`nano /etc/network/interfaces`
```
# network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you're doing.
#
# If you want to manage parts of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT read its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!
auto lo
iface lo inet loopback
iface wlp1s0 inet manual
iface enp3s0 inet manual
auto vmbr1
iface vmbr1 inet static
address 192.168.124.25/24
gateway 192.168.124.1
bridge-ports enp3s0
bridge-stp off
bridge-fd 0
iface vmbr1 inet6 auto
dhcp 1
accept_ra 2
request_prefix 1
source /etc/network/interfaces.d/*
```
- 重启网络服务:`systemctl restart networking`
- 查看ip`ip a`
```shell
root@n100-pve:~# ip a
...
2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master vmbr1 state UP group default qlen 1000
link/ether 00:e0:4c:08:91:a6 brd ff:ff:ff:ff:ff:ff
...
4: vmbr1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 00:e0:4c:08:91:a6 brd ff:ff:ff:ff:ff:ff
inet 192.168.124.25/24 scope global vmbr1
valid_lft forever preferred_lft forever
inet6 2409:8a30:320:7fc0:2e0:4cff:fe08:91a6/64 scope global dynamic mngtmpaddr
valid_lft 2763sec preferred_lft 2762sec
inet6 fe80::2e0:4cff:fe08:91a6/64 scope link
valid_lft forever preferred_lft forever
```
- 卸除USB网卡
### 配置STUN穿透
#### 路由器设置DMZ主机为PVEIP
- ![](https://r2.072103.xyz/fuwari-blog/img/dbeb7980e5fc699c696ffa6f2fda4a17c05ee821.webp)
#### 安装Lucky
- 执行:`curl -o /tmp/install.sh http://6.666666.host:6/files/golucky.sh && sh /tmp/install.sh http://6.666666.host:6/files 2.13.4`
- 通过`host:16601` 进入Lucky后台设置STUN穿透
- ![](https://r2.072103.xyz/fuwari-blog/img/2175839424184aee880b91382bd1fbf3c578d258.webp)
# 2\. fnOS
## 安装
- 前往官网下载最新版ISO
[https://www.fnnas.com/](https://www.fnnas.com/)
- 上传至PVE![](https://r2.072103.xyz/fuwari-blog/img/073808516d357e099a866c30b4a77954c5b9b458.webp)
- 创建fnOS虚拟机CPU类型选择host步骤略
- 直通核显和硬盘:![](https://r2.072103.xyz/fuwari-blog/img/08e4f7a3b87ae86334011e1d4c3a384a36ad9866.webp)
- 如果你不知道你的核显和SATA控制器的PCI ID`lspci`
- 可见核显为`00:02.0`SATA控制器为`00:17.0`
```shell
root@n100-pve:~# lspci
00:00.0 Host bridge: Intel Corporation Device 461c
00:02.0 VGA compatible controller: Intel Corporation Alder Lake-N [UHD Graphics]
00:0a.0 Signal processing controller: Intel Corporation Platform Monitoring Technology (rev 01)
00:14.0 USB controller: Intel Corporation Alder Lake-N PCH USB 3.2 xHCI Host Controller
00:14.2 RAM memory: Intel Corporation Alder Lake-N PCH Shared SRAM
00:16.0 Communication controller: Intel Corporation Alder Lake-N PCH HECI Controller
00:17.0 SATA controller: Intel Corporation Alder Lake-N SATA AHCI Controller
00:1a.0 SD Host controller: Intel Corporation Device 54c4
00:1c.0 PCI bridge: Intel Corporation Device 54be
00:1d.0 PCI bridge: Intel Corporation Alder Lake-N PCI Express Root Port
00:1d.1 PCI bridge: Intel Corporation Alder Lake-N PCI Express Root Port
00:1e.0 Communication controller: Intel Corporation Alder Lake-N Serial IO UART Host Controller
00:1e.3 Serial bus controller: Intel Corporation Device 54ab
00:1f.0 ISA bridge: Intel Corporation Alder Lake-N PCH eSPI Controller
00:1f.3 Audio device: Intel Corporation Alder Lake-N PCH High Definition Audio Controller
00:1f.4 SMBus: Intel Corporation Alder Lake-N SMBus
00:1f.5 Serial bus controller: Intel Corporation Alder Lake-N SPI (flash) Controller
01:00.0 Network controller: Intel Corporation Wireless 3160 (rev 83)
02:00.0 Non-Volatile memory controller: Realtek Semiconductor Co., Ltd. RTS5765DL NVMe SSD Controller (DRAM-less) (rev 01)
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 2b)
```
- 启动虚拟机安装fnOS
## 配置
- 前往飞牛设置创建储存空间Linear模式选择刚才直通的硬盘![](https://r2.072103.xyz/fuwari-blog/img/581cf01462df545a8662acbb5e20e1676bd17744.webp)
- 前往飞牛应用中心安装qBittorrent、影视并且在设置给予目录读取权限![](https://r2.072103.xyz/fuwari-blog/img/92a2e0bf25d630db4858775fdbb6c907f419c25d.webp)
- 配置qBittorrent的用户名和密码
- 打开飞牛Docker初始化
- 拉取并运行AutoBangumi Docker镜像
```shell
docker run -d \
--name=AutoBangumi \
-v /vol1/1000/AutoBangumi/config:/app/config \
-v /vol1/1000/AutoBangumi/data:/app/data \
-p 7892:7892 \
-e TZ=Asia/Shanghai \
-e PUID=$(id -u) \
-e PGID=$(id -g) \
-e UMASK=022 \
--network=bridge \
--dns=8.8.8.8 \
--restart unless-stopped \
ghcr.onani.cn/estrellaxd/auto_bangumi:latest
```
- 进入`host:7892` 让AutoBangumi连接qBittorrent并配置下载地址![](https://r2.072103.xyz/fuwari-blog/img/82c4a003d2399f82a7ccf5849cd1d5858d5f1f61.webp)
- 添加RSS。可前往[蜜柑计划 - Mikan Project](https://mikanime.tv/)获得各个字幕组的RSS
![](https://r2.072103.xyz/fuwari-blog/img/f36daae968d8043bbcd1e4a2bbb9b9cd2d707cee.webp)
注意:使用[蜜柑计划 - Mikan Project](https://mikanime.tv/)时请订阅单个字幕组的RSS不要使用个人的RSS会导致**只能获取到你所有追番的最新一集而不是单个番的全部剧集**
- 打开飞牛影视,初始化并设置媒体库![](https://r2.072103.xyz/fuwari-blog/img/269b78c3b7dffe7f8cdb861098f44147552b5eb4.webp)
- 注意:如果要刮削旧集旧番,请规范重命名,可以使用自动化工具:[Episode-ReName.zip | AcoFork-AList](https://alist.onani.cn/Episode-ReName.zip)
- 一级目录即qb下载目录无需重命名
- 二级目录:番剧名称
- 三级目录:季,如`Season 1`
- 四级目录:集和字幕,如`S01E01.mp4` `S01E01.chs.ass`
# 3\. Debian
## 安装
- 下载Debian12 ISOUSTC镜像源建议选择DVD镜像包更全安装更快
[https://mirrors.ustc.edu.cn/help/debian-cd.html](https://mirrors.ustc.edu.cn/help/debian-cd.html)
- 上传至PVE创建Debian虚拟机CPU类型选择host步骤略
### 安装1Panel
[https://1panel.cn/docs/installation/online\_installation/](https://1panel.cn/docs/installation/online_installation/)
- 在1Panel中安装`Openresty` `MySQL` `Halo` `AList` `Cloudflared` 配置步骤略
### 搭建QQBot
#### 安装OneBotv11协议实现Lagrange.OneBot
- Docker Run`docker run -td -p 8081:8081 -v /root/qqbot/lo:/app/data -e UID=$UID -e GID=$(id -g) ghcr.onani.cn/lagrangedev/lagrange.onebot:edge`
- 修改配置文件:`appsettings.json`
```json
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"SignServerUrl": "",
"SignProxyUrl": "",
"MusicSignServerUrl": "",
"Account": {
"Uin": 0,
"Password": "",
"Protocol": "Linux",
"AutoReconnect": true,
"GetOptimumServer": true
},
"Message": {
"IgnoreSelf": true,
"StringPost": false
},
"QrCode": {
"ConsoleCompatibilityMode": false
},
"Implementations": [
{
"Type": "ReverseWebSocket",
"Host": "192.168.124.34",
"Port": 9090,
"Suffix": "/onebot/v11/ws",
"ReconnectInterval": 5000,
"HeartBeatInterval": 5000,
"AccessToken": ""
}
]
}
```
- 重启容器,扫码登录
#### 安装NoneBot2
- 安装pip`apt install python3-pip`
- 配置pip USTC源`pip config set global.index-url https://mirrors.ustc.edu.cn/pypi/simple`
- 安装pipx`apt install pipx`
- 安装nb-cli`pipx install nb-cli`
- 设置pipx变量`pipx ensurepath`
- 安装nb bootstrap`nb self install nb-cli-plugin-bootstrap`
- 创建新NoneBot2项目`nb bs`
- ```
root@n100-debian:~# nb bs
加载适配器列表中……
请输入项目名称
[?] 请输入 > onani
[?] 请选择你想要使用的适配器 OneBot V11 (OneBot V11 协议)
请输入 Bot 超级用户,超级用户拥有对 Bot 的最高权限(如对接 QQ 填 QQ 号即可)(留空回车结束输入)
[?] 第 1 项 > 666
[?] 第 2 项 >
请输入 Bot 昵称,消息以 Bot 昵称开头可以代替艾特(留空回车结束输入)
[?] 第 1 项 >
请输入 Bot 命令起始字符,消息以起始符开头将被识别为命令,
如果有一个指令为 查询,当该配置项中有 "/" 时使用 "/查询" 才能够触发,
留空将使用默认值 ['', '/', '#'](留空回车结束输入)
[?] 第 1 项 >
请输入 Bot 命令分隔符,一般用于二级指令,
留空将使用默认值 ['.', ' '](留空回车结束输入)
[?] 第 1 项 >
请输入 NoneBot2 监听地址,如果要对公网开放,改为 0.0.0.0 即可
[?] 请输入 > 0.0.0.0
请输入 NoneBot2 监听端口,范围 1 ~ 65535请保证该端口号与连接端配置相同或与端口映射配置相关
[?] 请输入 > 9090
[?] 是否在项目目录中释出快捷启动脚本? Yes
[?] 是否将 localstore 插件的存储路径重定向到项目路径下以便于后续迁移 Bot Yes
[?] 是否使用超级用户 Ping 指令回复插件? Yes
[?] 是否安装 logpile 插件提供日志记录到文件功能? Yes
[?] 是否在启动脚本中使用 webui 插件启动项目以使用网页管理 NoneBot该插件仍在开发中不推荐用于生产环境 No
成功新建项目 onani
[?] 是否新建虚拟环境? Yes
正在 /root/onani/.venv 中创建虚拟环境
创建虚拟环境成功
[?] 是否需要修改或清除 pip 的 PyPI 镜像源配置? No
[?] 是否立即安装项目依赖? Yes
正在安装项目依赖
依赖安装成功
[?] 请选择需要启用的内置插件
项目配置完毕,开始使用吧!
```
# 成果展示(域名已弃用)
![](https://r2.072103.xyz/fuwari-blog/img/4b4680cc548e0c59ec18cef537c9b1f5412fbbcd.webp)
[https://blog.onani.cn](https://blog.onani.cn)
[https://alist.onani.cn](https://alist.onani.cn)
![](https://r2.072103.xyz/fuwari-blog/img/7c24ff7d54b2e0ccaecce4b2ef79155c54124fa4.webp)

View File

@@ -0,0 +1,61 @@
---
category: 随笔
description: 会用Netlify家宽建站不是梦
draft: false
image: https://r2.072103.xyz/halo/image.png
lang: ''
published: 2025-04-04
tags:
- Netlify
- Vercel
title: Netlify、Vercel反代网站
---
# 原理思路
现阶段大部分家宽拿不到公网IPv4但是可以拿到公网IPv6借助Netlify做一个v6 -> v4的回源就可以让所有人都访问到你的站点了。同时这也是一个Netlify的通用反代教程。本文还教了Vercel的通用反代教程不过这玩意在2025年仍然不支持IPv6只能拿来反代小黄站了ToT
# 正式开始
## Netlify篇
首先前往 https://app.netlify.com/ 注册账号。(注意!最好使用谷歌邮箱去注册,其他方式注册可能会出现什么你的账号需要验证/激活,然后巴拉巴拉很麻烦)
接下来去Github开一个新仓库根目录创建一个 `netlify.toml`。在其中写入
```toml
[[redirects]]
from = "/*"
to = "http://反代域名:反代域名/:splat"
status = 200
force = true
```
注意,端口后面的斜杠一定不要丢!
家宽v6网站建议搭配DDNS食用
接下来回到 https://app.netlify.com/ 创建一个新项目导入你刚创建的Github项目部署即可
最后绑定一下你的域名,完成!
## Vercel篇
首先前往 https://vercel.com/ 注册并登录你的账号
电脑安装Nodejs我们需要用到npm
安装Vercel CLI
```
npm i -g vercel
```
登录Vercel CLI
```
vercel login
```
找个地方(比如桌面)创建一个你随意命名的文件夹,然后在其中创建一个你随意命名的.json文件其中写入。**注意目前Vercel不支持反代IPv6**
```json
{
"version": 2,
"routes": [
{"src": "/(.*)","dest": "https://反代域名:端口"}
]
}
```
然后部署
```
verceL -A 你随意命名的.json --prod
```
最后绑定一下你的域名,完成!

View File

@@ -0,0 +1,45 @@
---
category: 随笔
description: 你可能不知道我曾经购入过一台N100迷你主机不久后便卖掉了不过现在我又购入了这是为什么呢
draft: false
image: https://r2.072103.xyz/fuwari-blog/img/b8b7d06a-1ca4-4786-a147-5275f57dfb3b.webp
lang: ''
published: 2025-02-23
tags:
- NAS
title: 我买了个新NAS...
---
# 我为什么在很久之前买了一个NAS存疑
这其实是一个老生常谈的问题,就像你问我为什么要开始写博客,我也只能给你一个答案,我想这么做。
好吧好吧这个答案可能过于敷衍如果让我仔细想想应该说当时我已经有了不少的Linux理论知识和实操经验通过云服务器所以就想自己弄一个24h小时不关机的小主机放在家里玩家里云
一开始我只是用它挂了QQBot这也是我最初最想要干的事情因为如果我去花钱买国内的云服务器挂Bot那太贵了国外的服务器延迟又太高拿自己的手机电脑是一个很好的选择我的朋友就曾使用过Shamrock来挂Bot。不过这并不适用于我在当时我的所有设备包括手机、平板、电脑都各司其职还要天天陪我出勤根本做不到24h不关机我总不能说我电脑/手机/平板断网Bot就下线吧而且我也很讨厌将个人设备的一部分作为服务器使用就像你在玩崩坏星穹铁道的时候后台挂着Stable Diffusion一样 ~~而且不符合Unix哲学~~
其实很早我就曾使用过旧手机+Termux达到家里云的效果了但是因为手机芯片是Arm64而大部分运维软件都是AMD64x86架构的。对于开源软件还好说只需要自己费劲编译一个版本 ~~或者嫖Github Action的编译~~ 就可以去使用了。
但是对于经常摸云服务器的我来说还是喜欢x86架构的开箱即用也可以顺势装上一些运维管理面板辅助使用。
那么就只有一个解了那就是买一个x86小主机。你可能注意到了我说了这么久我为什么要买一个x86小主机作为家里云使用但是通篇没有提NAS三个字这是为什么呢正所谓饱暖思淫欲。
如果仅仅花了大价钱买了个家里云就放着吃灰绝对是不行的所以那段时间我就开始天天折腾但实际上来说那一款小主机并不适合作为NAS。我们都知道NAS中文叫做网络附属存储那么既然是网络附属**存储**那必然要干什么欸对狠狠塞盘但是实际上那一款小主机只有一个M.2和一个SATA插槽而且M.2已经作为系统盘了而SATA插槽也是只能插2.5寸的硬盘。
人话来说这完全就不是一个NAS单盘位算NAS吗只是一个容量比较大的家里云罢了。我说到这里你可能都会在想那你为什么还要买呢欸这你就不知道了我曾经在2017年买过一个ASUS的双核笔记本而当时这个智商税笔记本用的硬盘就是2.5寸的机械硬盘高达512G虽然这个主机做不了RAID也塞不进多盘 ~~其实可以后续我通过后面的USB接口外置硬盘盒做到了一个极其不稳定的RAID0~~ 但是它确实能做到24h不关机N100的性能也足够用也够我折腾各种乱七八糟的东西了。
于是在那段时间我便在这个小主机上搭建了不少服务也装过不少系统基本把常用Linux发行版全跑了一遍也体验了PVE里面跑飞牛的嵌套操作那段时间天天都有新东西可以折腾还是很爽的。
# 那么话又说回来,既然我已经卖掉了那个小主机,这又是为什么呢?
缺钱但是不知道在缺什么钱。哈哈写到这里真是把我也笑到了从众心理是真的很害人我们都知道2024年末苹果发布了Mac Mini16+256G+教育优惠不到4k就能买到全新机而恰巧我的一位朋友提机了然后跟我聊这玩意怎么怎么好然后一时上头就把能当的全部当了 ~~我纱布一个不仅是小主机惨遭毒手还有Redmi Book Pro 15SRedmi GXiaomiPad 6等等~~
总算是凑够钱线下提机了到手傻眼了苹果的M4芯片是Arm架构的很多东西都跑不了Docker调用不了GPU说白了这东西对我来说就是性能强大的家庭服务器但是我不会用那么聪明的二叉树树做了一件什么事呢在可以7天无理由的情况下毅然决然挂到闲鱼以高价3333人民币卖出 ~~购入是4k左右折下来净亏1k~~
最后在假期余额即将不足的最后拿这个3333人民币购入了一款一加Ace 5 Pro 16+512 国家补贴-500最终3299人民币到手的超高性能甜品机。
# 主播主播,你的操作还是太笨比了,后续有没有什么更笨比的操作啊!
有的兄弟有的就在刚刚下单了一个新NAS我已经准备好通宵搞机了。我的一位朋友曾说人生在于折腾但可惜那时我已经佛了被各种事情忙的不可开交。但是话又说回来现在我前所未有的感到空闲我将带领我的大脑我的身体我的精神开启一场前所未有的熬夜、搞机、折腾、坐牢盛宴
哈哈!我一定要活下去口牙!
后续搞机有成也会写新博文的确实很久没写了我向大家道歉看着网站每天20的日活真的要哭了你们都不来找我呜呜呜呜呜呜呜

View File

@@ -0,0 +1,59 @@
---
category: 教程
description: 懒人可以直接下载预构建的可执行文件但如果想获得日志需要自备Rust环境
draft: false
image: https://r2.072103.xyz/fuwari-blog/img/2024-11-06-08-20-39-image.webp
lang: ''
published: 2024-11-06
tags:
- Phira
title: Phira多人联机服务器搭建/使用教程
---
# 直接下载服务端文件并运行
[https://github.com/afoim/phira-mp-autobuild](https://github.com/afoim/phira-mp-autobuild)
这里有一些由Github Action自动构建的服务端文件涵盖以下系统和架构![](https://r2.072103.xyz/fuwari-blog/img/2024-11-06-08-28-34-image.webp)
也可以前往[Multiplayer Server | Dmocken的Phira下载站](https://phira.dmocken.top/Multiplayer%20Server%E5%A4%9A%E4%BA%BA%E6%B8%B8%E6%88%8F%E6%9C%8D%E5%8A%A1%E5%99%A8)自行寻找
寻找适用于你的系统的文件下载下来并执行即可。默认服务端将会在你的主机12346端口上开放如果需要自定义端口请使用`--port`参数指定端口。然后即可使用Phira来填写IP/域名:端口来连接
*如果要显示Log请使用 `RUST_LOG=debug ./xxx` 去运行,默认日志等级是 `WARN`
如果这些文件不适用于你正在使用的系统请前往[自行构建(高级)](#自行构建高级)继续阅读
# 自行构建(高级)
由于phira-mp使用Rust编写若想要自行构建需要在你的操作系统上安装Rust环境
## 对于Windows
前往[Rust 下载页](https://www.rust-lang.org/zh-CN/learn/get-started),下载 Rust ![](https://r2.072103.xyz/fuwari-blog/img/2024-11-06-09-57-44-6b333b87e835dfa299b0c3c95e5ea4e0.webp)
打开后会弹出一个 CMD 窗口,输入 1Quick Install回车等待 Visual Studio 安装(如果此步 Visual Studio 下载很慢也可以[手动下载](https://visualstudio.microsoft.com/zh-hans/downloads/)
![](https://r2.072103.xyz/fuwari-blog/img/2024-11-06-09-57-49-61b4d36dc8cd1ce47da66be5e2a920cd.webp)在 Visual Studio 中,勾选**使用 C++ 的桌面开发**,然后安装
![](https://r2.072103.xyz/fuwari-blog/img/2024-11-06-09-58-05-390c775c83dc245b0690fda699bfee5f.webp)然后请跳过 Linux 教程直接阅读[构建 phira-mp]()
## 对于Linux
执行:`curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`
选择 1 回车
执行:`source $HOME/.cargo/env`
# 使用Rust构建phira-mp
克隆仓库:`git clone https://github.com/TeamFlos/phira-mp.git`不支持IPv6`git clone https://github.com/afoim/phira-mp-autobuild.git`支持IPv6
`cd phira-mp``cd phira-mp-autobuild`
更新依赖:`cargo update`
构建:`cargo build --release -p phira-mp-server`
运行程序并将 log 打印到终端,会显示你监听的端口:`RUST_LOG=info target/release/phira-mp-server`
(如果你需要指定端口号:`RUST_LOG=info target/release/phira-mp-server --port 8080`
![](https://r2.072103.xyz/fuwari-blog/img/2024-11-06-10-14-36-0dce4358b21773ae1261e7fc39339c32.webp)

View File

@@ -0,0 +1,92 @@
---
category: 教程
description: 使用NapCat连接NoneBot2打造自己的聊天机器人
draft: false
image: https://r2.072103.xyz/fuwari-blog/img/QmcMSSKysZmgUCUk9W7hQUvZCtVSFH6hGKHctg99yo1yDE.webp
lang: zh_CN
published: 2024-11-20
tags:
- QQBot
title: 使用NoneBot2搭建你的QQBot
---
# 安装 NapCat(Win)
> 用于登录 QQ 实现收发消息
1. 进入[Release NapCat V4.1.12 · NapNeko/NapCatQQ · GitHub](https://github.com/NapNeko/NapCatQQ/releases/latest),下载`NapCat.Shell.zip`
2. 将其解压到一个单独的文件夹,然后打开命令行,运行`launcher.bat <BOT QQ号>`
3. 运行后通过手机扫码登录
4. 它会打印本地控制台的地址信息,如:`[NapCat] [WebUi] WebUi Local Panel Url: http://127.0.0.1:6099/webui?token=4xldg5fqb1`
5. 直接进入如图配置即可端口号可以自己修改但是要和下部分NoneBot2监听的端口一致。这里是9090![](https://r2.072103.xyz/fuwari-blog/img/2024-11-20-19-21-21-2024-11-20-19-15-39-image.webp)
# 安装 NoneBot2
用于实现逻辑,控制 NapCat 收发消息
1. 首先,你得装[Python](https://www.python.org/downloads/)。Windows可以使用 https://scoop.sh/
2. pypi 清华源:`pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple`
3. 装 pipx`pip install pipx`。你也可以使用`scoop install pipx`
4. 设置 pipx 全局变量:`pipx ensurepath`
5. 装 nb-cli`pipx install nb-cli`
6. **如果找不到 nb 命令:** 对于 root 用户,你可以编辑 `/root/.bashrc``/root/.profile`(如果你使用的是 Bash `nano /root/.bashrc` 添加以下行: `export PATH="$HOME/.local/bin:$PATH"` 保存并重新加载配置: `source /root/.bashrc`
7. 装 nb bootstrap`nb self install nb-cli-plugin-bootstrap`
8. 新建项目,选一个你喜欢的文件夹,然后:`nb bs` (看不懂的就一路回车)
示例:
```
C:\afbot>nb bs
加载适配器列表中……
请输入项目名称
[?] 请输入 > onanibot
[?] 请选择你想要使用的适配器 OneBot V11 (OneBot V11 协议)
请输入 Bot 超级用户,超级用户拥有对 Bot 的最高权限(如对接 QQ 填 QQ 号即可)(留空回车结束输入)
[?] 第 1 项 >
请输入 Bot 昵称,消息以 Bot 昵称开头可以代替艾特(留空回车结束输入)
[?] 第 1 项 >
请输入 Bot 命令起始字符,消息以起始符开头将被识别为命令,
如果有一个指令为 查询,当该配置项中有 "/" 时使用 "/查询" 才能够触发,
留空将使用默认值 ['', '/', '#'](留空回车结束输入)
[?] 第 1 项 >
请输入 Bot 命令分隔符,一般用于二级指令,
留空将使用默认值 ['.', ' '](留空回车结束输入)
[?] 第 1 项 >
请输入 NoneBot2 监听地址,如果要对公网开放,改为 0.0.0.0 即可
[?] 请输入 > 127.0.0.1
请输入 NoneBot2 监听端口,范围 1 ~ 65535请保证该端口号与连接端配置相同或与端口映射配置相关
[?] 请输入 > 8080
[?] 是否在项目目录中释出快捷启动脚本? Yes
[?] 是否将 localstore 插件的存储路径重定向到项目路径下以便于后续迁移 Bot Yes
[?] 是否使用超级用户 Ping 指令回复插件? Yes
[?] 是否安装 logpile 插件提供日志记录到文件功能? Yes
[?] 是否在启动脚本中使用 webui 插件启动项目以使用网页管理 NoneBot该插件仍在开发中不推荐用于生产环境 No
成功新建项目 onanibot
[?] 是否新建虚拟环境? Yes
正在 C:\afbot\onanibot\.venv 中创建虚拟环境
创建虚拟环境成功
[?] 是否需要修改或清除 pip 的 PyPI 镜像源配置? No
[?] 是否立即安装项目依赖? Yes
正在安装项目依赖
依赖安装成功
[?] 请选择需要启用的内置插件
项目配置完毕,开始使用吧!
```
9. 项目创建完毕后启动:`nb run`
10. 出现:`[INFO] nonebot | OneBot V11 | Bot XXXXXXXXXX connected` 你就成功连接上 Lagrange 了
11. 测试,发个`/ping`看是否出现Pong~
12. 如果你要调试 NoneBot2请先使用`nb` 进入虚拟环境。然后使用`pip install <包名>`

295
src/content/posts/record.md Normal file
View File

@@ -0,0 +1,295 @@
---
category: 记录
description: 一些记录,不定时更新
draft: false
image: https://hpic.072103.xyz
lang: zh_CN
published: 1999-01-01
tags:
- Record
title: 记录
---
# 关于我的超链接
```html
<a href="https://link.me/acofork" target="_blank">关于我</a>
```
# r2.py所需依赖
```shell
pip install keyboard pyperclip pillow boto3 pyautogui
```
# ShellClash
> 用于在Linux上使用CLI来进行正向代理。通过导入标准的Clash `config.yaml` 来实现
https://github.com/juewuy/ShellCrash
Tg通知频道https://t.me/ShellClash
```shell
bash -c "$(curl -kfsSl https://raw-githubusercontent-com.acofork.us.kg/juewuy/ShellClash/master/install.sh)" && source /etc/profile &> /dev/null
```
打开CLIclash、crash
导入配置文件6-2
安装本地Web面板9-4-1
开机自启4-1
# Vless通用配置不加密
```json
{
"inbounds": [
{
"port": 1080, // 监听端口,可以根据需要修改
"protocol": "vless", // 使用 VLESS 协议
"settings": {
"clients": [
{
"id": "0721-07210721onani", // 这里是一个 UUID用于识别用户
"level": 0, // 用户等级,设置为 0 表示普通用户
"email": "user@example.com" // 用户邮箱(可选)
}
],
"decryption": "none" // 设置为 none表示没有加密
},
"streamSettings": {
"network": "tcp", // 使用 TCP 网络
"security": "none" // 不使用加密,适用于 VLESS
}
}
],
"outbounds": [
{
"protocol": "freedom", // 允许自由流量通过
"settings": {}
}
],
"routing": {
"rules": []
}
}
```
---
# AMD笔记本优化
> 目标关闭fTPM并且禁止系统重新安装、关闭Windows自动更新
- 关闭fTPM 组策略编辑器:`计算机配置 - 管理模板 - 系统 - 设备安装 - 设备安装限制 - 阻止安装与下列任何设备实例 ID 相匹配的设备` 填写:设备管理器中的**受信任的平台模块 2.0** 的`详细信息 - 设备实例路径`中的值
- 关闭Windows自动更新`计算机配置 - 管理模板 - Windows组件 - Windows更新`中的:
- 配置自动更新 - 已禁用
- 删除所有使用Windows更新功能的访问权限 - 已启用
- 不要连接任何Windows更新Internet位置 - 已启用
- Windows更新不包括驱动更新 - 已启用
---
# VPS融合怪测试脚本
```shell
bash <(curl -sL kejilion.sh)
```
- 融合怪测试8-32
- IP纯净度测试8-4
---
# 哪吒探针Cloudflare版
https://github.com/yumusb/nezha-new
---
# VPS一键魔法脚本
- Hysteria2UDP
```shell
bash <(curl -fsSL https://raw.githubusercontent.com/0x0129/hysteria2/main/install.sh) -port 0721
```
- Vless+Trojan+Shadowsocks
```shell
bash <(curl -s -L https://git.io/v2ray.sh)
```
- x-ui
```shell
bash <(curl -Ls https://raw.githubusercontent.com/vaxilu/x-ui/master/install.sh)
```
---
# Hysteria2 服务端搭建(全平台通用)
1. 下载 Hysteria2 可执行文件: https://github.com/apernet/hysteria/releases
2. 创建自签名SSL/TLS证书
- 创建私钥:`openssl genpkey -algorithm RSA -out hy2.key`
- 创建证书签名请求:`openssl req -new -key hy2.key -out hy2.csr`
- 创建证书:`openssl x509 -req -in hy2.csr -signkey hy2.key -out hy2.crt -days 9999`
3. `config.yaml`
```yaml
listen: :443
tls:
cert: hy2.crt
key: hy2.key
auth:
type: password
password: 0721
masquerade:
type: proxy
proxy:
url: https://news.ycombinator.com/
rewriteHost: true
```
4. 启动 Hysteria2参数`server`
5. V2Ray客户端连接直链
```shell
hysteria2://0721@10.147.17.1:443?sni=bing.com&insecure=1#家里云
```
---
# Cloudflare一键魔法
下载 https://github.com/cmliu/edgetunnel/archive/refs/heads/main.zip 将它上传到Cloudflare Pages设置UUID。访问 https://你的域名.pages.dev/UUID
---
# Cloudflare 优选方法
### A、AAAA、CNAME
1. B域名直接套CDN指向源站
2. B域名开启SaaS设置回退源为指向源站的域名自定义主机名为A域名
3. B域名指向优选域名不套CDN
4. A域名指向B域名指向的优选域名的域名 不套CDN
### Cloudflare Pages
1. 直接在Pages创建自定义域
2. 更改子域NS到阿里云云解析DNS
3. 在阿里云云解析DNS设置解析分流
### Cloudflare Workers
1. 直接在Workers创建路由example.com/*
2. 将被设置路由的域名解析到优选域名
---
## Cloudflare 优选域名
- [CM大佬](https://blog.cmliussss.com/)
```
cf.090227.xyz
```
- [微测网](https://www.wetest.vip/page/cloudflare/cname.html)
```
cloudflare.182682.xyz
```
- 移动快乐:
```
cf-saas.asia
```
---
# 魔法软件
Windows
https://github.com/2dust/v2rayN
Linux
https://github.com/2dust/v2rayNG
---
# 使用Cloudflared中继RDP流量
```shell
cloudflared access rdp --hostname rdp.onani.cn --url rdp://localhost:3380
```
---
# FRP相关
### FRP基本认证参数
```yaml
auth.token = "0721"
```
### FRP systemd服务配置开机自启
https://gofrp.org/zh-cn/docs/setup/systemd/
# Linux Deb系安装Speedtest-cli
```shell
apt install -y lsb-release ca-certificates apt-transport-https curl gnupg dpkg
curl -sSL https://packagecloud.io/ookla/speedtest-cli/gpgkey | gpg --dearmor > /usr/share/keyrings/speedtest.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/speedtest.gpg] https://packagecloud.io/ookla/speedtest-cli/debian/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/speedtest.list
apt update
apt install -y speedtest
```
---
# Linux监控面版
```shell
apt install s-tui
```
---
# Windows超级牛逼包管理器https://scoop.sh
---
# Linux各发行版安装注意
1. 非常新的版本一般才会有Realtek有线网卡的驱动
2. 安装Debian要使用CLI安装GUI安装会出现问题 ~~具体的问题我忘了~~
3. 安装CentOS/Rocky一定要先安装GUI否则会导致上不了网
4. 除了Arch连接网络使用iwd其他发行版都可以用nmcli连接网络
---
# 国内Linux镜像注意事项
1. ~~USTC中科大源经常会用JavaScript进行客户端验证会导致wget和curl命令无法正确下载到文件~~[绕过USTC的浏览器JS验证 | AcoFork Blog](https://www.onani.cn/posts/bypass-ustc-verifying/)。建议使用TUNA清华源
---
# 国内Docker镜像
- 1Panel Docker监控https://status.1panel.top/status/docker
- 南京大学GHCR镜像源https://ghcr.nju.edu.cn

View File

@@ -0,0 +1,16 @@
---
category: 教程
description: Replay是一个自动化的AI翻唱软件用户仅需要提供想要翻唱的歌和RVC模型Replay会自动进行人声分离并生成AI翻唱音频对于新手来说十分友好
draft: false
image: https://r2.072103.xyz/fuwari-blog/img/e3b7630170caac0dc92e9f62d510c1a8.webp
lang: ''
published: 2024-10-15
tags:
- Replay
title: 傻瓜式AI翻唱软件Replay选歌选模型然后CREATE SONG
---
### AI翻唱仅需两步
1. 前往[Replay | Free AI Voice Cloning and Stemming using RVC Models (tryreplay.io)](https://www.tryreplay.io/)下载Replay
2. 打开Replay首先根据引导下载数据包约11G。然后根据图片操作选择歌曲和模型最后点击 `CREATE SONG` 即可!![](https://r2.072103.xyz/fuwari-blog/img/59f2cc973405b81324f0472f5309ff6efa682ace.webp)![](https://r2.072103.xyz/fuwari-blog/img/2024-10-15-16-40-07-image.webp)

View File

@@ -0,0 +1,24 @@
---
category: 记录
description: 起因只是凌晨苏醒的灵机一动,然后...
draft: false
image: https://r2.072103.xyz/myblog/img/37fc1d0b-533f-4905-a7ff-ab906fcb1860.webp
lang: ''
published: 2025-04-04
tags:
- 生活
title: 卧室布局整改记录
---
# 前言
我的卧室曾经是这样的,如你所见,非常杂乱且布线乱七八糟
![](https://r2.072103.xyz/myblog/img/0c47e9a6-1544-4410-94d4-d319ea12ca70.webp)
# 契机
今天早上起来我灵机一动,想着要不要整理一下,于是变成了
![](https://r2.072103.xyz/myblog/img/a4db38f0-5a54-4e6c-8392-2375d775f7c6.webp)
结束咯~

View File

@@ -0,0 +1,28 @@
---
category: 随笔
description: Rewrite打完才发现MV一个没看到
draft: false
image: https://r2.072103.xyz/fuwari-blog/img/bafybeihhyuk3zjqkisf66swxft4j5srv3g7wozy3zn4ykpsh3cuveuuwb4
lang: ''
published: 2024-11-28
tags:
- Rewrite
title: 关于Rewrite MV无法播放\没有画面的解决方法
---
# 我使用的解决方法Windows 10及以上带有Microsoft Store的系统
安装这个即可
![image](https://r2.072103.xyz/fuwari-blog/img/bafkreieb2qknggudxx7sc723jheso6grhgemznjqb5n6yqwsrvgqkqn4ba)
然后游戏内改为Windows Media Player
![image](https://r2.072103.xyz/fuwari-blog/img/bafkreihujn3jctibvixv4trpsu5j4d2v7de2ibzea6xe6pzmithymffpqu)
# 汉化组提供的解决方法
安装:[K-Lite Basic解码器](https://www.codecguide.com/download_k-lite_codec_pack_basic.htm)
然后游戏内改为 MCI
![image](https://r2.072103.xyz/fuwari-blog/img/bafkreic7a3tnnoxyn646tzy35nec2oioz4ktffuizb5ge67ibww5ntnmpq)

View File

@@ -0,0 +1,39 @@
---
category: 教程
description: 因为本文涉猎敏感地带,所以仅供专业人士技术讨论,我也不会发布什么一键包,请按照教程自己动手
draft: false
image: https://r2.072103.xyz/myblog/img/36f34153-b96f-43ec-911e-8c3d65bc8aa0.webp
lang: ''
published: 2025-04-15
tags: []
title: 崩坏星穹铁道全局加速
---
# 原理剖析
注入一个DLL实现绕过ACE反作弊然后用CE的变速精灵
# 正式开始
确保你安装了Virtual Studio 2022 中的工作负载使用C++的桌面开发
克隆DLL源码仓库[GitHub - gmh5225/Honkai-StarRail-ACE-B: This repository provides code and instructions for bypassing the anti-cheat system in Honkai Star Rail game, allowing players to access previously restricted features and improve their gameplay experience. For informational purposes only. Use at your own risk.](https://github.com/gmh5225/Honkai-StarRail-ACE-B)
前往 [Releases · TsudaKageyu/minhook](https://github.com/TsudaKageyu/minhook/releases) 分别下载 `bin``lib` ,将其解压后寻找文件 `libMinHook.x64.lib``MinHook.h` 将其放到DLL源码仓库根目录
代码需要小改,这里省略
编译:
```shell
MSBuild star_rail.sln /p:Configuration=Release /p:Platform=x64 /property:GenerateFullPaths=true
```
产物在:
`\x64\Release\star_rail.dll`
前往 [Releases · master131/ExtremeInjector](https://github.com/master131/ExtremeInjector/releases) 下载并解压,得到 `Extreme Injector v3.exe`
正常打开游戏,运行 `Extreme Injector v3.exe` 选择游戏进程注入刚刚编译出来的DLL
前往 https://www.cheatengine.org/ 下载CE打开CE如果游戏没有闪退或者弹出反作弊窗口则证明注入成功。接下来选择游戏进程开启变速精灵2-5倍速即可。Enjoy it

View File

@@ -0,0 +1,145 @@
---
category: 记录
description: Serverless服务有很多静态托管就是重中之重来看看谁最稳定快速
draft: false
image: https://r2.072103.xyz/fuwari-blog/img/2024-11-28-08-37-49-image.png
lang: ''
published: 2024-11-28
tags:
- Vercel
- Cloudflare Page
- Netlify
- Surge
- Render
- Github Page
title: N款静态网站服务商的优缺点比较
---
在构建个人博客、项目展示或者静态网站时,选择合适的托管服务商非常重要。不同的服务商提供不同的功能和特性
#### 1. [Vercel](https://vercel.app/)
**优点**
- 支持PHP你可以部署Typecho
- 支持 Git 集成
- 访问速度非常快。最低50ms
- 注册简单
- 可绑定自定义域名,支持 HTTPS
**缺点**
- 免费版有一定限制,如带宽和构建时间。很容易被刷爆
- 目前不支持IPv6回源
#### 2. [Render](https://render.com/)
路边一条
#### 3. [Cloudflare Pages](https://dash.cloudflare.com/)
**优点**
- 支持与 Git 集成
- 注册简单
- 支持自定义域名绑定
- 刷不爆。静态资源全免费访问,不限次数不限带宽
- 支持全栈对接Worker D1 KV R2
**缺点**
- 太jb慢了。200ms朝上
#### 4. [TencentCloud EdgeOne](https://edgeone.ai/)
别用会吞Github提交导致你的网站卡在旧版我已经跑路了
#### 5. [Github Pages](https://github.com/)
**优点**
- 与 Git 集成,直接通过 GitHub 仓库进行部署
- 可以通过 GitHub Actions 实现 CI/CD 自动化
- 支持自定义域名绑定
**缺点**
- 国内访问可能会遇到 GitHub 阻断问题。如果你能连上,延迟很低
#### 6. [Fleek](https://fleek.xyz/)
**优点**
- 基于 IPFS支持去中心化存储。其他功能中规中矩
**缺点**
- 访问速度相对适中
#### 7. [Surge](https://surge.sh/)
**优点**
- 我觉得没有
- 示例Github Action进行CI/CD自动化将gh-pages发布到Surge
- ```yaml
name: Deploy to Surge
on:
repository_dispatch:
types: [deploy_surge] # 监听来自 build.yml 的自定义事件
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: gh-pages # 检出 gh-pages 分支
- name: Deploy to Surge
run: |
npm install -g surge
surge ./ https://acofork-blog.surge.sh --token ${{ secrets.SURGE_TOKEN }}
env:
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
```
**缺点**
- 要用命令行操作你可以对接Github Action
- 无法直接与 Git 集成
- 无法绑定自定义域名
#### 8. [Netlify](https://netlify.com/)
**优点**
- 我正在用的比CF快比Vercel慢
- 支持IPv6回源
**缺点**
- 注册门槛高到埃菲尔铁塔需要使用纯净IP和谷歌邮箱
- 想钱想疯了免费计划WAF一条规则不给配
### 总结
- **Vercel**:快,方便好用,大部分项目都可以部署
- **Netlify**要不是你支持IPv6回源我就去用Vercel了
- **Render**:我不知道
- **Cloudflare Pages**刷不爆方便对接Worker
- **Github Pages**:如果你能稳定连上,那延迟不错
- **Fleek**披着IPFS的皮的Amazon CDN
- **Surge**:你用这个?
- **Edge One**:路边
# 智能网关测速HTML代码
> 使用了这么多的节点肯定想要选择最快的或者在用户那边装逼所以这边给一个智能网关测速HTML代码它去请求了`https://acofork.us.kg/data.json`并且挨个给里面的`博客`节点测速然后自动选择最快的那个。如果你只是小项目使用可以使用硬编码这里就给出Git仓库
https://github.com/afoim/Smart_Gateway
# 简易导航页HTML代码
> 刚才说了“它去请求了`https://acofork.us.kg/data.json`并且挨个给里面的`博客`节点测速,然后自动选择最快的那个。”这就是`data.json`所在的地方
https://github.com/afoim/Web_test

View File

@@ -1,28 +0,0 @@
---
title: Include Video in the Posts
published: 2023-08-01
description: This post demonstrates how to include embedded video in a blog post.
tags: [Example, Video]
category: Examples
draft: false
---
Just copy the embed code from YouTube or other platforms, and paste it in the markdown file.
```yaml
---
title: Include Video in the Post
published: 2023-10-19
// ...
---
<iframe width="100%" height="468" src="https://www.youtube.com/embed/5gIf0_xpFPI?si=N1WTorLKL0uwLsU_" title="YouTube video player" frameborder="0" allowfullscreen></iframe>
```
## YouTube
<iframe width="100%" height="468" src="https://www.youtube.com/embed/5gIf0_xpFPI?si=N1WTorLKL0uwLsU_" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
## Bilibili
<iframe width="100%" height="468" src="//player.bilibili.com/player.html?bvid=BV1fK4y1s7Qf&p=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"> </iframe>

59
src/content/posts/vpn.md Normal file
View File

@@ -0,0 +1,59 @@
---
category: 教程
description: 不要再买机场了!自建它不香吗?!
draft: false
image: https://r2.072103.xyz/fuwari-blog/img/2024-11-21-08-24-54-image.png
lang: ''
published: 2024-11-22
tags: []
title: 自建正向代理服务器
---
# 将Cloudflare作为代理使用Vless - EdgeTunnel
下面内容参考自:[CF VLESS 从入门到精通 cmliu/edgetunnel 必看内容 免费节点 优选订阅 Workers & Pages CM喂饭干货满满24 | CMLiussss Blog](https://vercel.blog.cmliussss.com/p/CM24/) 请支持原创作者!
1. https://github.com/cmliu/edgetunnel/archive/refs/heads/main.zip 将它上传到你的Cloudflare Pages项目没有Cloudflare账号先去因特网上搜索教程注册一个如果遇到卡慢可以试试看科学上网
2. 进入 https://it-tools.tech/uuid-generator 随机获取一个uuid
3. 添加一个名称为`UUID`的变量绑定,值为第二步随机获取的(请不要泄露给他人!)
4. 重新上传第一步的`main.zip`。让Cloudflare重新部署page以适配新变量
5. 前往Pages项目 -> 自定义域:绑定自定义域名。(没有域名?推荐 https://nic.us.kg https://www.cloudns.net 。可以自行前往因特网搜索教程这里不再赘述。也可以不绑定直接使用cf分配的`pages.dev`域名。但是,部分地区`pages.dev`可能无法访问或者较易和谐)
6. 通过 `https://你的自定义域名/uuid` 查看仪表盘
7. 如图复制链接打开V2Ray导入。V2Ray客户端下载地址在文章最后
8. ![](https://r2.072103.xyz/fuwari-blog/img/2024-11-24-00-17-22-image.png)
9. 500Mbps的移动宽带通过edgetunnel测速速度如下。测速网址 https://fast.com
10. ![](https://r2.072103.xyz/fuwari-blog/img/2024-11-22-09-08-38-image.png)
11. 如果你就是想要最低延迟可以去用cfnat这里放一个Windows的链接 https://www.youtube.com/watch?v=N2Y9TsiBgls 其他平台可以自行前往CM的YouTube查找
12. **注意edgetunnel近期在Cloudflare新号上可能会报错1101这可能并不是你的配置问题而是被cf风控了。解决方案是删除原项目重新部署一遍不要用一样的项目名你也可以多弄几个其他的正常pages或workers项目做伪装博主使用新号实测被gank了3次每一次都换名字删除pages然后重新部署然后一直稳定到现在**
13. **本人实测在全天使用edgetunnel的情况下已经使用了大部分的配额所以请不要将自己的项目分享给别人也不要拿去卖自己注册简简单单**
14. 如图为博主半天的使用量我只是上了上Telegram~
15. ![](https://r2.072103.xyz/fuwari-blog/img/2024-11-26-16-07-50-image.png)
# 将你自己的国外VPS作为代理使用
## 使用新协议Hysteria2
可以前往这两个仓库进行一键安装~
[https://github.com/0x0129/hysteria2](https://github.com/0x0129/hysteria2)
[https://github.com/seagullz4/hysteria2](https://github.com/seagullz4/hysteria2)
大致安装过程自签名不使用acme不使用端口跳跃
客户端Hiddify
[https://github.com/hiddify/hiddify-app](https://github.com/hiddify/hiddify-app)
其他客户端在第二个Github Repo获取
## 使用旧协议V2Ray
[https://github.com/233boy/v2ray](https://github.com/233boy/v2ray)
VPS安装脚本`bash <(curl -s -L https://git.io/v2ray.sh)`
详细安装:脚本执行完毕后输入`v2ray`更改配置为Shadowsocks
Windows客户端 [Releases · 2dust/v2rayN · GitHub](https://github.com/2dust/v2rayN/releases)
Android客户端 [Releases · 2dust/v2rayNG · GitHub](https://github.com/2dust/v2rayNG/releases)

View File

@@ -1,5 +1,5 @@
# About
This is the demo site for [Fuwari](https://github.com/saicaca/fuwari).
# 关于
Fuwari牛逼 [Fuwari](https://github.com/saicaca/fuwari).
::github{repo="saicaca/fuwari"}