init
This commit is contained in:
12
Surge-main/Modules/BuyRequestReplace.sgmodule
Normal file
12
Surge-main/Modules/BuyRequestReplace.sgmodule
Normal file
@@ -0,0 +1,12 @@
|
||||
#!name=Xbox Buy Request Replace
|
||||
#!desc=替换购买请求参数 (RequestParentalApproval)
|
||||
#!category=XBOX
|
||||
#!author=Ah Long
|
||||
|
||||
[Script]
|
||||
# 替换购买请求参数
|
||||
# 触发条件:RequestParentalApproval 接口
|
||||
BuyRequestReplace = type=http-request, pattern=^https://buynow\.production\.store-web\.dynamics\.com/v1\.0/Cart/RequestParentalApproval, script-path=https://raw.githubusercontent.com/XXhaos/Surge/refs/heads/main/Scripts/BuyRequestReplace.js, requires-body=1, max-size=0, binary-body-mode=0, script-update-interval=0
|
||||
|
||||
[MITM]
|
||||
hostname = %APPEND% buynow.production.store-web.dynamics.com
|
||||
11
Surge-main/Modules/MS-Family-Block.sgmodule
Normal file
11
Surge-main/Modules/MS-Family-Block.sgmodule
Normal file
@@ -0,0 +1,11 @@
|
||||
#!name=Microsoft Family Block
|
||||
#!desc=拦截 Microsoft Family 中指定的 ProductId 购买请求 (9PNTSH5SKCL5等)
|
||||
#!category=XBOX
|
||||
#!author=Ah Long
|
||||
|
||||
[Script]
|
||||
# logic: 检查 POST body 是否包含黑名单中的 ID
|
||||
MS_Family_Block = type=http-request, pattern=^https://account\.microsoft\.com/family/api/buy/requests/complete(\?.*)?$, requires-body=1, max-size=0, script-path=https://raw.githubusercontent.com/XXhaos/Surge/refs/heads/main/Scripts/ms_family_block.js, script-update-interval=-1, timeout=10, debug=0, script-text=var targetIds=["9PNTSH5SKCL5","9nfmccp0pm67","9npbvj8lwsvn","9pcgszz8zpq2","9P54FF0VQD7R","9NCJZN3LBD3P","9P9CLTVLLHD6","9NHXDFLDBN6G"];var body=$request.body;if($request.method==="POST"&&body){var upperBody=body.toUpperCase();for(var i=0;i<targetIds.length;i++){if(upperBody.indexOf(targetIds[i].toUpperCase())!==-1){console.log("[MS-Block] Intercepted blocked ProductId: "+targetIds[i]);$done({response:{status:403,headers:{"Content-Type":"text/plain"},body:"Blocked by Surge Module"}});break}}$done({})}else{$done({})}
|
||||
|
||||
[MITM]
|
||||
hostname = %APPEND% account.microsoft.com
|
||||
171
Surge-main/Modules/Q-Search-Plus.sgmodule
Normal file
171
Surge-main/Modules/Q-Search-Plus.sgmodule
Normal file
@@ -0,0 +1,171 @@
|
||||
#!name=Q-Search Plus
|
||||
#!desc=Bing搜索重定向
|
||||
#引用自墨鱼@ddgksf2013,转换为Surge格式并加入自用重写,修改日期2024-07-23
|
||||
|
||||
|
||||
##############################################
|
||||
# - Safari 内输入以下格式命令快速指定搜索引擎
|
||||
# - 【命令+空格+关键词】或者【关键词+空格+命令】
|
||||
# - 注:请先进入设置更改 Safari 默认搜索为 Bing
|
||||
# - 更新时间:2024-01-31
|
||||
# - 墨鱼自用全能搜索V2.0(135)
|
||||
# - 墨鱼手记
|
||||
# - 如需引用请注明出处-> https://t.me/ddgksf2021 谢谢合作!
|
||||
# - https://github.com/ddgksf2013/Rewrite/raw/master/Html/Q-Search.conf
|
||||
##############################################
|
||||
|
||||
|
||||
[URL Rewrite]
|
||||
|
||||
#>>>>>>>>>>>>>>>>>>>>>>>自用
|
||||
# TMDB
|
||||
^https:\/\/.*bing.com\/search\?q=tmdb\+([^&]+).+ https://www.themoviedb.org/search?query=$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+tmdb.+ https://www.themoviedb.org/search?query=$1 302
|
||||
# ng (切换至尼日利亚区)
|
||||
^https:\/\/.*bing.com\/search\?q=ng&.+ https://itunes.apple.com/WebObjects/MZStore.woa/wa/resetAndRedirect?dsf=143561&mt=8&url=/WebObjects/MZStore.woa/wa/viewSoftware?mt=8&id=1108187390&cc=ng&urlDesc= 302
|
||||
# pp xxx (perplexity)
|
||||
^https:\/\/.*bing.com\/search\?q=pp\+([^&]+).+ https://www.perplexity.ai/search?q=$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+pp.+ https://www.perplexity.ai/search?q=$1 302
|
||||
#tf (TestFlight)
|
||||
^https:\/\/.*bing.com\/search\?q=tf(\+|%20)([^&]+).+ https://www.google.com/search?as_q=$2&as_sitesearch=testflight.apple.com 302
|
||||
|
||||
#>>>>>>>>>>>>>>>>>>>>>>>翻译
|
||||
# yd xxx (有道词典)
|
||||
^https:\/\/.*bing.com\/search\?q=yd\+([^&]+).+ http://dict.youdao.com/search?q=$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+yd.+ http://dict.youdao.com/search?q=$1 302
|
||||
# trc xxx (Google 译至中)
|
||||
^https:\/\/.*bing.com\/search\?q=trc\+([^&]+).+ https://translate.google.com/#view=home&op=translate&sl=auto&tl=zh-CN&text=$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+trc.+ https://translate.google.com/#view=home&op=translate&sl=auto&tl=zh-CN&text=$1 302
|
||||
# tre xxx (Google 译至英)
|
||||
^https:\/\/.*bing.com\/search\?q=tre\+([^&]+).+ https://translate.google.com/#view=home&op=translate&sl=auto&tl=en&text=$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+tre.+ https://translate.google.com/#view=home&op=translate&sl=auto&tl=en&text=$1 302
|
||||
# trj xxx (Google 译至日)
|
||||
^https:\/\/.*bing.com\/search\?q=trj\+([^&]+).+ https://translate.google.com/#view=home&op=translate&sl=auto&tl=ja&text=$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+trj.+ https://translate.google.com/#view=home&op=translate&sl=auto&tl=ja&text=$1 302
|
||||
|
||||
#>>>>>>>>>>>>>>>>>>>>>>>社区
|
||||
# tt xxx (头条)
|
||||
^https:\/\/.*bing.com\/search\?q=tt\+([^&]+).+ https://so.toutiao.com/search?keyword=$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+tt.+ https://so.toutiao.com/search?keyword=$1 302
|
||||
# db xxx (豆瓣)
|
||||
^https:\/\/.*bing.com\/search\?q=db\+([^&]+).+ https://m.douban.com/search?query=$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+db.+ https://m.douban.com/search?query=$1 302
|
||||
# zh xxx (知乎)
|
||||
^https:\/\/.*bing.com\/search\?q=zh\+([^&]+).+ http://www.zhihu.com/search?q=$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+zh.+ http://www.zhihu.com/search?q=$1 302
|
||||
# wb xxx (微博)
|
||||
^https:\/\/.*bing.com\/search\?q=wb\+([^&]+).+ https://s.weibo.com/weibo/$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+wb.+ https://s.weibo.com/weibo/$1 302
|
||||
# wx xxx (微信)
|
||||
^https:\/\/.*bing.com\/search\?q=wx\+([^&]+).+ https://weixin.sogou.com/weixinwap?query=$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+wx.+ https://weixin.sogou.com/weixinwap?query=$1 302
|
||||
# up xxx (Unsplash)
|
||||
^https:\/\/.*bing.com\/search\?q=up\+([^&]+).+ https://unsplash.com/s/photos/$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+up.+ https://unsplash.com/s/photos/$1 302
|
||||
# sspai xxx (少数派站内搜索)
|
||||
^https:\/\/.*bing.com\/search\?q=sspai\+([^&]+).+ https://sspai.com/search/post/$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+sspai.+ https://sspai.com/search/post/$1 302
|
||||
# ssp xxx (Google 搜索少数派)
|
||||
^https:\/\/.*bing.com\/search\?q=ssp\+([^&]+).+ https://www.google.com/search?as_q=$1&as_sitesearch=sspai.com 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+ssp.+ https://www.google.com/search?as_q=$1&as_sitesearch=sspai.com 302
|
||||
# tw xxx (Twitter)
|
||||
^https:\/\/.*bing.com\/search\?q=tw\+([^&]+).+ https://twitter.com/search?q=$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+tw.+ https://twitter.com/search?q=$1 302
|
||||
# gh xxx (GitHub)
|
||||
^https:\/\/.*bing.com\/search\?q=gh\+([^&]+).+ https://github.com/search?q=$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+gh.+ https://github.com/search?q=$1 302
|
||||
# gu xxx (GitHub User)
|
||||
^https:\/\/.*bing.com\/search\?q=gu\+([^&]+).+ https://github.com/search?q=$1&type=users 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+gu.+ https://github.com/search?q=$1&type=users 302
|
||||
# gc xxx (GitHub Code)
|
||||
^https:\/\/.*bing.com\/search\?q=gc\+([^&]+).+ https://github.com/search?o=desc&q=$1&s=indexed&type=Code 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+gc.+ https://github.com/search?o=desc&q=$1&s=indexed&type=Code 302
|
||||
# so xxx (Stack Overflow)
|
||||
^https:\/\/.*bing.com\/search\?q=so\+([^&]+).+ https://stackoverflow.com/search?q=$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+so.+ https://stackoverflow.com/search?q=$1 302
|
||||
# se xxx (StackExchange)
|
||||
^https:\/\/.*bing.com\/search\?q=se\+([^&]+).+ https://stackexchange.com/search?q=$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+se.+ https://stackexchange.com/search?q=$1 302
|
||||
# wa xxx (WolframAlpha)
|
||||
^https:\/\/.*bing.com\/search\?q=wa\+([^&]+).+ https://www.wolframalpha.com/input/?i=$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+wa.+ https://www.wolframalpha.com/input/?i=$1 302
|
||||
# rd xxx (Reddit)
|
||||
^https:\/\/.*bing.com\/search\?q=rd\+([^&]+).+ https://www.reddit.com/search?q=$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+rd.+ https://www.reddit.com/search?q=$1 302
|
||||
|
||||
#>>>>>>>>>>>>>>>>>>>>>>>购物
|
||||
# zdm xxx (什么值得买)
|
||||
^https:\/\/.*bing.com\/search\?q=zdm\+([^&]+).+ https://search.m.smzdm.com/?v=b&s=$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+zdm.+ https://search.m.smzdm.com/?v=b&s=$1 302
|
||||
# jd xxx (京东)
|
||||
^https:\/\/.*bing.com\/search\?q=jd\+([^&]+).+ openapp.jdmobile://virtual?params={"des":"productList","keyWord":"$1","from":"search","category":"jump"} 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+jd.+ openapp.jdmobile://virtual?params={"des":"productList","keyWord":"$1","from":"search","category":"jump"} 302
|
||||
# tb xxx (淘宝)
|
||||
^https:\/\/.*bing.com\/search\?q=tb\+([^&]+).+ taobao://s.taobao.com?q=$1 302
|
||||
^https:\/\/.*bing.com\/search\q=([^+]+)\+tb.+ taobao://s.taobao.com?q=$1 302
|
||||
|
||||
#>>>>>>>>>>>>>>>>>>>>>>>视频
|
||||
# yt xxx (YouTube)
|
||||
^https:\/\/.*bing.com\/search\?q=yt\+([^&]+).+ https://www.youtube.com/results?search_query=$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+yt.+ https://www.youtube.com/results?search_query=$1 302
|
||||
# bli xxx (哔哩哔哩)
|
||||
^https:\/\/.*bing.com\/search\?q=bli\+([^&]+).+ https://m.bilibili.com/search?keyword=$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+bli.+ https://m.bilibili.com/search?keyword=$1 302
|
||||
# gd xxx (Google 搜索 Google Drive 资源)
|
||||
^https:\/\/.*bing.com\/search\?q=gd\+([^&]+).+ https://www.google.com/search?q=%22Google+Drive%22+$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+gd.+ https://www.google.com/search?q=%22Google+Drive%22+$1 302
|
||||
# tgd xxx (t.me/gdurl 搜索 Google Drive 资源)
|
||||
^https:\/\/.*bing.com\/search\?q=tgd\+([^&]+).+ https://t.me/s/gdurl?q=$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+tgd.+ https://t.me/s/gdurl?q=$1 302
|
||||
# ph xxx (PornHub)
|
||||
^https:\/\/.*bing.com\/search\?q=ph\+([^&]+).+ https://cn.pornhub.com/video/search?search=$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+ph.+ https://cn.pornhub.com/video/search?search=$1 302
|
||||
# af xxx (Acfun)
|
||||
^https:\/\/.*bing.com\/search\?q=af\+([^&]+).+ https://www.acfun.cn/search?keyword=$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+af.+ https://www.acfun.cn/search?keyword=$1 302
|
||||
# ys xxx (搜片)
|
||||
^https:\/\/.*bing.com\/search\?q=ys\+([^&]+).+ https://soupian.icu/search?key=$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+ys.+ https://soupian.icu/search?key=$1 302
|
||||
|
||||
#>>>>>>>>>>>>>>>>>>>>>>>苹果商店切换
|
||||
# cn (切换至中国区)
|
||||
^https:\/\/.*bing.com\/search\?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= 302
|
||||
# hk (切换至香港区)
|
||||
^https:\/\/.*bing.com\/search\?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= 302
|
||||
# tw (切换至台湾区)
|
||||
^https:\/\/.*bing.com\/search\?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= 302
|
||||
# us (切换至美国区)
|
||||
^https:\/\/.*bing.com\/search\?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= 302
|
||||
# jp (切换至日本区)
|
||||
^https:\/\/.*bing.com\/search\?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= 302
|
||||
# kr (切换至韩国区)
|
||||
^https:\/\/.*bing.com\/search\?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= 302
|
||||
# tr (切换至土耳其区)
|
||||
^https:\/\/.*bing.com\/search\?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= 302
|
||||
# sg (切换至新加坡区)
|
||||
^https:\/\/.*bing.com\/search\?q=sg&.+ https://itunes.apple.com/WebObjects/MZStore.woa/wa/resetAndRedirect?dsf=143464&mt=8&url=/WebObjects/MZStore.woa/wa/viewSoftware?mt=8&id=1108187390&cc=tr&urlDesc= 302
|
||||
|
||||
#>>>>>>>>>>>>>>>>>>>>>>>搜索
|
||||
# bd xxx (百度搜索)
|
||||
^https:\/\/.*bing.com\/search\?q=bd\+([^&]+).+ https://www.baidu.com/s?wd=$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=((.(?!bd))+)\+bd.+ https://www.baidu.com/s?wd=$1 302
|
||||
# wk xxx (维基搜索)
|
||||
^https:\/\/.*bing.com\/search\?q=wk\+([^&]+).+ https://zh.wikipedia.org/wiki/$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+wk.+ https://zh.wikipedia.org/wiki/$1 302
|
||||
# wz xxx (无追搜索)
|
||||
^https:\/\/.*bing.com\/search\?q=wz\+([^&]+).+ https://www.wuzhuiso.com/s?q=$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+wz.+ https://www.wuzhuiso.com/s?q=$1 302
|
||||
# yh xxx (油猴搜索)
|
||||
^https:\/\/.*bing.com\/search\?q=yh\+([^&]+).+ https://greasyfork.org/zh-CN/scripts?q=$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+yh.+ https://greasyfork.org/zh-CN/scripts?q=$1 302
|
||||
# gi xxx (Google 图片)
|
||||
^https:\/\/.*bing.com\/search\?q=gi\+([^&]+).+ https://www.google.com/search?&tbm=isch&q=$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+gi.+ https://www.google.com/search?&tbm=isch&q=$1 302
|
||||
# ios xxx (苹果应用搜索)
|
||||
^https:\/\/.*bing.com\/search\?q=ios\+([^&]+).+ https://www.qimai.cn/search/index/search/$1 302
|
||||
^https:\/\/.*bing.com\/search\?q=([^+]+)\+ios.+ https://www.qimai.cn/search/index/search/$1 302
|
||||
# xxx (无指令默认为 Google)
|
||||
^https:\/\/.*bing.com\/search\?q=([^&]+).+ https://www.google.com/search?q=$1 302
|
||||
|
||||
[MITM]
|
||||
hostname = %APPEND% *.bing.com
|
||||
16
Surge-main/Modules/XboxCartWeb.sgmodule
Normal file
16
Surge-main/Modules/XboxCartWeb.sgmodule
Normal file
@@ -0,0 +1,16 @@
|
||||
#!name=Xbox Cart Web
|
||||
#!desc=访问 https://addtocart.com 触发远程脚本
|
||||
#!author=Ah Long
|
||||
#!category=XBOX
|
||||
|
||||
[Host]
|
||||
# 核心:将 addtocart.com 解析到 Surge 内部 IP
|
||||
# 这样手机发出的请求会被 Surge 直接截获,不会去公网找服务器
|
||||
addtocart.com = 198.18.0.1
|
||||
|
||||
[Script]
|
||||
# 正则匹配:支持 http 和 https,域名为 addtocart.com
|
||||
xbox_web_runner = type=http-request, pattern=^https?://addtocart\.com/?.*, script-path=https://raw.githubusercontent.com/XXhaos/Surge/refs/heads/main/Scripts/NewAddToCart_Web.js, timeout=60
|
||||
|
||||
[MITM]
|
||||
hostname = %APPEND% addtocart.com
|
||||
26
Surge-main/Modules/XboxParamCapturer.sgmodule
Normal file
26
Surge-main/Modules/XboxParamCapturer.sgmodule
Normal file
@@ -0,0 +1,26 @@
|
||||
#!name=Xbox Param Capturer
|
||||
#!desc=抓取 Xbox 参数 (全区/防缓存/忽略大小写)
|
||||
#!author=Ah Long
|
||||
#!category=XBOX
|
||||
|
||||
[Script]
|
||||
# 1. 抓 Product 参数 (Response)
|
||||
# 修复:优化正则写法,忽略大小写
|
||||
XboxProductList = type=http-response, pattern=(?i)^https://emerald\.xboxservices\.com/xboxcomfd/productActions/.*locale=en-us, requires-body=1, max-size=0, binary-body-mode=0, timeout=60, script-update-interval=0, script-path=https://raw.githubusercontent.com/XXhaos/Surge/refs/heads/main/Scripts/XboxProductList.js
|
||||
|
||||
# 2. 获取 Authorization & CartId
|
||||
# 修复:加上 (?i) 忽略 Cart/cart 大小写,去掉强制结尾的 \?
|
||||
Xbox_Auth_CartId = type=http-request, pattern=(?i)^https://cart\.production\.store-web\.dynamics\.com/v1\.0/cart/eligibilityCheck, requires-body=0, script-update-interval=0, script-path=https://raw.githubusercontent.com/XXhaos/Surge/refs/heads/main/Scripts/authorization%26cartId.js
|
||||
|
||||
# 3. 获取 CartParameter
|
||||
# 修复:加上 (?i) 忽略大小写
|
||||
Xbox_Mscv_MUID = type=http-request, pattern=(?i)^https://cart\.production\.store-web\.dynamics\.com/v1\.0/cart/loadCart, requires-body=0, script-update-interval=0, script-path=https://raw.githubusercontent.com/XXhaos/Surge/refs/heads/main/Scripts/CartParameter.js
|
||||
|
||||
[Header Rewrite]
|
||||
# 【防缓存】强制删除 emerald 域名的协商缓存头
|
||||
# 修复:简化正则,确保匹配命中
|
||||
^https://emerald\.xboxservices\.com/xboxcomfd/productActions/ header-del If-Modified-Since
|
||||
^https://emerald\.xboxservices\.com/xboxcomfd/productActions/ header-del If-None-Match
|
||||
|
||||
[MITM]
|
||||
hostname = %APPEND% emerald.xboxservices.com, *.dynamics.com
|
||||
26
Surge-main/Modules/XboxWebController.sgmodule
Normal file
26
Surge-main/Modules/XboxWebController.sgmodule
Normal file
@@ -0,0 +1,26 @@
|
||||
#!name=Xbox Web Controller
|
||||
#!desc=通过访问虚拟域名触发脚本:\n1. 访问 https://addtocart.com -> 触发添加/购买脚本\n2. 访问 https://clearlist.com -> 清空本地 ProductList\n3. 访问 https://clearapprovalcartid.com -> 清空 ApproveCartId\n4. 访问 https://syncxbox.com -> 从云端同步数据并清理云端队列
|
||||
#!author=Ah Long & XXhaos
|
||||
#!category=XBOX
|
||||
|
||||
[Host]
|
||||
addtocart.com = 198.18.0.1
|
||||
clearlist.com = 198.18.0.1
|
||||
clearapprovalcartid.com = 198.18.0.1
|
||||
syncxbox.com = 198.18.0.1
|
||||
|
||||
[Script]
|
||||
# 1. 触发远程添加/购买脚本
|
||||
xbox_web_runner = type=http-request, pattern=^https?://addtocart\.com/?.*, script-path=https://raw.githubusercontent.com/XXhaos/Surge/refs/heads/main/Scripts/NewAddToCart_Web.js, timeout=60
|
||||
|
||||
# 2. 清空本地 XboxProductList
|
||||
xbox_clear_web = type=http-request, pattern=^https?://clearlist\.com/?.*, script-path=https://raw.githubusercontent.com/XXhaos/Surge/main/Scripts/ClearXboxProductList_Web.js, timeout=10
|
||||
|
||||
# 3. 清空 ApprovalCartId
|
||||
clear_cart_id = type=http-request, pattern=^https?://clearapprovalcartid\.com/?.*, script-path=https://raw.githubusercontent.com/XXhaos/Surge/refs/heads/main/Scripts/ClearApprovalCartId.js, timeout=10
|
||||
|
||||
# 4. 从云端同步数据 (确保 GitHub 上的文件名和路径 100% 正确)
|
||||
xbox_sync_cloud = type=http-request, pattern=^https?://syncxbox\.com/?.*, script-path=https://raw.githubusercontent.com/XXhaos/Surge/refs/heads/main/Scripts/SyncXboxCloud.js, timeout=30
|
||||
|
||||
[MITM]
|
||||
hostname = %APPEND% addtocart.com, clearlist.com, clearapprovalcartid.com, syncxbox.com
|
||||
17
Surge-main/Modules/Xbox_Rewrite.sgmodule
Normal file
17
Surge-main/Modules/Xbox_Rewrite.sgmodule
Normal file
@@ -0,0 +1,17 @@
|
||||
#!name=Xbox Rewrite Collection
|
||||
#!desc=Win 商店链接重定向 & 强制锁美区 (保留阿根廷区)
|
||||
#!category=XBOX
|
||||
#!author=Ah Long
|
||||
|
||||
[URL Rewrite]
|
||||
# Microsoft Store -> 对应的 CoreHalo 游戏页(提取 12 位 ID)
|
||||
(?i)^https?:\/\/(?:www\.)?microsoft\.com\/en-us\/store\/.*?([a-z0-9]{12})(?:[\/\?#]|$) https://www.xbox.com/en-us/games/store/corehalo/$1 302
|
||||
|
||||
# 非 en-us 的 xbox.com 统一跳转到 en-us(排除 es-ar / es-AR / en-us)
|
||||
^https:\/\/www\.xbox\.com\/(?!es-ar|es-AR|en-us)([a-zA-Z]{2}-[a-zA-Z]{2})(\/.*)$ https://www.xbox.com/en-us$2 302
|
||||
|
||||
# app.corehalo.com 的 r 区域参数统一改为 en-us,保留其他 query 参数
|
||||
"^https:\/\/app\.corehalo\.com\/ms\/link\/go\?(.*&)?r=(?!es-ar|es-AR|en-us)([a-zA-Z]{2}-[a-zA-Z]{2})(&.*)?$" "https://app.corehalo.com/ms/link/go?$1r=en-us$3" 302
|
||||
|
||||
[MITM]
|
||||
hostname = %APPEND% www.microsoft.com, www.xbox.com, app.corehalo.com
|
||||
13
Surge-main/Modules/batch_approval.sgmodule
Normal file
13
Surge-main/Modules/batch_approval.sgmodule
Normal file
@@ -0,0 +1,13 @@
|
||||
#!name=Microsoft Family Batch Approve
|
||||
#!desc=自动抓取CartId并替换批量购买流程,购买完成后自动清理
|
||||
#!category=XBOX
|
||||
#!author=Ah Long
|
||||
|
||||
[Script]
|
||||
ApprovalCartId = type=http-request, pattern=^https:\/\/buynow\.production\.store-web\.dynamics\.com\/v1\.0\/cart\/updateCart.*, script-path=https://raw.githubusercontent.com/XXhaos/Surge/refs/heads/main/Scripts/ApprovalCartId.js, requires-body=0
|
||||
|
||||
batch_purchase_send = type=http-request, pattern=^https:\/\/buynow\.production\.store-web\.dynamics\.com\/v1\.0\/Cart\/purchase\?appId=BuyNow, script-path=https://raw.githubusercontent.com/XXhaos/Surge/refs/heads/main/Scripts/batch_purchase_send.js, requires-body=1, max-size=1048576, timeout=60, binary-body-mode=0, script-update-interval=0
|
||||
|
||||
ApprovalCartClean = type=http-request, pattern=^https:\/\/account\.microsoft\.com\/family\/api\/buy\/requests\/complete, script-path=https://raw.githubusercontent.com/XXhaos/Surge/refs/heads/main/Scripts/AutoClearApprovalCartId.js, requires-body=0
|
||||
[MITM]
|
||||
hostname = %APPEND% buynow.production.store-web.dynamics.com, production.store-web.dynamics.com, account.microsoft.com
|
||||
Reference in New Issue
Block a user