Files
Surge/Modules/XboxCartWeb.sgmodule
2026-04-02 21:02:16 +08:00

17 lines
591 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!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