Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1047 commits
Select commit Hold shift + click to select a range
367e9be
Delete 少年你相信光吗
byJoey Oct 29, 2025
1177f44
Update obfuscate.yml
byJoey Oct 29, 2025
d483c07
Delete _worker.js
byJoey Oct 29, 2025
ecc575d
少年你相信光吗
github-actions[bot] Oct 29, 2025
51dfb68
支持自动部署
byJoey Oct 29, 2025
eb4ed2a
少年你相信光吗
github-actions[bot] Oct 29, 2025
6d90662
Create workers.js
byJoey Oct 29, 2025
863dcd2
Delete worker.js
byJoey Oct 29, 2025
94b4016
Delete functions directory
byJoey Oct 29, 2025
1db1b2f
少年你相信光吗
github-actions[bot] Oct 29, 2025
eabfc5f
Update wrangler.toml
byJoey Oct 29, 2025
14cf159
Update obfuscate.yml
byJoey Oct 29, 2025
9eb310d
少年你相信光吗
github-actions[bot] Oct 29, 2025
cc4a871
Update wrangler.toml
byJoey Oct 29, 2025
8611584
Update obfuscate.yml
byJoey Oct 29, 2025
d8d55d6
少年你相信光吗
github-actions[bot] Oct 29, 2025
b3a6d90
Update worker.js
byJoey Oct 29, 2025
5a1b7a5
Update obfuscate.yml
byJoey Oct 29, 2025
d3f619e
少年你相信光吗
github-actions[bot] Oct 29, 2025
adce6d7
少年你相信光吗
github-actions[bot] Oct 29, 2025
166d956
Delete wrangler.toml
byJoey Oct 29, 2025
5e2ec54
Delete worker.js
byJoey Oct 29, 2025
586b971
Update obfuscate.yml
byJoey Oct 29, 2025
08c6e70
少年你相信光吗
github-actions[bot] Oct 29, 2025
72fff5a
少年你相信光吗
github-actions[bot] Oct 29, 2025
de465de
少年你相信光吗
github-actions[bot] Oct 29, 2025
d7c8bd1
少年你相信光吗
github-actions[bot] Oct 29, 2025
944b8c9
少年你相信光吗
github-actions[bot] Oct 29, 2025
9ffd563
少年你相信光吗
github-actions[bot] Oct 29, 2025
3c8f7c7
少年你相信光吗
github-actions[bot] Oct 29, 2025
b633e75
少年你相信光吗
github-actions[bot] Oct 29, 2025
0174584
少年你相信光吗
github-actions[bot] Oct 29, 2025
84a2794
少年你相信光吗
github-actions[bot] Oct 29, 2025
0710ac1
少年你相信光吗
github-actions[bot] Oct 29, 2025
13b4607
少年你相信光吗
github-actions[bot] Oct 30, 2025
9c867d4
少年你相信光吗
github-actions[bot] Oct 30, 2025
3d0dd57
少年你相信光吗
github-actions[bot] Oct 30, 2025
282c5c4
少年你相信光吗
github-actions[bot] Oct 30, 2025
e946c42
少年你相信光吗
github-actions[bot] Oct 30, 2025
c48390c
少年你相信光吗
github-actions[bot] Oct 30, 2025
72c3caf
少年你相信光吗
github-actions[bot] Oct 30, 2025
f09478f
少年你相信光吗
github-actions[bot] Oct 30, 2025
a31c2d7
大版本更新引入新特性新协议
byJoey Oct 30, 2025
211acb0
大版本更新
byJoey Oct 30, 2025
dc64c7f
Update README.md
byJoey Oct 30, 2025
4144c7b
少年你相信光吗
github-actions[bot] Oct 30, 2025
c992901
少年你相信光吗
github-actions[bot] Oct 30, 2025
45ed43f
Update 明文源吗
byJoey Oct 30, 2025
446c18d
少年你相信光吗
github-actions[bot] Oct 30, 2025
35f4ab5
Update 明文源吗
byJoey Oct 30, 2025
ba08329
少年你相信光吗
github-actions[bot] Oct 30, 2025
8fb5a3b
少年你相信光吗
github-actions[bot] Oct 30, 2025
e65c4e0
Update 明文源吗
byJoey Oct 30, 2025
a782630
少年你相信光吗
github-actions[bot] Oct 30, 2025
57d066e
Update 明文源吗
byJoey Oct 30, 2025
125825d
少年你相信光吗
github-actions[bot] Oct 30, 2025
6b5c126
Update 明文源吗
byJoey Oct 30, 2025
c0d8b03
少年你相信光吗
github-actions[bot] Oct 30, 2025
e63c8a0
Update 明文源吗
byJoey Oct 30, 2025
7a2da39
少年你相信光吗
github-actions[bot] Oct 30, 2025
442d866
支持quanx
byJoey Oct 30, 2025
21192d4
少年你相信光吗
github-actions[bot] Oct 30, 2025
55777f0
少年你相信光吗
github-actions[bot] Oct 30, 2025
ae0fb4f
x
byJoey Oct 30, 2025
a0c2be7
少年你相信光吗
github-actions[bot] Oct 30, 2025
c457d0e
Update 明文源吗
byJoey Oct 30, 2025
72cbf41
少年你相信光吗
github-actions[bot] Oct 30, 2025
34b5ad5
?ed=2048干掉
byJoey Oct 30, 2025
a09bc58
少年你相信光吗
github-actions[bot] Oct 30, 2025
e6b317f
少年你相信光吗
github-actions[bot] Oct 30, 2025
2159117
少年你相信光吗
github-actions[bot] Oct 30, 2025
867d956
少年你相信光吗
github-actions[bot] Oct 30, 2025
685ecdb
少年你相信光吗
github-actions[bot] Oct 30, 2025
08cd964
Update 明文源吗
byJoey Oct 30, 2025
7c1a5fe
Update README.md
byJoey Oct 30, 2025
93d957d
少年你相信光吗
github-actions[bot] Oct 30, 2025
80a089e
Update README.md
byJoey Oct 30, 2025
015326f
Update 明文源吗
byJoey Oct 30, 2025
d87f5f1
Update 明文源吗
byJoey Oct 30, 2025
a78f02b
少年你相信光吗
github-actions[bot] Oct 30, 2025
1986d84
cnm1101
byJoey Oct 30, 2025
0f54fe1
少年你相信光吗
github-actions[bot] Oct 30, 2025
211ec2d
Update README.md
byJoey Oct 30, 2025
ab16969
少年你相信光吗
github-actions[bot] Oct 30, 2025
11ed824
Update 明文源吗
byJoey Oct 30, 2025
90ce8e7
少年你相信光吗
github-actions[bot] Oct 30, 2025
399f707
放弃
byJoey Oct 30, 2025
cd13fe0
Update 明文源吗
byJoey Oct 30, 2025
0a54604
少年你相信光吗
github-actions[bot] Oct 30, 2025
79b53ee
少年你相信光吗
github-actions[bot] Oct 30, 2025
1c167e5
少年你相信光吗
github-actions[bot] Oct 30, 2025
170ef7e
少年你相信光吗
github-actions[bot] Oct 30, 2025
3de84d5
少年你相信光吗
github-actions[bot] Oct 30, 2025
81afc87
少年你相信光吗
github-actions[bot] Oct 30, 2025
99865dc
少年你相信光吗
github-actions[bot] Oct 30, 2025
faa2b50
少年你相信光吗
github-actions[bot] Oct 31, 2025
6ade5be
少年你相信光吗
github-actions[bot] Oct 31, 2025
bd38a8b
少年你相信光吗
github-actions[bot] Oct 31, 2025
f340248
少年你相信光吗
github-actions[bot] Oct 31, 2025
5bcc779
少年你相信光吗
github-actions[bot] Oct 31, 2025
5b94d33
修复部分提示乱码
byJoey Oct 31, 2025
d5753ae
少年你相信光吗
github-actions[bot] Oct 31, 2025
daddc4b
少年你相信光吗
github-actions[bot] Oct 31, 2025
d4096dd
Update obfuscate.yml
byJoey Oct 31, 2025
8ea35c7
少年你相信光吗
github-actions[bot] Oct 31, 2025
541c902
Update 明文源吗
byJoey Oct 31, 2025
209b30d
少年你相信光吗
github-actions[bot] Oct 31, 2025
4a53c97
少年你相信光吗
github-actions[bot] Oct 31, 2025
1a7f6cb
解决指定区域后需要重启浏览器
byJoey Oct 31, 2025
60a6001
少年你相信光吗
github-actions[bot] Oct 31, 2025
03608a5
降低混淆提高速度
byJoey Oct 31, 2025
359d076
Update obfuscate.yml
byJoey Oct 31, 2025
c77ff9b
少年你相信光吗
github-actions[bot] Oct 31, 2025
7ea6976
少年你相信光吗
github-actions[bot] Oct 31, 2025
56ea55e
少年你相信光吗
github-actions[bot] Oct 31, 2025
a60b562
少年你相信光吗
github-actions[bot] Oct 31, 2025
d330c20
Update README.md
byJoey Oct 31, 2025
ab13b9f
少年你相信光吗
github-actions[bot] Oct 31, 2025
ef90704
留着不建议部署
byJoey Oct 31, 2025
1b9e8fe
不喜欢折腾的选这个
byJoey Oct 31, 2025
045d948
少年你相信光吗
github-actions[bot] Oct 31, 2025
7b1d7ae
少年你相信光吗
github-actions[bot] Oct 31, 2025
3749448
Delete 少年你相信光吗 稳定版
byJoey Oct 31, 2025
2d78ed5
少年你相信光吗
github-actions[bot] Oct 31, 2025
8e74fa0
少年你相信光吗
github-actions[bot] Oct 31, 2025
5d3ed44
Update obfuscate.yml
joeyblogtest Oct 31, 2025
535a687
提升性能
byJoey Oct 31, 2025
0b922b4
每一小时混淆一次自动能用就别更新了
github-actions[bot] Oct 31, 2025
e56ec8b
每一小时混淆一次自动能用就别更新了
github-actions[bot] Oct 31, 2025
b79e827
每一小时混淆一次自动能用就别更新了
github-actions[bot] Oct 31, 2025
53bb7d5
每一小时混淆一次自动能用就别更新了
github-actions[bot] Oct 31, 2025
477f171
每一小时混淆一次自动能用就别更新了
github-actions[bot] Oct 31, 2025
6c2fbf2
每一小时混淆一次自动能用就别更新了
github-actions[bot] Oct 31, 2025
e45332d
每一小时混淆一次自动能用就别更新了
github-actions[bot] Oct 31, 2025
18080cb
每一小时混淆一次自动能用就别更新了
github-actions[bot] Oct 31, 2025
9cea341
每一小时混淆一次自动能用就别更新了
github-actions[bot] Nov 1, 2025
f4013b5
每一小时混淆一次自动能用就别更新了
github-actions[bot] Nov 1, 2025
820c26d
每一小时混淆一次自动能用就别更新了
github-actions[bot] Nov 1, 2025
e9c86b9
每一小时混淆一次自动能用就别更新了
github-actions[bot] Nov 1, 2025
63ddaf2
每一小时混淆一次自动能用就别更新了
github-actions[bot] Nov 1, 2025
1fa9e42
每一小时混淆一次自动能用就别更新了
github-actions[bot] Nov 1, 2025
9a45c97
每一小时混淆一次自动能用就别更新了
github-actions[bot] Nov 1, 2025
2431e21
每一小时混淆一次自动能用就别更新了
github-actions[bot] Nov 1, 2025
d17a3de
每一小时混淆一次自动能用就别更新了
github-actions[bot] Nov 1, 2025
02504cd
每一小时混淆一次自动能用就别更新了
github-actions[bot] Nov 1, 2025
e93d1b6
每一小时混淆一次自动能用就别更新了
github-actions[bot] Nov 1, 2025
048fee3
每一小时混淆一次自动能用就别更新了
github-actions[bot] Nov 1, 2025
b2cf2fd
v2.1
byJoey Nov 1, 2025
e01c8ca
2.1
byJoey Nov 1, 2025
8ec72d7
v2.1
byJoey Nov 1, 2025
1d3be8a
每一小时混淆一次自动能用就别更新了
github-actions[bot] Nov 1, 2025
efcc00d
每一小时混淆一次自动能用就别更新了
github-actions[bot] Nov 1, 2025
588b7ee
Update 明文源吗
byJoey Nov 1, 2025
e591d6d
每一小时混淆一次自动能用就别更新了
github-actions[bot] Nov 1, 2025
6d5784a
每一小时混淆一次自动能用就别更新了
github-actions[bot] Nov 1, 2025
91bbf49
Update 明文源吗
byJoey Nov 1, 2025
325b721
每一小时混淆一次自动能用就别更新了
github-actions[bot] Nov 1, 2025
9cadcb4
Update 明文源吗
byJoey Nov 1, 2025
c82112c
每一小时混淆一次自动能用就别更新了
github-actions[bot] Nov 1, 2025
e42fc96
每一小时混淆一次自动能用就别更新了
github-actions[bot] Nov 1, 2025
9c19bf3
Update README.md
byJoey Nov 1, 2025
43c1229
Update README.md
byJoey Nov 1, 2025
ddb76c1
Update README.md
byJoey Nov 1, 2025
772e5e7
每一小时混淆一次自动能用就别更新了
github-actions[bot] Nov 1, 2025
24ebeab
Update obfuscate.yml
joeyblogtest Nov 1, 2025
49696f9
Merge pull request #73 from joeyblogtest/patch-4
byJoey Nov 1, 2025
871a98c
Delete 经典版
byJoey Nov 1, 2025
71e13d4
Delete 少年你相信光吗
byJoey Nov 1, 2025
b47e749
少年你相信光吗支持自动部署
github-actions[bot] Nov 1, 2025
56ea32e
Update obfuscate.yml
byJoey Nov 1, 2025
1059ecd
Delete _worker.js
byJoey Nov 1, 2025
867d22d
部署用这个
github-actions[bot] Nov 1, 2025
56ec501
wspath不编码
byJoey Nov 1, 2025
b75a4a1
部署用这个
github-actions[bot] Nov 1, 2025
ea13f04
wspath
byJoey Nov 1, 2025
3a1f7df
部署用这个
github-actions[bot] Nov 1, 2025
f022a01
支持就近响应等特性
joeyblogtest Nov 2, 2025
2091ac4
Merge pull request #75 from joeyblogtest/patch-5
byJoey Nov 2, 2025
51ea98f
支持新特性 速度无敌
byJoey Nov 2, 2025
cd17113
干掉了 一些可能不兼容的参数
byJoey Nov 3, 2025
681f709
部署用这个
github-actions[bot] Nov 3, 2025
414d0f5
Update README.md
byJoey Nov 3, 2025
88f651d
修复小火箭部分网页打不开
joeyblogtest Nov 3, 2025
39c28e0
部署用这个
github-actions[bot] Nov 3, 2025
67a8914
修复小火箭部分网页打不开
byJoey Nov 3, 2025
f23670a
部署用这个
github-actions[bot] Nov 3, 2025
4dfa5b9
修复小火箭部分网页不可用
byJoey Nov 3, 2025
1d6d624
自动更新准备
byJoey Nov 4, 2025
299ab5b
Create test.yml
byJoey Nov 4, 2025
8f88556
部署: 更新 _worker.js 文件 (标签: v2.1)
github-actions[bot] Nov 4, 2025
1f5c84d
Delete _worker.js
byJoey Nov 4, 2025
ccd086d
Update test.yml
byJoey Nov 4, 2025
be1dc0d
部署用这个
github-actions[bot] Nov 4, 2025
761fc61
没有新功能更新 仅仅修复明文部署
byJoey Nov 5, 2025
28a16cb
部署用这个
github-actions[bot] Nov 5, 2025
5445c28
Update 明文源吗
byJoey Nov 5, 2025
b4afdf9
部署用这个
github-actions[bot] Nov 5, 2025
5e111ce
Update test.yml
byJoey Nov 5, 2025
3434ef3
加入波斯语支持
byJoey Nov 5, 2025
972bfde
部署用这个
github-actions[bot] Nov 5, 2025
44bc723
Update README.md
byJoey Nov 5, 2025
1700aed
Create فارسی
byJoey Nov 5, 2025
4e0b49b
Update and rename فارسی to فارسی.md
byJoey Nov 5, 2025
b6339f8
Update README.md
byJoey Nov 5, 2025
45b088c
Update README.md
byJoey Nov 5, 2025
ba946cf
Update README.md
byJoey Nov 5, 2025
c9ac8c0
Update فارسی.md
byJoey Nov 5, 2025
e7d6bf6
Update فارسی.md
byJoey Nov 5, 2025
35362d2
Update فارسی.md
byJoey Nov 5, 2025
71f2f36
加入波斯语翻译 机翻
byJoey Nov 5, 2025
ec7bbd3
部署用这个
github-actions[bot] Nov 5, 2025
a64f9ad
Update فارسی.md
byJoey Nov 5, 2025
9334ea1
Update README.md
byJoey Nov 5, 2025
bddc8ed
Update فارسی.md
byJoey Nov 5, 2025
7c0eb8e
Update 明文源吗
byJoey Nov 5, 2025
7164983
部署用这个
github-actions[bot] Nov 5, 2025
9cf06ed
支持自定义首页伪装
byJoey Nov 5, 2025
dbd46f3
部署用这个
github-actions[bot] Nov 5, 2025
389004f
Update 明文源吗
byJoey Nov 5, 2025
8856f36
部署用这个
github-actions[bot] Nov 5, 2025
b5a2699
v2.2 加入群友要求的首页伪装功能
byJoey Nov 5, 2025
91b075b
部署用这个
github-actions[bot] Nov 5, 2025
52c8fac
Update README.md
byJoey Nov 5, 2025
c38d0ea
Update فارسی.md
byJoey Nov 5, 2025
86c1358
v2.2 加入群友要求的首页伪装功能
joeyblogtest Nov 7, 2025
3ba1fc5
v2.2 加入群友要求的首页伪装功能
byJoey Nov 7, 2025
d4111b2
部署用这个
github-actions[bot] Nov 7, 2025
d4382ec
Update test.yml
byJoey Nov 7, 2025
92641e8
Update test.yml
byJoey Nov 7, 2025
97210ed
修复socks5开启降级不生效问题
DarknessBeforeDawn Nov 8, 2025
ffa322f
部署用这个
github-actions[bot] Nov 8, 2025
8054a79
Merge pull request #113 from DarknessBeforeDawn/patch-1
byJoey Nov 8, 2025
1e0a8de
部署用这个
github-actions[bot] Nov 8, 2025
51f5a1f
修bug
byJoey Nov 9, 2025
1e88aa0
部署用这个
github-actions[bot] Nov 9, 2025
5cb4d76
尝试修复请求数量移除
byJoey Nov 10, 2025
6a43189
部署用这个
github-actions[bot] Nov 10, 2025
3746905
修复请求过多
byJoey Nov 10, 2025
aaba312
部署用这个
github-actions[bot] Nov 10, 2025
3c59ed5
Update 明文源吗
byJoey Nov 10, 2025
adf8b6b
部署用这个
github-actions[bot] Nov 10, 2025
cd16b70
Update 明文源吗
byJoey Nov 10, 2025
5b4b35b
部署用这个
github-actions[bot] Nov 10, 2025
762590d
v2.6
byJoey Nov 21, 2025
ed5258c
部署用这个
github-actions[bot] Nov 21, 2025
6f654d6
2.6
byJoey Nov 21, 2025
2b901ee
部署用这个
github-actions[bot] Nov 21, 2025
e5b0cd3
修复AI
byJoey Nov 22, 2025
dd0a3d5
部署用这个
github-actions[bot] Nov 22, 2025
fdc458a
Create mi.yaml
cnmeeia Nov 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions .github/workflows/mi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Sync and Deploy

