forked from SukkaW/Surge
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
119 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Build | ||
on: | ||
push: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: '0 12 * * *' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- uses: oven-sh/setup-bun@v1 | ||
with: | ||
bun-version: canary | ||
- name: Get current date | ||
id: date | ||
run: | | ||
echo "date=$(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_OUTPUT | ||
echo "year=$(date +'%Y')" >> $GITHUB_OUTPUT | ||
echo "month=$(date +'%m')" >> $GITHUB_OUTPUT | ||
echo "day=$(date +'%d')" >> $GITHUB_OUTPUT | ||
echo "hour=$(date +'%H')" >> $GITHUB_OUTPUT | ||
echo "minute=$(date +'%M')" >> $GITHUB_OUTPUT | ||
echo "second=$(date +'%S')" >> $GITHUB_OUTPUT | ||
- name: Cache cache.db | ||
uses: actions/cache@v4 | ||
with: | ||
save-always: true | ||
path: | | ||
.cache | ||
key: ${{ runner.os }}-v1-${{ steps.date.outputs.year }}-${{ steps.date.outputs.month }}-${{ steps.date.outputs.day }} ${{ steps.date.outputs.hour }}:${{ steps.date.outputs.minute }}:${{ steps.date.outputs.second }} | ||
# If source files changed but packages didn't, rebuild from a prior cache. | ||
restore-keys: | | ||
${{ runner.os }}-v1-${{ steps.date.outputs.year }}-${{ steps.date.outputs.month }}-${{ steps.date.outputs.day }} ${{ steps.date.outputs.hour }}:${{ steps.date.outputs.minute }}: | ||
${{ runner.os }}-v1-${{ steps.date.outputs.year }}-${{ steps.date.outputs.month }}-${{ steps.date.outputs.day }} ${{ steps.date.outputs.hour }}: | ||
${{ runner.os }}-v1-${{ steps.date.outputs.year }}-${{ steps.date.outputs.month }}-${{ steps.date.outputs.day }} | ||
${{ runner.os }}-v1-${{ steps.date.outputs.year }}-${{ steps.date.outputs.month }}- | ||
${{ runner.os }}-v1-${{ steps.date.outputs.year }}- | ||
${{ runner.os }}-v1- | ||
- run: bun install | ||
- run: bun run build | ||
- name: Pre-deploy check | ||
# If the public directory doesn't exist, the build should fail. | ||
# If the public directory is empty, the build should fail. | ||
run: | | ||
if [ ! -d public ]; then | ||
echo "public directory not found" | ||
exit 1 | ||
fi | ||
if [ ! "$(ls -A public)" ]; then | ||
echo "public directory is empty" | ||
exit 1 | ||
fi | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
personal_token: ${{ secrets.GIT_TOKEN }} | ||
user_name: ${{ secrets.GIT_USER }} | ||
user_email: ${{ secrets.GIT_EMAIL }} | ||
#external_repository: SukkaLab/ruleset.skk.moe | ||
publish_branch: gh-pages | ||
publish_dir: public | ||
cname: ${{ secrets.CNAME }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!name=Youtube (Music) Enhance | ||
#!desc=适用于 Youtube & Youtube Music | ||
#!arguments=屏蔽上传按钮:true,屏蔽选段按钮:true,字幕翻译语言:zh-Hans,歌词翻译语言:zh-Hans,脚本执行引擎:jsc,启用调试模式:false | ||
#!arguments-desc=- 屏蔽参数:[true, false] \n- 翻译参数:[语言代码, off] \n- 脚本引擎:[auto, jsc, webview]\n\n1. 语言代码遵循 Google Translate Languages Codes, 当填入 off 时关闭翻译\n2. 推荐使用 jsc 引擎,但你仍可以切换成 webview 体验 Surge 新特性\n3. 开启调试模式用于输出更多日志 | ||
#!category=🫥 Fleeting | ||
|
||
# > Note | ||
# Youtube 画中画和后台播放分别在客户端内关闭 | ||
# - 设置 -> 通用 -> 画中画 | ||
# - 设置 -> 后台播放和下载 -> 后台播放 | ||
|
||
|
||
[URL Rewrite] | ||
(^https?:\/\/[\w-]+\.googlevideo\.com\/(?!dclk_video_ads).+?)&ctier=L(&.+?),ctier,(.+) url 302 | ||
|
||
[Rule] | ||
AND,((DOMAIN-SUFFIX,googlevideo.com), (PROTOCOL,UDP)),REJECT | ||
AND,((DOMAIN,youtubei.googleapis.com), (PROTOCOL,UDP)),REJECT | ||
|
||
[Script] | ||
youtube.request = type=http-request,pattern=^https:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/(browse|next|player|reel\/reel_watch_sequence),requires-body=1,max-size=-1,binary-body-mode=1,engine={{{脚本执行引擎}}},script-path=https://fleet.fylsen.com/Script/youtube.request.preview.js | ||
youtube.response = type=http-response,pattern=^https:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/(browse|next|player|search|reel\/reel_watch_sequence|guide|account\/get_setting),requires-body=1,max-size=-1,binary-body-mode=1,engine={{{脚本执行引擎}}},script-path=https://fleet.fylsen.com/Script/youtube.response.preview.js,argument="{"lyricLang":"{{{歌词翻译语言}}}","captionLang":"{{{字幕翻译语言}}}","blockUpload":{{{屏蔽上传按钮}}},"immersive":{{{屏蔽选段按钮}}},"debug":{{{启用调试模式}}}}" | ||
|
||
[Map Local] | ||
^https?:\/\/[\w-]+\.googlevideo\.com\/initplayback.+&oad data="https://fleet.fylsen.com/Mock/reject-200" | ||
|
||
[MITM] | ||
hostname = %APPEND% *.googlevideo.com, youtubei.googleapis.com |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
szshort.weixin.qq.com | ||
szextshort.weixin.qq.com | ||
szminorshort.weixin.qq.com | ||
mp.weixin.qq.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Bing | ||
DOMAIN-SUFFIX,bing.com | ||
# Coze | ||
DOMAIN-SUFFIX,coze.com |