├── .gitignore
├── Auto_join_TF.js
├── CamScanner.js
├── Douban.js
├── Douban_qx.js
├── Emby.js
├── Env.js
├── Fq_Ad.js
├── Grow.sgmodule
├── Images
├── 555.png
├── Ali.png
├── App Store Connect.png
├── Chb.png
├── Dsx.png
├── Dx.png
├── Fileball.json
├── Github.png
├── Google.jpeg
├── IMG_0610.png
├── Jxw.png
├── Lt.png
├── MuTu.PNG
├── Ql.png
├── Quark.png
├── Qx.png
├── Qx_2.png
├── Shortcots.png
├── Shortcots1.png
├── SpeedSwitcher.png
├── Sub-store-png.png
├── Surge.png
├── Surge_1.png
├── Surge_2.png
├── Surge_4.png
├── Surge_5.png
├── Surge_6.png
├── Surge_logo.png
├── Surgeyh.png
├── WeChat.png
├── account.png
├── ali2.png
├── apple.png
├── b7.png
├── beanImage.png
├── bilibili.png
├── boxjs.png
├── cjh.png
├── clipboard.jpeg
├── github1.png
├── hl.png
├── iQIYI.png
├── jd.png
├── jtc.png
├── laoliu.png
├── large.png
├── medium.png
├── photo-2.jpeg
├── photo.jpeg
├── photo.png
├── pikpak.png
├── plusBG.png
├── plusFG.png
├── preferences.png
├── pyth.png
├── qinglong.png
├── qinglong_1.png
├── setting.png
├── small.png
├── sou.png
├── sou2.png
├── sub-store.png
├── testflight.png
├── userImage_jd_646a33519f4bb.png
├── userImage_jd_catIWKBwmNLZ.png
└── weather.png
├── JDWSKey.js
├── JSBox
├── AI keyboard.js
├── CAIO
│ ├── 京东解析.json
│ ├── 文件下载.json
│ ├── 编码解码.json
│ └── 链接转换.json
├── ChatGPT.js
└── 泼妇骂街.js
├── Jd_unbindCard.sgmodule
├── Loon
└── Q-Search_All_in_one.conf
├── MmmCK.js
├── Mtxx.js
├── Notification.js
├── Oil.js
├── One.js
├── OpenClash.yaml
├── QuantumultX
├── API.js
├── Cookie.conf
├── Q-Search_All_in_one.conf
├── QuantumultX.conf
├── Script.conf
├── jd_hd.js.conf
└── jdapp_to_union.conf
├── README.md
├── Reddit.js
├── Scriptable
├── 2024041614.js
├── ChatGPT.js
├── ChinaTelecom.js
├── ChinaTelecom_2021.scriptable
├── ChinaTelecom_2024.js
├── ChinaTelecom_2024.scriptable
├── Chinaunicom_2021.scriptable
├── Clean Files 2.scriptable
├── DmYY.scriptable
├── Env.scriptable
├── GitHub_v1.4.0.scriptable
├── JD-in-one-v2.scriptable
├── PriceWidgets.scriptable
├── WebStore.scriptable
├── Weibo_v2.1.3.scriptable
└── XPin.box
├── Slidebox.js
├── SpeedSwitcher.js
├── Stream-All.js
├── Surge
├── AUTOTF.sgmodule
├── Ali.sgmodule
├── ChinaMobile.sgmodule
├── FQ_AD.sgmodule
├── Fileball.sgmodule
├── Github_Private.sgmodule
├── Hub.sgmodule
├── JDWSKey.sgmodule
├── JD_Helper.sgmodule
├── Notification.sgmodule
├── Oil.sgmodule
├── Panel.sgmodule
├── Q-Search_All_in_one.sgmodule
├── Reddit.sgmodule
├── Revenuecat.sgmodule
├── Streaming_Media_Unlock.sgmodule
├── Sub_info-2.sgmodule
├── Sub_info.sgmodule
├── Surge.sgmodule
├── Surge_Qx.sgmodule
├── TestFlight.sgmodule
├── TestFlight_2.sgmodule
├── TikTok.sgmodule
├── TikTok_Surge.sgmodule
├── TunOnly.sgmodule
├── WARP_Panel.shmodule
├── Warp++.sgmodule
├── XiMaLaYa.sgmodule
├── YouTube.sgmodule
├── jd_buy_helper.sgmodule
├── jd_price.sgmodule
├── jd_price2.sgmodule
└── jdapp_to_union.sgmodule
├── Surge_Qx.js
├── UA_JD.js
├── WPS_checkin.js
├── ali.js
├── alidrive.js
├── bdcloud.js
├── box.switcher.js
├── boxjs.json
├── cytq.js
├── dx.js
├── fantastical.js
├── fileball.js
├── flow.js
├── flushDNS.js
├── forward.js
├── functionstatus.js
├── geo_location.js
├── groupPanel.js
├── index.js
├── jdHelper.js
├── jdHelper.sgmodule
├── jd_bean_change.js
├── jd_buy_helper.js
├── jd_price.js
├── jd_price1.js
├── jdact.sgmodule
├── jfConvert.js
├── jfConvert.sgmodule
├── jhsh_checkIn.js
├── mix.js
├── mock.js
├── netflixCheck.js
├── nf_autoselect.js
├── nf_check.js
├── notability.js
├── pikpak.js
├── ql_sync_box.js
├── quark.js
├── raycast_pro_patch.js
├── revenuecat.js
├── speedLimit.js
├── sub_info.js
├── sub_info_panel.js
├── surgepro_flushdns.js
├── telecom_ck.js
├── warp++.js
├── warp++referrer.js
├── weather_pro.js
├── weifeng.js
├── xmSports.js
├── xmly_json.js
├── xmrun.py
├── youtube_ad.js
└── ytb-ui-check.js
/.gitignore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/.gitignore
--------------------------------------------------------------------------------
/CamScanner.js:
--------------------------------------------------------------------------------
1 | /*
2 | CamScanner 解锁部分高级特权
3 |
4 | ***************************
5 | Quantumult X:
6 |
7 | [rewrite_local]
8 | ^https:\/\/(api|api-cs)\.intsig\.net\/purchase\/cs\/query_property\? url script-response-body https://raw.githubusercontent.com/githubdulong/Script/master/CamScanner.js
9 |
10 | [mitm]
11 | hostname = ap*.intsig.net
12 |
13 | ***************************
14 | Surge4 or Loon:
15 |
16 | [Script]
17 | http-response https:\/\/(api|api-cs)\.intsig\.net\/purchase\/cs\/query_property\? requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/CamScanner.js
18 |
19 | [MITM]
20 | hostname = ap*.intsig.net
21 |
22 | **************************/
23 | let body = JSON.parse($response.body)
24 | body.data.psnl_vip_property = {"renew_method": "appstore",
25 | "initial_tm": "1614867690",
26 | "svip": 1,
27 | "auto_renewal": true,
28 | "ms_first_pay": 0,
29 | "pending": 0,
30 | "group2_paid": 0,
31 | "inherited_flag": 0,
32 | "nxt_renew_tm": "9915126887",
33 | "level_info": {
34 | "level": 1,
35 | "days": 1,
36 | "end_days": 30
37 | },
38 | "group1_paid": 1,
39 | "ys_first_pay": 0,
40 | "renew_type": "year",
41 | "expiry": 8487890487,
42 | "grade": 2,
43 | "last_payment_method": "appstore",
44 | "product_id": "com.intsig.camscanner.premiums.oneyear.autorenewable.svip.low"}
45 | $done({body:JSON.stringify(body)})
46 |
--------------------------------------------------------------------------------
/Emby.js:
--------------------------------------------------------------------------------
1 | if ($request.url.indexOf('mb3admin.com/admin/service/registration/validateDevice') != -1) {
2 | if($response.status!=200){
3 | $notification.post("", "", "");
4 | $done({status: 200, headers: $response.headers, body: '{"cacheExpirationDays":999,"resultCode":"GOOD","message":"Device Valid"}' })
5 | }else{
6 | $done({})
7 | }
8 | }else{
9 | $done({})
10 | }
--------------------------------------------------------------------------------
/Fq_Ad.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 模块链接: https://raw.githubusercontent.com/githubdulong/Script/master/Surge/FQ_AD.sgmodule
3 | * 更新时间:2024.05.07
4 | */
5 |
6 | const body = JSON.parse($response.body);
7 | console.log("原始资源列表:", JSON.stringify(body.resources));
8 | const filteredResources = body.resources.filter(v => {
9 | const isAd = v.url.includes("/ad");
10 | if (isAd) {
11 | console.log("过滤广告资源:", v.url);
12 | }
13 | return !isAd;
14 | });
15 | body.resources = filteredResources;
16 | console.log("过滤后资源列表:", JSON.stringify(filteredResources));
17 | $done({body: JSON.stringify(body)});
--------------------------------------------------------------------------------
/Grow.sgmodule:
--------------------------------------------------------------------------------
1 | [MITM]
2 | hostname = %APPEND% api.revenuecat.com
3 |
4 | [Script]
5 | Revenuecat = type=http-response,pattern=https:\/\/api\.revenuecat\.com,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/langkhach270389/Surge-LK/main/scripts/langkhach/revenuecat.js,script-update-interval=-1
6 |
--------------------------------------------------------------------------------
/Images/555.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/555.png
--------------------------------------------------------------------------------
/Images/Ali.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/Ali.png
--------------------------------------------------------------------------------
/Images/App Store Connect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/App Store Connect.png
--------------------------------------------------------------------------------
/Images/Chb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/Chb.png
--------------------------------------------------------------------------------
/Images/Dsx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/Dsx.png
--------------------------------------------------------------------------------
/Images/Dx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/Dx.png
--------------------------------------------------------------------------------
/Images/Fileball.json:
--------------------------------------------------------------------------------
1 | {
2 | "name":"云盘图标",
3 | "description":"Fileball挂载云盘图标",
4 | "icons":
5 | [
6 | {"name":"ㅤㅤㅤ1", "url":"https://raw.githubusercontent.com/githubdulong/Script/master/Images/Ali.png"},
7 | {"name":"ㅤㅤㅤ2", "url":"https://raw.githubusercontent.com/githubdulong/Script/master/Images/pikpak.png"},
8 | {"name":"ㅤㅤㅤ3", "url":"https://raw.githubusercontent.com/githubdulong/Script/master/Images/Quark.png"},
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/Images/Github.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/Github.png
--------------------------------------------------------------------------------
/Images/Google.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/Google.jpeg
--------------------------------------------------------------------------------
/Images/IMG_0610.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/IMG_0610.png
--------------------------------------------------------------------------------
/Images/Jxw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/Jxw.png
--------------------------------------------------------------------------------
/Images/Lt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/Lt.png
--------------------------------------------------------------------------------
/Images/MuTu.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/MuTu.PNG
--------------------------------------------------------------------------------
/Images/Ql.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/Ql.png
--------------------------------------------------------------------------------
/Images/Quark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/Quark.png
--------------------------------------------------------------------------------
/Images/Qx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/Qx.png
--------------------------------------------------------------------------------
/Images/Qx_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/Qx_2.png
--------------------------------------------------------------------------------
/Images/Shortcots.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/Shortcots.png
--------------------------------------------------------------------------------
/Images/Shortcots1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/Shortcots1.png
--------------------------------------------------------------------------------
/Images/SpeedSwitcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/SpeedSwitcher.png
--------------------------------------------------------------------------------
/Images/Sub-store-png.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/Sub-store-png.png
--------------------------------------------------------------------------------
/Images/Surge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/Surge.png
--------------------------------------------------------------------------------
/Images/Surge_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/Surge_1.png
--------------------------------------------------------------------------------
/Images/Surge_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/Surge_2.png
--------------------------------------------------------------------------------
/Images/Surge_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/Surge_4.png
--------------------------------------------------------------------------------
/Images/Surge_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/Surge_5.png
--------------------------------------------------------------------------------
/Images/Surge_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/Surge_6.png
--------------------------------------------------------------------------------
/Images/Surge_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/Surge_logo.png
--------------------------------------------------------------------------------
/Images/Surgeyh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/Surgeyh.png
--------------------------------------------------------------------------------
/Images/WeChat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/WeChat.png
--------------------------------------------------------------------------------
/Images/account.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/account.png
--------------------------------------------------------------------------------
/Images/ali2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/ali2.png
--------------------------------------------------------------------------------
/Images/apple.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/apple.png
--------------------------------------------------------------------------------
/Images/b7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/b7.png
--------------------------------------------------------------------------------
/Images/beanImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/beanImage.png
--------------------------------------------------------------------------------
/Images/bilibili.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/bilibili.png
--------------------------------------------------------------------------------
/Images/boxjs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/boxjs.png
--------------------------------------------------------------------------------
/Images/cjh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/cjh.png
--------------------------------------------------------------------------------
/Images/clipboard.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/clipboard.jpeg
--------------------------------------------------------------------------------
/Images/github1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/github1.png
--------------------------------------------------------------------------------
/Images/hl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/hl.png
--------------------------------------------------------------------------------
/Images/iQIYI.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/iQIYI.png
--------------------------------------------------------------------------------
/Images/jd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/jd.png
--------------------------------------------------------------------------------
/Images/jtc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/jtc.png
--------------------------------------------------------------------------------
/Images/laoliu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/laoliu.png
--------------------------------------------------------------------------------
/Images/large.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/large.png
--------------------------------------------------------------------------------
/Images/medium.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/medium.png
--------------------------------------------------------------------------------
/Images/photo-2.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/photo-2.jpeg
--------------------------------------------------------------------------------
/Images/photo.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/photo.jpeg
--------------------------------------------------------------------------------
/Images/photo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/photo.png
--------------------------------------------------------------------------------
/Images/pikpak.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/pikpak.png
--------------------------------------------------------------------------------
/Images/plusBG.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/plusBG.png
--------------------------------------------------------------------------------
/Images/plusFG.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/plusFG.png
--------------------------------------------------------------------------------
/Images/preferences.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/preferences.png
--------------------------------------------------------------------------------
/Images/pyth.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/pyth.png
--------------------------------------------------------------------------------
/Images/qinglong.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/qinglong.png
--------------------------------------------------------------------------------
/Images/qinglong_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/qinglong_1.png
--------------------------------------------------------------------------------
/Images/setting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/setting.png
--------------------------------------------------------------------------------
/Images/small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/small.png
--------------------------------------------------------------------------------
/Images/sou.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/sou.png
--------------------------------------------------------------------------------
/Images/sou2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/sou2.png
--------------------------------------------------------------------------------
/Images/sub-store.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/sub-store.png
--------------------------------------------------------------------------------
/Images/testflight.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/testflight.png
--------------------------------------------------------------------------------
/Images/userImage_jd_646a33519f4bb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/userImage_jd_646a33519f4bb.png
--------------------------------------------------------------------------------
/Images/userImage_jd_catIWKBwmNLZ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/userImage_jd_catIWKBwmNLZ.png
--------------------------------------------------------------------------------
/Images/weather.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Images/weather.png
--------------------------------------------------------------------------------
/JSBox/CAIO/京东解析.json:
--------------------------------------------------------------------------------
1 | {"config":"{\"icon\":\"cart.fill.badge.plus\",\"color\":{\"red\":255,\"alpha\":0.8011444484727065,\"blue\":47,\"green\":58},\"name\":\"京东解析\"}","main":"class MyAction extends Action {\n openUrl(url) {\n // 使用给定的URL或默认打开京东App\n const params = `{\"category\":\"jump\",\"des\":\"m\",\"url\":\"${url}\",\"imkParam\":{\"os\":\"ios\",\"device\":\"iphone\"}}`;\n const openURL = `openApp.jdMobile://virtual?params=${encodeURI(params)}`;\n $app.openURL(openURL);\n }\n\n do() {\n const regex =\n /(https?:\\/\\/)([\\da-z\\.-]+)\\.([a-z\\.]{2,6})([:0-9])*([\\/\\w\\#\\.\\-\\?\\=\\&])*\\s?/gi;\n const text = this.text ?? ($clipboard.text || \"\");\n const url = text.match(regex, text) ?? [];\n if (url.length > 1) {\n $ui.menu({\n items: url,\n handler: (title, index) => {\n this.openUrl(url[index]);\n },\n });\n } else if (url.length === 1) {\n this.openUrl(url[0]);\n } else {\n $ui.warning(\"未检测到链接,将打开京东首页\");\n setTimeout(() => {\n this.openUrl(\"\"); \n }, 2000); \n }\n }\n}","readme":"## OpenUrl\n\n提取文本中的京东URL并App打开。"}
--------------------------------------------------------------------------------
/JSBox/CAIO/文件下载.json:
--------------------------------------------------------------------------------
1 | {"config":"{\"icon\":\"square.and.arrow.down.on.square.fill\",\"color\":{\"red\":0,\"alpha\":0.8025751072961373,\"blue\":252,\"green\":95},\"name\":\"文件下载\"}","main":"class MyAction extends Action {\n getFilenameFromUrl(url) {\n const filename = url.split('/').pop().split('#')[0].split('?')[0];\n if (filename.includes('.')) {\n return filename;\n }\n return undefined;\n }\n\n convertToRawUrl(url) {\n let convertedUrl = url;\n if (url.includes(\"github.com\") && !url.includes(\"raw.githubusercontent.com\") && url.includes(\"/blob/\")) {\n convertedUrl = url.replace(\"github.com\", \"raw.githubusercontent.com\").replace(\"/blob/\", \"/\");\n }\n return this.encodeUrl(convertedUrl);\n }\n\n encodeUrl(url) {\n const [protocol, path] = url.split('://');\n const encodedPath = path.split('/').map(part => encodeURIComponent(part)).join('/');\n return `${protocol}://${encodedPath}`;\n }\n\n async downloadContent(url) {\n const response = await $http.get({\n url: this.convertToRawUrl(url.split('#')[0]),\n showsProgress: true\n });\n if (response.error) {\n $ui.alert(response.error.localizedDescription);\n } else {\n return response;\n }\n }\n\n async do() {\n const urls = this.getUrls(); \n let response = undefined;\n if (urls.length > 1) {\n $ui.menu({\n items: urls,\n handler: async (title, index) => {\n response = await this.downloadContent(urls[index]);\n }\n });\n } else if (urls.length === 1) {\n response = await this.downloadContent(urls[0]);\n } else {\n $ui.warning(\"未检测到链接\");\n return;\n }\n\n if (response) {\n let filename = this.getFilenameFromUrl(urls[0]) || response.response.suggestedFilename;\n $share.sheet([\n {\n name: filename,\n data: response.data\n }\n ]);\n }\n return response;\n }\n}","readme":"## DownloadFromUrl\n\n从链接下载内容:如 js, png,json,sgmodule,snippet,list等格式图片或文件并保持格式命名"}
--------------------------------------------------------------------------------
/JSBox/CAIO/编码解码.json:
--------------------------------------------------------------------------------
1 | {"config":"{\"icon\":\"curlybraces.square.fill\",\"color\":{\"red\":204,\"alpha\":0.7997138551376408,\"blue\":204,\"green\":0},\"name\":\"编码解码\"}","main":"class MyCodecAction {\n constructor() {\n this.text = $clipboard.text;\n this.mappingChars = \"XKNWSPRMCTGZVDHF\"; // BinaryLetter默认映射字符串,可自定义修改加密 如:ABCDEFGHJKLMNPQR\n\n this.charMap = {};\n this.mappingChars.split('').forEach((char, index) => {\n const binary = index.toString(2).padStart(4, '0');\n this.charMap[char] = binary;\n });\n\n this.reverseCharMap = Object.fromEntries(\n Object.entries(this.charMap).map(([k, v]) => [v, k])\n );\n }\n\n binaryLetterDecode(str) {\n let binaryString = \"\";\n for (let i = 0; i < str.length; i++) {\n if (!this.charMap[str[i]]) {\n throw new Error(\"BinaryLetter解码失败: 输入包含未知字符\");\n }\n binaryString += this.charMap[str[i]];\n }\n let result = \"\";\n for (let i = 0; i < binaryString.length; i += 8) {\n let byte = binaryString.substr(i, 8);\n result += String.fromCharCode(parseInt(byte, 2));\n }\n return result;\n }\n\n binaryLetterEncode(str) {\n let binaryString = \"\";\n for (let i = 0; i < str.length; i++) {\n let charCodeBinary = str.charCodeAt(i).toString(2).padStart(8, '0');\n binaryString += charCodeBinary;\n }\n let result = \"\";\n for (let i = 0; i < binaryString.length; i += 4) {\n let nibble = binaryString.substr(i, 4);\n if (!this.reverseCharMap[nibble]) {\n throw new Error(\"BinaryLetter编码失败: 无法转换某些字符\");\n }\n result += this.reverseCharMap[nibble];\n }\n return result;\n }\n\n htmlEncode(str) {\n return str.replace(/&/g, '&').replace(//g, '>').replace(/\"/g, '"').replace(/'/g, ''');\n }\n\n htmlDecode(str) {\n str = str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '\"').replace(/'/g, \"'\");\n const entityPattern = /&[#0-9a-zA-Z]+;/;\n if (entityPattern.test(str)) {\n throw new Error(\"HTML解码失败: 字符串包含无法解码的HTML实体\");\n }\n return str;\n }\n\n async showMenu() {\n const topLevelMenu = {\n items: [\n \"URL 编码/解码\",\n \"HTML 编码/解码\",\n \"Base64 编码/解码\",\n \"Unicode 编码/解码\",\n \"BinaryLetter 编码/解码\"\n ]\n };\n const { index: topLevelIndex } = await $ui.menu(topLevelMenu.items);\n if (topLevelIndex === undefined) {\n $ui.toast(\"无效内容/请重新选择\", 2);\n return;\n }\n await this.delay(100);\n const subLevelMenus = [\n [\"URL 编码\", \"URL 解码\"],\n [\"HTML 编码\", \"HTML 解码\"],\n [\"Base64 编码\", \"Base64 解码\"],\n [\"Unicode 编码\", \"Unicode 解码\"],\n [\"BinaryLetter 编码\", \"BinaryLetter 解码\"]\n ];\n const { index: subLevelIndex } = await $ui.menu(subLevelMenus[topLevelIndex]);\n if (subLevelIndex === undefined) {\n $ui.toast(\"无效内容/请重新选择\", 2);\n return;\n }\n await this.delay(100);\n this.handleSelection(topLevelIndex * 2 + subLevelIndex);\n }\n\n handleSelection(index) {\n try {\n switch (index) {\n case 0:\n this.text = encodeURIComponent(this.text);\n break;\n case 1:\n this.decodeURIComponentWithCheck(\"URL\");\n break;\n case 2:\n this.text = this.htmlEncode(this.text);\n break;\n case 3:\n this.text = this.htmlDecode(this.text);\n break;\n case 4:\n this.text = $text.base64Encode(this.text);\n break;\n case 5:\n this.decodeBase64WithCheck();\n break;\n case 6:\n this.text = this.text.split('').map(char => '\\\\u' + char.charCodeAt(0).toString(16).padStart(4, '0')).join('');\n break;\n case 7:\n this.decodeUnicodeWithCheck();\n break;\n case 8:\n this.text = this.binaryLetterEncode(this.text);\n break;\n case 9:\n this.text = this.binaryLetterDecode(this.text);\n break;\n default:\n $ui.toast(\"无效内容/请重新选择\", 2);\n return;\n }\n this.delay(100).then(() => {\n this.copyToClipboard();\n });\n } catch (e) {\n $ui.toast(e.message, 2);\n return;\n }\n }\n\n decodeURIComponentWithCheck(type) {\n let decodedText = decodeURIComponent(this.text);\n if (decodedText === this.text) {\n throw new Error(`${type}解码失败: 无有效的${type}编码字符串`);\n }\n this.text = decodedText;\n }\n\n decodeBase64WithCheck() {\n let base64DecodedText = $text.base64Decode(this.text);\n if (!base64DecodedText) {\n throw new Error(\"Base64解码失败: 无有效的Base64字符串\");\n }\n this.text = base64DecodedText;\n }\n\n decodeUnicodeWithCheck() {\n let decodedText = this.text.replace(/\\\\u([\\dA-F]{4})/gi, (match, grp) => {\n return String.fromCharCode(parseInt(grp, 16));\n });\n if (decodedText === this.text) {\n throw new Error(\"Unicode解码失败: 无有效的Unicode字符\");\n }\n this.text = decodedText;\n }\n\n copyToClipboard() {\n $clipboard.text = this.text;\n this.showResult();\n }\n\n showResult() {\n let preview = this.text.length > 40 ? this.text.substring(0, 37) + '...' : this.text;\n $ui.toast(`已复制到剪切板: ${preview}`, 2);\n }\n\n delay(ms) {\n return new Promise(resolve => setTimeout(resolve, ms));\n }\n\n requestInput() {\n $input.text({\n placeholder: \"剪切板无内容,请输入文本…\",\n handler: text => {\n if (text === undefined || text === \"\") {\n $ui.toast(\"未输入任何内容\", 2);\n return;\n }\n this.text = text;\n this.showMenu();\n }\n });\n }\n\n run() {\n if (this.text !== undefined && this.text !== \"\") {\n this.showMenu();\n } else {\n this.requestInput();\n }\n }\n}\n\nconst action = new MyCodecAction();\naction.run();\n ","readme":"## 编码解码\n\n一个简单的文本编码和解码动作,它可以处理剪切板中的文本或用户输入的文本。用户可以选择进行URL、HTML、Unicode、Base64或BinaryLetter自定义字符映射加密的编码或解码操作,处理后的结果会自动复制到剪切板。"}
--------------------------------------------------------------------------------
/JSBox/CAIO/链接转换.json:
--------------------------------------------------------------------------------
1 | {"config":"{\"icon\":\"bolt.badge.automatic.fill\",\"color\":{\"red\":51,\"alpha\":0.7982832618025751,\"blue\":50,\"green\":203},\"name\":\"链接转换\"}","main":"class MyAction extends Action {\n #component\n\n get component() {\n if (!this.#component) {\n const url = String(this.text);\n const path = url.substring(url.indexOf(\"/\", \"https://\".length) + 1);\n this.#component = path.split(\"/\");\n }\n return this.#component;\n }\n\n l10n() {\n return {\n \"zh-Hans\": {\n \"openLink.nourl\": \"未检测到链接\",\n \"linkAlreadyEdited\": \"链接已转换为ScriptHub编辑状态\",\n \"linkPreviewEnabled\": \"链接已转换为CodeHub在线预览\",\n \"linkPreviewDisabled\": \"链接已恢复到原始状态\"\n },\n en: {\n \"openLink.nourl\": \"No GitHub link detected\",\n \"linkAlreadyEdited\": \"Link converted to ScriptHub edit state\",\n \"linkPreviewEnabled\": \"Link converted to CodeHub online preview\",\n \"linkPreviewDisabled\": \"Link restored to original state\"\n }\n }\n }\n\n processGistRawUrl(url) {\n const regex = /https:\\/\\/gist\\.githubusercontent\\.com\\/(.+)\\/raw\\/[0-9a-f]+\\/(.+)/;\n const match = url.match(regex);\n if (match && match.length === 3) {\n return `https://gist.githubusercontent.com/${match[1]}/raw/${match[2]}`;\n }\n return url;\n }\n\n githubusercontent() {\n const user = this.component[0],\n repository = this.component[1],\n branch = this.component[2],\n file = this.component.slice(3).join(\"/\");\n return `https://github.com/${user}/${repository}/blob/${branch}/${file}`;\n }\n\n github() {\n const user = this.component[0],\n repository = this.component[1],\n blob = this.component[2],\n branch = this.component[3],\n file = this.component.slice(4).join(\"/\");\n return `https://raw.githubusercontent.com/${user}/${repository}/${branch}/${file}`;\n }\n\n do() {\n let result = String(this.text);\n\n if (result.startsWith(\"https://app.linkey.store/EditCode?\")) {\n result = result.replace(\"https://app.linkey.store/EditCode?\", \"\");\n $ui.success($l10n(\"linkPreviewDisabled\"));\n } else {\n if (result.includes(\"script.hub/edit/\")) {\n $ui.warning($l10n(\"linkAlreadyEdited\"));\n return;\n }\n\n if ((result.endsWith(\".snippet\") || result.endsWith(\".yaml\")) && !result.startsWith(\"https://app.linkey.store/EditCode?\")) {\n result = `https://app.linkey.store/EditCode?${result}`;\n $ui.success($l10n(\"linkPreviewEnabled\"));\n } else {\n if (result.includes(\"script.hub/file/\") || result.includes(\"script.hub/convert/\")) {\n result = result.replace(\"script.hub/file/\", \"script.hub/edit/\");\n result = result.replace(\"script.hub/convert/\", \"script.hub/edit/\");\n $ui.success($l10n(\"linkAlreadyEdited\"));\n } else if (result.includes(\"raw.githubusercontent.com\")) {\n result = this.githubusercontent(result);\n } else if (result.includes(\"github.com\")) {\n if (result.includes(\"?raw=true\")) {\n result = result.replace(\"?raw=true\", \"\");\n } else {\n result = this.github();\n }\n } else if (result.includes(\"gist.githubusercontent.com\")) {\n result = this.processGistRawUrl(result);\n } else {\n $ui.warning($l10n(\"openLink.nourl\"));\n return;\n }\n\n if (!result.startsWith(\"https://app.linkey.store/EditCode?\")) {\n $ui.success($l10n(\"COPIED\"));\n }\n }\n }\n\n $clipboard.text = result;\n }\n}","readme":"## RawRepoConverter\r\n\r\nGithub Raw 链接和 Script Hub 链接转换器\r\nGithub链接snippet和yaml格式支持在线预览"}
--------------------------------------------------------------------------------
/JSBox/泼妇骂街.js:
--------------------------------------------------------------------------------
1 | var intervals = 0.3; // 设置默认间隔时间为0.3秒
2 | var isStartHongzha = false; // 轰炸状态标志
3 | var settime; // 定时器变量
4 |
5 | $ui.render({
6 | views: [{
7 | type: "input",
8 | props: {
9 | type: $kbType.number,
10 | font: $font(12),
11 | darkKeyboard: true,
12 | placeholder: "泼妇骂街间隔时长0.3秒"
13 | },
14 | layout: function (make, view) {
15 | make.centerY.equalTo(view.super).offset(-40);
16 | make.centerX.equalTo(view.super);
17 | make.size.equalTo($size(150, 32));
18 | },
19 | events: {
20 | changed: function (sender) {
21 | intervals = parseFloat(sender.text); // 更新间隔时间
22 | }
23 | }
24 | },
25 | {
26 | type: "button",
27 | props: {
28 | radius: 32,
29 | font: $font(12),
30 | bgcolor: $color("red"),
31 | titleColor: $color("white"),
32 | title: "开始辱骂"
33 | },
34 | layout: function (make, view) {
35 | make.size.equalTo($size(64, 64));
36 | make.centerY.equalTo(view.super).offset(40);
37 | make.centerX.equalTo(view.super);
38 | },
39 | events: {
40 | tapped: function (sender) {
41 | if (isStartHongzha) {
42 | clearInterval(settime);
43 | } else {
44 | hongzha();
45 | }
46 | isStartHongzha = !isStartHongzha;
47 | sender.title = isStartHongzha ? "结束辱骂" : "开始辱骂";
48 | sender.bgcolor = isStartHongzha ? $color("black") : $color("red");
49 | }
50 | }
51 | }]
52 | });
53 |
54 | function hongzha() {
55 | settime = setInterval(() => {
56 | fetchTextAndSend(); // 从接口获取文本并发送
57 | }, intervals * 1000);
58 | }
59 |
60 | function fetchTextAndSend() {
61 | $http.get({
62 | url: "https://yyapi.a1aa.cn/api.php?level=max",
63 | handler: function(resp) {
64 | var text = resp.data; // 获取API返回的数据
65 | $keyboard.insert(text); // 插入文本到键盘
66 | $keyboard.send(); // 发送键盘内容
67 | }
68 | });
69 | }
--------------------------------------------------------------------------------
/Jd_unbindCard.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=京东销卡
2 | #!desc=会员卡跳转验证 2021-06-03 15:34:30
3 | #!system=ios
4 |
5 | [URL Rewrite]
6 | ^(https://shopmember.m.jd.com/)(shopcard/\?)(venderId=[0-9]+).* $1member/memberCloseAccount?$3 302
7 |
8 | [MITM]
9 | hostname = %APPEND% shopmember.m.jd.com
10 |
--------------------------------------------------------------------------------
/Loon/Q-Search_All_in_one.conf:
--------------------------------------------------------------------------------
1 | #!name=𝙌-𝙎𝙚𝙖𝙧𝙘𝙝-𝘼𝙡𝙡 𝙞𝙣 𝙤𝙣𝙚
2 | #!desc=Safari搜索 • 命令+空格+关键词指定引擎快速搜索(Safari 搜索改为DuckDuckGO)集成主机名;
3 | #!system=ios
4 |
5 | # gh: GitHub搜索
6 | # gm: Google图片搜索
7 | # sof: Stack Overflow
8 | # se: StackExchange
9 | # wiki: 维基百科
10 | # wk: 维基中文
11 | # mg: Magi
12 | # tf: Google 搜索 TestFlight
13 |
14 | # yd:有道词典搜索
15 | # trc: Google 译至中
16 | # tre: Google 译至英
17 | # trj: Google 译至日
18 |
19 | # db:豆瓣搜索
20 | # zh: 知乎
21 | # wb: 微博
22 | # wx: 微信
23 | # rd: Reddit
24 | # ssp: 少数派
25 | # csdn: CSDN
26 |
27 | # zdm: 什么值得买
28 | # amz: 亚马逊
29 | # jd: 京东
30 | # tb: 淘宝
31 | # tm: 天猫
32 |
33 | # ac: Acfun
34 | # bli: 哔哩哔哩
35 | # ytb: YouTube
36 | # ph: PornHub
37 | # gd: Google Drive资源
38 | # tgd: TG搜索Google Drive资源
39 |
40 | # bi: 必应
41 | # bd:百度搜索
42 | # ddg:DuckDuckGo 搜索
43 | # 无指令则转 Google 搜索
44 |
45 | [URL Rewrite]
46 | #gm (Google图片)
47 | ^https:\/\/duckduckgo.com\/\?q=gm\+([^&]+).+ https://www.google.com/search?&tbm=isch&q=$1 302
48 | # gh (GitHub)
49 | ^https:\/\/duckduckgo.com\/\?q=gh\+([^&]+).+ https://github.com/search?q=$1 302
50 | # sof (Stack Overflow)
51 | ^https:\/\/duckduckgo.com\/\?q=sof\+([^&]+).+ https://stackoverflow.com/search?q=$1 302
52 | # se (StackExchange)
53 | ^https:\/\/duckduckgo.com\/\?q=se\+([^&]+).+ https://stackexchange.com/search?q=$1 302
54 | # wa (WolframAlpha)
55 | ^https:\/\/duckduckgo.com\/\?q=wa\+([^&]+).+ https://www.wolframalpha.com/input/?i=$1 302
56 | # wiki (维基百科)
57 | ^https:\/\/duckduckgo.com\/\?q=wiki(\+|%20)([^&]+).+ http://wikipedia.org/wiki/$2 302
58 | # wk (维基中文)
59 | ^https:\/\/duckduckgo.com\/\?q=wk(\+|%20)([^&]+).+ https://zh.wikipedia.org/wiki/$2 302
60 | # mg (Magi)
61 | ^https:\/\/duckduckgo.com\/\?q=mg(\+|%20)([^&]+).+ https://magi.com/search?q=$2 302
62 | # tf (Google 搜索 TestFlight)
63 | ^https:\/\/duckduckgo.com\/\?q=tf(\+|%20)([^&]+).+ https://www.google.com/search?as_q=$2&as_sitesearch=testflight.apple.com 302
64 | # > 翻译
65 | # yd (有道)
66 | ^https:\/\/duckduckgo.com\/\?q=yd\+([^&]+).+ http://dict.youdao.com/search?q=$1 302
67 | # trc (Google 译至中)
68 | ^https:\/\/duckduckgo.com\/\?q=trc\+([^&]+).+ https://translate.google.com/#view=home&op=translate&sl=auto&tl=zh-CN&text=$1 302
69 | # tre (Google 译至英)
70 | ^https:\/\/duckduckgo.com\/\?q=tre\+([^&]+).+ https://translate.google.com/#view=home&op=translate&sl=auto&tl=en&text=$1 302
71 | # trj (Google 译至日)
72 | ^https:\/\/duckduckgo.com\/\?q=trj\+([^&]+).+ https://translate.google.com/#view=home&op=translate&sl=auto&tl=ja&text=$1 302
73 | # 社区
74 | # db:豆瓣
75 | ^https:\/\/duckduckgo.com\/\?q=db\+([^&]+).+ https://m.douban.com/search/?query=$1 302
76 | # zh: 知乎
77 | ^https:\/\/duckduckgo.com\/\?q=zh\+([^&]+).+ https://www.zhihu.com/search?type=content&q=$1 302
78 | # wb: 微博
79 | ^https:\/\/duckduckgo.com\/\?q=wb\+([^&]+).+ https://s.weibo.com/weibo/$1 302
80 | # wx: 微信
81 | ^https:\/\/duckduckgo.com\/\?q=wx\+([^&]+).+ https://weixin.sogou.com/weixinwap?query=$1 302
82 | # rd (Reddit)
83 | ^https:\/\/duckduckgo.com\/\?q=rd\+([^&]+).+ https://www.reddit.com/search?q=$1 302
84 | # tw (Twitter)
85 | ^https:\/\/duckduckgo.com\/\?q=tw\+([^&]+).+ https://twitter.com/search?q=$1 302
86 | # ssp: 少数派
87 | ^https:\/\/duckduckgo.com\/\?q=ssp\+([^&]+).+ https://sspai.com/search/post/$1 302
88 | # csdn: CSDN
89 | ^https:\/\/duckduckgo.com\/\?q=csdn\+([^&]+).+ https://so.csdn.net/so/search/s.do?q=$1&t=&u= 302
90 | # > 购物
91 | # zdm: 什么值得买
92 | ^https:\/\/duckduckgo.com\/\?q=zdm\+([^&]+).+ https://search.m.smzdm.com/?v=b&s=$1 302
93 | # amz: 亚马逊
94 | ^https:\/\/duckduckgo.com\/\?q=amz\+([^&]+).+ https://www.amazon.cn/gp/aw/s/?k=$1 302
95 | # jd : 京东
96 | ^https:\/\/duckduckgo.com\/\?q=jd\+([^&]+).+ https://so.m.jd.com/ware/search.action?keyword=$1 302
97 | # tb: 淘宝
98 | ^https:\/\/duckduckgo.com\/\?q=tb\+([^&]+).+ https://s.m.taobao.com/h5?q=$1 302
99 | # tm: 天猫
100 | ^https:\/\/duckduckgo.com\/\?q=tm\+([^&]+).+ https://s.m.tmall.com/m/search.htm?q=$1 302
101 | # 视频资源
102 | # ac (Acfun)
103 | ^https:\/\/duckduckgo.com\/\?q=ac\+([^&]+).+ https://www.acfun.cn/search?keyword==$1 302
104 | # bli (哔哩哔哩)
105 | ^https:\/\/duckduckgo.com\/\?q=bli\+([^&]+).+ https://m.bilibili.com/search?keyword=$1 302
106 | # ytb (YouTube)
107 | ^https:\/\/duckduckgo.com\/\?q=ytb\+([^&]+).+ https://www.youtube.com/results?search_query=$1 302
108 | # ph (PornHub)
109 | ^https:\/\/duckduckgo.com\/\?q=ph\+([^&]+).+ https://cn.pornhub.com/video/search?search=$1 302
110 | # gd (Google Drive)
111 | ^https:\/\/duckduckgo.com\/\?q=gd\+([^&]+).+ https://www.google.com/search?q=%22Google+Drive%22+$1 302
112 | # tgd (t.me/gdurl 搜索 Google Drive 资源)
113 | ^https:\/\/duckduckgo.com\/\?q=tgd\+([^&]+).+ https://t.me/s/gdurl?q=$1 302
114 | # 默认搜索
115 | # bi: 必应
116 | ^https:\/\/duckduckgo.com\/\?q=bi\+([^&]+).+ https://cn.bing.com/search?q=$1 302
117 | # bd: 百度
118 | ^https:\/\/duckduckgo.com\/\?q=bd\+([^&]+).+ https://www.baidu.com/s?wd=$1 302
119 | # ddg: DuckDuckGo
120 | ^https:\/\/duckduckgo.com\/\?q=ddg\+([^&]+).+ https://duckduckgo.com/?ia=about&q=$1 302
121 | # 无指令: 谷歌
122 | ^https:\/\/duckduckgo.com\/\?q=([^&]+).+ https://www.google.com/search?q=$1 302
123 |
124 | [MITM]
125 | hostname = %APPEND% duckduckgo.com
126 |
--------------------------------------------------------------------------------
/MmmCK.js:
--------------------------------------------------------------------------------
1 | const $prs = {
2 | get: this.$prefs?.valueForKey ?? $persistentStore.read,
3 | getJson: (key) => JSON.parse($prs.get(key), null, 4),
4 | set: (key, value) =>
5 | (this.$prefs?.setValueForKey ?? $persistentStore.write)(value, key),
6 | setJson: (key, obj) => $prs.set(key, JSON.stringify(obj)),
7 | };
8 |
9 | const $msg = (...a) => {
10 | const { $open, $copy, $media, ...r } = typeof a.at(-1) === "object" && a.pop();
11 | const [t = "", s = "", b = ""] = a;
12 | (this.$notify ??= $notification.post)(t, s, b, {
13 | action: $copy ? "clipboard" : "open-url",
14 | text: $copy,
15 | "update-pasteboard": $copy,
16 | clipboard: $copy,
17 | "open-url": $open,
18 | openUrl: $open,
19 | url: $open,
20 | mediaUrl: $media,
21 | "media-url": $media,
22 | ...r,
23 | });
24 | };
25 |
26 | const params = new URLSearchParams($request.body);
27 | const devId = params.get('c_mmbDevId');
28 |
29 | if (devId) {
30 | $msg('CK获取成功', devId);
31 | $prs.set('慢慢买CK', devId);
32 | } else {
33 | $msg('CK获取失败', 'c_mmbDevId参数不存在,请重新再试', $request.body);
34 | }
35 |
36 | $done({});
--------------------------------------------------------------------------------
/Mtxx.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | by:https://iosgs.xyz/gzFile/quanX/mtxx.conf
4 |
5 | 【Quantumult_X】
6 |
7 | [rewrite_local]
8 | ^https?://(api|h5).xiuxiu.meitu.com/(?!(v\d/feed/|v\d/search/|v\d/channel/)) url script-response-body https://raw.githubusercontent.com/githubdulong/Script/master/Mtxx.js
9 |
10 | [MITM]
11 | hostname: api.xiuxiu.meitu.com, h5.xiuxiu.meitu.com
12 |
13 | ************************************************
14 |
15 | 【Surge】
16 | [Script]
17 | 美图秀秀 = type=http-response,requires-body=1,max-size=0,pattern=^https?://(api|h5).xiuxiu.meitu.com/(?!(v\d/feed/|v\d/search/|v\d/channel/)),script-path=https://raw.githubusercontent.com/githubdulong/Script/master/Mtxx.js
18 |
19 | [MITM]
20 | hostname: api.xiuxiu.meitu.com, h5.xiuxiu.meitu.com
21 |
22 | */
23 |
24 | var obj = JSON.parse($response.body);
25 |
26 | if (obj && obj.data) {
27 | obj.data.vip_type = 1;
28 | obj.data.expire_days = -9999999999;
29 | obj.data.is_expire = 0;
30 | obj.data.in_valid_time = 5576488923;
31 | obj.data.is_valid_user = 1;
32 | obj.data.valid_time = 5576488923;
33 | obj.data.home_prompt = "粉钻会员 2100年1月1日到期";
34 | obj.data.home_btn_prompt = "已解锁";
35 | } else {
36 | console.log("obj or obj.data is undefined");
37 | }
38 |
39 | $done({ body: JSON.stringify(obj) });
--------------------------------------------------------------------------------
/Oil.js:
--------------------------------------------------------------------------------
1 | /*
2 | Surge Panel:https://raw.githubusercontent.com/githubdulong/Script/master/Surge/Oil.sgmodule
3 |
4 | 今日油价,仅限Surge Panel使用
5 | */
6 |
7 | const params = getParams($argument);
8 | const provinceName = params.provname || "湖南";
9 | const apiKey = params.apikey; // 使用模块参数填写Apikey.申请地址:https://www.tianapi.com/apiview/104 (该接口普通会员每天赠送100次调用额度);
10 |
11 | const apiUrls = [
12 | `https://apis.tianapi.com/oilprice/index?key=${apiKey}&prov=${encodeURIComponent(provinceName)}`,
13 | `https://apis.tianapi.com/oilprice/index?key=231de491563c35731436829ac52aad43&prov=${encodeURIComponent(provinceName)}`,
14 | `https://apis.tianapi.com/oilprice/index?key=a2bc7a0e01be908881ff752677cf94b7&prov=${encodeURIComponent(provinceName)}`,
15 | `https://apis.tianapi.com/oilprice/index?key=1bcc67c0114bc39a8818c8be12c2c9ac&prov=${encodeURIComponent(provinceName)}`,
16 | `https://apis.tianapi.com/oilprice/index?key=3c5ee42145c852de4147264f25b858dc&prov=${encodeURIComponent(provinceName)}`,
17 | `https://apis.tianapi.com/oilprice/index?key=d718b0f7c2b6d71cb3a9814e90bf847f&prov=${encodeURIComponent(provinceName)}`
18 | ];
19 | let currentIndex = 0;
20 |
21 | function testNextUrl() {
22 | if (currentIndex >= apiUrls.length) {
23 | console.log("所有URL都失败了");
24 | $done();
25 | return;
26 | }
27 |
28 | const apiUrl = apiUrls[currentIndex];
29 |
30 | $httpClient.get(apiUrl, (error, response, data) => {
31 | if (error) {
32 | console.log(`URL ${currentIndex + 1} 出错: ${error}`);
33 | currentIndex++;
34 | testNextUrl();
35 | } else {
36 | handleResponse(data);
37 | }
38 | });
39 | }
40 |
41 | function handleResponse(data) {
42 | const oilPriceData = JSON.parse(data);
43 | if (oilPriceData.code === 200) {
44 | const oilPriceInfo = oilPriceData.result;
45 | const message = `0#柴油:${oilPriceInfo.p0}元 | 92汽油:${oilPriceInfo.p92}元\n95汽油:${oilPriceInfo.p95}元 | 98汽油:${oilPriceInfo.p98}元`;
46 |
47 | // 获取 http://m.qiyoujiage.com 网页 HTML 内容并提取 tishiContent
48 |
49 | $httpClient.get('http://m.qiyoujiage.com/', (error, response, data) => {
50 | if (error) {
51 | console.log(`获取HTML内容出错: ${error}`);
52 | } else {
53 | // 使用正则表达式从HTML中提取 var tishiContent 的内容
54 | const tishiMatch = data.match(/var\s+tishiContent\s*=\s*"(.*?)"/);
55 | if (tishiMatch) {
56 | let tishiContent = tishiMatch[1];
57 |
58 | const dateMatch = tishiContent.match(/(\d{1,2})月(\d{1,2})日/);
59 | let formattedDate = "未知日期";
60 | let logDate = "未知日期";
61 | if (dateMatch) {
62 | let [month, day] = [parseInt(dateMatch[1]), parseInt(dateMatch[2])];
63 | logDate = `${month}月${day}日`;
64 | formattedDate = `${month.toString().padStart(2, '0')}-${(day + 1).toString().padStart(2, '0')}`;
65 | }
66 |
67 | let adjustmentSymbols = "";
68 | const adjustmentMatch = tishiContent.match(/(下调|下跌|上调|上涨)/);
69 | let adjustmentAction = adjustmentMatch[1];
70 | adjustmentSymbols = (adjustmentAction.includes("下")) ? "\u25BC\u25B3" : "\u25BD\u25B2";
71 |
72 | const priceRangeMatch = tishiContent.match(/(\d+\.\d+)元\/升-(\d+\.\d+)元\/升/);
73 | let priceAdjustment = "0.00~0.00元";
74 | if (priceRangeMatch) {
75 | priceAdjustment = `${priceRangeMatch[1]}~${priceRangeMatch[2]}`;
76 | }
77 |
78 | tishiContent = tishiContent.replace(/
/g, '\n');
79 | // 日志记录部分
80 | const currentTime = new Date().toISOString().replace('T', ' ').split('.')[0];
81 | console.log(`${currentTime} \n◼︎ 今日油价\n${message}`);
82 | console.log(`${currentTime} \n◼︎ 油价预告\n${tishiContent}`);
83 |
84 | console.log(`${currentTime} [Script Completed]`);
85 |
86 | const body = {
87 | title: `${params.title} | ${formattedDate} ${adjustmentSymbols} ${priceAdjustment}`,
88 | content: `${message}`,
89 | provname: params.provname,
90 | icon: params.icon,
91 | "icon-color": params.color
92 | };
93 | $done(body);
94 | } else {
95 | console.log("提取`tishiContent`失败");
96 | currentIndex++;
97 | testNextUrl();
98 | }
99 | }
100 | });
101 | } else {
102 | console.log(`请求失败,错误信息:${oilPriceData.msg}`);
103 | currentIndex++;
104 | testNextUrl();
105 | }
106 | }
107 |
108 | function getParams(param) {
109 | return Object.fromEntries(
110 | param
111 | .split("&")
112 | .map((item) => item.split("="))
113 | .map(([k, v]) => [k, decodeURIComponent(v)])
114 | );
115 | }
116 |
117 | testNextUrl();
--------------------------------------------------------------------------------
/One.js:
--------------------------------------------------------------------------------
1 | /*
2 | README:https://raw.githubusercontent.com/githubdulong/Script/master/One.js
3 | 每日一言(有道词典)
4 | */
5 |
6 | const $tool = new Tool();
7 | $tool.get('https://dict.youdao.com/infoline/style/cardList?mode=publish&client=mobile&style=daily&size=2', function (error, response, data) {
8 | let obj = JSON.parse(data);
9 | let date = new Date();
10 | let isAM = date.getHours() < 12;
11 | let title = '每日' + (isAM ? '一言' : '一言') + (isAM ? ' ☀️' : ' 🌙');
12 | let subtitle = '';
13 | let content = obj[1] ? obj[1].title + '\n' + obj[1].summary : '';
14 |
15 | if (!error && obj && obj.length > 1) {
16 | let yi = obj[1];
17 | let imageUrl = yi.image[0];
18 | let options = {
19 | "action": "clipboard",
20 | "text": content,
21 | "media-url": imageUrl,
22 | "sound": true,
23 | "auto-dismiss": 600
24 | };
25 | $tool.notify(title, subtitle, content, options);
26 | } else {
27 |
28 | $tool.notify(title, subtitle, content);
29 | }
30 | $done();
31 | });
32 |
33 |
34 | function Tool() {
35 | _node = (() => {
36 | if (typeof require == "function") {
37 | const request = require('request')
38 | return ({ request })
39 | } else {
40 | return (null)
41 | }
42 | })()
43 | _isSurge = typeof $httpClient != "undefined"
44 | _isQuanX = typeof $task != "undefined"
45 | this.isSurge = _isSurge
46 | this.isQuanX = _isQuanX
47 | this.isResponse = typeof $response != "undefined"
48 | this.notify = (title, subtitle, message, option) => {
49 | if (_isQuanX) $notify(title, subtitle, message, option)
50 | if (_isSurge) $notification.post(title, subtitle, message, option)
51 | if (_node) console.log(JSON.stringify({ title, subtitle, message }));
52 | }
53 | this.write = (value, key) => {
54 | if (_isQuanX) return $prefs.setValueForKey(value, key)
55 | if (_isSurge) return $persistentStore.write(value, key)
56 | }
57 | this.read = (key) => {
58 | if (_isQuanX) return $prefs.valueForKey(key)
59 | if (_isSurge) return $persistentStore.read(key)
60 | }
61 | this.get = (options, callback) => {
62 | if (_isQuanX) {
63 | if (typeof options == "string") options = { url: options }
64 | options["method"] = "GET"
65 | $task.fetch(options).then(response => { callback(null, _status(response), response.body) }, reason => callback(reason.error, null, null))
66 | }
67 | if (_isSurge) $httpClient.get(options, (error, response, body) => { callback(error, _status(response), body) })
68 | if (_node) _node.request(options, (error, response, body) => { callback(error, _status(response), body) })
69 | }
70 | this.post = (options, callback) => {
71 | if (_isQuanX) {
72 | if (typeof options == "string") options = { url: options }
73 | options["method"] = "POST"
74 | $task.fetch(options).then(response => { callback(null, _status(response), response.body) }, reason => callback(reason.error, null, null))
75 | }
76 | if (_isSurge) $httpClient.post(options, (error, response, body) => { callback(error, _status(response), body) })
77 | if (_node) _node.request.post(options, (error, response, body) => { callback(error, _status(response), body) })
78 | }
79 | _status = (response) => {
80 | if (response) {
81 | if (response.status) {
82 | response["statusCode"] = response.status
83 | } else if (response.statusCode) {
84 | response["status"] = response.statusCode
85 | }
86 | }
87 | return response
88 | }
89 | }
--------------------------------------------------------------------------------
/OpenClash.yaml:
--------------------------------------------------------------------------------
1 | # ==UserScript==
2 | # @修改自墨鱼Clash配置文件
3 | # ==/UserScript==
4 |
5 | port: 7890
6 | socks-port: 7891
7 | redir-port: 7892
8 | mixed-port: 7893
9 | allow-lan: true
10 | bind-address: "*"
11 | mode: rule
12 | log-level: info
13 | ipv6: false
14 | external-controller: 127.0.0.1:9090
15 | dns:
16 | enable: true
17 | ipv6: false
18 | listen: 0.0.0.0:53
19 | enhanced-mode: fake-ip
20 | fake-ip-range: 198.18.0.1/16
21 | fake-ip-filter:
22 | - "*.lan"
23 | - localhost.ptlogin2.qq.com
24 | - +.srv.nintendo.net
25 | - +.stun.playstation.net
26 | - +.msftconnecttest.com
27 | - +.msftncsi.com
28 | - +.xboxlive.com
29 | - msftconnecttest.com
30 | - xbox.*.microsoft.com
31 | - "*.battlenet.com.cn"
32 | - "*.battlenet.com"
33 | - "*.blzstatic.cn"
34 | - "*.battle.net"
35 | nameserver:
36 | - 223.5.5.5
37 | - 119.29.29.29
38 | - 114.114.114.114
39 | fallback:
40 | - https://cloudflare-dns.com/dns-query
41 | - https://dns.google/dns-query
42 | - https://dns.alidns.com/dns-query
43 | fallback-filter:
44 | geoip: true
45 | geoip-code: CN
46 | ipcidr:
47 | - 240.0.0.0/4
48 | #锚点
49 | pr:
50 | &a3
51 | type: select
52 | proxies:
53 | - 自动切换
54 | - 手动选择
55 | - 香港节点
56 | - 日本节点
57 | - 美国节点
58 | - 台湾节点
59 | - 狮城节点
60 | - DIRECT
61 | p:
62 | &a1
63 | type: http
64 | interval: 86400
65 | health-check:
66 | enable: true
67 | url: http://cp.cloudflare.com/generate_204
68 | interval: 1800
69 | auto:
70 | &a4
71 | type: url-test
72 | lazy: true
73 | url: http://cp.cloudflare.com/generate_204
74 | interval: 900
75 | use:
76 | - Subscribe
77 | use:
78 | &a2
79 | type: select
80 | use:
81 | - Subscribe
82 | c:
83 | &a6
84 | type: http
85 | behavior: classical
86 | interval: 86400
87 | d:
88 | &a5
89 | type: http
90 | behavior: domain
91 | interval: 86400
92 | i:
93 | &a7
94 | type: http
95 | behavior: ipcidr
96 | interval: 86400
97 | proxy-providers:
98 | Subscribe:
99 | <<: *a1
100 | url: https://sub.xeton.dev/sub?target=clash&url=此处填写订阅链接&list=true&udp=false
101 | path: ./proxy_providers/tmp.yaml
102 |
103 |
104 | proxies: null
105 | proxy-groups:
106 | #分流分组
107 | - name: 手动选择
108 | <<: *a2
109 | - name: 全球加速
110 | <<: *a3
111 | - name: 苹果服务
112 | <<: *a3
113 | - name: 哔哩哔哩
114 | type: select
115 | proxies:
116 | - DIRECT
117 | - 香港节点
118 | - 台湾节点
119 | - name: 奈飞视频
120 | <<: *a3
121 | - name: 国际媒体
122 | <<: *a3
123 | - name: 谷歌服务
124 | <<: *a3
125 | - name: 电报代理
126 | <<: *a3
127 | - name: 推特服务
128 | <<: *a3
129 | - name: 游戏加速
130 | <<: *a3
131 | - name: 广告拦截
132 | type: select
133 | proxies:
134 | - REJECT
135 | - DIRECT
136 | - name: 兜底规则
137 | <<: *a3
138 | #节点分组
139 | - name: 自动切换
140 | <<: *a4
141 | filter: 香港 HA|香港 AC
142 | - name: 香港节点
143 | <<: *a4
144 | filter: 港|HK|Hong
145 | - name: 日本节点
146 | <<: *a4
147 | filter: 日|东京|JP|Japan
148 | - name: 台湾节点
149 | <<: *a4
150 | filter: 台|湾|TW|Taiwan
151 | - name: 美国节点
152 | <<: *a4
153 | filter: 美|US|States|American
154 | - name: 狮城节点
155 | <<: *a4
156 | filter: 新|坡|SG|Singapore
157 | rule-providers:
158 | Direct:
159 | <<: *a5
160 | url: https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Direct/Direct.yaml
161 | path: ./ruleset/Direct.yaml
162 | Lan:
163 | <<: *a6
164 | url: https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Lan/Lan.yaml
165 | path: ./ruleset/Lan.yaml
166 | Download:
167 | <<: *a6
168 | url: https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Download/Download.yaml
169 | path: ./ruleset/Download.yaml
170 | Ad:
171 | <<: *a5
172 | url: https://anti-ad.net/clash.yaml
173 | path: ./ruleset/anti-ad-clash.yaml
174 | Netflix:
175 | <<: *a6
176 | url: https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Netflix/Netflix.yaml
177 | path: ./ruleset/Netflix.yaml
178 | GlobalMedia:
179 | <<: *a6
180 | url: https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/GlobalMedia/GlobalMedia_Classical.yaml
181 | path: ./ruleset/GlobalMedia.yaml
182 | Apple:
183 | <<: *a6
184 | url: https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Apple/Apple_Classical.yaml
185 | path: ./ruleset/Apple.yaml
186 | Github:
187 | <<: *a6
188 | url: https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/GitHub/GitHub.yaml
189 | path: ./ruleset/Github.yaml
190 | Google:
191 | <<: *a6
192 | url: https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Google/Google.yaml
193 | path: ./ruleset/Google.yaml
194 | Telegram:
195 | <<: *a6
196 | url: https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Telegram/Telegram.yaml
197 | path: ./ruleset/Telegram.yaml
198 | Twitter:
199 | <<: *a6
200 | url: https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Twitter/Twitter.yaml
201 | path: ./ruleset/Twitter.yaml
202 | BiliBili:
203 | <<: *a6
204 | url: https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/BiliBili/BiliBili.yaml
205 | path: ./ruleset/BiliBili.yaml
206 | Game:
207 | <<: *a6
208 | url: https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Game/Game.yaml
209 | path: ./ruleset/Game.yaml
210 | ChinaIP:
211 | <<: *a7
212 | url: https://cdn.jsdelivr.net/gh/soffchen/GeoIP2-CN@release/clash-rule-provider.yml
213 | path: ./ruleset/ChinaIP.yaml
214 | ProxyLite:
215 | <<: *a6
216 | url: https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/ProxyLite/ProxyLite.yaml
217 | path: ./ruleset/ProxyLite.yaml
218 | rules:
219 |
220 | - RULE-SET,Direct,DIRECT
221 | - RULE-SET,Lan,DIRECT
222 | - RULE-SET,Download,DIRECT
223 | - RULE-SET,Ad,广告拦截
224 | - RULE-SET,Netflix,奈飞视频
225 | - RULE-SET,GlobalMedia,国际媒体
226 | - RULE-SET,Apple,苹果服务
227 | - RULE-SET,Github,全球加速
228 | - RULE-SET,Google,谷歌服务
229 | - RULE-SET,Telegram,电报代理
230 | - RULE-SET,Twitter,全球加速
231 | - RULE-SET,BiliBili,哔哩哔哩
232 | - RULE-SET,Game,游戏加速
233 | - RULE-SET,ProxyLite,全球加速
234 | - RULE-SET,ChinaIP,DIRECT
235 | - GEOIP,CN,DIRECT
236 | - MATCH,兜底规则
--------------------------------------------------------------------------------
/QuantumultX/API.js:
--------------------------------------------------------------------------------
1 | if ($response.statusCode != 200) {
2 | $done(Null);
3 | }
4 |
5 | var body = $response.body;
6 | var obj = JSON.parse(body);
7 | var title = obj['country'];
8 | var subtitle = obj['city'] + ' ' + obj['isp'];
9 | var ip = obj['query'];
10 | var description = "国家" + ":" + obj['country'] + '\n' + "城市" + ":" + obj['city'] + '\n' + "运营商" + ":" + obj['isp'] + '\n' + "数据中心" + ":" + obj['org'];
11 |
12 |
13 | $done({title, subtitle, ip, description});
14 |
15 |
--------------------------------------------------------------------------------
/QuantumultX/Cookie.conf:
--------------------------------------------------------------------------------
1 | # > Cookie获取
2 |
3 | # 美团 app获取
4 | ^https:\/\/i.meituan.com\/evolve\/signin\/signpost\/ url script-request-body https://raw.githubusercontent.com/chavyleung/scripts/master/meituan/meituan.cookie.js
5 | # 微博推送 登陆 https://m.weibo.cn获取
6 | ^https:\/\/m\.weibo\.cn\/feed\/ url script-request-header https://raw.githubusercontent.com/zZPiglet/Task/master/Weibo/Weibo.js
7 | # 百度贴吧 app获取
8 | ^https?:\/\/(c\.tieba\.baidu\.com|180\.97\.\d+\.\d+)\/c\/s\/login url script-request-header https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/tieba/tieba_signin.js
9 | ^https?:\/\/c\.tieba\.baidu\.com\/c\/s\/channelIconConfig url script-request-header https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/tieba/tieba_signin.js
10 | ^https?:\/\/tiebac\.baidu\.com\/c\/u\/follow\/getFoldedMessageUserInfo url script-request-header https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/tieba/tieba_signin.js
11 | # 什么值得买 app获取
12 | ^https?:\/\/user-api\.smzdm\.com\/checkin$ url script-request-header https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_daily.js
13 | # ^https?:\/\/user-api\.smzdm\.com\/user_login\/normal$ url script-request-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_daily.js
14 | # IT之家 app获取
15 | ^https:\/\/my\.ruanmei\.com\/api\/usersign\/getsigninfo? url script-request-header https://raw.githubusercontent.com/chavyleung/scripts/master/ithome/ithome.cookie.js
16 | # 联通组件 app点流量
17 | ^https:\/\/m\.client\.10010\.com\/serviceimportantbusiness\/smart\/smartwisdomCommon url script-request-header https://raw.githubusercontent.com/dompling/Script/master/10010/index.js
18 | # 网易新闻 app获取
19 | ^https:\/\/(.*?)c\.m\.163\.com\/uc\/api\/sign\/v3\/commit url script-request-body https://raw.githubusercontent.com/chavyleung/scripts/master/neteasenews/neteasenews.cookie.js
20 | # 慢慢买 app获取
21 | ^https?:\/\/apph5\.manmanbuy\.com\/taolijin\/(login.aspx|logserver.aspx) url script-request-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/manmanbuy/manmanbuy_checkin.js
22 | # 哔哩哔哩 app或网页 https://www.bilibili.com/
23 | ^https:\/\/app\.bilibili\.com\/x\/resource\/domain\? url script-request-header https://raw.githubusercontent.com/ClydeTime/Quantumult/main/Script/Task/BiliBili.js
24 | ^https:\/\/m.bilibili.com/$ url script-request-header https://raw.githubusercontent.com/ClydeTime/Quantumult/main/Script/Task/BiliBili.js
25 | # 伊利乳品 小程序获取
26 | https:\/\/club\.yili\.com\/MALLIFChe\/MCSWSIAPI\.asmx\/Call url script-request-body https://raw.githubusercontent.com/id77/QuantumultX/master/task/yiLi.cookie.js
27 | # 爱奇艺签到 登陆 https://m.iqiyi.com/user.html
28 | ^https:\/\/passport\.iqiyi\.com\/apis\/user\/ url script-request-header https://raw.githubusercontent.com/NobyDa/Script/master/iQIYI-DailyBonus/iQIYI.js
29 | # 捷停车 app获取
30 | ^https:\/\/sytgate\.jslife\.com\.cn\/core-gateway\/order\/carno\/pay\/info url script-request-body https://raw.githubusercontent.com/FoKit/Scripts/main/scripts/jparking_sign.js
31 | # 喜马拉雅 app获取
32 | ^https?:\/\/mobile\.ximalaya\.com\/app-skin-service\/skin\/ url script-request-header https://raw.githubusercontent.com/ClydeTime/Quantumult/main/Script/Task/xmlySign.js
33 | # 阿里云盘 app获取
34 | ^https:\/\/auth\.alipan.com\/v2\/account\/token url script-response-body https://raw.githubusercontent.com/lowking/Scripts/master/ali/aliYunPanCheckIn.js
35 | # 顺丰速运 app获取
36 | ^https:\/\/ccsp-egmas.sf-express.com\/cx-app-member\/member\/app\/user\/universalSign url script-request-body https://raw.githubusercontent.com/chavyleung/scripts/master/sfexpress/sfexpress.cookie.js
37 |
38 | # > Hostname主机名
39 | hostname = i.meituan.com, m.weibo.cn, tieba.baidu.com, *.xxjjappss.com,*.*.mob.com,*.huaerdadi.com, user-api.smzdm.com, c.tieba.baidu.com, tiebac.baidu.com, my.ruanmei.com, m.client.10010.com, *.m.163.com, apph5.manmanbuy.com, app.bilibili.com, m.bilibili.com, club.yili.com, passport.iqiyi.com, sytgate.jslife.com.cn, mobile.ximalaya.com, 180.153.255.*, 180.153.255.10*, 180.153.250.*, 114.80.99.*, 1.62.62.64, ccsp-egmas.sf-express.com, auth.alipan.com
40 |
--------------------------------------------------------------------------------
/QuantumultX/Q-Search_All_in_one.conf:
--------------------------------------------------------------------------------
1 | # > Q-Search
2 |
3 | # Safari 内输入 命令 + 空格 + 关键词 快速指定搜索引擎搜索
4 | # 注:先进入设置更改 Safari 默认搜索为 DuckDuckGO
5 | # 可自行修改指令或者添加搜索引擎
6 |
7 | # gh: GitHub 搜索
8 | # gm: Google 图片搜索
9 | # sof: Stack Overflow
10 | # se: StackExchange
11 |
12 | # yd: 有道词典搜索
13 | # trc: Google 译至中
14 | # tre: Google 译至英
15 | # trj: Google 译至日
16 |
17 | # db: 豆瓣搜索
18 | # zh: 知乎
19 | # wb: 微博
20 | # wx: 微信
21 | # rd: Reddit
22 | # zdm: 什么值得买
23 | # amz: 亚马逊
24 | # jd: 京东
25 | # tb: 淘宝
26 | # tm: 天猫
27 |
28 | # ytb: YouTube
29 | # ph: PornHub
30 | # gd: Google Drive资源
31 | # tgd: TG搜索Google Drive资源
32 |
33 | # bi: 必应搜索
34 | # bd: 百度搜索
35 | # ec: Ecosia 搜索
36 | # ddg: DuckDuckGo 搜索
37 | # 无指令则转 谷歌搜索
38 |
39 | # > 图片
40 | # gm (Google图片)
41 | ^https:\/\/duckduckgo.com\/\?q=gm\+([^&]+).+ url 302 https://www.google.com/search?&tbm=isch&q=$1
42 | # gh (GitHub)
43 | ^https:\/\/duckduckgo.com\/\?q=gh\+([^&]+).+ url 302 https://github.com/search?q=$1
44 | # sof (Stack Overflow)
45 | ^https:\/\/duckduckgo.com\/\?q=sof\+([^&]+).+ url 302 https://stackoverflow.com/search?q=$1
46 | # se (StackExchange)
47 | ^https:\/\/duckduckgo.com\/\?q=se\+([^&]+).+ url 302 https://stackexchange.com/search?q=$1
48 | # wa (WolframAlpha)
49 | ^https:\/\/duckduckgo.com\/\?q=wa\+([^&]+).+ url 302 https://www.wolframalpha.com/input/?i=$1
50 |
51 | # > 翻译
52 | # yd (有道)
53 | ^https:\/\/duckduckgo.com\/\?q=yd\+([^&]+).+ url 302 http://dict.youdao.com/search?q=$1
54 | # trc (Google 译至中)
55 | ^https:\/\/duckduckgo.com\/\?q=trc\+([^&]+).+ url 302 https://translate.google.com/#view=home&op=translate&sl=auto&tl=zh-CN&text=$1
56 | # tre (Google 译至英)
57 | ^https:\/\/duckduckgo.com\/\?q=tre\+([^&]+).+ url 302 https://translate.google.com/#view=home&op=translate&sl=auto&tl=en&text=$1
58 | # trj (Google 译至日)
59 | ^https:\/\/duckduckgo.com\/\?q=trj\+([^&]+).+ url 302 https://translate.google.com/#view=home&op=translate&sl=auto&tl=ja&text=$1
60 |
61 | # > 社区
62 | # db:豆瓣
63 | ^https:\/\/duckduckgo.com\/\?q=db\+([^&]+).+ url 302 https://m.douban.com/search/?query=$1
64 | # zh: 知乎
65 | ^https:\/\/duckduckgo.com\/\?q=zh\+([^&]+).+ url 302 https://www.zhihu.com/search?type=content&q=$1
66 | # wb: 微博
67 | ^https:\/\/duckduckgo.com\/\?q=wb\+([^&]+).+ url 302 https://s.weibo.com/weibo/$1
68 | # wx: 微信
69 | ^https:\/\/duckduckgo.com\/\?q=wx\+([^&]+).+ url 302 https://weixin.sogou.com/weixinwap?query=$1
70 | # rd (Reddit)
71 | ^https:\/\/duckduckgo.com\/\?q=rd\+([^&]+).+ url 302 https://www.reddit.com/search?q=$1
72 | # tw (Twitter)
73 | ^https:\/\/duckduckgo.com\/\?q=tw\+([^&]+).+ url 302 https://twitter.com/search?q=$1
74 |
75 | # > 购物
76 | # zdm: 什么值得买
77 | ^https:\/\/duckduckgo.com\/\?q=zdm\+([^&]+).+ url 302 https://search.m.smzdm.com/?v=b&s=$1
78 | # amz: 亚马逊
79 | ^https:\/\/duckduckgo.com\/\?q=amz\+([^&]+).+ url 302 https://www.amazon.cn/gp/aw/s/?k=$1
80 | # jd : 京东
81 | ^https:\/\/duckduckgo.com\/\?q=jd\+([^&]+).+ url 302 https://so.m.jd.com/ware/search.action?keyword=$1
82 | # tb: 淘宝
83 | ^https:\/\/duckduckgo.com\/\?q=tb\+([^&]+).+ url 302 https://s.m.taobao.com/h5?q=$1
84 | # tm: 天猫
85 | ^https:\/\/duckduckgo.com\/\?q=tm\+([^&]+).+ url 302 https://s.m.tmall.com/m/search.htm?q=$1
86 |
87 | # > 视频
88 | # ytb (YouTube)
89 | ^https:\/\/duckduckgo.com\/\?q=ytb\+([^&]+).+ url 302 https://www.youtube.com/results?search_query=$1
90 | # ph (PornHub)
91 | ^https:\/\/duckduckgo.com\/\?q=ph\+([^&]+).+ url 302 https://cn.pornhub.com/video/search?search=$1
92 | # gd (Google Drive)
93 | ^https:\/\/duckduckgo.com\/\?q=gd\+([^&]+).+ url 302 https://www.google.com/search?q=%22Google+Drive%22+$1
94 | # tgd (t.me/gdurl 搜索 Google Drive 资源)
95 | ^https:\/\/duckduckgo.com\/\?q=tgd\+([^&]+).+ url 302 https://t.me/s/gdurl?q=$1
96 |
97 | # > 搜索引擎
98 | # ec: Ecosia
99 | ^https:\/\/duckduckgo.com\/\?q=ec\+([^&]+).+ url 302 https://www.ecosia.org/search?q=$1
100 | # bi: 必应
101 | ^https:\/\/duckduckgo.com\/\?q=bi\+([^&]+).+ url 302 https://cn.bing.com/search?q=$1
102 | # bd: 百度
103 | ^https:\/\/duckduckgo.com\/\?q=bd\+([^&]+).+ url 302 https://www.baidu.com/s?wd=$1
104 | # ddg: DuckDuckGo
105 | ^https:\/\/duckduckgo.com\/\?q=ddg\+([^&]+).+ url 302 https://duckduckgo.com/?ia=about&q=$1
106 | # 无指令: google
107 | ^https:\/\/duckduckgo.com\/\?q=([^&]+).+ url 302 https://www.google.com/search?q=$1
108 |
109 | # > tgd
110 | # tgd xxx (t.me/gdsharing 搜索 Google Drive 资源)
111 | ^https:\/\/duckduckgo.com\/\?q=tgd(\+|%20)([^&]+).+ url 302 https://t.me/s/gdsharing?q=$2
112 |
113 | # > Hostname主机名
114 | hostname = duckduckgo.com
--------------------------------------------------------------------------------
/QuantumultX/QuantumultX.conf:
--------------------------------------------------------------------------------
1 |
2 | # > Quantumult_X/tvOS配置
3 | # > 以 “;” 或 “#” 或 “//“ 开头的行为注释行
4 | [general]
5 | excluded_routes=192.168.0.0/16, 172.16.0.0/12, 100.64.0.0/10, 10.0.0.0/8, 127.0.0.0/8, 224.0.0.0/24, 239.255.255.250/32
6 | geo_location_checker=http://ip-api.com/json/?lang=zh-CN, https://raw.githubusercontent.com/githubdulong/Script/master/QuantumultX/API.js
7 | resource_parser_url=https://raw.githubusercontent.com/KOP-XIAO/QuantumultX/master/Scripts/resource-parser.js
8 | network_check_url=http://www.baidu.com/
9 | server_check_url=http://cp.cloudflare.com/generate_204
10 | profile_img_url=https://raw.githubusercontent.com/githubdulong/Script/master/Images/MuTu.PNG
11 |
12 | [dns]
13 | prefer-doh3
14 | doh-server = https://223.5.5.5/dns-query,https://223.6.6.6/dns-query
15 | server=119.29.29.29
16 | server=223.5.5.5
17 | server=114.114.114.114
18 | server=1.0.0.1
19 | server=8.8.8.8
20 | server=/*.openai.com/8.219.102.212
21 | server=/*.taobao.com/223.5.5.5
22 | server=/*.tmall.com/223.5.5.5
23 | server=/*.alipay.com/223.5.5.5
24 | server=/*.alicdn.com/223.5.5.5
25 | server=/*.aliyun.com/223.5.5.5
26 | server=/*.jd.com/119.28.28.28
27 | server=/*.qq.com/119.28.28.28
28 | server=/*.tencent.com/119.28.28.28
29 | server=/*.weixin.com/119.28.28.28
30 | server=/*.bilibili.com/119.29.29.29
31 | server=/hdslb.com/119.29.29.29
32 | server=/*.163.com/119.29.29.29
33 | server=/*.126.com/119.29.29.29
34 | server=/*.126.net/119.29.29.29
35 | server=/*.127.net/119.29.29.29
36 | server=/*.netease.com/119.29.29.29
37 | server=/*.mi.com/119.29.29.29
38 | server=/*.xiaomi.com/119.29.29.29
39 |
40 | [policy]
41 | # > 策略分组
42 | # 延迟选择(隐藏策略)
43 | url-latency-benchmark=AUTO, resource-tag-regex=Server, server-tag-regex=深港|韩国 07|香港 06, check-interval=600, tolerance=0, alive-checking=false, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Quantumult_X.png
44 | # YouTube
45 | static=YouTube, resource-tag-regex=Server, server-tag-regex=狮|新|港, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/YouTube.png
46 | # Netflix
47 | static=Netflix, resource-tag-regex=Server, server-tag-regex=新|狮, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Netflix.png
48 | # Disney+
49 | static=Disney+, resource-tag-regex=Server, server-tag-regex=狮|新|港, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Disney.png
50 | # 香港
51 | static=Hong Kong, resource-tag-regex=Server, server-tag-regex=港, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Hong_Kong.png
52 | # 新加坡
53 | static=Singapore, resource-tag-regex=Server, server-tag-regex=新|狮, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Singapore.png
54 | # 其它
55 | static=Other, resource-tag-regex=Server, server-tag-regex=^((?!港|新|狮).)*$, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/United_Nations.png
56 |
57 | [server_remote]
58 | # 机场服务器
59 | 订阅链接, tag=Server, img-url=https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/China_Map.png, update-interval=172800, opt-parser=true, enabled=true
60 |
61 | [filter_remote]
62 | #> 规则分流
63 | # 规则修正
64 | https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/Unbreak.list, tag=规则修正, force-policy=direct, update-interval=86400, opt-parser=true, enabled=true
65 | # 广告拦截
66 | https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/Guard/Advertising.list, tag=广告拦截, force-policy=reject, update-interval=86400, opt-parser=true, enabled=true
67 | # 域名拦截
68 | https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/Guard/AdvertisingPlus.list#type=domain-set, tag=域名拦截, force-policy=reject, update-interval=86400, opt-parser=true, enabled=true
69 | # 隐私保护
70 | https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/Guard/Privacy.list, tag=隐私保护, force-policy=reject, update-interval=86400, opt-parser=true, enabled=true
71 | # 运营劫持
72 | https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/Guard/Hijacking.list, tag=运营劫持, force-policy=reject, update-interval=86400, opt-parser=true, enabled=true
73 | # YouTube
74 | https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/StreamingMedia/Video/YouTube.list, tag=油管视频, force-policy=YouTube, update-interval=86400, opt-parser=true, enabled=true
75 | # Netflix
76 | https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/StreamingMedia/Video/Netflix.list, tag=奈飞视频, force-policy=Netflix, update-interval=86400, opt-parser=true, enabled=true
77 | # Disney+
78 | https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/StreamingMedia/Video/DisneyPlus.list, tag=米奇视频, force-policy=Disney+, update-interval=86400, opt-parser=true, enabled=true
79 | # 国外网站
80 | https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/StreamingMedia/Streaming.list, tag=国外网站, force-policy=AUTO, update-interval=86400, opt-parser=true, enabled=true
81 | # 全球加速
82 | https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/Global.list, tag=全球加速, force-policy=AUTO, update-interval=86400, opt-parser=true, enabled=true
83 | # 苹果TF
84 | https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/QuantumultX/TestFlight/TestFlight.list, tag=内测商店, force-policy=AUTO, update-interval=86400, opt-parser=false, enabled=true
85 | # 苹果服务
86 | https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/Extra/Apple/Apple.list, tag=苹果服务, force-policy=direct, update-interval=86400, opt-parser=true, enabled=true
87 | # CN(回国服务)
88 | https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/China.list, tag=回国服务, force-policy=direct, update-interval=86400, opt-parser=true, enabled=true
89 |
90 | [rewrite_remote]
91 | # TF商店管理
92 | https://raw.githubusercontent.com/NobyDa/Script/master/TestFlight/TestFlightAccount.js, tag=内测管理, update-interval=172800, opt-parser=true, enabled=true
93 | # Boxjs会话
94 | https://raw.githubusercontent.com/chavyleung/scripts/master/box/rewrite/boxjs.rewrite.quanx.conf, tag=会话管理, update-interval=172800, opt-parser=true, enabled=true
95 |
96 | [server_local]
97 |
98 | [task_local]
99 |
100 | [rewrite_local]
101 |
102 | [filter_local]
103 | final, Proxy
104 |
105 | [http_backend]
106 | # Boxjs(域名http://127.0.0.1:9999)
107 | https://raw.githubusercontent.com/chavyleung/scripts/master/box/chavy.boxjs.js, tag=Boxjs会话, path=^/, enabled=true
108 |
109 | [mitm]
110 | # > 通用证书(生成)
111 | passphrase = BBDFA888
--------------------------------------------------------------------------------
/QuantumultX/Script.conf:
--------------------------------------------------------------------------------
1 | # 【JavaScript】合集
2 |
3 | # New Bing Ai
4 | ^https:\/\/www\.bing\.com\/(search|new) url request-header (\r\nUser-Agent:.+?)\w+\/[\d\.]+(\r\n) request-header $1AppleWebKit/537.36 Chrome/110.0 Safari/537.36 Edg/110.0$2
5 | # Youtube 简体字幕
6 | //https:\/\/www.youtube.com\/api\/timedtext\?.+&lang=(?!zh)((?!&tlang=zh\-Hans).)*$ url request-header \sHTTP/1\.1(\r\n) request-header &tlang=zh-Hans HTTP/1.1$1
7 | # 掌阅 去广告
8 | ^https?:\/\/ih2\.ireader\.com\/zyapi\/bookstore\/ad\/ url reject-200
9 | ^https?:\/\/ih2\.ireader\.com\/zyapi\/self\/screen\/ad url reject-200
10 | ^https?:\/\/ih2\.ireader\.com\/zycl\/api\/ad\/ url reject-200
11 | # 作业帮 去广告
12 | ^https:\/\/syh\.zybang\.com\/com\/adx\/impress$ url reject-200
13 | # 京东 去广告
14 | ^https?:\/\/api\.m\.jd\.com\/client\.action\?functionId=start$ url reject-200
15 | # 小米运动 去广告
16 | ^https:\/\/api-mifit-cn2\.huami\.com\/discovery\/mi\/cards\/startpage_ad url reject
17 | # 京东极速版 去广告
18 | https://api.m.jd.com/client.action\?functionId=lite_advertising url reject
19 | # > 京东金融 去广告
20 | ^https?:\/\/ms\.jr\.jd\.com\/gw\/generic\/aladdin\/(new)?na\/m\/getLoadingPicture url reject
21 | # 滴滴出行 去广告
22 | //01 安全提示横幅
23 | ^https:\/\/guard\.sec\.xiaojukeji\.com\/api\/guard\/psg\/v2\/getShieldStatus url reject
24 | //02 底部打车&代价推荐
25 | ^https:\/\/conf\.diditaxi\.com\.cn\/one url reject
26 | //03 福利专区-金融服务-公交-骑车-滴滴乐园
27 | ^https:\/\/conf\.diditaxi\.com\.cn\/nav\/widget url reject
28 | //04 接送机-优惠商城
29 | ^https:\/\/api\.udache\.com\/gulfstream url reject
30 | //05 主页 领任务
31 | ^https:\/\/conf\.diditaxi\.com\.cn\/api\/(component|fusion|dynamicmodule|usercenter) url reject
32 | ^https:\/\/conf\.diditaxi\.com\.cn\/dynamic url reject
33 | //06 主页 非主流式悬浮挂件
34 | ^https:\/\/res\.xiaojukeji\.com\/resapi\/activity\/mget url reject
35 | //07 商城
36 | ^https:\/\/shop-gw\.chengxinyouxuan\.com\/(route|indexConfig|apolloConfig|getShopTuanInfos) url reject
37 | //08 开屏广告
38 | ^https:\/\/img-ys011\.didistatic\.com\/static url reject
39 | //09 骑行
40 | ^https:\/\/pt-starimg\.didistatic\.com\/static url reject
41 | # 云闪付 去广告
42 | ^https:\/\/wallet\.95516\.com\/s\/wl\/icon\/long url reject
43 | # 人人视频 去广告
44 | ^https?:\/\/api\.rr\.tv\/(?:ad\/getAll$|storage/business/rootName/app/homePage) url reject
45 | # 交管12123 去广告
46 | ^https:\/\/gab\.122\.gov\.cn\/eapp\/m\/sysquery\/adver$ url reject
47 | # 狮桥司机 去广告
48 | ^https:\/\/api-daoshang\.shiqiao\.com\/cloud-common\/(startupPageNew|versionManger)\/(query$|isUpdate$) url reject
49 | # IT之家 去广告
50 | ^https:\/\/m\.ithome\.com\/api\/news\/newslistpageget url script-response-body https://raw.githubusercontent.com/chouchoui/QuanX/master/Scripts/ithome/ithome.ad.js
51 | ^https:\/\/api\.ithome\.com\/json\/(listpage|newslist)\/news url script-response-body https://raw.githubusercontent.com/chouchoui/QuanX/master/Scripts/ithome/ithome.ad.js
52 | ^https:\/\/api\.ithome\.com\/json\/slide\/index url script-response-body https://raw.githubusercontent.com/chouchoui/QuanX/master/Scripts/ithome/ithome.ad.js
53 | ^https:\/\/api\.zuihuimai\.com url reject
54 | ^https:\/\/napi\.ithome\.com\/api\/(news|topmenu)\/(getfeeds|index) url script-response-body https://raw.githubusercontent.com/chouchoui/QuanX/master/Scripts/ithome/ithome.ad.js
55 | # 威锋 去广告
56 | ^https:\/\/api\.wfdata\.club\/v2\/yesfeng\/(infoCenterAd|yesList) url reject
57 | # 美团 去广告
58 | ^https:\/\/flowplus\.meituan\.net\/v1\/mss_\w+\/linglong\/\d+\.jpg$ url reject-dict
59 | ^https:\/\/s3plus\.meituan\.net\/v1\/mss_\w+\/(brandcpt-vedio|waimai-alita)\/\w+\.zip$ url reject-dict
60 | # 腾讯视频 去开屏(重装app)
61 | ^http:\/\/(.+qqvideo\.tc\.qq\.com\/.+mp4|pgdt\.gtimg\.cn) url reject-200
62 | # 顺丰速运 去开屏
63 | ^https?:\/\/ccsp-egmas\.sf-express\.com\/cx-app-base\/base\/app\/appVersion\/detectionUpgrade url reject-dict
64 | ^https?:\/\/ccsp-egmas\.sf-express\.com\/cx-app-base\/base\/app\/ad\/ url reject
65 | ^https?:\/\/shopic\.sf-express\.com\/crm\/mobile\/common\/flashscreen url reject
66 | # 拼多多 去开屏
67 | ^https?:\/\/api\.(pinduoduo|yangkeduo)\.com\/api\/cappuccino\/splash url reject
68 | # 易有云 去横幅广告
69 | ^https:\/\/doc\.linkease\.com\/linkease\/appGuide\/banner url reject
70 | # VSCO 解锁
71 | ^https:\/\/(api\.revenuecat\.com\/v\d\/subscribers|vsco\.co\/api\/subscriptions\/\d\.\d\/user-subscriptions)\/ url script-response-body https://raw.githubusercontent.com/githubdulong/Script/master/vsco.js
72 | # 扫描全能王 pro
73 | ^https:\/\/(api|api-cs)*\.intsig\.net\/purchase\/cs\/query_property\? url script-response-body https://raw.githubusercontent.com/githubdulong/Script/master/CamScanner.js
74 | # DayOne 解锁
75 | ^https:\/\/dayone\.(me|app)\/api\/(users|v2\/users\/(account-status|receipt))$ url script-request-body https://raw.githubusercontent.com/langkhach270389/Surge-LK/main/scripts/langkhach/dayone.js
76 | # 百度云盘 解锁
77 | https:\/\/pan\.baidu\.com\/rest\/2\.0\/membership\/user url script-response-body https://github.com/ddgksf2013/Scripts/raw/master/bdcloud.js
78 | # bilbii 换区、评分
79 | ^https:\/\/ap(p|i)\.bili(bili|api)\.(com|net)\/(pgc\/view\/v\d\/app\/season|x\/offline\/version)\? url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Bili_Auto_Regions.js
80 | ^https:\/\/ap(p|i)\.bili(bili|api)\.(com|net)\/x\/v\d\/search(\/type)?\?.+?%20(%E6%B8%AF|%E5%8F%B0|%E4%B8%AD)& url script-request-header https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Bili_Auto_Regions.js
81 | # Boxjs
82 | https?:\/\/boxjs\.(com|net) url script-analyze-echo-response https://raw.githubusercontent.com/chavyleung/scripts/master/box/chavy.boxjs.js
83 | # 豆瓣电影 搜索
84 | ^https://m.douban.com/movie/subject/.+ url script-response-body https://raw.githubusercontent.com/githubdulong/Script/master/Douban_qx.js
85 | # Emby 解锁
86 | ^https:\/\/mb3admin\.com\/admin\/service(\/registration\/validateDevice|\/appstore\/register|\/registration\/validate|\/registration\/getStatus|\/supporter\/retrievekey) url script-echo-response https://raw.githubusercontent.com/githubdulong/Script/master/Emby.js
87 | # 小红书开屏+信息流广告
88 | ^https?:\/\/edith\.xiaohongshu\.com\/api\/sns\/v2\/system_service\/splash_config url script-response-body https://raw.githubusercontent.com/chouchoui/QuanX/master/Scripts/xiaohongshu/xiaohongshu.ad.js
89 | ^https:\/\/edith\.xiaohongshu\.com\/api\/sns\/v6\/homefeed\? url script-response-body https://raw.githubusercontent.com/chouchoui/QuanX/master/Scripts/xiaohongshu/xiaohongshu.ad.js
90 | # 奈飞评分
91 | ^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js
92 | ^https?://ios(-.*)?\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js
93 |
94 | # > MITM主机名
95 | hostname = -*.snssdk.com, -*.amemv.com, ap*.intsig.net, dayone.*, *.musical.ly, *.lagoapps.com, api.meiyan.com, gist.githubusercontent.com, vsco.co, spclient.wg.spotify.com, pan.baidu.com, ap?.bilibili.com, ap?.biliapi.net, btrace.qq.com, api.revenuecat.com, www.youtube.com, m.ithome.com, api.ithome.com, api.zuihuimai.com, napi.ithome.com, gab.122.gov.cn, api-mifit-cn2.huami.com, as.xiaojukeji.com, pt-starimg.didistatic.com, security.xiaojukeji.com, guard.sec.xiaojukeji.com, conf.diditaxi.com.cn, api.udache.com, res.xiaojukeji.com, shop-gw.chengxinyouxuan.com, img-ys011.didistatic.com, wallet.95516.com, api-daoshang.shiqiao.com, api.wfdata.club, boxjs.net, boxjs.com, m.douban.com, mb3admin.com, flowplus.meituan.net ,syh.zybang.com, ms.jr.jd.com, flowplus.meituan.net, s3plus.meituan.net, *.xiaohongshu.com, ios-*.prod.ftl.netflix.com,ios.prod.ftl.netflix.com, *.sf-express.com, www.bing.com, api.pinduoduo.com, doc.linkease.com
--------------------------------------------------------------------------------
/QuantumultX/jd_hd.js.conf:
--------------------------------------------------------------------------------
1 | # jd_hd 多账号切换 @id77
2 | # 卡通按钮有双击功能切回ck1
3 | # 网页无功能区域双击隐藏ui
4 |
5 | hostname = *.jd.com, *.*.jd.com, *.jd.hk, *.*.jd.hk, jingxi.com, *.jingxi.com,
6 |
7 | https://plogin.m.jd.com/cgi-bin/mm/(domlogin|dosmslogin) url script-response-header https://raw.githubusercontent.com/id77/QuantumultX/master/Script/unHttpOnly.js
8 |
9 | # web切换jd cookie
10 | ^https?:\/\/.{0,27}\.?jd\.(com|hk)\/?((?!\.(js|json|gif|webp|dpg|flv|mp3|mp4)).)*$ url script-response-body https://raw.githubusercontent.com/id77/QuantumultX/master/Script/jd_hd.js
11 | ^https?:\/\/.*\.jingxi\.com\/?((?!\.(js|json|gif|flv|mp3|mp4)).)*$ url script-response-body https://raw.githubusercontent.com/id77/QuantumultX/master/Script/jd_hd.js
12 |
--------------------------------------------------------------------------------
/QuantumultX/jdapp_to_union.conf:
--------------------------------------------------------------------------------
1 | # 京东联盟
2 | # app商品id获取, 查看商品详情触发 @id77
3 | https:\/\/.+\.jd\.com\/graphext\/draw\?sku=(\d+).* url script-request-header https://raw.githubusercontent.com/id77/QuantumultX/master/Script/jdapp_to_union.js
4 | https:\/\/.+\.jd\.com\/product\/.*\/(\d+)\.html url script-request-header https://raw.githubusercontent.com/id77/QuantumultX/master/Script/jdapp_to_union.js
5 | https://wqsitem.jd.com/detail/\d{3,}_.+_normal.html url script-request-header https://raw.githubusercontent.com/id77/QuantumultX/master/Script/jdapp_to_union.js
6 |
7 | hostname = *.jd.com, *.*.jd.com
8 |
9 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ✰ ✰ ✰ 致谢来源及其他未注仓库 ✰ ✰ ✰
2 |
3 | * [NobyDa](https://github.com/NobyDa)
4 |
5 | * [chavyleung](https://github.com/chavyleung)
6 |
7 | * [yichahucha](https://github.com/yichahucha)
8 |
9 | * [langkhach270389](https://github.com/langkhach270389)
10 |
11 | * [Neurogram-R](https://github.com/Neurogram-R)
12 |
13 | * [Peng-YM](https://github.com/Peng-YM/QuanX)
14 |
15 | * [KOP-XIAO](https://github.com/KOP-XIAO/QuantumultX)
16 |
17 | * [dompling-2Y](https://github.com/dompling?tab=repositories)
18 |
19 | * [app2smile](https://github.com/app2smile/rules)
20 |
21 | * [VirgilClyne](https://github.com/VirgilClyne)
22 |
23 | * [blackmatrix7](https://github.com/blackmatrix7/ios_rule_script)
24 |
25 | * [DivineEngine](https://github.com/DivineEngine/Profiles/tree/master)
26 |
--------------------------------------------------------------------------------
/Reddit.js:
--------------------------------------------------------------------------------
1 | /*
2 | 去广告by@xream 解锁会员 by@ios151
3 | */
4 | let body;
5 | try {
6 | body = JSON.parse($response.body.replace(/"isNsfw":true/g, '"isNsfw":false'));
7 |
8 | // 去广告
9 | if (body.data?.children?.commentsPageAds) {
10 | body.data.children.commentsPageAds = [];
11 | }
12 | for (const [k, v] of Object.entries(body.data)) {
13 | if (v?.elements?.edges) {
14 | body.data[k].elements.edges = v.elements.edges.filter(
15 | i =>
16 | !['AdPost'].includes(i?.node?.__typename) &&
17 | !i?.node?.cells?.some(j => j?.__typename === 'AdMetadataCell') &&
18 | !i?.node?.adPayload
19 | );
20 | }
21 | }
22 |
23 | // 解锁会员
24 | body = JSON.stringify(body)
25 | .replace(/"isPremiumMember":false/g, '"isPremiumMember":true')
26 | .replace(/"isSubscribed":false/g, '"isSubscribed":true')
27 | .replace(/"isEmployee":false/g, '"isEmployee":true')
28 | .replace(/"skus": \[\]/g, '"skus": [{"kind":"Premium","subscriptionType":"Premium","name":"Premium Subscription","description":"Mobile Annual Premium Subscription","duration":{"amount":1,"unit":"YEAR"},"id":"1","quantity":"1","renewInterval":"YEAR","requiredPaymentProviders":["APPLE_INAPP","GOOGLE_INAPP"],"externalProductId":"com.reddit.premium_2","promos":[],"tags":[]}]')
29 | .replace(
30 | /({)/,
31 | '$1"has_gold_subscription":true, "pref_autoplay":false, "has_subscribed_to_premium":true, "has_visited_new_profile":true, "pref_video_autoplay":false, "features":{"promoted_trend_blanks":false}, "is_mod":true, "user_is_subscriber":true, "hide_ads":true, "isPremiumMember":true, "is_gold":true, "isBrandAffiliate": true, "has_ios_subscription":true, "seen_premium_adblock_modal":true, "has_external_account":true,'
32 | );
33 |
34 | } catch (e) {
35 | console.log(e);
36 | } finally {
37 | $done(body ? { body: body } : {});
38 | }
--------------------------------------------------------------------------------
/Scriptable/WebStore.scriptable:
--------------------------------------------------------------------------------
1 | {
2 | "always_run_in_app" : false,
3 | "icon" : {
4 | "color" : "deep-gray",
5 | "glyph" : "hdd"
6 | },
7 | "name" : "WebStore",
8 | "script" : "\/\/ Variables used by Scriptable.\n\/\/ These must be at the very top of the file. Do not edit.\n\/\/ icon-color: teal; icon-glyph: book-open;\n\nlet fm;\ntry {\n fm = FileManager.iCloud();\n} catch (e) {\n console.log('设置文件缓存路径失败,请检查 iCloud 权限是否开启');\n console.error(e);\n fm = FileManager.local();\n}\nconst RootPath = fm.documentsDirectory();\n\nconst saveFileName = (fileName) => {\n const hasSuffix = fileName.lastIndexOf('.') + 1;\n return !hasSuffix ? `${fileName}.js` : fileName;\n};\n\nconst write = (fileName, content, version = '') => {\n let file = saveFileName(fileName);\n const filePath = fm.joinPath(RootPath, file);\n fm.writeString(filePath, `${content}\\n\/\/version:${version}`);\n return true;\n};\n\nconst saveFile = async ({ moduleName, url, version }) => {\n const req = new Request(encodeURI(url));\n const content = await req.loadString();\n write(`${moduleName}`, content, version);\n return true;\n};\n\nasync function downloadWidget(widget) {\n const text = '下载';\n const a = new Alert();\n try {\n await saveFile({\n moduleName: widget.name,\n url: widget.scriptURL,\n version: widget.version,\n });\n if (widget.depend) {\n const depend = JSON.parse(widget.depend);\n for (const dependElement of depend) {\n await saveFile({\n moduleName: dependElement.name,\n url: dependElement.scriptURL,\n });\n console.log(`依赖:${dependElement.name}下载成功`);\n }\n }\n a.message = `组件脚本${widget.title}${text}成功,请在组件列表中找到${widget.name}运行!`;\n } catch (e) {\n console.log(e);\n a.message = `组件脚本${widget.title}${text}失败!`;\n }\n a.addCancelAction('确定');\n await a.presentAlert();\n return true;\n}\n\nasync function getLocalStoreWidget(widget) {\n const scriptPath = fm.joinPath(RootPath, `${widget.name}.js`);\n const scriptExists = fm.fileExists(scriptPath);\n const alreadyExistsAlert = new Alert();\n if (scriptExists) {\n const scriptContent = fm.readString(scriptPath);\n const m = scriptContent.match(\/version:(.*)\/m);\n if (m && m[1]) {\n if (m[1] !== widget.version) {\n alreadyExistsAlert.message = `检测${widget.title}存在新版本,是否更新?`;\n alreadyExistsAlert.addAction('更新');\n alreadyExistsAlert.addCancelAction('取消');\n } else {\n alreadyExistsAlert.message = `${widget.title}已经是最新版本,需要继续下载吗?`;\n alreadyExistsAlert.addAction('确定');\n alreadyExistsAlert.addCancelAction('取消');\n }\n } else {\n alreadyExistsAlert.message = `确定要安装${widget.title}吗?`;\n alreadyExistsAlert.addAction('确定');\n alreadyExistsAlert.addCancelAction('取消');\n }\n } else {\n alreadyExistsAlert.message = `确定要安装${widget.title}吗?`;\n alreadyExistsAlert.addAction('确定');\n alreadyExistsAlert.addCancelAction('取消');\n }\n if ((await alreadyExistsAlert.presentAlert()) === -1) return false;\n await downloadWidget(widget);\n}\n\nconst present = async () => {\n let data = args.queryParameters;\n if (data.name && data.scriptURL && data.version) {\n await getLocalStoreWidget(data);\n } else {\n const a = new Alert();\n a.title = data.scriptURL;\n a.message = '参数存在错误';\n a.addAction('确定');\n a.addCancelAction('取消');\n await a.presentAlert();\n return false;\n }\n};\n\nif (config.runsInApp) {\n await present();\n}\n\nScript.complete();\n\n",
9 | "share_sheet_inputs" : [
10 |
11 | ]
12 | }
--------------------------------------------------------------------------------
/Scriptable/XPin.box:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/githubdulong/Script/07862668c7ed0169c58d064b61d15e8d3bd01cfb/Scriptable/XPin.box
--------------------------------------------------------------------------------
/Slidebox.js:
--------------------------------------------------------------------------------
1 | var obj = {
2 | "data": {
3 | "env": {
4 | "projectId": "slidebox-ios-prod",
5 | "region": "us-central1",
6 | "function": "api_v1",
7 | "realm": "prod"
8 | },
9 | "appStoreRecord": {
10 | "purchases": [
11 | {
12 | "productId": "co.slidebox.iap.apple.fullversion"
13 | }
14 | ],
15 | "subscriptions": [
16 | ],
17 | "validatedTimestampMs": "1616836532860",
18 | "bundleId": "co.slidebox.Slidebox"
19 | }
20 | }
21 | };
22 | $done({body: JSON.stringify(obj)});
--------------------------------------------------------------------------------
/Surge/AUTOTF.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=公测监控
2 | #!desc=监控TestFlight占位并关闭模块,仅兼容Surge
3 | #!category=Third Party Module
4 | #!arguments=INFO_FETCH_SCRIPT_NAME:信息获取,CRON_SECONDS:5,START_HOUR:0,END_HOUR:23,HANDLE_404:0
5 | #!arguments-desc=[参数设置]\n1. INFO_FETCH_SCRIPT_NAME: 自定义"信息获取"脚本启停, 获取完TestFlight Token及APP_ID后为避免不必要的mitm, 建议在脚本名称参数添加#以注释停止该脚本;\n2. CRON_SECONDS: 自定义"加入测试"脚本执行的秒数间隔, 默认每5秒执行一次;\n3. START_HOUR: 自定义"加入测试"脚本每天开始执行的时间,默认为0点 (默认起止为全天);\n4. END_HOUR: 自定义"加入测试"脚本每天结束执行的时间,默认为23点 (默认起止为全天);\n5. HANDLE_404: 自定义404状态码的处理方式,设置为 1 则自动移除APP_ID,设置为 0 则保留并提示手动操作;\n\n[使用方法]\n1. 启用"信息获取"脚本后打开TestFlight app获取Token;\n2. 启用"信息获取"脚本后点击TestFlight链接获取APP_ID;\n3. 调整CRON_SECONDS,START_HOUR,END_HOUR参数以改变"加入测试"脚本的执行频率及起止时间段;\n4. 在模块参数中设置HANDLE_404以自定义404状态码的处理方式。\n\n[手动操作]\n1. Boxjs填写"APP_ID"的持久化数据,APP_ID为TestFlight链接 https://testflight.apple.com/join/LPQmtkUs 的join后的字符串(列如"LPQmtkUs,xxx,xxx多条key用,隔开");\n2. Boxjs订阅 https://raw.githubusercontent.com/githubdulong/Script/master/boxjs.json;\n\n[模块介绍]\n▎手动或自动捕获并存储TestFlight作者开放的应用ID,并尝试自动加入TestFlight程序。\n▎自动移除无效的TestFlight应用ID,占位类型可查看日志输出。
6 |
7 | [Script]
8 | {{{INFO_FETCH_SCRIPT_NAME}}} = type=http-request,pattern=^https:\/\/testflight\.apple\.com\/(v3\/accounts\/.*[^\/accept]|join\/[A-Za-z0-9]+)$,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/Auto_join_TF.js,argument=HANDLE_404={{{HANDLE_404}}}
9 | 加入测试 = type=cron,cronexp="*/{{{CRON_SECONDS}}} * {{{START_HOUR}}}-{{{END_HOUR}}} * * *",script-path=https://raw.githubusercontent.com/githubdulong/Script/master/Auto_join_TF.js,wake-system=1,timeout=180,engine=auto,argument=HANDLE_404={{{HANDLE_404}}}
10 |
11 | [MITM]
12 | hostname = %APPEND% testflight.apple.com
--------------------------------------------------------------------------------
/Surge/Ali.sgmodule:
--------------------------------------------------------------------------------
1 |
2 | #!name=阿里云盘
3 | #!desc=解锁本地VIP功能 按自定义随意修改
4 |
5 | [Script]
6 | 云盘解锁 = type=http-response,pattern=https:\/\/api\.aliyundrive\.com\/business\/v1\.0\/users\/vip/info, requires-body=1,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/mock.js, argument=("?vipList")->$1: [{"code": "svip.20t",, "promotedAt": 1675574551,, "expire": 4077667351,, "name": "8TB超级会员"} ],,"test"&("?level")\s?:\s?("(.+?)"|\d|null)->$1: "20t"&("?name")\s?:\s?("(.+?)"|\d|null)->$1: "20T超级会员"
7 | 云盘描述 = type=http-response,pattern=https:\/\/api\.aliyundrive\.com\/business\/v1\/users\/me\/vip\/info, requires-body=1,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/mock.js, argument=("?description")\s?:\s?("(.+?)"|\d|null)->$1: "有效期至 2099-03-20"&("?rightButtonText")\s?:\s?("(.+?)"|\d|null)->$1: "SVIP"&("?level")\s?:\s?("(.+?)"|\d|null)->$1: "20t"
8 |
9 | [MITM]
10 | hostname = %APPEND% api.aliyundrive.com
--------------------------------------------------------------------------------
/Surge/ChinaMobile.sgmodule:
--------------------------------------------------------------------------------
1 | #!name= 移动组件
2 | #!desc= Scriptable小组件重写脚本,需配合设置参数
3 | #!category=移动
4 | #!arguments=TIMEOUT:60,手机号码:'',BarkKey:'',调试模式:0,静默模式:0,Scriptable服务模式:0,禁用获参重写:''
5 | #!arguments-desc=[参数设置]\n\n⓵ TIMEOUT: 脚本运行时间, 单位为秒, 超过该时间会强制中断;\n\n⓶ 手机号码:抓取参数对应的手机号码;\n\n⓷ BarkKey: 优先级高于代理通知,填写后将只使用Bark推送;\n\n⓸ 调试模式:true/1/是为开启,其他均为关闭,开启后输调试日志;\n\n⓹ 静默模式:true/1/是为开启,其他均为关闭,开启后不会收到通知;\n\n⓺ 服务模式:0为关闭,1为开启,为Scriptable小组件设置的服务项,不使用请无视;\n\n⓻禁用重写: 填写#禁用捕获参数重写;
6 |
7 | [Script]
8 | {{{禁用重写}}}移动获取 = type=http-request,pattern=^https?:\/\/client\.app\.coc\.10086\.cn\/biz-orange\/[LD]N\/uam(onekey|randcode)login\/autoLogin,requires-body=1,max-size=0,script-path=https://github.com/ChinaTelecomOperators/ChinaMobile/releases/download/Prerelease-Alpha/10086.js
9 | 组件接口 = type=http-request, pattern=^https?:\/\/api\.example\.com\/10086\/query, script-path=https://github.com/ChinaTelecomOperators/ChinaMobile/releases/download/Prerelease-Alpha/10086.js, requires-body=true, max-size=-1, timeout={{{TIMEOUT}}},argument=phonenumber={{{手机号码}}}&bark_key={{{BarkKey}}}&debug={{{调试模式}}}&silent={{{静默模式}}}&service={{{服务模式}}}
10 |
11 | [MITM]
12 | hostname = %APPEND% api.example.com,{{{禁用重写}}}client.app.coc.10086.cn
--------------------------------------------------------------------------------
/Surge/FQ_AD.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=番茄小说
2 | #!desc=番茄小说去广告Surge版,兼容今日头条内置小说
3 | #!category=Ad Blocking Module
4 |
5 | [Rule]
6 | DOMAIN,dig.bdurl.net,REJECT
7 | AND,((DOMAIN-SUFFIX,zijieapi.com), (DOMAIN-KEYWORD,ad)),REJECT
8 | DOMAIN,is.snssdk.com,REJECT
9 |
10 | [Map Local]
11 | ^https:\/\/api-access\.pangolin-sdk-toutiao\d?\.com\/api\/ad\/ data-type=text data="{}"
12 | ^https:\/\/sf3-fe-tos\.pglstatp-toutiao\.com\/obj\/ad-pattern\/renderer\/package\.json data-type=text data="{}"
13 |
14 | [Script]
15 | 番茄小说 = type=http-response,pattern=^https:\/\/lf-cdn-tos\.bytescm\.com\/obj\/static\/ad\/play-comp\/playable-component-sdk\/package\.ugen\.json,requires-body=1,max-size=0,binary-body-mode=0,debug=1,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/Fq_Ad.js
16 |
17 | [MITM]
18 | hostname = %APPEND% api-access.pangolin-sdk-toutiao*.com, sf3-fe-tos.pglstatp-toutiao.com, lf-cdn-tos.bytescm.com
--------------------------------------------------------------------------------
/Surge/Fileball.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=云盘挂载
2 | #!desc=Fileball 挂载阿里,夸克,pikpak三合一
3 | # 添加Synoogy协议,账号随便填,密码填cookie 获取ck的方法。阿里云Token获取地址(需要用阿里云盘扫描alist的二维码获得)[ https://alist-doc.nn.ci/docs/driver/aliyundrive ]
4 | # 夸克登录网页版抓包,路径https://drive.quark.cn/1/clouddrive/file
5 | # pikpak 直接填账号密码
6 |
7 | # 作者:Xiaobl
8 | # aliyun.example.com
9 | # quark.example.com
10 | # pikpak.example.com
11 | # Fileball挂载图标:https://raw.githubusercontent.com/githubdulong/Script/master/Images/Fileball.json
12 |
13 | [General]
14 | force-http-engine-hosts = %APPEND% *.example.com:0
15 |
16 | [Script]
17 | 云盘挂载 = type=http-request,pattern=^http:\/\/(aliyun|quark|pikpak)\.example\.com,requires-body=1,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/fileball.js
--------------------------------------------------------------------------------
/Surge/Github_Private.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=访问私库
2 | #!desc=允许用户访问 GitHub/Gist 私有仓库及语言请求
3 | #!category=Third Party Module
4 | #!arguments=USERNAME:GITHUB_USERNAME,TOKEN:GITHUB_TOKEN
5 | #!arguments-desc=[参数设置]\nUSERNAME: 填入GitHub的用户名\nTOKEN: 填入GitHub生成的Token\n\n[Token获取方式]\n头像菜单 -> Settings -> Developer settings -> Personal access tokens -> Generate new token -> 在权限列表中找到并勾选 gist 然后提交生成
6 |
7 | [Header Rewrite]
8 | # 私库认证
9 | http-request ^https?:\/\/(raw|gist)\.githubusercontent\.com\/{{{USERNAME}}} header-del Authorization
10 | http-request ^https?:\/\/(raw|gist)\.githubusercontent\.com\/{{{USERNAME}}} header-add Authorization "token {{{TOKEN}}}"
11 |
12 | # 全局防 429 语言设置
13 | http-request (raw|gist).githubusercontent.com header-replace Accept-Language en-us
14 |
15 | [MITM]
16 | hostname = %APPEND% raw.githubusercontent.com, gist.githubusercontent.com
--------------------------------------------------------------------------------
/Surge/Hub.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=解析转换
2 | #!desc=快速添加通用链接为Surge格式,依赖Script.hub
3 | #!category=Third Party Module
4 | #!arguments=SURGE_SUFFIX:Surge,STASH_SUFFIX:Stash,LOON_SUFFIX:Loon,DOMAIN_HOST:kelee.one,DOMAIN_REGEX:kelee\.one,JQ_ENABLED:true
5 | #!arguments-desc=[参数设置]\n▪︎ SURGE_SUFFIX: 自定义为Surge转换链接的后戳参数\n▪︎ STASH_SUFFIX: 自定义为Stash转换链接的后戳参数\n▪︎ LOON_SUFFIX: 自定义为Loon转换链接的后戳参数\n▪︎ DOMAIN_HOST: MITM的私有域名(多个用","分隔)\n▪︎ DOMAIN_REGEX: 正则匹配的私有域名(多个用"|"分隔)\n▪︎ JQ_ENABLED: 是否支持jq语法,(true启用/false关闭)\n\n[模块说明]\n⓵ 模块依赖于https://script.hub环境运行,需提前配置\n⓶ 模块限Surge使用,Loon或Stash需自行修改格式使用\n⓷ "SUFFIX"参数按 UA填写,"DOMAIN"参数按域名填写
6 |
7 | [URL Rewrite]
8 | # Surge 转换
9 | ^https:\/\/((?:[a-zA-Z0-9.-]*(?:git|github|gitlab|gitee|gitcode)[a-zA-Z0-9.-]*|{{{DOMAIN_REGEX}}}))\/(.*)\/(.*\.(?:js|conf|snippet|plugin|list|yaml)).*({{{SURGE_SUFFIX}}})$ http://script.hub/file/_start_/https://$1/$2/$3/_end_/$3.sgmodule?type=surge-module&target=surge-module&del=true&jqEnabled={{{JQ_ENABLED}}}
10 | # Stash 转换
11 | ^https:\/\/((?:[a-zA-Z0-9.-]*(?:git|github|gitlab|gitee|gitcode)[a-zA-Z0-9.-]*|{{{DOMAIN_REGEX}}}))\/(.*)\/(.*\.(?:js|conf|snippet|plugin|list|yaml)).*({{{STASH_SUFFIX}}})$ http://script.hub/file/_start_/https://$1/$2/$3/_end_/$3.sgmodule?type=qx-rewrite&target=stash-stoverride&del=true&jqEnabled={{{JQ_ENABLED}}}
12 | # Loon 转换
13 | ^https:\/\/((?:[a-zA-Z0-9.-]*(?:git|github|gitlab|gitee|gitcode)[a-zA-Z0-9.-]*|{{{DOMAIN_REGEX}}}))\/(.*)\/(.*\.(?:js|conf|snippet|plugin|list|yaml)).*({{{LOON_SUFFIX}}})$ http://script.hub/file/_start_/https://$1/$2/$3/_end_/$3.sgmodule?type=loon-plugin&target=loon-plugin&del=true&jqEnabled={{{JQ_ENABLED}}}
14 |
15 | [MITM]
16 | hostname = %APPEND% raw.githubusercontent.com, gist.github.com, gist.githubusercontent.com, gitlab.com, gitee.com, gitcode.net, github.*, {{{DOMAIN_HOST}}}
--------------------------------------------------------------------------------
/Surge/JDWSKey.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=京东上传
2 | #!desc=京东wskey上传(自用脚本)更新时间2023-03-21
3 | #!system=ios
4 |
5 | [Script]
6 | 京东上传 = type=http-response,pattern=^https:\/\/api\.m\.jd\.com\/client\.action\?functionId=newUserInfo,requires-body=1,max-size=-1,timeout=1000,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/JDWSKey.js,script-update-interval=0
7 |
8 | [MITM]
9 | hostname = %APPEND% api.m.jd.com, api-dd.jd.com
--------------------------------------------------------------------------------
/Surge/JD_Helper.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=京东助手
2 | #!desc=京东App点击商品详情触发佣金返利和历史价格
3 | #!arguments=JD_UNION_ID:null,JD_POSITION_ID:null,JTT_APPID:null,JTT_APPKEY:null,ENGINE:auto,TIMEOUT:120,MMMCK_SCRIPT:慢慢买CK,DISABLE_NOTICE:true,THEME_TIME:7-19
4 | #!arguments-desc=[参数设置]\nJD_UNION_ID: 填写京东联盟ID\n ├ 获取方式:登录京东联盟官网https://union.jd.com/index\n └ 参考格式:12345678\nJD_POSITION_ID: 填写推广位ID\n ├ 获取方式:在京东联盟后台创建推广位\n └ 参考格式:1234567890\nJTT_APPID: 填写京推推AppID\n ├ 获取方式:登录京推推官网https://www.jingtuitui.com/user/login\n └ 参考格式:1234567890123456\nJTT_APPKEY: 填写京推推AppKey\n ├ 获取方式:登录京推推官网\n └ 参考格式:b123456ce90123456lk890126789012\nENGINE: 脚本执行引擎\n ├ auto:自动选择(默认值)\n ├ jsc:JavaScriptCore 引擎\n └ webview:WebView 引擎\nTIMEOUT: 脚本超时(单位:秒)\n ├ 120:脚本超时(默认值)\n └ 可自定义\nMMMCK_SCRIPT: 慢慢买 CK 脚本启停\n ├ 慢慢买CK:启用(默认值)\n └ 填入"#":获取后注释停用\nDISABLE_NOTICE: 是否启用转链及通知功能\n ├ true:启用转链与通知功能(默认)\n └ false:禁用转链与通知,仅显示比价图表\nTHEME_TIME: 自定义暗黑模式时间范围\n ├ 格式:起始小时-结束小时(默认 7~19为明亮模式)\n └ 示例:6-22 表示每天 22:00~6:00 为暗黑模式时间段
5 |
6 | [Script]
7 | 京东助手 = type=http-response,pattern=^https:\/\/in\.m\.jd\.com\/product\/.+?\.html,requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/jd_price1.js,argument=jd_union_id={{{JD_UNION_ID}}}&jd_position_id={{{JD_POSITION_ID}}}&jtt_appid={{{JTT_APPID}}}&jtt_appkey={{{JTT_APPKEY}}}&engine={{{ENGINE}}}&timeout={{{TIMEOUT}}}&disable_notice={{{DISABLE_NOTICE}}}&theme_time={{{THEME_TIME}}}
8 |
9 | {{{MMMCK_SCRIPT}}} = type=http-request,pattern=^https?:\/\/apapia-sqk-weblogic\.manmanbuy\.com/baoliao\/center\/menu,requires-body=1,max-size=0,binary-body-mode=0,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/jd_price1.js,timeout=30
10 |
11 | [MITM]
12 | hostname = %APPEND% in.m.jd.com, lite-in.m.jd.com, apapia-sqk-weblogic.manmanbuy.com
--------------------------------------------------------------------------------
/Surge/Notification.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=通知推送
2 | #!desc=将 Surge 通知内容利用 Bark 推送至其他设备
3 | #!arguments=BARK_TOKEN:填写Token,GROUP:Surge,ICON:https://raw.githubusercontent.com/xream/scripts/main/scriptable/surge/surge-dark.png,SOUND:shake,AUTO_COPY:1,IS_ARCHIVE:1,LEVEL:active,VOLUME:5,IGNORE_REGEX:屏蔽通知正则
4 | #!arguments-desc=[参数设置]\nBARK_TOKEN: 填入你的 Bark Key\n ├ 获取 Key:在 Bark App 中\n ├ 格式:https://api.day.app/DmHjjgNYLydgsxrH2KUD68/\n └ 取值:DmHjjgNYLydgsxrH2KUD68\nGROUP: 指定通知的分组,默认值为 "Surge"\nICON: 自定义通知图标 URL,默认值为暗色Surge图标链接\nSOUND: 通知音效,默认值为 "shake",可在 Bark 中自行选择相应参数\nAUTO_COPY: 长按或下拉推送自动复制通知内容到剪贴板\n ├ 1:启用(默认值)\n └ 0:关闭\nIS_ARCHIVE: 是否将通知存档\n ├ 1:启用(默认值)\n └ 0:关闭\nLEVEL: 通知时效性\n ├ active:系统会立即亮屏显示通知(默认值)\n ├ timeSensitive:时效性通知,可在专注状态下显示通知\n ├ passive:仅将通知添加到通知列表,不会亮屏提醒\n └ critical:重要通知会忽略静音设置和勿扰模式,无论设备是否静音,通知都会提示并播放声音 "&call=1 参数持续响铃"\nVOLUME: critical参数音量设置\n ├ 取值:5(默认值)\n └ 范围:1 < 10\nIGNORE_REGEX: 传入一个正则表达式,用于匹配需要屏蔽的通知内容,匹配到的通知将不会推送
5 |
6 | [Script]
7 | 通知推送 = script-path=https://raw.githubusercontent.com/githubdulong/Script/master/Notification.js,type=event,event-name=notification,argument="Bark_token={{{BARK_TOKEN}}}&group={{{GROUP}}}&automaticallyCopy={{{AUTO_COPY}}}&isArchive={{{IS_ARCHIVE}}}&icon={{{ICON}}}&sound={{{SOUND}}}&level={{{LEVEL}}}&volume={{{VOLUME}}}&ignoreRegex={{{IGNORE_REGEX}}}"
--------------------------------------------------------------------------------
/Surge/Oil.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=今日油价
2 | #!desc=Panel显示特定地区的今日油价及涨跌预告
3 | #!category=Third Party Module
4 | #!arguments=TITLE:今日油价,ICON:fuelpump.circle.fill,COLOR:#F36838,PROVNAME:湖南,UPDATE_INTERVAL:43200,APIKEY:填写Apikey
5 | #!arguments-desc=[参数设置]\n⓵ TITLE: 自定义模块标题,如不设置则默认显示"今日油价";\n⓶ ICON: 自定义模块图标,需为有效的SFSymbolName,如不设置则默认为"fuelpump.circle.fill";\n⓷ COLOR: 自定义图标颜色,需为颜色的HEX编码,如不设置则默认为"#F36838";\n⓸ PROVNAME: 自定义省份名称,如不设置则默认显示"湖南";\n⓹ UPDATE_INTERVAL: 自定义刷新间隔时间,单位为秒,如不设置则默认为每43200秒刷新一次;\n⓺ APIKEY: 填写Apikey,申请地址:https://www.tianapi.com/apiview/104 (该接口普通会员每天赠送100次调用额度);
6 |
7 | [Panel]
8 | {{{TITLE}}} = script-name={{{TITLE}}},update-interval={{{UPDATE_INTERVAL}}}
9 |
10 | [Script]
11 | {{{TITLE}}} = type=generic,timeout=30,engine=webview,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/Oil.js,argument=title={{{TITLE}}}&icon={{{ICON}}}&color={{{COLOR}}}&provname={{{PROVNAME}}}&apikey={{{APIKEY}}}
--------------------------------------------------------------------------------
/Surge/Panel.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=策略面板
2 | #!desc=流媒体解锁检测+代理信息展示
3 |
4 | [Panel]
5 | //策略面板 = script-name=解锁检测,update-interval=7200
6 | 策略面板 = script-name=WARP信息,update-interval=1800
7 | 策略面板 = script-name=备用机场,update-interval=1800
8 | 策略面板 = script-name=主力机场,update-interval=1800
9 |
10 | [Script]
11 | //解锁检测 = type=generic,timeout=30,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/Stream-All.js,script-update-interval=0,argument=title=解锁检测&icon=play.circle.fill&color=#FF2121
12 | WARP信息 = type=generic, timeout=15, script-path=https://raw.githubusercontent.com/VirgilClyne/Cloudflare/main/js/Cloudflare.1.1.1.1.panel.js,script-update-interval=0,argument=Title=WARP信息&Icon=icloud.circle.fill&IconColor=#EB5C20&Language=auto
13 | 备用机场 = type=generic,timeout=15,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/sub_info_panel.js,script-update-interval=0,argument=url=[URL encode 后的机场节点链接]&reset_day=1&title=中国制造&icon=shippingbox.circle.fill&color=#81AC7A
14 | 主力机场 = type=generic,timeout=15,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/sub_info_panel.js,script-update-interval=0,argument=url=[URL encode 后的机场节点链接]&reset_day=24&title=墙洞机场&icon=pawprint.circle.fill&color=#1C6073
--------------------------------------------------------------------------------
/Surge/Q-Search_All_in_one.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=快捷搜索
2 | #!desc=命令+空格+关键词=快速指定搜索引擎搜索
3 |
4 | # 使用说明:在Safari内输入"命令 + 空格 + 关键词"来快速指定搜索引擎
5 | # 注意:请先在设置中将Safari默认搜索引擎更改为DuckDuckGo
6 |
7 | [URL Rewrite]
8 | # > 搜索
9 | # gm Google图片
10 | ^https:\/\/duckduckgo.com\/\?q=gm\+([^&]+).+ https://www.google.com/search?&tbm=isch&q=$1 302
11 | # gh GitHub
12 | ^https:\/\/duckduckgo.com\/\?q=gh\+([^&]+).+ https://github.com/search?q=$1 302
13 | # sof Stack Overflow
14 | ^https:\/\/duckduckgo.com\/\?q=sof\+([^&]+).+ https://stackoverflow.com/search?q=$1 302
15 | # se StackExchange
16 | ^https:\/\/duckduckgo.com\/\?q=se\+([^&]+).+ https://stackexchange.com/search?q=$1 302
17 | # wa WolframAlpha
18 | ^https:\/\/duckduckgo.com\/\?q=wa\+([^&]+).+ https://www.wolframalpha.com/input/?i=$1 302
19 | # wiki 维基百科
20 | ^https:\/\/duckduckgo.com\/\?q=wiki(\+|%20)([^&]+).+ http://wikipedia.org/wiki/$2 302
21 | # wk 维基中文
22 | ^https:\/\/duckduckgo.com\/\?q=wk(\+|%20)([^&]+).+ https://zh.wikipedia.org/wiki/$2 302
23 | # mg Magi
24 | ^https:\/\/duckduckgo.com\/\?q=mg(\+|%20)([^&]+).+ https://magi.com/search?q=$2 302
25 | # tf Google搜索TestFlight
26 | ^https:\/\/duckduckgo.com\/\?q=tf(\+|%20)([^&]+).+ https://www.google.com/search?as_q=$2&as_sitesearch=testflight.apple.com 302
27 |
28 | # > 翻译
29 | # yd 有道翻译
30 | ^https:\/\/duckduckgo.com\/\?q=yd\+([^&]+).+ http://dict.youdao.com/search?q=$1 302
31 | # trc Google译至中文
32 | ^https:\/\/duckduckgo.com\/\?q=trc\+([^&]+).+ https://translate.google.com/#view=home&op=translate&sl=auto&tl=zh-CN&text=$1 302
33 | # tre Google译至英文
34 | ^https:\/\/duckduckgo.com\/\?q=tre\+([^&]+).+ https://translate.google.com/#view=home&op=translate&sl=auto&tl=en&text=$1 302
35 | # trj Google译至日文
36 | ^https:\/\/duckduckgo.com\/\?q=trj\+([^&]+).+ https://translate.google.com/#view=home&op=translate&sl=auto&tl=ja&text=$1 302
37 |
38 | # > 社区
39 | # db 豆瓣
40 | ^https:\/\/duckduckgo.com\/\?q=db\+([^&]+).+ https://m.douban.com/search/?query=$1 302
41 | # zh 知乎
42 | ^https:\/\/duckduckgo.com\/\?q=zh\+([^&]+).+ https://www.zhihu.com/search?type=content&q=$1 302
43 | # wb 微博
44 | ^https:\/\/duckduckgo.com\/\?q=wb\+([^&]+).+ https://s.weibo.com/weibo/$1 302
45 | # wx 微信
46 | ^https:\/\/duckduckgo.com\/\?q=wx\+([^&]+).+ https://weixin.sogou.com/weixinwap?query=$1 302
47 | # rd Reddit
48 | ^https:\/\/duckduckgo.com\/\?q=rd\+([^&]+).+ https://www.reddit.com/search?q=$1 302
49 | # tw Twitter
50 | ^https:\/\/duckduckgo.com\/\?q=tw\+([^&]+).+ https://twitter.com/search?q=$1 302
51 | # ssp 少数派
52 | ^https:\/\/duckduckgo.com\/\?q=ssp\+([^&]+).+ https://sspai.com/search/post/$1 302
53 | # csdn CSDN
54 | ^https:\/\/duckduckgo.com\/\?q=csdn\+([^&]+).+ https://so.csdn.net/so/search/s.do?q=$1&t=&u= 302
55 |
56 | # > 购物
57 | # zdm 什么值得买
58 | ^https:\/\/duckduckgo.com\/\?q=zdm\+([^&]+).+ https://search.m.smzdm.com/?v=b&s=$1 302
59 | # amz 亚马逊
60 | ^https:\/\/duckduckgo.com\/\?q=amz\+([^&]+).+ https://www.amazon.cn/gp/aw/s/?k=$1 302
61 | # jd 京东
62 | ^https:\/\/duckduckgo.com\/\?q=jd\+([^&]+).+ https://so.m.jd.com/ware/search.action?keyword=$1 302
63 | # tb 淘宝
64 | ^https:\/\/duckduckgo.com\/\?q=tb\+([^&]+).+ https://s.m.taobao.com/h5?q=$1 302
65 | # tm 天猫
66 | ^https:\/\/duckduckgo.com\/\?q=tm\+([^&]+).+ https://s.m.tmall.com/m/search.htm?q=$1 302
67 |
68 | # > 视频资源
69 | # ac Acfun
70 | ^https:\/\/duckduckgo.com\/\?q=ac\+([^&]+).+ https://www.acfun.cn/search?keyword==$1 302
71 | # bli 哔哩哔哩
72 | ^https:\/\/duckduckgo.com\/\?q=bli\+([^&]+).+ https://m.bilibili.com/search?keyword=$1 302
73 | # ytb YouTube
74 | ^https:\/\/duckduckgo.com\/\?q=ytb\+([^&]+).+ https://www.youtube.com/results?search_query=$1 302
75 | # ph PornHub
76 | ^https:\/\/duckduckgo.com\/\?q=ph\+([^&]+).+ https://cn.pornhub.com/video/search?search=$1 302
77 | # gd Google Drive
78 | ^https:\/\/duckduckgo.com\/\?q=gd\+([^&]+).+ https://www.google.com/search?q=%22Google+Drive%22+$1 302
79 | # tgd t.me/gdurl 搜索Google Drive资源
80 | ^https:\/\/duckduckgo.com\/\?q=tgd\+([^&]+).+ https://t.me/gdsharing?q=$1 302
81 | # tga t.me/gdurl 搜索阿里云盘资源
82 | ^https:\/\/duckduckgo.com\/\?q=tga\+([^&]+).+ https://t.me/YunPanPan?q=$1 302
83 |
84 | # > 搜索引擎
85 | # ec Ecosia
86 | ^https:\/\/duckduckgo.com\/\?q=ec\+([^&]+).+ https://www.ecosia.org/search?q=$1 302
87 | # bi 必应
88 | ^https:\/\/duckduckgo.com\/\?q=bi\+([^&]+).+ https://cn.bing.com/search?q=$1 302
89 | # bd 百度
90 | ^https:\/\/duckduckgo.com\/\?q=bd\+([^&]+).+ https://www.baidu.com/s?wd=$1 302
91 | # ddg DuckDuckGo
92 | ^https:\/\/duckduckgo.com\/\?q=ddg\+([^&]+).+ https://duckduckgo.com/?ia=about&q=$1 302
93 |
94 | # > App Store 区域切换
95 | # cn 国区
96 | ^https:\/\/duckduckgo.com\/\?q=cn&.+ https://itunes.apple.com/WebObjects/MZStore.woa/wa/resetAndRedirect?dsf=143465&mt=8&url=/WebObjects/MZStore.woa/wa/viewSoftware?mt=8&id=1108187390&cc=cn&urlDesc=$1 302
97 | # us 美区
98 | ^https:\/\/duckduckgo.com\/\?q=us&.+ https://itunes.apple.com/WebObjects/MZStore.woa/wa/resetAndRedirect?dsf=143441&mt=8&url=/WebObjects/MZStore.woa/wa/viewSoftware?mt=8&id=1108187390&cc=us&urlDesc=$1 302
99 | # hk 港区
100 | ^https:\/\/duckduckgo.com\/\?q=hk&.+ https://itunes.apple.com/WebObjects/MZStore.woa/wa/resetAndRedirect?dsf=143463&mt=8&url=/WebObjects/MZStore.woa/wa/viewSoftware?mt=8&id=1108187390&cc=hk&urlDesc=$1 302
101 | # tw 台湾
102 | ^https:\/\/duckduckgo.com\/\?q=tw&.+ https://itunes.apple.com/WebObjects/MZStore.woa/wa/resetAndRedirect?dsf=143470&mt=8&url=/WebObjects/MZStore.woa/wa/viewSoftware?mt=8&id=1108187390&cc=tw&urlDesc=$1 302
103 | # jp 日本
104 | ^https:\/\/duckduckgo.com\/\?q=jp&.+ https://itunes.apple.com/WebObjects/MZStore.woa/wa/resetAndRedirect?dsf=143462&mt=8&url=/WebObjects/MZStore.woa/wa/viewSoftware?mt=8&id=1108187390&cc=jp&urlDesc=$1 302
105 | # kr 韩国
106 | ^https:\/\/duckduckgo.com\/\?q=kr&.+ https://itunes.apple.com/WebObjects/MZStore.woa/wa/resetAndRedirect?dsf=143466&mt=8&url=/WebObjects/MZStore.woa/wa/viewSoftware?mt=8&id=1108187390&cc=kr&urlDesc=$1 302
107 | # tr 土耳其
108 | ^https:\/\/duckduckgo.com\/\?q=tr&.+ https://itunes.apple.com/WebObjects/MZStore.woa/wa/resetAndRedirect?dsf=143480&mt=8&url=/WebObjects/MZStore.woa/wa/viewSoftware?mt=8&id=1108187390&cc=tr&urlDesc=$1 302
109 |
110 | # > 默认无指令搜索:Google
111 | ^https:\/\/duckduckgo.com\/\?q=([^&]+).+ https://www.google.com/search?q=$1 302
112 |
113 | [MITM]
114 | hostname = %APPEND% duckduckgo.com
--------------------------------------------------------------------------------
/Surge/Reddit.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=应用调试
2 | #!desc=Reddit过滤应用内推广,阻止NSFW提示,解锁会员功能
3 | #!category=Ad Blocking Module
4 |
5 | [Script]
6 | RedditPro = type=http-response, pattern=^https?:\/\/gql(-fed)?\.reddit\.com,requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/Reddit.js
7 |
8 | [MITM]
9 | hostname = %APPEND% gql.reddit.com, gql-fed.reddit.com
--------------------------------------------------------------------------------
/Surge/Revenuecat.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=通用解锁
2 | #!desc=Revenuecat Unlock Surge@langkhach270389
3 |
4 | [Header Rewrite]
5 | ^https:\/\/(api\.revenuecat|isi\.csan\.goodnotes)\.com\/.+ header-del if-modified-since
6 | ^https:\/\/(api\.revenuecat|isi\.csan\.goodnotes)\.com\/.+ header-del if-none-match
7 | ^https:\/\/(api\.revenuecat|isi\.csan\.goodnotes)\.com\/.+ header-del X-RevenueCat-ETag
8 | ^https:\/\/(api\.revenuecat|isi\.csan\.goodnotes)\.com\/.+ header-del x-revenuecat-etag
9 |
10 | [URL Rewrite]
11 | ^https:\/\/(api\.revenuecat|isi\.csan\.goodnotes)\.com\/.+\/(receipts$|subscribers\/[^/]+$|offers$) https://api.langkhach89.workers.dev header
12 |
13 | [MITM]
14 | hostname = %APPEND% api.revenuecat.com, isi.csan.goodnotes.com
--------------------------------------------------------------------------------
/Surge/Streaming_Media_Unlock.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=解锁检测
2 | #!desc=Netflix, Disney+, YouTube, ChatGPT Unlock
3 | #!category=Third Party Module
4 | #!arguments=UPDATE_INTERVAL:7200,TITLE:解锁检测,ICON:eye.slash.circle.fill,COLOR:#82AE46
5 | #!arguments-desc=[参数设置]\n1. UPDATE_INTERVAL: 自定义面板的刷新间隔时间,单位为秒,默认每7200秒刷新一次;\n2. TITLE: 自定义面板标题,默认为"解锁检测";\n3. ICON: 自定义面板图标,默认为"eye.slash.circle.fill";\n4. COLOR: 自定义图标颜色,默认为"#82AE46";\n\n[模块描述]\n▎本模块用于检测Netflix,Disney+,YouTubePremium,ChatGPT的解锁状态查询;\n▎四种状态显示"☑"表示支持解锁状态,"️️️⚠"表示Netflix仅支持解锁自制剧,"☒"表示不支持解锁状态,"ɴ/ᴀ"表示检测超时或异常;\n▎地区代码缩写表示已解锁地区;
6 |
7 | [Panel]
8 | Panel = script-name=解锁检测,update-interval={{{UPDATE_INTERVAL}}}
9 |
10 | [Script]
11 | 解锁检测 = type=generic,timeout=120,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/Stream-All.js,script-update-interval=0,argument=title={{{TITLE}}}&icon={{{ICON}}}&color={{{COLOR}}}
--------------------------------------------------------------------------------
/Surge/Sub_info.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=订阅信息
2 | #!desc=机场订阅信息展示,多订阅修改AIRPORT_NAME
3 | #!category=Third Party Module
4 | #!arguments=AIRPORT_NAME_1:我的机场1,URL_1:编码后的机场订阅_1,RESET_DAY_1:1,TITLE_1:机场信息1,ICON_1:shippingbox.circle.fill,COLOR_1:#81AC7A,UPDATE_INTERVAL_1:1800,AIRPORT_NAME_2:#我的机场2,URL_2:编码后的机场订阅_2,RESET_DAY_2:1,TITLE_2:机场信息2,ICON_2:shippingbox.circle.fill,COLOR_2:#81AC7A,UPDATE_INTERVAL_2:1800,AIRPORT_NAME_3:#我的机场3,URL_3:编码后的机场订阅_3,RESET_DAY_3:1,TITLE_3:机场信息3,ICON_3:shippingbox.circle.fill,COLOR_3:#81AC7A,UPDATE_INTERVAL_3:1800,AIRPORT_NAME_4:#我的机场4,URL_4:编码后的机场订阅_4,RESET_DAY_4:1,TITLE_4:机场信息4,ICON_4:shippingbox.circle.fill,COLOR_4:#81AC7A,UPDATE_INTERVAL_4:1800,AIRPORT_NAME_5:#我的机场5,URL_5:编码后的机场订阅_5,RESET_DAY_5:1,TITLE_5:机场信息5,ICON_5:shippingbox.circle.fill,COLOR_5:#81AC7A,UPDATE_INTERVAL_5:1800
5 | #!arguments-desc=[参数设置]\n⓵ AIRPORT_NAME: 默认开启单订阅,如需开启多订阅需修改此参数为不同的机场名称;\n⓶ URL: 机场订阅链接,需要URL编码;\n⓷ RESET_DAY: 流量每月重置的日期,如30号就写30,不设置则默认1号为流量重置日,设置为0则不显示流量重置日,仅显示到期日期;\n⓸ TITLE: 自定义面板标题,如不设置则默认显示"机场信息";\n⓹ ICON: 自定义面板图标,需为有效的SFSymbolName,如不设置则默认为"shippingbox.circle.fill";\n⓺ COLOR: 自定义图标颜色,需为颜色的HEX编码,如不设置则默认为"#81AC7A";\n⓻ UPDATE_INTERVAL: 自定义面板刷新间隔时间,单位为秒,如不设置则默认每1800秒刷新一次;
6 |
7 | [Panel]
8 | {{{AIRPORT_NAME_1}}} = script-name={{{AIRPORT_NAME_1}}},update-interval={{{UPDATE_INTERVAL_1}}}
9 | {{{AIRPORT_NAME_2}}} = script-name={{{AIRPORT_NAME_2}}},update-interval={{{UPDATE_INTERVAL_2}}}
10 | {{{AIRPORT_NAME_3}}} = script-name={{{AIRPORT_NAME_3}}},update-interval={{{UPDATE_INTERVAL_3}}}
11 | {{{AIRPORT_NAME_4}}} = script-name={{{AIRPORT_NAME_4}}},update-interval={{{UPDATE_INTERVAL_4}}}
12 | {{{AIRPORT_NAME_5}}} = script-name={{{AIRPORT_NAME_5}}},update-interval={{{UPDATE_INTERVAL_5}}}
13 |
14 | [Script]
15 | {{{AIRPORT_NAME_1}}} = type=generic,timeout=30,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/sub_info_panel.js,script-update-interval=0,argument=url={{{URL_1}}}&reset_day={{{RESET_DAY_1}}}&title={{{TITLE_1}}}&icon={{{ICON_1}}}&color={{{COLOR_1}}}
16 | {{{AIRPORT_NAME_2}}} = type=generic,timeout=30,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/sub_info_panel.js,script-update-interval=0,argument=url={{{URL_2}}}&reset_day={{{RESET_DAY_2}}}&title={{{TITLE_2}}}&icon={{{ICON_2}}}&color={{{COLOR_2}}}
17 | {{{AIRPORT_NAME_3}}} = type=generic,timeout=30,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/sub_info_panel.js,script-update-interval=0,argument=url={{{URL_3}}}&reset_day={{{RESET_DAY_3}}}&title={{{TITLE_3}}}&icon={{{ICON_3}}}&color={{{COLOR_3}}}
18 | {{{AIRPORT_NAME_4}}} = type=generic,timeout=30,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/sub_info_panel.js,script-update-interval=0,argument=url={{{URL_4}}}&reset_day={{{RESET_DAY_4}}}&title={{{TITLE_4}}}&icon={{{ICON_4}}}&color={{{COLOR_4}}}
19 | {{{AIRPORT_NAME_5}}} = type=generic,timeout=30,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/sub_info_panel.js,script-update-interval=0,argument=url={{{URL_5}}}&reset_day={{{RESET_DAY_5}}}&title={{{TITLE_5}}}&icon={{{ICON_5}}}&color={{{COLOR_5}}}
--------------------------------------------------------------------------------
/Surge/Surge.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=内置模块
2 | #!desc=最后更新时间 2022-03-20 16:40
3 | #!system=ios
4 |
5 | # > 阻止所有UDP流量到端口443,使HTTP3请求退回到TCP流量
6 | [Rule]
7 | AND,((PROTOCOL,UDP), (DEST-PORT,443)),REJECT-NO-DROP
8 |
9 | # > 通过访问浏览器 http://mutu.com 来访问路由器配置网页,URL将始终重定向到当前网络中的网关地址
10 | [General]
11 | force-http-engine-hosts=%APPEND% mutu.com, www.mutu.com
12 |
13 | [URL Rewrite]
14 | ^https?://(|www\.)mutu\.com http://{{{GATEWAY_ADDRESS}}} 302
15 |
16 | [MITM]
17 | hostname = %APPEND% mutu.com, www.mutu.com
--------------------------------------------------------------------------------
/Surge/Surge_Qx.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=格式转化
2 | #!desc=QX链接加上"_surge"后直接引用为Surge格式的模块链接
3 | #!system=ios
4 | # @XiaoBL
5 |
6 | [Script]
7 | 格式转换 = type=http-request,pattern=_surge$,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/Surge_Qx.js
8 |
9 | [MITM]
10 | hostname = %APPEND% github.com:443, raw.githubusercontent.com:443
--------------------------------------------------------------------------------
/Surge/TestFlight.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=内测管理
2 | #!desc=https://github.com/VirgilClyne TestFlight
3 | #!author=VirgilClyne
4 | #!category=Third Party Module
5 | #!arguments=APPIDS:iRingo.TestFlight,CUSTOM_NAME:会话切换,ENGINE:auto
6 | #!arguments-desc=[参数设置]\n▪︎ APPIDS: 指定需要切换的应用ID,多个应用ID用英文逗号分隔,默认变量"iRingo.TestFlight"会话切换;\n▪︎ CUSTOM_NAME: 会话切换脚本启停状态,使用"#"作为注释停止项;\n▪︎ ENGINE: 脚本执行引擎,默认为"auto"自动选择,可选参数"auto ↪︎ jsc ↪︎ webview";\n[使用说明]\n▫︎ iOS端点击TestFlight App右上角"图标"触发会话切换,tvOS端点击TestFlight App中上方"设置"触发会话切换;\n▫︎ ⚠️因Apple调整机制,会话切换成功后需删除后台再次进入TestFlight App完成操作,并且建议间隔五分钟再继续下一次切换操作"连续操作会导致无限重新载入";\n▫︎ 更多使用方法参考 https://github.com/NSRingo/TestFlight
7 |
8 | [General]
9 | skip-proxy = %APPEND% iosapps.itunes.apple.com
10 |
11 | [Script]
12 | {{{CUSTOM_NAME}}} = type=http-request,pattern=https:\/\/testflight\.apple\.com\/v1\/devices$,script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/box/switcher/box.switcher.js,requires-body=1,argument={{{APPIDS}}},script-update-interval=0,timeout=30,engine={{{ENGINE}}}
13 | 内测请求 = type=http-request,pattern=^https?:\/\/testflight\.apple\.com\/,requires-body=1, script-path=https://github.com/NSRingo/TestFlight/releases/latest/download/request.js,timeout=60,engine={{{ENGINE}}}
14 | 内测回应 = type=http-response,pattern=^https?:\/\/testflight\.apple\.com\/,requires-body=1,script-path=https://github.com/NSRingo/TestFlight/releases/latest/download/response.js,,timeout=60,engine={{{ENGINE}}}
15 |
16 | [MITM]
17 | hostname = %APPEND% testflight.apple.com
--------------------------------------------------------------------------------
/Surge/TestFlight_2.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=区域限制
2 | #!desc=TestFlight 解除中国区无法安装外区App限制
3 |
4 | [General]
5 | skip-proxy = %APPEND% iosapps.itunes.apple.com
6 |
7 | [Body Rewrite]
8 | # > TestFlight 限制
9 | http-request ^https?:\/\/testflight\.apple\.com\/v\d\/accounts\/.+?\/install$ "storefrontId"\x20:\x20"\d{6}-\d{2},\d{2}" "storefrontId":"143441-19,29"
10 |
11 | [MITM]
12 | hostname = %APPEND% testflight.apple.com
13 |
--------------------------------------------------------------------------------
/Surge/TikTok.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=抖音国际
2 | #!desc=TikTok 解锁区域限制+下载去水印;App需抓包旧版本或在线安装 https://itiktok.best
3 |
4 | # 区域解锁 JP=日本 US=美国 SG=新加坡
5 | [URL Rewrite]
6 | (?<=_region=)CN(?=&) JP 307
7 | (^https?:\/\/.*\.tiktokv\.com.*\/v5\/)(.+) $1 302
8 | (?<=&mcc_mnc=)4 2 307
9 | (?<=eme\/v)2(?=\/f\w{2}d\/\?.*) 1 302
10 |
11 | [Script]
12 | 下载水印 = script-path=https://raw.githubusercontent.com/Tartarus2014/Script/master/Tiktok.js,requires-body=1,timeout=10,type=http-response,pattern=https?:\/\/.*\.tiktokv\.com\/aweme\/v\d\/(feed|mix\/aweme|aweme\/post|(multi\/)?aweme\/detail|follow\/feed|nearby\/feed|search\/item|general\/search\/single|hot\/search\/video\/list|aweme\/favorite),max-size=0,script-update-interval=0
13 |
14 | [MITM]
15 | hostname = %APPEND% *.tiktokv.com,*.byteoversea.com,*.tik-tokapi.com
--------------------------------------------------------------------------------
/Surge/TikTok_Surge.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=抖音国际
2 | #!desc=TikTok解锁区域限制,下载去水印,自定义参数
3 | #!category=Third Party Module
4 | #!arguments=RULE_SET_ENABLED:RULE-SET,PROXY_NAME:PROXY,REGION_CODE:JP,WATERMARK_REMOVAL:下载水印
5 | #!arguments-desc=[参数设置]\nRULE_SET_ENABLED: 是否启用TikTok 分流规则集(添加注释符号'#'为禁用,默认启用);\nPROXY_NAME: 自定义分流规则对应的策略名称,默认PROXY;\nREGION_CODE: TikTok重定向区域解锁国家简称,JP=日本,US=美国,SG=新加坡,KR=韩国,默认日本;\nWATERMARK_REMOVAL: 是否启用TikTok下载去水印脚本(添加注释符号'#'为禁用,默认启用);
6 |
7 | [Rule]
8 | # > TikTok 分流
9 | {{{RULE_SET_ENABLED}}},https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/TikTok/TikTok.list,{{{PROXY_NAME}}}
10 |
11 | [URL Rewrite]
12 | # > 区域解锁
13 | (?<=_region=)CN(?=&) {{{REGION_CODE}}} 307
14 | (^https?:\/\/.*\.tiktokv\.com.*\/v5\/)(.+) $1 302
15 | (?<=&mcc_mnc=)4 2 307
16 | (?<=eme\/v)2(?=\/f\w{2}d\/\?.*) 1 302
17 |
18 | [Script]
19 | # > TikTok 去水印
20 | {{{WATERMARK_REMOVAL}}} = type=http-response,pattern=https?:\/\/.*\.tiktokv\.com\/aweme\/v\d\/(feed|mix\/aweme|aweme\/post|(multi\/)?aweme\/detail|follow\/feed|nearby\/feed|search\/item|general\/search\/single|hot\/search\/video\/list|aweme\/favorite),max-size=0,script-update-interval=0,script-path=https://raw.githubusercontent.com/Tartarus2014/Script/master/Tiktok.js,requires-body=true,timeout=30,max-size=0
21 |
22 | [MITM]
23 | hostname = %APPEND% *.tiktokv.com,*.byteoversea.com,*.tik-tokapi.com
--------------------------------------------------------------------------------
/Surge/TunOnly.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=兼容监控
2 | #!desc=搭配Shortcots自动化兼容HomeKit摄像头链接问题
3 | #!system=ios
4 |
5 | [General]
6 | compatibility-mode = 5
7 |
--------------------------------------------------------------------------------
/Surge/WARP_Panel.shmodule:
--------------------------------------------------------------------------------
1 | #!name=信息展示
2 | #!desc=WARP_Panel https://github.com/VirgilClyne
3 | #!category=Third Party Module
4 | #!arguments=SCRIPT_NAME:WARP信息,UPDATE_INTERVAL:1800,TITLE:WARP信息,ICON:icloud.circle.fill,ICON_COLOR:#EB5C20,LANGUAGE:auto
5 | #!arguments-desc=[参数设置]\n1. SCRIPT_NAME: 自定义脚本名称,默认为WARP信息;\n2. UPDATE_INTERVAL: 自定义刷新间隔,单位为秒,默认1800秒;\n3. TITLE: 自定义面板标题,默认为WARP信息;\n4. ICON: 自定义Panel显示图标,默认为icloud.circle.fill;\n5. ICON_COLOR: 自定义图标颜色,请使用十六进制颜色代码,默认为#EB5C20;\n6. LANGUAGE: 自定义语言设置,默认为auto;
6 |
7 | [Panel]
8 | Panel = script-name={{{SCRIPT_NAME}}},update-interval={{{UPDATE_INTERVAL}}}
9 |
10 | [Script]
11 | {{{SCRIPT_NAME}}} = type=generic, timeout=30, engine=webview, script-path=https://raw.githubusercontent.com/VirgilClyne/Cloudflare/main/js/1.1.1.1.panel.js,script-update-interval=0,argument=Title={{{TITLE}}}&Icon={{{ICON}}}&IconColor={{{ICON_COLOR}}}&Language={{{LANGUAGE}}}
--------------------------------------------------------------------------------
/Surge/Warp++.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=Warp++
2 | #!desc=WARP++ 刷邀请推荐奖励
3 | #!system=ios
4 |
5 | [Host]
6 | api.cloudflareclient.com = server: 1.1.1.1
7 |
8 | [MITM]
9 | hostname=%APPEND% api.cloudflareclient.com
10 |
11 | [Script]
12 | Warp++referrer = type=http-request,pattern=^https:\/\/api\.cloudflareclient\.com\/.+\/reg\/[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$,max-size=0,debug=1,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/warp%2B%2Breferrer.js
13 |
14 | Warp++= type=cron,cronexp= */30 * * * * *,wake-system=1,timeout=15,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/warp%2B%2B.js
--------------------------------------------------------------------------------
/Surge/XiMaLaYa.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=喜马拉雅
2 | #!desc=XiMaLaYa_喜马拉雅页面优化去广告Surge版
3 | #!system=ios
4 | # @ddgksf2013 参考去广告
5 |
6 | [General]
7 | # DNS劫持
8 | hijack-dns = %APPEND% 114.114.114.114
9 |
10 | [Rule]
11 | # 阻止IP跳动
12 | DOMAIN,gslbali.ximalaya.com,REJECT,pre-matching
13 | DOMAIN,gslbtx.ximalaya.com,REJECT,pre-matching
14 | # 修复轮播Ad失效
15 | URL-REGEX,^https?:\/\/.*\.xima.*\.com\/discovery-feed\/focus\/queryF,REJECT,pre-matching
16 | # 屏蔽播放页Live
17 | URL-REGEX,^https?:\/\/.*\.xima.*\.com\/mobile-playpage\/view\/,REJECT,pre-matching
18 | # MyInfo红点提醒
19 | URL-REGEX,^https?:\/\/.*\.xima.*\.com\/chaos-notice-web\/v1\/message\/preview\/list,REJECT,pre-matching
20 | # 屏蔽大红包Tips
21 | URL-REGEX,^https?:\/\/.*\.xima.*\.com\/social-web\/bottomTabs\/dynamicEntrance\/status,REJECT,pre-matching
22 | # 屏蔽gif弹窗_Ad
23 | URL-REGEX,^https?:\/\/.*\.xmcdn\.com\/\w{8}\/\w{4}-\w{16}\/.+gif$,REJECT,pre-matching
24 | # 屏蔽Aged请求
25 | URL-REGEX,^https?:\/\/.*\.xima.*\.com\/(dog-portal\/checkOld|(child-mobile\/child|aged-mobile\/aged)\/mode\/query),REJECT,pre-matching
26 | # 部分Tab弹窗
27 | URL-REGEX,^https?:\/\/.*\.xima.*\.com\/discovery-feed\/isShowUserGiftPendant,REJECT,pre-matching
28 | # 屏蔽红点提示
29 | URL-REGEX,^https?:\/\/.*\.xima.*\.com\/mobile-user\/unread,REJECT,pre-matching
30 | # 屏蔽minor请求
31 | URL-REGEX,^https?:\/\/.*\.xima.*\.com/mobile-user/minorProtection/pop,REJECT,pre-matching
32 | # 屏蔽隐私搜集
33 | URL-REGEX,^https?:\/\/.*\.xima.*\.com\/collector/xl\/v\d,REJECT,pre-matching
34 | # 屏蔽版本更新
35 | URL-REGEX,^https?:\/\/.*\.xima.*\.com\/butler-portal\/versionCheck,REJECT,pre-matching
36 | # 屏蔽开屏广告
37 | URL-REGEX,^https?:\/\/(adse\.wsa|adse|adbehavior|xdcs-collector)\.xima.*\.com\/.*,REJECT,pre-matching
38 | # 屏蔽位置请求
39 | URL-REGEX,^https?:\/\/.*\.xima.*\.com\/mobile\/discovery\/v\d\/location,REJECT,pre-matching
40 | # 屏蔽热搜词
41 | URL-REGEX,^https?:\/\/.*\.xima.*\.com\/hotWord,REJECT,pre-matching
42 | # 屏蔽搜索框定时_Ad
43 | URL-REGEX,^https?:\/\/.*\.xima.*\.com\/guideWord,REJECT,pre-matching
44 | # 屏蔽实时_Ad请求
45 | URL-REGEX,^https?:\/\/.*\.xima.*\.com\/api\/v\d\/adRealTime,REJECT,pre-matching
46 | # 屏蔽ting_Ad
47 | URL-REGEX,^https?:\/\/.*\.xima.*\.com\/ting\/(loading|feed|home)?,REJECT,pre-matching
48 |
49 | [Script]
50 | # 首页滚动_Ad、Tab页滚动_Ad、我的页面_Ad
51 | 喜马拉雅 = type=http-response,pattern=^https?:\/\/mobile\.ximalaya\.com\/focus-mobile|(discovery-category|mobile-user)\/v\d\/(mix|category|homePage),requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/xmly_json.js,script-update-interval=0
52 |
53 | [MITM]
54 | hostname = %APPEND% *.xima*.*, *.xmcdn.*
--------------------------------------------------------------------------------
/Surge/YouTube.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=油管广告
2 | #!desc=YouTube去广告,优化Shorts播放
3 | #!system=ios
4 |
5 | [Rule]
6 | URL-REGEX,^https?:\/\/.+?\.googlevideo\.com\/.+&oda,REJECT-TINYGIF
7 |
8 | [Script]
9 | 油管广告 = type=http-request,pattern="^https?:\/\/.+?\.googlevideo\.com\/.+ctier(?!(,|=SH))",requires-body=0,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/youtube_ad.js
10 | 油管广告 = type=http-response,pattern=^https:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/(browse|next)\?,requires-body=1,binary-body-mode=1,max-size=2097152,script-path=https://raw.githubusercontent.com/app2smile/rules/master/js/youtube.js
11 |
12 | [MITM]
13 | hostname = %APPEND% r*.googlevideo.com, youtubei.googleapis.com
--------------------------------------------------------------------------------
/Surge/jd_buy_helper.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=购物助手
2 | #!desc=京东购物助手,注入跳转、佣金返利、历史价格
3 | #!category=Third Party Module
4 | #!arguments=JD_UNION_ID:null,JD_POSITION_ID:null,JTT_APPID:null,JTT_APPKEY:null,BUY_HELPER_ZDM:true,BUY_HELPER_MMM:true,BUY_HELPER_GWD:true,BUY_HELPER_COPY:true,BUY_HELPER_LR:left,ENGINE:auto,TIMEOUT:120,MMMCK_SCRIPT:慢慢买CK
5 | #!arguments-desc=[参数设置]\nJD_UNION_ID: 填写京东联盟ID\n ├ 获取方式:登录京东联盟官网https://union.jd.com/index\n └ 参考格式:12345678\nJD_POSITION_ID: 填写推广位ID\n ├ 获取方式:在京东联盟后台创建推广位\n └ 参考格式:1234567890\nJTT_APPID: 填写京推推AppID\n ├ 获取方式:登录京推推官网https://www.jingtuitui.com/user/login\n └ 参考格式:1234567890123456\nJTT_APPKEY: 填写京推推AppKey\n ├ 获取方式:登录京推推官网\n └ 参考格式:b123456ce90123456lk890126789012\nBUY_HELPER_ZDM: 值得买按钮\n ├ true:启用(默认值)\n └ false:关闭\nBUY_HELPER_MMM: 慢慢买按钮\n ├ true:启用(默认值)\n └ false:关闭\nBUY_HELPER_GWD: 购物党按钮\n ├ true:启用(默认值)\n └ false:关闭\nBUY_HELPER_COPY: 复制短链按钮\n ├ true:启用(默认值)\n └ false:关闭\nBUY_HELPER_LR: 按钮位置\n ├ left:左边(默认值)\n └ right:右边\nENGINE: 脚本执行引擎\n ├ auto:自动选择(默认值)\n ├ jsc:JavaScriptCore 引擎\n └ webview:WebView 引擎\nTIMEOUT: 脚本超时(单位:秒)\n ├ 120:默认超时(默认值)\n └ 可自定义\nMMMCK_SCRIPT: 慢慢买 CK 脚本启停\n ├ 慢慢买CK:启用(默认值)\n └ 填入"#":注释停用
6 |
7 | [Script]
8 | 购物助手 = type=http-response,pattern=^https:\/\/in\.m\.jd\.com\/product\/.+?\.html,requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/jd_buy_helper.js,argument=jd_union_id={{{JD_UNION_ID}}}&jd_position_id={{{JD_POSITION_ID}}}&jtt_appid={{{JTT_APPID}}}&jtt_appkey={{{JTT_APPKEY}}}&buy_helper_zdm={{{BUY_HELPER_ZDM}}}&buy_helper_mmm={{{BUY_HELPER_MMM}}}&buy_helper_gwd={{{BUY_HELPER_GWD}}}&buy_helper_copy={{{BUY_HELPER_COPY}}}&buy_helper_LR={{{BUY_HELPER_LR}}}&engine={{{ENGINE}}}&timeout={{{TIMEOUT}}}
9 |
10 | {{{MMMCK_SCRIPT}}} = type=http-request,pattern=^https?:\/\/apapia-sqk-weblogic\.manmanbuy\.com/baoliao\/center\/menu,requires-body=1,max-size=0,binary-body-mode=0,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/MmmCK.js
11 |
12 | [MITM]
13 | hostname = %APPEND% in.m.jd.com, lite-in.m.jd.com, apapia-sqk-weblogic.manmanbuy.com
--------------------------------------------------------------------------------
/Surge/jd_price.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=京东比价
2 | #!desc=京东App历史价格(商品详情页面触发)折线图
3 | #!arguments=MMMCK_SCRIPT:慢慢买CK
4 | #!arguments-desc=[参数设置]\n1. MMMCK_SCRIPT:慢慢买CK 脚本前往慢慢买App获取Cookie\n2.避免不必要的重写,禁用请设置为"#"
5 |
6 | [Script]
7 | {{{MMMCK_SCRIPT}}} = type=http-request,pattern=^https?:\/\/apapia-sqk-weblogic\.manmanbuy\.com/baoliao\/center\/menu,requires-body=1,max-size=0,binary-body-mode=0,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/MmmCK.js
8 |
9 | 京东比价 = type=http-response,pattern=^https:\/\/in\.m\.jd\.com\/product\/graphext\/\d+\.html,requires-body=1,max-size=0,binary-body-mode=0,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/jd_price.js,timeout=30
10 |
11 | [MITM]
12 | hostname = %APPEND% in.m.jd.com, apapia-sqk-weblogic.manmanbuy.com
--------------------------------------------------------------------------------
/Surge/jd_price2.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=京东比价
2 | #!desc=京东App历史价格(商品详情页面触发)表格
3 | #!arguments=MMMCK_SCRIPT:慢慢买CK
4 | #!arguments-desc=[参数设置]\n1. MMMCK_SCRIPT:慢慢买CK 脚本前往慢慢买App获取Cookie\n2.避免不必要的重写,禁用请设置为"#"
5 |
6 | [Script]
7 | {{{MMMCK_SCRIPT}}} = type=http-request, pattern=^https?:\/\/apapia-sqk-weblogic\.manmanbuy\.com\/baoliao\/center\/menu$, script-path=https://raw.githubusercontent.com/wf021325/qx/master/js/jd_price.js, requires-body=true, max-size=-1, timeout=60
8 |
9 | 京东比价 = type=http-response, pattern=^https?:\/\/in\.m\.jd\.com\/product\/graphext\/\d+\.html, script-path=https://raw.githubusercontent.com/wf021325/qx/master/js/jd_price.js, requires-body=true, max-size=-1, timeout=60
10 |
11 |
12 | [MITM]
13 | hostname = %APPEND% in.m.jd.com, apapia-sqk-weblogic.manmanbuy.com
--------------------------------------------------------------------------------
/Surge/jdapp_to_union.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=京东联盟
2 | #!desc=商品详情触发转链 更新时间 2021-11-25
3 | #!system=ios
4 |
5 | [Script]
6 | 京东转链 = type=http-request,pattern=https:\/\/.+\.jd\.com\/graphext\/draw\?sku=(\d+).*,requires-body=0,max-size=0,timeout=1000,script-path=https://raw.githubusercontent.com/id77/QuantumultX/master/Script/jdapp_to_union.js
7 | 京喜转链 = type=http-request,pattern=https:\/\/.+\.jd\.com\/product\/.*\/(\d+)\.html,requires-body=0,max-size=0,timeout=1000,script-path=https://raw.githubusercontent.com/id77/QuantumultX/master/Script/jdapp_to_union.js
8 | 极速转链 = type=http-request,pattern=https:\/\/wqsitem\.jd\.com/\detail/\d+.+normal\.html,requires-body=0,max-size=0,timeout=1000,script-path=https://raw.githubusercontent.com/id77/QuantumultX/master/Script/jdapp_to_union.js
9 |
10 | [MITM]
11 | hostname = %APPEND% *.jd.com, *.*.jd.com
12 |
--------------------------------------------------------------------------------
/Surge_Qx.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | 更新版本:3.0208
4 | 更新内容:修复断网弹窗提示 bug
5 |
6 | @XiaoBL
7 | Qx通用格式转化Surge模块
8 |
9 | 使用方法:
10 | 添加模块或本地脚本后将 Qx 脚本链接末端添加“_surge”即可转化 Surge 格式
11 |
12 | 模块链接:
13 | https://raw.githubusercontent.com/githubdulong/Script/master/Surge/Surge_Qx.sgmodule
14 |
15 | 本地添加:
16 | [Script]
17 | 格式转换 = type=http-request,pattern=_surge$,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/Surge_Qx.js
18 | [MITM]
19 | hostname = %APPEND% github.com:443, raw.githubusercontent.com:443
20 |
21 | */
22 |
23 |
24 | let req = $request.url.replace(/_surge$/,'')
25 | let name = '#!name= ' + (req.match(/.+\/(.+)\.(conf|js)/)?.[1] || '未知')
26 | !(async () => {
27 | let body = await http(req);
28 |
29 | body = body.match(/[^\n]+/g);
30 |
31 | let script = [];
32 | let URLRewrite = [];
33 | let HeaderRewrite = [];
34 | let MapLocal = [];
35 | let MITM = "";
36 |
37 | body.forEach((x, y, z) => {
38 | let type = x.match(
39 | /script-|enabled=|url\sreject|echo-response|\-header|hostname|url\s(302|307)|\s(request|response)-body/
40 | )?.[0];
41 | if (type) {
42 | switch (type) {
43 | case "script-":
44 | if (x.match('echo')) {throw '脚本不支持通用'}
45 | z[y - 1]?.match("#") && script.push(z[y - 1]);
46 |
47 | let requires = x.match('-header') ? "0" : "1";
48 | let proto = x.match('proto.js') ? ',binary-body-mode=1' : '' ;
49 | script.push(
50 | x.replace(
51 | /([^\s]+)\surl\sscript-(response|request)[^\s]+\s(http.+\/(.+)\.js)/,
52 | `$4 = type=http-$2,pattern=$1,requires-body=${requires}${proto},max-size=0,script-path=$3,script-update-interval=0`,
53 | ),
54 | );
55 | break;
56 |
57 | case "enabled=":
58 | z[y - 1]?.match("#") && script.push(z[y - 1]);
59 | script.push(
60 | x.replace(
61 | /(.+\*)\s([^\,]+).+?\=([^\,]+).+/,
62 | `$3 = type=cron,script-path=$2,timeout=60,cronexp=$1,wake-system=1`,
63 | ),
64 | );
65 | break;
66 |
67 | case "url reject":
68 | let url = x.match(/[^\s]+/)[0];
69 | let jct = x.match(/reject?[^\s]+/)[0];
70 | let obj = {
71 | "reject-200" : 'https://raw.githubusercontent.com/mieqq/mieqq/master/reject-200.txt',
72 | "reject-img" : 'https://raw.githubusercontent.com/mieqq/mieqq/master/reject-img.gif',
73 | "reject-dict" : 'https://raw.githubusercontent.com/mieqq/mieqq/master/reject-dict.json',
74 | "reject-array" : 'https://raw.githubusercontent.com/mieqq/mieqq/master/reject-array.json',
75 | pp : function (){
76 | return this[jct]}
77 | }
78 | if (obj = obj.pp()){
79 | z[y - 1]?.match("#") && MapLocal.push(z[y - 1]);
80 | MapLocal.push(`${url} data="${obj}"`);
81 | }else{
82 | z[y - 1]?.match("#") && URLRewrite.push(z[y - 1]);
83 | URLRewrite.push(x.replace(/([^\s]+).+/, "$1 - reject"));
84 | }
85 | break;
86 |
87 | case "-header":
88 | if (x.match(/\(\\r\\n\)/g).length === 2){
89 | z[y - 1]?.match("#") && HeaderRewrite.push(z[y - 1]);
90 | let op = x.match(/\sresponse-header/) ?
91 | 'http-response ' : '';
92 | if(x.match(/\$1\$2/)){
93 | HeaderRewrite.push(x.replace(/([^\s]+).+?n\)([^\:]+).+/,`${op}$1 header-del $2`))
94 | }else{
95 | HeaderRewrite.push(
96 | x.replace(
97 | /(http[^\s]+)[^\)]+\)([^:]+):([^\(]+).+\$1\s?\2?\:?([^\$]+)?\$2/,
98 | `${op}$1 header-replace-regex $2 $3 $4''`,
99 | ),
100 | );
101 | }
102 | }else{
103 | $notification.post('不支持这条规则转换,已跳过','',`${x}`);
104 | }
105 | break;
106 |
107 | case "echo-response":
108 | z[y - 1]?.match("#") && MapLocal.push(z[y - 1]);
109 | MapLocal.push(x.replace(/([^\s]+).+(http.+)/, '$1 data="$2"'));
110 | break;
111 | case "hostname":
112 | MITM = x.replace(/hostname\s?=(.*)/, `[MITM]\nhostname = %APPEND% $1`);
113 | break;
114 | default:
115 | if (type.match("url ")) {
116 | z[y - 1]?.match("#") && URLRewrite.push(z[y - 1]);
117 | URLRewrite.push(x.replace(/([^\s]+).+(302|307).+(http.+)/, "$1 $3 $2"));
118 | } else {
119 | z[y - 1]?.match("#") && script.push(z[y - 1]);
120 | script.push(
121 | x.replace(
122 | /([^\s]+)\surl\s(response|request)-body\s(.+)\2-body(.+)/,
123 | `test = type=$2,pattern=$1,requires-body=1,script-path=https://raw.githubusercontent.com/mieqq/mieqq/master/replace-body.js, argument=$3->$4`,
124 | ),
125 | );
126 | }
127 | } //switch结束
128 | }
129 | }); //循环结束
130 |
131 | script = (script[0] || '') && `[Script]\n${script.join("\n")}`;
132 |
133 | URLRewrite = (URLRewrite[0] || '') && `[URL Rewrite]\n${URLRewrite.join("\n")}`;
134 |
135 | HeaderRewrite = (HeaderRewrite[0] || '') && `[Header Rewrite]\n${HeaderRewrite.join("\n")}`;
136 |
137 | MapLocal = (MapLocal[0] || '') && `[MapLocal]\n${MapLocal.join("\n")}`;
138 |
139 | body = `${name}
140 |
141 | ${script}
142 | ${URLRewrite}
143 | ${HeaderRewrite}
144 | ${MapLocal}
145 | ${MITM}`.replace(/\;/g,'#')
146 |
147 |
148 |
149 | $done({ response: { status: 200 ,body:body } });
150 |
151 | })()
152 | .catch((e) => {
153 | e && $notification.post(`${e}`,'','');
154 | $done()
155 | })
156 |
157 |
158 |
159 |
160 | function http(req) {
161 | return new Promise((resolve, reject) =>
162 | $httpClient.get(req, (err, resp,data) => {
163 | resp.status === 200 ? resolve(data) : reject();
164 |
165 |
166 | })
167 | )
168 | }
--------------------------------------------------------------------------------
/ali.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Fileball挂载阿里云盘
4 | 版本:2.2312
5 |
6 | [General]
7 | force-http-engine-hosts = %APPEND% aliyun.example.com:0
8 |
9 | [Script]
10 | 阿里云盘 = type=http-request,pattern=^http:\/\/aliyun\.example\.com,requires-body=1,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/ali.js,max-size=0,debug=0
11 |
12 | 作者:@小白脸 @Chosen Ome
13 | 使用方法:
14 | 添加Synoogy协议,账号随便填,密码填cookie 获取ck的方法如下
15 | 阿里云Token获取地址(需要用阿里云盘扫描alist的二维码获得)[ https://alist-doc.nn.ci/docs/driver/aliyundrive ]
16 |
17 | Fileball挂载图标:https://raw.githubusercontent.com/githubdulong/Script/master/Images/Fileball.json
18 |
19 | */
20 |
21 |
22 | var url = $request.url;
23 | //console.log(url);
24 | var accessToken = $persistentStore.read("ali_access_token") ?? "";
25 | var driveId = $persistentStore.read("ali_drive_id") ?? "";
26 |
27 | var headers = {
28 | Referer: "https://www.aliyundrive.com/",
29 | "User-Agent":
30 | "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36",
31 | "Content-Type": "application/json",
32 | };
33 | var myResponse = {
34 | status: 200,
35 | };
36 | var obj = {};
37 |
38 | function hex2str(hex) {
39 | var trimedStr = hex.trim();
40 | var rawStr = trimedStr.substr(0, 2).toLowerCase() === "0x" ? trimedStr.substr(2) : trimedStr;
41 | var len = rawStr.length;
42 | if (len % 2 !== 0) {
43 | return "";
44 | }
45 | var curCharCode;
46 | var resultStr = [];
47 | for (var i = 0; i < len; i = i + 2) {
48 | curCharCode = parseInt(rawStr.substr(i, 2), 16);
49 | resultStr.push(String.fromCharCode(curCharCode));
50 | }
51 | return resultStr.join("");
52 | }
53 |
54 | function http(req) {
55 | return new Promise((res) => {
56 | $httpClient.post(req, (err, resp, data) => {
57 | res(JSON.parse(data));
58 | });
59 | });
60 | }
61 |
62 | !(async () => {
63 | if (url.indexOf("/webapi/auth.cgi") != -1) {
64 | // 登录接口,替换为刷新refresh token
65 | const body = $request.body;
66 | const password = body.match(/passwd=([^&]*)/)[1];
67 | const refreshToken = $persistentStore.read("ali_refresh_token") ?? password;
68 | const data = {
69 | refresh_token: refreshToken,
70 | grant_type: "refresh_token",
71 | };
72 | const req = {
73 | url: "https://auth.aliyundrive.com/v2/account/token",
74 | headers: headers,
75 | body: JSON.stringify(data),
76 | };
77 |
78 | const json = await http(req);
79 |
80 | if (json.refresh_token && json.access_token && json.default_drive_id) {
81 | $persistentStore.write(json.refresh_token, "ali_refresh_token");
82 | $persistentStore.write(json.access_token, "ali_access_token");
83 | $persistentStore.write(json.default_drive_id, "ali_drive_id");
84 | obj = {
85 | success: true,
86 | data: {
87 | sid: json.access_token,
88 | },
89 | };
90 | myResponse.body = JSON.stringify(obj);
91 |
92 | $done({ response: myResponse });
93 | }
94 | } else if (url.match(/entry\.cgi$/)) {
95 | const body = $request.body;
96 | if (typeof body === "string") {
97 | // 当前的请求为加载目录
98 | if (body.indexOf("list_share") != -1 || body.indexOf("method=list") != -1) {
99 | headers.authorization = "Bearer " + accessToken;
100 | const parentId =
101 | body.match(/folder_path=([^&]*)/) === null ? "root" : body.match(/folder_path=([^&]*)/)[1];
102 | var isRootFolder = parentId === "root";
103 | const data = {
104 | drive_id: driveId,
105 | fields: "*",
106 | parent_file_id: parentId,
107 | limit: 200,
108 | };
109 | const req = {
110 | url: "https://api.aliyundrive.com/v2/file/list",
111 | headers: headers,
112 | body: JSON.stringify(data),
113 | };
114 |
115 | const items = (await http(req)).items;
116 | var files = [];
117 | items.forEach(function (item) {
118 | const file = {
119 | isdir: item.type === "folder",
120 | path: item.file_id,
121 | name: item.name,
122 | additional: {
123 | size: item.size,
124 | },
125 | };
126 | files.push(file);
127 | });
128 | const result = isRootFolder
129 | ? {
130 | total: 0,
131 | offset: 0,
132 | shares: files,
133 | }
134 | : {
135 | total: 0,
136 | offset: 0,
137 | files: files,
138 | };
139 | obj = {
140 | success: true,
141 | data: result,
142 | };
143 | myResponse.body = JSON.stringify(obj);
144 | $done({ response: myResponse });
145 | }
146 | }
147 | }else{
148 | const fileid =
149 | url.match("fbdownload") ?
150 | hex2str( url.match(/dlink=%22(.*)%22/)[1] ) : url.match(/path=(.*$)/)[1];
151 | const body = {
152 | drive_id: driveId,
153 | expire_sec: 14400,
154 | file_id: fileid,
155 | };
156 | headers.authorization = "Bearer " + accessToken;
157 | const req = {
158 | url: "https://api.aliyundrive.com/v2/file/get_download_url",
159 | headers: headers,
160 | body: JSON.stringify(body),
161 | };
162 | const link = (await http(req)).url;
163 |
164 | $done({ response: { status: 302, headers: { Location: link } } });
165 | }
166 | })();
--------------------------------------------------------------------------------
/alidrive.js:
--------------------------------------------------------------------------------
1 | /***********************************
2 |
3 | > 应用名称:阿里云盘
4 | > 脚本作者:Cuttlefish
5 | > 微信账号:墨鱼手记
6 | > 更新时间:2022-10-16
7 | > 通知频道:https://t.me/ddgksf2021
8 | > 投稿助手:https://t.me/ddgksf2013_bot
9 | > 脚本功能:优化首页display
10 | > 问题反馈:📮 ddgksf2013@163.com 📮
11 | > 特别说明:⛔⛔⛔
12 | 本脚本仅供学习交流使用,禁止转载售卖
13 | ⛔⛔⛔
14 |
15 |
16 |
17 | [rewrite_local]
18 |
19 | # ~ 阿里云盘(2022-10-16)@ddgksf2013
20 | ^https?:\/\/api\.aliyundrive\.com\/apps\/v\d\/users\/apps\/widgets$ url script-response-body https://gitlab.com/ddgksf2013/Cuttlefish/-/raw/master/Script/alidrive.js
21 |
22 | [mitm]
23 |
24 | hostname=api.aliyundrive.com
25 |
26 | ***********************************/
27 |
28 | let ddgksf2013 = JSON.parse($response.body);
29 | if (ddgksf2013.result) {
30 | ddgksf2013.result = Object.values(ddgksf2013.result).filter(item => (item["appCode"]=="file" || item["appCode"]=="video"));
31 | }
32 | $done({ body: JSON.stringify(ddgksf2013) });
33 |
--------------------------------------------------------------------------------
/bdcloud.js:
--------------------------------------------------------------------------------
1 | obj={"\x70\x72\x6f\x64\x75\x63\x74\x5f\x69\x6e\x66\x6f\x73":[{"\x70\x72\x6f\x64\x75\x63\x74\x5f\x69\x64":"\x35\x33\x31\x30\x38\x39\x37\x37\x39\x32\x31\x32\x38\x36\x33\x33\x33\x39\x30","\x73\x74\x61\x72\x74\x5f\x74\x69\x6d\x65":1417260485,"\x65\x6e\x64\x5f\x74\x69\x6d\x65":2147483648,"\x62\x75\x79\x5f\x74\x69\x6d\x65":"\x31\x34\x31\x37\x32\x36\x30\x34\x38\x35","\x63\x6c\x75\x73\x74\x65\x72":"\x6f\x66\x66\x6c\x69\x6e\x65\x64\x6c","\x64\x65\x74\x61\x69\x6c\x5f\x63\x6c\x75\x73\x74\x65\x72":"\x6f\x66\x66\x6c\x69\x6e\x65\x64\x6c","\x70\x72\x6f\x64\x75\x63\x74\x5f\x6e\x61\x6d\x65":"\x67\x7a\x5f\x74\x65\x6c\x65\x63\x6f\x6d\x5f\x65\x78\x70"},{"\x70\x72\x6f\x64\x75\x63\x74\x5f\x6e\x61\x6d\x65":"\x73\x76\x69\x70\x32\x5f\x6e\x64","\x70\x72\x6f\x64\x75\x63\x74\x5f\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6f\x6e":"\u8d85\u7ea7\u4f1a\u5458","\x66\x75\x6e\x63\x74\x69\x6f\x6e\x5f\x6e\x75\x6d":0,"\x73\x74\x61\x72\x74\x5f\x74\x69\x6d\x65":1553702399,"\x62\x75\x79\x5f\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6f\x6e":"","\x62\x75\x79\x5f\x74\x69\x6d\x65":0,"\x70\x72\x6f\x64\x75\x63\x74\x5f\x69\x64":"\x31","\x61\x75\x74\x6f\x5f\x75\x70\x67\x72\x61\x64\x65\x5f\x74\x6f\x5f\x73\x76\x69\x70":0,"\x65\x6e\x64\x5f\x74\x69\x6d\x65":1672502399,"\x63\x6c\x75\x73\x74\x65\x72":"\x76\x69\x70","\x64\x65\x74\x61\x69\x6c\x5f\x63\x6c\x75\x73\x74\x65\x72":"\x73\x76\x69\x70","\x73\x74\x61\x74\x75\x73":0}],"\x63\x75\x72\x72\x65\x6e\x74\x74\x69\x6d\x65":1573473597,"\x72\x65\x6d\x69\x6e\x64\x65\x72":{"\x72\x65\x6d\x69\x6e\x64\x65\x72\x57\x69\x74\x68\x43\x6f\x6e\x74\x65\x6e\x74":[],"\x61\x64\x76\x65\x72\x74\x69\x73\x65\x43\x6f\x6e\x74\x65\x6e\x74":[]},"\x72\x65\x71\x75\x65\x73\x74\x5f\x69\x64":7501873289383875000,"\x67\x75\x69\x64\x65\x5f\x64\x61\x74\x61":{"\x74\x69\x74\x6c\x65":"\u8d85\u7ea7\u4f1a\u5458 \x53\x56\x49\x50","\x63\x6f\x6e\x74\x65\x6e\x74":"\u5df2\u62e5\u6709\u6781\u901f\u4e0b\u8f7d\x2b\u89c6\u9891\u500d\u901f\u7279\u6743","\x62\x75\x74\x74\x6f\x6e":{"\x74\x65\x78\x74":"\u4f1a\u5458\u4e2d\u5fc3","\x61\x63\x74\x69\x6f\x6e\x5f\x75\x72\x6c":"\x68\x74\x74\x70\x73\x3a\x2f\x2f\x70\x61\x6e\x2e\x62\x61\x69\x64\x75\x2e\x63\x6f\x6d\x2f\x77\x61\x70\x2f\x76\x69\x70\x2f\x75\x73\x65\x72\x3f\x66\x72\x6f\x6d\x3d\x6d\x79\x76\x69\x70\x32\x23\x73\x76\x69\x70"}}};$done({body:JSON['\x73\x74\x72\x69\x6e\x67\x69\x66\x79'](obj)});
2 |
--------------------------------------------------------------------------------
/dx.js:
--------------------------------------------------------------------------------
1 | const body = "phone=15288888888&submit=";
2 | const headers = {"Connection":"keep-alive","Accept-Encoding":"gzip, deflate","Upgrade-Insecure-Requests":"1","Content-Type":"application\/x-www-form-urlencoded","Origin":"http:\/\/woshi.gjds.vip","User-Agent":"Mozilla\/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit\/605.1.15 (KHTML, like Gecko) Version\/14.0.3 Mobile\/15E148 Safari\/604.1","Cookie":"PHPSESSID=hguq6tmhg0p5krsnhcjj1059h2; Hm_lvt_6c01aec8fd048ea39d1445d07bfd0545=1660906874,1660917476,1660937190,1661056733","Host":"woshi.gjds.vip","Referer":"http:\/\/woshi.gjds.vip\/user\/","Accept-Language":"zh-cn","Accept":"text\/html,application\/xhtml+xml,application\/xml;q=0.9,*\/*;q=0.8","Content-Length":"25"};
3 | const url = "http://woshi.gjds.vip/user/index.php";
4 |
5 |
6 | const request = {
7 | url: url,
8 | headers: headers,
9 | body: body
10 | };
11 |
12 | $httpClient.post(request,(err, resp, data)=>{
13 | console.log(JSON.stringify(data))
14 | $done({})
15 | });
--------------------------------------------------------------------------------
/fantastical.js:
--------------------------------------------------------------------------------
1 | /*
2 | Quantumult_X
3 | ^https:\/\/api\.flexibits\.com\/v1\/(auth|account)\/(device|details|appstore-receipt)\/$ url script-response-body https://raw.githubusercontent.com/githubdulong/Script/master/fantastical.js
4 |
5 | Surge
6 | Fantastical = requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/fantastical.js,type=http-response,pattern=^https:\/\/api\.flexibits\.com\/v1\/(auth|account)\/(device|details|appstore-receipt)\/$
7 |
8 | hostname=api.flexibits.com
9 | */
10 |
11 | let url=$request.url;
12 | let obj=JSON.parse($response.body);
13 |
14 | if(url.indexOf('device')!=-1){
15 |
16 | obj.status="success";
17 | obj.subscription={
18 | "autorenew": true,
19 | "expiration": "2099-12-31T16:49:37Z",
20 | "expires": "2099-12-31T16:49:37Z"
21 | };
22 | obj.scope=["notify", "weather", "keyvalue-watch", "keyvalue-verification", "schedjoules", "scheduling", "account", "keyvalue", "fantastical"];
23 |
24 | }
25 |
26 | if(url.indexOf('details')!=-1){
27 |
28 | obj.subscription={
29 | "autorenew": true,
30 | "expiration": "2099-12-31T16:49:37.000000Z",
31 | "uuid": "f1da7c78-e964-4367-915c-886edc794959",
32 | "subscription_type": "AppStore",
33 | "is_expired": false,
34 | "trial": false
35 | };
36 | }
37 |
38 | if(url.indexOf('appstore-receipt')!=-1){
39 |
40 | obj.autorenew=true;
41 | obj.expiration="2099-12-31T16:49:37.000000Z";
42 | obj.subscription_type="AppStore";
43 | obj.is_expired=false;
44 | obj.trial=false;
45 | }
46 |
47 | $done({body:JSON.stringify(obj)});
--------------------------------------------------------------------------------
/fileball.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | 更新日期:2023-03-09
4 | 作者:Xiaobl
5 |
6 | #!name=Fileball 云盘挂载 阿里,夸克,pikpak三合一
7 | #!desc=添加Synoogy协议,账号随便填,密码填cookie 获取ck的方法
8 | # 阿里云Token获取地址(需要用阿里云盘扫描alist的二维码获得)[ https://alist-doc.nn.ci/docs/driver/aliyundrive ]
9 | # 夸克登录网页版抓包,路径https://drive.quark.cn/1/clouddrive/file
10 | # pikpak 直接填账号密码
11 |
12 | # aliyun.example.com
13 | # quark.example.com
14 | # pikpak.example.com
15 |
16 | [General]
17 | force-http-engine-hosts = %APPEND% *.example.com:0
18 | //要开mpv的话必须添加
19 |
20 | [Script]
21 | 云盘挂载 = type=http-request,pattern=^http:\/\/(aliyun|quark|pikpak)\.example\.com,requires-body=1,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/fileball.js
22 |
23 | Fileball挂载图标:https://raw.githubusercontent.com/githubdulong/Script/master/Images/Fileball.json
24 |
25 | */
26 |
27 |
28 | //$surge.
29 | let url=$request.url,body=$request.body,type=url.match(/aliyun|pikpak|quark/)[0];switch(type){case"aliyun":aliyun();break;case"pikpak":pikpak();break;case"quark":quark();break;default:$done({})}function aliyun(){let[e,t,a]=$persistentStore.read("ali_token")?.split(",")||[],i={url:"https://api.aliyundrive.com/adrive/v3/file/list",headers:{Authorization:e}};(async()=>{switch(url.match(/(auth|entry)\.cgi$/)?.[0]){case"auth.cgi":$done({response:{status:200,body:`{"success":true,"data":{"sid":"${await f()}"}}`}});break;case"entry.cgi":if(body.includes("Delete&")){let e=body.match(/path=([^&]+)/)[1];i.url="https://api.aliyundrive.com/v3/batch",i.headers["content-type"]="application/json; charset=UTF-8",i.body=`{"resource":"file","requests":[{"method":"POST","headers":{"Content-Type":"application/json"},"id":"${e}","body":{"file_id":"${e}","drive_id":"${a}"},"url":"/recyclebin/trash"}]}`,$done(i)}else if(body.includes("method=get"))photo();else{let r="root",s=body.match(/folder_path=([^&]+)/)?.[1],o=s?(i.url=i.url.replace(/(parent_id=)/,`$1${s}`),r=s,"files"):"shares",d=`{"fields":"*","drive_id":"${a}","order_direction":"DESC","order_by":"updated_at","limit":100,"parent_file_id":"${r}","all":false}`;i.body=d;let l=[];do{for(;;){let c=await http(i,"post");if(c){var{items:p,next_marker:n}=c;break}0===c&&await f(1)}let h=p.map(e=>({isdir:"folder"===e.type,path:e.file_id,name:e.name,additional:{size:e.size},url:e.url}));l.push(...h),n&&(i.body=d.replace(/false/,`false ,"marker":"${n}"`))}while(n);l=JSON.stringify(l),$persistentStore.write(l,"_file"),$done({response:{status:200,body:`{"success":true,"data":{"total":0,"offset":0,"${o}":${l}}}`}})}break;default:let u=url.includes("fbdownload")?hex2str(url.match(/dlink=%22(.*)%22/)[1]):url.match(/path=(.*$)/)[1];i.url=JSON.parse($persistentStore.read("_file")).filter(e=>e.path===u)[0].url.replace(/https/,"http"),i.headers.Range=$request.headers.Range,$done(i)}async function f(e){let a=await http({headers:{"Content-Type":"application/json"},url:"https://auth.aliyundrive.com/v2/account/token",body:`{"refresh_token":"${t||body.match(/passwd=([^&]*)/)[1]}","grant_type":"refresh_token"}`},"post"),r=`${a.access_token},${a.refresh_token},${a.default_drive_id}`;e&&(i.headers.Authorization=a.access_token),$persistentStore.write(r,"ali_token")}})().catch(()=>$done())}function pikpak(){let e=["https://api-drive.mypikpak.com/drive/v1/files?filters=%7B%22phase%22%3A%7B%22eq%22%3A%22PHASE_TYPE_COMPLETE%22%7D%2C%22trashed%22%3A%7B%22eq%22%3Afalse%7D%7D","","&parent_id=","","&thumbnail_size=SIZE_LARGE",],t={url:e.join(""),headers:{authorization:$persistentStore.read("pikpak-ck")}};(async()=>{switch(url.match(/(auth|entry)\.cgi$/)?.[0]){case"auth.cgi":$done({response:{status:200,body:`{"success":true,"data":{"sid":"${await p()}"}}`}});break;case"entry.cgi":if(body.includes("Delete&"))t.url="https://api-drive.mypikpak.com/drive/v1/files:batchTrash",t.body=`{"ids":["${body.match(/path=([^&]+)/)[1]}"]}`,$done(t);else if(body.includes("method=get"))photo();else{let a=body.match(/folder_path=([^&]+)/)?.[1],i=a?(e[3]=a,"files"):"shares",r=[];do{for(t.url=e.join("");;){let s=await http(t);if(s){var{files:o,next_page_token:d}=s;break}await p(1)}let l=o.map(e=>({isdir:!e.file_extension,path:e.id,name:e.name,additional:{size:parseInt(e.size)}}));d&&(e[1]="&page_token="+d),r.push(...l)}while(d);$done({response:{status:200,body:JSON.stringify({success:!0,data:{total:0,offset:0,[i]:r}})}})}break;default:let c=url.match("fbdownload")?hex2str(url.match(/dlink=%22(.*)%22/)[1]):url.match(/path=(.*$)/)[1];t.url=`https://api-drive.mypikpak.com/drive/v1/files/${c}?&thumbnail_size=SIZE_LARGE`;$done({response:{status:302,headers:{Location:(await http(t)).links["application/octet-stream"].url.replace(/https/,"http")}}})}async function p(e){let a=$persistentStore.read("pikpak-account")?.split(",")||(body=decodeURIComponent(body),0),i=a?.[0]||body.match(/account=([^&]+)/)[1],r=a?.[1]||body.match(/passwd=([^&]+)/)[1],s="Bearer "+(await http({url:"https://user.mypikpak.com/v1/auth/signin",body:`{"client_id":"YNxT9w7GMdWvEOKa",
30 | "username":"${i}",
31 | "password":"${r}"}`},"post"))?.["access_token"];e&&(t.headers.authorization=s),$persistentStore.write(i+","+r,"pikpak-account"),$persistentStore.write(s,"pikpak-ck")}})().catch(()=>$done())}function quark(){let e=$persistentStore.read("quark-ck"),t=["https://drive.quark.cn/1/clouddrive/file/sort?_fetch_total=1&_page=",1,"&_size=100&fr=pc&pdir_fid=",0,"&pr=ucpro",],a={url:t.join(""),headers:{cookie:e,"content-type":"application/json"}};(async()=>{switch(url.match(/(auth|entry)\.cgi$/)?.[0]){case"auth.cgi":e=decodeURIComponent(body.match(/passwd=([^&]+)/)[1]),$persistentStore.write(e,"quark-ck"),$done({response:{status:200,body:`{"success":true,"data":{"sid":"${e}"}}`}});break;case"entry.cgi":if(body.includes("Delete&"))a.url="https://drive.quark.cn/1/clouddrive/file/delete?fr=pc&pr=ucpro",a.body=`{"action_type":1,"exclude_fids":[],"filelist":["${body.match(/path=([^&]+)/)[1]}"]}`,$done(a);else if(body.includes("method=get"))photo();else{let i=body.match(/folder_path=([^&]+)/)?.[1],r=i?(t[3]=i,"files"):"shares",s=[];do{if(a.url=t.join(""),1===t[1]){var{metadata:{_total:o},data:{list:d}}=await http(a,"get",1,e);o=parseInt(o/100)+1}else var{data:{list:d}}=await http(a,"get",1,e);let l=d.map(e=>({isdir:!e.file,path:e.fid,name:e.file_name,additional:{size:e.size}}));s.push(...l)}while(t[1]$done())}function photo(){$done({response:{method:"GET",status:301,headers:{Location:`http://${type}.example.com:5000/webapi/entry.cgi?api=SYNO.FileStation.Download&version=2&method=download&mode=open&path=${body.match(/path=([^&?]+)/)[1]}`}}})}function hex2str(e){var t,a=e.trim(),i="0x"===a.substr(0,2).toLowerCase()?a.substr(2):a,r=i.length;if(r%2!=0)return"";for(var s=[],o=0;o{$httpClient[t](e,(e,t,o)=>{switch(a&&(a=t.headers?.["Set-Cookie"]?.split(";")[0])&&$persistentStore.write(i.replace(/[^;]+/,a),"quark-ck"),t?.status){case 200:r(JSON.parse(o));break;case 429:r(null);break;case 401:r(0);break;default:s()}})})}
--------------------------------------------------------------------------------
/flushDNS.js:
--------------------------------------------------------------------------------
1 | /*
2 | [Script]
3 | flushDNS = type=generic,timeout=10,script-path=https://raw.githubusercontent.com/zZPiglet/Task/master/asset/flushDNS.js
4 | // use "title" or "icon" or "color" or "server" in "argument":
5 | // flushDNS = type=generic,timeout=10,script-path=https://raw.githubusercontent.com/zZPiglet/Task/master/asset/flushDNS.js,argument=title=DNS FLush&icon=arrow.clockwise&color=#3d3d5b&server=false
6 |
7 | [Panel]
8 | flushDNS = script-name=flushDNS,update-interval=600
9 | */
10 |
11 | !(async () => {
12 | let panel = { title: "Flush DNS" },
13 | showServer = true,
14 | dnsCache;
15 | if (typeof $argument != "undefined") {
16 | let arg = Object.fromEntries($argument.split("&").map((item) => item.split("=")));
17 | if (arg.title) panel.title = arg.title;
18 | if (arg.icon) panel.icon = arg.icon;
19 | if (arg.color) panel["icon-color"] = arg.color;
20 | if (arg.server == "false") showServer = false;
21 | }
22 | if (showServer) {
23 | dnsCache = (await httpAPI("/v1/dns", "GET")).dnsCache;
24 | dnsCache = [...new Set(dnsCache.map((d) => d.server))].toString().replace(/,/g, "\n");
25 | }
26 | if ($trigger == "button") await httpAPI("/v1/dns/flush");
27 | let delay = ((await httpAPI("/v1/test/dns_delay")).delay * 1000).toFixed(0);
28 | panel.content = `延迟: ${delay}ms${dnsCache ? `\nserver:\n${dnsCache}` : ""}`;
29 | $done(panel);
30 | })();
31 |
32 | function httpAPI(path = "", method = "POST", body = null) {
33 | return new Promise((resolve) => {
34 | $httpAPI(method, path, body, (result) => {
35 | resolve(result);
36 | });
37 | });
38 | }
39 |
--------------------------------------------------------------------------------
/functionstatus.js:
--------------------------------------------------------------------------------
1 | /*
2 | by:@moioooo
3 |
4 | [Panel]
5 | # > Panel
6 | 策略面板 = script-name=功能开关, update-interval=30
7 | [Script]
8 | # > 策略面板
9 | 功能开关 = type=generic,timeout=15,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/functionstatus.js
10 |
11 | */
12 | !(async () => {
13 | let traffic = (await httpAPI("/v1/traffic","GET"));
14 | let dateNow = new Date();
15 | let dateTime = Math.floor(traffic.startTime*1000);
16 | let startTime = timeTransform(dateNow,dateTime);
17 | let mitm_status = (await httpAPI("/v1/features/mitm","GET"));
18 | let rewrite_status = (await httpAPI("/v1/features/rewrite","GET"));
19 | let scripting_status = (await httpAPI("/v1/features/scripting","GET"));
20 | let icon_s = mitm_status.enabled&&rewrite_status.enabled&&scripting_status.enabled;
21 | // 刷新DNS
22 | if ($trigger == "button") await httpAPI("/v1/dns/flush");
23 | // 重载配置+刷新DNS
24 | //if ($trigger == "button") {
25 | //await httpAPI("/v1/profiles/reload");
26 | //$notification.post("配置重载","配置重载成功","")
27 | //};
28 | $done({
29 | title:"𝗦𝗨𝗥𝗚𝗘 已运行"+startTime, //标题
30 | content:"MitM "+icon_status(mitm_status.enabled)+" Rewrite "+icon_status(rewrite_status.enabled)+" Scripting "+icon_status(scripting_status.enabled),
31 | icon: icon_s?"power.circle":"exclamationmark.circle", //图标
32 | "icon-color":icon_s?"#FF2121":"#FF7500" //颜色
33 | });
34 | })();
35 | function icon_status(status){
36 | if (status){
37 | return "\u2611"; //小图标“勾”
38 | } else {
39 | return "\u2612" //小图标“叉”
40 | }
41 | }
42 | function timeTransform(dateNow,dateTime) {
43 | let dateDiff = dateNow - dateTime;
44 | let days = Math.floor(dateDiff / (24 * 3600 * 1000));//计算出相差天数
45 | let leave1=dateDiff%(24*3600*1000) //计算天数后剩余的毫秒数
46 | let hours=Math.floor(leave1/(3600*1000))//计算出小时数
47 | //计算相差分钟数
48 | let leave2=leave1%(3600*1000) //计算小时数后剩余的毫秒数
49 | let minutes=Math.floor(leave2/(60*1000))//计算相差分钟数
50 | //计算相差秒数
51 | let leave3=leave2%(60*1000) //计算分钟数后剩余的毫秒数
52 | let seconds=Math.round(leave3/1000)
53 |
54 | if(days==0){
55 | if(hours==0){
56 | if(minutes==0)return(`${seconds}秒`);
57 | return(`${minutes}分${seconds}秒`)
58 | }
59 | return(`${hours}时${minutes}分${seconds}秒`)
60 | }else {
61 | return(`${days}天${hours}时${minutes}分`)
62 | }
63 | }
64 | function httpAPI(path = "", method = "POST", body = null) {
65 | return new Promise((resolve) => {
66 | $httpAPI(method, path, body, (result) => {
67 | resolve(result);
68 | });
69 | });
70 | }
--------------------------------------------------------------------------------
/geo_location.js:
--------------------------------------------------------------------------------
1 | /***
2 | [task_local]
3 | event-interaction https://raw.githubusercontent.com/KOP-XIAO/QuantumultX/master/Scripts/geo_location.js, tag=GeoIP 查询, img-url=location.fill.viewfinder.system
4 |
5 | @XIAO_KOP
6 |
7 | **/
8 |
9 | var url = "https://api.ip.sb/geoip"
10 | var opts = {
11 | policy: $environment.params
12 | };
13 | var myRequest = {
14 | url: url,
15 | opts: opts,
16 | timeout: 4000
17 | };
18 |
19 | var message = ""
20 | const paras = ["ip","isp","country_code","city"]
21 | const paran = ["IP","ISP","地区","城市"]
22 | $task.fetch(myRequest).then(response => {
23 | message = response? json2info(response.body,paras) : ""
24 | $done({"title":"IP.SB 查询结果","message":message});
25 | }, reason => {
26 | message = "\n查询超时"
27 | $done({"title": "IP.SB 查询结果", "message": message});
28 | })
29 |
30 |
31 | function json2info(cnt,paras) {
32 | var res = "\n"
33 | cnt =JSON.parse(cnt)
34 | for (i=0;i {
15 |
16 | let params = getParams($argument);
17 | let group=params.group;
18 | let proxy = await httpAPI("/v1/policy_groups");
19 | let groupName = (await httpAPI("/v1/policy_groups/select?group_name="+encodeURIComponent(group)+"")).policy;
20 | var proxyName= [];
21 | let arr = proxy[""+group+""];
22 | let allGroup = [];
23 |
24 | for (var key in proxy){
25 | allGroup.push(key)
26 | }
27 |
28 |
29 | for (let i = 0; i < arr.length; ++i) {
30 | proxyName.push(arr[i].name);
31 | }
32 |
33 | let index;
34 |
35 | for(let i = 0;i < proxyName.length; ++i) {
36 | if(groupName==proxyName[i]){
37 | index=i
38 | }
39 | };
40 |
41 | if($trigger == "button"){
42 | index += 1;
43 |
44 | if(index>arr.length-1){
45 | index = 0;
46 | }
47 | $surge.setSelectGroupPolicy(group, proxyName[index]);
48 |
49 | };
50 |
51 | let name =proxyName[index];
52 | let secondName;
53 | let rootName = name;
54 | if(allGroup.includes(rootName)==true){
55 | secondName = (await httpAPI("/v1/policy_groups/select?group_name="+encodeURIComponent(rootName)+"")).policy;
56 | name = name + ' ➟ ' + secondName
57 | }
58 |
59 | while(allGroup.includes(rootName)==true){
60 | rootName = (await httpAPI("/v1/policy_groups/select?group_name="+encodeURIComponent(rootName)+"")).policy;
61 | }
62 |
63 | if(arr[index].isGroup==true && secondName!= rootName){
64 | name=name + ' ➟ ' + rootName;
65 | }
66 |
67 | $done({
68 | title:group,
69 | content:name,
70 | icon: params.icon,
71 | "icon-color":params.color
72 | });
73 | })();
74 |
75 |
76 | function httpAPI(path = "", method = "GET", body = null) {
77 | return new Promise((resolve) => {
78 | $httpAPI(method, path, body, (result) => {
79 | resolve(result);
80 | });
81 | });
82 | };
83 |
84 | function getParams(param) {
85 | return Object.fromEntries(
86 | $argument
87 | .split("&")
88 | .map((item) => item.split("="))
89 | .map(([k, v]) => [k, decodeURIComponent(v)])
90 | );
91 | }
92 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | //修改来源 https://raw.githubusercontent.com/xream/scripts/main/surge/modules/kill-active-requests/index.sgmodule
2 |
3 | const isPanel = () => typeof $input != 'undefined' && $input.purpose === 'panel'
4 | const isRequest = () => typeof $request !== 'undefined'
5 |
6 | let arg
7 | if (typeof $argument != 'undefined') {
8 | arg = Object.fromEntries($argument.split('&').map(item => item.split('=')))
9 | }
10 |
11 | if (/^\d+$/.test(arg?.TIMEOUT)) {
12 | console.log(`超时参数 ${arg?.TIMEOUT} 秒`)
13 | setTimeout(() => {
14 | console.log(`超时 ${arg?.TIMEOUT - 1}`)
15 | $done({
16 | response: {
17 | status: 500,
18 | headers: { 'Content-Type': 'application/json' },
19 | body: JSON.stringify({ error: `超时 ${arg?.TIMEOUT - 1} 秒` }),
20 | },
21 | })
22 | }, (arg?.TIMEOUT - 1) * 1000)
23 | }
24 |
25 | let result = {}
26 | !(async () => {
27 | if (isPanel()) {
28 | if ($trigger === 'button') {
29 | const { requests = [] } = await httpAPI('/v1/requests/active', 'GET') || {}
30 | let count = 0
31 | for (const { id } of requests) {
32 | const res = await httpAPI('/v1/requests/kill', 'POST', { id })
33 | if (res?.status === 'success') {
34 | count++
35 | }
36 | }
37 | const message = `🅰 活跃请求${requests.length}个\n🅂 成功打断${count}个`
38 | $notification.post('', '', message, { 'auto-dismiss': 1 })
39 | await kill()
40 | }
41 | const { requests = [] } = await httpAPI('/v1/requests/active', 'GET') || {}
42 | result = { title: `活跃请求数: ${requests.length}`, content: '点击一键打断', ...arg }
43 | } else if (isRequest()) {
44 | const params = parseQueryString($request.url)
45 | if (params?.REQ_RULE) {
46 | const { requests = [] } = await httpAPI('/v1/requests/active', 'GET') || {}
47 | let count = 0
48 | for (const { id, rule, url, URL } of requests) {
49 | const re = new RegExp(params?.REQ_RULE)
50 | if(re.test(rule)) {
51 | console.log(`${url || URL}, ${rule} 匹配规则 ${params?.REQ_RULE}`)
52 | count++
53 | await httpAPI('/v1/requests/kill', 'POST', { id })
54 | }
55 | }
56 | if (arg?.REQ_NOTIFY == 1) {
57 | const message = `🅰 活跃请求${requests.length}个\n🅂 成功打断${count}个`
58 | $notification.post('', '', message, { 'auto-dismiss': 1 })
59 | }
60 | result = {
61 | response: {
62 | status: 200,
63 | headers: { 'Content-Type': 'application/json' },
64 | body: JSON.stringify({ count, rule: params?.REQ_RULE }),
65 | },
66 | }
67 | } else {
68 | const { requests = [] } = await httpAPI('/v1/requests/active', 'GET') || {}
69 | await kill()
70 | if(arg?.REQ_NOTIFY == 1) {
71 | const message = `🅰 活跃请求${requests.length}个\n🅂 成功打断${count}个`
72 | $notification.post('', '', message, { 'auto-dismiss': 1 })
73 | }
74 | result = {
75 | response: {
76 | status: 200,
77 | headers: { 'Content-Type': 'text/html' },
78 | body: `找到 ${requests.length} 个活跃请求
已尝试打断
`,
89 | },
90 | }
91 | }
92 | } else if(arg?.TYPE == 'CRON' && arg?.CRON_RULE) {
93 | const { requests = [] } = await httpAPI('/v1/requests/active', 'GET') || {}
94 | let count = 0
95 | for await (const { id, rule, url, URL } of requests) {
96 | const re = new RegExp(arg?.CRON_RULE)
97 | if(re.test(rule)) {
98 | console.log(`${url || URL}, ${rule} 匹配规则 ${arg?.CRON_RULE}`)
99 | count++
100 | await httpAPI('/v1/requests/kill', 'POST', { id })
101 | }
102 | }
103 | if (arg?.CRON_NOTIFY == 1) {
104 | $notification.post('定时任务', '打断请求', `${count} 个`)
105 | }
106 | } else {
107 | let wifi = $network.wifi && $network.wifi.bssid
108 | if (wifi) {
109 | $persistentStore.write(wifi, 'last_network')
110 | } else {
111 | wifi = $persistentStore.read('last_network')
112 | if (wifi) {
113 | const { requests = [] } = await httpAPI('/v1/requests/active', 'GET') || {}
114 | await kill()
115 | if (arg?.EVENT_NOTIFY == 1) {
116 | $notification.post('网络变化', '打断请求', `${requests.length} 个`)
117 | }
118 | }
119 | $persistentStore.write('', 'last_network')
120 | }
121 | }
122 | })()
123 | .catch(e => {
124 | console.log(e)
125 | const msg = `${e.message || e}`
126 | if (isPanel()) {
127 | result = { title: '❌', content: msg, ...arg }
128 | } else if (isRequest()) {
129 | result = {
130 | response: {
131 | status: 500,
132 | headers: { 'Content-Type': 'application/json' },
133 | body: JSON.stringify({ error: msg }),
134 | },
135 | }
136 | } else {
137 | $notification.post('网络变化', `❌ 打断请求`, msg)
138 | }
139 | })
140 | .finally(() => $done(result))
141 |
142 | async function kill() {
143 | await httpAPI('/v1/dns/flush', 'POST')
144 | const beforeMode = (await httpAPI('/v1/outbound', 'GET')).mode
145 | const newMode = { direct: 'proxy', proxy: 'direct', rule: 'proxy' }
146 | await httpAPI('/v1/outbound', 'POST', { mode: newMode[beforeMode] })
147 | await httpAPI('/v1/outbound', 'POST', { mode: newMode[newMode[beforeMode]] })
148 | await httpAPI('/v1/outbound', 'POST', { mode: beforeMode })
149 | if ((await httpAPI('/v1/outbound', 'GET')).mode != beforeMode) {
150 | console.log(`再切一次: ${beforeMode}`)
151 | await httpAPI('/v1/outbound', 'POST', { mode: beforeMode })
152 | }
153 | }
154 |
155 | function httpAPI(path = '', method = 'POST', body = null) {
156 | return new Promise(resolve => {
157 | $httpAPI(method, path, body, result => {
158 | resolve(result)
159 | })
160 | })
161 | }
162 |
163 | function parseQueryString(url) {
164 | const queryString = url.split('?')[1]
165 | const regex = /([^=&]+)=([^&]*)/g
166 | const params = {}
167 | let match
168 | while ((match = regex.exec(queryString))) {
169 | params[decodeURIComponent(match[1])] = decodeURIComponent(match[2])
170 | }
171 | return params
172 | }
--------------------------------------------------------------------------------
/jdHelper.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=京东助手
2 | #!desc=京东、京喜、特价app领取隐藏劵+触发京粉转链+跳转慢慢买与什么值得买 更新时间2022-10-27
3 | #!system=ios
4 |
5 | [Script]
6 | 京东助手 = type=http-response,pattern=^https:\/\/in\.m\.jd\.com\/product\/.+?\.html,requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/jdHelper.js
7 | 京喜助手 = type=http-response,pattern=^https:\/\/wqs\.jd\.com\/wxsq_item_search\/item\/jxapp_detail\/index\.shtml,requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/jdHelper.js
8 | 特价助手 = type=http-response,pattern=^https:\/\/lite-in\.m\.jd\.com\/product\/detail\/sequ\/\d+.html,requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/jdHelper.js
9 |
10 | [MITM]
11 | hostname = %APPEND% in.m.jd.com, wqs.jd.com, lite-in.m.jd.com
--------------------------------------------------------------------------------
/jdact.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=京东活动
2 | #!desc=京东活动重写 凌晨手动提现
3 | #!ios
4 | # 自用临时活动脚本、勿问、勿尝试 01-10
5 |
6 | [Script]
7 | # 大赢家提前点亮
8 | 赢家提现 = type=http-response,pattern=^https:\/\/api\.m\.jd\.com\/api\?functionId=makemoneyshop_exchangequery,requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/jdact.js
9 | # 城城分现金提前点亮
10 | 城城提现= type=http-response,pattern=^https:\/\/api\.m\.jd\.com\/client\.action$,requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/jdact.js
11 |
12 | [MITM]
13 | hostname = %APPEND% *.m.jd.com
--------------------------------------------------------------------------------
/jfConvert.sgmodule:
--------------------------------------------------------------------------------
1 | #!name=京粉转链
2 | #!desc=京东、京喜、极速版转链弹窗版
3 | #!system=ios
4 |
5 | [Script]
6 | 京粉转链 = type=http-response,pattern=^https?://api\.m\.jd\.com/(client\.action|api)\?functionId=(wareBusiness|serverConfig|basicConfig|lite_wareBusiness|pingou_item),requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/jfConvert.js,use-local-host-item-for-proxy = true,script-update-interval=0
7 |
8 | [MITM]
9 | hostname = %APPEND% me-api.jd.com
--------------------------------------------------------------------------------
/mix.js:
--------------------------------------------------------------------------------
1 | /*
2 | by @hiepkimcdtk55
3 |
4 | * MIX解锁订阅功能
5 | * 配置好脚本、点击三天试用、恢复购买、取消订阅。
6 | =======Quantumult X=======
7 |
8 | [rewrite_local]
9 | ^https:\/\/cdn-bm\.camera360\.com\/api\/mix\/recovery url script-response-body https://raw.githubusercontent.com/githubdulong/Script/master/mix.js
10 |
11 | [MITM]
12 | hostname = cdn-bm.camera360.com
13 |
14 | ========Surge==========
15 |
16 | [Script]
17 | camera360-Mix = requires-body=1,script-path= https://raw.githubusercontent.com/githubdulong/Script/master/mix.js,type=http-response,pattern= ^https:\/\/cdn-bm\.camera360\.com\/api\/mix\/recovery$
18 |
19 | [MITM]
20 | hostname = cdn-bm.camera360.com
21 |
22 | //MIX 去开屏广告
23 | ^https:\/\/mix-api\.camera360\.com\/v1\/operational-positions url reject-dict
24 |
25 | mix-api.camera360.com
26 |
27 | */
28 |
29 | let body= $response.body;
30 | var obj = JSON.parse(body);
31 | if (body.indexOf("expires") !=-1) {;
32 | obj["data"]["orderList"][0]["expires_date"] = "2099-10-19 05:14:18 Etc/GMT";
33 | obj["data"]["orderList"][0]["expires_date_pst"] = "2099-10-18 22:14:18 America/Los_Angeles";
34 | obj["data"]["orderList"][0]["expires_date_ms"] = "4096019658000";
35 | }
36 | $done({body: JSON.stringify(obj)});
37 |
--------------------------------------------------------------------------------
/mock.js:
--------------------------------------------------------------------------------
1 | /*
2 | Surge 脚本实现 Qx 的 response-body、和request-body 重写类型
3 |
4 | 如 Qx:
5 | https://service.ilovepdf.com/v1/user url response-body false response-body true
6 |
7 | 可改写为 Surge:
8 | [Script]
9 | test = type=http-response,pattern=https://service.ilovepdf.com/v1/user,requires-body=1,script-path=https://raw.githubusercontent.com/mieqq/mieqq/master/replace-body.js, argument=false->true
10 |
11 | argument=要匹配值=作为替换的值
12 | 支持正则:如argument=\w+->test
13 | 支持正则修饰符:如argument=/\w+/g->test
14 | 支持多参数,如:argument=匹配值1->替换值1&匹配值2->替换值2
15 |
16 | 支持改写响应体和请求体体(type=http-response 或 http-request)注意必须打开需要body(requires-body=1)
17 |
18 | tips
19 | 修改json格式的键值对可以这样:
20 | argument=("key")\s?:\s?"(.+?)"->$1: "new_value"
21 |
22 | s修饰符可以让.匹配换行符,如 argument=/.+/s->hello
23 |
24 | */
25 |
26 | function getRegexp(re_str) {
27 | let regParts = re_str.match(/^\/(.*?)\/([gims]*)$/);
28 | if (regParts) {
29 | return new RegExp(regParts[1], regParts[2]);
30 | } else {
31 | return new RegExp(re_str);
32 | }
33 | }
34 | String.prototype.replaceAll = function(s1, s2) {
35 | return this.replace(new RegExp(s1, "gm"), s2);
36 | }
37 | let body;
38 | if (typeof $argument == "undefined") {
39 | console.log("requires $argument");
40 | } else {
41 | $argument = $argument.replaceAll(",,", ",")
42 | console.log($argument);
43 | if ($script.type === "http-response") {
44 | body = $response.body;
45 | } else if ($script.type === "http-request") {
46 | body = $request.body;
47 | } else {
48 | console.log("script type error");
49 | }
50 | }
51 |
52 | console.log($script.type)
53 |
54 | if (body) {
55 | $argument.split("&").forEach((item) => {
56 | if (item) {
57 | try {
58 | let [match, replace] = item.split("->");
59 | let re = getRegexp(match);
60 | body = body.replaceAll(re, replace);
61 | } catch (e) {
62 | console.error(item)
63 | console.error(e)
64 | }
65 | }
66 | });
67 | $done({ body });
68 | } else {
69 | console.log("Not Modify");
70 | $done({});
71 | }
72 |
--------------------------------------------------------------------------------
/netflixCheck.js:
--------------------------------------------------------------------------------
1 | //let params = getParams($argument)
2 | const BASE_URL = 'https://www.netflix.com/title/'
3 |
4 | const FILM_ID = 80062035
5 | const AREA_TEST_FILM_ID = 80018499
6 |
7 | ;(async () => {
8 | let result = {
9 | title: "𝗡𝗘𝗧𝗙𝗟𝗜𝗫",
10 | icon: "bolt.slash.circle",
11 | 'icon-color':"#801DAE",
12 | content: '请刷新网络后重试',
13 | }
14 | await test(FILM_ID)
15 | .then((code) => {
16 | if (code === 'Not Found') {
17 | return test(AREA_TEST_FILM_ID)
18 | }
19 | result['Title'] ="𝗡𝗘𝗧𝗙𝗟𝗜𝗫"
20 | result['icon'] = "play.circle"
21 | result['icon-color'] = '#00BC12'
22 | //result['icon'] = params.icon1
23 | //result['icon-color'] = params.color1
24 | result['content'] = '已解锁奈飞' + ' ➟ 区域 ' + code.toUpperCase()
25 | return Promise.reject('BreakSignal')
26 | })
27 | .then((code) => {
28 | if (code === 'Not Found') {
29 | return Promise.reject('Not Available')
30 | }
31 | result['Title'] ="𝗡𝗘𝗧𝗙𝗟𝗜𝗫"
32 | result['icon'] = "pause.circle"
33 | result['icon-color'] = "#FFB61E"
34 | //result['icon'] = params.icon2
35 | //result['icon-color'] = params.color2
36 | result['content'] = '仅支持自制剧' + ' ➟ 区域 ' + code.toUpperCase()
37 | return Promise.reject('BreakSignal')
38 | })
39 | .catch((error) => {
40 | if (error === 'Not Available') {
41 | result['Title'] ="𝗡𝗘𝗧𝗙𝗟𝗜𝗫"
42 | result['icon'] = "stop.circle"
43 | result['icon-color'] = "#FF2121"
44 | //result['icon'] = params.icon3
45 | //result['icon-color'] = params.color3
46 | result['content'] = '该节点未解锁奈飞'
47 | return
48 | }
49 | })
50 | .finally(() => {
51 | $done(result)
52 | })
53 | })()
54 |
55 | function test(filmId) {
56 | return new Promise((resolve, reject) => {
57 | let option = {
58 | url: BASE_URL + filmId,
59 | headers: {
60 | 'User-Agent':
61 | 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36',
62 | },
63 | }
64 | $httpClient.get(option, function (error, response, data) {
65 | if (error != null) {
66 | reject('Error')
67 | return
68 | }
69 |
70 | if (response.status === 403) {
71 | reject('Not Available')
72 | return
73 | }
74 |
75 | if (response.status === 404) {
76 | resolve('Not Found')
77 | return
78 | }
79 |
80 | if (response.status === 200) {
81 | let url = response.headers['x-originating-url']
82 | let region = url.split('/')[3]
83 | region = region.split('-')[0]
84 | if (region == 'title') {
85 | region = 'us'
86 | }
87 | resolve(region)
88 | return
89 | }
90 |
91 | reject('Error')
92 | })
93 | })
94 | }
95 |
96 | function getParams(param) {
97 | return Object.fromEntries(
98 | $argument
99 | .split("&")
100 | .map((item) => item.split("="))
101 | .map(([k, v]) => [k, decodeURIComponent(v)])
102 | );
103 | }
104 |
--------------------------------------------------------------------------------
/notability.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | QX 1.0.5+ :
4 | [rewrite_local]
5 | ^https?:\/\/notability\.com\/subscriptions url script-response-body https://raw.githubusercontent.com/ddgksf2013/Cuttlefish/master/Crack/notability.js
6 |
7 | [MITM]
8 | hostname = notability.com
9 |
10 | Surge 4.0 :
11 | [Script]
12 | notability = type=http-response,pattern=^https?:\/\/notability\.com\/subscriptions,requires-body=true,max-size=0,script-path=https://raw.githubusercontent.com/ddgksf2013/Cuttlefish/master/Crack/notability.js
13 |
14 | [MITM]
15 | hostname = notability.com
16 | */
17 |
18 |
19 | let obj = JSON.parse($response.body);
20 | obj = {
21 | "data": {
22 | "processAppleReceipt": {
23 | "__typename": "SubscriptionResult",
24 | "error": 0,
25 | "subscription": {
26 | "__typename": "AppStoreSubscription",
27 | "status": "active",
28 | "originalPurchaseDate": "2021-11-02T08:04:39.000Z",
29 | "originalTransactionId": "7",
30 | "expirationDate": "2099-09-09T09:04:39.000Z",
31 | "productId": "com.gingerlabs.Notability.premium_subscription",
32 | "tier": "premium",
33 | "refundedDate": null,
34 | "refundedReason": null,
35 | "user": null
36 | }
37 | }
38 | }
39 | };
40 | $done({body: JSON.stringify(obj)});
--------------------------------------------------------------------------------
/pikpak.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Fileball挂载pikpak
4 | 版本:2.2312
5 |
6 | [General]
7 | force-http-engine-hosts = %APPEND% pikpak.example.com:0
8 |
9 | [Script]
10 | pikpak = type=http-request,pattern=^http:\/\/pikpak\.example\.com,requires-body=1,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/pikpak.js,max-size=0,debug=0
11 |
12 | 作者:@小白脸
13 | 使用方法: pikpak 直接填账号密码
14 |
15 | Fileball挂载图标:https://raw.githubusercontent.com/githubdulong/Script/master/Images/Fileball.json
16 |
17 | */
18 |
19 |
20 | let url = $request.url;
21 | let body = $request.body;
22 | console.log(1)
23 | !(async () => {
24 | let Token = $persistentStore.read("pikpak-ck") || await signin();
25 | let req = {
26 | url:`https://api-drive.mypikpak.com/drive/v1/files?filters=%7B%22phase%22%3A%7B%22eq%22%3A%22PHASE_TYPE_COMPLETE%22%7D%2C%22trashed%22%3A%7B%22eq%22%3Afalse%7D%7D&parent_id=&thumbnail_size=SIZE_LARGE`,
27 | headers:{authorization:Token}
28 | }
29 | switch (url.match(/(auth|entry)\.cgi$/)?.[0]) {
30 | case "auth.cgi":
31 | $done({ response: { status: 200, body: '{"success":true,"data":{"sid":""}}' } });
32 | break;
33 | case "entry.cgi":
34 | if (body.match("Delete&")) {
35 | //删除文件
36 | req.url = 'https://api-drive.mypikpak.com/drive/v1/files:batchTrash';
37 | req.body = `{"ids":["${body.match(/path=([^&]+)/)[1]}"]}`
38 | $done(req)
39 | } else {
40 | //加载目录
41 | let path = body.match(/folder_path=([^&]+)/)?.[1];
42 | let a = path ? ((req.url = req.url.replace(/(parent_id=)/, `$1${path}`)), "files") : "shares";
43 |
44 |
45 | for(var items;!items;){
46 | items = await http(req,'get',1);
47 | items ? (items = items.files):
48 | (req.headers.authorization = await signin());
49 | }
50 | let shares = JSON.stringify(
51 | items.map((item) => {
52 | return {
53 | isdir: !item.file_extension,
54 | path: item.id,
55 | name: item.name,
56 | additional: { size: parseInt(item.size) },
57 | };
58 | }),
59 | );
60 |
61 | $done({
62 | response: { status: 200, body: `{"success":true,"data":{"total":0,"offset":0,"${a}":${shares}}}` },
63 | });
64 | }
65 | break;
66 | default:
67 | //加载文件
68 | let fids = url.match("fbdownload") ? hex2str(url.match(/dlink=%22(.*)%22/)[1]) : url.match(/path=(.*$)/)[1];
69 | req.url = `https://api-drive.mypikpak.com/drive/v1/files/${fids}?&thumbnail_size=SIZE_LARGE`;
70 | let link =
71 | (await http(req)).links["application\/octet-stream"].url.replace(/https/, "http");
72 | $done({
73 | response:{
74 | status: 302,
75 | headers:{ Location: link}
76 | }
77 | });
78 |
79 |
80 |
81 |
82 |
83 | }
84 | })();
85 |
86 | function http(req, method = "get", set){
87 | return new Promise((res) => {
88 | $httpClient[method](req, (err, resp, data) => {
89 | (set && err || resp?.status === 401) ?
90 | res(): res(JSON.parse(data));
91 | });
92 | });
93 | }
94 |
95 | function hex2str(hex) {
96 | var trimedStr = hex.trim();
97 | var rawStr = trimedStr.substr(0, 2).toLowerCase() === "0x" ? trimedStr.substr(2) : trimedStr;
98 | var len = rawStr.length;
99 | if (len % 2 !== 0) {
100 | return "";
101 | }
102 | var curCharCode;
103 | var resultStr = [];
104 | for (var i = 0; i < len; i = i + 2) {
105 | curCharCode = parseInt(rawStr.substr(i, 2), 16);
106 | resultStr.push(String.fromCharCode(curCharCode));
107 | }
108 | return resultStr.join("");
109 | }
110 |
111 |
112 | async function signin(){
113 | let account = $persistentStore.read("pikpak-account") || (body = decodeURIComponent(body),0);
114 | let username = account ?
115 | account.split("-")[0] :
116 | body.match(/account=([^&]+)/)[1];
117 | let password = account ?
118 | account.split("-")[1] :
119 | body.match(/passwd=([^&]+)/)[1];
120 | $persistentStore.write(`${username}-${password}`, `pikpak-account`);
121 | let token = 'Bearer '+ (await http({url:'https://user.mypikpak.com/v1/auth/signin',
122 | body:`{"client_id":"YNxT9w7GMdWvEOKa",
123 | "username":"${username}",
124 | "password":"${password}"}`
125 | },'post'))?.["access_token"];
126 | $persistentStore.write(token, `pikpak-ck`)
127 | return token
128 | }
129 |
--------------------------------------------------------------------------------
/quark.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Fileball挂载夸克网盘
4 | 版本:2.2312
5 |
6 | [General]
7 | force-http-engine-hosts = %APPEND% quark.example.com:0
8 |
9 | [Script]
10 | 夸克网盘 = type=http-request,pattern=^http:\/\/quark\.example\.com,requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/quark.js,debug=0
11 |
12 | 作者:@小白脸
13 | 使用方法:
14 | 夸克登录网页版抓包,路径https://drive.quark.cn/1/clouddrive/file
15 |
16 | Fileball挂载图标:https://raw.githubusercontent.com/githubdulong/Script/master/Images/Fileball.json
17 |
18 | */
19 |
20 |
21 | let url = $request.url;
22 | let body = $request.body;
23 |
24 | let ck =
25 | $persistentStore.read("quark-ck") ||
26 | ((ck) => {
27 | $persistentStore.write(ck, "quark-ck");
28 | return ck;
29 | })(decodeURIComponent(body.match(/passwd=([^&]+)/)[1]));
30 |
31 | let req = {
32 | url: "https://drive.quark.cn/1/clouddrive/file/sort?_fetch_total=1&_page=1&_size=100&fr=pc&pdir_fid=0&pr=ucpro",
33 | headers: { cookie: ck, "content-type": "application/json" },
34 | };
35 |
36 | !(async () => {
37 | switch (url.match(/(auth|entry)\.cgi$/)?.[0]) {
38 | case "auth.cgi":
39 | $done({ response: { status: 200, body: '{"success":true,"data":{"sid":""}}' } });
40 | break;
41 | case "entry.cgi":
42 | if (body.match("Delete&")) {
43 | //删除文件
44 | req.url = "https://drive.quark.cn/1/clouddrive/file/delete?fr=pc&pr=ucpro";
45 | req.body = `{"action_type":1,"exclude_fids":[],"filelist":["${body.match(/path=([^&]+)/)[1]}"]}`;
46 | $done(req);
47 | } else {
48 | //加载目录
49 | let path = body.match(/folder_path=([^&]+)/)?.[1];
50 | let a = path ? ((req.url = req.url.replace(/pdir_fid=0/, `pdir_fid=${path}`)), "files") : "shares";
51 | let items = (await http(req, "get", 1)).data.list;
52 | let shares = JSON.stringify(
53 | items.map((item) => {
54 | return {
55 | isdir: !item.file,
56 | path: item.fid,
57 | name: item.file_name,
58 | additional: { size: item.size },
59 | };
60 | }),
61 | );
62 | $done({
63 | response: { status: 200, body: `{"success":true,"data":{"total":0,"offset":0,"${a}":${shares}}}` },
64 | });
65 | }
66 | break;
67 | default:
68 | //加载文件
69 | let fids = url.match("fbdownload") ? hex2str(url.match(/dlink=%22(.*)%22/)[1]) : url.match(/path=(.*$)/)[1];
70 | req.url = "http://drive.quark.cn/1/clouddrive/file/download?fr=pc&pr=ucpro";
71 | req.body = `{"fids":["${fids}"]}`;
72 | let link = (await http(req, "post")).data[0].download_url.replace(/https/, "http");
73 | $request.url = link;
74 | $request.headers.cookie = ck;
75 | delete $request.headers.Host;
76 | $done($request);
77 |
78 | }
79 | })();
80 |
81 | function http(req, method = "get", set) {
82 | return new Promise((res) => {
83 | $httpClient[method](req, (err, resp, data) => {
84 | //刷新ck
85 | set &&
86 | ((set = resp.headers?.["Set-Cookie"]?.split(";")[0]), set) &&
87 | $persistentStore.write(ck.replace(/[^;]+/, set), "quark-ck");
88 | res(JSON.parse(data));
89 | });
90 | });
91 | }
92 |
93 | function hex2str(hex) {
94 | var trimedStr = hex.trim();
95 | var rawStr = trimedStr.substr(0, 2).toLowerCase() === "0x" ? trimedStr.substr(2) : trimedStr;
96 | var len = rawStr.length;
97 | if (len % 2 !== 0) {
98 | return "";
99 | }
100 | var curCharCode;
101 | var resultStr = [];
102 | for (var i = 0; i < len; i = i + 2) {
103 | curCharCode = parseInt(rawStr.substr(i, 2), 16);
104 | resultStr.push(String.fromCharCode(curCharCode));
105 | }
106 | return resultStr.join("");
107 | }
108 |
--------------------------------------------------------------------------------
/raycast_pro_patch.js:
--------------------------------------------------------------------------------
1 | /*
2 | ------------------------------------------
3 | # Raycast 解锁
4 | # 测试版本:1.0.2
5 | # 更新日期:2025.05.04 13:33
6 |
7 | # 登录账户后先试用订阅(选择高级版本试用,记得试用后立马取消订阅)
8 |
9 | 注意事项:
10 | # 如果选择试用普通版 pro 订阅就只会解锁 Pro 订阅,需另行搭配通杀脚本解锁 Ai 模型订阅。如果选择试用高级版订阅(包含 Ai 模型)就会解锁高级版本订阅。
11 | # 解锁账户订阅,如果更换账户将失去订阅。
12 | # 该脚本仅供调试使用,请于24小时内删除,切勿传播。
13 | ------------------------------------------
14 | [Script]
15 | Raycast_pro = type=http-response,pattern=^https:\/\/backend\.raycast\.com\/api\/v1\/(me|ai\/models|me\/sync.*)$,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/raycast_pro_patch.js
16 |
17 | [MITM]
18 | hostname = %APPEND% backend.raycast.com
19 | */
20 |
21 | console.log("[Raycast] Script started for URL: " + $request.url);
22 |
23 | try {
24 | let body = $response.body;
25 | if (!body) {
26 | console.log("[Raycast] No response body for URL: " + $request.url);
27 | $done({});
28 | } else {
29 | console.log("[Raycast] Original body: " + body);
30 | let obj = JSON.parse(body);
31 |
32 | let modified = false;
33 | function replacePeriodEnd(data) {
34 | if (typeof data !== "object" || data === null) return;
35 | for (let key in data) {
36 | if (key === "current_period_end") {
37 | data[key] = 4102444800;
38 | modified = true;
39 | console.log("[Raycast] Set current_period_end to 4102444800 for key: " + key);
40 | } else if (typeof data[key] === "object") {
41 | replacePeriodEnd(data[key]);
42 | }
43 | }
44 | }
45 |
46 | if ($request.url.includes("/api/v1/me") && !$request.url.includes("/sync")) {
47 | console.log("[Raycast] Processing /api/v1/me");
48 | if (obj.mobile_subscription && "current_period_end" in obj.mobile_subscription) {
49 | obj.mobile_subscription.current_period_end = 4102444800;
50 | modified = true;
51 | console.log("[Raycast] Set mobile_subscription.current_period_end to 4102444800 in /api/v1/me");
52 | } else {
53 | console.log("[Raycast] mobile_subscription or current_period_end not found in /api/v1/me");
54 | }
55 | }
56 |
57 |
58 | if ($request.url.includes("/api/v1/ai/models") || $request.url.includes("/api/v1/me/sync")) {
59 | console.log("[Raycast] Processing " + ($request.url.includes("/ai/models") ? "/api/v1/ai/models" : "/api/v1/me/sync"));
60 | replacePeriodEnd(obj);
61 | if (!modified) {
62 | console.log("[Raycast] No current_period_end found in " + ($request.url.includes("/ai/models") ? "/api/v1/ai/models" : "/api/v1/me/sync"));
63 | }
64 | }
65 |
66 | body = JSON.stringify(obj);
67 | console.log("[Raycast] Modified body: " + body);
68 | $done({ body });
69 | }
70 | } catch (e) {
71 | console.log("[Raycast] Error: " + e.message);
72 | $done({ body: $response.body });
73 | }
--------------------------------------------------------------------------------
/revenuecat.js:
--------------------------------------------------------------------------------
1 | re('"expires_date":"\\w{4}@"period_type":"\\w+"','"expires_date":"2100@"period_type":"active"');
2 | function re() {
3 | var body = $response.body;
4 | if(!body){
5 | $done({});
6 | }
7 | if (arguments[0].includes("@")) {
8 | var regs = arguments[0].split("@");
9 | var strs = arguments[1].split("@");
10 | for (i = 0;i < regs.length;i++) {
11 | var reg = new RegExp(regs[i],"g");
12 | body = body.replace(reg, strs[i]);
13 | }
14 | }
15 | else {
16 | var reg = new RegExp(arguments[0],"g");
17 | body = body.replace(reg, arguments[1]);
18 | }
19 | $done({body});
20 | }
21 |
--------------------------------------------------------------------------------
/sub_info.js:
--------------------------------------------------------------------------------
1 | /*
2 | Surge配置参考注释,修改自@mieqq
3 |
4 | 示例↓↓↓
5 | ----------------------------------------
6 |
7 | [Proxy Group]
8 | 机场1 = select, policy-path=http://sub.info?url=xxx&reset_day=10&alert=1&title=Nexitally
9 |
10 | 机场2 = select, policy-path=http://sub.info?url=xxx&reset_day=1&alert=1&title=DlerCloud
11 |
12 | [Script]
13 | 机场信息 = type=http-request,pattern=http://sub\.info,script-path=https://raw.githubusercontent.com/githubdulong/Script/master/sub_info.js
14 |
15 | -----------------------------------------
16 |
17 | 先将带有流量信息的订阅链接encode,用encode后的链接替换"url="后面的xxx(可用这个网站转义https://www.urlencoder.org)
18 |
19 | 可选参数 &reset_day,后面的数字替换成流量每月重置的日期,如1号就写1,8号就写8。如"&reset_day=8",不加该参数不显示流量重置信息。
20 |
21 | 可选参数 &expire,机场链接不带expire信息的,可以手动传入expire参数,如"&expire=2022-02-01"
22 |
23 | 可选参数 &alert,流量用量超过80%,流量重置2天前、流量重置、套餐到期10天前,这四种情况会发送通知,参数"title=xxx" 可以自定义通知的标题。如"&alert=1&title=DlerCloud"
24 | -----------------------------------------
25 | */
26 |
27 | (async () => {
28 | let params = getUrlParams($request.url);
29 |
30 | let usage = await getDataUsage(params.url);
31 | let used = bytesToSize(usage.download + usage.upload);
32 | let total = bytesToSize(usage.total);
33 |
34 | let expire = usage.expire || params.expire;
35 | let resetDay = parseInt(params["due_day"] || params["reset_day"]);
36 | let resetLeft = getRmainingDays(resetDay);
37 |
38 | let localProxy = "=http, localhost, 6152";
39 | let infoList = [`${used} | ${total}`];
40 |
41 | if (resetLeft) {
42 | infoList.push(`流量重置: 剩余${resetLeft}天`);
43 | }
44 | if (expire) {
45 | if (/^[\d]+$/.test(expire)) expire *= 1000;
46 | infoList.push(`到期时间: ${formatTime(expire)}`);
47 | }
48 | sendNotification(usage, resetLeft, expire, params, infoList);
49 | let body = infoList.map(item => item + localProxy).join("\n");
50 | $done({response: {body}});
51 | })();
52 |
53 | function getUrlParams(url) {
54 | return Object.fromEntries(
55 | url.slice(url.indexOf('?') + 1).split('&')
56 | .map(item => item.split("="))
57 | .map(([k, v]) => [k, decodeURIComponent(v)])
58 | );
59 | }
60 |
61 | function getUserInfo(url) {
62 | let headers = {"User-Agent": "Quantumult X"}
63 | let request = {headers, url}
64 | return new Promise(resolve =>
65 | $httpClient.head(request, (err, resp) =>
66 | resolve(resp.headers["subscription-userinfo"] || resp.headers["Subscription-userinfo"] || resp.headers["Subscription-Userinfo"])
67 | )
68 | );
69 | }
70 |
71 | async function getDataUsage(url) {
72 | let info = await getUserInfo(url);
73 | if (!info) {
74 | $notification.post("SubInfo","","链接响应头不带流量信息")
75 | $done();
76 | }
77 | return Object.fromEntries(
78 | info.match(/\w+=\d+/g).map(item => item.split("="))
79 | .map(([k, v]) => [k,parseInt(v)])
80 | );
81 | }
82 |
83 | function getRmainingDays(resetDay) {
84 | if (!resetDay) return 0;
85 | let now = new Date();
86 | let today = now.getDate();
87 | let month = now.getMonth() + 1;
88 | let year = now.getFullYear();
89 | let daysInMonth = new Date(year, month, 0).getDate();
90 | if (resetDay > today) daysInMonth = 0;
91 |
92 | return daysInMonth - today + resetDay;
93 | }
94 |
95 | function bytesToSize(bytes) {
96 | if (bytes === 0) return '0B';
97 | let k = 1024;
98 | sizes = ['B','KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
99 | let i = Math.floor(Math.log(bytes) / Math.log(k));
100 | return (bytes / Math.pow(k, i)).toFixed(2) + " " + sizes[i];
101 | }
102 |
103 | function formatTime( time ) {
104 | let dateObj = new Date( time );
105 | let year = dateObj.getFullYear();
106 | let month = dateObj.getMonth() + 1;
107 | let day = dateObj.getDate();
108 | return year +"年"+ month +"月" + day + "日";
109 | }
110 |
111 | function sendNotification(usage, resetLeft, expire, params, infoList) {
112 | if (!params.alert) return;
113 |
114 | let today = new Date().getDate();
115 | //通知计数器,每天重置
116 | let notifyCounter = JSON.parse($persistentStore.read("SubInfo") || '{}')
117 | if (!notifyCounter[today]) {
118 | notifyCounter = {[today]: {"used": 0,"resetLeft": 0,"expire": 0,}}
119 | }
120 |
121 | let count = notifyCounter[today];
122 |
123 | let title = params.title || "Sub Info";
124 | let subtitle = infoList[0];
125 | let body = infoList.slice(1).join("\n");
126 | let used = usage.download + usage.upload;
127 | let resetDay = params["due_day"] || params["reset_day"];
128 |
129 | if (used/usage.total > 0.8 && count.used < 1) {
130 | $notification.post(`${title} | 剩余流量不足${parseInt((1-used/usage.total)*100)}%`,subtitle, body);
131 | count.used += 1;
132 | }
133 | if (resetLeft && count.resetLeft < 1) {
134 | if (resetLeft < 2) {
135 | $notification.post(`${title} | 流量将在${resetLeft}天后重置`, subtitle, body);
136 | count.resetLeft += 1;
137 | } else if (today == resetDay) {
138 | $notification.post(`${title} | 流量已重置`, subtitle, body);
139 | count.resetLeft += 1;
140 | }
141 | }
142 | if (expire && count.expire < 10) {
143 | let diff = (new Date(expire) - new Date()) / (1000*3600*24);
144 | if (diff < 10) {
145 | $notification.post(`${title} | 机场剩余时间不足${Math.ceil(diff)}天`, subtitle, body);
146 | count.expire += 1;
147 | }
148 | }
149 | $persistentStore.write(JSON.stringify(notifyCounter),"SubInfo");
150 | }
--------------------------------------------------------------------------------
/sub_info_panel.js:
--------------------------------------------------------------------------------
1 | /*
2 | Surge配置参考注释,感谢@congcong.
3 |
4 | 示例↓↓↓
5 | ----------------------------------------
6 |
7 | [Script]
8 | Sub_info = type=generic,timeout=10,script-path=https://raw.githubusercontent.com/mieqq/mieqq/master/sub_info_panel.js,script-update-interval=0,argument=url=[URL encode 后的机场节点链接]&reset_day=1&title=AmyInfo&icon=bonjour&color=#007aff
9 |
10 | [Panel]
11 | Sub_info = script-name=Sub_info,update-interval=600
12 |
13 | ----------------------------------------
14 |
15 | 先将带有流量信息的节点订阅链接encode,用encode后的链接替换"url="后面的[机场节点链接]
16 |
17 | (实在不会可以用这个捷径生成panel和脚本,https://www.icloud.com/shortcuts/3f24df391d594a73abd04ebdccd92584)
18 |
19 | 可选参数 &reset_day,后面的数字替换成流量每月重置的日期,如1号就写1,8号就写8。如"&reset_day=8",不加该参数不显示流量重置信息。
20 |
21 | 可选参数 &expire,机场链接不带expire信息的,可以手动传入expire参数,如"&expire=2022-02-01",注意一定要按照yyyy-MM-dd的格式。不希望显示到期信息也可以添加&expire=false取消显示。
22 |
23 | 可选参数"title=xxx" 可以自定义标题。
24 |
25 | 可选参数"icon=xxx" 可以自定义图标,内容为任意有效的 SF Symbol Name,如 bolt.horizontal.circle.fill,详细可以下载app https://apps.apple.com/cn/app/sf-symbols-browser/id1491161336
26 |
27 | 可选参数"color=xxx" 当使用 icon 字段时,可传入 color 字段控制图标颜色,字段内容为颜色的 HEX 编码。如:color=#007aff
28 | ----------------------------------------
29 | */
30 |
31 | let args = getArgs();
32 |
33 | (async () => {
34 | let info = await getDataInfo(args.url);
35 | if (!info) $done();
36 |
37 | let used = info.download + info.upload;
38 | let total = info.total;
39 | let expire = args.expire || info.expire;
40 |
41 | let content = [`用量:${bytesToSize(used)} | ${bytesToSize(total)}`];
42 |
43 | if (expire && expire !== "false") {
44 | if (/^[\d.]+$/.test(expire)) expire *= 1000;
45 | }
46 |
47 | if (args["reset_day"] && parseInt(args["reset_day"]) > 0) {
48 | let resetDayLeft = getRemainingDays(parseInt(args["reset_day"]));
49 | content.push(`到期:${resetDayLeft}天 | ${formatTime(expire)}`);
50 | } else {
51 | content.push(`到期:${formatTime(expire)}`);
52 | }
53 |
54 | let now = new Date();
55 | let hour = now.getHours();
56 | let minutes = now.getMinutes();
57 | hour = hour > 9 ? hour : "0" + hour;
58 | minutes = minutes > 9 ? minutes : "0" + minutes;
59 |
60 | $done({
61 | title: `${args.title} | ${hour}:${minutes}`,
62 | content: content.join("\n"),
63 | icon: args.icon || "airplane.circle",
64 | "icon-color": args.color || "#007aff",
65 | });
66 | })();
67 |
68 | function getArgs() {
69 | return Object.fromEntries(
70 | $argument
71 | .split("&")
72 | .map((item) => item.split("="))
73 | .map(([k, v]) => [k, decodeURIComponent(v)])
74 | );
75 | }
76 |
77 | function getUserInfo(url) {
78 | let method = args.method || "head";
79 | let request = { headers: { "User-Agent": "Quantumult%20X" }, url };
80 | return new Promise((resolve, reject) =>
81 | $httpClient[method](request, (err, resp) => {
82 | if (err != null) {
83 | reject(err);
84 | return;
85 | }
86 | if (resp.status !== 200) {
87 | reject(resp.status);
88 | return;
89 | }
90 | let header = Object.keys(resp.headers).find(key => key.toLowerCase() === "subscription-userinfo");
91 | if (header) {
92 | resolve(resp.headers[header]);
93 | return;
94 | }
95 | reject("链接响应头不带有流量信息");
96 | })
97 | );
98 | }
99 |
100 | async function getDataInfo(url) {
101 | const [err, data] = await getUserInfo(url)
102 | .then(data => [null, data])
103 | .catch(err => [err, null]);
104 | if (err) {
105 | console.log(err);
106 | return;
107 | }
108 |
109 | return Object.fromEntries(
110 | data
111 | .match(/\w+=[\d.eE+-]+/g)
112 | .map(item => item.split("="))
113 | .map(([k, v]) => [k, Number(v)])
114 | );
115 | }
116 |
117 | function getRemainingDays(resetDay) {
118 | if (!resetDay) return 0;
119 |
120 | let now = new Date();
121 | let today = now.getDate();
122 | let month = now.getMonth();
123 | let year = now.getFullYear();
124 | let daysInMonth = new Date(year, month + 1, 0).getDate();
125 |
126 | if (resetDay >= today) {
127 | return resetDay - today;
128 | } else {
129 | return daysInMonth - today + resetDay;
130 | }
131 | }
132 |
133 | function bytesToSize(bytes) {
134 | if (bytes === 0) return "0B";
135 | let k = 1024;
136 | let sizes = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
137 | let i = Math.floor(Math.log(bytes) / Math.log(k));
138 | return (bytes / Math.pow(k, i)).toFixed(2) + " " + sizes[i];
139 | }
140 |
141 | function formatTime(time) {
142 | let dateObj = new Date(time);
143 | let year = dateObj.getFullYear();
144 | let month = dateObj.getMonth() + 1;
145 | let day = dateObj.getDate();
146 | return year + "年" + month + "月" + day + "日";
147 | }
--------------------------------------------------------------------------------
/surgepro_flushdns.js:
--------------------------------------------------------------------------------
1 | let params = getParams($argument)
2 |
3 | !(async () => {
4 | /* 时间获取 */
5 | let traffic = (await httpAPI("/v1/traffic","GET"))
6 | let dateNow = new Date()
7 | let dateTime = Math.floor(traffic.startTime*1000)
8 | let startTime = timeTransform(dateNow,dateTime)
9 | let title = params.title
10 |
11 |
12 | if ($trigger == "button") await httpAPI("/v1/dns/flush");
13 |
14 | $done({
15 | title:title,
16 | content:`开启时长: ${startTime}`,
17 | icon: params.icon,
18 | "icon-color":params.color
19 | });
20 |
21 | })();
22 |
23 | function timeTransform(dateNow,dateTime) {
24 | let dateDiff = dateNow - dateTime;
25 | let days = Math.floor(dateDiff / (24 * 3600 * 1000));//计算出相差天数
26 | let leave1=dateDiff%(24*3600*1000) //计算天数后剩余的毫秒数
27 | let hours=Math.floor(leave1/(3600*1000))//计算出小时数
28 | //计算相差分钟数
29 | let leave2=leave1%(3600*1000) //计算小时数后剩余的毫秒数
30 | let minutes=Math.floor(leave2/(60*1000))//计算相差分钟数
31 | //计算相差秒数
32 | let leave3=leave2%(60*1000) //计算分钟数后剩余的毫秒数
33 | let seconds=Math.round(leave3/1000)
34 |
35 | if(days==0){
36 |
37 | if(hours==0){
38 | if(minutes==0)return(`${seconds}秒`);
39 | return(`${minutes}分${seconds}秒`)
40 | }
41 | return(`${hours}时${minutes}分${seconds}秒`)
42 | }else {
43 | return(`${days}天${hours}时${minutes}分`)
44 | }
45 |
46 | }
47 |
48 |
49 | function httpAPI(path = "", method = "POST", body = null) {
50 | return new Promise((resolve) => {
51 | $httpAPI(method, path, body, (result) => {
52 | resolve(result);
53 | });
54 | });
55 | }
56 |
57 | function getParams(param) {
58 | return Object.fromEntries(
59 | $argument
60 | .split("&")
61 | .map((item) => item.split("="))
62 | .map(([k, v]) => [k, decodeURIComponent(v)])
63 | );
64 | }
65 |
--------------------------------------------------------------------------------
/warp++.js:
--------------------------------------------------------------------------------
1 | /*
2 | @author: langkhach
3 | @QX, Surge, Loon, Scriptable,
4 | @file: warp++.js
5 | @createTime: 210312
6 | */
7 | const $ = API("WARP++", true);
8 | const manualreferrer = "f24149f8-5e7e-45fe-863d-9f2a63226ff8";
9 | const autoreferrer = $.read("#referrer");
10 |
11 | if (autoreferrer != null) {
12 | var referrer = autoreferrer;
13 | $.info(`Auto Referrer: ${referrer}`);
14 | } else {
15 | var referrer = manualreferrer;
16 | $.info(`Manual Referrer: ${referrer}`);
17 | }
18 |
19 | const url = `https://api.cloudflareclient.com/v0a${gendigit(3)}/reg`;
20 | const body = JSON.stringify({
21 | key: `${genstr(43)}=`,
22 | install_id: `${genstr(22)}`,
23 | fcm_token: `${genstr(22)}:APA91b${genstr(134)}`,
24 | referrer: `${referrer}`,
25 | warp_enabled: false,
26 | tos: new Date().toISOString().replace("Z", "+07:00"),
27 | type: "Android",
28 | locale: "zh_CN"
29 | });
30 | const headers = {
31 | "Content-Type": "application/json; charset=UTF-8",
32 | Host: "api.cloudflareclient.com",
33 | Connection: "Keep-Alive",
34 | "Accept-Encoding": "gzip",
35 | "User-Agent": "okhttp/3.12.1"
36 | };
37 | const request = {
38 | url: url,
39 | headers: headers,
40 | body: body
41 | };
42 |
43 | $.http.post(request).then(resp => {
44 | if(resp.statusCode == 200){
45 | $.log(`🟢成功`);
46 | }else{
47 | $.error(`🔴互联网请求太多`);
48 | }
49 | $.done();
50 | })
51 |
52 | function genstr(r){for(var t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",a=n.length,o=0;ou[l.toLowerCase()]=(u=>(function(u,l){l="string"==typeof l?{url:l}:l;const h=e.baseURL;h&&!r.test(l.url||"")&&(l.url=h?h+l.url:l.url);const a=(l={...e,...l}).timeout,c={onRequest:()=>{},onResponse:e=>e,onTimeout:()=>{},...l.events};let f,d;if(c.onRequest(u,l),t)f=$task.fetch({method:u,...l});else if(s||i||o)f=new Promise((e,t)=>{(o?require("request"):$httpClient)[u.toLowerCase()](l,(s,i,n)=>{s?t(s):e({statusCode:i.status||i.statusCode,headers:i.headers,body:n})})});else if(n){const e=new Request(l.url);e.method=u,e.headers=l.headers,e.body=l.body,f=new Promise((t,s)=>{e.loadString().then(s=>{t({statusCode:e.response.statusCode,headers:e.response.headers,body:s})}).catch(e=>s(e))})}const p=a?new Promise((e,t)=>{d=setTimeout(()=>(c.onTimeout(),t(`${u} URL: ${l.url} exceeds the timeout ${a} ms`)),a)}):null;return(p?Promise.race([p,f]).then(e=>(clearTimeout(d),e)):f).then(e=>c.onResponse(e))})(l,u))),u}function API(e="untitled",t=!1){const{isQX:s,isLoon:i,isSurge:n,isNode:o,isJSBox:r,isScriptable:u}=ENV();return new class{constructor(e,t){this.name=e,this.debug=t,this.http=HTTP(),this.env=ENV(),this.node=(()=>{if(o){return{fs:require("fs")}}return null})(),this.initCache();Promise.prototype.delay=function(e){return this.then(function(t){return((e,t)=>new Promise(function(s){setTimeout(s.bind(null,t),e)}))(e,t)})}}initCache(){if(s&&(this.cache=JSON.parse($prefs.valueForKey(this.name)||"{}")),(i||n)&&(this.cache=JSON.parse($persistentStore.read(this.name)||"{}")),o){let e="root.json";this.node.fs.existsSync(e)||this.node.fs.writeFileSync(e,JSON.stringify({}),{flag:"wx"},e=>console.log(e)),this.root={},e=`${this.name}.json`,this.node.fs.existsSync(e)?this.cache=JSON.parse(this.node.fs.readFileSync(`${this.name}.json`)):(this.node.fs.writeFileSync(e,JSON.stringify({}),{flag:"wx"},e=>console.log(e)),this.cache={})}}persistCache(){const e=JSON.stringify(this.cache,null,2);s&&$prefs.setValueForKey(e,this.name),(i||n)&&$persistentStore.write(e,this.name),o&&(this.node.fs.writeFileSync(`${this.name}.json`,e,{flag:"w"},e=>console.log(e)),this.node.fs.writeFileSync("root.json",JSON.stringify(this.root,null,2),{flag:"w"},e=>console.log(e)))}write(e,t){if(this.log(`SET ${t}`),-1!==t.indexOf("#")){if(t=t.substr(1),n||i)return $persistentStore.write(e,t);if(s)return $prefs.setValueForKey(e,t);o&&(this.root[t]=e)}else this.cache[t]=e;this.persistCache()}read(e){return this.log(`READ ${e}`),-1===e.indexOf("#")?this.cache[e]:(e=e.substr(1),n||i?$persistentStore.read(e):s?$prefs.valueForKey(e):o?this.root[e]:void 0)}delete(e){if(this.log(`DELETE ${e}`),-1!==e.indexOf("#")){if(e=e.substr(1),n||i)return $persistentStore.write(null,e);if(s)return $prefs.removeValueForKey(e);o&&delete this.root[e]}else delete this.cache[e];this.persistCache()}notify(e,t="",l="",h={}){const a=h["open-url"],c=h["media-url"];if(s&&$notify(e,t,l,h),n&&$notification.post(e,t,l+`${c?"\nmultimedia :"+c:""}`,{url:a}),i){let s={};a&&(s.openUrl=a),c&&(s.mediaUrl=c),"{}"===JSON.stringify(s)?$notification.post(e,t,l):$notification.post(e,t,l,s)}if(o||u){const s=l+(a?`\nClick to jump : ${a}`:"")+(c?`\nmultimedia : ${c}`:"");if(r){require("push").schedule({title:e,body:(t?t+"\n":"")+s})}else console.log(`${e}\n${t}\n${s}\n\n`)}}log(e){this.debug&&console.log(`[${this.name}] LOG: ${this.stringify(e)}`)}info(e){console.log(`[${this.name}] INFO: ${this.stringify(e)}`)}error(e){console.log(`[${this.name}] ERROR: ${this.stringify(e)}`)}wait(e){return new Promise(t=>setTimeout(t,e))}done(e={}){s||i||n?$done(e):o&&!r&&"undefined"!=typeof $context&&($context.headers=e.headers,$context.statusCode=e.statusCode,$context.body=e.body)}stringify(e){if("string"==typeof e||e instanceof String)return e;try{return JSON.stringify(e,null,2)}catch(e){return"[object Object]"}}}(e,t)}
--------------------------------------------------------------------------------
/warp++referrer.js:
--------------------------------------------------------------------------------
1 | /*
2 | @author: langkhach
3 | @file: warp++referrerkey.js
4 | @createTime: 210312
5 | */
6 | const $ = API("WARP++", true);
7 |
8 | let url = $request.url;
9 | var referrer = url.match(/[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/);
10 | if(referrer != null){
11 | $.write(referrer.toString(), "#referrer");
12 | //$.notify(`保存推荐人 Surge Store:`, `#推荐人: ${referrer}`,``);
13 | }
14 | $.done();
15 |
16 | function ENV(){const e="undefined"!=typeof $task,t="undefined"!=typeof $loon,s="undefined"!=typeof $httpClient&&!t,i="function"==typeof require&&"undefined"!=typeof $jsbox;return{isQX:e,isLoon:t,isSurge:s,isNode:"function"==typeof require&&!i,isJSBox:i,isRequest:"undefined"!=typeof $request,isScriptable:"undefined"!=typeof importModule}}function HTTP(e={baseURL:""}){const{isQX:t,isLoon:s,isSurge:i,isScriptable:n,isNode:o}=ENV(),r=/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&\/\/=]*)/;const u={};return["GET","POST","PUT","DELETE","HEAD","OPTIONS","PATCH"].forEach(l=>u[l.toLowerCase()]=(u=>(function(u,l){l="string"==typeof l?{url:l}:l;const h=e.baseURL;h&&!r.test(l.url||"")&&(l.url=h?h+l.url:l.url);const a=(l={...e,...l}).timeout,c={onRequest:()=>{},onResponse:e=>e,onTimeout:()=>{},...l.events};let f,d;if(c.onRequest(u,l),t)f=$task.fetch({method:u,...l});else if(s||i||o)f=new Promise((e,t)=>{(o?require("request"):$httpClient)[u.toLowerCase()](l,(s,i,n)=>{s?t(s):e({statusCode:i.status||i.statusCode,headers:i.headers,body:n})})});else if(n){const e=new Request(l.url);e.method=u,e.headers=l.headers,e.body=l.body,f=new Promise((t,s)=>{e.loadString().then(s=>{t({statusCode:e.response.statusCode,headers:e.response.headers,body:s})}).catch(e=>s(e))})}const p=a?new Promise((e,t)=>{d=setTimeout(()=>(c.onTimeout(),t(`${u} URL: ${l.url} exceeds the timeout ${a} ms`)),a)}):null;return(p?Promise.race([p,f]).then(e=>(clearTimeout(d),e)):f).then(e=>c.onResponse(e))})(l,u))),u}function API(e="untitled",t=!1){const{isQX:s,isLoon:i,isSurge:n,isNode:o,isJSBox:r,isScriptable:u}=ENV();return new class{constructor(e,t){this.name=e,this.debug=t,this.http=HTTP(),this.env=ENV(),this.node=(()=>{if(o){return{fs:require("fs")}}return null})(),this.initCache();Promise.prototype.delay=function(e){return this.then(function(t){return((e,t)=>new Promise(function(s){setTimeout(s.bind(null,t),e)}))(e,t)})}}initCache(){if(s&&(this.cache=JSON.parse($prefs.valueForKey(this.name)||"{}")),(i||n)&&(this.cache=JSON.parse($persistentStore.read(this.name)||"{}")),o){let e="root.json";this.node.fs.existsSync(e)||this.node.fs.writeFileSync(e,JSON.stringify({}),{flag:"wx"},e=>console.log(e)),this.root={},e=`${this.name}.json`,this.node.fs.existsSync(e)?this.cache=JSON.parse(this.node.fs.readFileSync(`${this.name}.json`)):(this.node.fs.writeFileSync(e,JSON.stringify({}),{flag:"wx"},e=>console.log(e)),this.cache={})}}persistCache(){const e=JSON.stringify(this.cache,null,2);s&&$prefs.setValueForKey(e,this.name),(i||n)&&$persistentStore.write(e,this.name),o&&(this.node.fs.writeFileSync(`${this.name}.json`,e,{flag:"w"},e=>console.log(e)),this.node.fs.writeFileSync("root.json",JSON.stringify(this.root,null,2),{flag:"w"},e=>console.log(e)))}write(e,t){if(this.log(`SET ${t}`),-1!==t.indexOf("#")){if(t=t.substr(1),n||i)return $persistentStore.write(e,t);if(s)return $prefs.setValueForKey(e,t);o&&(this.root[t]=e)}else this.cache[t]=e;this.persistCache()}read(e){return this.log(`READ ${e}`),-1===e.indexOf("#")?this.cache[e]:(e=e.substr(1),n||i?$persistentStore.read(e):s?$prefs.valueForKey(e):o?this.root[e]:void 0)}delete(e){if(this.log(`DELETE ${e}`),-1!==e.indexOf("#")){if(e=e.substr(1),n||i)return $persistentStore.write(null,e);if(s)return $prefs.removeValueForKey(e);o&&delete this.root[e]}else delete this.cache[e];this.persistCache()}notify(e,t="",l="",h={}){const a=h["open-url"],c=h["media-url"];if(s&&$notify(e,t,l,h),n&&$notification.post(e,t,l+`${c?"\nmultimedia :"+c:""}`,{url:a}),i){let s={};a&&(s.openUrl=a),c&&(s.mediaUrl=c),"{}"===JSON.stringify(s)?$notification.post(e,t,l):$notification.post(e,t,l,s)}if(o||u){const s=l+(a?`\nClick to jump : ${a}`:"")+(c?`\nmultimedia : ${c}`:"");if(r){require("push").schedule({title:e,body:(t?t+"\n":"")+s})}else console.log(`${e}\n${t}\n${s}\n\n`)}}log(e){this.debug&&console.log(`[${this.name}] LOG: ${this.stringify(e)}`)}info(e){console.log(`[${this.name}] INFO: ${this.stringify(e)}`)}error(e){console.log(`[${this.name}] ERROR: ${this.stringify(e)}`)}wait(e){return new Promise(t=>setTimeout(t,e))}done(e={}){s||i||n?$done(e):o&&!r&&"undefined"!=typeof $context&&($context.headers=e.headers,$context.statusCode=e.statusCode,$context.body=e.body)}stringify(e){if("string"==typeof e||e instanceof String)return e;try{return JSON.stringify(e,null,2)}catch(e){return"[object Object]"}}}(e,t)}
--------------------------------------------------------------------------------
/youtube_ad.js:
--------------------------------------------------------------------------------
1 | $done({response: { status: 408 } });
--------------------------------------------------------------------------------
/ytb-ui-check.js:
--------------------------------------------------------------------------------
1 | /***
2 |
3 | Thanks to & modified from https://gist.githubusercontent.com/Hyseen/b06e911a41036ebc36acf04ddebe7b9a/raw/nf_check.js
4 |
5 | For Quantumult-X 598+
6 |
7 | [task_local]
8 |
9 | event-interaction https://raw.githubusercontent.com/githubdulong/Script/master/ytb-ui-check.js, tag=油管查询, img-url=https://raw.githubusercontent.com/anker1209/icon/main/YouTube.png, enabled=true
10 |
11 | @XIAO_KOP
12 |
13 | **/
14 |
15 |
16 | const BASE_URL = 'https://www.youtube.com/premium'
17 |
18 | const FILM_ID = 81215567
19 | const link = { "media-url": "https://raw.githubusercontent.com/KOP-XIAO/QuantumultX/master/img/southpark/7.png" }
20 |
21 | const arrow = "➟"
22 | var output = ""
23 | var opts = {
24 | policy: $environment.params
25 | };
26 |
27 |
28 | var flags = new Map([[ "AC" , "🇦🇨" ] , [ "AF" , "🇦🇫" ] , [ "AI" , "🇦🇮" ] , [ "AL" , "🇦🇱" ] , [ "AM" , "🇦🇲" ] , [ "AQ" , "🇦🇶" ] , [ "AR" , "🇦🇷" ] , [ "AS" , "🇦🇸" ] , [ "AT" , "🇦🇹" ] , [ "AU" , "🇦🇺" ] , [ "AW" , "🇦🇼" ] , [ "AX" , "🇦🇽" ] , [ "AZ" , "🇦🇿" ] , [ "BB" , "🇧🇧" ] , [ "BD" , "🇧🇩" ] , [ "BE" , "🇧🇪" ] , [ "BF" , "🇧🇫" ] , [ "BG" , "🇧🇬" ] , [ "BH" , "🇧🇭" ] , [ "BI" , "🇧🇮" ] , [ "BJ" , "🇧🇯" ] , [ "BM" , "🇧🇲" ] , [ "BN" , "🇧🇳" ] , [ "BO" , "🇧🇴" ] , [ "BR" , "🇧🇷" ] , [ "BS" , "🇧🇸" ] , [ "BT" , "🇧🇹" ] , [ "BV" , "🇧🇻" ] , [ "BW" , "🇧🇼" ] , [ "BY" , "🇧🇾" ] , [ "BZ" , "🇧🇿" ] , [ "CA" , "🇨🇦" ] , [ "CF" , "🇨🇫" ] , [ "CH" , "🇨🇭" ] , [ "CK" , "🇨🇰" ] , [ "CL" , "🇨🇱" ] , [ "CM" , "🇨🇲" ] , [ "CN" , "🇨🇳" ] , [ "CO" , "🇨🇴" ] , [ "CP" , "🇨🇵" ] , [ "CR" , "🇨🇷" ] , [ "CU" , "🇨🇺" ] , [ "CV" , "🇨🇻" ] , [ "CW" , "🇨🇼" ] , [ "CX" , "🇨🇽" ] , [ "CY" , "🇨🇾" ] , [ "CZ" , "🇨🇿" ] , [ "DE" , "🇩🇪" ] , [ "DG" , "🇩🇬" ] , [ "DJ" , "🇩🇯" ] , [ "DK" , "🇩🇰" ] , [ "DM" , "🇩🇲" ] , [ "DO" , "🇩🇴" ] , [ "DZ" , "🇩🇿" ] , [ "EA" , "🇪🇦" ] , [ "EC" , "🇪🇨" ] , [ "EE" , "🇪🇪" ] , [ "EG" , "🇪🇬" ] , [ "EH" , "🇪🇭" ] , [ "ER" , "🇪🇷" ] , [ "ES" , "🇪🇸" ] , [ "ET" , "🇪🇹" ] , [ "EU" , "🇪🇺" ] , [ "FI" , "🇫🇮" ] , [ "FJ" , "🇫🇯" ] , [ "FK" , "🇫🇰" ] , [ "FM" , "🇫🇲" ] , [ "FO" , "🇫🇴" ] , [ "FR" , "🇫🇷" ] , [ "GA" , "🇬🇦" ] , [ "GB" , "🇬🇧" ] , [ "HK" , "🇭🇰" ] ,["HU","🇭🇺"], [ "ID" , "🇮🇩" ] , [ "IE" , "🇮🇪" ] , [ "IL" , "🇮🇱" ] , [ "IM" , "🇮🇲" ] , [ "IN" , "🇮🇳" ] , [ "IS" , "🇮🇸" ] , [ "IT" , "🇮🇹" ] , [ "JP" , "🇯🇵" ] , [ "KR" , "🇰🇷" ] , [ "LU" , "🇱🇺" ] , [ "MO" , "🇲🇴" ] , [ "MX" , "🇲🇽" ] , [ "MY" , "🇲🇾" ] , [ "NL" , "🇳🇱" ] , [ "PH" , "🇵🇭" ] , [ "RO" , "🇷🇴" ] , [ "RS" , "🇷🇸" ] , [ "RU" , "🇷🇺" ] , [ "RW" , "🇷🇼" ] , [ "SA" , "🇸🇦" ] , [ "SB" , "🇸🇧" ] , [ "SC" , "🇸🇨" ] , [ "SD" , "🇸🇩" ] , [ "SE" , "🇸🇪" ] , [ "SG" , "🇸🇬" ] , [ "TH" , "🇹🇭" ] , [ "TN" , "🇹🇳" ] , [ "TO" , "🇹🇴" ] , [ "TR" , "🇹🇷" ] , [ "TV" , "🇹🇻" ] , [ "TW" , "🇨🇳" ] , [ "UK" , "🇬🇧" ] , [ "UM" , "🇺🇲" ] , [ "US" , "🇺🇸" ] , [ "UY" , "🇺🇾" ] , [ "UZ" , "🇺🇿" ] , [ "VA" , "🇻🇦" ] , [ "VE" , "🇻🇪" ] , [ "VG" , "🇻🇬" ] , [ "VI" , "🇻🇮" ] , [ "VN" , "🇻🇳" ] , [ "ZA" , "🇿🇦"]])
29 |
30 |
31 | !(async () => {
32 | let result = {
33 | title: 'YouTube Premium 检测',
34 | content: '检测失败,请重试',
35 | }
36 | await Promise.race([test(FILM_ID),timeOut(5000)])
37 | .then((code) => {
38 | console.log(code)
39 |
40 | if (code === 'Not Available') {
41 | result['content'] = '未支持 YouTube Premium'
42 | //return
43 | } else if (code === "timeout") {
44 | result['content'] = "测试超时"
45 | } else {
46 | result['content'] = '支持 YouTube Premium ➟ ⟦'+flags.get(code.toUpperCase())+code.toUpperCase()+"⟧"
47 | }
48 | //$notify(result["title"], output, result["content"], link)
49 |
50 | //console.log(result)
51 | $done({"title":result["title"],"message":result["content"]})
52 | })
53 | })()
54 | .finally(() => $done());
55 |
56 | function timeOut(delay) {
57 | return new Promise((resolve, reject) => {
58 | setTimeout(() => {
59 | //reject(new Error('timeout'))
60 | resolve("timeout")
61 | }, delay)
62 | })
63 | }
64 |
65 |
66 | function test() {
67 | return new Promise((resolve, reject) => {
68 | let option = {
69 | url: BASE_URL,
70 | opts: opts,
71 | headers: {
72 | 'User-Agent':
73 | 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36',
74 | 'Accept-Language': 'en',
75 | },
76 | }
77 | $task.fetch(option).then(response=> {
78 | let data = response.body
79 | console.log(response.statusCode)
80 | if (response.statusCode !== 200) {
81 | reject('Error')
82 | return
83 | }
84 |
85 | if (data.indexOf('Premium is not available in your country') !== -1) {
86 | resolve('Not Available')
87 | return
88 | }
89 | console.log(data)
90 | let region = ''
91 | let re = new RegExp('"GL":"(.*?)"', 'gm')
92 | let result = re.exec(data)
93 | if (result != null && result.length === 2) {
94 | region = result[1]
95 | } else if (data.indexOf('www.google.cn') !== -1) {
96 | region = 'CN'
97 | } else {
98 | region = 'US'
99 | }
100 | resolve(region)
101 | })
102 | })
103 | }
104 |
--------------------------------------------------------------------------------