on:
schedule:
- cron: '0 0 * * *' # Run daily at midnight
workflow_dispatch: # Allow manual trigger

jobs:
sync-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: write # Needed to push changes

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for merging

- name: Configure Git
run: |
git config --global user.name 'GitHub Actions Bot'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'

- name: Sync with Upstream
id: sync
run: |
# --- CONFIGURATION ---
# REPLACE THIS WITH THE UPSTREAM REPOSITORY URL
UPSTREAM_URL="https://github.com/EXAMPLE_USER/EXAMPLE_REPO.git"
UPSTREAM_BRANCH="main" # Change if upstream uses 'master' or another branch
# ---------------------

if [ "$UPSTREAM_URL" == "https://github.com/EXAMPLE_USER/EXAMPLE_REPO.git" ]; then
echo "Error: Upstream URL not configured. Please edit .github/workflows/sync_deploy.yml"
exit 1
fi

echo "Adding upstream remote..."
git remote add upstream "$UPSTREAM_URL" || git remote set-url upstream "$UPSTREAM_URL"

echo "Fetching upstream..."
git fetch upstream

echo "Merging upstream changes..."
# Try to merge, favoring the upstream version if there are conflicts (optional, adjust as needed)
# Using --no-edit to accept default merge message
git merge upstream/"$UPSTREAM_BRANCH" --no-edit || {
echo "Merge conflict detected. Please resolve conflicts manually."
exit 1
}

