Skip to content

Commit

Permalink
fleet
Browse files Browse the repository at this point in the history
  • Loading branch information
FYLSen committed Feb 4, 2024
1 parent 880715f commit 2eee76b
Show file tree
Hide file tree
Showing 14 changed files with 74 additions and 17 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
personal_token: ${{ secrets.GIT_TOKEN }}
user_name: ${{ secrets.GIT_USER }}
user_email: ${{ secrets.GIT_EMAIL }}
external_repository: SukkaLab/ruleset.skk.moe
publish_branch: master
#external_repository: SukkaLab/ruleset.skk.moe
publish_branch: gh-pages
publish_dir: public
cname: ruleset.skk.moe
cname: ${{ secrets.CNAME }}
23 changes: 9 additions & 14 deletions Build/build-public.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,31 +86,26 @@ function generateHtml(tree: TreeTypeArray) {
<head>
<meta charset="utf-8">
<title>Surge Ruleset Server | Sukka (@SukkaW)</title>
<title>FYLSen Ruleset Server | FYLSen (@FYLSen)</title>
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
<link href="https://cdn.skk.moe/favicon.ico" rel="icon" type="image/ico">
<link href="https://cdn.skk.moe/favicon/apple-touch-icon.png" rel="apple-touch-icon" sizes="180x180">
<link href="https://cdn.skk.moe/favicon/android-chrome-192x192.png" rel="icon" type="image/png" sizes="192x192">
<link href="https://cdn.skk.moe/favicon/favicon-32x32.png" rel="icon" type="image/png" sizes="32x32">
<link href="https://cdn.skk.moe/favicon/favicon-16x16.png" rel="icon" type="image/png" sizes="16x16">
<meta name="description" content="Sukka 自用的 Surge / Clash Premium 规则组">
<link href="https://image.fylsen.com/favicon.ico" rel="icon" type="image/ico">
<meta name="description" content="FYLSen 自用的 Surge / Clash Premium 规则组">
<link rel="stylesheet" href="https://cdn.skk.moe/ruleset/css/21d8777a.css" />
<meta property="og:title" content="Surge Ruleset | Sukka (@SukkaW)">
<meta property="og:title" content="FYLSen Ruleset | FYLSen (@FYLSen)">
<meta property="og:type" content="Website">
<meta property="og:url" content="https://ruleset.skk.moe/">
<meta property="og:image" content="https://cdn.skk.moe/favicon/android-chrome-192x192.png">
<meta property="og:description" content="Sukka 自用的 Surge / Clash Premium 规则组">
<meta property="og:url" content="https://fleet.fylsen.com/">
<meta property="og:description" content="FYLSen 自用的 FYLSen / Clash Premium 规则组">
<meta name="twitter:card" content="summary">
<link rel="canonical" href="https://ruleset.skk.moe/">
<link rel="canonical" href="https://fleet.fylsen.com/">
</head>`;

html += `<body>
<main class="container">
<h1>Sukka Ruleset Server</h1>
<h1>FYLSen Ruleset Server</h1>
<p>
Made by <a href="https://skk.moe">Sukka</a> | <a href="https://github.com/SukkaW/Surge/">Source @ GitHub</a> | Licensed under <a href="/LICENSE" target="_blank">AGPL-3.0</a>
Made by <a href="https://fleet.fylsen.com">FYLSen</a> | <a href="https://github.com/FYLSen/Fleet/">Source @ GitHub</a> | Licensed under <a href="/LICENSE" target="_blank">AGPL-3.0</a>
</p>
<p>Last Build: ${new Date().toISOString()}</p>
<br>`;
Expand Down
6 changes: 6 additions & 0 deletions Build/lib/reject-data-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ export const DOMAIN_LISTS = [
type AdGuardFilterSource = string | [main: string, mirrors: string[] | null, ttl: number];

export const ADGUARD_FILTERS: AdGuardFilterSource[] = [
[
'https://anti-ad.net/surge2.txt',
[
'https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-surge2.txt'
]
],
// EasyList
[
'https://easylist.to/easylist/easylist.txt',
Expand Down
1 change: 1 addition & 0 deletions Mock/blank.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
1 change: 1 addition & 0 deletions Mock/reject-200
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions Mock/reject-array
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
1 change: 1 addition & 0 deletions Mock/reject-dict
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Binary file added Mock/reject-img
Binary file not shown.
Binary file added Mock/reject-video
Binary file not shown.
36 changes: 36 additions & 0 deletions Modules/YoutubeAds.sgmodule
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!name=Youtube (Music) Enhance
#!desc=适用于 Youtube & Youtube Music (IOS >= 15)

# > Feature
# - 删除 Youtube (Music) 广告
# - 删除 Youtube 底部 上传 按钮 & Youtube Music 底部选段、升级按钮
# + 增加 Youtube 画中画(PIP)
# + 增加 Youtube 字幕翻译 (Thanks @VirgilClyne)
# + 增加 Youtube (Music) 后台播放
# + 增加 Youtube Music 歌词翻译

# > Note
# Youtube 画中画和后台播放分别在客户端内关闭
# - 设置 -> 通用 -> 画中画
# - 设置 -> 后台播放和下载 -> 后台播放
# 该模块已足够全面,无需其他规则混用,防止重写规则被破坏
# 不支持 Mock 的客户端可以用 reject-200/reject-img 替代

# > Credit
# @Choler & @DivineEngine & @app2smile

[Rule]
AND,((DOMAIN-SUFFIX,googlevideo.com), (PROTOCOL,UDP)),REJECT-NO-DROP

[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,script-path=https://fleet.fylsen.com/Script/youtube.request.beta.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,script-path=https://fleet.fylsen.com/Script/youtube.response.beta.js

[URL Rewrite]
(^https?:\/\/[\w-]+\.googlevideo\.com\/(?!dclk_video_ads).+?)&ctier=L(&.+?),ctier,(.+) url 302

[Map Local]
^https?:\/\/[\w-]+\.googlevideo\.com\/initplayback.+&oad data="https://fleet.fylsen.com/Mock/reject-200"

[MITM]
hostname = %APPEND% *.googlevideo.com, youtubei.googleapis.com
3 changes: 3 additions & 0 deletions Script/youtube.request.beta.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions Script/youtube.response.beta.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions Source/domainset/ip_attribution.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# WeChat
szshort.weixin.qq.com
szextshort.weixin.qq.com
szminorshort.weixin.qq.com
mp.weixin.qq.com
2 changes: 2 additions & 0 deletions Source/non_ip/ai.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ DOMAIN,alkalicore-pa.clients6.google.com
DOMAIN,alkalimakersuite-pa.clients6.google.com
# POE
DOMAIN-SUFFIX,poe.com
# Bing
DOMAIN-SUFFIX,bing.com

0 comments on commit 2eee76b

Please sign in to comment.