-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsgmodule-tools.config.ts
37 lines (34 loc) · 1.09 KB
/
sgmodule-tools.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { defineConfig } from "@iringo/sgmoudle-tools";
import { ArgumentsBuilder } from "@iringo/arguments-builder";
import argConfig from "./arguments-builder.config";
const args = new ArgumentsBuilder(argConfig);
const { scriptParams } = args.buildSurgeArguments();
export default defineConfig({
module: {
rule: ["DOMAIN,weather-analytics-events.apple.com,REJECT-DROP"],
script: [
{
name: "🌤 WeatherKit.api.v1.availability.response",
type: "http-response",
scriptPath: "./dist/response.js",
pattern: "^https?://weatherkit.apple.com/api/v1/availability/",
requiresBody: true,
engine: "webview",
argument: scriptParams,
},
{
name: "🌤 WeatherKit.api.v2.weather.response",
type: "http-response",
scriptPath: "./dist/response.js",
pattern: "^https?://weatherkit.apple.com/api/v2/weather/",
requiresBody: true,
binaryBodyMode: true,
engine: "webview",
argument: scriptParams,
},
],
mitm: {
hostname: ["weatherkit.apple.com"],
},
},
});