echo "Pushing changes to origin..."
git push origin HEAD:${{ github.ref }}

- name: Setup Node.js
if: success()
uses: actions/setup-node@v4
with:
node-version: '18'

- name: Generate Wrangler Configuration
if: success()
run: |
cat > wrangler.toml <<EOF
name = "cfnew-worker"
main = "worker.js"
compatibility_date = "2023-10-01"

[vars]
# Add any environment variables here if needed
EOF

- name: Prepare Worker Script
if: success()
run: |
# Check if obfuscated file exists, otherwise use source
if [ -f "少年你相信光吗" ]; then
cp "少年你相信光吗" worker.js
elif [ -f "明文源吗" ]; then
cp "明文源吗" worker.js
else
echo "Error: No worker script found."
exit 1
fi

- name: Deploy to Cloudflare Workers
if: success()
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}

106 changes: 62 additions & 44 deletions .github/workflows/obfuscate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ name: Generate and Obfuscate Worker Script

on:
workflow_dispatch:
schedule:
- cron: '0 * * * *'
push:
branches:
- '**' # 仅匹配分支推送,排除标签推送
paths:
- '明文源吗'

jobs:
build-and-obfuscate:
Expand All @@ -23,52 +26,67 @@ jobs:

- name: Obfuscate from local source file
run: |
node -e "
const JavaScriptObfuscator = require('javascript-obfuscator');
const fs = require('fs');
const path = require('path');
const sourceFileName = '明文源吗';
const outputFileName = '少年你相信光吗';
const sourceFilePath = path.join(process.cwd(), sourceFileName);
cat > obfuscate.js << 'EOF'
const JavaScriptObfuscator = require('javascript-obfuscator');
const fs = require('fs');
const path = require('path');

