Skip to content

Commit a747bd3

Browse files
committed
fix: 更新URL重写规则以支持新的API路径
1 parent 789b131 commit a747bd3

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

template/loon.workers.handlebars

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ DOMAIN,tether.edge.apple,REJECT-DROP
1717
AND,((OR,((IP-ASN,714,no-resolve),(IP-ASN,6185,no-resolve))),(PROTOCOL,QUIC)),REJECT-DROP
1818

1919
[URL Rewrite]
20-
^https?:\/\/weatherkit\.apple\.com https://weatherkit.nanocat.cloud header
20+
^https?:\/\/weatherkit\.apple\.com\/api\/v1\/availability\/ https://weatherkit.nanocat.cloud/api/v1/availability/ header
21+
^https?:\/\/weatherkit\.apple\.com\/api\/v2\/weather\/ https://weatherkit.nanocat.cloud/api/v2/weather/ header
2122

2223
[MITM]
2324
hostname = weatherkit.apple.com

template/stash.workers.handlebars

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,6 @@ http:
2424
mitm:
2525
- "weatherkit.apple.com"
2626
url-rewrite:
27-
- ^https?:\/\/weatherkit\.apple\.com https://weatherkit.nanocat.cloud transparent
27+
- ^https?:\/\/weatherkit\.apple\.com\/api\/v1\/availability\/ https://weatherkit.nanocat.cloud/api/v1/availability/ transparent
28+
- ^https?:\/\/weatherkit\.apple\.com\/api\/v2\/weather\/ https://weatherkit.nanocat.cloud/api/v2/weather/ transparent
29+

template/surge.workers.handlebars

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ DOMAIN,tether.edge.apple,REJECT-DROP
1515
AND,((OR,((IP-ASN,714,no-resolve),(IP-ASN,6185,no-resolve))),(PROTOCOL,QUIC)),REJECT-DROP
1616

1717
[URL Rewrite]
18-
^https?:\/\/weatherkit\.apple\.com https://weatherkit.nanocat.cloud header
18+
^https?:\/\/weatherkit\.apple\.com\/api\/v1\/availability\/ https://weatherkit.nanocat.cloud/api/v1/availability/ header
19+
^https?:\/\/weatherkit\.apple\.com\/api\/v2\/weather\/ https://weatherkit.nanocat.cloud/api/v2/weather/ header
20+
1921

2022
[MITM]
2123
hostname = %APPEND% weatherkit.apple.com

0 commit comments

Comments
 (0)