edgeaegis 2026.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +10 -0
  3. package/README.md +215 -0
  4. package/config.yml +29 -0
  5. package/origin/cloudflare/app/config.yml +2 -0
  6. package/origin/cloudflare/app/index.js +4 -0
  7. package/origin/edgeone/app/config.yml +2 -0
  8. package/origin/edgeone/app/index.js +4 -0
  9. package/origin/esa/app/config.yml +2 -0
  10. package/origin/esa/app/index.js +4 -0
  11. package/origin/netlify/app/config.yml +2 -0
  12. package/origin/netlify/app/index.js +4 -0
  13. package/origin/vercel/app/config.yml +2 -0
  14. package/origin/vercel/app/index.js +4 -0
  15. package/package.json +123 -0
  16. package/respond/403.html +2 -0
  17. package/respond/403.json +1 -0
  18. package/rules/allowlist.yml +2 -0
  19. package/rules/emergency.conf +4 -0
  20. package/rules/local.conf +2 -0
  21. package/rules/seclang-bundle.json +360 -0
  22. package/rules/seclang-upstreams.json +14 -0
  23. package/rules/setup.conf +15 -0
  24. package/secret/credentials.example.yml +7 -0
  25. package/secret/relay-server.example.yml +10 -0
  26. package/tools/.build/scr/adapters/cloudflare/runtime.d.ts +18 -0
  27. package/tools/.build/scr/adapters/cloudflare/runtime.js +16 -0
  28. package/tools/.build/scr/adapters/cloudflare/runtime.js.map +1 -0
  29. package/tools/.build/scr/adapters/cloudflare/worker.js +25 -0
  30. package/tools/.build/scr/adapters/edgeone/worker.js +7 -0
  31. package/tools/.build/scr/adapters/esa/worker.js +5 -0
  32. package/tools/.build/scr/adapters/forward.d.ts +4 -0
  33. package/tools/.build/scr/adapters/forward.js +25 -0
  34. package/tools/.build/scr/adapters/forward.js.map +1 -0
  35. package/tools/.build/scr/adapters/handler.js +39 -0
  36. package/tools/.build/scr/adapters/ingress.d.ts +10 -0
  37. package/tools/.build/scr/adapters/ingress.js +62 -0
  38. package/tools/.build/scr/adapters/ingress.js.map +1 -0
  39. package/tools/.build/scr/adapters/netlify/worker.js +7 -0
  40. package/tools/.build/scr/adapters/runtime.d.ts +33 -0
  41. package/tools/.build/scr/adapters/runtime.js +50 -0
  42. package/tools/.build/scr/adapters/runtime.js.map +1 -0
  43. package/tools/.build/scr/adapters/vercel/worker.js +7 -0
  44. package/tools/.build/scr/cli/config.d.ts +2 -0
  45. package/tools/.build/scr/cli/config.js +23 -0
  46. package/tools/.build/scr/cli/config.js.map +1 -0
  47. package/tools/.build/scr/cli/deployment.d.ts +15 -0
  48. package/tools/.build/scr/cli/deployment.js +108 -0
  49. package/tools/.build/scr/cli/deployment.js.map +1 -0
  50. package/tools/.build/scr/cli/init.d.ts +2 -0
  51. package/tools/.build/scr/cli/init.js +62 -0
  52. package/tools/.build/scr/cli/init.js.map +1 -0
  53. package/tools/.build/scr/cli/main.d.ts +2 -0
  54. package/tools/.build/scr/cli/main.js +99 -0
  55. package/tools/.build/scr/cli/main.js.map +1 -0
  56. package/tools/.build/scr/cli/relay-serve.d.ts +1 -0
  57. package/tools/.build/scr/cli/relay-serve.js +48 -0
  58. package/tools/.build/scr/cli/relay-serve.js.map +1 -0
  59. package/tools/.build/scr/cli/responses.d.ts +2 -0
  60. package/tools/.build/scr/cli/responses.js +31 -0
  61. package/tools/.build/scr/cli/responses.js.map +1 -0
  62. package/tools/.build/scr/cli/serve.d.ts +1 -0
  63. package/tools/.build/scr/cli/serve.js +132 -0
  64. package/tools/.build/scr/cli/serve.js.map +1 -0
  65. package/tools/.build/scr/config.d.ts +39 -0
  66. package/tools/.build/scr/config.js +89 -0
  67. package/tools/.build/scr/config.js.map +1 -0
  68. package/tools/.build/scr/core/types.d.ts +27 -0
  69. package/tools/.build/scr/core/types.js +34 -0
  70. package/tools/.build/scr/core/types.js.map +1 -0
  71. package/tools/.build/scr/core/version.d.ts +1 -0
  72. package/tools/.build/scr/core/version.js +3 -0
  73. package/tools/.build/scr/core/version.js.map +1 -0
  74. package/tools/.build/scr/http-boundary/index.d.ts +19 -0
  75. package/tools/.build/scr/http-boundary/index.js +173 -0
  76. package/tools/.build/scr/http-boundary/index.js.map +1 -0
  77. package/tools/.build/scr/http-boundary/json.d.ts +2 -0
  78. package/tools/.build/scr/http-boundary/json.js +90 -0
  79. package/tools/.build/scr/http-boundary/json.js.map +1 -0
  80. package/tools/.build/scr/origin/relay.d.ts +20 -0
  81. package/tools/.build/scr/origin/relay.js +221 -0
  82. package/tools/.build/scr/origin/relay.js.map +1 -0
  83. package/tools/.build/scr/origin/replay-node.d.ts +8 -0
  84. package/tools/.build/scr/origin/replay-node.js +36 -0
  85. package/tools/.build/scr/origin/replay-node.js.map +1 -0
  86. package/tools/.build/scr/origin/types.d.ts +18 -0
  87. package/tools/.build/scr/origin/types.js +2 -0
  88. package/tools/.build/scr/origin/types.js.map +1 -0
  89. package/tools/.build/scr/runtime/allowlist.d.ts +21 -0
  90. package/tools/.build/scr/runtime/allowlist.js +84 -0
  91. package/tools/.build/scr/runtime/allowlist.js.map +1 -0
  92. package/tools/.build/scr/runtime/browser-cache.d.ts +7 -0
  93. package/tools/.build/scr/runtime/browser-cache.js +50 -0
  94. package/tools/.build/scr/runtime/browser-cache.js.map +1 -0
  95. package/tools/.build/scr/runtime/error-pages.d.ts +10 -0
  96. package/tools/.build/scr/runtime/error-pages.js +72 -0
  97. package/tools/.build/scr/runtime/error-pages.js.map +1 -0
  98. package/tools/.build/scr/runtime/index.d.ts +54 -0
  99. package/tools/.build/scr/runtime/index.js +355 -0
  100. package/tools/.build/scr/runtime/index.js.map +1 -0
  101. package/tools/.build/scr/runtime/node.d.ts +3 -0
  102. package/tools/.build/scr/runtime/node.js +97 -0
  103. package/tools/.build/scr/runtime/node.js.map +1 -0
  104. package/tools/.build/scr/runtime/proxy.d.ts +12 -0
  105. package/tools/.build/scr/runtime/proxy.js +177 -0
  106. package/tools/.build/scr/runtime/proxy.js.map +1 -0
  107. package/tools/.build/scr/runtime/stream.d.ts +8 -0
  108. package/tools/.build/scr/runtime/stream.js +72 -0
  109. package/tools/.build/scr/runtime/stream.js.map +1 -0
  110. package/tools/.build/scr/seclang/body.d.ts +13 -0
  111. package/tools/.build/scr/seclang/body.js +109 -0
  112. package/tools/.build/scr/seclang/body.js.map +1 -0
  113. package/tools/.build/scr/seclang/bytes.d.ts +5 -0
  114. package/tools/.build/scr/seclang/bytes.js +38 -0
  115. package/tools/.build/scr/seclang/bytes.js.map +1 -0
  116. package/tools/.build/scr/seclang/index.d.ts +166 -0
  117. package/tools/.build/scr/seclang/index.js +1519 -0
  118. package/tools/.build/scr/seclang/index.js.map +1 -0
  119. package/tools/.build/scr/seclang/json.d.ts +2 -0
  120. package/tools/.build/scr/seclang/json.js +87 -0
  121. package/tools/.build/scr/seclang/json.js.map +1 -0
  122. package/tools/.build/scr/seclang/libinjection.d.ts +9 -0
  123. package/tools/.build/scr/seclang/libinjection.js +59 -0
  124. package/tools/.build/scr/seclang/libinjection.js.map +1 -0
  125. package/tools/.build/scr/seclang/node.d.ts +22 -0
  126. package/tools/.build/scr/seclang/node.js +113 -0
  127. package/tools/.build/scr/seclang/node.js.map +1 -0
  128. package/tools/.build/scr/seclang/pcre2.d.ts +23 -0
  129. package/tools/.build/scr/seclang/pcre2.js +153 -0
  130. package/tools/.build/scr/seclang/pcre2.js.map +1 -0
  131. package/tools/.build/scr/seclang/sources.d.ts +6 -0
  132. package/tools/.build/scr/seclang/sources.js +59 -0
  133. package/tools/.build/scr/seclang/sources.js.map +1 -0
  134. package/tools/.build/scr/seclang/state.d.ts +17 -0
  135. package/tools/.build/scr/seclang/state.js +53 -0
  136. package/tools/.build/scr/seclang/state.js.map +1 -0
  137. package/tools/.build/scr/seclang/syntax.d.ts +9 -0
  138. package/tools/.build/scr/seclang/syntax.js +74 -0
  139. package/tools/.build/scr/seclang/syntax.js.map +1 -0
  140. package/tools/.build/scr/seclang/transforms.d.ts +3 -0
  141. package/tools/.build/scr/seclang/transforms.js +157 -0
  142. package/tools/.build/scr/seclang/transforms.js.map +1 -0
  143. package/tools/.build/scr/seclang/unicode.d.ts +2 -0
  144. package/tools/.build/scr/seclang/unicode.js +19 -0
  145. package/tools/.build/scr/seclang/unicode.js.map +1 -0
  146. package/tools/.build/scr/seclang/vendor/LIBINJECTION-LICENSE +33 -0
  147. package/tools/.build/scr/seclang/vendor/PCRE2-NOTICE +47 -0
  148. package/tools/.build/scr/seclang/vendor/PCRE2-WRAPPER-LICENSE +21 -0
  149. package/tools/.build/scr/seclang/vendor/UNICODE-DATA-NOTICE +6 -0
  150. package/tools/.build/scr/seclang/vendor/libinjection.json +7 -0
  151. package/tools/.build/scr/seclang/vendor/libinjection.wasm +0 -0
  152. package/tools/.build/scr/seclang/vendor/pcre2.json +7 -0
  153. package/tools/.build/scr/seclang/vendor/pcre2.wasm +0 -0
  154. package/tools/.build/scr/seclang/vendor/unicode.json +378 -0
  155. package/tools/build-platform.mjs +199 -0
  156. package/tools/platform-command.mjs +59 -0
  157. package/tools/sync-native-seclang.mjs +155 -0
  158. package/tools/verify-full-crs.mjs +118 -0
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,10 @@
1
+ ShieldWeave
2
+ Copyright 2026 ShieldWeave contributors
3
+
4
+ Licensed under the Apache License, Version 2.0.
5
+ Third-party libraries retain their respective licenses; see package-lock.json and installed licenses.
6
+ No third-party WAF ruleset is included.
7
+
8
+ The GO-2023-2102 regression fixture was retrieved from the official Go vulnerability database:
9
+ https://vuln.go.dev/ID/GO-2023-2102.json
10
+ Its contents remain attributable to the upstream Go vulnerability database contributors.
package/README.md ADDED
@@ -0,0 +1,215 @@
1
+ # EdgeAegis
2
+
3
+ Edge + Aegis(盾牌、庇护):运行在边缘与服务器上的应用防火墙。
4
+
5
+ 自研 TypeScript SecLang 编译器和执行引擎,直接运行完整 OWASP CRS,不转换为 Shield IR。Cloudflare、Vercel、Netlify、ESA、EdgeOne 和 Node/VPS 共用同一套规则执行代码。Cloudflare 部署只需要 Worker。
6
+
7
+ 真实 VM 录制:实际终端安装与启动、Geany 中的原生规则、完整 CRS 拦截和 TTL 恢复。演示将封禁 TTL 调为 5 秒;项目默认仍为 300 秒。
8
+
9
+ [![原生 SecLang 防护的真实 VM 演示](tools/demo/edgeaegis-native.d1ce9a3778e5e1ee.webp)](tools/demo/edgeaegis-native.1bdc3f50e62f9c2f.mp4)
10
+
11
+ [播放录像](tools/demo/edgeaegis-native.1bdc3f50e62f9c2f.mp4) · [GIF](tools/demo/edgeaegis-native.2c24d6106b040847.gif)
12
+
13
+ ## 目录
14
+
15
+ - `scr/`:引擎、HTTP 运行时、平台适配器、CLI、回源协议。
16
+ - `tools/`:维护工具和测试;依赖、构建、缓存、运行状态分别位于其下的 `node_modules/`、`.build/`、`.cache/`、`.state/`。
17
+ - `rules/`:完整上游源码包、同步配置、白名单和用户规则。
18
+ - `secret/`:项目凭据和回源密钥;实际文件不进入 Git 或 npm。
19
+ - `origin/{cloudflare,vercel,netlify,esa,edgeone}/<业务>/`:各平台自己的回源配置和可选业务函数。
20
+ - `respond/`:用户自定义拦截 HTML、JSON。
21
+
22
+ 普通设置在根目录 `config.yml`,GitHub Actions 使用标准 `.github/` 目录。本文是唯一说明文档;许可证单独保留。
23
+
24
+ ## SecLang 引擎
25
+
26
+ 当前锁定 OWASP CRS v4.30.0,提交 `e03a4f6dabc7a30ebd8c52c97d28a154f590a48f`。原始 setup、所有规则及引用的数据文件一起加载:693 条 SecRule、8 条 SecAction,共 701 个执行步骤、628 条根规则。编译器核对每条源规则;缺失文件、重复 ID 和不支持的语义使严格加载失败,不完整的程序不能执行。
27
+
28
+ 实现 CRS 使用的变量集合、计数、选择和排除、PCRE2、转换链、multiMatch、宏、TX、capture、chain、phase 1–5、SecDefaultAction、setvar、initcol、skip/skipAfter、ctl、异常评分及匹配日志。请求中断后仍执行 phase 5。实际解析 URL 编码、JSON、XML/XPath、multipart 和二进制请求;响应阶段检查源站返回的头与正文。
29
+
30
+ 编译时为每个阶段建立保留源文件顺序的指令索引,标记在各阶段保持可见,减少运行时扫描其他阶段的开销;没有变量排除或白名单时不重复分配、检查空列表。优化不缓存规则决策、TX 状态或匹配结果。
31
+
32
+ 变量宏通过同一套变量解析器读取请求、正文错误、Cookie、参数和响应数据,遵守对应阶段的可见性。TX 始终读取当前事务状态,正文处理控制发生改变时仍重新解析所需正文。请求目标与默认正文处理器只初始化一次;集合只刷新正在访问的记录,在容量不足时清理过期记录,保留其他仍有效的状态。动作合并默认策略后完整编译一次。
33
+
34
+ PCRE2 和 libinjection 仅作为匹配原语库,通过自研 WASM 适配层调用,来源、哈希及许可证在 `scr/seclang/vendor/`。规则解析、事务、状态与决策由 EdgeAegis 实现,不依赖第三方 WAF 引擎,没有正则翻译、RE2 回退或按平台裁剪规则。
35
+
36
+ 兼容范围以锁定的完整 CRS 和执行回归为依据。Apache 服务器配置、外部脚本等不属于已验证的规则指令范围。
37
+
38
+ ## 版本
39
+
40
+ EdgeAegis 的首个正式版本为 `2026.10.1`,版本号采用 `年.月.本月正式发布序号`。更名前的发布属于测试历史,不延续为新包的正式版本序列。
41
+
42
+ ## 安装和运行
43
+
44
+ ```sh
45
+ npm install
46
+ npm run start:local
47
+ ```
48
+
49
+ 安装会把依赖放到 `tools/node_modules/`、编译到 `tools/.build/`,并仅在密钥文件不存在时创建随机凭据。已有密钥不会被覆盖。
50
+
51
+ npm 包名为 `edgeaegis`。独立 CLI 初始化新项目后,即可使用相同的 npm 部署命令:
52
+
53
+ ```sh
54
+ npm exec --package=edgeaegis -- edgeaegis init my-firewall
55
+ cd my-firewall
56
+ npm install
57
+ npm run deploy:local
58
+ ```
59
+
60
+ 发布流程在 `.github/workflows/publish.yml`。`main` 的版本文件 `scr/core/version.ts` 更新后自动触发,也可在 `main` 手动执行;package.json 和 CLI 版本必须一致。它完成引擎、完整 CRS、打包安装和 Worker 构建验证后,发布同一份经过哈希核验的 npm 归档,等待 npm 开放安装并核对归档哈希,验证 `latest` 已指向该版本。npm trusted publisher 指定 GitHub 仓库 `jsw-teams/edgeaegis`、工作流 `publish.yml`,Environment 留空;Allowed actions 允许直接发布。`npm publish --tag latest` 在版本开放下载后推进标签,工作流只读核验标签,无需额外的 dist-tag 管理权限。认证使用 OIDC,无需把 npm token 放进仓库。
61
+
62
+ 修改 config.yml 的 platform、域名、路由和监听地址。Node/VPS 读取选定平台的 `origin/<平台>/<业务>/config.yml`;没有单独的 Node 业务目录。默认监听回环地址,公网由自己的 TLS 入口承接。容器需要挂载自己的 secret,并按容器网络配置监听地址。
63
+
64
+ 凭据均来自项目文件,不使用 Secret 环境绑定。云端私有构建会打包所需凭据,产物不能作为公开静态资源或 npm 包发布。Node 支持规则、白名单和自定义回应热更新;业务代码或监听地址修改后重启。
65
+
66
+ ## 回源
67
+
68
+ 每条路由必须通过 `business` 选择业务名。例如同一 EdgeOne 部署可以使用 `origin/edgeone/shop/index.js` 处理商城函数,`origin/edgeone/orders/config.yml` 回源订单 VPS,`origin/edgeone/search/config.yml` 回源搜索服务的负载均衡 CNAME。各业务配置独立,不能通过请求参数更换源站;同一引擎检查所有业务的请求和响应。构建只包含当前平台被路由引用的业务。
69
+
70
+ ```yaml
71
+ routes:
72
+ - path: /shop
73
+ business: shop
74
+ methods: [GET]
75
+ authenticated: false
76
+ - path: /orders
77
+ business: orders
78
+ methods: [GET, POST]
79
+ authenticated: false
80
+ body: text
81
+ - path: /search
82
+ business: search
83
+ methods: [GET]
84
+ authenticated: false
85
+ ```
86
+
87
+ 在各自的 `origin/<平台>/<业务>/config.yml` 选择模式。普通代理支持 VPS IPv4/IPv6、域名和负载均衡 CNAME:
88
+
89
+ ```yaml
90
+ platform: cloudflare
91
+ mode: proxy
92
+ url: https://lb.business.example
93
+ ```
94
+
95
+ 也可填写 `https://192.0.2.10` 或 `https://[2001:db8::1]:8443`。使用正常 HTTPS 证书校验,不关闭验证。配置固定源站,拒绝跟随重定向;清理转发头,加入来自 secret 的 `x-shield-origin-auth`。外部业务应验证该令牌,避免绕过防火墙直连源站。请求和源站响应均经过同一个 SecLang 引擎。
96
+
97
+ 平台内业务函数使用 `mode: function`,由 `origin/<平台>/<业务>/index.js` 默认导出的 `fetch(request)` 处理。默认业务只有健康检查,其他路径返回 404。构建器拒绝跨平台引用其他业务文件;代理模式不会加载这些函数。
98
+
99
+ 加密中继可部署在 VPS 或支持 WebCrypto 的云函数:
100
+
101
+ ```sh
102
+ npm run relay:init
103
+ node tools/.build/scr/cli/main.js serve-relay secret/relay-server.yml
104
+ ```
105
+
106
+ 密钥在 `secret/relay/`,服务器配置由 `secret/relay-server.example.yml` 初始化。云端只读取公钥和认证密钥,服务器私钥留在回源端:
107
+
108
+ ```yaml
109
+ platform: cloudflare
110
+ mode: relay
111
+ endpoint: https://relay.example/_edgeshield/relay
112
+ publicKeyFile: ../../../secret/relay/public.jwk
113
+ authenticationKeyFile: ../../../secret/relay/authentication.key
114
+ ```
115
+
116
+ 协议使用 ECDH、HKDF、双向 AES-GCM、HMAC、请求绑定和时间窗口,VPS 用 SQLite 持久化防重放。保留二进制正文和多个 Set-Cookie,并限制实际字节数和读取时间。Node 中继默认监听回环地址,需放在 HTTPS 入口后;云函数可通过 `/relay` 的 `createRelayServer` 接入自己的原子性持久化 ReplayStore。
117
+
118
+ ## 按平台构建、启动和部署
119
+
120
+ ```sh
121
+ npm run build:cloudflare
122
+ npm run start:cloudflare
123
+ npm run deploy:cloudflare
124
+ # 平台名同样支持 vercel、netlify、esa、edgeone、local。
125
+ # 先构建并查看部署命令,不执行云端操作:
126
+ node tools/.build/scr/cli/main.js deploy vercel config.yml --plan
127
+ ```
128
+
129
+ 独立安装的 npm CLI 使用 `edgeaegis build <平台> config.yml`、`edgeaegis start <平台> config.yml`、`edgeaegis deploy <平台> config.yml`。本地 build 严格验证完整规则与配置,start/deploy 启动同一个 Node 服务。
130
+
131
+ 云平台命令先构建当前平台,再调用项目已安装的官方 CLI:Cloudflare 为 wrangler,Vercel 为 vercel,Netlify 为 netlify-cli,ESA 为 esa-cli,EdgeOne 为 edgeone。先在自己的部署项目安装对应工具并完成登录及项目关联;启动、部署使用工具自身的权限,不增加引擎环境变量。
132
+
133
+ 私有产物在部署项目的 `tools/.build/<平台>/`,其中 `deploy/` 只包含该平台需要的部署文件。Vercel 的私有代码放在 api/index.mjs,Netlify 的静态 public 目录保持为空。不要把整个私有构建目录发布为静态资源。Cloudflare 使用静态 WASM;其他入口加载相同 WASM 字节。Vercel 使用 Node Functions,Netlify 使用 Fetch 函数,ESA 使用 Fetch 入口,EdgeOne 使用 onRequest 入口。平台自己的载荷、CPU 和内存限制仍然适用。
134
+
135
+ CRS 的 REQUEST_PROTOCOL、REQUEST_LINE 和 REMOTE_ADDR 需要真实传输信息。Cloudflare 读取平台信息,Node 读取连接元数据。其他 Fetch 入口要求由可信入口用 `secret/credentials.yml` 的 ingressKey 签名传递原始协议/IP;缺失或伪造返回 503,不会编造 HTTP/1.1 或跳过相关规则。
136
+
137
+ `edgeaegis/ingress` 的 `createIngressForwarder(destination, ingressKey)` 可接入现有可信 Node/Worker 入口,调用时传入实际 httpProtocol、verifiedClientIp,以及可用的 rawTarget。签名绑定方法、目标、原始 URL、元数据和时间戳;后端恢复请求再执行完整 CRS。客户端自报的转发头不能作为可信元数据。
138
+
139
+ ## 请求次数与缓存成本
140
+
141
+ 静态 HTML、指纹 CSS/JS 和图片应交给平台静态资源服务,动态业务才进入函数。Cloudflare 的 assets 默认先匹配静态文件,`run_worker_first` 只列需要引擎处理的动态路径;不要设为全站 `true`。资产服务返回的文件不会执行 SecLang,不应存放需鉴权或请求检查的业务数据。其他平台应使用各自静态托管目录,私有构建目录不能公开。
142
+
143
+ 动态业务可以显式启用浏览器缓存,适用于不因用户身份变化的公开内容:
144
+
145
+ ```yaml
146
+ routes:
147
+ - path: /catalog
148
+ business: shop
149
+ methods: [GET, HEAD]
150
+ authenticated: false
151
+ browserCache:
152
+ maxAgeSeconds: 120
153
+ ```
154
+
155
+ 源站还必须明确返回 `Cache-Control: public, max-age=N`;引擎取源站与配置中较短的期限,输出 `private, max-age=N, must-revalidate`。浏览器在有效期内直接复用正文,从而减少网络请求和函数调用。保留 Date、Age、ETag 与 Vary,并加入 Cookie/Authorization 的 Vary;认证、Cookie、Set-Cookie、强制刷新、错误回应、私有源站回应及 WebSocket 均不启用。默认仍为 no-store;TTL 可配置为 1–86400 秒。内容更新在 TTL 到期或客户端刷新后可见,应按业务的新鲜度要求设置。
156
+
157
+ 每个实际到达引擎的请求仍执行完整规则,缓存不复用防火墙决策。引擎没有服务端响应缓存,也不会用 304 冒充免调用。Cloudflare 的 `caches.default` 命中仍先执行 Worker;新版 Workers Cache 能减少执行 CPU,但其缓存命中仍按 Worker 请求计费,而且会绕开该次规则执行,因此本项目不自动启用。参见 [静态资源计费](https://developers.cloudflare.com/workers/static-assets/billing-and-limitations/) 和 [Workers 请求计费](https://developers.cloudflare.com/workers/platform/pricing/)。实时流、写入和鉴权请求保持动态执行;调用次数不能仅靠降低 CPU 或延长服务端缓存变成零。
158
+
159
+ ## 原生规则与临时防护
160
+
161
+ 规则入口按 setupRulesFile、secLangFile、localRulesFile 的顺序加载,分别用于前置策略、完整上游规则和用户后置规则。缺失 Include、数据文件、重复 ID 或不支持的语义都会阻止加载;引擎不写规则转换器,不将其他规则语言转换为 SecLang 或旧 IR。
162
+
163
+ 默认 rules/setup.conf 已启用实际行为防护:同一 IP 瞬时超过 120 次请求(每秒恢复 20 次额度),或 60 秒内出现 3 次达到实际 CRS 拦截阈值的攻击,临时拒绝 300 秒。封禁期间的访问不会续期,到期恢复;普通低频访问不累计成永久封禁。阈值、窗口、TTL 和用户白名单都可修改,更新工具不会覆盖用户策略。
164
+
165
+ rules/emergency.conf 包含直接执行的原生 SecLang 虚拟补丁,目前针对 CVE-2025-29927 拒绝外部携带的 x-middleware-subrequest 头,包括空值;依据 [Next.js 官方应急措施](https://github.com/vercel/next.js/security/advisories/GHSA-f82v-jwr5-mffw)。该文件由维护者更新并运行回归测试,不把 CVE 目录条目自动宣称为已防护。重复命中此补丁也参与临时封禁。
166
+
167
+ 原生 SecLang 规则可直接引用原始数据文件,无需生成规则代码。例如下面的规则会实际阻止列表中 IP/CIDR 发起的请求:
168
+
169
+ ```apache
170
+ # threat-networks.txt 必须是用户选定、校验过的 IP/CIDR 列表;此处不默认启用任何第三方黑名单。
171
+ SecRule REMOTE_ADDR "@ipMatchFromFile threat-networks.txt" "id:1000400,phase:1,deny,status:403,log"
172
+ SecRule ARGS "@pmFromFile threat-phrases.txt" "id:1000401,phase:2,deny,status:403,log"
173
+ ```
174
+
175
+ 文件路径相对规则源文件解析。支持多个文件、IPv4/IPv6 与 CIDR,保留短语匹配和 capture 语义;无效网络或缺失文件使严格编译失败。文件可以使用 .data、.txt、.ipset、.list 扩展名。HTTP 参数中的域名短语匹配不等于 DNS 或出站流量防火墙。
176
+
177
+ [OWASP CRS](https://coreruleset.org/) 是当前完整验证的原生规则源;[Atomicorp](https://docs.atomicorp.com/gotrootModsec/) 也发布原生 SecLang 规则,但需要相应授权和私有规则文件,尚未在本项目验证整套兼容性,不会复制进公有仓库。多个原生来源通过 rules/seclang-upstreams.json 配置,直接加载原文;发现缺失语义时补齐引擎并测试,不能删规则制造通过率。
178
+
179
+ 纯 Worker 的集合属于当前引擎实例,不能提供跨实例、跨区域或重启后的全局计数。到期在访问时核验,不依赖实例存活到某个定时器;不会在平台上遗留需要额外清理的远程封禁规则。未知载荷的突发行为同样执行上述封禁,不依赖载荷恰好命中某个 CVE 签名。
180
+
181
+ ## 白名单与拦截回应
182
+
183
+ `rules/allowlist.yml` 支持全局、规则 ID、路径/前缀、方法、身份、IP/CIDR 和可选过期时间:
184
+
185
+ ```yaml
186
+ - id: trusted-search
187
+ skip: [rules]
188
+ ruleIds: ['942100']
189
+ path: /api
190
+ cidrs: [192.0.2.0/24]
191
+ ```
192
+
193
+ 省略 ruleIds 或填写 `['*']` 可豁免全部规则,也支持 sec- 前缀。默认没有豁免;白名单不绕过路由、认证、HTTP 边界或字节上限。
194
+
195
+ 在 `respond/403.html` 放完整 HTML,例如 EdgePress 构建页面,403.json 定义 JSON 回应;其他 4xx/5xx 使用相应文件名。HTML 不插入请求内容,CSP 在 config.yml 中配置,保留拦截状态与 HEAD 语义。
196
+
197
+ ## 上传与验证
198
+
199
+ 配置读取的 8 MB 上限与 HTTP 上传无关。limits.maxBodyBytes 控制实际上传字节,项目默认 8 MiB,最高可配置 16 MiB,不相信 Content-Length。完整 CRS 下验证大于 2 MiB 的 multipart 文件保真回源,普通恶意字段仍被检查。
200
+
201
+ 单个转换值上限 2 MiB;PCRE2 的步数、深度、内存以及状态集合有资源边界。超限中止并拒绝,不能当作不匹配放行。压缩请求正文及原始 gRPC 帧未提供入口。显式 websocket 路由检查真实握手及 101 响应头,保持平台原生二进制消息;升级后的不透明消息不交给 SecLang 检查。
202
+
203
+ ```sh
204
+ npm run test:crs
205
+ node tools/sync-native-seclang.mjs --latest
206
+ # npm CLI 也提供相同的严格同步器
207
+ edgeaegis sync --registry rules/seclang-upstreams.json --output rules/seclang-bundle.json
208
+ npm run check
209
+ npm run cloudflare:dry-run
210
+ npm run audit
211
+ ```
212
+
213
+ rules/seclang-upstreams.json 支持多个来源。同步核对不可变 Git blob 和 SHA-256,严格加载全部源码,核对每条规则的执行指令,再运行正常/攻击/响应及性能回归,全部通过后原子替换源码包。GitHub Actions 每 6 小时验证并更新 main,用户规则、白名单和凭据不参与同步。
214
+
215
+ CI 覆盖 Linux/Windows、Node 22/24;包括完整 CRS PL1–4、五平台构建入口、真实 workerd、capture/chain/TX/ctl、误杀、SQLi/XSS/LFI/RCE、官方 WebShell 响应签名、上传、回源、防重放、TTL 指令、npm 独立安装和性能。没有用忽略规则或模拟匹配代替执行。本地验证不等于已在五家云账户部署。
package/config.yml ADDED
@@ -0,0 +1,29 @@
1
+ # Native SecLang deployment. Configure the public host, routes and origin before serving.
2
+ tenant: local
3
+ service: api
4
+ platform: cloudflare
5
+ publicHosts: [api.example]
6
+ secLangFile: rules/seclang-bundle.json
7
+ localRulesFile: rules/local.conf
8
+ setupRulesFile: rules/setup.conf
9
+ allowlistFile: rules/allowlist.yml
10
+ originDirectory: origin
11
+ secretFile: secret/credentials.yml
12
+ routes:
13
+ - business: app
14
+ path: /health
15
+ methods: [GET]
16
+ authenticated: false
17
+ - business: app
18
+ path: /api
19
+ methods: [GET, POST]
20
+ authenticated: false
21
+ body: text
22
+ listen:
23
+ host: 127.0.0.1
24
+ port: 8787
25
+ limits:
26
+ maxBodyBytes: 8388608
27
+ responses:
28
+ directory: respond
29
+ contentSecurityPolicy: "default-src 'none'; frame-ancestors 'none'"
@@ -0,0 +1,2 @@
1
+ mode: function
2
+ platform: cloudflare
@@ -0,0 +1,4 @@
1
+ export default { async fetch(request) {
2
+ if (new URL(request.url).pathname === '/health') return Response.json({ok:true});
3
+ return Response.json({error:'business_route_not_configured'},{status:404});
4
+ }};
@@ -0,0 +1,2 @@
1
+ mode: function
2
+ platform: edgeone
@@ -0,0 +1,4 @@
1
+ export default { async fetch(request) {
2
+ if (new URL(request.url).pathname === '/health') return Response.json({ok:true});
3
+ return Response.json({error:'business_route_not_configured'},{status:404});
4
+ }};
@@ -0,0 +1,2 @@
1
+ mode: function
2
+ platform: esa
@@ -0,0 +1,4 @@
1
+ export default { async fetch(request) {
2
+ if (new URL(request.url).pathname === '/health') return Response.json({ok:true});
3
+ return Response.json({error:'business_route_not_configured'},{status:404});
4
+ }};
@@ -0,0 +1,2 @@
1
+ mode: function
2
+ platform: netlify
@@ -0,0 +1,4 @@
1
+ export default { async fetch(request) {
2
+ if (new URL(request.url).pathname === '/health') return Response.json({ok:true});
3
+ return Response.json({error:'business_route_not_configured'},{status:404});
4
+ }};
@@ -0,0 +1,2 @@
1
+ mode: function
2
+ platform: vercel
@@ -0,0 +1,4 @@
1
+ export default { async fetch(request) {
2
+ if (new URL(request.url).pathname === '/health') return Response.json({ok:true});
3
+ return Response.json({error:'business_route_not_configured'},{status:404});
4
+ }};
package/package.json ADDED
@@ -0,0 +1,123 @@
1
+ {
2
+ "name": "edgeaegis",
3
+ "version": "2026.10.1",
4
+ "description": "First-party portable SecLang engine with complete OWASP CRS execution",
5
+ "license": "Apache-2.0",
6
+ "type": "module",
7
+ "engines": {
8
+ "node": ">=22.13"
9
+ },
10
+ "bin": {
11
+ "edgeaegis": "tools/.build/scr/cli/main.js"
12
+ },
13
+ "exports": {
14
+ ".": "./tools/.build/scr/runtime/index.js",
15
+ "./node": "./tools/.build/scr/runtime/node.js",
16
+ "./http-boundary": "./tools/.build/scr/http-boundary/index.js",
17
+ "./cloudflare-runtime": "./tools/.build/scr/adapters/cloudflare/runtime.js",
18
+ "./portable-runtime": "./tools/.build/scr/adapters/runtime.js",
19
+ "./ingress": "./tools/.build/scr/adapters/forward.js",
20
+ "./relay": "./tools/.build/scr/origin/relay.js",
21
+ "./relay/node": "./tools/.build/scr/origin/replay-node.js",
22
+ "./seclang": "./tools/.build/scr/seclang/index.js",
23
+ "./seclang/syntax": "./tools/.build/scr/seclang/syntax.js",
24
+ "./seclang/node": "./tools/.build/scr/seclang/node.js",
25
+ "./seclang/pcre2.wasm": "./tools/.build/scr/seclang/vendor/pcre2.wasm",
26
+ "./seclang/libinjection.wasm": "./tools/.build/scr/seclang/vendor/libinjection.wasm",
27
+ "./deployment": "./tools/.build/scr/cli/deployment.js",
28
+ "./config": "./tools/.build/scr/config.js",
29
+ "./responses": "./tools/.build/scr/runtime/error-pages.js"
30
+ },
31
+ "files": [
32
+ "tools/.build/scr",
33
+ "config.yml",
34
+ "README.md",
35
+ "LICENSE",
36
+ "NOTICE",
37
+ "rules/seclang-bundle.json",
38
+ "rules/seclang-upstreams.json",
39
+ "rules/allowlist.yml",
40
+ "rules/local.conf",
41
+ "rules/setup.conf",
42
+ "rules/emergency.conf",
43
+ "secret/credentials.example.yml",
44
+ "secret/relay-server.example.yml",
45
+ "origin",
46
+ "respond",
47
+ "tools/sync-native-seclang.mjs",
48
+ "tools/verify-full-crs.mjs",
49
+ "tools/build-platform.mjs",
50
+ "tools/platform-command.mjs"
51
+ ],
52
+ "scripts": {
53
+ "build": "node tools/clean-build.mjs && node tools/run.mjs tsc -p tsconfig.build.json && node tools/copy-seclang-assets.mjs",
54
+ "typecheck": "node tools/run.mjs tsc --noEmit",
55
+ "lint": "node tools/run.mjs biome check scr tools",
56
+ "format": "node tools/run.mjs biome check --write scr tools",
57
+ "secret:init": "node tools/init-secret.mjs",
58
+ "relay:init": "node tools/init-relay.mjs",
59
+ "test": "node --import ./tools/node_modules/tsx/dist/loader.mjs --test tools/tests/*.test.ts",
60
+ "test:unit": "node --import ./tools/node_modules/tsx/dist/loader.mjs --test tools/tests/seclang-*.test.ts tools/tests/allowlist.test.ts tools/tests/error-pages.test.ts tools/tests/dependency-maintenance.test.ts",
61
+ "test:integration": "node --import ./tools/node_modules/tsx/dist/loader.mjs --test tools/tests/proxy.test.ts tools/tests/serve.test.ts",
62
+ "test:security": "node --import ./tools/node_modules/tsx/dist/loader.mjs --test tools/tests/security.test.ts",
63
+ "serve": "node tools/.build/scr/cli/main.js serve config.yml",
64
+ "test:crs": "node tools/sync-native-seclang.mjs",
65
+ "verify:package": "node tools/verify-package.mjs",
66
+ "check": "npm run version:check && npm run typecheck && npm run lint && npm test && npm run build && npm run check:edge && npm run verify:package",
67
+ "check:edge": "node --experimental-vm-modules tools/check-edge.mjs",
68
+ "test:workerd": "node --import ./tools/node_modules/tsx/dist/loader.mjs --test tools/tests/seclang-workerd.test.ts",
69
+ "cloudflare:dry-run": "node tools/cloudflare-dry-run.mjs",
70
+ "version": "node tools/sync-version.mjs",
71
+ "version:check": "node tools/sync-version.mjs --check",
72
+ "prepare": "node tools/bootstrap.mjs && node tools/init-secret.mjs && npm run build",
73
+ "audit": "node tools/audit-dependencies.mjs moderate",
74
+ "deps:repair": "node .github/actions/dependency-maintenance/repair.mjs",
75
+ "build:cloudflare": "node tools/.build/scr/cli/main.js build cloudflare",
76
+ "start:cloudflare": "node tools/.build/scr/cli/main.js start cloudflare",
77
+ "deploy:cloudflare": "node tools/.build/scr/cli/main.js deploy cloudflare",
78
+ "build:vercel": "node tools/.build/scr/cli/main.js build vercel",
79
+ "start:vercel": "node tools/.build/scr/cli/main.js start vercel",
80
+ "deploy:vercel": "node tools/.build/scr/cli/main.js deploy vercel",
81
+ "build:netlify": "node tools/.build/scr/cli/main.js build netlify",
82
+ "start:netlify": "node tools/.build/scr/cli/main.js start netlify",
83
+ "deploy:netlify": "node tools/.build/scr/cli/main.js deploy netlify",
84
+ "build:esa": "node tools/.build/scr/cli/main.js build esa",
85
+ "start:esa": "node tools/.build/scr/cli/main.js start esa",
86
+ "deploy:esa": "node tools/.build/scr/cli/main.js deploy esa",
87
+ "build:edgeone": "node tools/.build/scr/cli/main.js build edgeone",
88
+ "start:edgeone": "node tools/.build/scr/cli/main.js start edgeone",
89
+ "deploy:edgeone": "node tools/.build/scr/cli/main.js deploy edgeone",
90
+ "build:local": "node tools/.build/scr/cli/main.js build local",
91
+ "start:local": "node tools/.build/scr/cli/main.js start local",
92
+ "deploy:local": "node tools/.build/scr/cli/main.js deploy local"
93
+ },
94
+ "dependencies": {
95
+ "@noble/hashes": "^2.4.0",
96
+ "@xmldom/xmldom": "^0.9.12",
97
+ "ipaddr.js": "^2.5.0",
98
+ "xpath": "^0.0.35",
99
+ "yaml": "^2.9.1",
100
+ "esbuild": "^0.28.2"
101
+ },
102
+ "devDependencies": {
103
+ "@biomejs/biome": "2.6.3",
104
+ "@types/node": "^26.6.5",
105
+ "acorn": "^8.19.0",
106
+ "miniflare": "5.20261019.2-beta",
107
+ "tsx": "^4.23.15",
108
+ "typescript": "^7.0.2",
109
+ "wrangler": "^4.152.0"
110
+ },
111
+ "overrides": {
112
+ "miniflare": {
113
+ "undici": "^7.30.1"
114
+ }
115
+ },
116
+ "repository": {
117
+ "type": "git",
118
+ "url": "git+https://github.com/jsw-teams/edgeaegis.git"
119
+ },
120
+ "publishConfig": {
121
+ "access": "public"
122
+ }
123
+ }
@@ -0,0 +1,2 @@
1
+ <!doctype html>
2
+ <html lang="zh-CN"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>请求未通过安全检查</title></head><body><main><h1>请求未通过安全检查</h1><p>请检查提交内容。若你认为这是误判,请联系站点管理员。</p></main></body></html>
@@ -0,0 +1 @@
1
+ {"error":"request_blocked","message":"请求未通过安全检查;如有疑问请联系站点管理员。"}