const sourceFileName = '明文源吗';
const outputFileName = '少年你相信光吗';
const sourceFilePath = path.join(process.cwd(), sourceFileName);

if (!fs.existsSync(sourceFilePath)) {
console.error('错误:在路径 \'' + sourceFilePath + '\' 未找到源文件。请确保您的仓库根目录有名为 \'明文源吗\' 的文件。');
process.exit(1);
}
if (!fs.existsSync(sourceFilePath)) {
console.error('错误:在路径 \'' + sourceFilePath + '\' 未找到源文件。请确保您的仓库根目录有名为 \'明文源吗\' 的文件。');
process.exit(1);
}

const originalCode = fs.readFileSync(sourceFilePath, 'utf8');
const originalCode = fs.readFileSync(sourceFilePath, 'utf8');

if (!originalCode || originalCode.trim().length === 0) {
console.error('错误:源文件 ' + sourceFileName + ' 为空。');
process.exit(1);
}
if (!originalCode || originalCode.trim().length === 0) {
console.error('错误:源文件 ' + sourceFileName + ' 为空。');
process.exit(1);
}

// --- 最终平衡型混淆配置 ---
const obfuscationOptions = {
compact: true,
controlFlowFlattening: true,
controlFlowFlatteningThreshold: 0.75,
deadCodeInjection: true,
deadCodeInjectionThreshold: 0.4,
stringArray: true,
stringArrayEncoding: ['base64'],
stringArrayThreshold: 0.75,
renameGlobals: true,
identifierNamesGenerator: 'mangled',
numbersToExpressions: true,
splitStrings: true,
splitStringsChunkLength: 10,
transformObjectKeys: true,
selfDefending: false,
debugProtection: false
};
const obfuscationOptions = {
compact: true,
controlFlowFlattening: false,
controlFlowFlatteningThreshold: 0,
deadCodeInjection: false,
stringArray: true,
stringArrayEncoding: ['base64'],
stringArrayThreshold: 1.0,
stringArrayRotate: true,
stringArrayShuffle: true,
stringArrayWrappersCount: 2,
stringArrayWrappersChainedCalls: false,
stringArrayWrappersParametersMaxCount: 3,
renameGlobals: true,
identifierNamesGenerator: 'mangled-shuffled',
identifierNamesCache: null,
identifiersPrefix: '',
renameProperties: false,
renamePropertiesMode: 'safe',
ignoreImports: false,
target: 'browser',
numbersToExpressions: false,
simplify: false,
splitStrings: true,
splitStringsChunkLength: 1,
transformObjectKeys: false,
unicodeEscapeSequence: true,
selfDefending: false,
debugProtection: false,
debugProtectionInterval: 0,
disableConsoleOutput: true,
domainLock: []
};

