From 246e54b90776f79932188546c5433fd7eb5c065a Mon Sep 17 00:00:00 2001 From: ylhan Date: Wed, 26 Aug 2026 22:37:50 +0800 Subject: [PATCH] =?UTF-8?q?Initial=20commit:=20=E8=87=AA=E5=BB=BA=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=20(Caddy/Gitea/Si?= =?UTF-8?q?lverBullet/sshwifty)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 19 ++ .gitmodules | 3 + Caddyfile | 48 ++++ caddy-build/Dockerfile | 10 + docker-compose.yml | 57 ++++ homepage/index.html | 576 +++++++++++++++++++++++++++++++++++++++++ space/HOME.md | 32 +++ space/note | 1 + sshwifty.conf.json | 52 ++++ 9 files changed, 798 insertions(+) create mode 100644 .gitignore create mode 100644 .gitmodules create mode 100644 Caddyfile create mode 100644 caddy-build/Dockerfile create mode 100644 docker-compose.yml create mode 100644 homepage/index.html create mode 100644 space/HOME.md create mode 160000 space/note create mode 100644 sshwifty.conf.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2f31945 --- /dev/null +++ b/.gitignore @@ -0,0 +1,19 @@ +# ---- Caddy 运行时数据 / 配置(由程序生成,不推送) ---- +caddy_data/ +caddy_config/ + +# ---- Gitea 运行时数据(git 仓库、数据库、SSH 密钥等,敏感) ---- +gitea/ + +# ---- SilverBullet 运行时内容与密钥 ---- +space/Library/ +space/.silverbullet.auth.json +space/key + +# ---- 本机工具本地配置 ---- +.claude/ + +# ---- 备份 / 编辑器临时文件 ---- +Caddyfile.bak +*~ +*.swp \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..89632d0 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "space/note"] + path = space/note + url = https://git.hyonglin.top/ylhan/note_sync.git diff --git a/Caddyfile b/Caddyfile new file mode 100644 index 0000000..c8e7d28 --- /dev/null +++ b/Caddyfile @@ -0,0 +1,48 @@ +# www → 主域名 301 重定向 +www.hyonglin.top { + tls { + dns cloudflare {env.CF_API_TOKEN} + } + redir https://hyonglin.top{path} 301 +} + +# 主页 +hyonglin.top { + tls { + dns cloudflare {env.CF_API_TOKEN} + } + root * /srv/homepage + file_server +} + +# frp 管理面板 +frp.hyonglin.top { + tls { + dns cloudflare {env.CF_API_TOKEN} + } + reverse_proxy host.docker.internal:7500 +} + +# 笔记 +note.hyonglin.top { + tls { + dns cloudflare {env.CF_API_TOKEN} + } + reverse_proxy silverbullet:3000 +} + +# 网页 SSH 终端 +ssh.hyonglin.top { + tls { + dns cloudflare {env.CF_API_TOKEN} + } + reverse_proxy sshwifty:8182 +} + +# Git 服务 +git.hyonglin.top { + tls { + dns cloudflare {env.CF_API_TOKEN} + } + reverse_proxy gitea:3000 +} diff --git a/caddy-build/Dockerfile b/caddy-build/Dockerfile new file mode 100644 index 0000000..b285429 --- /dev/null +++ b/caddy-build/Dockerfile @@ -0,0 +1,10 @@ +FROM caddy:builder AS builder + +ENV GOPROXY=https://goproxy.cn,direct + +RUN xcaddy build \ + --with github.com/caddy-dns/cloudflare + +FROM caddy:latest + +COPY --from=builder /usr/bin/caddy /usr/bin/caddy diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..75b7539 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,57 @@ +services: + silverbullet: + image: ghcr.io/silverbulletmd/silverbullet:latest + container_name: silverbullet + restart: unless-stopped + volumes: + - ./space:/space + environment: + - SB_USER=lin:YL@han0824 + - SB_INDEX_PAGE=HOME + + caddy: + image: caddy-cloudflare:latest + container_name: caddy + restart: unless-stopped + ports: + - "80:80" + - "443:443" + dns: + - 8.8.8.8 + - 1.1.1.1 + extra_hosts: + - "host.docker.internal:host-gateway" + environment: + - CF_API_TOKEN=cfut_kQ3VQLZJD9opDWGh2PmdZwU3n8NqOUmwegTBafMG26a806eb + volumes: + - ./Caddyfile:/etc/caddy/Caddyfile + - ./caddy_data:/data + - ./caddy_config:/config + - ./homepage:/srv/homepage + + sshwifty: + image: niruix/sshwifty:latest + container_name: sshwifty + restart: unless-stopped + environment: + - SSHWIFTY_CONFIG=/etc/sshwifty.conf.json + volumes: + - ./sshwifty.conf.json:/etc/sshwifty.conf.json + + gitea: + image: gitea/gitea:latest + container_name: gitea + restart: unless-stopped + environment: + - USER_UID=1000 + - USER_GID=1000 + - GITEA__server__ROOT_URL=https://git.hyonglin.top/ + - GITEA__server__DOMAIN=git.hyonglin.top + - GITEA__server__SSH_DOMAIN=git.hyonglin.top + - GITEA__server__SSH_PORT=2222 + ports: + - "2222:22" + volumes: + - ./gitea:/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro diff --git a/homepage/index.html b/homepage/index.html new file mode 100644 index 0000000..da5870c --- /dev/null +++ b/homepage/index.html @@ -0,0 +1,576 @@ + + + + + + + hyonglin.top + + + + +
+ +
+
+