const obfuscatedCode = JavaScriptObfuscator.obfuscate(originalCode, obfuscationOptions).getObfuscatedCode();

fs.writeFileSync(path.join(process.cwd(), outputFileName), obfuscatedCode, 'utf8');
console.log('成功将 \'' + sourceFileName + '\' 混淆并保存至 \'' + outputFileName + '\'。');
"
const obfuscatedCode = JavaScriptObfuscator.obfuscate(originalCode, obfuscationOptions).getObfuscatedCode();

fs.writeFileSync(path.join(process.cwd(), outputFileName), obfuscatedCode, 'utf8');
console.log('成功将 \'' + sourceFileName + '\' 混淆并保存至 \'' + outputFileName + '\'。');
EOF
node obfuscate.js

- name: Commit and push the obfuscated file
run: |
Expand All @@ -78,6 +96,6 @@ jobs:
if git diff --staged --quiet; then
echo "No changes to commit, the obfuscated file is already up-to-date."
else
git commit -m "build: Generate and obfuscate worker script"
git commit -m "部署用这个"
git push
fi
74 changes: 74 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Deploy Worker Script

on:
push:
tags:
- '*' # 当任何标签被推送时触发

jobs:
deploy-worker:
runs-on: ubuntu-latest

steps:
- name: Get tag name
id: get_tag
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT
echo "当前标签: $TAG_NAME"

- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # 需要完整的Git历史来获取标签信息

- name: Check if source file exists
run: |
if [ ! -f "少年你相信光吗" ]; then
echo "错误:在项目根目录未找到 '少年你相信光吗' 文件。"
exit 1
fi
echo "成功找到源文件 '少年你相信光吗'"

- name: Rename file to _worker.js
run: |
cp "少年你相信光吗" "_worker.js"
echo "成功将 '少年你相信光吗' 复制为 '_worker.js'"
echo "注意:文件不会提交到仓库,仅用于 Release"

- name: Create zip file
run: |
zip Pages.zip _worker.js
echo "成功将 '_worker.js' 压缩为 'Pages.zip'"

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.get_tag.outputs.tag_name }}
name: Pages ${{ steps.get_tag.outputs.tag_name }}
body: |
## 部署信息

- **源文件**: 少年你相信光吗
- **目标文件**: _worker.js
- **压缩文件**: Pages.zip
- **标签**: ${{ steps.get_tag.outputs.tag_name }}
- **部署时间**: ${{ github.event.head_commit.timestamp }}

## 文件变更

已从 `少年你相信光吗` 生成 `_worker.js` 文件,并压缩为 `Pages.zip`。
draft: false
prerelease: false
files: Pages.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Output summary
run: |
echo "## 部署完成" >> $GITHUB_STEP_SUMMARY
echo "- 源文件: 少年你相信光吗" >> $GITHUB_STEP_SUMMARY
echo "- 目标文件: _worker.js" >> $GITHUB_STEP_SUMMARY
echo "- 压缩文件: Pages.zip" >> $GITHUB_STEP_SUMMARY
echo "- 标签: ${{ steps.get_tag.outputs.tag_name }}" >> $GITHUB_STEP_SUMMARY
echo "- GitHub Release 已创建" >> $GITHUB_STEP_SUMMARY
Loading