hyonglin.top

+

个人服务导航 · 随时可达

+
+
+
天气
+
☀️获取中…
+
+
+
+
日期
+
----
+
+
+
时间
+
--:--:--
+
+
+ +
+ + + +
hyonglin.top
+
+ + + + \ No newline at end of file diff --git a/space/HOME.md b/space/HOME.md new file mode 100644 index 0000000..6321d1a --- /dev/null +++ b/space/HOME.md @@ -0,0 +1,32 @@ +# 📓 我的笔记 + +**平凡而扎实的知识仓库** · *By Lin* + +--- + +## 🕘 最近更新 + +${query[[ + from p = index.contentPages() + where p.ref.startsWith("note/") + order by p.lastModified desc + limit 8 + select templates.fullPageItem(p) +]]} + +--- + +## 📚 分类板块 + +| | 板块 | 说明 | +|:--:|:--|:--| +| 🧠 | [[note/大模型]] | Transformer · MoE · FFN · 多模态 | +| 🗺️ | [[note/ros]] | ROS2 · Nav2 · 底盘通信 | +| ⚙️ | [[note/AI_compiler]] | IREE / AI 编译器学习笔记 | +| 🛠️ | [[note/工作]] | VCU 控制 · 履带车 · 机械臂 | +| 🛡️ | [[note/自建服务]] | frp · Gitea · Caddy · sshwifty | +| 📈 | [[note/技术趋势]] | AI 编译器现状与前景 | + +--- + +> 💡 左侧面板可浏览完整目录;右上角搜索(`Ctrl+K`)全局查找。 \ No newline at end of file diff --git a/space/note b/space/note new file mode 160000 index 0000000..8a4210f --- /dev/null +++ b/space/note @@ -0,0 +1 @@ +Subproject commit 8a4210f3803eed236a51af9081da330a62eaf2fb diff --git a/sshwifty.conf.json b/sshwifty.conf.json new file mode 100644 index 0000000..16261c5 --- /dev/null +++ b/sshwifty.conf.json @@ -0,0 +1,52 @@ +{ + "HostName": "", + "SharedKey": "han", + "DialTimeout": 10, + "Servers": [ + { + "ListenInterface": "0.0.0.0", + "ListenPort": 8182, + "InitialTimeout": 3, + "ReadTimeout": 60, + "WriteTimeout": 60, + "HeartbeatTimeout": 20, + "ReadDelay": 10, + "WriteDelay": 10, + "TLSCertificateFile": "", + "TLSCertificateKeyFile": "" + } + ], + "Presets": [ + { + "Title": "pc01", + "Type": "SSH", + "Host": "hyonglin.top:2201", + "Meta": { + "User": "ylhan", + "Encoding": "utf-8", + "Authentication": "Password" + } + }, + { + "Title": "pc02", + "Type": "SSH", + "Host": "hyonglin.top:2202", + "Meta": { + "User": "ylhan", + "Encoding": "utf-8", + "Authentication": "Password" + } + }, + { + "Title": "云服务器", + "Type": "SSH", + "Host": "hyonglin.top:22", + "Meta": { + "User": "ubuntu", + "Encoding": "utf-8", + "Authentication": "Password" + } + } + ], + "OnlyAllowPresetRemotes": false +}