Compare commits
666 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6d871e638b | ||
|
|
ad2aeb4cf9 | ||
|
|
8247d11dda | ||
|
|
63588b8f5e | ||
|
|
bf8d64c6b2 | ||
|
|
0b8b253efc | ||
|
|
24e2bac1bd | ||
|
|
8113dbb171 | ||
|
|
66c4e60255 | ||
|
|
eeae48affb | ||
|
|
75a5346e6f | ||
|
|
b6f694a376 | ||
|
|
9cab30cef1 | ||
|
|
8fd59844ea | ||
|
|
681e7f95f2 | ||
|
|
84c2db9ee3 | ||
|
|
c845231a1d | ||
|
|
91a26b8f93 | ||
|
|
24770cf5b4 | ||
|
|
ff4d6616fb | ||
|
|
a13d269c28 | ||
|
|
19db896a9a | ||
|
|
01c38c26d0 | ||
|
|
14fb45f648 | ||
|
|
f371d588a4 | ||
|
|
1317b3ed5a | ||
|
|
7fdf63310d | ||
|
|
1578ea6027 | ||
|
|
ec3dc96765 | ||
|
|
48e828cc03 | ||
|
|
78e71aae23 | ||
|
|
857e0c46ef | ||
|
|
8cee76ecbe | ||
|
|
6abcb6b69f | ||
|
|
075bd524a9 | ||
|
|
5a96c2d4d0 | ||
|
|
8de97ff483 | ||
|
|
b7449480b3 | ||
|
|
38f00302bf | ||
|
|
850fd440ff | ||
|
|
b243e2b51d | ||
|
|
34fc8fa8e5 | ||
|
|
6ceeae4d2b | ||
|
|
abd0427273 | ||
|
|
82f0c5d52e | ||
|
|
c7fa1efe5d | ||
|
|
be0571a67f | ||
|
|
a79d932801 | ||
|
|
8157ef050e | ||
|
|
04d1891891 | ||
|
|
1d7eeeba36 | ||
|
|
52f6e857df | ||
|
|
255fd4173d | ||
|
|
1a80a5ac07 | ||
|
|
6324dea166 | ||
|
|
695c438ec3 | ||
|
|
bb0b1187a0 | ||
|
|
ba84cc5380 | ||
|
|
e7f6a66083 | ||
|
|
9086cf52d4 | ||
|
|
b853673100 | ||
|
|
381f2cba28 | ||
|
|
37d37728ca | ||
|
|
a1f151eed6 | ||
|
|
0e88a09fcf | ||
|
|
644943fac1 | ||
|
|
41888dcff7 | ||
|
|
c0dfa51925 | ||
|
|
8d66f96228 | ||
|
|
b7a2e86c5e | ||
|
|
078ef2a3ce | ||
|
|
49deca7ce5 | ||
|
|
53a955b439 | ||
|
|
d4f31efdea | ||
|
|
c3f064fa4c | ||
|
|
233ac9547c | ||
|
|
5d73a333d0 | ||
|
|
e443cd47c0 | ||
|
|
2f61ebaf85 | ||
|
|
9fe9ff3ef1 | ||
|
|
a75123c86d | ||
|
|
599a6903a9 | ||
|
|
bf87488eff | ||
|
|
c2c3fe32fb | ||
|
|
a18cc16b33 | ||
|
|
3efdd3fff5 | ||
|
|
9d156c65ba | ||
|
|
8f575dc232 | ||
|
|
e44e88c136 | ||
|
|
3f8187ae6c | ||
|
|
de7307fbda | ||
|
|
2685813f4d | ||
|
|
78912d064e | ||
|
|
e1e801cec8 | ||
|
|
71b14ddcb0 | ||
|
|
f851033a7a | ||
|
|
82a2e4473a | ||
|
|
c6f5467000 | ||
|
|
2c7f0f94c5 | ||
|
|
e2672c93e2 | ||
|
|
4e033ed5f3 | ||
|
|
d060377caa | ||
|
|
07900ac11d | ||
|
|
cf62e2c07e | ||
|
|
e63799dd78 | ||
|
|
da209259cd | ||
|
|
3d9420095b | ||
|
|
86689954c0 | ||
|
|
b3238a462d | ||
|
|
b087450844 | ||
|
|
3c2ebf308b | ||
|
|
9476db4119 | ||
|
|
35acf92d5b | ||
|
|
b776a2a598 | ||
|
|
afc47d4faa | ||
|
|
3a20f0a8f5 | ||
|
|
325e169d7d | ||
|
|
2a549cae19 | ||
|
|
5917c2f184 | ||
|
|
1b642fd9c4 | ||
|
|
82a1cacd30 | ||
|
|
61302eb183 | ||
|
|
8a22751ade | ||
|
|
9c76cdd002 | ||
|
|
70c3820e5a | ||
|
|
0bda186500 | ||
|
|
135bf69301 | ||
|
|
d05cfc3ef8 | ||
|
|
259d955117 | ||
|
|
9736a5a9f3 | ||
|
|
8234d91cc3 | ||
|
|
e6e01d9b74 | ||
|
|
952f45ad91 | ||
|
|
663ffc2205 | ||
|
|
8d4a2de07e | ||
|
|
3f0d660442 | ||
|
|
556806d51b | ||
|
|
fb0ca88f7a | ||
|
|
1f3f7262e0 | ||
|
|
f01652de22 | ||
|
|
8f5011f115 | ||
|
|
cff31476c7 | ||
|
|
7cd0715069 | ||
|
|
1f34169810 | ||
|
|
6eee29ce37 | ||
|
|
ed7cf06c6f | ||
|
|
6c2fd034e0 | ||
|
|
2063a70118 | ||
|
|
a68b0480c1 | ||
|
|
211791ef43 | ||
|
|
264ee5d446 | ||
|
|
9deff5b3c4 | ||
|
|
1f9d7e1a64 | ||
|
|
693fc720e7 | ||
|
|
3dbdcc3362 | ||
|
|
b1972de75e | ||
|
|
f54e92262d | ||
|
|
dd1f2a50f2 | ||
|
|
8588f99e06 | ||
|
|
8d0fed67cf | ||
|
|
fd03453bd6 | ||
|
|
f723bbfc24 | ||
|
|
eef8eeb92c | ||
|
|
171c77af46 | ||
|
|
272195d9ad | ||
|
|
a343f50281 | ||
|
|
04306c2afc | ||
|
|
8844d0af7d | ||
|
|
834921f7b4 | ||
|
|
83318dfbd4 | ||
|
|
3553ac821e | ||
|
|
2283c1ab5a | ||
|
|
bca9cba2eb | ||
|
|
97dbf6b85c | ||
|
|
16cf7385e1 | ||
|
|
5fb5277205 | ||
|
|
97e71288ce | ||
|
|
585b5e441c | ||
|
|
6561a780ab | ||
|
|
bf9245ec27 | ||
|
|
992488972a | ||
|
|
6e109d7187 | ||
|
|
8d62dedcc1 | ||
|
|
593359fa6f | ||
|
|
e85277811e | ||
|
|
51294b5016 | ||
|
|
72334ede65 | ||
|
|
22e8b6f475 | ||
|
|
3f186c046c | ||
|
|
ec218b269e | ||
|
|
f92f87be15 | ||
|
|
624cddcf7b | ||
|
|
6d56781e6d | ||
|
|
86b6bb3441 | ||
|
|
fac90ae03d | ||
|
|
3cd6cc6d3b | ||
|
|
08945b90d0 | ||
|
|
771676b544 | ||
|
|
150e7778f5 | ||
|
|
1ee3a2f161 | ||
|
|
74b5324d2b | ||
|
|
89ec86a4fe | ||
|
|
c8df3d0244 | ||
|
|
edfa792613 | ||
|
|
cc591c1a6c | ||
|
|
c6173276db | ||
|
|
23a75fd21d | ||
|
|
65a940d3ef | ||
|
|
1116a9ae22 | ||
|
|
6235b4d976 | ||
|
|
def3645c9a | ||
|
|
7b292c600c | ||
|
|
d8fcc611c9 | ||
|
|
24f7bb674e | ||
|
|
8a8b1e0608 | ||
|
|
206769369a | ||
|
|
034ee1c5f1 | ||
|
|
f450c38625 | ||
|
|
e1c4b67b96 | ||
|
|
787a4e104d | ||
|
|
65356be165 | ||
|
|
8600dc7b22 | ||
|
|
c9cac7d161 | ||
|
|
b207aace79 | ||
|
|
bb2dab1694 | ||
|
|
83760a1c26 | ||
|
|
b79c01e695 | ||
|
|
1110eedad8 | ||
|
|
71153d0d1b | ||
|
|
535ed97363 | ||
|
|
d50879cd31 | ||
|
|
dc726f35fc | ||
|
|
9177ba2cd3 | ||
|
|
91252b39c3 | ||
|
|
6ff20821a6 | ||
|
|
2a452e7e00 | ||
|
|
6e000a1163 | ||
|
|
8fe49e356b | ||
|
|
c93bba9cab | ||
|
|
82a7a4d224 | ||
|
|
60dc4dd14d | ||
|
|
16f8852d05 | ||
|
|
7028592b4c | ||
|
|
a3bf0edab3 | ||
|
|
50f75d8c77 | ||
|
|
f58855d385 | ||
|
|
c69293f787 | ||
|
|
054b6e1fa2 | ||
|
|
c0d563855a | ||
|
|
c229d86ef9 | ||
|
|
5ff3b69fe4 | ||
|
|
58a9552d04 | ||
|
|
afbe426448 | ||
|
|
cbdd538ecb | ||
|
|
e82d692665 | ||
|
|
bb4e9eca9f | ||
|
|
b74cc5600a | ||
|
|
43e5fd4c43 | ||
|
|
2666952087 | ||
|
|
9963e9c4c8 | ||
|
|
5ed5677e83 | ||
|
|
abbcc93fdc | ||
|
|
6abab2eac9 | ||
|
|
22cc37a1ee | ||
|
|
cbb2b2e275 | ||
|
|
822995e0d3 | ||
|
|
5dd94ca743 | ||
|
|
a6aec88455 | ||
|
|
671654206e | ||
|
|
faba892880 | ||
|
|
6abd504909 | ||
|
|
ec1ef66fb4 | ||
|
|
0dafcac061 | ||
|
|
f900dba08b | ||
|
|
ad4bf766cf | ||
|
|
aa695d5e59 | ||
|
|
ca0c55c035 | ||
|
|
a45a7f5593 | ||
|
|
a8df77d297 | ||
|
|
9c30d44d51 | ||
|
|
aab1852737 | ||
|
|
af908bc7ef | ||
|
|
905b19dce7 | ||
|
|
16f5205693 | ||
|
|
aec9095d7e | ||
|
|
8232677658 | ||
|
|
94b6fabc5f | ||
|
|
d65f689b26 | ||
|
|
9da2f189b4 | ||
|
|
d1e007cdc0 | ||
|
|
1cff17ea6d | ||
|
|
4c3b955b92 | ||
|
|
6e04f0b10f | ||
|
|
4a7ad7527e | ||
|
|
dd66ebc5c1 | ||
|
|
93698a7fe9 | ||
|
|
50a250c2a6 | ||
|
|
a469450be1 | ||
|
|
f3475a362f | ||
|
|
e10ccaf440 | ||
|
|
9748d8587f | ||
|
|
a66b82d878 | ||
|
|
d081ae11ea | ||
|
|
37960b6c70 | ||
|
|
f92b914551 | ||
|
|
e5ede1c94f | ||
|
|
75c9510aa5 | ||
|
|
3593b12c67 | ||
|
|
80e2616c19 | ||
|
|
b61a1bd169 | ||
|
|
d0165d5a1c | ||
|
|
3a549322af | ||
|
|
7d5328d7e6 | ||
|
|
9d4b987c93 | ||
|
|
ac15c5f015 | ||
|
|
7d0dcf828c | ||
|
|
fa642c12c9 | ||
|
|
a4a178bdfd | ||
|
|
43c40ec29f | ||
|
|
e967686adc | ||
|
|
58f65d6cca | ||
|
|
6941f74d2e | ||
|
|
7971e0ae5a | ||
|
|
8d7592a02b | ||
|
|
50b50d92bf | ||
|
|
812e878680 | ||
|
|
51b11777e4 | ||
|
|
e5e7b9a3af | ||
|
|
d87249c35b | ||
|
|
8a6bbf5ae6 | ||
|
|
060c3963d2 | ||
|
|
b0ff869012 | ||
|
|
2307d1bc2f | ||
|
|
5ab03f318a | ||
|
|
062da58867 | ||
|
|
5643069f99 | ||
|
|
004164a4c4 | ||
|
|
1da8bbd3ba | ||
|
|
a0656da78d | ||
|
|
ce98cfebfe | ||
|
|
84706be801 | ||
|
|
22aa38ea6b | ||
|
|
c1157d07c1 | ||
|
|
c078203533 | ||
|
|
b374a952ea | ||
|
|
134c9ed686 | ||
|
|
c9ec8061a6 | ||
|
|
e9f03d7579 | ||
|
|
4d5b93c350 | ||
|
|
a12ac7a1e5 | ||
|
|
f20d604d73 | ||
|
|
a76808ddd9 | ||
|
|
c645d6abc8 | ||
|
|
d7a412bab1 | ||
|
|
5313a354a5 | ||
|
|
680d0684bf | ||
|
|
3e758a40cf | ||
|
|
f447a350e4 | ||
|
|
3f3279a738 | ||
|
|
f44a4563e0 | ||
|
|
805131074d | ||
|
|
8faba5721e | ||
|
|
d7bd04d82d | ||
|
|
0e4ad790c1 | ||
|
|
20d30498f0 | ||
|
|
5d5085020e | ||
|
|
4228ad811d | ||
|
|
6ef0a622e7 | ||
|
|
fb930f83cd | ||
|
|
8e6ffcc97e | ||
|
|
f33dbb5c2b | ||
|
|
70f3e60ea9 | ||
|
|
eb926212c8 | ||
|
|
7a535aa59f | ||
|
|
e2c2abdc3c | ||
|
|
20fdfef58f | ||
|
|
c03749402a | ||
|
|
57b99170f7 | ||
|
|
f60c5f3ed1 | ||
|
|
769ea14e52 | ||
|
|
025d13670a | ||
|
|
d069ed0c3d | ||
|
|
64c61d42f9 | ||
|
|
0d1dde0205 | ||
|
|
97e6499d94 | ||
|
|
3b2bfa56f3 | ||
|
|
9a01aaeafd | ||
|
|
64dea93318 | ||
|
|
6401f3aba8 | ||
|
|
086c62a3ba | ||
|
|
1b31d3229a | ||
|
|
591e3598e6 | ||
|
|
0fbc727e0c | ||
|
|
e91f2d40d4 | ||
|
|
097c8f7676 | ||
|
|
150eec4585 | ||
|
|
ead80a58d7 | ||
|
|
a960361348 | ||
|
|
c80aff05bc | ||
|
|
694c5e35bd | ||
|
|
c236378f01 | ||
|
|
3e75e7c6b6 | ||
|
|
2bff3ecf9d | ||
|
|
6651db33a7 | ||
|
|
e7bccbaf6e | ||
|
|
bc91a9834f | ||
|
|
81edced29d | ||
|
|
1ef873dcc3 | ||
|
|
8d49f7045d | ||
|
|
dad3deb482 | ||
|
|
cd13c08a2f | ||
|
|
045ec5f44e | ||
|
|
094211f28f | ||
|
|
93c9739292 | ||
|
|
3a468d6af5 | ||
|
|
77adc02bd9 | ||
|
|
7ccea91046 | ||
|
|
6f264ce8d3 | ||
|
|
b108b6feff | ||
|
|
1692fff007 | ||
|
|
4f503d358a | ||
|
|
6c44959c49 | ||
|
|
e0fe48bebf | ||
|
|
f23da8a9b9 | ||
|
|
fcdcf124d5 | ||
|
|
fea6a0efa9 | ||
|
|
9f22ad048c | ||
|
|
ac7c858520 | ||
|
|
5d0a7f7a90 | ||
|
|
d4eeee14da | ||
|
|
09019fe38b | ||
|
|
bec7c51e9e | ||
|
|
9aceca264c | ||
|
|
8ef0770db2 | ||
|
|
ef8d0eefc4 | ||
|
|
1c67f1acc8 | ||
|
|
8e5d3a11a9 | ||
|
|
55fd344735 | ||
|
|
5a9a24d01f | ||
|
|
e59fe81244 | ||
|
|
ed6795b4cc | ||
|
|
d65df2a57f | ||
|
|
574e600974 | ||
|
|
e1d0b4058b | ||
|
|
397091015b | ||
|
|
341806a3bd | ||
|
|
d25144fe9d | ||
|
|
7a980b4b34 | ||
|
|
2c75cf70d5 | ||
|
|
24e55faeb8 | ||
|
|
78e73497b0 | ||
|
|
12e6ede7be | ||
|
|
d91b651273 | ||
|
|
1fb34fc49a | ||
|
|
39e93fad1c | ||
|
|
413453a1e7 | ||
|
|
9312ef2f48 | ||
|
|
f8d5861e5a | ||
|
|
99b09d8597 | ||
|
|
c9c9544d22 | ||
|
|
e7a7976774 | ||
|
|
a215268a10 | ||
|
|
88bfec45cd | ||
|
|
6d1c328402 | ||
|
|
2259c9984e | ||
|
|
50373094ad | ||
|
|
5930692edc | ||
|
|
58d57ee33a | ||
|
|
9c987a4bc7 | ||
|
|
ef5269f634 | ||
|
|
9166f87178 | ||
|
|
8963fdd7bf | ||
|
|
77f94765c6 | ||
|
|
34e08e7918 | ||
|
|
dc4fb861ef | ||
|
|
5e86861510 | ||
|
|
088d502d4b | ||
|
|
93ccb1e1f6 | ||
|
|
4abcbc03ae | ||
|
|
44487b3a8b | ||
|
|
f4dbf3bde5 | ||
|
|
bcdd0be188 | ||
|
|
c0b0bc6547 | ||
|
|
09505941db | ||
|
|
162f76a737 | ||
|
|
e2bcabff20 | ||
|
|
eaac017f82 | ||
|
|
ed838e6052 | ||
|
|
8814a0bb6f | ||
|
|
f8c63f7d86 | ||
|
|
124ec73684 | ||
|
|
2dbe8cd35e | ||
|
|
f896a21a9d | ||
|
|
e59e1da238 | ||
|
|
34c830d7cd | ||
|
|
3df9012906 | ||
|
|
6850295f78 | ||
|
|
ced4a0f4a0 | ||
|
|
045577348f | ||
|
|
b6297f289e | ||
|
|
2becd43537 | ||
|
|
1b58308ba6 | ||
|
|
37cbd0d4dd | ||
|
|
9d51bc9ea3 | ||
|
|
83b3108e80 | ||
|
|
72b7c2ae35 | ||
|
|
6504339a03 | ||
|
|
27fc67365e | ||
|
|
b79cce3876 | ||
|
|
9bf7bc8726 | ||
|
|
07c46a60b3 | ||
|
|
aa4ccb970e | ||
|
|
b91041ffb4 | ||
|
|
4f1ea17c9d | ||
|
|
5868a64e4a | ||
|
|
6e0e6db54c | ||
|
|
c8c0567af7 | ||
|
|
119a1a4e81 | ||
|
|
216534a08d | ||
|
|
19fc4f012c | ||
|
|
d4af84f541 | ||
|
|
fde7dd028f | ||
|
|
0c42fed05b | ||
|
|
60b99675fe | ||
|
|
4ecffeb27b | ||
|
|
9159135cc8 | ||
|
|
2cd5efa28c | ||
|
|
bec86edbd6 | ||
|
|
35df06a11b | ||
|
|
741ead2838 | ||
|
|
141562a9e8 | ||
|
|
e7ae886889 | ||
|
|
611b8b3940 | ||
|
|
ca6594a486 | ||
|
|
f72bdf1c94 | ||
|
|
eab8854001 | ||
|
|
372ac43cd7 | ||
|
|
7340e60038 | ||
|
|
be92a0dd3d | ||
|
|
dbe38a4038 | ||
|
|
7581d2acdb | ||
|
|
dbd3049dcc | ||
|
|
d3582a86ab | ||
|
|
2bed714344 | ||
|
|
071f25a737 | ||
|
|
de719ed5a6 | ||
|
|
d15bd8761a | ||
|
|
24a8d17575 | ||
|
|
434a08b2e4 | ||
|
|
5278c30b47 | ||
|
|
03986c0195 | ||
|
|
c6243e5107 | ||
|
|
533e92aa05 | ||
|
|
6665b93d64 | ||
|
|
151f111073 | ||
|
|
ff4be6263e | ||
|
|
584d43dca1 | ||
|
|
3b9c7cd477 | ||
|
|
1ab06110c6 | ||
|
|
babf43282c | ||
|
|
ae05e6bdc7 | ||
|
|
210005584a | ||
|
|
cc09295b0f | ||
|
|
6177b4bef0 | ||
|
|
7efa85996a | ||
|
|
ad03d47fce | ||
|
|
e725a162ba | ||
|
|
abd8ad79cd | ||
|
|
21a30a034e | ||
|
|
de2c3391bb | ||
|
|
9d08f8961c | ||
|
|
c22afe94fe | ||
|
|
d6322d70b3 | ||
|
|
271f910ea2 | ||
|
|
36c31c69e1 | ||
|
|
cc1c6615ee | ||
|
|
049227cc47 | ||
|
|
513e162f88 | ||
|
|
e014bdcdd3 | ||
|
|
bacef0218f | ||
|
|
5c6fdc2a20 | ||
|
|
53bece8dd9 | ||
|
|
f6785a8c1b | ||
|
|
8aaa49a3ae | ||
|
|
12acaac561 | ||
|
|
e2c97a21ec | ||
|
|
44c010d6ca | ||
|
|
2617f11206 | ||
|
|
b0b45adab9 | ||
|
|
5b69470712 | ||
|
|
000f1200f5 | ||
|
|
990bdfb0e4 | ||
|
|
ce4e3537fe | ||
|
|
be9ff24b77 | ||
|
|
86003359c3 | ||
|
|
6d47fcb5c9 | ||
|
|
bd86f3961e | ||
|
|
0f8f7fcdb2 | ||
|
|
a535d5c2b5 | ||
|
|
3649008951 | ||
|
|
1706e76c47 | ||
|
|
6781fad27d | ||
|
|
ddf2707bb1 | ||
|
|
2edc7a0c2e | ||
|
|
e8858f123c | ||
|
|
1f271aabc8 | ||
|
|
ced0a4d7d8 | ||
|
|
567d457e68 | ||
|
|
1c3d2c28ba | ||
|
|
fd20efde48 | ||
|
|
f0fd9a5051 | ||
|
|
8417fdffb0 | ||
|
|
14a00affa4 | ||
|
|
0a1b1df300 | ||
|
|
3dfed03f73 | ||
|
|
bcc44c71c4 | ||
|
|
ce9c4e847a | ||
|
|
a3c87f4a9b | ||
|
|
42b463e317 | ||
|
|
0a1ae23970 | ||
|
|
33e21284c4 | ||
|
|
550bc01b4d | ||
|
|
0f4fc83848 | ||
|
|
5cecf1ff6b | ||
|
|
6e419416b9 | ||
|
|
e46e4668a2 | ||
|
|
7f360e7b3c | ||
|
|
9e39f29044 | ||
|
|
858ad57fdb | ||
|
|
897ae3cf94 | ||
|
|
7169046f19 | ||
|
|
762347b476 | ||
|
|
2e9f937736 | ||
|
|
5690509887 | ||
|
|
8ed04c780d | ||
|
|
377d5da59c | ||
|
|
2fb6b487c4 | ||
|
|
6aac65e1e7 | ||
|
|
32c69668a4 | ||
|
|
5049af2ce0 | ||
|
|
4fd4d6632f | ||
|
|
1f183c80ff | ||
|
|
f1fe10d312 | ||
|
|
f5a888f655 | ||
|
|
9dc5cf4ba2 | ||
|
|
5b172b7e74 | ||
|
|
fad2178670 | ||
|
|
c886e2ec96 | ||
|
|
0e0e212fab | ||
|
|
51b9e6d740 | ||
|
|
f9080246c8 | ||
|
|
05c8ef5bdd | ||
|
|
15d3d333fa | ||
|
|
c1932eb469 | ||
|
|
09b4ed5bb7 | ||
|
|
e37f42d300 | ||
|
|
d3ff29342a | ||
|
|
490b1a1aff | ||
|
|
24606b6a92 | ||
|
|
327306ae2e | ||
|
|
2c9d1cf420 | ||
|
|
2be17bbdf3 | ||
|
|
f992b0e38c | ||
|
|
bd6ee24eb1 | ||
|
|
366a64530e | ||
|
|
45a175957e |
28
.github/ISSUE_TEMPLATE/1feature-request.yaml
vendored
@@ -1,28 +0,0 @@
|
||||
name: 功能建议
|
||||
# Feature request
|
||||
description: 新功能或现有能力的优化建议
|
||||
title: "[建议] "
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
提示:创建前可先搜索一下是否存在重复问题。描述简洁、准确有助于集中大家的意见,推进 issue 尽快解决
|
||||
# Please check for duplicate issue first.
|
||||
# 尽量描述需求的背景、原始问题,避免出现 X-Y 问题,参考: https://coolshell.cn/articles/10804.html
|
||||
- type: textarea
|
||||
id: problem
|
||||
attributes:
|
||||
label: 背景与遇到的问题
|
||||
# Background and the problem that frustrates you
|
||||
placeholder: |
|
||||
例如:我的业务有xxx特性,当我在使用xxx功能的时候,会遇到xxx情况...
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: solution
|
||||
attributes:
|
||||
label: 建议的解决方案
|
||||
# Describe the solution you'd like
|
||||
validations:
|
||||
required: false
|
||||
31
.github/ISSUE_TEMPLATE/2bug-report.yaml
vendored
@@ -1,31 +0,0 @@
|
||||
name: Bug
|
||||
description: 明确的软件故障或缺陷
|
||||
# Create a report to help us improve
|
||||
title: "[Bug] "
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
提示:提问前请先搜索一下是否存在重复问题
|
||||
# Please check for duplicate issue first.
|
||||
- type: textarea
|
||||
id: Description
|
||||
attributes:
|
||||
label: 问题描述
|
||||
# Describe the bug
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: Reproduce
|
||||
attributes:
|
||||
label: 复现方法
|
||||
# To Reproduce
|
||||
placeholder: |
|
||||
1. ...
|
||||
2. ...
|
||||
- type: textarea
|
||||
id: Expected
|
||||
attributes:
|
||||
label: 期望的结果
|
||||
# Expected behavior. Descript what you expected to happen.
|
||||
14
.github/ISSUE_TEMPLATE/3other.yaml
vendored
@@ -1,14 +0,0 @@
|
||||
name: 其他问题与反馈
|
||||
description: 文档、部署失败等其他问题。
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
提示:创建前请先搜索一下是否存在重复问题
|
||||
# Please check for duplicate issue first.
|
||||
# 尽量描述需求的背景、原始问题,避免出现 X-Y 问题,参考: https://coolshell.cn/articles/10804.html
|
||||
# 提問的智慧: https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
|
||||
- type: textarea
|
||||
id: content
|
||||
attributes:
|
||||
label: 反馈内容
|
||||
45
.github/ISSUE_TEMPLATE/bug-report.yaml
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
name: Bug
|
||||
description: Report a bug
|
||||
# Create a report to help us improve
|
||||
title: "[Bug] "
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Please search the [open issues](https://github.com/chaitin/SafeLine/issues) and [discussion](https://github.com/chaitin/SafeLine/discussions) for duplicate issue first.
|
||||
The more information you share, the faster we can identify and fix the bug.
|
||||
# Please check for duplicate issue first.
|
||||
- type: textarea
|
||||
id: Description
|
||||
attributes:
|
||||
label: What happened?
|
||||
# Describe the bug
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: Reproduce
|
||||
attributes:
|
||||
label: How we reproduce?
|
||||
description: |
|
||||
Reports cannot be reproduced will Most likely be closed.
|
||||
# To Reproduce
|
||||
value: |
|
||||
1. ...
|
||||
2. ...
|
||||
3. ...
|
||||
- type: textarea
|
||||
id: Expected
|
||||
attributes:
|
||||
label: Expected behavior
|
||||
# placeholder: |
|
||||
# Descript what you expected to happen.
|
||||
# Expected behavior. Descript what you expected to happen.
|
||||
- type: textarea
|
||||
id: Errorlog
|
||||
attributes:
|
||||
label: Error log
|
||||
placeholder: |
|
||||
Paste the error logs if any.
|
||||
# Expected behavior. Descript what you expected to happen.
|
||||
|
||||
10
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1,5 +1,11 @@
|
||||
blank_issues_enabled: Ture
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Discord
|
||||
url: https://discord.gg/wyshSVuvxC
|
||||
about: Ask questions and discuss with other SafeLine users in real time.
|
||||
- name: Home page 官网
|
||||
url: https://waf.chaitin.com/
|
||||
about: Get feature descriptions, technical documentation and more information. 获取功能描述、技术文档和更多信息。
|
||||
- name: 绕过反馈
|
||||
url: https://stack.chaitin.com/security-challenge/safeline/index
|
||||
about: Waf 绕过可在 CT Stack 安全挑战赛提交细节
|
||||
about: Waf 绕过可在 CT Stack 安全挑战赛提交细节
|
||||
28
.github/ISSUE_TEMPLATE/feature-request.yaml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
name: Suggestion
|
||||
# Feature request
|
||||
description: New feature or improvements.
|
||||
title: "[Suggestion] "
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Please search the [open issues](https://github.com/chaitin/SafeLine/issues) and [discussion](https://github.com/chaitin/SafeLine/discussions) for duplicate issue first.
|
||||
Please rise only one suggestion in an issue.
|
||||
- type: textarea
|
||||
id: solution
|
||||
attributes:
|
||||
label: What would you like to be added or improved?
|
||||
# Describe the solution you'd like
|
||||
# placeholder: |
|
||||
#
|
||||
- type: textarea
|
||||
id: problem
|
||||
attributes:
|
||||
label: Why is it needed?
|
||||
# Background and the specific problem that frustrates you
|
||||
placeholder: |
|
||||
Background and the problem that frustrates you
|
||||
|
||||
validations:
|
||||
required: true
|
||||
12
.github/ISSUE_TEMPLATE/other.yaml
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
name: Other
|
||||
description: Other issues such as Doc
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Please search the [open issues](https://github.com/chaitin/SafeLine/issues) and [discussion](https://github.com/chaitin/SafeLine/discussions) for duplicate issue first.
|
||||
Please rise only one suggestion in an issue.
|
||||
- type: textarea
|
||||
id: content
|
||||
attributes:
|
||||
label: Content
|
||||
41
.github/workflows/slmcp-docker.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
name: MCP Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- "v*"
|
||||
paths:
|
||||
- "mcp_server/**"
|
||||
- ".github/workflows/slmcp-docker.yml"
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
platforms: linux/amd64,linux/arm64
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERIO_USERNAME }}
|
||||
password: ${{ secrets.DOCKERIO_PASSWORD }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./mcp_server
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: |
|
||||
chaitin/safeline-mcp:latest
|
||||
chaitin/safeline-mcp:${{ github.ref_name }}
|
||||
cache-from: type=registry,ref=chaitin/safeline-mcp:buildcache
|
||||
cache-to: type=registry,ref=chaitin/safeline-mcp:buildcache,mode=max
|
||||
8
.gitignore
vendored
@@ -1,2 +1,10 @@
|
||||
*.Zone.Identifier
|
||||
.DS_Store
|
||||
*.zip
|
||||
*.tar
|
||||
*.tar.gz
|
||||
build.sh
|
||||
compose.yml
|
||||
__pycache__
|
||||
.cursor
|
||||
.vscode
|
||||
11
.gitmodules
vendored
@@ -1,9 +1,8 @@
|
||||
[submodule "blazehttp"]
|
||||
path = blazehttp
|
||||
url = https://github.com/chaitin/blazehttp
|
||||
[submodule "lua-resty-t1k"]
|
||||
path = lua-resty-t1k
|
||||
url = https://github.com/chaitin/lua-resty-t1k
|
||||
[submodule "plugins"]
|
||||
path = plugins
|
||||
url = https://github.com/chaitin/safeline-open-platform
|
||||
|
||||
|
||||
[submodule "sdk/traefik-safeline"]
|
||||
path = sdk/traefik-safeline
|
||||
url = https://github.com/chaitin/traefik-safeline
|
||||
|
||||
241
CHANGELOG.md
@@ -1,241 +0,0 @@
|
||||
SAFELINE-CE CHANGELOG
|
||||
===
|
||||
|
||||
## [2.5.0] - 2023-08-03
|
||||
|
||||
### 新增
|
||||
|
||||
- 请求频率限制([#29](https://github.com/chaitin/safeline/issues/29))
|
||||
|
||||
### 优化
|
||||
|
||||
- 支持筛选攻击检测日志的 ID([#74](https://github.com/chaitin/safeline/issues/74)),优化筛选的交互
|
||||
- 证书支持 .cer 格式([#181](https://github.com/chaitin/safeline/issues/181))
|
||||
- 优化人机校验页面,适配移动端([#184](https://github.com/chaitin/safeline/issues/184))
|
||||
- 界面增加一些配置提示:添加站点时 “域名” 的格式、黑白名单/人机验证中匹配条件的生效逻辑
|
||||
|
||||
## [2.4.0] - 2023-07-27
|
||||
|
||||
### 新增
|
||||
|
||||
- IP 组支持注释 [#143](https://github.com/chaitin/safeline/issues/143)
|
||||
|
||||
### 优化
|
||||
|
||||
- 优化编辑 IP 组和相关规则时的性能
|
||||
- 优化一些界面 UI 交互细节
|
||||
|
||||
## [2.3.2] - 2023-07-24
|
||||
|
||||
### 修复
|
||||
- 修复了攻击事件 - 原始日志中,请求报文没有格式化的问题
|
||||
- 优化了一些已知问题
|
||||
|
||||
## [2.3.1] - 2023-07-20
|
||||
|
||||
### 新增
|
||||
|
||||
- 检测日志升级为**攻击事件** ,自动聚合同一攻击 IP 短时间内的所有攻击日志,方便管理员进行监控和处置
|
||||
- 日志支持按时间([#102](https://github.com/chaitin/safeline/issues/102))、动作筛选
|
||||
|
||||
### 修复
|
||||
|
||||
- 修复添加/编辑站点时,上传证书处未翻译中文的问题
|
||||
- 修复数据统计中,“访问来源地区” 小概率出现的部分地区显示不正确的问题
|
||||
|
||||
## [2.2.0] - 2023-07-14
|
||||
|
||||
### 新增
|
||||
|
||||
- IP 组中新增长亭社区恶意 IP 情报,内容来自社区版共享的攻击 IP,每日自动更新
|
||||
|
||||
### 优化
|
||||
|
||||
- 升级核心检测引擎,修复一些绕过和误报
|
||||
- 管理界面增加浏览器版本检查,如果版本过旧,会提示升级浏览器
|
||||
- 优化一些界面的 UI 交互细节
|
||||
- 修复一些中英文翻译的问题
|
||||
|
||||
## [2.1.2] - 2023-07-07
|
||||
|
||||
- 修复了日志详情中防护策略模块没有翻译的问题
|
||||
|
||||
## [2.1.1] - 2023-07-06
|
||||
|
||||
- 修复了防护策略模块没有翻译的问题
|
||||
|
||||
## [2.1.0] - 2023-07-06
|
||||
|
||||
### 新增
|
||||
|
||||
- 添加/编辑站点时,自动检查端口占用情况,避免保存后配置不生效
|
||||
- 支持自定义站点的 nginx conf,详情可见[官网文档](https://waf-ce.chaitin.cn/posts/faq_other#%E8%87%AA%E5%AE%9A%E4%B9%89%E7%AB%99%E7%82%B9-nginx-conf)
|
||||
- [站点列表支持按域名、端口或访问量进行排序](https://github.com/chaitin/safeline/issues/14)
|
||||
- [绑定 TOTP 密钥时,支持直接复制密钥;登录时的 6 位动态密码输入框,支持粘贴](https://github.com/chaitin/safeline/issues/30)
|
||||
|
||||
### 优化
|
||||
|
||||
- [黑白名单和人机验证列表中,可以鼠标悬浮查看 “复合条件” 的具体内容](https://github.com/chaitin/safeline/issues/120)
|
||||
- 修复人机验证列表中,“源 IP 不属于 IP 组” 的规则,IP 组名称显示成了 id 的问题
|
||||
- [优化人机验证启用/禁用交互](https://github.com/chaitin/safeline/issues/130)
|
||||
- [优化描述文字](https://github.com/chaitin/safeline/issues/122)
|
||||
- 优化一些界面 UI 交互、提示文字
|
||||
- 修复一些已知问题
|
||||
|
||||
## [2.0.1] - 2023-06-30
|
||||
|
||||
- 调整了人机验证的策略,降低误拦的情况
|
||||
- 修复了人机验证启动/禁用规则不会自动刷新状态的问题
|
||||
- 修复其他一些已知问题
|
||||
|
||||
## [2.0.0] - 2023-06-29
|
||||
|
||||
### 新增
|
||||
|
||||
- 人机验证
|
||||
- 支持嵌入式部署,可以通过 [t1k 协议](https://github.com/chaitin/lua-resty-t1k) 直接把流量转发到雷池进行检测
|
||||
- 把日志详情中的源 IP 加入到 IP 组时,支持调整 IP 为任意 IP 或网段
|
||||
|
||||
### 优化
|
||||
- 日志列表按照时间和 ID 排序,防止出现小范围的时间乱序
|
||||
- 转发流量时,自动设置请求头 X-Forwarded-Proto,适配更多代理场景
|
||||
- 优化界面 UI,修复其他一些已知问题
|
||||
|
||||
## [1.10.0] - 2023-06-21
|
||||
|
||||
### 新增
|
||||
|
||||
- 防护站点新增 “运行模式”,可以一键将站点设为 观察 或 维护 模式了
|
||||
|
||||
### 优化
|
||||
|
||||
- 修复了站点列表没有分页器的问题
|
||||
- 修复了窗口水平滚动时导航栏会错位的问题
|
||||
- 修复了黑白名单配置 “不属于 IP 组” 的条件时,列表显示组 ID,而未显示组名称的问题
|
||||
- 优化了界面的 UI 与交互
|
||||
|
||||
## [1.9.0] - 2023-06-16
|
||||
|
||||
### 新增
|
||||
|
||||
- 界面 UI 改造,信息层级更清晰
|
||||
- 黑白名单支持添加 源 IP - 不属于 IP 组 的条件
|
||||
|
||||
### 优化
|
||||
|
||||
- 检测日志的路由进一步完善
|
||||
- 数据统计页面更加紧凑,现在可以在 1920*1080 的屏幕上完全显示了
|
||||
- 黑白名单的展示优化
|
||||
- 修复 通用配置-防护模块配置 中,“批量配置为” 按钮有时候不生效的问题
|
||||
- 修复一些已知问题
|
||||
|
||||
## [1.8.2] - 2023-06-12
|
||||
|
||||
- 修复了「30 天访问情况」和「30 天拦截情况」显示相同数据的问题
|
||||
|
||||
## [1.8.1] - 2023-06-09
|
||||
|
||||
- 修复了「全部请求」和「仅拦截」数据一样的问题
|
||||
|
||||
## [1.8.0] - 2023-06-09
|
||||
|
||||
### 新增
|
||||
|
||||
- 数据统计页面增加访问来源地区、流量统计,更好把控网站运营情况
|
||||
|
||||
### 优化
|
||||
|
||||
- 更新语义引擎版本,优化了一大批检测逻辑,降低误报
|
||||
- 优化了部分操作提示信息:
|
||||
- IP 组正在使用时,无法被删除的提示
|
||||
- 未创建 IP 组时,在黑白名单中无法选择属于 IP 组的提示
|
||||
- 添加站点时,域名格式错误的提示
|
||||
|
||||
## [1.7.1] - 2023-06-05
|
||||
|
||||
### 修复
|
||||
- 部分情况下无法打开日志详情页面的问题
|
||||
- 部分情况下页面查询数量只有 10 条的问题
|
||||
|
||||
## [1.7.0] - 2023-06-01
|
||||
|
||||
### 新增
|
||||
- 新增 “IP 组” 功能,可以快速配置大量 IP 的黑/白名单了
|
||||
- 防护策略增加 “仅观察” 配置
|
||||
- 防护策略增加 “批量配置为” 按钮,可以快速切换所有模块的防护策略
|
||||
|
||||
### 优化
|
||||
- 自定义规则列表增加翻页
|
||||
- 优化规则生效顺序,现在会优先执行完所有白名单,再执行黑名单
|
||||
|
||||
## [1.6.0] - 2023-05-25
|
||||
|
||||
### 新增
|
||||
- 自定义规则支持匹配 Header 和 Body
|
||||
- 检测日志支持按域名搜索
|
||||
- 支持命令行清理检测日志和统计信息
|
||||
|
||||
## [1.5.1] - 2023-05-18
|
||||
|
||||
- 修复了自定义规则切换白名单之后,无法创建/编辑的问题
|
||||
|
||||
## [1.5.0] - 2023-05-18
|
||||
|
||||
### 新增
|
||||
- 支持 i18n
|
||||
- 数据统计新增 “今日请求错误情况”
|
||||
- 检测日志的筛选条件现在会显示在 URL,方便保存
|
||||
|
||||
### 优化
|
||||
- 修复自定义规则的编辑表单,有时候会丢失编辑中数据的问题
|
||||
- 修复 Safari 浏览器上的一些显示问题
|
||||
- 修复 Payload 中存在非 Unicode 编码时,检测日志会入库失败的问题(不影响拦截)
|
||||
- 修复新增的 “HTTP 请求走私” 攻击类型会被错误地展示成 “未知” 攻击类型的问题
|
||||
|
||||
## [1.4.0] - 2023-05-12
|
||||
|
||||
### 新增
|
||||
- 自定义规则支持匹配域名
|
||||
- 支持在一条自定义规则内,设置多个匹配条件
|
||||
- 站点列表新增 “今日访问 / 拦截量”
|
||||
|
||||
### 优化
|
||||
- 优化交互和提示文案、修复已知问题
|
||||
|
||||
## [1.3.0] - 2023-05-05
|
||||
|
||||
### 新增
|
||||
- 支持按照源 IP、攻击类型、URL 筛选检测日志
|
||||
|
||||
### 修复
|
||||
- 修复 dashboard 在部分低版本浏览器下的兼容问题
|
||||
- 修复按源 IP 添加自定义规则时,添加不了 /8 和更大的网段的问题
|
||||
|
||||
## [1.2.0] - 2023-04-27
|
||||
|
||||
### 新增
|
||||
- 新增了数据统计页面,可以直观的看到流量大小
|
||||
- 支持配置源 IP 提取方式,解决了源 IP 获取不对的问题
|
||||
- 支持自定义检测策略,可以动态调整检测引擎
|
||||
|
||||
## [1.1.0] - 2023-04-20
|
||||
|
||||
### 新增
|
||||
- 支持根据 IP 和 URL 特征配置黑白名单
|
||||
- 默认开启高防模式
|
||||
|
||||
### 优化
|
||||
- 支持在日志详情中展示响应报文
|
||||
- 服务器时间不准导致 TOTP 无法登录时增加了提示语
|
||||
- 修复了上游服务器填 HTTPS 时端口解析不正确的问题
|
||||
- 优化了 SSL 上传逻辑,体验更好
|
||||
|
||||
## [1.0.0] - 2023-04-13
|
||||
|
||||
- 站点配置
|
||||
|
||||
## [0.9.0] - 2023-03-20
|
||||
|
||||
- OTP 登录
|
||||
- 攻击检测日志
|
||||
- 默认防护策略
|
||||
182
FAQ.md
@@ -1,182 +0,0 @@
|
||||
# FAQ
|
||||
|
||||
## docker compose or docker-compose?
|
||||
|
||||
tl;dr The `docker compose` (with a space), aka v2, is a newer project to migrate compose to Go. The original python project `docker-compose`, aka v1 has now been deprecated.
|
||||
|
||||
refers also: [https://stackoverflow.com/questions/66514436/difference-between-docker-compose-and-docker-compose](https://stackoverflow.com/a/66516826)
|
||||
|
||||
## Setup and Deploy
|
||||
|
||||
### What specs should I deploy SafeLine to protect my web services? / Minimum hardware specs requirements
|
||||
|
||||
1C1G is ok for running docker containers of SafeLine. But the specific hardware specs depends on the traffic characteristics your services, such as qps, network io and so on. For now, no detailed datasheet is provided for references.
|
||||
|
||||
### ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
|
||||
|
||||
As shown, you shall start docker first. Try `systemctl start docker`.
|
||||
|
||||
### docker not found, unable to deploy
|
||||
|
||||
As shown, you shall install `docker` first. Try `curl -fLsS https://get.docker.com/ | sh` or [Install Docker Engine](https://docs.docker.com/engine/install/)
|
||||
|
||||
### docker compose v2 not found, unable to deploy
|
||||
|
||||
As shown, you shall install `docker compose v2`. Try `[Install Docker Compose](https://docs.docker.com/compose/install/)`
|
||||
|
||||
### safeline-postgres: Operation not permitted
|
||||
|
||||
`docker logs -f safeline-postgres` with error `Operation not permitted`
|
||||
|
||||
Upgrade your docker engine and retry.
|
||||
|
||||
### safeline-tengine: Address already in use
|
||||
|
||||
`docker logs -f safeline-tengine` with error `Address already in use`
|
||||
|
||||
Port conflicts. Based on the port number in the error message, troubleshoot which service is occupying it and handle the conflict manually.
|
||||
|
||||
### How to customize safeline-ce installation path?
|
||||
|
||||
With the latest `compose.yaml`, you can manually modify the `SAFELINE_DIR` variable in the `.env` file after `setup.sh`.
|
||||
|
||||
### How to change the default port of SafeLine management, as for `:9443` is already in used by some other services?
|
||||
|
||||
With the latest `compose.yaml`, you can add `MGT_PORT` variable in `.env` file.
|
||||
|
||||
## Login
|
||||
|
||||
### TOTP login failed with correct code
|
||||
|
||||
TOTP is calculated and verified according to time. So check your server time.
|
||||
|
||||
# 常见问题
|
||||
|
||||
## docker compose 还是 docker-compose?
|
||||
|
||||
`docker compose`(带空格)是 V2 版本,Go 写的。`docker-compose` 是 V1 版本,Python 写的,已经不维护了。
|
||||
|
||||
我们推荐使用 V2 版本的 `docker compose`,V1 可能会有兼容性等问题。
|
||||
|
||||
[docker/compose](https://github.com/docker/compose/) 中提到:
|
||||
|
||||
> For a smooth transition from legacy docker-compose 1.xx, please consider installing [compose-switch](https://github.com/docker/compose-switch) to translate `docker-compose ...` commands into Compose V2's `docker compose ....` . Also check V2's `--compatibility` flag.
|
||||
|
||||
其他参考:[https://stackoverflow.com/questions/66514436/difference-between-docker-compose-and-docker-compose](https://stackoverflow.com/a/66516826)
|
||||
|
||||
## 安装部署
|
||||
|
||||
### 机器运行的最低配置
|
||||
|
||||
最低 1C1G 能运行,具体需要多少配置取决于你的业务流量特征,比如 QPS、网络吞吐等等,暂时没有详细的 datasheet 性能参考。
|
||||
|
||||
### 镜像下载缓慢甚至连接超时
|
||||
|
||||
这个是因为 docker hub 默认使用位于美西节点拉取镜像,可以自行配置国内镜像加速源
|
||||
|
||||
### ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
|
||||
|
||||
如描述,你需要启动 docker daemon 才能执行相关的命令。尝试 `systemctl start docker`
|
||||
|
||||
As shown, you shall start docker first. Try `systemctl start docker`.
|
||||
|
||||
### docker not found, unable to deploy
|
||||
|
||||
如描述,你需要安装 `docker`。尝试 `curl -fLsS https://get.docker.com/ | sh` 或者 [Install Docker Engine](https://docs.docker.com/engine/install/)
|
||||
|
||||
### docker compose v2 not found, unable to deploy
|
||||
|
||||
如描述,你需要安装 `docker compose v2`。尝试 `[Install Docker Compose](https://docs.docker.com/compose/install/)`
|
||||
|
||||
### safeline-tengine 出现 Address already in use
|
||||
|
||||
`docker logs -f safeline-tengine` 容器日志中看到 `Address already in use` 信息。
|
||||
|
||||
端口冲突,根据报错信息中的端口号,排查是哪个服务占用了,手动处理冲突。
|
||||
|
||||
### safeline-postgres 出现 Operation not permitted
|
||||
|
||||
`docker logs -f safeline-postgres` 容器日志中看到 `Operation not permitted` 报错
|
||||
|
||||
可能是您的 docker 版本过低,升级 docker 到最新版本尝试一下。
|
||||
|
||||
### 如何自定义 SafeLine 安装路径?
|
||||
|
||||
基于最新的 `compose.yaml`,你可以手动修改 `.env` 文件的 `SAFELINE_DIR` 变量。
|
||||
|
||||
### 如何修改 SafeLine 后台管理的默认端口?本机 `:9443` 已经被别的服务占用了
|
||||
|
||||
基于最新的 `compose.yaml`,你可以手动添加 `MGT_PORT` 变量到 `.env` 文件。
|
||||
|
||||
## 登录问题
|
||||
|
||||
### OTP 认证码登录失败
|
||||
|
||||
TOTP 是基于时间生成和校验的,请检查你的服务器时间是否同步。
|
||||
|
||||
## 站点配置问题
|
||||
|
||||
在没有 SafeLine 的时候,假设小明的域名 `xiaoming.com` 通过 DNS 解析到自己主机 `192.168.1.111`,上面在 `:8888` 端口监听了自己的服务(网站/博客/靶场)等等。
|
||||
|
||||
小明通过 `http://xiaoming.com:8888` 或者 `192.168.1.111:8888` 来访问自己的服务。
|
||||
|
||||
### 我该如何配置?/ 域名填什么?/ 端口怎么写?/ 上游服务器是什么?
|
||||
|
||||
目前社区版 SafeLine 支持的是反向代理的方式接入站点,也就是类似于一台 nginx 服务。这时候小明需要做的就是让流量先抵达 SafeLine,然后经过 SafeLine 检测之后,再转发给自己原先的业务。
|
||||
|
||||
小明只需要按照如下方式创建站点即可:
|
||||
- `xiaoming.com` 填入页面的「域名」
|
||||
- `:7777` 填入「端口」;或者别的任意非 `:8888`和 `:9443`(被 SafeLine 后台管理页面占用)端口
|
||||
- `http://192.168.1.111:8888` 填入「上游服务器」
|
||||
|
||||
创建之后,就可以通过 `http://xiaoming.com:7777` 或者 `192.168.1.111:7777` 访问自己的服务了,这时候请求到 `http://xiaoming.com:7777` 的流量都会被 SafeLine 检测。经过 SafeLine 过滤后,安全的流量会被透传到原先的 `:8888` 业务服务器(即上游服务器)。
|
||||
|
||||
**注:直接访问 `http://xiaoming.com:8888` 的流量,仍然不会被 SafeLine 检测,因为流量并没有经过 SafeLine,而是绕过 SafeLine 直接打到了上游服务器上**
|
||||
|
||||
**如果按照如上配置,还是无法成功访问到我的上游服务器,接着往下看,尝试逐项进行问题排查。**
|
||||
|
||||
## 配置完成之后,还是没有成功访问到上游服务器
|
||||
|
||||
下面例子都还按照上面小明的环境情况介绍。
|
||||
|
||||
#### 1. netstat/ss/lsof 查看端口占用情况
|
||||
|
||||
先确认下 `0.0.0.0:7777` 端口是否有服务在监听。SafeLine 使用 Tengine 来作为代理服务,所以正常来说,应该有一个 nginx 进程监听在 `:7777` 端口。如果没有的话,可能是 SafeLine 的问题,请通过社群或者 Github issue 提交反馈。
|
||||
|
||||
如果有的话,继续往下排查。
|
||||
|
||||
#### 2. 是否是被非 SafeLine 的 nginx 监听
|
||||
|
||||
基于第一步,已经能确认 `:7777` 是被某个 nginx 进程监听了,但是并不能确认是被 SafeLine 自己的 nginx 监听。排查是否自己原先有 nginx conf 中配置了 server 监听 `:7777`。如果有的话,手动解决冲突。要么修改自己原先的 nginx conf,要么修改 SafeLine 的站点配置。
|
||||
|
||||
也可以直接通过 `docker logs -f safeline-tengine` 确认 SafeLine 是否有 nginx 报错说端口冲突。
|
||||
|
||||
*常见的情况就是自己原先有一个服务监听在 `:80`,SafeLine 上配置了站点也监听 `:80` 端口,就产生了冲突。*
|
||||
|
||||
如果没有的话,继续往下排查。
|
||||
|
||||
#### 3. 是否被防火墙拦截
|
||||
|
||||
有操作系统本身的防火墙,还有可能是云服务商的防火墙。根据实际情况逐项排查,配置开放端口的 TCP 访问。
|
||||
|
||||
出现如下情况,可能就是被中间某防火墙拦截了:
|
||||
1. 在 `192.168.1.111` 上 curl -vv `127.0.0.1:7777` 能访问到业务,有 HTTP 返回码。
|
||||
2. 在本机 curl -vv `192.168.1.111:7777` 不通,没有 HTTP 响应;`telnet 192.168.1.111 7777` 返回 `Unable to connect to remote host: Connection refused`
|
||||
|
||||
#### 4. SafeLine 是否能访问到上游服务器
|
||||
|
||||
小明的情况是 SafeLine 和业务在同一台机器,一般不会有不同机器之间的网络问题,但是也建议在 SafeLine 部署的机器上测试一下。如果是两台机器的情况下,需要考虑是否互相之间能正常通信。
|
||||
|
||||
直接 `curl -H "Host: <SafeLine-IP>" -vv http://xiaoming.com:8888` 测一下是否能访问到。如果不行,需要自行排查为什么 SafeLine 的机器没法访问到。
|
||||
|
||||
注:这里需要 -H 指定 Host `Host: <SafeLine-IP>` 进行连通性测试。收到比较多的反馈,在 WAF 上直接配置上游服务器为 HTTPS 的域名,比如 `https://xiaoming.com`。实际场景是希望先测试 WAF 能力正常后再把域名解析切到 WAF 进行上线。这种本地测试的场景,需要修改本机 host,把 `xiaoming.com` 解析到 `SafeLine-IP`,否则可能会无法成功代理。因为 SafeLine 向上游服务器转发时,代理请求中的 Host 使用的是原始 HTTP 请求中的 Host,此时需要自行判断上游业务服务器能够正确处理该代理请求(例如上游业务服务器在 Host 没有匹配自己的站点名称时,是否能够处理)
|
||||
|
||||
#### 5. 其他情况
|
||||
|
||||
如果执行了 1-4:
|
||||
1. 确认有 nginx 进程监听了 SafeLine 机器的 `0.0.0.0:7777` 端口
|
||||
2. 确认 SafeLine tengine 无端口冲突报错
|
||||
3. 确认主机和云服务商的防火墙都没有限制 `:7777` 端口的 TCP 访问
|
||||
4. 确认在 SafeLine 上能访问到「上游服务器」
|
||||
|
||||
问题还是没有解决,可能是 SafeLine 产品的问题,请通过社群或者 Github issue 提交反馈。
|
||||
699
LICENSE.md
@@ -1,59 +1,674 @@
|
||||
## 软件许可证
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
本许可证(以下简称“许可证”)适用于您所获取的软件(以下简称“软件”),请您在使用本软件前仔细阅读以下条款。使用本软件表示您同意并接受本许可证的条款。
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
1. **版权声明**
|
||||
本产品的所有代码、镜像、文件其版权均属于北京长亭科技有限公司。
|
||||
Preamble
|
||||
|
||||
2. **使用许可**
|
||||
在遵守本许可证条款的前提下,您有权在单一设备上安装、运行本软件,仅用于个人非商业目的。
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
3. **禁止事项**
|
||||
您不得对本软件进行以下行为:
|
||||
a) 破解、逆向工程、反编译、反汇编等行为;
|
||||
b) 二次包装、修改、改编、复制、翻译、再许可或制作衍生作品;
|
||||
c) 用于商业用途或任何盈利活动;
|
||||
d) 未经授权的传播、分发、出售、出租本软件;
|
||||
e) 将本软件与侵犯他人知识产权或违反法律法规的内容、行为结合。
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
4. **保留权利**
|
||||
本软件的版权归原作者所有,除本许可证明确授权外,所有其他权利均由原作者保留。未经原作者明确授权,您不得行使本许可证未明确授权的其他权利。如超出授权使用,原作者保留追究法律责任的权利。
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
5. **免责声明**
|
||||
本软件按“现状”提供,不提供任何形式的保证,包括但不限于对适销性、适用于特定用途、无侵权等方面的保证。原作者对于因使用本软件而造成的任何损失、损害、诉讼等不承担责任。
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
6. **终止条款**
|
||||
本许可证自您接受之日起生效,直至终止。如您未遵守本许可证的任何条款,原作者有权随时终止本许可证。一旦许可证终止,您必须停止使用本软件,并销毁您拥有或控制的所有副本。
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
7. **适用法律与争议解决**
|
||||
本许可证受原作者所在国家或司法管辖区法律的约束并依据其解释。任何因本许可证引起的或与其相关的争议应通过协商解决。如协商无果,任何一方均可将争议提交原作者所在国家或司法管辖区的有管辖权的法院解决。
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
## License
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
This License (hereinafter referred to as "License") applies to the software you have obtained (hereinafter referred to as "Software"). Please read the following terms carefully before using the Software. Using the Software indicates your agreement and acceptance of the terms of this License.
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
1. **Copyright Notice**
|
||||
All codes, images, and files of this product are copyrighted by Beijing Chaitin Future Technology Co.,Ltd
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
2. **Usage Permission**
|
||||
Subject to compliance with the terms of this License, you are granted the right to install and run the Software on a single device for personal non-commercial purposes only.
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
3. **Prohibitions**
|
||||
You shall not engage in the following activities in relation to the Software:
|
||||
a) Cracking, reverse engineering, decompiling, disassembling, or other similar actions;
|
||||
b) Repackaging, modifying, adapting, copying, translating, sublicensing, or creating derivative works;
|
||||
c) Using for commercial purposes or any profit-making activities;
|
||||
d) Unauthorized dissemination, distribution, sale, or rental of the Software;
|
||||
e) Combining the Software with content or actions that infringe upon the intellectual property rights of others or violate laws and regulations.
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
4. **Reservation of Rights**
|
||||
The copyright of the Software belongs to the original author. All other rights not expressly granted in this License are reserved by the original author. You may not exercise any other rights not expressly granted in this License without the explicit authorization of the original author.If used beyond the scope of the authorization, the original author reserves the right to pursue legal liability.
|
||||
0. Definitions.
|
||||
|
||||
5. **Disclaimers**
|
||||
The Software is provided "as is" without any warranties of any kind, including but not limited to warranties of merchantability, fitness for a particular purpose, or non-infringement. The original author shall not be liable for any loss, damage, litigation, or any other consequences resulting from the use of the Software.
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
6. **Termination**
|
||||
This License shall be effective upon your acceptance and shall continue in effect until terminated. The original author reserves the right to terminate this License at any time if you fail to comply with any of the terms and conditions of this License. Upon termination, you must cease all use of the Software and destroy all copies in your possession or control.
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
7. **Applicable Law and Dispute Resolution**
|
||||
This License shall be governed by and construed in accordance with the laws of the country or jurisdiction where the original author is located. Any disputes arising from or in connection with this License shall be resolved through negotiation. In case no settlement can be reached through negotiation, either party may submit the dispute to the competent court of the country or jurisdiction where the original author is located.
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
|
||||
218
README.md
@@ -1,118 +1,128 @@
|
||||
<p align="center">
|
||||
<img src="https://waf-ce.chaitin.cn/images/403.svg" width="120">
|
||||
</p>
|
||||
<h1 align="center">雷池 - 广受好评的社区 WAF</h1>
|
||||
<br>
|
||||
<p align="center">
|
||||
<img src="https://img.shields.io/badge/SafeLine-BEST_WAF-blue">
|
||||
<img src="https://img.shields.io/github/release/chaitin/safeline.svg?color=blue" />
|
||||
<img src="https://img.shields.io/github/release-date/chaitin/safeline.svg?color=blue&label=update" />
|
||||
<img src="https://img.shields.io/docker/v/chaitin/safeline-mgt-api?color=blue">
|
||||
<img src="https://img.shields.io/github/stars/chaitin/safeline?style=social">
|
||||
<img src="/images/banner.png" width="400" />
|
||||
</p>
|
||||
|
||||
<h4 align="center">
|
||||
SafeLine - Make your web apps secure
|
||||
</h4>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://waf-ce.chaitin.cn/">官方网站</a> |
|
||||
<a href="https://demo.waf-ce.chaitin.cn:9443/dashboard">在线 Demo</a> |
|
||||
<a href="https://waf-ce.chaitin.cn/posts/guide_introduction">技术文档</a> |
|
||||
<a href="README_EN.md">For English</a>
|
||||
<a target="_blank" href="https://ly.safepoint.cloud/laA8asp">🏠 Website</a> |
|
||||
<a target="_blank" href="https://ly.safepoint.cloud/w2AeHhb">📖 Docs</a> |
|
||||
<a target="_blank" href="https://ly.safepoint.cloud/hSMd4SH">🔍 Live Demo</a> |
|
||||
<a target="_blank" href="https://discord.gg/SVnZGzHFvn">🙋♂️ Discord</a> |
|
||||
<a target="_blank" href="/README_CN.md">中文版</a>
|
||||
</p>
|
||||
|
||||
一款足够简单、足够好用、足够强的免费 WAF。基于业界领先的语义引擎检测技术,作为反向代理接入,保护你的网站不受黑客攻击。
|
||||
## 👋 INTRODUCTION
|
||||
|
||||
核心检测能力由智能语义分析算法驱动,专为社区而生,不让黑客越雷池半步。
|
||||
SafeLine is a self-hosted **`WAF(Web Application Firewall)`** to protect your web apps from attacks and exploits.
|
||||
|
||||
<img src="https://waf-ce.chaitin.cn/images/album/0.png" />
|
||||
A web application firewall helps protect web apps by filtering and monitoring HTTP traffic between a web application and the Internet. It typically protects web apps from attacks such as `SQL injection`, `XSS`, `code injection`, `os command injection`, `CRLF injection`, `ldap injection`, `xpath injection`, `RCE`, `XXE`, `SSRF`, `path traversal`, `backdoor`, `bruteforce`, `http-flood`, `bot abused`, among others.
|
||||
|
||||
<h4 align="center">相关源码仓库</h4>
|
||||
<p align="center">
|
||||
<a href="https://github.com/chaitin/yanshi">语义分析自动机引擎</a> |
|
||||
<a href="https://github.com/chaitin/safeline-open-platform">流量分析插件</a> |
|
||||
<a href="https://github.com/chaitin/lua-resty-t1k">T1K 协议</a> |
|
||||
<a href="https://github.com/chaitin/blazehttp">测试工具</a>
|
||||
#### 💡 How It Works
|
||||
|
||||
<img src="/images/how-it-works.png" width="800" />
|
||||
|
||||
By deploying a WAF in front of a web application, a shield is placed between the web application and the Internet. While a proxy server protects a client machine’s identity by using an intermediary, a WAF is a type of reverse-proxy, protecting the server from exposure by having clients pass through the WAF before reaching the server.
|
||||
|
||||
A WAF protects your web apps by filtering, monitoring, and blocking any malicious HTTP/S traffic traveling to the web application, and prevents any unauthorized data from leaving the app. It does this by adhering to a set of policies that help determine what traffic is malicious and what traffic is safe. Just as a proxy server acts as an intermediary to protect the identity of a client, a WAF operates in similar fashion but acting as a reverse proxy intermediary that protects the web app server from a potentially malicious client.
|
||||
|
||||
its core capabilities include:
|
||||
|
||||
- Defenses for web attacks
|
||||
- Proactive bot abused defense
|
||||
- HTML & JS code encryption
|
||||
- IP-based rate limiting
|
||||
- Web Access Control List
|
||||
|
||||
#### ⚡️ Screenshots
|
||||
|
||||
| <img src="./images/screenshot-1.png" width=370 /> | <img src="./images/screenshot-2.png" width=370 /> |
|
||||
| ------------------------------------------------- | ------------------------------------------------- |
|
||||
| <img src="./images/screenshot-3.png" width=370 /> | <img src="./images/screenshot-4.png" width=370 /> |
|
||||
|
||||
Get [Live Demo](https://demo.waf.chaitin.com:9443/)
|
||||
|
||||
## 🔥 FEATURES
|
||||
|
||||
List of the main features as follows:
|
||||
|
||||
- **`Block Web Attacks`**
|
||||
- It defenses for all of web attacks, such as `SQL injection`, `XSS`, `code injection`, `os command injection`, `CRLF injection`, `XXE`, `SSRF`, `path traversal` and so on.
|
||||
- **`Rate Limiting`**
|
||||
- Defend your web apps against `DoS attacks`, `bruteforce attempts`, `traffic surges`, and other types of abuse by throttling traffic that exceeds defined limits.
|
||||
- **`Anti-Bot Challenge`**
|
||||
- Anti-Bot challenges to protect your website from `bot attacks`, humen users will be allowed, crawlers and bots will be blocked.
|
||||
- **`Authentication Challenge`**
|
||||
- When authentication challenge turned on, visitors need to enter the password, otherwise they will be blocked.
|
||||
- **`Dynamic Protection`**
|
||||
- When dynamic protection turned on, html and js codes in your web server will be dynamically encrypted by each time you visit.
|
||||
|
||||
#### 🧩 Showcases
|
||||
|
||||
| | Legitimate User | Malicious User |
|
||||
| ----------------------------- | --------------------------------------------------- | ---------------------------------------------------------------- |
|
||||
| **`Block Web Attacks`** | <img src="./images/skeleton.png" width=270 /> | <img src="./images/blocked-for-attack-detected.png" width=270 /> |
|
||||
| **`Rate Limiting`** | <img src="./images/skeleton.png" width=270 /> | <img src="./images/blocked-for-access-too-fast.png" width=270 /> |
|
||||
| **`Anti-Bot Challenge`** | <img src="./images/captcha-1.gif" width=270 /> | <img src="./images/captcha-2.gif" width=270 /> |
|
||||
| **`Auth Challenge`** | <img src="./images/auth-1.gif" width=270 /> | <img src="./images/auth-2.gif" width=270 /> |
|
||||
| **`HTML Dynamic Protection`** | <img src="./images/dynamic-html-1.png" width=270 /> | <img src="./images/dynamic-html-2.png" width=270 /> |
|
||||
| **`JS Dynamic Protection`** | <img src="./images/dynamic-js-1.png" width=270 /> | <img src="./images/dynamic-js-2.png" width=270 /> |
|
||||
|
||||
## 🚀 Quickstart
|
||||
|
||||
> [!WARNING]
|
||||
> 中国大陆用户安装国际版可能会导致无法连接云服务,请查看 [中文版安装文档](https://docs.waf-ce.chaitin.cn/zh/%E4%B8%8A%E6%89%8B%E6%8C%87%E5%8D%97/%E5%AE%89%E8%A3%85%E9%9B%B7%E6%B1%A0)
|
||||
|
||||
#### 📦 Installing
|
||||
|
||||
Information on how to install SafeLine can be found in the [Install Guide](https://docs.waf.chaitin.com/en/GetStarted/Deploy)
|
||||
|
||||
#### ⚙️ Protecting Web Apps
|
||||
|
||||
to see [Configuration](https://docs.waf.chaitin.com/en/GetStarted/AddApplication)
|
||||
|
||||
## 📋 More Informations
|
||||
|
||||
#### Effect Evaluation
|
||||
|
||||
| Metric | ModSecurity, Level 1 | CloudFlare, Free | SafeLine, Balance | SafeLine, Strict |
|
||||
| ----------------- | -------------------- | -------------------- | ---------------------- | --------------------- |
|
||||
| Total Samples | 33669 | 33669 | 33669 | 33669 |
|
||||
| **Detection** | 69.74% | 10.70% | 71.65% | **76.17%** |
|
||||
| **False Positive**| 17.58% | 0.07% | **0.07%** | 0.22% |
|
||||
| **Accuracy** | 82.20% | 98.40% | **99.45%** | 99.38% |
|
||||
|
||||
|
||||
#### Is SafeLine Production-Ready?
|
||||
|
||||
Yes, SafeLine is production-ready.
|
||||
|
||||
- Over 180,000 installations worldwide
|
||||
- Protecting over 1,000,000 Websites
|
||||
- Handling over 30,000,000,000 HTTP Requests Daily
|
||||
|
||||
#### 🙋♂️ Community
|
||||
|
||||
Join our [Discord](https://discord.gg/SVnZGzHFvn) to get community support, the core team members are identified by the STAFF role in Discord.
|
||||
|
||||
- channel [#feedback](https://discord.com/channels/1243085666485534830/1243120292822253598): for new features discussion.
|
||||
- channel [#FAQ](https://discord.com/channels/1243085666485534830/1263761679619981413): for FAQ.
|
||||
- channel [#general](https://discord.com/channels/1243085666485534830/1243115843919806486): for any other questions.
|
||||
|
||||
Several contact options exist for our community, the primary one being Discord. These are in addition to GitHub issues for creating a new issue.
|
||||
|
||||
<p align="left">
|
||||
<a target="_blank" href="https://discord.gg/SVnZGzHFvn"><img src="https://img.shields.io/badge/Discord-5865F2?style=flat&logo=discord&logoColor=white"></a>
|
||||
<a target="_blank" href="https://x.com/safeline_waf"><img src="https://img.shields.io/badge/X.com-000000?style=flat&logo=x&logoColor=white"></a>
|
||||
<a target="_blank" href="/images/wechat.png"><img src="https://img.shields.io/badge/WeChat-07C160?style=flat&logo=wechat&logoColor=white"></a>
|
||||
</p>
|
||||
|
||||
## 相关特性
|
||||
#### 💪 PRO Edition
|
||||
|
||||
#### 便捷性
|
||||
Coming soon!
|
||||
|
||||
采用容器化部署,一条命令即可完成安装,0 成本上手。安全配置开箱即用,无需人工维护,可实现安全躺平式管理。
|
||||
#### 📝 License
|
||||
|
||||
#### 安全性
|
||||
|
||||
首创业内领先的智能语义分析算法,精准检测、低误报、难绕过。语义分析算法无规则,面对未知特征的 0day 攻击不再手足无措。
|
||||
|
||||
#### 高性能
|
||||
|
||||
无规则引擎,线性安全检测算法,平均请求检测延迟在 1 毫秒级别。并发能力强,单核轻松检测 2000+ TPS,只要硬件足够强,可支撑的流量规模无上限。
|
||||
|
||||
#### 高可用
|
||||
|
||||
流量处理引擎基于 Nginx 开发,性能与稳定性均可得到保障。内置完善的健康检查机制,服务可用性高达 99.99%。
|
||||
|
||||
## 🚀 安装
|
||||
|
||||
### 配置需求
|
||||
|
||||
- 操作系统:Linux
|
||||
- 指令架构:x86_64
|
||||
- 软件依赖:Docker 20.10.6 版本以上
|
||||
- 软件依赖:Docker Compose 2.0.0 版本以上
|
||||
- 最小化环境:1 核 CPU / 1 GB 内存 / 10 GB 磁盘
|
||||
|
||||
|
||||
### 一键安装
|
||||
|
||||
```
|
||||
bash -c "$(curl -fsSLk https://waf-ce.chaitin.cn/release/latest/setup.sh)"
|
||||
```
|
||||
|
||||
> 更多安装方式请参考 <a href="https://waf-ce.chaitin.cn/posts/guide_install">安装雷池</a>
|
||||
|
||||
## 🕹️ 快速使用
|
||||
|
||||
### 登录
|
||||
|
||||
浏览器打开后台管理页面 `https://<waf-ip>:9443`。根据界面提示,使用 **支持 TOTP 的认证软件** 扫描二维码,然后输入动态口令登录:
|
||||
|
||||

|
||||
|
||||
### 配置防护站点
|
||||
|
||||
雷池以反向代理方式接入,优先于网站服务器接收流量,对流量中的攻击行为进行检测和清洗,将清洗过后的流量转发给网站服务器。
|
||||
|
||||

|
||||
|
||||
<font color=grey>💡 TIPS: 添加后,执行 `curl -H "Host: <域名>" http://<WAF IP>:<端口>` 应能获取到业务网站的响应。</font>
|
||||
|
||||
### 测试效果
|
||||
|
||||
使用以下方式尝试模拟黑客攻击,看看雷池的防护效果如何
|
||||
|
||||
- 浏览器访问 `http://<IP或域名>:<端口>/?id=1%20AND%201=1`
|
||||
- 浏览器访问 `http://<IP或域名>:<端口>/?a=<script>alert(1)</script>`
|
||||
|
||||

|
||||
|
||||
> 如果你需要进行深度测试,请参考 <a href="https://waf-ce.chaitin.cn/posts/guide_test">测试防护效果</a>
|
||||
|
||||
### FAQ
|
||||
|
||||
- [安装问题](https://waf-ce.chaitin.cn/posts/faq_install)
|
||||
- [登录问题](https://waf-ce.chaitin.cn/posts/faq_login)
|
||||
- [网站无法访问](https://waf-ce.chaitin.cn/posts/faq_access)
|
||||
- [配置问题](https://waf-ce.chaitin.cn/posts/faq_config)
|
||||
- [其他问题](https://waf-ce.chaitin.cn/posts/faq_other)
|
||||
|
||||
## 🏘️ 联系我们
|
||||
|
||||
1. 可以通过 GitHub Issue 直接进行 Bug 反馈和功能建议
|
||||
2. 可以扫描下方二维码加入雷池社区版用户讨论群
|
||||
|
||||
<img src="https://waf-ce.chaitin.cn/images/wechat-230717.png" width="30%" />
|
||||
|
||||
## Star History <a name="star-history"></a>
|
||||
|
||||
<a href="https://github.com/chaitin/safeline/stargazers">
|
||||
<img width="500" alt="Star History Chart" src="https://api.star-history.com/svg?repos=chaitin/safeline&type=Date">
|
||||
</a>
|
||||
See [LICENSE](/LICENSE.md) for details.
|
||||
|
||||
115
README_CN.md
Normal file
@@ -0,0 +1,115 @@
|
||||
<p align="center">
|
||||
<img src="/images/banner.png" width="400" />
|
||||
</p>
|
||||
|
||||
<h4 align="center">
|
||||
SafeLine - 雷池 - 不让黑客越过半步
|
||||
</h4>
|
||||
|
||||
<p align="center">
|
||||
<a target="_blank" href="https://waf-ce.chaitin.cn/">🏠 官网</a> |
|
||||
<a target="_blank" href="https://docs.waf-ce.chaitin.cn/">📖 文档</a> |
|
||||
<a target="_blank" href="https://demo.waf-ce.chaitin.cn:9443/">🔍 演示环境</a> |
|
||||
<a target="_blank" href="/images/wechat.png">🙋♂️ 社区微信群</a> |
|
||||
<a target="_blank" href="https://github.com/chaitin/SafeLine">国际版</a>
|
||||
</p>
|
||||
|
||||
## 👋 项目介绍
|
||||
|
||||
SafeLine,中文名 "雷池",是一款简单好用, 效果突出的 **`Web 应用防火墙(WAF)`**,可以保护 Web 服务不受黑客攻击。
|
||||
|
||||
雷池通过过滤和监控 Web 应用与互联网之间的 HTTP 流量来保护 Web 服务。可以保护 Web 服务免受 `SQL 注入`、`XSS`、 `代码注入`、`命令注入`、`CRLF 注入`、`ldap 注入`、`xpath 注入`、`RCE`、`XXE`、`SSRF`、`路径遍历`、`后门`、`暴力破解`、`CC`、`爬虫` 等攻击。
|
||||
|
||||
#### 💡 工作原理
|
||||
|
||||
<img src="/images/how-it-works.png" width="800" />
|
||||
|
||||
雷池通过阻断流向 Web 服务的恶意 HTTP 流量来保护 Web 服务。雷池作为反向代理接入网络,通过在 Web 服务前部署雷池,可在 Web 服务和互联网之间设置一道屏障。
|
||||
|
||||
雷池的核心功能如下:
|
||||
|
||||
- 防护 Web 攻击
|
||||
- 防爬虫, 防扫描
|
||||
- 前端代码动态加密
|
||||
- 基于源 IP 的访问速率限制
|
||||
- HTTP 访问控制
|
||||
|
||||
#### ⚡️ 项目截图
|
||||
|
||||
| <img src="./images/screenshot-1.png" width=370 /> | <img src="./images/screenshot-2.png" width=370 /> |
|
||||
| ------------------------------------------------- | ------------------------------------------------- |
|
||||
| <img src="./images/screenshot-3.png" width=370 /> | <img src="./images/screenshot-4.png" width=370 /> |
|
||||
|
||||
查看 [演示环境](https://demo.waf-ce.chaitin.cn:9443/)
|
||||
|
||||
## 🔥 核心能力
|
||||
|
||||
对于你的网站而言, 雷池可以实现如下效果:
|
||||
|
||||
- **`阻断 Web 攻击`**
|
||||
- 可以防御所有的 Web 攻击,例如 `SQL 注入`、`XSS`、`代码注入`、`操作系统命令注入`、`CRLF 注入`、`XXE`、`SSRF`、`路径遍历` 等等。
|
||||
- **`限制访问频率`**
|
||||
- 限制用户的访问速率,让 Web 服务免遭 `CC 攻击`、`暴力破解`、`流量激增` 和其他类型的滥用。
|
||||
- **`人机验证`**
|
||||
- 互联网上有来自真人用户的流量,但更多的是由爬虫, 漏洞扫描器, 蠕虫病毒, 漏洞利用程序等自动化程序发起的流量,开启雷池的人机验证功能后真人用户会被放行,恶意爬虫将会被阻断。
|
||||
- **`身份认证`**
|
||||
- 雷池的 "身份认证" 功能可以很好的解决 "未授权访问" 漏洞,当用户访问您的网站时,需要输入您配置的用户名和密码信息,不持有认证信息的用户将被拒之门外。
|
||||
- **`动态防护`**
|
||||
- 在用户浏览到的网页内容不变的情况下,将网页赋予动态特性,对 HTML 和 JavaScript 代码进行动态加密,确保每次访问时这些代码都以随机且独特的形态呈现。
|
||||
|
||||
#### 🧩 核心能力展示
|
||||
|
||||
| | Legitimate User | Malicious User |
|
||||
| ----------------------------- | --------------------------------------------------- | ---------------------------------------------------------------- |
|
||||
| **`阻断 Web 攻击`** | <img src="./images/skeleton.png" width=270 /> | <img src="./images/blocked-for-attack-detected.png" width=270 /> |
|
||||
| **`限制访问频率`** | <img src="./images/skeleton.png" width=270 /> | <img src="./images/blocked-for-access-too-fast.png" width=270 /> |
|
||||
| **`人机验证`** | <img src="./images/captcha-1.gif" width=270 /> | <img src="./images/captcha-2.gif" width=270 /> |
|
||||
| **`身份认证`** | <img src="./images/auth-1.gif" width=270 /> | <img src="./images/auth-2.gif" width=270 /> |
|
||||
| **`HTML 动态防护`** | <img src="./images/dynamic-html-1.png" width=270 /> | <img src="./images/dynamic-html-2.png" width=270 /> |
|
||||
| **`JS 动态防护`** | <img src="./images/dynamic-js-1.png" width=270 /> | <img src="./images/dynamic-js-2.png" width=270 /> |
|
||||
|
||||
## 🚀 上手指南
|
||||
|
||||
#### 📦 安装
|
||||
|
||||
查看 [安装雷池](https://docs.waf-ce.chaitin.cn/zh/%E4%B8%8A%E6%89%8B%E6%8C%87%E5%8D%97/%E5%AE%89%E8%A3%85%E9%9B%B7%E6%B1%A0)
|
||||
|
||||
#### ⚙️ 配置防护站点
|
||||
|
||||
查看 [快速配置](https://docs.waf-ce.chaitin.cn/zh/%E4%B8%8A%E6%89%8B%E6%8C%87%E5%8D%97/%E5%BF%AB%E9%80%9F%E9%85%8D%E7%BD%AE)
|
||||
|
||||
## 📋 更多信息
|
||||
|
||||
#### 防护效果测试
|
||||
|
||||
| Metric | ModSecurity, Level 1 | CloudFlare | 雷池, 平衡 | 雷池, 严格 |
|
||||
| ----------------- | -------------------- | -------------------- | ---------------------- | --------------------- |
|
||||
| 样本数量 | 33669 | 33669 | 33669 | 33669 |
|
||||
| **检出率** | 69.74% | 10.70% | 71.65% | **76.17%** |
|
||||
| **误报率** | 17.58% | 0.07% | **0.07%** | 0.22% |
|
||||
| **准确率** | 82.20% | 98.40% | **99.45%** | 99.38% |
|
||||
|
||||
|
||||
#### 雷池可以投入生产使用吗
|
||||
|
||||
是的,已经有不少用户将雷池投入生产使用,截至目前
|
||||
|
||||
- 全球累计装机量已超过 18 万台
|
||||
- 防护的网站数量超过 100 万个
|
||||
- 每天清洗 HTTP 请求超过 300 亿次
|
||||
|
||||
#### 🙋♂️ 用户社区
|
||||
|
||||
欢迎加入雷池 [社区微信群](/images/wechat.png) 进行技术交流。
|
||||
|
||||
也可以加入雷池 [Discord](https://discord.gg/SVnZGzHFvn) 来获取更多社区支持。
|
||||
|
||||
<p align="left">
|
||||
<a target="_blank" href="/images/wechat.png"><img src="https://img.shields.io/badge/WeChat-07C160?style=flat&logo=wechat&logoColor=white"></a>
|
||||
<a target="_blank" href="https://discord.gg/SVnZGzHFvn"><img src="https://img.shields.io/badge/Discord-5865F2?style=flat&logo=discord&logoColor=white"></a>
|
||||
<a target="_blank" href="https://x.com/safeline_waf"><img src="https://img.shields.io/badge/X.com-000000?style=flat&logo=x&logoColor=white"></a>
|
||||
</p>
|
||||
|
||||
#### 💪 专业版
|
||||
|
||||
查看 [社区版 vs 专业版](https://waf-ce.chaitin.cn/version)
|
||||
112
README_EN.md
@@ -1,112 +0,0 @@
|
||||
<p align="center">
|
||||
<img src="https://ctstack-oss.oss-cn-beijing.aliyuncs.com/veinmind/safeline-assets/safeline_logo.png" width="120">
|
||||
</p>
|
||||
<h1 align="center">SafeLine Community Edition</h1>
|
||||
<h3 align="center">Keep hackers at bay</h3>
|
||||
<br>
|
||||
<p align="center">
|
||||
<img src="https://img.shields.io/badge/SafeLine-BEST_WAF-blue">
|
||||
<img src="https://img.shields.io/github/release/chaitin/safeline.svg?color=blue" />
|
||||
<img src="https://img.shields.io/github/release-date/chaitin/safeline.svg?color=blue&label=update" />
|
||||
<img src="https://img.shields.io/docker/v/chaitin/safeline-mgt-api?color=blue">
|
||||
<img src="https://img.shields.io/github/stars/chaitin/safeline?style=social">
|
||||
</p>
|
||||
|
||||
<p align="center"> <a href="https://waf-ce.chaitin.cn/">Official Website</a> </p>
|
||||
<p align="center"> English | <a href="README_CN.md">中文文档</a> </p>
|
||||
|
||||
A simple and easy to use WAF tool. Built on [Chaitin Technology](https://www.chaitin.cn/en/)'s ace 🤖️Intelligent Semantic Analysis algorithm🤖️, designed for the community.
|
||||
|
||||
## ✨ Demo
|
||||
|
||||
### 🔥🔥🔥 Online Demo: https://demo.waf-ce.chaitin.cn:9443/
|
||||
|
||||
There is a simple http server, listened on `http://127.0.0.1:8889`, can be used as for testing.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## 🚀 Installation
|
||||
|
||||
### 1. Make sure [Docker](https://docs.docker.com/engine/install/) and [Compose V2](https://docs.docker.com/compose/install/) are installed correctly on the machine
|
||||
```shell
|
||||
docker info # >= 20.10.6
|
||||
docker compose version # >= 2.0.0
|
||||
```
|
||||
|
||||
### 2. Setup and deploy
|
||||
|
||||
```shell
|
||||
mkdir -p safeline && cd safeline
|
||||
# setup
|
||||
curl -kfLsS https://waf-ce.chaitin.cn/release/latest/setup.sh | bash
|
||||
|
||||
# launch
|
||||
sudo docker compose up -d
|
||||
```
|
||||
|
||||
#### Upgrade
|
||||
|
||||
**WARN: SafeLine will be restarted and your traffic will be unavailable for a short period of time. You may need to choose a proper time for upgration.**
|
||||
|
||||
```shell
|
||||
curl -kfLsS https://waf-ce.chaitin.cn/release/latest/upgrade.sh | bash
|
||||
|
||||
# delete the old used image layers if necessary.
|
||||
docker rmi $(docker images | grep "safeline" | grep "none" | awk '{print $3}')
|
||||
```
|
||||
|
||||
## 🕹️ Quick Start
|
||||
|
||||
### 1. Login
|
||||
|
||||
Open admin page `https://<waf-ip>:9443` and scan qrcode with any authenticator Apps that support TOTP, enter the code to login.
|
||||
|
||||

|
||||
|
||||
### 2. Create website
|
||||
|
||||

|
||||
|
||||
<font color=grey>💡 TIPS: After creating website,execute `curl -H "Host: <Domain>" http://<WAF IP>:<Port>` to check if you can get correct response from web server.</font>
|
||||
|
||||
### 3. Deploy your website to SafeLine
|
||||
|
||||
- If your website is hosted by DNS, just modify your DNS record to WAF
|
||||
- If your website is behind any reverse-proxy like nginx, you can modify your nginx conf and set upstream to WAF
|
||||
|
||||
### 4. Protected!👌
|
||||
|
||||
Try these:
|
||||
|
||||
- `http://<IP or Domain>:<Port>/webshell.php`
|
||||
- `http://<IP or Domain>:<Port>/?id=1%20AND%201=1`
|
||||
- `http://<IP or Domain>:<Port>/?a=<script>alert(1)</script>`
|
||||
|
||||
## 📖 FAQ
|
||||
|
||||
Please refer to our [FAQ](FAQ.md) first if you have any questions.
|
||||
|
||||
For examples:
|
||||
- [docker compose or docker-compose?](FAQ.md#docker-compose-or-docker-compose)
|
||||
- [website configurations](FAQ.md#站点配置问题)
|
||||
- [website not working / not correctly response](FAQ.md#配置完成之后还是没有成功访问到上游服务器)
|
||||
|
||||
## 🏘️ Contact Us
|
||||
|
||||
1. You can make bug feedback and feature suggestions directly through GitHub Issues.
|
||||
2. By scanning the QR code below (use wechat or qq), you can join the discussion group of SafeLine users for detailed discussions.
|
||||
|
||||
<img src="https://waf-ce.chaitin.cn/images/wechat-230717.png" width="30%" />
|
||||
|
||||
## ✨ CTStack
|
||||
<img src="https://ctstack-oss.oss-cn-beijing.aliyuncs.com/CT%20Stack-2.png" width="30%" />
|
||||
|
||||
SafeLine has already joined [CTStack](https://stack.chaitin.com/tool/detail?id=717) community.
|
||||
|
||||
## Star History <a name="star-history"></a>
|
||||
|
||||
<a href="https://github.com/chaitin/safeline/stargazers">
|
||||
<img width="500" alt="Star History Chart" src="https://api.star-history.com/svg?repos=chaitin/safeline&type=Date">
|
||||
</a>
|
||||
@@ -1,316 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
<title>请求存在威胁,已被拦截</title>
|
||||
<link
|
||||
rel="shortcut icon"
|
||||
href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAC8VBMVEUAAAAqKipISEgnJydDQkIDAwMcHBw8PDw8PDwWFhYVFRUqKionJycLCws+Pz8ICAgmJiYICAhHR0cNDQ0QEBApKSksLCwbGxs9PT1HR0cjIyNDQ0MwMDA5OTlHR0cHBwdGRkYyMjIVFRUODg5AQEAYGBgxMTEDAwNJSUkfHx8lJSVBQUELCwsHBwdHR0cwMDAcHBxAQEALCws6OzsDAwMyMjL///89Pj79/v0DAgInt3UnuncoKCgFBAQICQk2NzcWFxYPDw9FRUUlvHhBQUE6PTsLCgtGSEY5OTohISESEhIuLy4slnoyl3grlHM+o21htI0rk3dIqXRCpnEzMzMwoFlgsJNEqWwroFMxMTH2+vg4oWQonUwkJiUeHR02mXxPrHotlnQrlW8ynWqEwqZnuolitoY9nX84oGs9o2o/p2Y6pmEtLCz5/Pvf7+g7nngpkHVLrXA5pGg2o10jm0xLS0selUkLAADu9fKx1sJnt5BMpoZLqXgwmnIzoGE4QT3C3dBSqYpYsINIpn1AoHtBpHc2nHU6o3AnrG4qqGw0PjkQGxYIEA5ksZZdtYFSq4FDoYBZs3xTsHc0lWEqnFo2glkvFSsaHBvn8+7b6+K43Mx5vaFasIhHooVVr344m20smmQaWEZEMT8xST642san0rtxuZhZrI4+oXIbmGEAjlRFTEg3MDgwOTRasZNvvI49sn4iuXQor3EdqGkkfGYipWEsm18npE4tV0Q5SUFDOkBFKj05IDQnAR0KFBF0v5cniG80jF0dmlUAlTiwzrqezrdpt5cns3MvoWksmmkyf1g6dFQvdVMCl1AwbVA9ZE4oZUoxY0EVAAHX5t3S5t3L39Kix66Sx6yWwKVNqIFIsHcpjm8yl24VmlosiUoAjkaBvZuBtZBZo3osk2IwpFohalMvekwvckE/LToZSTg2KDQwIC0UMyceLSUOKiFWsI92rY1IrX4rhVoAkiwiABZxr4Ihw3xfqnMmgGAMmkcAjgBUQVAtAAAANnRSTlMABP4G/v0bGjcoNyEKyEbs4NPMvEMR/fz78uzYzcG7bmxsbEsq/PT05sy4rKuVk5OTfn3v202D2tR1AAAI+UlEQVRYw7SSP2uDQBjGeyqc0OIgFBKk4pChEAiEDkIcAv7B+wqd+xk635p0Le7FjtrFqf5ZMiVoiN8ihHyAzH3vbEmTJk069IeeD+/r85x33sU/Il7jjgx08LX4dzNWjJ6uareApuo9Q8HnhyCElZ7afmQIABdttadghM6xi5eGDm5hD8jQjUsRnZ7dUAXBF+DmRFHzFHhRNU58BbpSdF+wfcm3OVEeBHnEJS8Kvq5coV/8uN+2GXUmRWz6MEoSP+RSymreavcxOurvdG1Jkmw7rJ6zPAzzsB5Z1qgOmc6eqxC60O52jiSIsgpvuIx8Np1UVTAbWAO4ZkFVTaaznPcgQZXFw34N7A2ZlGwcy3EGHAfkJpEyaDQR2qEEJGtuy/zEzdIH8ANgZ1gPaeZ+dVuuJqOf678B/xayqoOgLOcvL/OyDIJ6RaC4TbjZ3weEu2bL80xCKIycVVHE8XA8juO4KFZNzfMoITC2zC5Gu/+/b3oAWaRrSqnHoGlK38eOM35nyuNQuk4XhCmzv3MekHJHAFosR4u3++ETg5DXMrFgD5LyddiUhvdvi9GyoAS4U9D3BXxwRT4hiYRhGGcJ+gvRpQ6hBy8eunRqCBM8SKc5CObgjuNCB2dAHYUcEV0WkU5jB5fJ2cEM2oO6ECjuJmqHlkhb3ENBErWLkBRFQd6KiPa07/fNuMQ+Mwzf9877/Ob53tGj2mKxHalakw8nu7lcbvfoWrSCH/6jVbw+wqWTh6S1GmkXF1G3/tUhBgwWpGIuHAaC1dQSxZ3WAtg1wbK1I4otkxX84XCuiNsNA/8CjOlw5b5bRwTTApLpP6lF5K9373G7buxNH2CwOODau6u73eFIpCFCN9Y3TdrWJDYikbDbXb/bwwZDHzCktzgcDrrkrruBgBDVSiWZrFS+alJ3VWQHP7SVaDBY9EMaYM4I25ICAd6CKEqW5drn7e2Pmx6PZxM9vny4qKVrUKZQA4qglMBinNNGOAufRwGwW/D7fc4VZ/J9IZvN5rOJRDYPix9c0m73+fyCQCEIRKAhxKw6xkEdDVLaYL8RkFuSOuV8ECkTPD/MZPAixnYkacUJDIRoKzRJ07pBDBg3kiCle0Nh+3pKKuej8y6XiwgknpvNqw0i4HIF5qMxVkqtq4ibroI8xnEMMJBTJMmv9e3sfixDEPNwn141XwSq+XIehQ0UMoUy20es8STYDOoIyCme7rX9mr/sCWI/4fr9p8FQMJamcOhSETG2zEmA8PvbPRoAeAiTM/wUT36/FdQEEseysaiKOH16bAgyxciPz2cEKuURAGe4VWiwzUwCYExnNvN4BHEmpIZI7Z8F8CcDeV+TYeJx5rh5FX0NCH1SSN5s1o0BYGTCbDaTvYO4LEOn12Zf2eLY1K8NNXT0/PjCG4cXjzBLIpZCALvTGzrokWCbGAHAMALwfDrExOUahPA67curLMcWtNEFL3/amDjTOIR1ocOltpYRIM3zCDAMgNFpM4hMg9PG1BDCtmRfTrHcfgLOQQQ2LpfsNi/DHD+dErEOt6oBUIB306MY8JfJ8glJJAzDOLEgRHQqCDoaHbp1Wjp4mFMwgczgwBxcnNVRajq0wl5aRwX/ewhJiDLTssP6F9ZzF5FglRUqxLVSMgw7BUm1dOi4z/epu72n+eR7fj7PO++LmkywAIDgMhuA+MQhh+toVV29jm/E0+XyqtkgcF/Xb7tX1wOAQBxADwCNwBLCDv3iI59LuT1f58izj1cTaZutklB5HxFxCtphBoDgdoieRQTSRJY16fZOw5zgAoB/abW6eU4hJ75crsQ3mjZe5Y9ckHHK8bFiMLsELny6pzOxLG3ixALLsrrS7j+A4+Nl71wBwWC4axrJRB1keDW57RIETrECIQCwW9JBtjBBB4kCzsK5oGvbl+Rf0pBc5RWrIvy6Gw1xhedVHxC5MEFYlfAZBdBB+rAoIUPphAKSfCbpwAuPd3NWqzWXr42G+DfJsd32B0EgiJMSEkiLdJ+10oxkYn+kckE/AajfMXL7z918CoRUoXe5RAlGD83hD+YI4r4vsZBp6TZOz8YkWDgNvgNgk3uFWqpWS+UL2Ge6Gt/SqsoPEOE/r6wkxWanKUCzEIOF1/oQUHUMTBt/3hdSHYLotowDxBdbpsr7kCNYfzXBwIIGctKE2HxMkvode8Df9vLVjGPUulahkIKFZ6wWtXCQqIrJtj9g7+gkCSK0gNbcDMMwscZFKASEMys+JTyj1j0XCj0PHmioxJOYdUIeCl00YpDMzEFMM0wx8zj3ZXfIDoRXjBRtTbSOIDyj19C0FSOitx2A3i33GQaSKc0QMKZlqIW6uwNEIOr0imJxtM/DlayIouh1RiHHpToMoLRjI8D4JI4rTOPNLbuHiIgYSe9DjEJ4R1WMZAdyXHlrMCsQTI7//3HVrqCY5ccbWbZY9EAcOrORYpV0k0xAogj5YdQe0rstsnzzuMyQ+1q0cGRBM0U+2dp8kFEWvf7zWvTQCwS6uUTDw/2aXa+3yKiHzS1ye0rz/g/C39rLl7dBIA7DaxaaUCCEQDUCUQOG1CCOBHOCXJtgapuqWRx6Gr5CBapuCk0w+wwT1YgmDfsKe48jpQtJm4m9Cclx93ue+6fO0qM4jvKsPGyRQYHT/P76/Nj1+B54P1ZmOa/VLfCjQPXjCIFhe+BVveLIT3PHV/828BgEj8I48tV7ATbhopMbLmd2WwQUp9P7cZyenS8D7942MN5EhNA8u1YsSdMkSViv4Ph+g1/0seqa5TRCNBn877wuDBpRSussK8+DYrOHAjgTeFNmWU0pyowFbmBisIShqIOubZhwbIALmjVtF9SF4C3BT9aghZSGYViTIC+rlN0lrco8IDUGUaEN808NsosCXgRF0JVtVTVIVbVlFwDnQ/hcecKPd+HrJERIWBQBDwC4kKIIeSSi+/NHTxbVMQmRJIkQOACBHhpDt+mos8ePrrltYEIUc1YELU6j27Dns9nTZ59sayvuQAQvCXql2fLriD9chePBcR/QnjPO/jyqYtmeaax1ZG2Ynm0p6stfoy4VeYHIyhLwv+UH4kmftbvi1LgAAAAASUVORK5CYII="
|
||||
/>
|
||||
<style>
|
||||
html {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.container {
|
||||
text-align: center;
|
||||
word-break: keep-all;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background: white;
|
||||
font-size: 12px;
|
||||
min-height: 450px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.logo {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.intercepted {
|
||||
margin-top: 3.5rem;
|
||||
margin-bottom: 1.5rem;
|
||||
font-size: 20px;
|
||||
line-height: 1.6;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.intercepted-item {
|
||||
margin: 8px 0;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: absolute;
|
||||
bottom: 32px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
color: #a8a8a8;
|
||||
font-size: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
.footer-waflink {
|
||||
color: #27b876;
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<table class="content">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="logo">
|
||||
<svg
|
||||
width="200px"
|
||||
height="200px"
|
||||
viewBox="0 0 396 407"
|
||||
version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
>
|
||||
<title>编组 12</title>
|
||||
<defs>
|
||||
<linearGradient
|
||||
x1="50%"
|
||||
y1="0%"
|
||||
x2="50%"
|
||||
y2="100%"
|
||||
id="linearGradient-1"
|
||||
>
|
||||
<stop stop-color="#4B4B4B" offset="0%"></stop>
|
||||
<stop stop-color="#000000" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
<filter
|
||||
x="-3.0%"
|
||||
y="-2.8%"
|
||||
width="106.1%"
|
||||
height="105.6%"
|
||||
filterUnits="objectBoundingBox"
|
||||
id="filter-2"
|
||||
>
|
||||
<feGaussianBlur
|
||||
stdDeviation="3"
|
||||
in="SourceGraphic"
|
||||
></feGaussianBlur>
|
||||
</filter>
|
||||
<linearGradient
|
||||
x1="50%"
|
||||
y1="0%"
|
||||
x2="50%"
|
||||
y2="100%"
|
||||
id="linearGradient-3"
|
||||
>
|
||||
<stop
|
||||
stop-color="#24BC43"
|
||||
stop-opacity="0.8"
|
||||
offset="0%"
|
||||
></stop>
|
||||
<stop
|
||||
stop-color="#3ACBAB"
|
||||
stop-opacity="0.7"
|
||||
offset="100%"
|
||||
></stop>
|
||||
</linearGradient>
|
||||
<path
|
||||
d="M110.049657,49.667649 C110.049657,49.667649 81.1358702,46.2263115 76.8,26.7636364 C72.4880848,46.2263115 43.5503431,49.667649 43.5503431,49.667649 C14.2053649,53.3001718 0,36.4567369 0,36.4567369 C13.941859,65.8036979 38.4,64.7712967 38.4,64.7712967 L115.2,64.7712967 C115.2,64.7712967 139.634186,65.8036979 153.6,36.4567369 C153.6,36.4567369 139.394635,53.3192904 110.049657,49.667649 Z"
|
||||
id="path-4"
|
||||
></path>
|
||||
<filter
|
||||
x="-16.9%"
|
||||
y="-57.9%"
|
||||
width="133.9%"
|
||||
height="236.8%"
|
||||
filterUnits="objectBoundingBox"
|
||||
id="filter-5"
|
||||
>
|
||||
<feOffset
|
||||
dx="0"
|
||||
dy="4"
|
||||
in="SourceAlpha"
|
||||
result="shadowOffsetOuter1"
|
||||
></feOffset>
|
||||
<feGaussianBlur
|
||||
stdDeviation="8"
|
||||
in="shadowOffsetOuter1"
|
||||
result="shadowBlurOuter1"
|
||||
></feGaussianBlur>
|
||||
<feColorMatrix
|
||||
values="0 0 0 0 0 0 0 0 0 0.490319293 0 0 0 0 0.292243323 0 0 0 1 0"
|
||||
type="matrix"
|
||||
in="shadowBlurOuter1"
|
||||
></feColorMatrix>
|
||||
</filter>
|
||||
</defs>
|
||||
<g
|
||||
id="页面-1"
|
||||
stroke="none"
|
||||
stroke-width="1"
|
||||
fill="none"
|
||||
fill-rule="evenodd"
|
||||
>
|
||||
<g id="编组-12" transform="translate(49.000000, 38.000000)">
|
||||
<path
|
||||
d="M292.40836,59.04 C290.927217,51.9634286 285.002646,46.6971429 277.761503,46.368 C222.13636,44.8868571 176.385503,16.5805714 157.953503,3.08571429 C152.358074,-1.02857143 144.95236,-1.02857143 139.356931,3.08571429 C120.431217,16.5805714 75.1740742,44.8868571 19.5489314,46.368 C12.4723599,46.6971429 6.21864565,51.9634286 4.90207422,59.04 C-3.98478292,103.474286 -19.2899258,254.057143 148.902074,324 C316.60036,253.892571 300.966074,103.474286 292.40836,59.04 Z"
|
||||
id="路径"
|
||||
fill="url(#linearGradient-1)"
|
||||
fill-rule="nonzero"
|
||||
></path>
|
||||
<path
|
||||
d="M292.40836,59.04 C290.927217,51.9634286 285.002646,46.6971429 277.761503,46.368 C222.13636,44.8868571 176.385503,16.5805714 157.953503,3.08571429 C152.358074,-1.02857143 144.95236,-1.02857143 139.356931,3.08571429 C120.431217,16.5805714 75.1740742,44.8868571 19.5489314,46.368 C12.4723599,46.6971429 6.21864565,51.9634286 4.90207422,59.04 C-3.98478292,103.474286 -19.2899258,254.057143 148.902074,324 C316.60036,253.892571 300.966074,103.474286 292.40836,59.04 Z"
|
||||
id="路径"
|
||||
fill="url(#linearGradient-1)"
|
||||
fill-rule="nonzero"
|
||||
filter="url(#filter-2)"
|
||||
></path>
|
||||
<path
|
||||
d="M149,261.4 C205.553958,261.4 251.4,215.553958 251.4,159 C251.4,131.275004 240.381593,106.123494 222.484813,87.6855068 C209.900749,96.0964568 185.81512,106.024178 175.564259,100.853688 C166.334879,96.1984273 157.476591,88.4505652 148.989396,77.610101 C142.047769,88.5334102 134.670586,95.5517221 126.857848,98.6650367 C120.689419,101.123107 98.2592604,102.915695 75.4419467,87.761039 C57.5883513,106.192154 46.6,131.312844 46.6,159 C46.6,215.553958 92.4460416,261.4 149,261.4 Z"
|
||||
id="椭圆形备份-26"
|
||||
fill="url(#linearGradient-3)"
|
||||
></path>
|
||||
<g
|
||||
id="编组-5备份-6"
|
||||
transform="translate(91.771423, 102.101722)"
|
||||
fill="#FFFFFF"
|
||||
>
|
||||
<polygon
|
||||
id="路径-130备份-29"
|
||||
transform="translate(57.217971, 95.920999) rotate(-180.000000) translate(-57.217971, -95.920999) "
|
||||
points="56.6651511 64.9496372 -7.57241738e-17 97.1108413 50.6084036 126.892361 68.8016729 117.264704 34.3433228 97.1108413 56.6651511 84.5503086 96.9001091 107.376711 96.9001091 114.88399 114.435942 125.435553 114.435942 97.1108413"
|
||||
></polygon>
|
||||
<polygon
|
||||
id="路径-130备份-30"
|
||||
transform="translate(57.217971, 30.971362) rotate(-360.000000) translate(-57.217971, -30.971362) "
|
||||
points="56.6651511 2.84217094e-14 -7.57241738e-17 32.1612041 50.6084036 61.9427239 68.8016729 52.3150668 34.3433228 32.1612041 56.6651511 19.6006714 96.9001091 42.4270741 96.9001091 49.9343528 114.435942 60.4859155 114.435942 32.1612041"
|
||||
></polygon>
|
||||
<polygon
|
||||
id="路径-130备份-29"
|
||||
opacity="0.40499442"
|
||||
transform="translate(57.217971, 95.920999) rotate(-180.000000) translate(-57.217971, -95.920999) "
|
||||
points="56.6651511 64.9496372 -7.57241738e-17 97.1108413 50.6084036 126.892361 68.8016729 117.264704 34.3433228 97.1108413 56.6651511 84.5503086 96.9001091 107.376711 96.9001091 114.88399 114.435942 125.435553 114.435942 97.1108413"
|
||||
></polygon>
|
||||
<polygon
|
||||
id="路径-130备份-30"
|
||||
opacity="0.40499442"
|
||||
transform="translate(57.217971, 30.971362) rotate(-360.000000) translate(-57.217971, -30.971362) "
|
||||
points="56.6651511 4.8316906e-13 -7.57241738e-17 32.1612041 50.6084036 61.9427239 68.8016729 52.3150668 34.3433228 32.1612041 56.6651511 19.6006714 96.9001091 42.4270741 96.9001091 49.9343528 114.435942 60.4859155 114.435942 32.1612041"
|
||||
></polygon>
|
||||
</g>
|
||||
<g
|
||||
id="长亭logo备份-18"
|
||||
transform="translate(72.200000, 45.222222)"
|
||||
fill-rule="nonzero"
|
||||
>
|
||||
<g id="编组-7">
|
||||
<path
|
||||
d="M96.7632666,18.0061837 C96.7632666,18.0061837 79.3862969,15.2966085 76.7907961,0 C74.1952953,15.2966085 56.8183256,18.0061837 56.8183256,18.0061837 C39.1836466,20.8694936 30.6424242,7.60987058 30.6424242,7.60987058 C39.0363842,30.6893013 53.7258141,29.862977 53.7258141,29.862977 L99.8741859,29.862977 C99.8741859,29.862977 114.563616,30.6700845 122.957576,7.60987058 C122.957576,7.60987058 114.416353,20.8694936 96.7816744,18.0061837 L96.7632666,18.0061837 Z"
|
||||
id="路径"
|
||||
fill="#27B876"
|
||||
></path>
|
||||
<g id="路径">
|
||||
<use
|
||||
fill="black"
|
||||
fill-opacity="1"
|
||||
filter="url(#filter-5)"
|
||||
xlink:href="#path-4"
|
||||
></use>
|
||||
<use fill="#27B876" xlink:href="#path-4"></use>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="intercepted">请求存在威胁,已被拦截</div>
|
||||
<div class="intercepted-item" id="EventID"></div>
|
||||
<div class="intercepted-item" id="TYPE"></div>
|
||||
<div class="intercepted-item">拦截时间: <span id="now"></span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="footer">
|
||||
安全检测能力由
|
||||
<a class="footer-waflink" href="https://waf-ce.chaitin.cn"
|
||||
>长亭雷池 WAF</a
|
||||
>
|
||||
驱动
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
// 显示当前时间
|
||||
function timestring() {
|
||||
var d = new Date();
|
||||
function p(d) {
|
||||
return d < 10 ? "0" + d : d;
|
||||
}
|
||||
return (
|
||||
d.getFullYear() +
|
||||
"-" +
|
||||
p(d.getMonth() + 1) +
|
||||
"-" +
|
||||
p(d.getDate()) +
|
||||
" " +
|
||||
p(d.getHours()) +
|
||||
":" +
|
||||
p(d.getMinutes())
|
||||
);
|
||||
}
|
||||
document.getElementById("now").innerText = timestring();
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// 这段代码是从源文件上直接抄下来的,原封不动的复制下来的
|
||||
window.onload = function () {
|
||||
var nodes = document.getElementsByTagName("body")[0].childNodes;
|
||||
var fit2inserts = null;
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
if (
|
||||
nodes[i].nodeType == 8 &&
|
||||
nodes[i].data.trimLeft().startsWith("event_id")
|
||||
) {
|
||||
fit2inserts = nodes[i];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 以后引擎按此约定插入新参数:
|
||||
* <!-- event_id: ****** type: A anymore: **** -->
|
||||
*/
|
||||
|
||||
try {
|
||||
var inserts =
|
||||
document.getElementsByTagName("html")[0].nextSibling || fit2inserts;
|
||||
var insertsData = inserts && (inserts.data || "");
|
||||
var incertDataList = insertsData.split(" ");
|
||||
var getVal = function (key) {
|
||||
return incertDataList[incertDataList.indexOf(key + ":") + 1];
|
||||
};
|
||||
var event_id = getVal("event_id");
|
||||
var type = getVal("TYPE");
|
||||
// var anymore = getVal('anymore') // 新增参数示例
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
if (event_id) {
|
||||
document.getElementById("EventID").innerText = "EventID: " + event_id;
|
||||
}
|
||||
if (type) {
|
||||
document.getElementById("TYPE").innerText = "TYPE: " + type;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,287 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
<title>请求存在威胁,已被拦截</title>
|
||||
<link
|
||||
rel="shortcut icon"
|
||||
href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAC8VBMVEUAAAAqKipISEgnJydDQkIDAwMcHBw8PDw8PDwWFhYVFRUqKionJycLCws+Pz8ICAgmJiYICAhHR0cNDQ0QEBApKSksLCwbGxs9PT1HR0cjIyNDQ0MwMDA5OTlHR0cHBwdGRkYyMjIVFRUODg5AQEAYGBgxMTEDAwNJSUkfHx8lJSVBQUELCwsHBwdHR0cwMDAcHBxAQEALCws6OzsDAwMyMjL///89Pj79/v0DAgInt3UnuncoKCgFBAQICQk2NzcWFxYPDw9FRUUlvHhBQUE6PTsLCgtGSEY5OTohISESEhIuLy4slnoyl3grlHM+o21htI0rk3dIqXRCpnEzMzMwoFlgsJNEqWwroFMxMTH2+vg4oWQonUwkJiUeHR02mXxPrHotlnQrlW8ynWqEwqZnuolitoY9nX84oGs9o2o/p2Y6pmEtLCz5/Pvf7+g7nngpkHVLrXA5pGg2o10jm0xLS0selUkLAADu9fKx1sJnt5BMpoZLqXgwmnIzoGE4QT3C3dBSqYpYsINIpn1AoHtBpHc2nHU6o3AnrG4qqGw0PjkQGxYIEA5ksZZdtYFSq4FDoYBZs3xTsHc0lWEqnFo2glkvFSsaHBvn8+7b6+K43Mx5vaFasIhHooVVr344m20smmQaWEZEMT8xST642san0rtxuZhZrI4+oXIbmGEAjlRFTEg3MDgwOTRasZNvvI49sn4iuXQor3EdqGkkfGYipWEsm18npE4tV0Q5SUFDOkBFKj05IDQnAR0KFBF0v5cniG80jF0dmlUAlTiwzrqezrdpt5cns3MvoWksmmkyf1g6dFQvdVMCl1AwbVA9ZE4oZUoxY0EVAAHX5t3S5t3L39Kix66Sx6yWwKVNqIFIsHcpjm8yl24VmlosiUoAjkaBvZuBtZBZo3osk2IwpFohalMvekwvckE/LToZSTg2KDQwIC0UMyceLSUOKiFWsI92rY1IrX4rhVoAkiwiABZxr4Ihw3xfqnMmgGAMmkcAjgBUQVAtAAAANnRSTlMABP4G/v0bGjcoNyEKyEbs4NPMvEMR/fz78uzYzcG7bmxsbEsq/PT05sy4rKuVk5OTfn3v202D2tR1AAAI+UlEQVRYw7SSP2uDQBjGeyqc0OIgFBKk4pChEAiEDkIcAv7B+wqd+xk635p0Le7FjtrFqf5ZMiVoiN8ihHyAzH3vbEmTJk069IeeD+/r85x33sU/Il7jjgx08LX4dzNWjJ6uareApuo9Q8HnhyCElZ7afmQIABdttadghM6xi5eGDm5hD8jQjUsRnZ7dUAXBF+DmRFHzFHhRNU58BbpSdF+wfcm3OVEeBHnEJS8Kvq5coV/8uN+2GXUmRWz6MEoSP+RSymreavcxOurvdG1Jkmw7rJ6zPAzzsB5Z1qgOmc6eqxC60O52jiSIsgpvuIx8Np1UVTAbWAO4ZkFVTaaznPcgQZXFw34N7A2ZlGwcy3EGHAfkJpEyaDQR2qEEJGtuy/zEzdIH8ANgZ1gPaeZ+dVuuJqOf678B/xayqoOgLOcvL/OyDIJ6RaC4TbjZ3weEu2bL80xCKIycVVHE8XA8juO4KFZNzfMoITC2zC5Gu/+/b3oAWaRrSqnHoGlK38eOM35nyuNQuk4XhCmzv3MekHJHAFosR4u3++ETg5DXMrFgD5LyddiUhvdvi9GyoAS4U9D3BXxwRT4hiYRhGGcJ+gvRpQ6hBy8eunRqCBM8SKc5CObgjuNCB2dAHYUcEV0WkU5jB5fJ2cEM2oO6ECjuJmqHlkhb3ENBErWLkBRFQd6KiPa07/fNuMQ+Mwzf9877/Ob53tGj2mKxHalakw8nu7lcbvfoWrSCH/6jVbw+wqWTh6S1GmkXF1G3/tUhBgwWpGIuHAaC1dQSxZ3WAtg1wbK1I4otkxX84XCuiNsNA/8CjOlw5b5bRwTTApLpP6lF5K9373G7buxNH2CwOODau6u73eFIpCFCN9Y3TdrWJDYikbDbXb/bwwZDHzCktzgcDrrkrruBgBDVSiWZrFS+alJ3VWQHP7SVaDBY9EMaYM4I25ICAd6CKEqW5drn7e2Pmx6PZxM9vny4qKVrUKZQA4qglMBinNNGOAufRwGwW/D7fc4VZ/J9IZvN5rOJRDYPix9c0m73+fyCQCEIRKAhxKw6xkEdDVLaYL8RkFuSOuV8ECkTPD/MZPAixnYkacUJDIRoKzRJ07pBDBg3kiCle0Nh+3pKKuej8y6XiwgknpvNqw0i4HIF5qMxVkqtq4ibroI8xnEMMJBTJMmv9e3sfixDEPNwn141XwSq+XIehQ0UMoUy20es8STYDOoIyCme7rX9mr/sCWI/4fr9p8FQMJamcOhSETG2zEmA8PvbPRoAeAiTM/wUT36/FdQEEseysaiKOH16bAgyxciPz2cEKuURAGe4VWiwzUwCYExnNvN4BHEmpIZI7Z8F8CcDeV+TYeJx5rh5FX0NCH1SSN5s1o0BYGTCbDaTvYO4LEOn12Zf2eLY1K8NNXT0/PjCG4cXjzBLIpZCALvTGzrokWCbGAHAMALwfDrExOUahPA67curLMcWtNEFL3/amDjTOIR1ocOltpYRIM3zCDAMgNFpM4hMg9PG1BDCtmRfTrHcfgLOQQQ2LpfsNi/DHD+dErEOt6oBUIB306MY8JfJ8glJJAzDOLEgRHQqCDoaHbp1Wjp4mFMwgczgwBxcnNVRajq0wl5aRwX/ewhJiDLTssP6F9ZzF5FglRUqxLVSMgw7BUm1dOi4z/epu72n+eR7fj7PO++LmkywAIDgMhuA+MQhh+toVV29jm/E0+XyqtkgcF/Xb7tX1wOAQBxADwCNwBLCDv3iI59LuT1f58izj1cTaZutklB5HxFxCtphBoDgdoieRQTSRJY16fZOw5zgAoB/abW6eU4hJ75crsQ3mjZe5Y9ckHHK8bFiMLsELny6pzOxLG3ixALLsrrS7j+A4+Nl71wBwWC4axrJRB1keDW57RIETrECIQCwW9JBtjBBB4kCzsK5oGvbl+Rf0pBc5RWrIvy6Gw1xhedVHxC5MEFYlfAZBdBB+rAoIUPphAKSfCbpwAuPd3NWqzWXr42G+DfJsd32B0EgiJMSEkiLdJ+10oxkYn+kckE/AajfMXL7z918CoRUoXe5RAlGD83hD+YI4r4vsZBp6TZOz8YkWDgNvgNgk3uFWqpWS+UL2Ge6Gt/SqsoPEOE/r6wkxWanKUCzEIOF1/oQUHUMTBt/3hdSHYLotowDxBdbpsr7kCNYfzXBwIIGctKE2HxMkvode8Df9vLVjGPUulahkIKFZ6wWtXCQqIrJtj9g7+gkCSK0gNbcDMMwscZFKASEMys+JTyj1j0XCj0PHmioxJOYdUIeCl00YpDMzEFMM0wx8zj3ZXfIDoRXjBRtTbSOIDyj19C0FSOitx2A3i33GQaSKc0QMKZlqIW6uwNEIOr0imJxtM/DlayIouh1RiHHpToMoLRjI8D4JI4rTOPNLbuHiIgYSe9DjEJ4R1WMZAdyXHlrMCsQTI7//3HVrqCY5ccbWbZY9EAcOrORYpV0k0xAogj5YdQe0rstsnzzuMyQ+1q0cGRBM0U+2dp8kFEWvf7zWvTQCwS6uUTDw/2aXa+3yKiHzS1ye0rz/g/C39rLl7dBIA7DaxaaUCCEQDUCUQOG1CCOBHOCXJtgapuqWRx6Gr5CBapuCk0w+wwT1YgmDfsKe48jpQtJm4m9Cclx93ue+6fO0qM4jvKsPGyRQYHT/P76/Nj1+B54P1ZmOa/VLfCjQPXjCIFhe+BVveLIT3PHV/828BgEj8I48tV7ATbhopMbLmd2WwQUp9P7cZyenS8D7942MN5EhNA8u1YsSdMkSViv4Ph+g1/0seqa5TRCNBn877wuDBpRSussK8+DYrOHAjgTeFNmWU0pyowFbmBisIShqIOubZhwbIALmjVtF9SF4C3BT9aghZSGYViTIC+rlN0lrco8IDUGUaEN808NsosCXgRF0JVtVTVIVbVlFwDnQ/hcecKPd+HrJERIWBQBDwC4kKIIeSSi+/NHTxbVMQmRJIkQOACBHhpDt+mos8ePrrltYEIUc1YELU6j27Dns9nTZ59sayvuQAQvCXql2fLriD9chePBcR/QnjPO/jyqYtmeaax1ZG2Ynm0p6stfoy4VeYHIyhLwv+UH4kmftbvi1LgAAAAASUVORK5CYII="
|
||||
/>
|
||||
<style>
|
||||
html {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.container {
|
||||
text-align: center;
|
||||
word-break: keep-all;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background: white;
|
||||
font-size: 12px;
|
||||
min-height: 450px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.logo {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.intercepted {
|
||||
margin-top: 3.5rem;
|
||||
margin-bottom: 1.5rem;
|
||||
font-size: 20px;
|
||||
line-height: 1.6;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.intercepted-item {
|
||||
margin: 8px 0;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: absolute;
|
||||
bottom: 32px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
color: #a8a8a8;
|
||||
font-size: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
.footer-waflink {
|
||||
color: #27b876;
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<table class="content">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="logo">
|
||||
<svg
|
||||
width="200px"
|
||||
height="200px"
|
||||
viewBox="0 0 396 407"
|
||||
version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
>
|
||||
<title>编组 12</title>
|
||||
<defs>
|
||||
<linearGradient
|
||||
x1="50%"
|
||||
y1="0%"
|
||||
x2="50%"
|
||||
y2="100%"
|
||||
id="linearGradient-1"
|
||||
>
|
||||
<stop stop-color="#4B4B4B" offset="0%"></stop>
|
||||
<stop stop-color="#000000" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
<filter
|
||||
x="-3.0%"
|
||||
y="-2.8%"
|
||||
width="106.1%"
|
||||
height="105.6%"
|
||||
filterUnits="objectBoundingBox"
|
||||
id="filter-2"
|
||||
>
|
||||
<feGaussianBlur
|
||||
stdDeviation="3"
|
||||
in="SourceGraphic"
|
||||
></feGaussianBlur>
|
||||
</filter>
|
||||
<linearGradient
|
||||
x1="50%"
|
||||
y1="0%"
|
||||
x2="50%"
|
||||
y2="100%"
|
||||
id="linearGradient-3"
|
||||
>
|
||||
<stop
|
||||
stop-color="#24BC43"
|
||||
stop-opacity="0.8"
|
||||
offset="0%"
|
||||
></stop>
|
||||
<stop
|
||||
stop-color="#3ACBAB"
|
||||
stop-opacity="0.7"
|
||||
offset="100%"
|
||||
></stop>
|
||||
</linearGradient>
|
||||
<path
|
||||
d="M110.049657,49.667649 C110.049657,49.667649 81.1358702,46.2263115 76.8,26.7636364 C72.4880848,46.2263115 43.5503431,49.667649 43.5503431,49.667649 C14.2053649,53.3001718 0,36.4567369 0,36.4567369 C13.941859,65.8036979 38.4,64.7712967 38.4,64.7712967 L115.2,64.7712967 C115.2,64.7712967 139.634186,65.8036979 153.6,36.4567369 C153.6,36.4567369 139.394635,53.3192904 110.049657,49.667649 Z"
|
||||
id="path-4"
|
||||
></path>
|
||||
<filter
|
||||
x="-16.9%"
|
||||
y="-57.9%"
|
||||
width="133.9%"
|
||||
height="236.8%"
|
||||
filterUnits="objectBoundingBox"
|
||||
id="filter-5"
|
||||
>
|
||||
<feOffset
|
||||
dx="0"
|
||||
dy="4"
|
||||
in="SourceAlpha"
|
||||
result="shadowOffsetOuter1"
|
||||
></feOffset>
|
||||
<feGaussianBlur
|
||||
stdDeviation="8"
|
||||
in="shadowOffsetOuter1"
|
||||
result="shadowBlurOuter1"
|
||||
></feGaussianBlur>
|
||||
<feColorMatrix
|
||||
values="0 0 0 0 0 0 0 0 0 0.490319293 0 0 0 0 0.292243323 0 0 0 1 0"
|
||||
type="matrix"
|
||||
in="shadowBlurOuter1"
|
||||
></feColorMatrix>
|
||||
</filter>
|
||||
</defs>
|
||||
<g
|
||||
id="页面-1"
|
||||
stroke="none"
|
||||
stroke-width="1"
|
||||
fill="none"
|
||||
fill-rule="evenodd"
|
||||
>
|
||||
<g id="编组-12" transform="translate(49.000000, 38.000000)">
|
||||
<path
|
||||
d="M292.40836,59.04 C290.927217,51.9634286 285.002646,46.6971429 277.761503,46.368 C222.13636,44.8868571 176.385503,16.5805714 157.953503,3.08571429 C152.358074,-1.02857143 144.95236,-1.02857143 139.356931,3.08571429 C120.431217,16.5805714 75.1740742,44.8868571 19.5489314,46.368 C12.4723599,46.6971429 6.21864565,51.9634286 4.90207422,59.04 C-3.98478292,103.474286 -19.2899258,254.057143 148.902074,324 C316.60036,253.892571 300.966074,103.474286 292.40836,59.04 Z"
|
||||
id="路径"
|
||||
fill="url(#linearGradient-1)"
|
||||
fill-rule="nonzero"
|
||||
></path>
|
||||
<path
|
||||
d="M292.40836,59.04 C290.927217,51.9634286 285.002646,46.6971429 277.761503,46.368 C222.13636,44.8868571 176.385503,16.5805714 157.953503,3.08571429 C152.358074,-1.02857143 144.95236,-1.02857143 139.356931,3.08571429 C120.431217,16.5805714 75.1740742,44.8868571 19.5489314,46.368 C12.4723599,46.6971429 6.21864565,51.9634286 4.90207422,59.04 C-3.98478292,103.474286 -19.2899258,254.057143 148.902074,324 C316.60036,253.892571 300.966074,103.474286 292.40836,59.04 Z"
|
||||
id="路径"
|
||||
fill="url(#linearGradient-1)"
|
||||
fill-rule="nonzero"
|
||||
filter="url(#filter-2)"
|
||||
></path>
|
||||
<path
|
||||
d="M149,261.4 C205.553958,261.4 251.4,215.553958 251.4,159 C251.4,131.275004 240.381593,106.123494 222.484813,87.6855068 C209.900749,96.0964568 185.81512,106.024178 175.564259,100.853688 C166.334879,96.1984273 157.476591,88.4505652 148.989396,77.610101 C142.047769,88.5334102 134.670586,95.5517221 126.857848,98.6650367 C120.689419,101.123107 98.2592604,102.915695 75.4419467,87.761039 C57.5883513,106.192154 46.6,131.312844 46.6,159 C46.6,215.553958 92.4460416,261.4 149,261.4 Z"
|
||||
id="椭圆形备份-26"
|
||||
fill="url(#linearGradient-3)"
|
||||
></path>
|
||||
<g
|
||||
id="编组-5备份-6"
|
||||
transform="translate(91.771423, 102.101722)"
|
||||
fill="#FFFFFF"
|
||||
>
|
||||
<polygon
|
||||
id="路径-130备份-29"
|
||||
transform="translate(57.217971, 95.920999) rotate(-180.000000) translate(-57.217971, -95.920999) "
|
||||
points="56.6651511 64.9496372 -7.57241738e-17 97.1108413 50.6084036 126.892361 68.8016729 117.264704 34.3433228 97.1108413 56.6651511 84.5503086 96.9001091 107.376711 96.9001091 114.88399 114.435942 125.435553 114.435942 97.1108413"
|
||||
></polygon>
|
||||
<polygon
|
||||
id="路径-130备份-30"
|
||||
transform="translate(57.217971, 30.971362) rotate(-360.000000) translate(-57.217971, -30.971362) "
|
||||
points="56.6651511 2.84217094e-14 -7.57241738e-17 32.1612041 50.6084036 61.9427239 68.8016729 52.3150668 34.3433228 32.1612041 56.6651511 19.6006714 96.9001091 42.4270741 96.9001091 49.9343528 114.435942 60.4859155 114.435942 32.1612041"
|
||||
></polygon>
|
||||
<polygon
|
||||
id="路径-130备份-29"
|
||||
opacity="0.40499442"
|
||||
transform="translate(57.217971, 95.920999) rotate(-180.000000) translate(-57.217971, -95.920999) "
|
||||
points="56.6651511 64.9496372 -7.57241738e-17 97.1108413 50.6084036 126.892361 68.8016729 117.264704 34.3433228 97.1108413 56.6651511 84.5503086 96.9001091 107.376711 96.9001091 114.88399 114.435942 125.435553 114.435942 97.1108413"
|
||||
></polygon>
|
||||
<polygon
|
||||
id="路径-130备份-30"
|
||||
opacity="0.40499442"
|
||||
transform="translate(57.217971, 30.971362) rotate(-360.000000) translate(-57.217971, -30.971362) "
|
||||
points="56.6651511 4.8316906e-13 -7.57241738e-17 32.1612041 50.6084036 61.9427239 68.8016729 52.3150668 34.3433228 32.1612041 56.6651511 19.6006714 96.9001091 42.4270741 96.9001091 49.9343528 114.435942 60.4859155 114.435942 32.1612041"
|
||||
></polygon>
|
||||
</g>
|
||||
<g
|
||||
id="长亭logo备份-18"
|
||||
transform="translate(72.200000, 45.222222)"
|
||||
fill-rule="nonzero"
|
||||
>
|
||||
<g id="编组-7">
|
||||
<path
|
||||
d="M96.7632666,18.0061837 C96.7632666,18.0061837 79.3862969,15.2966085 76.7907961,0 C74.1952953,15.2966085 56.8183256,18.0061837 56.8183256,18.0061837 C39.1836466,20.8694936 30.6424242,7.60987058 30.6424242,7.60987058 C39.0363842,30.6893013 53.7258141,29.862977 53.7258141,29.862977 L99.8741859,29.862977 C99.8741859,29.862977 114.563616,30.6700845 122.957576,7.60987058 C122.957576,7.60987058 114.416353,20.8694936 96.7816744,18.0061837 L96.7632666,18.0061837 Z"
|
||||
id="路径"
|
||||
fill="#27B876"
|
||||
></path>
|
||||
<g id="路径">
|
||||
<use
|
||||
fill="black"
|
||||
fill-opacity="1"
|
||||
filter="url(#filter-5)"
|
||||
xlink:href="#path-4"
|
||||
></use>
|
||||
<use fill="#27B876" xlink:href="#path-4"></use>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</div>
|
||||
<div id="intercepted" class="intercepted">
|
||||
请求频率过高,存在威胁,已被拦截
|
||||
</div>
|
||||
<div class="intercepted-item">
|
||||
<span id="intercepted-at">拦截时间</span>: <span id="now"></span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="footer" class="footer">
|
||||
安全检测能力由
|
||||
<a class="footer-waflink" href="https://waf-ce.chaitin.cn"
|
||||
>长亭雷池 WAF</a
|
||||
>
|
||||
驱动
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
// 显示当前时间
|
||||
function timestring() {
|
||||
var d = new Date();
|
||||
function p(d) {
|
||||
return d < 10 ? "0" + d : d;
|
||||
}
|
||||
return (
|
||||
d.getFullYear() +
|
||||
"-" +
|
||||
p(d.getMonth() + 1) +
|
||||
"-" +
|
||||
p(d.getDate()) +
|
||||
" " +
|
||||
p(d.getHours()) +
|
||||
":" +
|
||||
p(d.getMinutes())
|
||||
);
|
||||
}
|
||||
document.getElementById("now").innerText = timestring();
|
||||
</script>
|
||||
|
||||
<script>
|
||||
if (navigator.language.startsWith("en")) {
|
||||
document.title = "Requested too frequently";
|
||||
|
||||
document.getElementById("intercepted").innerText =
|
||||
"Requested too frequently, please try again later";
|
||||
document.getElementById("intercepted-at").innerText = "Intercepted at";
|
||||
document.getElementById("footer").style.display = "none";
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,212 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
<title>网站维护中</title>
|
||||
<style>
|
||||
html {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.container {
|
||||
text-align: center;
|
||||
word-break: keep-all;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background: white;
|
||||
font-size: 12px;
|
||||
min-height: 450px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.logo {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.intercepted {
|
||||
margin-top: 3.5rem;
|
||||
margin-bottom: 1.5rem;
|
||||
font-size: 20px;
|
||||
line-height: 1.6;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.intercepted-item {
|
||||
margin: 8px 0;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: absolute;
|
||||
bottom: 32px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
color: #a8a8a8;
|
||||
font-size: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
.footer-waflink {
|
||||
color: #27b876;
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<table class="content">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="logo">
|
||||
<svg
|
||||
width="300px"
|
||||
height="112px"
|
||||
viewBox="0 0 300 112"
|
||||
version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
>
|
||||
<title>编组 65</title>
|
||||
<defs>
|
||||
<linearGradient
|
||||
x1="50%"
|
||||
y1="0%"
|
||||
x2="50%"
|
||||
y2="100%"
|
||||
id="linearGradient-1"
|
||||
>
|
||||
<stop
|
||||
stop-color="#0FC6C2"
|
||||
stop-opacity="0.1"
|
||||
offset="0%"
|
||||
></stop>
|
||||
<stop
|
||||
stop-color="#0FC6C2"
|
||||
stop-opacity="0"
|
||||
offset="100%"
|
||||
></stop>
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
x1="50%"
|
||||
y1="0%"
|
||||
x2="50%"
|
||||
y2="100%"
|
||||
id="linearGradient-2"
|
||||
>
|
||||
<stop stop-color="#A9D6D3" offset="0%"></stop>
|
||||
<stop stop-color="#8EC6C4" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
x1="17.048305%"
|
||||
y1="8.1635079%"
|
||||
x2="76.1348779%"
|
||||
y2="89.9397366%"
|
||||
id="linearGradient-3"
|
||||
>
|
||||
<stop stop-color="#ECF7F7" offset="0%"></stop>
|
||||
<stop stop-color="#CEEFEE" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g
|
||||
id="问脉"
|
||||
stroke="none"
|
||||
stroke-width="1"
|
||||
fill="none"
|
||||
fill-rule="evenodd"
|
||||
>
|
||||
<g id="编组-65" transform="translate(0.000000, 0.656106)">
|
||||
<path
|
||||
d="M158.105468,46.4305012 C230.638275,48.8882768 280.048484,89.2493521 291.411562,97.5896283 C298.986948,103.149812 301.288867,107.707461 298.317319,111.262574 L0,111.262574 C57.0484407,66.4026752 109.750263,44.7919842 158.105468,46.4305012 Z"
|
||||
id="路径-14备份"
|
||||
fill="url(#linearGradient-1)"
|
||||
opacity="0.6"
|
||||
></path>
|
||||
<path
|
||||
d="M133.744707,59.2516792 C128.220216,62.212914 142.271748,72.3438938 152.603912,72.3438938 C162.936076,72.3438938 170.384509,66.1002168 166.415224,63.7091176 C162.445939,61.3180184 139.269199,56.2904444 133.744707,59.2516792 Z"
|
||||
id="路径-23备份"
|
||||
fill="#CEEEED"
|
||||
></path>
|
||||
<g
|
||||
id="维护备份"
|
||||
transform="translate(125.841376, 4.000000)"
|
||||
fill="url(#linearGradient-2)"
|
||||
fill-rule="nonzero"
|
||||
>
|
||||
<path
|
||||
d="M53.4407915,17.8309532 C49.850381,20.6412105 45.048111,20.2807339 42.738148,17.0275722 C40.428185,13.7744105 41.4704292,8.83897736 45.0608397,6.02872002 L48.4302392,3.3908402 C50.2893442,1.93421992 49.6588911,0.00928311389 46.813125,0.241953931 C43.8131226,0.486558233 40.8354442,1.6843377 38.3140089,3.66074708 C34.2763868,6.82838427 31.8308675,11.6191742 31.8089552,16.4041942 L3.55036904,38.5271177 C-0.0421309333,41.3487126 -1.07876034,46.2575577 1.22851314,49.522012 C2.33804924,51.0840803 4.09016048,52.0468265 6.09769574,52.1975197 C8.105231,52.3482129 10.2029338,51.6744483 11.9272901,50.3251027 L40.1897428,28.2024695 C43.7454976,29.2914901 47.8019094,28.7846954 51.4034487,26.8014661 C55.004988,24.8182368 57.8332485,21.5339069 59.2220045,17.7221341 C60.2487908,14.9244912 58.6731626,13.7367433 56.810191,15.1930733 L53.4407915,17.8309532 Z M5.56827104,46.1206895 C4.79626286,45.0334702 5.14228458,43.3949223 6.34222301,42.4557247 C7.541301,41.5714856 9.09674694,41.7145817 9.85296424,42.7787018 C10.6091815,43.842822 10.2920189,45.4421908 9.13710773,46.3885799 C7.9371693,47.3277774 6.34027921,47.2079088 5.56827104,46.1206895 Z M13.7446583,12.4428814 L20.5888502,22.087378 L24.9316389,18.6903037 L18.087447,9.04580702 L16.9394989,5.05163029 L11.6667257,0 L7.32393706,3.39707438 L10.4272492,10.147387 L13.7446583,12.4428814 Z M38.1657743,33.2576704 C37.8311845,33.2325548 37.4815663,33.3450613 37.1943929,33.5702592 L30.6813074,38.6699737 C30.0831963,39.1405877 29.9105495,39.9581375 30.2943314,40.5024561 L40.1788997,54.4239027 C41.7237519,56.5943835 44.9213986,56.8344109 47.3165731,54.9596835 C49.7156141,53.0852463 50.4093292,49.8002347 48.8653128,47.6257961 L38.976878,33.7040592 C38.7922954,33.4434496 38.5003642,33.282786 38.1657743,33.2576704 Z"
|
||||
id="形状"
|
||||
></path>
|
||||
</g>
|
||||
<g
|
||||
id="维护备份-2"
|
||||
transform="translate(123.841376, 0.000000)"
|
||||
fill="url(#linearGradient-3)"
|
||||
fill-rule="nonzero"
|
||||
>
|
||||
<path
|
||||
d="M53.4407915,17.8309532 C49.850381,20.6412105 45.048111,20.2807339 42.738148,17.0275722 C40.428185,13.7744105 41.4704292,8.83897736 45.0608397,6.02872002 L48.4302392,3.3908402 C50.2893442,1.93421992 49.6588911,0.00928311389 46.813125,0.241953931 C43.8131226,0.486558233 40.8354442,1.6843377 38.3140089,3.66074708 C34.2763868,6.82838427 31.8308675,11.6191742 31.8089552,16.4041942 L3.55036904,38.5271177 C-0.0421309333,41.3487126 -1.07876034,46.2575577 1.22851314,49.522012 C2.33804924,51.0840803 4.09016048,52.0468265 6.09769574,52.1975197 C8.105231,52.3482129 10.2029338,51.6744483 11.9272901,50.3251027 L40.1897428,28.2024695 C43.7454976,29.2914901 47.8019094,28.7846954 51.4034487,26.8014661 C55.004988,24.8182368 57.8332485,21.5339069 59.2220045,17.7221341 C60.2487908,14.9244912 58.6731626,13.7367433 56.810191,15.1930733 L53.4407915,17.8309532 Z M5.56827104,46.1206895 C4.79626286,45.0334702 5.14228458,43.3949223 6.34222301,42.4557247 C7.541301,41.5714856 9.09674694,41.7145817 9.85296424,42.7787018 C10.6091815,43.842822 10.2920189,45.4421908 9.13710773,46.3885799 C7.9371693,47.3277774 6.34027921,47.2079088 5.56827104,46.1206895 Z M13.7446583,12.4428814 L20.5888502,22.087378 L24.9316389,18.6903037 L18.087447,9.04580702 L16.9394989,5.05163029 L11.6667257,0 L7.32393706,3.39707438 L10.4272492,10.147387 L13.7446583,12.4428814 Z M38.1657743,33.2576704 C37.8311845,33.2325548 37.4815663,33.3450613 37.1943929,33.5702592 L30.6813074,38.6699737 C30.0831963,39.1405877 29.9105495,39.9581375 30.2943314,40.5024561 L40.1788997,54.4239027 C41.7237519,56.5943835 44.9213986,56.8344109 47.3165731,54.9596835 C49.7156141,53.0852463 50.4093292,49.8002347 48.8653128,47.6257961 L38.976878,33.7040592 C38.7922954,33.4434496 38.5003642,33.282786 38.1657743,33.2576704 Z"
|
||||
id="形状"
|
||||
></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="intercepted" id="intercepted">
|
||||
网站维护中,暂时无法访问
|
||||
</div>
|
||||
<div class="intercepted-item"><span id="now"></span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="footer" id="footer">
|
||||
安全检测能力由
|
||||
<a class="footer-waflink" href="https://waf-ce.chaitin.cn"
|
||||
>长亭雷池 WAF</a
|
||||
>
|
||||
驱动
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
// 显示当前时间
|
||||
function timestring() {
|
||||
var d = new Date();
|
||||
function p(d) {
|
||||
return d < 10 ? "0" + d : d;
|
||||
}
|
||||
return (
|
||||
d.getFullYear() +
|
||||
"-" +
|
||||
p(d.getMonth() + 1) +
|
||||
"-" +
|
||||
p(d.getDate()) +
|
||||
" " +
|
||||
p(d.getHours()) +
|
||||
":" +
|
||||
p(d.getMinutes())
|
||||
);
|
||||
}
|
||||
document.getElementById("now").innerText = timestring();
|
||||
</script>
|
||||
<script>
|
||||
if (navigator.language.startsWith("en")) {
|
||||
document.title = "Site is Maintaining";
|
||||
|
||||
document.getElementById("intercepted").innerText =
|
||||
"The site is on maintaining, please try again later";
|
||||
document.getElementById("footer").style.display = "none";
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
179
compose.yaml
@@ -5,114 +5,139 @@ networks:
|
||||
ipam:
|
||||
driver: default
|
||||
config:
|
||||
- gateway: ${SUBNET_PREFIX:?SUBNET_PREFIX required}.1
|
||||
subnet: ${SUBNET_PREFIX}.0/24
|
||||
- gateway: ${SUBNET_PREFIX:?SUBNET_PREFIX required}.1
|
||||
subnet: ${SUBNET_PREFIX}.0/24
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: safeline-ce
|
||||
|
||||
services:
|
||||
postgres:
|
||||
container_name: safeline-postgres
|
||||
container_name: safeline-pg
|
||||
restart: always
|
||||
image: postgres:15.2
|
||||
image: ${IMAGE_PREFIX}/safeline-postgres${ARCH_SUFFIX}:15.2
|
||||
volumes:
|
||||
- ${SAFELINE_DIR}/resources/postgres/data:/var/lib/postgresql/data
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- ${SAFELINE_DIR}/resources/postgres/data:/var/lib/postgresql/data
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
environment:
|
||||
- POSTGRES_USER=safeline-ce
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:?postgres password required}
|
||||
- POSTGRES_USER=safeline-ce
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:?postgres password required}
|
||||
networks:
|
||||
safeline-ce:
|
||||
ipv4_address: ${SUBNET_PREFIX}.2
|
||||
cap_drop:
|
||||
- net_raw
|
||||
command: [postgres, -c, max_connections=200]
|
||||
redis:
|
||||
container_name: safeline-redis
|
||||
command: [postgres, -c, max_connections=600]
|
||||
healthcheck:
|
||||
test: pg_isready -U safeline-ce -d safeline-ce
|
||||
mgt:
|
||||
container_name: safeline-mgt
|
||||
restart: always
|
||||
image: redis:7.0.10
|
||||
image: ${IMAGE_PREFIX}/safeline-mgt${REGION}${ARCH_SUFFIX}${RELEASE}:${IMAGE_TAG:?image tag required}
|
||||
volumes:
|
||||
- ${SAFELINE_DIR}/resources/redis/data:/data
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
command: redis-server --appendonly yes --requirepass ${REDIS_PASSWORD}
|
||||
networks:
|
||||
safeline-ce:
|
||||
ipv4_address: ${SUBNET_PREFIX}.3
|
||||
cap_drop:
|
||||
- net_raw
|
||||
sysctls:
|
||||
net.core.somaxconn: "511"
|
||||
management:
|
||||
container_name: safeline-mgt-api
|
||||
restart: always
|
||||
image: chaitin/safeline-mgt-api:${IMAGE_TAG:?image tag required}
|
||||
volumes:
|
||||
- ${SAFELINE_DIR?safeline dir required}/resources/management:/resources/management
|
||||
- ${SAFELINE_DIR}/resources/nginx:/resources/nginx
|
||||
- ${SAFELINE_DIR}/logs:/logs
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- ${SAFELINE_DIR}/resources/mgt:/app/data
|
||||
- ${SAFELINE_DIR}/logs/nginx:/app/log/nginx:z
|
||||
- ${SAFELINE_DIR}/resources/sock:/app/sock
|
||||
- /var/run:/app/run
|
||||
ports:
|
||||
- ${MGT_PORT:-9443}:1443
|
||||
- ${MGT_PORT:-9443}:1443
|
||||
healthcheck:
|
||||
test: curl -k -f https://localhost:1443/api/open/health
|
||||
environment:
|
||||
- MANAGEMENT_RESOURCES_DIR=/resources/management
|
||||
- NGINX_RESOURCES_DIR=/resources/nginx
|
||||
- DATABASE_URL=postgres://safeline-ce:${POSTGRES_PASSWORD}@safeline-postgres/safeline-ce
|
||||
- MARIO_URL=http://safeline-mario:3335
|
||||
- DETECTOR_URL=http://safeline-detector:8001
|
||||
- REDIS_URL=redis://:${REDIS_PASSWORD}@safeline-redis:6379/0
|
||||
- MANAGEMENT_LOGS_DIR=/logs/management
|
||||
- MGT_PG=postgres://safeline-ce:${POSTGRES_PASSWORD}@safeline-pg/safeline-ce?sslmode=disable
|
||||
depends_on:
|
||||
- postgres
|
||||
- fvm
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "100m"
|
||||
max-file: "5"
|
||||
networks:
|
||||
safeline-ce:
|
||||
ipv4_address: ${SUBNET_PREFIX}.4
|
||||
cap_drop:
|
||||
- net_raw
|
||||
detector:
|
||||
detect:
|
||||
container_name: safeline-detector
|
||||
restart: always
|
||||
image: chaitin/safeline-detector:${IMAGE_TAG}
|
||||
image: ${IMAGE_PREFIX}/safeline-detector${REGION}${ARCH_SUFFIX}${RELEASE}:${IMAGE_TAG}
|
||||
volumes:
|
||||
- ${SAFELINE_DIR}/resources/detector:/resources/detector
|
||||
- ${SAFELINE_DIR}/logs/detector:/logs/detector
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- ${SAFELINE_DIR}/resources/detector:/resources/detector
|
||||
- ${SAFELINE_DIR}/logs/detector:/logs/detector
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
environment:
|
||||
- LOG_DIR=/logs/detector
|
||||
- LOG_DIR=/logs/detector
|
||||
networks:
|
||||
safeline-ce:
|
||||
ipv4_address: ${SUBNET_PREFIX}.5
|
||||
cap_drop:
|
||||
- net_raw
|
||||
mario:
|
||||
container_name: safeline-mario
|
||||
restart: always
|
||||
image: chaitin/safeline-mario:${IMAGE_TAG}
|
||||
volumes:
|
||||
- ${SAFELINE_DIR}/resources/mario:/resources/mario
|
||||
- ${SAFELINE_DIR}/logs/mario:/logs/mario
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
environment:
|
||||
- LOG_DIR=/logs/mario
|
||||
- GOGC=100
|
||||
- DATABASE_URL=postgres://safeline-ce:${POSTGRES_PASSWORD}@safeline-postgres/safeline-ce
|
||||
- REDIS_URL=redis://:${REDIS_PASSWORD}@safeline-redis:6379/0
|
||||
networks:
|
||||
safeline-ce:
|
||||
ipv4_address: ${SUBNET_PREFIX}.6
|
||||
cap_drop:
|
||||
- net_raw
|
||||
tengine:
|
||||
container_name: safeline-tengine
|
||||
restart: always
|
||||
image: chaitin/safeline-tengine:${IMAGE_TAG}
|
||||
image: ${IMAGE_PREFIX}/safeline-tengine${REGION}${ARCH_SUFFIX}${RELEASE}:${IMAGE_TAG}
|
||||
volumes:
|
||||
- ${SAFELINE_DIR}/resources/nginx:/etc/nginx
|
||||
- ${SAFELINE_DIR}/resources/management:/resources/management
|
||||
- ${SAFELINE_DIR}/resources/detector:/resources/detector
|
||||
- ${SAFELINE_DIR}/logs/nginx:/var/log/nginx
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- ${SAFELINE_DIR}/resources/cache:/usr/local/nginx/cache
|
||||
- /etc/resolv.conf:/etc/resolv.conf
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /etc/resolv.conf:/etc/resolv.conf:ro
|
||||
- ${SAFELINE_DIR}/resources/nginx:/etc/nginx
|
||||
- ${SAFELINE_DIR}/resources/detector:/resources/detector
|
||||
- ${SAFELINE_DIR}/resources/chaos:/resources/chaos
|
||||
- ${SAFELINE_DIR}/logs/nginx:/var/log/nginx:z
|
||||
- ${SAFELINE_DIR}/resources/cache:/usr/local/nginx/cache
|
||||
- ${SAFELINE_DIR}/resources/sock:/app/sock
|
||||
environment:
|
||||
- MGT_ADDR=${SUBNET_PREFIX}.4:9002
|
||||
- TCD_MGT_API=https://${SUBNET_PREFIX}.4:1443/api/open/publish/server
|
||||
- TCD_SNSERVER=${SUBNET_PREFIX}.5:8000
|
||||
# deprecated
|
||||
- SNSERVER_ADDR=${SUBNET_PREFIX}.5:8000
|
||||
- CHAOS_ADDR=${SUBNET_PREFIX}.10
|
||||
ulimits:
|
||||
nofile: 131072
|
||||
network_mode: host
|
||||
luigi:
|
||||
container_name: safeline-luigi
|
||||
restart: always
|
||||
image: ${IMAGE_PREFIX}/safeline-luigi${REGION}${ARCH_SUFFIX}${RELEASE}:${IMAGE_TAG}
|
||||
environment:
|
||||
- MGT_IP=${SUBNET_PREFIX}.4
|
||||
- LUIGI_PG=postgres://safeline-ce:${POSTGRES_PASSWORD}@safeline-pg/safeline-ce?sslmode=disable
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- ${SAFELINE_DIR}/resources/luigi:/app/data
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "100m"
|
||||
max-file: "5"
|
||||
depends_on:
|
||||
- detect
|
||||
- mgt
|
||||
networks:
|
||||
safeline-ce:
|
||||
ipv4_address: ${SUBNET_PREFIX}.7
|
||||
fvm:
|
||||
container_name: safeline-fvm
|
||||
restart: always
|
||||
image: ${IMAGE_PREFIX}/safeline-fvm${REGION}${ARCH_SUFFIX}${RELEASE}:${IMAGE_TAG}
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "100m"
|
||||
max-file: "5"
|
||||
networks:
|
||||
safeline-ce:
|
||||
ipv4_address: ${SUBNET_PREFIX}.8
|
||||
chaos:
|
||||
container_name: safeline-chaos
|
||||
restart: always
|
||||
image: ${IMAGE_PREFIX}/safeline-chaos${REGION}${ARCH_SUFFIX}${RELEASE}:${IMAGE_TAG}
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "100m"
|
||||
max-file: "10"
|
||||
environment:
|
||||
- DB_ADDR=postgres://safeline-ce:${POSTGRES_PASSWORD}@safeline-pg/safeline-ce?sslmode=disable
|
||||
volumes:
|
||||
- ${SAFELINE_DIR}/resources/sock:/app/sock
|
||||
- ${SAFELINE_DIR}/resources/chaos:/app/chaos
|
||||
networks:
|
||||
safeline-ce:
|
||||
ipv4_address: ${SUBNET_PREFIX}.10
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"extends": "next/core-web-vitals"
|
||||
}
|
||||
35
homepage/.gitignore
vendored
@@ -1,35 +0,0 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# next.js
|
||||
/.next/
|
||||
/out/
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
|
||||
# debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# local env files
|
||||
.env*.local
|
||||
|
||||
# vercel
|
||||
.vercel
|
||||
|
||||
# typescript
|
||||
*.tsbuildinfo
|
||||
next-env.d.ts
|
||||
@@ -1,3 +0,0 @@
|
||||
save-prefix=""
|
||||
engine-strict=true
|
||||
registry="https://registry.npmmirror.com"
|
||||
@@ -1,2 +0,0 @@
|
||||
build:
|
||||
npm i && npm run build
|
||||
@@ -1,35 +0,0 @@
|
||||
const isProduction = process.env.NODE_ENV == "production";
|
||||
const isDevelopment = process.env.NODE_ENV == "development";
|
||||
|
||||
const prodConfig = {
|
||||
output: "export",
|
||||
};
|
||||
|
||||
const devConfig = {
|
||||
async rewrites() {
|
||||
return [
|
||||
{
|
||||
source: "/api/poc/:path*",
|
||||
destination: "https://waf-ce.chaitin.cn/api/poc/:path*",
|
||||
},
|
||||
{
|
||||
source: "/api/count",
|
||||
destination: "https://waf-ce.chaitin.cn/api/count",
|
||||
},
|
||||
];
|
||||
},
|
||||
};
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
reactStrictMode: false,
|
||||
images: { unoptimized: true },
|
||||
};
|
||||
|
||||
Object.assign(
|
||||
nextConfig,
|
||||
isProduction && prodConfig,
|
||||
isDevelopment && devConfig
|
||||
);
|
||||
|
||||
module.exports = nextConfig;
|
||||
5575
homepage/package-lock.json
generated
@@ -1,42 +0,0 @@
|
||||
{
|
||||
"name": "blog",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint",
|
||||
"icon": "node ./script/downLoadIcon.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.10.6",
|
||||
"@emotion/styled": "^11.10.6",
|
||||
"@jsdevtools/rehype-toc": "^3.0.2",
|
||||
"@mui/icons-material": "^5.11.16",
|
||||
"@mui/lab": "5.0.0-alpha.128",
|
||||
"@mui/material": "^5.12.0",
|
||||
"@types/node": "18.15.11",
|
||||
"@types/react": "18.0.35",
|
||||
"@types/react-dom": "18.0.11",
|
||||
"ahooks": "^3.7.6",
|
||||
"axios": "^1.3.6",
|
||||
"countup.js": "2.6.2",
|
||||
"eslint": "8.38.0",
|
||||
"github-slugger": "^2.0.0",
|
||||
"gray-matter": "^4.0.3",
|
||||
"highlight.js": "11.8.0",
|
||||
"next": "13.3.0",
|
||||
"next-mdx-remote": "^4.4.1",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"react-responsive-carousel": "^3.2.23",
|
||||
"remark-external-links": "^9.0.1",
|
||||
"remark-gfm": "^3.0.1",
|
||||
"remark-slug": "^7.0.1",
|
||||
"typescript": "5.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint-config-next": "13.4.9"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 464 KiB |
|
Before Width: | Height: | Size: 499 KiB |
|
Before Width: | Height: | Size: 499 KiB |
|
Before Width: | Height: | Size: 245 KiB |
|
Before Width: | Height: | Size: 363 KiB |
|
Before Width: | Height: | Size: 127 KiB |
|
Before Width: | Height: | Size: 432 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 486 KiB |
|
Before Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 535 KiB |
|
Before Width: | Height: | Size: 522 KiB |
|
Before Width: | Height: | Size: 544 KiB |
|
Before Width: | Height: | Size: 270 KiB |
|
Before Width: | Height: | Size: 86 KiB |
|
Before Width: | Height: | Size: 303 KiB |
|
Before Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 112 KiB |
|
Before Width: | Height: | Size: 527 KiB |
|
Before Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 5.0 MiB |
|
Before Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 22 KiB |
@@ -1,40 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="61px" height="68px" viewBox="0 0 61 68" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>编组 4备份 4</title>
|
||||
<defs>
|
||||
<linearGradient x1="29.4327608%" y1="3.52079477e-12%" x2="77.5590451%" y2="100%" id="linearGradient-1">
|
||||
<stop stop-color="#6FFECC" offset="0%"></stop>
|
||||
<stop stop-color="#0FC6C2" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
<linearGradient x1="9.5%" y1="7.78543896e-13%" x2="90.5%" y2="100%" id="linearGradient-2">
|
||||
<stop stop-color="#FFFFFF" offset="0%"></stop>
|
||||
<stop stop-color="#0FC6C2" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
<path d="M25.4341763,6.37416481 L15.0880707,0.440979948 C14.1181233,-0.146993316 12.8787461,-0.146993316 11.8549127,0.440979948 L1.61657901,6.37416481 C0.646631602,6.96213807 0,7.97772828 0,9.15367481 L0,20.9131403 C0,22.0356347 0.592745625,23.1046771 1.61657901,23.6926503 L11.8549127,29.5723831 C12.3398864,29.8396437 12.932632,30 13.4714917,30 C14.0103514,30 14.603097,29.8396437 15.0880707,29.5723831 L25.3264044,23.6391982 C26.2963518,23.051225 26.9429834,22.0356347 26.9429834,20.9131403 L26.9968694,9.15367481 C27.0507554,7.97772825 26.4041238,6.90868595 25.4341763,6.37416481 Z" id="path-3"></path>
|
||||
<filter x="-103.7%" y="-60.0%" width="307.4%" height="286.7%" filterUnits="objectBoundingBox" id="filter-4">
|
||||
<feMorphology radius="0.5" operator="dilate" in="SourceAlpha" result="shadowSpreadOuter1"></feMorphology>
|
||||
<feOffset dx="0" dy="10" in="shadowSpreadOuter1" result="shadowOffsetOuter1"></feOffset>
|
||||
<feGaussianBlur stdDeviation="7.5" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
|
||||
<feComposite in="shadowBlurOuter1" in2="SourceAlpha" operator="out" result="shadowBlurOuter1"></feComposite>
|
||||
<feColorMatrix values="0 0 0 0 0.0588235294 0 0 0 0 0.776470588 0 0 0 0 0.760784314 0 0 0 0.24 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
|
||||
</filter>
|
||||
</defs>
|
||||
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="画板" transform="translate(-366.000000, -633.000000)">
|
||||
<g id="编组-4备份-4" transform="translate(367.000000, 633.000000)">
|
||||
<g id="编组-3备份" fill="#D8D8D8" fill-opacity="0">
|
||||
<rect id="矩形" x="0" y="0" width="60" height="60"></rect>
|
||||
</g>
|
||||
<rect id="矩形" fill-opacity="0" fill="#D8D8D8" x="0" y="0" width="60" height="60"></rect>
|
||||
<path d="M24.4561176,11.7839344 L17.5587138,7.79637281 C16.9120822,7.40120906 16.0858307,7.40120906 15.4032751,7.79637281 L8.57771934,11.7839344 C7.93108773,12.1790981 7.5,12.8616537 7.5,13.6519812 L7.5,21.5552563 C7.5,22.3096599 7.89516375,23.0281394 8.57771934,23.4233032 L15.4032751,27.3749408 C15.7265909,27.5545606 16.1217547,27.6623326 16.4809945,27.6623326 C16.8402342,27.6623326 17.235398,27.5545606 17.5587138,27.3749408 L24.3842696,23.3873792 C25.0309012,22.9922155 25.4619889,22.3096599 25.4619889,21.5552563 L25.4979129,13.6519812 C25.5338369,12.8616537 25.1027492,12.1431741 24.4561176,11.7839344 Z" id="路径" fill="url(#linearGradient-1)" fill-rule="nonzero"></path>
|
||||
<g id="编组-13备份-4" transform="translate(15.000000, 12.000000)" fill-rule="nonzero">
|
||||
<g id="路径">
|
||||
<use fill="black" fill-opacity="1" filter="url(#filter-4)" xlink:href="#path-3"></use>
|
||||
<use stroke="url(#linearGradient-2)" stroke-width="1" fill-opacity="0.3" fill="#0FC6C2" xlink:href="#path-3"></use>
|
||||
</g>
|
||||
</g>
|
||||
<path d="M34.3321474,21.1810911 C34.9778424,20.8082989 35.8034894,21.0295304 36.1762816,21.6752254 C36.5490739,22.3209205 36.3278424,23.1465675 35.6821474,23.5193597 L35.6821474,23.5193597 L29.778,26.928 L29.7786864,33.4502254 C29.7786864,34.1958098 29.1742708,34.8002254 28.4286864,34.8002254 C27.683102,34.8002254 27.0786864,34.1958098 27.0786864,33.4502254 L27.078,26.927 L21.1752254,23.5193597 C20.5295304,23.1465675 20.3082989,22.3209205 20.6810911,21.6752254 C21.0538833,21.0295304 21.8795304,20.8082989 22.5252254,21.1810911 L28.429,24.589 Z" id="形状结合" fill="#FFFFFF"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 477 KiB |
|
Before Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 269 KiB |
|
Before Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
@@ -1,74 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="150px" height="42px" viewBox="0 0 150 42" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>编组 5</title>
|
||||
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="编组-5" transform="translate(0.000000, -0.000000)" fill="#27B876" fill-rule="nonzero">
|
||||
<path d="M145.703571,18.1714286 C145.703571,18.1714286 147.739286,20.0464286 149.303571,20.9571429 L150,19.9607143 C150,19.9607143 145.403571,17.025 145.703571,16.35 L145.703571,18.1607143 L145.703571,18.1714286 Z" id="路径"></path>
|
||||
<rect id="矩形" x="80.6035714" y="26.2392857" width="8.43214286" height="1.38214286"></rect>
|
||||
<rect id="矩形" x="122.432143" y="26.2071429" width="10.2214286" height="1.38214286"></rect>
|
||||
<rect id="矩形" x="139.767857" y="26.2071429" width="1.38214286" height="8.325"></rect>
|
||||
<rect id="矩形" x="100.821429" y="26.2071429" width="1.38214286" height="15.7821429"></rect>
|
||||
<rect id="矩形" x="91.9821429" y="26.2071429" width="1.38214286" height="8.25"></rect>
|
||||
<rect id="矩形" x="78.8035714" y="28.275" width="1.38214286" height="6.15"></rect>
|
||||
<polygon id="路径" points="106.5 41.9892857 105.075 41.9892857 109.242857 26.2071429 110.667857 26.2071429"></polygon>
|
||||
<g id="编组">
|
||||
<path d="M45.975,10.0392857 C45.975,10.0392857 35.8607143,8.52857143 34.35,0 C32.8392857,8.52857143 22.725,10.0392857 22.725,10.0392857 C12.4607143,11.6357143 7.48928571,4.24285714 7.48928571,4.24285714 C12.375,17.1107143 20.925,16.65 20.925,16.65 L47.7857143,16.65 C47.7857143,16.65 56.3357143,17.1 61.2214286,4.24285714 C61.2214286,4.24285714 56.25,11.6357143 45.9857143,10.0392857 L45.975,10.0392857 Z" id="路径"></path>
|
||||
<path d="M49.2214286,33.4607143 C49.2214286,33.4607143 36.2892857,31.5321429 34.35,20.625 C32.4214286,31.5321429 19.4785714,33.4607143 19.4785714,33.4607143 C6.35357143,35.4964286 0,26.0571429 0,26.0571429 C6.23571429,42.5035714 17.175,41.925 17.175,41.925 L51.525,41.925 C51.525,41.925 62.4535714,42.5035714 68.7,26.0571429 C68.7,26.0571429 62.3464286,35.5071429 49.2214286,33.4607143 Z" id="路径"></path>
|
||||
</g>
|
||||
<g id="编组" transform="translate(78.782143, 4.135714)">
|
||||
<rect id="矩形" x="0" y="6.65357143" width="5.25" height="1.38214286"></rect>
|
||||
<rect id="矩形" x="6.62142857" y="6.65357143" width="9.675" height="1.38214286"></rect>
|
||||
<rect id="矩形" x="18.0857143" y="1.38214286" width="16.5428571" height="1.38214286"></rect>
|
||||
<rect id="矩形" x="20.0892857" y="9.39642857" width="12.7928571" height="1.38214286"></rect>
|
||||
<rect id="矩形" x="21.3214286" y="12.1607143" width="10.3392857" height="1.38214286"></rect>
|
||||
<rect id="矩形" x="21.6214286" y="4.13571429" width="9.73928571" height="1.38214286"></rect>
|
||||
<rect id="矩形" x="21.6214286" y="6.64285714" width="9.73928571" height="1.38214286"></rect>
|
||||
<rect id="矩形" x="36.7607143" y="4.75809868e-16" width="6.87857143" height="1.38214286"></rect>
|
||||
<rect id="矩形" x="36.7607143" y="2.76428571" width="6.87857143" height="1.38214286"></rect>
|
||||
<rect id="矩形" x="54.8571429" y="1.38214286" width="5.85" height="1.38214286"></rect>
|
||||
<rect id="矩形" x="62.625" y="1.38214286" width="8.58214286" height="1.38214286"></rect>
|
||||
<rect id="矩形" x="3.86785714" y="0.0107142857" width="1.38214286" height="14.6785714"></rect>
|
||||
<rect id="矩形" x="39.5035714" y="1.38214286" width="1.38214286" height="15.1821429"></rect>
|
||||
<rect id="矩形" x="50.2821429" y="4.75809868e-16" width="1.38214286" height="16.8"></rect>
|
||||
<rect id="矩形" x="57.0964286" y="4.75809868e-16" width="1.38214286" height="15.2571429"></rect>
|
||||
<rect id="矩形" x="66.225" y="4.75809868e-16" width="1.38214286" height="7.2"></rect>
|
||||
<rect id="矩形" x="62.7857143" y="5.81785714" width="8.25" height="1.38214286"></rect>
|
||||
<rect id="矩形" x="25.6714286" y="4.75809868e-16" width="1.38214286" height="2.76428571"></rect>
|
||||
<rect id="矩形" x="25.6714286" y="13.3821429" width="1.38214286" height="2.11071429"></rect>
|
||||
<rect id="矩形" x="36.7607143" y="5.53928571" width="1.38214286" height="7.65"></rect>
|
||||
<rect id="矩形" x="42.2464286" y="5.53928571" width="1.38214286" height="7.84285714"></rect>
|
||||
<rect id="矩形" x="19.9285714" y="5.46428571" width="1.38214286" height="1.17857143"></rect>
|
||||
<path d="M3.86785714,14.7 C3.86785714,14.7 3.66428571,16.8642857 6.61071429,16.8642857 L6.61071429,15.4928571 C6.61071429,15.4928571 5.25,15.5142857 5.25,14.7 L4.55357143,14.1321429 L3.86785714,14.7 Z" id="路径"></path>
|
||||
<path d="M6.62142857,3.93214286 C6.62142857,3.93214286 13.1142857,2.775 16.2964286,0.0107142857 L16.2964286,1.55357143 C16.2964286,1.55357143 14.1428571,3.41785714 6.62142857,5.28214286 L6.62142857,3.92142857 L6.62142857,3.93214286 Z" id="路径"></path>
|
||||
<path d="M16.2964286,13.2 C16.2964286,13.2 9.80357143,12.0428571 6.62142857,9.27857143 L6.62142857,10.8214286 C6.62142857,10.8214286 8.775,12.6857143 16.2964286,14.55 L16.2964286,13.1892857 L16.2964286,13.2 Z" id="路径"></path>
|
||||
<path d="M21.6428571,4.13571429 C21.6428571,4.13571429 19.9285714,4.17857143 19.9285714,5.51785714 L21.6428571,5.51785714 L21.6428571,4.13571429 Z" id="路径"></path>
|
||||
<path d="M21.6428571,8.025 C21.6428571,8.025 19.9285714,7.98214286 19.9285714,6.64285714 L21.6428571,6.64285714 L21.6428571,8.025 L21.6428571,8.025 Z" id="路径"></path>
|
||||
<rect id="矩形" x="31.6607143" y="5.46428571" width="1.38214286" height="1.17857143"></rect>
|
||||
<path d="M31.3392857,4.13571429 C31.3392857,4.13571429 33.0535714,4.17857143 33.0535714,5.51785714 L31.3392857,5.51785714 L31.3392857,4.13571429 Z" id="路径"></path>
|
||||
<path d="M31.3392857,8.025 C31.3392857,8.025 33.0535714,7.98214286 33.0535714,6.64285714 L31.3392857,6.64285714 L31.3392857,8.025 L31.3392857,8.025 Z" id="路径"></path>
|
||||
<path d="M20.0892857,9.39642857 C20.0892857,9.39642857 18.525,9.34285714 18.525,10.7785714 L18.525,12.1607143 L19.875,12.1607143 L19.875,11.0571429 C19.875,11.0571429 19.8642857,10.7785714 20.0892857,10.7785714 L20.5178571,9.99642857 L20.0892857,9.39642857 L20.0892857,9.39642857 Z" id="路径"></path>
|
||||
<path d="M32.7964286,9.39642857 C32.7964286,9.39642857 34.3607143,9.34285714 34.3607143,10.7785714 L34.3607143,12.1607143 L33.0107143,12.1607143 L33.0107143,11.0571429 C33.0107143,11.0571429 33.0214286,10.7785714 32.7964286,10.7785714 L32.3678571,9.99642857 L32.7964286,9.39642857 L32.7964286,9.39642857 Z" id="路径"></path>
|
||||
<path d="M27.0535714,15.4714286 C27.0535714,15.4714286 27.1071429,17.0357143 25.6714286,17.0357143 L24.2892857,17.0357143 L24.2892857,15.6857143 L25.3928571,15.6857143 C25.3928571,15.6857143 25.6714286,15.6964286 25.6714286,15.4714286 L26.4535714,15.0428571 L27.0535714,15.4714286 Z" id="路径"></path>
|
||||
<path d="M58.4785714,15.2357143 C58.4785714,15.2357143 58.5321429,16.8 57.0964286,16.8 L55.7142857,16.8 L55.7142857,15.45 L56.8178571,15.45 C56.8178571,15.45 57.0964286,15.4607143 57.0964286,15.2357143 L57.8785714,14.8071429 L58.4785714,15.2357143 Z" id="路径"></path>
|
||||
<polygon id="路径" points="45.3428571 4.75809868e-16 45.3428571 1.38214286 48.9 3.05357143 48.9 1.71428571"></polygon>
|
||||
<polygon id="路径" points="45.2785714 5.52857143 45.2785714 6.91071429 48.8464286 8.58214286 48.8464286 7.23214286"></polygon>
|
||||
<path d="M71.0357143,5.81785714 L71.2071429,5.81785714 C71.2071429,5.81785714 71.4535714,11.625 63.3214286,16.8 L62.625,15.8035714 C62.625,15.8035714 68.5071429,12.3321429 69.6964286,7.2 L71.0357143,5.81785714 L71.0357143,5.81785714 Z" id="路径"></path>
|
||||
<path d="M62.7857143,5.81785714 L62.6357143,5.81785714 C62.6357143,5.81785714 62.4857143,8.58214286 65.1321429,12.0107143 C65.1321429,12.0107143 65.8178571,11.5928571 66.0428571,11.1107143 C66.0428571,11.1107143 64.7035714,9.53571429 64.1464286,7.2 L62.7964286,5.81785714 L62.7857143,5.81785714 Z" id="路径"></path>
|
||||
<path d="M67.7892857,13.1142857 C67.7892857,13.1142857 69.975,15.1928571 71.2071429,15.8035714 L69.3,15.6428571 L67.5428571,13.5964286 L67.3928571,13.1785714 L67.7785714,13.1142857 L67.7892857,13.1142857 Z" id="路径"></path>
|
||||
<path d="M60.7071429,5.81785714 L60.7071429,7.35 C60.7071429,7.35 56.5392857,9.36428571 54.8571429,10.0178571 L54.8571429,8.63571429 C54.8571429,8.63571429 58.425,7.125 60.7071429,5.80714286 L60.7071429,5.81785714 Z" id="路径"></path>
|
||||
<path d="M52.8964286,9.53571429 L52.8964286,10.9071429 C52.8964286,10.9071429 50.1321429,11.9892857 45.3428571,13.1785714 L45.3428571,11.775 C45.3428571,11.775 47.4642857,11.4107143 52.8964286,9.53571429 Z" id="路径"></path>
|
||||
<path d="M36.7607143,13.1142857 L36.7607143,14.5607143 C36.7607143,14.5607143 37.8535714,14.475 38.1428571,14.4428571 L38.1428571,13.1142857 L36.7607143,13.1142857 L36.7607143,13.1142857 Z" id="路径"></path>
|
||||
<path d="M42.2464286,12.4071429 L42.2464286,13.8321429 C42.2464286,13.8321429 43.2642857,13.6392857 43.6285714,13.5535714 L43.6285714,12.15 L42.2464286,12.3964286 L42.2464286,12.4071429 Z" id="路径"></path>
|
||||
</g>
|
||||
<rect id="矩形" x="93.2892857" y="33.0857143" width="7.78928571" height="1.38214286"></rect>
|
||||
<rect id="矩形" x="148.607143" y="26.2071429" width="1.38214286" height="15.7821429"></rect>
|
||||
<rect id="矩形" x="135.525" y="26.2071429" width="1.38214286" height="15.7821429"></rect>
|
||||
<rect id="矩形" x="127.017857" y="26.2071429" width="1.38214286" height="15.7821429"></rect>
|
||||
<rect id="矩形" x="118.178571" y="26.2071429" width="1.38214286" height="15.7821429"></rect>
|
||||
<rect id="矩形" x="80.2285714" y="40.6071429" width="8.80714286" height="1.38214286"></rect>
|
||||
<polygon id="矩形" transform="translate(144.843906, 34.105836) rotate(-29.680000) translate(-144.843906, -34.105836) " points="144.152835 25.4111933 145.534977 25.4111933 145.534977 42.800479 144.152835 42.800479"></polygon>
|
||||
<path d="M80.6035714,27.6214286 C80.6035714,27.6214286 80.1857143,27.7071429 80.1857143,28.275 L79.2642857,28.6928571 L78.8035714,28.275 C78.8035714,28.275 78.6,26.2392857 80.6035714,26.2392857" id="路径"></path>
|
||||
<polygon id="路径" points="113.882143 41.9892857 115.317857 41.9892857 111.15 26.2071429 109.714286 26.2071429"></polygon>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 69 KiB |
@@ -1 +0,0 @@
|
||||
../../../../compose.yaml
|
||||
@@ -1 +0,0 @@
|
||||
../../../../setup.sh
|
||||
@@ -1 +0,0 @@
|
||||
../../../../upgrade.sh
|
||||
@@ -1 +0,0 @@
|
||||
../../../../version.json
|
||||
@@ -1,19 +0,0 @@
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
|
||||
const Axios = require("axios");
|
||||
|
||||
async function downloadFile(url) {
|
||||
const iconPath = path.resolve(__dirname, "../src/static/fonts/iconfont.js");
|
||||
const writer = fs.createWriteStream(iconPath);
|
||||
const response = await Axios({
|
||||
url: "https:" + url,
|
||||
method: "GET",
|
||||
responseType: "stream",
|
||||
});
|
||||
response.data.pipe(writer);
|
||||
writer.on("finish", () => console.log("下载成功"));
|
||||
writer.on("error", (err) => console.log(err));
|
||||
}
|
||||
let argument = process.argv.splice(2);
|
||||
downloadFile(argument[0]);
|
||||
@@ -1,42 +0,0 @@
|
||||
export { submitSampleSet, getSampleSet, getSampleSetResult, getSampleDetail };
|
||||
|
||||
const BASE_API = "/api/poc/";
|
||||
|
||||
function submitSampleSet(data: {
|
||||
pocs: Array<{ content: string; tag: string }>;
|
||||
record_it: boolean;
|
||||
}) {
|
||||
return fetch(BASE_API + "list", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
mode: "cors",
|
||||
// credentials: "include",
|
||||
body: JSON.stringify(data),
|
||||
}).then((res) => res.json());
|
||||
}
|
||||
|
||||
function getSampleSet(id: string) {
|
||||
return fetch(BASE_API + "list?id=" + id).then((res) => res.json());
|
||||
}
|
||||
|
||||
function getSampleDetail(id: string) {
|
||||
return fetch(BASE_API + "detail?id=" + id).then((res) => res.json());
|
||||
}
|
||||
|
||||
async function getSampleSetResult(id: string, timeout: number = 60) {
|
||||
const startAt = new Date().getTime();
|
||||
const isTimeout = () => new Date().getTime() - startAt > timeout * 1000;
|
||||
const maxRetry = 20;
|
||||
|
||||
for (let i = 0; i < maxRetry; i++) {
|
||||
const res = await fetch(BASE_API + "results?id=" + id).then((res) =>
|
||||
res.json()
|
||||
);
|
||||
if (res.code == 0 && res.data.data) {
|
||||
return { data: res.data.data, timeout: false };
|
||||
}
|
||||
if (isTimeout()) break;
|
||||
await new Promise((r) => setTimeout(r, 2000));
|
||||
}
|
||||
return { data: [], timeout: true };
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
|
||||
import type { NextApiRequest, NextApiResponse } from 'next'
|
||||
|
||||
type Data = {
|
||||
name: string
|
||||
}
|
||||
|
||||
export default function handler(
|
||||
req: NextApiRequest,
|
||||
res: NextApiResponse<Data>
|
||||
) {
|
||||
res.status(200).json({ name: 'John Doe' })
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
export { getSetupCount };
|
||||
|
||||
function getSetupCount() {
|
||||
return fetch("/api/count").then((res) => res.json());
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
import React, { type FC, useEffect, useRef, useState } from "react";
|
||||
|
||||
import { Box, type SxProps, Tooltip } from "@mui/material";
|
||||
|
||||
interface EllipsisProps {
|
||||
children: React.ReactNode;
|
||||
sx?: SxProps;
|
||||
}
|
||||
|
||||
const Ellipsis: FC<EllipsisProps> = (props) => {
|
||||
const { children, sx } = props;
|
||||
const content = useRef<HTMLSpanElement>(null);
|
||||
const [ellipsis, setEllipsis] = useState<boolean>(false);
|
||||
|
||||
//判断文字内容是否超出div宽度
|
||||
const onResize = () => {
|
||||
if (content.current) {
|
||||
setEllipsis(
|
||||
(content.current.parentNode! as HTMLDivElement).offsetWidth <
|
||||
content.current.offsetWidth
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
onResize();
|
||||
}, [children]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Box
|
||||
sx={{
|
||||
width: "100%",
|
||||
overflow: "hidden",
|
||||
textOverflow: "ellipsis",
|
||||
whiteSpace: "nowrap",
|
||||
...sx,
|
||||
}}
|
||||
>
|
||||
<Tooltip
|
||||
title={ellipsis ? children : null}
|
||||
arrow
|
||||
followCursor
|
||||
componentsProps={{
|
||||
tooltip: {
|
||||
sx: {
|
||||
color: "text.primary",
|
||||
backgroundColor: "background.paper0",
|
||||
boxShadow: " 0px 0px 20px 0px rgba(0,0,0,0.1)",
|
||||
padding: "16px",
|
||||
lineHeight: "24px",
|
||||
maxWidth: "500px",
|
||||
fontSize: "14px",
|
||||
},
|
||||
},
|
||||
arrow: { sx: { color: "background.paper0" } },
|
||||
}}
|
||||
>
|
||||
<Box ref={content} component="span" sx={{ maxWidth: "100%" }}>
|
||||
{children as React.ReactElement}
|
||||
</Box>
|
||||
</Tooltip>
|
||||
</Box>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Ellipsis;
|
||||
@@ -1,102 +0,0 @@
|
||||
import { Grid, Box, Typography } from "@mui/material";
|
||||
import Image from "next/image";
|
||||
|
||||
const FEATURE_LIST = [
|
||||
{
|
||||
title: "便捷",
|
||||
content: (
|
||||
<>
|
||||
<Typography variant="body1" sx={{ mb: "10px" }}>
|
||||
采用容器化部署,一条命令即可完成安装,0 成本上手
|
||||
</Typography>
|
||||
<Typography variant="body1">
|
||||
安全配置开箱即用,无需人工维护,可实现安全躺平式管理
|
||||
</Typography>
|
||||
</>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: "安全",
|
||||
content: (
|
||||
<>
|
||||
<Typography variant="body1" sx={{ mb: "10px" }}>
|
||||
首创业内领先的智能语义分析算法,精准检测、低误报、难绕过
|
||||
</Typography>
|
||||
<Typography variant="body1">
|
||||
语义分析算法无规则,面对未知特征的 0day 攻击不再手足无措
|
||||
</Typography>
|
||||
</>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: "高性能",
|
||||
content: (
|
||||
<>
|
||||
<Typography variant="body1" sx={{ mb: "10px" }}>
|
||||
无规则引擎,线性安全检测算法,平均请求检测延迟在 1 毫秒级别
|
||||
</Typography>
|
||||
<Typography variant="body1">
|
||||
并发能力强,单核轻松检测 2000+
|
||||
TPS,只要硬件足够强,可支撑的流量规模无上限
|
||||
</Typography>
|
||||
</>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: "高可用",
|
||||
content: (
|
||||
<>
|
||||
<Typography variant="body1" sx={{ mb: "10px" }}>
|
||||
流量处理引擎基于 Nginx 开发,性能与稳定性均可得到保障
|
||||
</Typography>
|
||||
<Typography variant="body1">
|
||||
内置完善的健康检查机制,服务可用性高达 99.99%
|
||||
</Typography>
|
||||
</>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
const Features = () => {
|
||||
return (
|
||||
<Box
|
||||
sx={{
|
||||
borderRadius: "12px",
|
||||
backgroundColor: "#fff",
|
||||
color: "#000",
|
||||
boxShadow: "0 12px 25px -12px rgba(93,99,112, 0.2)",
|
||||
px: 5,
|
||||
pb: 5,
|
||||
}}
|
||||
>
|
||||
<Grid container spacing={5}>
|
||||
{FEATURE_LIST.map((feature) => (
|
||||
<Grid item xs={12} sm={6} key={feature.title}>
|
||||
<Typography
|
||||
variant="h5"
|
||||
sx={{ fontWeight: 500, fontSize: "18px", display: "flex" }}
|
||||
>
|
||||
<Image
|
||||
src="/images/feature.svg"
|
||||
alt="feature"
|
||||
width={40}
|
||||
height={40}
|
||||
priority
|
||||
/>
|
||||
<Box component="span" sx={{ mt: "5px" }}>
|
||||
{feature.title}
|
||||
</Box>
|
||||
</Typography>
|
||||
<Box
|
||||
sx={{ color: "rgba(0,0,0,.7)", whiteSpace: "pre-line", mt: 3 }}
|
||||
>
|
||||
{feature.content}
|
||||
</Box>
|
||||
</Grid>
|
||||
))}
|
||||
</Grid>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default Features;
|
||||
@@ -1,62 +0,0 @@
|
||||
import { Grid, Box } from "@mui/material";
|
||||
|
||||
import Link from "next/link";
|
||||
|
||||
const LINK_LIST = [
|
||||
{
|
||||
name: "北京长亭科技有限公司",
|
||||
url: "https://chaitin.cn/",
|
||||
},
|
||||
{
|
||||
name: "CT Stack 安全社区",
|
||||
url: "https://stack.chaitin.cn/",
|
||||
},
|
||||
{
|
||||
name: "长亭百川云平台",
|
||||
url: "https://rivers.chaitin.cn/",
|
||||
},
|
||||
{
|
||||
name: "长亭 GitHub 主页",
|
||||
url: "https://github.com/chaitin",
|
||||
},
|
||||
{
|
||||
name: "长亭 B 站主页",
|
||||
url: "https://space.bilibili.com/521870525",
|
||||
},
|
||||
{
|
||||
name: "长亭合作伙伴论坛",
|
||||
url: "https://bbs.chaitin.cn/",
|
||||
},
|
||||
{
|
||||
name: "关于我们",
|
||||
url: "https://waf-ce.chaitin.cn/posts/about_chaitin",
|
||||
},
|
||||
];
|
||||
|
||||
const FriendlyLinks = () => {
|
||||
return (
|
||||
<Grid container>
|
||||
{LINK_LIST.map((item) => (
|
||||
<Grid item xs={6} sm={4} md={3} key={item.name}>
|
||||
<Box
|
||||
component={Link}
|
||||
target="_blank"
|
||||
href={item.url}
|
||||
sx={{
|
||||
color: "rgba(0,0,0,0.7)",
|
||||
fontSize: "14px",
|
||||
lineHeight: "24px",
|
||||
"&:hover": {
|
||||
color: "primary.main",
|
||||
},
|
||||
}}
|
||||
>
|
||||
{item.name}
|
||||
</Box>
|
||||
</Grid>
|
||||
))}
|
||||
</Grid>
|
||||
);
|
||||
};
|
||||
|
||||
export default FriendlyLinks;
|
||||
@@ -1,29 +0,0 @@
|
||||
import React from "react";
|
||||
import { Typography, SxProps } from "@mui/material";
|
||||
import Image from "next/image";
|
||||
|
||||
interface TitleProps {
|
||||
title: string;
|
||||
sx?: SxProps;
|
||||
}
|
||||
|
||||
const Title: React.FC<TitleProps> = ({ title, sx }) => {
|
||||
return (
|
||||
<Typography
|
||||
variant="h4"
|
||||
sx={{ fontSize: "32px", fontWeight: 500, position: "relative", ...sx }}
|
||||
>
|
||||
<Image
|
||||
src="/images/class.png"
|
||||
alt="class"
|
||||
width={56}
|
||||
height={56}
|
||||
priority
|
||||
style={{ position: "absolute", top: -20, left: -24 }}
|
||||
/>
|
||||
{title}
|
||||
</Typography>
|
||||
);
|
||||
};
|
||||
|
||||
export default Title;
|
||||
@@ -1,99 +0,0 @@
|
||||
import { useState, useEffect } from "react";
|
||||
import { Message, Modal } from "@/components";
|
||||
import { Box, TextField, Typography, Button } from "@mui/material";
|
||||
|
||||
function Consultation() {
|
||||
const [text, setText] = useState("");
|
||||
const [wrongPhoneNumber, setWrongPhoneNumber] = useState(false);
|
||||
const [consultOpen, setConsultOpen] = useState(false);
|
||||
|
||||
const consultHandler = () => {
|
||||
const valid = /^1[3-9]\d{9}$/.test(text);
|
||||
setWrongPhoneNumber(!valid);
|
||||
if (!valid) {
|
||||
Message.error("手机号格式不正确");
|
||||
return;
|
||||
}
|
||||
fetch("https://leads.chaitin.net/api/trial", {
|
||||
// fetch('http://116.62.230.26:8999/api/trial', { // 测试用地址
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({
|
||||
phone: text,
|
||||
platform_source: "product-official-site",
|
||||
product_source: "safeline-ce",
|
||||
source_detail: "来自雷池社区版官网",
|
||||
}),
|
||||
})
|
||||
.then((d) => d.json())
|
||||
.then((d) => {
|
||||
if (d.code == 0) {
|
||||
Message.success("提交成功");
|
||||
} else {
|
||||
Message.error("提交失败");
|
||||
}
|
||||
setConsultOpen(false);
|
||||
});
|
||||
};
|
||||
|
||||
const textHandler = (v: string) => {
|
||||
setText(v);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (!consultOpen) {
|
||||
setText("");
|
||||
}
|
||||
}, [consultOpen]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Button
|
||||
variant="outlined"
|
||||
sx={{
|
||||
width: 200,
|
||||
my: 2,
|
||||
"&:hover": {
|
||||
borderColor: "primary.main",
|
||||
backgroundColor: "primary.main",
|
||||
color: "#fff",
|
||||
},
|
||||
}}
|
||||
onClick={() => setConsultOpen(true)}
|
||||
>
|
||||
立即咨询
|
||||
</Button>
|
||||
<Modal
|
||||
open={consultOpen}
|
||||
onCancel={() => setConsultOpen(false)}
|
||||
title="咨询企业版"
|
||||
okText="提交"
|
||||
onOk={consultHandler}
|
||||
sx={{ width: 600 }}
|
||||
>
|
||||
<Box sx={{}}>
|
||||
<div style={{ margin: "10px 0 15px" }}>
|
||||
<TextField
|
||||
error={wrongPhoneNumber}
|
||||
fullWidth
|
||||
size="small"
|
||||
label="手机号"
|
||||
helperText={
|
||||
wrongPhoneNumber ? "手机号格式不正确" : "请输入您的手机号"
|
||||
}
|
||||
variant="outlined"
|
||||
value={text}
|
||||
onChange={(e) => textHandler(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<Typography>
|
||||
我们将在工作时间 2 小时内联系您,您的手机号不会用于其他目的
|
||||
</Typography>
|
||||
</Box>
|
||||
</Modal>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default Consultation;
|
||||
@@ -1,284 +0,0 @@
|
||||
import {
|
||||
Table,
|
||||
TableBody,
|
||||
TableCell,
|
||||
TableContainer,
|
||||
TableHead,
|
||||
TableRow,
|
||||
Box,
|
||||
Collapse,
|
||||
ListItem,
|
||||
ListItemIcon,
|
||||
ListItemText,
|
||||
alpha,
|
||||
Tooltip,
|
||||
} from "@mui/material";
|
||||
import React, { useState } from "react";
|
||||
import ExpandLess from "@mui/icons-material/ExpandLess";
|
||||
import ExpandMore from "@mui/icons-material/ExpandMore";
|
||||
import { Icon } from "@/components";
|
||||
|
||||
const Support = () => {
|
||||
return (
|
||||
<Icon type="icon-duihao" color="success.main" sx={{ margin: "auto" }} />
|
||||
);
|
||||
};
|
||||
const NotSupport = () => {
|
||||
return <Icon type="icon-chahao" color="error.main" sx={{ margin: "auto" }} />;
|
||||
};
|
||||
|
||||
const Unlimited = () => {
|
||||
return <Box color="success.main">无限制</Box>;
|
||||
};
|
||||
|
||||
const FunctionTable = () => {
|
||||
const [open, setOpen] = useState<string[]>(["基本功能", "高级防护能力", "部署形态", "流量接入方式"]);
|
||||
|
||||
const cells = [
|
||||
{
|
||||
title: "基本功能",
|
||||
data: [
|
||||
{
|
||||
name: "可视化 DashBoard",
|
||||
experience: <Support />,
|
||||
basics: <Support />,
|
||||
}, {
|
||||
name: "自定义黑白名单",
|
||||
experience: <Support />,
|
||||
basics: <Support />,
|
||||
}, {
|
||||
name: "自定义防护策略",
|
||||
experience: <Support />,
|
||||
basics: <Support />,
|
||||
}, {
|
||||
name: "可防护站点数量",
|
||||
experience: <Unlimited />,
|
||||
basics: <Unlimited />,
|
||||
}, {
|
||||
name: "可支撑流量大小",
|
||||
experience: <Unlimited />,
|
||||
basics: <Unlimited />,
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "高级防护能力",
|
||||
data: [
|
||||
{
|
||||
name: "智能语义分析引擎",
|
||||
tip: "",
|
||||
experience: <Support />,
|
||||
basics: <Support />,
|
||||
}, {
|
||||
name: "智能业务建模",
|
||||
experience: <NotSupport />,
|
||||
basics: <Support />,
|
||||
}, {
|
||||
name: "动态防护",
|
||||
experience: <NotSupport />,
|
||||
basics: <Support />,
|
||||
}, {
|
||||
name: "API 防护",
|
||||
experience: <NotSupport />,
|
||||
basics: <Support />,
|
||||
}, {
|
||||
name: "Bot 管理",
|
||||
experience: <NotSupport />,
|
||||
basics: <Support />,
|
||||
}, {
|
||||
name: "拟态防护",
|
||||
experience: <NotSupport />,
|
||||
basics: <Support />,
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "部署形态",
|
||||
data: [
|
||||
{
|
||||
name: "软件形态",
|
||||
experience: <Support />,
|
||||
basics: <Support />,
|
||||
}, {
|
||||
name: "硬件形态",
|
||||
experience: <NotSupport />,
|
||||
basics: <Support />,
|
||||
}, {
|
||||
name: "分布式集群形态",
|
||||
experience: <NotSupport />,
|
||||
basics: <Support />,
|
||||
}, {
|
||||
name: "云原生 K8S 集群形态",
|
||||
experience: <NotSupport />,
|
||||
basics: <Support />,
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "流量接入方式",
|
||||
data: [
|
||||
{
|
||||
name: "反向代理接入",
|
||||
experience: <Support />,
|
||||
basics: <Support />,
|
||||
}, {
|
||||
name: "SDK 接入",
|
||||
experience: <NotSupport />,
|
||||
basics: <Support />,
|
||||
}, {
|
||||
name: "透明代理接入",
|
||||
experience: <NotSupport />,
|
||||
basics: <Support />,
|
||||
}, {
|
||||
name: "透明桥接接入",
|
||||
experience: <NotSupport />,
|
||||
basics: <Support />,
|
||||
}, {
|
||||
name: "旁路镜像接入",
|
||||
experience: <NotSupport />,
|
||||
basics: <Support />,
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
const handleClick = (id: string) => {
|
||||
if (open?.includes(id)) {
|
||||
const udpateOpen = [...open]
|
||||
udpateOpen.splice(open?.indexOf(id), 1)
|
||||
setOpen([...udpateOpen])
|
||||
} else {
|
||||
setOpen((open) => [...open, id])
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<TableContainer>
|
||||
<Table
|
||||
sx={{
|
||||
".MuiTableCell-root": {
|
||||
border: "none",
|
||||
backgroundColor: "transparent",
|
||||
px: "12px",
|
||||
},
|
||||
}}
|
||||
style={{marginTop: '48px'}}
|
||||
>
|
||||
<TableHead>
|
||||
<TableRow>
|
||||
<TableCell sx={{ width: "33%" }} />
|
||||
<TableCell align="center" sx={{ width: "33%", fontSize: "16px" }}>
|
||||
<Box
|
||||
sx={(theme) => ({
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
width: "100%",
|
||||
height: "40px",
|
||||
borderRadius: "4px",
|
||||
color: theme.palette.primary.main,
|
||||
backgroundColor: alpha(theme.palette.primary.main, 0.2),
|
||||
})}
|
||||
>
|
||||
社区版
|
||||
</Box>
|
||||
</TableCell>
|
||||
<TableCell align="left" sx={{ width: "33%", fontSize: "16px" }}>
|
||||
<Box
|
||||
sx={(theme) => ({
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
width: "100%",
|
||||
color: theme.palette.primary.main,
|
||||
backgroundColor: alpha(theme.palette.primary.main, 0.1),
|
||||
height: "40px",
|
||||
borderRadius: "4px",
|
||||
})}
|
||||
>
|
||||
企业版
|
||||
</Box>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
</TableHead>
|
||||
</Table>
|
||||
</TableContainer>
|
||||
{cells?.map(data =>
|
||||
<React.Fragment key={`sub-table-${data.title}`}>
|
||||
<ListItem
|
||||
onClick={() => handleClick(data?.title)}
|
||||
sx={{
|
||||
backgroundColor: "#EFF1F8",
|
||||
borderRadius: "4px",
|
||||
cursor: "pointer",
|
||||
pl: "20px",
|
||||
}}
|
||||
>
|
||||
<ListItemText
|
||||
primary={data.title}
|
||||
sx={{ ".MuiTypography-root": { fontSize: "16px" } }}
|
||||
/>
|
||||
<ListItemIcon sx={{ color: "#000" }}>
|
||||
{open?.includes(data?.title) ? <ExpandLess /> : <ExpandMore />}
|
||||
</ListItemIcon>
|
||||
</ListItem>
|
||||
<Collapse in={open?.includes(data?.title)} timeout="auto" unmountOnExit sx={{ width: "100%" }}>
|
||||
<TableContainer>
|
||||
<Table
|
||||
sx={{
|
||||
".MuiTableRow-root": {
|
||||
"&:last-of-type": {
|
||||
".MuiTableCell-root": {
|
||||
borderBottom: "none",
|
||||
},
|
||||
},
|
||||
},
|
||||
".MuiTableCell-root": {
|
||||
pl: "20px !important",
|
||||
pr: "8px !important",
|
||||
py: "12px !important",
|
||||
backgroundColor: "transparent !important",
|
||||
color: "#000",
|
||||
borderRight: "1px solid",
|
||||
borderColor: "rgba(0,0,0,.04)",
|
||||
"&:last-of-type": {
|
||||
borderRight: "none",
|
||||
},
|
||||
},
|
||||
}}
|
||||
>
|
||||
<TableBody
|
||||
sx={{
|
||||
backgroundColor: alpha("#EFF1F8", 0.6),
|
||||
}}
|
||||
>
|
||||
{data.data.map((item) => (
|
||||
<TableRow key={item.name}>
|
||||
<TableCell sx={{ width: "33%" }}>
|
||||
<Box sx={{ display: "flex", alignItems: "center" }}>
|
||||
{item.name}
|
||||
<Tooltip title={item.tip} arrow placement="right">
|
||||
<Box component="span" sx={{ ml: 1 }}>
|
||||
<Icon type="icon-bangzhu1" />
|
||||
</Box>
|
||||
</Tooltip>
|
||||
</Box>
|
||||
</TableCell>
|
||||
<TableCell sx={{ width: "33%" }} align="center">
|
||||
{item.experience}
|
||||
</TableCell>
|
||||
<TableCell sx={{ width: "33%" }} align="center">
|
||||
{item.basics}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
))}
|
||||
</TableBody>
|
||||
</Table>
|
||||
</TableContainer>
|
||||
</Collapse></React.Fragment>)}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default FunctionTable;
|
||||
@@ -1,155 +0,0 @@
|
||||
import { Typography, Box, Button, alpha } from "@mui/material";
|
||||
import Title from "@/components/Home/Title";
|
||||
import FunctionTable from "./FunctionTable";
|
||||
import Consultation from "./Consultation";
|
||||
import Link from "next/link";
|
||||
const FREE_FUNCTION = [
|
||||
"智能语义分析检测",
|
||||
"反向代理接入",
|
||||
"自定义黑白名单",
|
||||
"精细化引擎调节",
|
||||
"可视化安全分析",
|
||||
];
|
||||
const ENTERPRISE_FUNCTION = [
|
||||
"智能语义分析检测",
|
||||
"串行、旁路均可接入",
|
||||
"集群式可扩展部署",
|
||||
"CC 攻击防护",
|
||||
"业务 API 智能建模",
|
||||
"Bot 管理,恶意 Bot 防护",
|
||||
"专业技术支持服务",
|
||||
"漏洞应急服务",
|
||||
];
|
||||
|
||||
const Version = () => {
|
||||
return (
|
||||
<>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
width: "100%",
|
||||
flexWrap: "wrap",
|
||||
}}
|
||||
style={{marginTop: '48px'}}
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
width: { xs: "100%", sm: 306 },
|
||||
flexShrink: 0,
|
||||
height: { xs: "auto", sm: 440 },
|
||||
px: 3,
|
||||
py: 2,
|
||||
mb: { xs: 2, sm: 0 },
|
||||
mr: { xs: 0, sm: "20px" },
|
||||
border: "1px solid #eee",
|
||||
borderRadius: "12px",
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
alignItems: "center",
|
||||
backgroundImage: "linear-gradient(to top,#C3CFE2,#EFF1F8)",
|
||||
"&:hover": {
|
||||
boxShadow:
|
||||
"0 36px 70px -10px rgba(61,64,76,.15), 0 18px 20px -10px rgba(61,64,76,.05)",
|
||||
},
|
||||
// color: "#fff",
|
||||
}}
|
||||
>
|
||||
<Typography variant="h5" sx={{ fontWeight: 500, fontSize: "18px" }}>
|
||||
社区版
|
||||
</Typography>
|
||||
<Button
|
||||
variant="contained"
|
||||
component={Link}
|
||||
target="_blank"
|
||||
sx={{
|
||||
width: 200,
|
||||
my: 2,
|
||||
}}
|
||||
href="https://stack.chaitin.com/tool/detail?id=717"
|
||||
>
|
||||
免费使用
|
||||
</Button>
|
||||
<Box>
|
||||
{FREE_FUNCTION.map((f) => (
|
||||
<Box
|
||||
key={f}
|
||||
sx={{
|
||||
py: 1,
|
||||
position: "relative",
|
||||
pl: 2,
|
||||
"&:before": {
|
||||
content: "' '",
|
||||
position: "absolute",
|
||||
left: 0,
|
||||
top: "16px",
|
||||
width: 6,
|
||||
height: 6,
|
||||
borderRadius: "50%",
|
||||
backgroundColor: "success.main",
|
||||
},
|
||||
}}
|
||||
>
|
||||
{f}
|
||||
</Box>
|
||||
))}
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<Box
|
||||
sx={(theme) => ({
|
||||
width: { xs: "100%", sm: 306 },
|
||||
flexShrink: 0,
|
||||
height: { xs: "auto", sm: 440 },
|
||||
px: 3,
|
||||
py: 2,
|
||||
border: "1px solid",
|
||||
borderColor: alpha(theme.palette.primary.main, 0.5),
|
||||
borderRadius: "12px",
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
alignItems: "center",
|
||||
"&:hover": {
|
||||
boxShadow:
|
||||
"0 36px 70px -10px rgba(61,64,76,.15), 0 18px 20px -10px rgba(61,64,76,.05)",
|
||||
},
|
||||
})}
|
||||
>
|
||||
<Typography variant="h5" sx={{ fontWeight: 500, fontSize: "18px" }}>
|
||||
企业版
|
||||
</Typography>
|
||||
<Consultation />
|
||||
<Box>
|
||||
{ENTERPRISE_FUNCTION.map((f) => (
|
||||
<Box
|
||||
key={f}
|
||||
sx={{
|
||||
py: 1,
|
||||
position: "relative",
|
||||
pl: 2,
|
||||
"&:before": {
|
||||
content: "' '",
|
||||
position: "absolute",
|
||||
left: 0,
|
||||
top: "16px",
|
||||
width: 6,
|
||||
height: 6,
|
||||
borderRadius: "50%",
|
||||
backgroundColor: "success.main",
|
||||
},
|
||||
}}
|
||||
>
|
||||
{f}
|
||||
</Box>
|
||||
))}
|
||||
</Box>
|
||||
</Box>
|
||||
</Box>
|
||||
<Title title="详细参数" sx={{ mt: "120px !important" }} />
|
||||
|
||||
<FunctionTable />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Version;
|
||||
@@ -1,27 +0,0 @@
|
||||
import { type FC, useEffect } from "react";
|
||||
|
||||
import { Box, type SxProps } from "@mui/material";
|
||||
|
||||
interface IconProps {
|
||||
type: string;
|
||||
sx?: SxProps;
|
||||
[propName: string]: any;
|
||||
}
|
||||
|
||||
const Icon: FC<IconProps> = ({ type, sx, ...restProps }) => {
|
||||
useEffect(() => {
|
||||
require("../../static/fonts/iconfont");
|
||||
}, []);
|
||||
return (
|
||||
// @ts-ignore
|
||||
<Box
|
||||
component="svg"
|
||||
sx={{ width: "1em", height: "1em", fill: "currentColor", ...sx }}
|
||||
aria-hidden="true"
|
||||
{...restProps}
|
||||
>
|
||||
<use xlinkHref={`#${type}`} />
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
export default Icon;
|
||||
@@ -1,255 +0,0 @@
|
||||
import { type FC, useEffect, useRef, useState } from "react";
|
||||
import { Ellipsis } from "@/components";
|
||||
import { useRouter } from "next/router";
|
||||
import { Box } from "@mui/material";
|
||||
import Link from "next/link";
|
||||
import { useDebounceFn, useThrottleFn } from "ahooks";
|
||||
import { slug } from "github-slugger";
|
||||
|
||||
interface MarkdownNavbarProps {
|
||||
containerId?: string;
|
||||
source: string;
|
||||
}
|
||||
|
||||
interface Heading {
|
||||
dataId: string;
|
||||
listNo: string;
|
||||
offsetTop: number;
|
||||
}
|
||||
|
||||
interface Nav {
|
||||
index: number;
|
||||
level: number;
|
||||
text: string;
|
||||
listNo: string;
|
||||
}
|
||||
|
||||
const MarkdownNavbar: FC<MarkdownNavbarProps> = (props) => {
|
||||
const router = useRouter();
|
||||
let { containerId, source } = props;
|
||||
let container: HTMLElement;
|
||||
if (typeof window !== "undefined") {
|
||||
container =
|
||||
(containerId && document.getElementById(containerId)) || document.body;
|
||||
}
|
||||
|
||||
const [currentListNo, setCurrentListNo] = useState<string>("");
|
||||
const [navStructure, setNavStructure] = useState<Nav[]>([]);
|
||||
const scrollEventLock = useRef(false);
|
||||
const timer = useRef<any>();
|
||||
|
||||
const trimArrZero = (arr: number[]) => {
|
||||
let start, end;
|
||||
for (start = 0; start < arr.length; start++) {
|
||||
if (arr[start]) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (end = arr.length - 1; end >= 0; end--) {
|
||||
if (arr[end]) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return arr.slice(start, end + 1);
|
||||
};
|
||||
|
||||
const getHeadingList = (navStructure: Nav[]) => {
|
||||
const headingList: Heading[] = [];
|
||||
navStructure.forEach((t) => {
|
||||
const curHeading = document.getElementById(slug(t.text));
|
||||
if (curHeading) {
|
||||
headingList.push({
|
||||
dataId: `heading-${t.index}`,
|
||||
listNo: t.listNo,
|
||||
offsetTop: curHeading.offsetTop - 179,
|
||||
});
|
||||
}
|
||||
});
|
||||
return headingList;
|
||||
};
|
||||
const initHeadingsId = (navStructure: any[]) => {
|
||||
navStructure.forEach((t) => {
|
||||
const headings = document.querySelectorAll(`h${t.level}`);
|
||||
const curHeading = Array.prototype.slice
|
||||
.apply(headings)
|
||||
.find(
|
||||
(h) =>
|
||||
h.innerText.trim() === t.text.trim() &&
|
||||
(!h.dataset || !h.dataset.id)
|
||||
);
|
||||
|
||||
if (curHeading) {
|
||||
curHeading.dataset.id = `heading-${t.index}`;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const getNavStructure: (source: string) => Nav[] = (source) => {
|
||||
const contentWithoutCode = source
|
||||
.replace(/```[^`\n]*\n+[^```]+```\n+/g, "")
|
||||
.replace(/^[^#]+\n/g, "")
|
||||
.replace(/(?:[^\n#]+)#+\s([^#\n]+)\n*/g, "") // 匹配行内出现 # 号的情况
|
||||
.replace(/^#\s[^#\n]*\n+/, "")
|
||||
.replace(/`([^`\n]+)`/g, "$1")
|
||||
.replace(/\*\*?([^*\n]+)\*\*?/g, "$1")
|
||||
.replace(/__?([^_\n]+)__?/g, "$1")
|
||||
.trim();
|
||||
|
||||
const pattOfTitle = /#+\s([^#\n]+)\n*/g;
|
||||
const matchResult = contentWithoutCode.match(pattOfTitle);
|
||||
|
||||
if (!matchResult) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const navData = matchResult.map((r, i) => ({
|
||||
index: i,
|
||||
level: r.match(/^#+/g)![0].length,
|
||||
text: r.replace(pattOfTitle, "$1"),
|
||||
listNo: "",
|
||||
}));
|
||||
|
||||
let maxLevel = 0;
|
||||
navData.forEach((t) => {
|
||||
if (t.level > maxLevel) {
|
||||
maxLevel = t.level;
|
||||
}
|
||||
});
|
||||
let matchStack = [];
|
||||
|
||||
for (let i = 0; i < navData.length; i++) {
|
||||
const t = navData[i];
|
||||
const { level } = t;
|
||||
while (
|
||||
matchStack.length &&
|
||||
matchStack[matchStack.length - 1].level > level
|
||||
) {
|
||||
matchStack.pop();
|
||||
}
|
||||
if (matchStack.length === 0) {
|
||||
const arr = new Array(maxLevel).fill(0);
|
||||
arr[level - 1] += 1;
|
||||
matchStack.push({
|
||||
level,
|
||||
arr,
|
||||
});
|
||||
t.listNo = trimArrZero(arr).join(".");
|
||||
continue;
|
||||
}
|
||||
const arr: number[] = matchStack[matchStack.length - 1].arr;
|
||||
const newArr = arr.slice();
|
||||
newArr[level - 1] += 1;
|
||||
matchStack.push({
|
||||
level,
|
||||
arr: newArr,
|
||||
});
|
||||
t.listNo = trimArrZero(newArr).join(".");
|
||||
}
|
||||
return navData;
|
||||
};
|
||||
|
||||
const refreshNav = (source: string) => {
|
||||
// TODO: 只需要 2 3 级标题
|
||||
const navStructure = getNavStructure(source).filter((nav) =>
|
||||
[2, 3].includes(nav.level)
|
||||
);
|
||||
setNavStructure(navStructure);
|
||||
let hash = router.asPath.split("#")[1];
|
||||
let listNo = navStructure[0]?.listNo;
|
||||
if (hash) {
|
||||
const hashText = decodeURIComponent(hash);
|
||||
let findNav = navStructure.find((nav) => hashText === slug(nav.text));
|
||||
if (findNav) {
|
||||
listNo = findNav.listNo;
|
||||
const target = document.getElementById(hashText);
|
||||
if (target) {
|
||||
target.scrollIntoView({ behavior: "smooth" });
|
||||
scrollEventLock.current = true;
|
||||
setTimeout(() => {
|
||||
scrollEventLock.current = false;
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
setCurrentListNo(listNo);
|
||||
initHeadingsId(navStructure);
|
||||
|
||||
setTimeout(() => {
|
||||
container?.addEventListener(
|
||||
"scroll",
|
||||
() => winScroll(getHeadingList(navStructure)),
|
||||
false
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
const { run: winScroll } = useThrottleFn(
|
||||
(headingList: Heading[]) => {
|
||||
clearTimeout(timer.current);
|
||||
if (scrollEventLock.current) return;
|
||||
|
||||
var curHeading: Heading | null = null;
|
||||
headingList.forEach((h) => {
|
||||
if (h.offsetTop <= container.scrollTop) {
|
||||
curHeading = h;
|
||||
}
|
||||
});
|
||||
|
||||
if (curHeading) {
|
||||
timer.current = setTimeout(() => {
|
||||
setCurrentListNo(curHeading!.listNo);
|
||||
});
|
||||
}
|
||||
},
|
||||
{ wait: 300 }
|
||||
);
|
||||
|
||||
const { run: scrollToTarget } = useDebounceFn(
|
||||
(dataId: string) => {
|
||||
const target = document.querySelector(`[data-id="${dataId}"]`);
|
||||
if (target) {
|
||||
target.scrollIntoView({ behavior: "smooth" });
|
||||
scrollEventLock.current = true;
|
||||
setTimeout(() => {
|
||||
scrollEventLock.current = false;
|
||||
}, 500);
|
||||
}
|
||||
},
|
||||
{ wait: 0 }
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
refreshNav(source);
|
||||
return () => {
|
||||
container?.removeEventListener("scroll", winScroll, false);
|
||||
};
|
||||
}, [source]);
|
||||
|
||||
const tBlocks = navStructure.map((t, index) => {
|
||||
const cls = `title-anchor title-level${t.level}`;
|
||||
const anchor = slug(t.text);
|
||||
return (
|
||||
<Box
|
||||
className={cls}
|
||||
component={Link}
|
||||
href={`#${anchor}`}
|
||||
style={{ width: "100%" }}
|
||||
key={`title_anchor_${Math.random().toString(36).substring(2)}`}
|
||||
>
|
||||
<Ellipsis
|
||||
sx={{
|
||||
"&:hover": {
|
||||
color: "primary.main",
|
||||
},
|
||||
color: currentListNo === t.listNo ? "primary.main" : "inherit",
|
||||
}}
|
||||
>
|
||||
{t.text}
|
||||
</Ellipsis>
|
||||
</Box>
|
||||
);
|
||||
});
|
||||
return <div className={`markdown-navigation`}>{tBlocks}</div>;
|
||||
};
|
||||
|
||||
export default MarkdownNavbar;
|
||||
@@ -1,57 +0,0 @@
|
||||
import React, { type FC, useRef, useEffect } from 'react'
|
||||
|
||||
import { Alert as MAlert, type AlertColor } from '@mui/material'
|
||||
|
||||
interface AlertProps {
|
||||
duration?: number
|
||||
onClose?(key: React.Key): void
|
||||
noticeKey: React.Key
|
||||
content?: React.ReactNode
|
||||
severity: AlertColor
|
||||
}
|
||||
|
||||
const Alert: FC<AlertProps> = (props) => {
|
||||
const { duration, severity, content, noticeKey, onClose } = props
|
||||
const closeTimer = useRef<number | null>(null)
|
||||
|
||||
const startCloseTimer = () => {
|
||||
if (duration) {
|
||||
closeTimer.current = window.setTimeout(() => {
|
||||
close()
|
||||
}, duration * 1000)
|
||||
}
|
||||
}
|
||||
|
||||
const clearCloseTimer = () => {
|
||||
if (closeTimer.current) {
|
||||
clearTimeout(closeTimer.current)
|
||||
closeTimer.current = null
|
||||
}
|
||||
}
|
||||
|
||||
const close = (e?: React.MouseEvent<HTMLAnchorElement>) => {
|
||||
if (e) {
|
||||
e.stopPropagation()
|
||||
}
|
||||
clearCloseTimer()
|
||||
if (onClose) {
|
||||
onClose(noticeKey)
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
startCloseTimer()
|
||||
return () => {
|
||||
clearCloseTimer()
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<MAlert severity={severity} sx={{ mb: '10px' }}>
|
||||
{content}
|
||||
</MAlert>
|
||||
)
|
||||
}
|
||||
|
||||
export default Alert
|
||||
@@ -1,100 +0,0 @@
|
||||
import React, { useState, forwardRef, useImperativeHandle } from "react";
|
||||
|
||||
import { Snackbar, Box, type AlertColor } from "@mui/material";
|
||||
|
||||
import { ThemeProvider } from "@/components";
|
||||
import { render, unmount } from "@/utils";
|
||||
|
||||
import Alert from "./Alert";
|
||||
|
||||
export interface Notice {
|
||||
key?: React.Key;
|
||||
content?: React.ReactNode;
|
||||
severity: AlertColor;
|
||||
onClose?: () => void;
|
||||
}
|
||||
|
||||
interface MessageProps {}
|
||||
|
||||
let seed = 0;
|
||||
const now = Date.now();
|
||||
|
||||
function getUuid() {
|
||||
const id = seed;
|
||||
seed += 1;
|
||||
return `ctMessage_${now}_${id}`;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line react/display-name
|
||||
const Message = forwardRef<any, MessageProps>((props, ref) => {
|
||||
const [notices, setNotices] = useState<Notice[]>([]);
|
||||
const add = (notice: Notice) => {
|
||||
const key = notice.key ?? getUuid();
|
||||
setNotices((state) => {
|
||||
state.push({ ...notice, key });
|
||||
return [...state];
|
||||
});
|
||||
};
|
||||
|
||||
const remove = (key: React.Key) => {
|
||||
setNotices((state) => state.filter((s) => s.key !== key));
|
||||
};
|
||||
|
||||
useImperativeHandle(ref, () => ({
|
||||
add,
|
||||
remove,
|
||||
}));
|
||||
|
||||
return (
|
||||
<ThemeProvider>
|
||||
<Snackbar open anchorOrigin={{ vertical: "top", horizontal: "center" }}>
|
||||
<Box>
|
||||
{notices.map((item) => {
|
||||
const alertProps = {
|
||||
...item,
|
||||
noticeKey: item.key!,
|
||||
onClose: (noticeKey: React.Key) => {
|
||||
remove(noticeKey);
|
||||
},
|
||||
};
|
||||
return <Alert {...alertProps} key={item.key} />;
|
||||
})}
|
||||
</Box>
|
||||
</Snackbar>
|
||||
</ThemeProvider>
|
||||
);
|
||||
});
|
||||
|
||||
// @ts-ignore
|
||||
Message.newInstance = (properties: MessageProps, callback) => {
|
||||
const { ...props } = properties || {};
|
||||
const div = document?.createElement("div");
|
||||
document.body.appendChild(div);
|
||||
let called = false;
|
||||
function ref(notification: any) {
|
||||
if (called) {
|
||||
return;
|
||||
}
|
||||
called = true;
|
||||
callback({
|
||||
notice(noticeProps: MessageProps) {
|
||||
notification.add(noticeProps);
|
||||
},
|
||||
removeNotice(key: React.Key) {
|
||||
notification.remove(key);
|
||||
},
|
||||
component: notification,
|
||||
destroy() {
|
||||
unmount(div);
|
||||
if (div.parentNode) {
|
||||
div.parentNode.removeChild(div);
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
setTimeout(() => {
|
||||
render(<Message {...props} ref={ref} />, div);
|
||||
});
|
||||
};
|
||||
|
||||
export default Message;
|
||||
@@ -1,37 +0,0 @@
|
||||
import type React from "react";
|
||||
|
||||
import { type AlertColor } from "@mui/material";
|
||||
|
||||
import Notification from "./Message";
|
||||
|
||||
type MessageStaticFunctions = Record<
|
||||
AlertColor,
|
||||
(context: React.ReactNode, duration?: number) => void
|
||||
>;
|
||||
|
||||
const Message = {} as MessageStaticFunctions;
|
||||
|
||||
let notification: any = null;
|
||||
|
||||
if (typeof window !== "undefined") {
|
||||
// @ts-ignore
|
||||
Notification.newInstance({}, (n: any) => {
|
||||
notification = n;
|
||||
});
|
||||
|
||||
const commonOpen =
|
||||
(type: AlertColor) =>
|
||||
(content: React.ReactNode, duration: number = 3) => {
|
||||
notification.notice({
|
||||
duration,
|
||||
severity: type,
|
||||
content,
|
||||
});
|
||||
};
|
||||
|
||||
(["success", "warning", "info", "error"] as const).forEach((type) => {
|
||||
Message[type] = commonOpen(type);
|
||||
});
|
||||
}
|
||||
|
||||
export default Message;
|
||||
@@ -1,46 +0,0 @@
|
||||
import React, { type FC } from "react";
|
||||
|
||||
import ErrorIcon from "@mui/icons-material/Error";
|
||||
import { Box } from "@mui/material";
|
||||
|
||||
import { ThemeProvider } from "@/components";
|
||||
|
||||
import Modal, { type ModalProps } from "./Modal";
|
||||
|
||||
export interface ConfirmDialogProps extends ModalProps {
|
||||
content?: React.ReactNode;
|
||||
width?: string;
|
||||
}
|
||||
|
||||
const ConfirmDialog: FC<ConfirmDialogProps> = (props) => {
|
||||
const { title = "提示", content, width = "480px", ...rest } = props;
|
||||
return (
|
||||
<ThemeProvider>
|
||||
<Modal
|
||||
title={
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
lineHeight: "22px",
|
||||
color: "text.main",
|
||||
fontWeight: 500,
|
||||
}}
|
||||
>
|
||||
<ErrorIcon
|
||||
sx={{ color: "#FFBF00", mr: "16px", fontSize: "24px" }}
|
||||
/>
|
||||
{title}
|
||||
</Box>
|
||||
}
|
||||
closable={false}
|
||||
{...rest}
|
||||
sx={{ width }}
|
||||
>
|
||||
<Box sx={{ color: "text.main", pl: "40px" }}>{content}</Box>
|
||||
</Modal>
|
||||
</ThemeProvider>
|
||||
);
|
||||
};
|
||||
|
||||
export default ConfirmDialog;
|
||||
@@ -1,130 +0,0 @@
|
||||
import React, { type FC, useState } from 'react'
|
||||
|
||||
import CloseIcon from '@mui/icons-material/Close'
|
||||
import { LoadingButton } from '@mui/lab'
|
||||
import { Button, Dialog, DialogActions, DialogContent, DialogTitle, IconButton } from '@mui/material'
|
||||
|
||||
export interface ModalProps {
|
||||
open?: boolean
|
||||
title?: React.ReactNode
|
||||
children?: React.ReactNode
|
||||
footer?: false | React.ReactNode
|
||||
okText?: React.ReactNode
|
||||
cancelText?: React.ReactNode
|
||||
showCancel?: boolean
|
||||
okColor?: 'primary' | 'error'
|
||||
cancelColor?: 'primary' | 'error'
|
||||
closable?: boolean
|
||||
onOk?(): void
|
||||
onClose?(): void
|
||||
onCancel?(): void
|
||||
sx?: any
|
||||
}
|
||||
|
||||
const Modal: FC<ModalProps> = (props) => {
|
||||
const {
|
||||
open = false,
|
||||
title,
|
||||
children,
|
||||
footer,
|
||||
okText = '确认',
|
||||
okColor = 'primary',
|
||||
cancelColor = 'primary',
|
||||
showCancel = true,
|
||||
cancelText = '取消',
|
||||
onOk,
|
||||
onClose,
|
||||
onCancel,
|
||||
closable = true,
|
||||
sx = {},
|
||||
} = props
|
||||
const [loading, setLoading] = useState(false)
|
||||
|
||||
const onConfirm = async () => {
|
||||
setLoading(true)
|
||||
try {
|
||||
await onOk?.()
|
||||
} catch (error) {}
|
||||
|
||||
setLoading(false)
|
||||
}
|
||||
|
||||
return (
|
||||
<Dialog
|
||||
open={open}
|
||||
onClose={onClose || onCancel}
|
||||
PaperProps={{
|
||||
elevation: 0,
|
||||
}}
|
||||
sx={{
|
||||
'.MuiDialog-paper': {
|
||||
borderRadius: '12px',
|
||||
...sx,
|
||||
},
|
||||
}}
|
||||
>
|
||||
{(title || closable) && (
|
||||
<DialogTitle
|
||||
sx={{
|
||||
fontWeight: 600,
|
||||
fontSize: '16px',
|
||||
p: '32px',
|
||||
pb: '16px',
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
alignItems: 'center',
|
||||
}}
|
||||
>
|
||||
{title}
|
||||
{closable && (
|
||||
<IconButton
|
||||
sx={{
|
||||
color: 'text.auxiliary',
|
||||
}}
|
||||
onClick={onClose || onCancel}
|
||||
>
|
||||
<CloseIcon sx={{ fontSize: '20px' }} />
|
||||
</IconButton>
|
||||
)}
|
||||
</DialogTitle>
|
||||
)}
|
||||
|
||||
<DialogContent sx={{ px: '32px' }}>{children}</DialogContent>
|
||||
{footer === false && null}
|
||||
{footer === undefined && (
|
||||
<DialogActions
|
||||
sx={{
|
||||
p: '0 32px 32px',
|
||||
'.MuiButtonBase-root': {
|
||||
px: '30px',
|
||||
},
|
||||
}}
|
||||
>
|
||||
{showCancel && (
|
||||
<Button color={cancelColor} onClick={onCancel}>
|
||||
{cancelText}
|
||||
</Button>
|
||||
)}
|
||||
|
||||
<LoadingButton loading={loading} variant='contained' color={okColor} onClick={onConfirm}>
|
||||
{okText}
|
||||
</LoadingButton>
|
||||
</DialogActions>
|
||||
)}
|
||||
{footer && (
|
||||
<DialogActions
|
||||
sx={{
|
||||
p: '4px 24px 24px',
|
||||
'.MuiButtonBase-root': {
|
||||
p: '8px 30px',
|
||||
},
|
||||
}}
|
||||
>
|
||||
{footer}
|
||||
</DialogActions>
|
||||
)}
|
||||
</Dialog>
|
||||
)
|
||||
}
|
||||
|
||||
export default Modal
|
||||
@@ -1,32 +0,0 @@
|
||||
import { render as reactRender } from "@/utils";
|
||||
|
||||
import ConfirmDialog, { type ConfirmDialogProps } from "./ConfirmDialog";
|
||||
|
||||
export default function confirm(config: ConfirmDialogProps) {
|
||||
const container = document.createDocumentFragment();
|
||||
const { onCancel: propCancel, onOk: propOk } = config;
|
||||
const onCancel = async () => {
|
||||
await propCancel?.();
|
||||
close();
|
||||
};
|
||||
const onOk = async () => {
|
||||
await propOk?.();
|
||||
close();
|
||||
};
|
||||
let currentConfig = { ...config, open: true, onCancel, onOk } as any;
|
||||
function render(props: ConfirmDialogProps) {
|
||||
setTimeout(() => {
|
||||
reactRender(<ConfirmDialog {...props} />, container);
|
||||
});
|
||||
}
|
||||
|
||||
function close() {
|
||||
currentConfig = {
|
||||
...currentConfig,
|
||||
open: false,
|
||||
};
|
||||
render(currentConfig);
|
||||
}
|
||||
|
||||
render(currentConfig);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
import { type ConfirmDialogProps } from './ConfirmDialog'
|
||||
import OriginModal from './Modal'
|
||||
import confirm from './confrim'
|
||||
|
||||
type ModalStaticFunctions = Record<'confirm', (config: ConfirmDialogProps) => void>
|
||||
type ModalType = typeof OriginModal
|
||||
|
||||
const Modal = OriginModal as ModalType & ModalStaticFunctions
|
||||
|
||||
Modal.confirm = confirm
|
||||
|
||||
export default Modal
|
||||
@@ -1,61 +0,0 @@
|
||||
import { useMemo, useEffect, useState } from "react";
|
||||
|
||||
import {
|
||||
ThemeProvider as MUIThemeProvider,
|
||||
useMediaQuery,
|
||||
} from "@mui/material";
|
||||
import { useLocalStorageState } from "ahooks";
|
||||
|
||||
import themes from "../../themes";
|
||||
import ThemeContext, { type ThemeMode } from "../../themes/themeContext";
|
||||
|
||||
interface ThemeProviderProps {
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
|
||||
const ThemeProvider: React.FC<ThemeProviderProps> = ({ children }) => {
|
||||
// const [mode, setMode] = useLocalStorageState<ThemeMode>("themeMode", {
|
||||
// defaultValue: "system",
|
||||
// });
|
||||
const [mode, setMode] = useState<ThemeMode>("light");
|
||||
const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
|
||||
|
||||
const theme = useMemo(() => {
|
||||
let newMode = mode;
|
||||
if (mode === "system") {
|
||||
newMode = prefersDarkMode ? "dark" : "light";
|
||||
}
|
||||
return themes(newMode as "dark" | "light");
|
||||
}, [mode, prefersDarkMode]);
|
||||
|
||||
const themeMode = useMemo(() => {
|
||||
return {
|
||||
mode,
|
||||
setThemeMode: (mode: ThemeMode) => {
|
||||
setMode(mode);
|
||||
},
|
||||
};
|
||||
}, [mode]);
|
||||
|
||||
useEffect(() => {
|
||||
const bodyStyle = document.body.style;
|
||||
const body = document.body;
|
||||
let newMode = mode;
|
||||
if (mode === "system") {
|
||||
newMode = prefersDarkMode ? "dark" : "light";
|
||||
}
|
||||
body.className = newMode;
|
||||
// @ts-ignore
|
||||
bodyStyle.backgroundColor = theme.palette.background.paper0;
|
||||
bodyStyle.color = theme.palette.text.primary;
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [theme]);
|
||||
|
||||
return (
|
||||
<ThemeContext.Provider value={themeMode}>
|
||||
<MUIThemeProvider theme={theme}>{children}</MUIThemeProvider>
|
||||
</ThemeContext.Provider>
|
||||
);
|
||||
};
|
||||
|
||||
export default ThemeProvider;
|
||||
@@ -1,63 +0,0 @@
|
||||
import TableContainer from "@mui/material/TableContainer";
|
||||
import Box from "@mui/material/Box";
|
||||
import Table from "@mui/material/Table";
|
||||
import TableRow from "@mui/material/TableRow";
|
||||
import TableHead from "@mui/material/TableHead";
|
||||
import TableCell from "@mui/material/TableCell";
|
||||
import TableBody from "@mui/material/TableBody";
|
||||
import Paper from "@mui/material/Paper";
|
||||
import Title from "@/components/Home/Title";
|
||||
import type { ResultRowsType } from "./types";
|
||||
import { Typography } from "@mui/material";
|
||||
|
||||
export default Result;
|
||||
|
||||
function Result({ rows }: { rows: ResultRowsType }) {
|
||||
return (
|
||||
<Box sx={{ mt: 4 }}>
|
||||
<Title title="测试结果" sx={{ fontSize: "16px", marginBottom: "16px" }} />
|
||||
<TableContainer component={Paper}>
|
||||
<Table sx={{ minWidth: 650 }}>
|
||||
<TableHead>
|
||||
<TableRow>
|
||||
<TableCell>WAF 类别</TableCell>
|
||||
<TableCell>版本</TableCell>
|
||||
<TableCell>检出率</TableCell>
|
||||
<TableCell>误报率</TableCell>
|
||||
<TableCell>准确率</TableCell>
|
||||
<TableCell>平均检测耗时</TableCell>
|
||||
</TableRow>
|
||||
</TableHead>
|
||||
<TableBody>
|
||||
{rows.map((row, index) => (
|
||||
<TableRow key={index}>
|
||||
<TableCell>{appendLink(row.engine)}</TableCell>
|
||||
<TableCell>{row.version}</TableCell>
|
||||
<TableCell>{row.detectionRate}</TableCell>
|
||||
<TableCell>{row.failedRate}</TableCell>
|
||||
<TableCell>{row.accuracy}</TableCell>
|
||||
<TableCell>{row.cost}</TableCell>
|
||||
</TableRow>
|
||||
))}
|
||||
</TableBody>
|
||||
</Table>
|
||||
</TableContainer>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
function appendLink(engine: string) {
|
||||
if (engine == "ModSecurity")
|
||||
return (
|
||||
<a href="https://github.com/SpiderLabs/ModSecurity" target="_blank">
|
||||
<Typography sx={{ color: "primary.main" }}>{engine}</Typography>
|
||||
</a>
|
||||
);
|
||||
if (engine == "TADK")
|
||||
return (
|
||||
<a target="_blank" href="https://networkbuilders.intel.com/university/course/traffic-analytics-development-kit-tadk">
|
||||
<Typography sx={{ color: "primary.main" }}>{engine}</Typography>
|
||||
</a>
|
||||
);
|
||||
return engine;
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
import Typography from "@mui/material/Typography";
|
||||
|
||||
function SampleCount({
|
||||
total,
|
||||
normal,
|
||||
attack,
|
||||
}: {
|
||||
total: number;
|
||||
normal: number;
|
||||
attack: number;
|
||||
}) {
|
||||
return (
|
||||
<div style={{ display: "flex" }}>
|
||||
<Typography>共计 {total} 个 HTTP 请求样本,其中 </Typography>
|
||||
<Typography sx={{ color: "success.main" }}>
|
||||
普通样本 {normal} 个
|
||||
</Typography>
|
||||
、
|
||||
<Typography sx={{ color: "error.main" }}>攻击样本 {attack} 个</Typography>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default SampleCount;
|
||||
@@ -1,155 +0,0 @@
|
||||
import { useState } from "react";
|
||||
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
Table,
|
||||
TableHead,
|
||||
TableRow,
|
||||
TableBody,
|
||||
Typography,
|
||||
Dialog,
|
||||
DialogActions,
|
||||
DialogContent,
|
||||
} from "@mui/material";
|
||||
import Accordion from "@mui/material/Accordion";
|
||||
import AccordionSummary from "@mui/material/AccordionSummary";
|
||||
import AccordionDetails from "@mui/material/AccordionDetails";
|
||||
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
||||
import TableCell from "@mui/material/TableCell";
|
||||
import Title from "@/components/Home/Title";
|
||||
import SampleCount from "@/components/detection/SampleCount";
|
||||
import SamplesForm from "@/components/detection/SamplesForm";
|
||||
import hljs from "highlight.js";
|
||||
import { Message } from "@/components";
|
||||
import { getSampleDetail } from "@/api/detection";
|
||||
import { sizeLength } from "@/utils";
|
||||
|
||||
import type { RecordSamplesType } from "./types";
|
||||
|
||||
export default SampleList;
|
||||
|
||||
interface SampleListProps {
|
||||
value: RecordSamplesType;
|
||||
onSetIdChange: (id: string) => void;
|
||||
}
|
||||
|
||||
function SampleList({ value, onSetIdChange }: SampleListProps) {
|
||||
const [open, setOpen] = useState(false);
|
||||
const [detail, setDetail] = useState("");
|
||||
|
||||
const handleDetail = (id: string) => async () => {
|
||||
const res = await getSampleDetail(id);
|
||||
if (res.code != 0) {
|
||||
Message.error(res.msg || "获取详情失败");
|
||||
return;
|
||||
}
|
||||
const text = document.createElement("textarea");
|
||||
text.innerHTML = res.data.content;
|
||||
const highlighted = hljs.highlight(text.value, {
|
||||
language: "http",
|
||||
});
|
||||
setDetail(highlighted.value);
|
||||
setOpen(true);
|
||||
};
|
||||
|
||||
const handleClose = () => {
|
||||
setDetail("");
|
||||
setOpen(false);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
justifyContent: "space-between",
|
||||
marginBottom: "18px",
|
||||
alignItems: "center",
|
||||
}}
|
||||
>
|
||||
<Title title="测试样本" sx={{ fontSize: "16px" }} />
|
||||
<SamplesForm onSetIdChange={onSetIdChange} />
|
||||
</Box>
|
||||
|
||||
<Accordion
|
||||
sx={{ borderRadius: "4px" }}
|
||||
className="detection-samples-accordion"
|
||||
>
|
||||
<AccordionSummary expandIcon={<ExpandMoreIcon />}>
|
||||
<SampleCount
|
||||
total={value.length}
|
||||
normal={value.filter((i) => !i.isAttack).length}
|
||||
attack={value.filter((i) => i.isAttack).length}
|
||||
/>
|
||||
</AccordionSummary>
|
||||
<AccordionDetails>
|
||||
<Table>
|
||||
<TableHead>
|
||||
<TableRow>
|
||||
<TableCell width={150}>样本类型</TableCell>
|
||||
<TableCell width={150}>样本大小</TableCell>
|
||||
<TableCell>摘要</TableCell>
|
||||
<TableCell width={100}></TableCell>
|
||||
</TableRow>
|
||||
</TableHead>
|
||||
<TableBody>
|
||||
{value.map((row, index) => {
|
||||
const text = document.createElement("textarea");
|
||||
text.innerHTML = row.summary;
|
||||
|
||||
return (
|
||||
<TableRow
|
||||
key={index}
|
||||
sx={{ "&:last-child td, &:last-child th": { border: 0 } }}
|
||||
>
|
||||
<TableCell>
|
||||
{row.isAttack ? (
|
||||
<Typography sx={{ color: "error.main" }}>
|
||||
攻击样本
|
||||
</Typography>
|
||||
) : (
|
||||
<Typography sx={{ color: "success.main" }}>
|
||||
普通样本
|
||||
</Typography>
|
||||
)}
|
||||
</TableCell>
|
||||
<TableCell>{sizeLength(row.size)}</TableCell>
|
||||
<TableCell>
|
||||
<Typography
|
||||
noWrap
|
||||
sx={{
|
||||
width: "600px",
|
||||
fontFamily:
|
||||
"ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace",
|
||||
}}
|
||||
>
|
||||
{text.value}
|
||||
</Typography>
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
<Button onClick={handleDetail(row.id)}>详情</Button>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
);
|
||||
})}
|
||||
</TableBody>
|
||||
</Table>
|
||||
</AccordionDetails>
|
||||
</Accordion>
|
||||
|
||||
<Dialog open={open} onClose={handleClose}>
|
||||
<DialogContent sx={{ marginBottom: 0 }}>
|
||||
<Box
|
||||
component="code"
|
||||
style={{ whiteSpace: "pre-line", wordBreak: "break-all" }}
|
||||
dangerouslySetInnerHTML={{ __html: detail }}
|
||||
/>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
<Button onClick={handleClose}>关闭</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,282 +0,0 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
RadioGroup,
|
||||
StepLabel,
|
||||
TextField,
|
||||
FormControlLabel,
|
||||
Radio,
|
||||
Typography,
|
||||
} from "@mui/material";
|
||||
import {
|
||||
Dialog,
|
||||
DialogTitle,
|
||||
DialogContent,
|
||||
DialogContentText,
|
||||
DialogActions,
|
||||
} from "@mui/material";
|
||||
import Checkbox from "@mui/material/Checkbox";
|
||||
|
||||
import Stepper from "@mui/material/Stepper";
|
||||
import Step from "@mui/material/Step";
|
||||
import SampleCount from "@/components/detection/SampleCount";
|
||||
import hljs from "highlight.js";
|
||||
|
||||
import {
|
||||
Table,
|
||||
TableHead,
|
||||
TableRow,
|
||||
TableCell,
|
||||
TableBody,
|
||||
} from "@mui/material";
|
||||
import { sampleLength, sampleSummary } from "@/utils";
|
||||
|
||||
export default SampleSteps;
|
||||
|
||||
interface SampleStepsProps {
|
||||
onDetect: (value: {
|
||||
sample: string;
|
||||
publish: boolean;
|
||||
isAttack: boolean;
|
||||
}) => void;
|
||||
}
|
||||
|
||||
function SampleSteps({ onDetect }: SampleStepsProps) {
|
||||
const [activeStep, setActiveStep] = useState(0);
|
||||
const [completed, setCompleted] = useState([false, false, false]);
|
||||
const [sampleText, setSampleText] = useState("");
|
||||
const [sampleIsAttack, setSampleIsAttack] = useState(false);
|
||||
const [sampleTextError, setSampleTextError] = useState("");
|
||||
const [checked, setChecked] = useState(true);
|
||||
const [count, setCount] = useState({ total: 0, normal: 0, attack: 0 });
|
||||
|
||||
const nextStep = () => {
|
||||
setActiveStep(activeStep + 1);
|
||||
completed[activeStep] = true;
|
||||
setCompleted([...completed]);
|
||||
};
|
||||
|
||||
const handleCommit = () => {
|
||||
if (sampleText == "") {
|
||||
setSampleTextError("样本内容不能为空");
|
||||
return;
|
||||
}
|
||||
nextStep();
|
||||
};
|
||||
|
||||
const handleMark = (v: Array<{ isAttack: boolean }>) => {
|
||||
const isAttack = v[0].isAttack;
|
||||
setSampleIsAttack(isAttack);
|
||||
setCount({ total: 1, normal: isAttack ? 0 : 1, attack: isAttack ? 1 : 0 });
|
||||
nextStep();
|
||||
};
|
||||
|
||||
const handleDetect = () => {
|
||||
onDetect({
|
||||
sample: sampleText,
|
||||
publish: checked,
|
||||
isAttack: sampleIsAttack,
|
||||
});
|
||||
};
|
||||
|
||||
const handleStep = (n: number) => {
|
||||
if (completed[n]) setActiveStep(n);
|
||||
};
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Stepper nonLinear activeStep={activeStep} sx={{ marginBottom: 2 }}>
|
||||
<Step completed={completed[0]} onClick={() => handleStep(0)}>
|
||||
<StepLabel>自定义样本</StepLabel>
|
||||
</Step>
|
||||
<Step completed={completed[1]} onClick={() => handleStep(1)}>
|
||||
<StepLabel>标记样本</StepLabel>
|
||||
</Step>
|
||||
<Step completed={completed[2]} onClick={() => handleStep(2)}>
|
||||
<StepLabel>开始测试</StepLabel>
|
||||
</Step>
|
||||
</Stepper>
|
||||
{activeStep == 0 && (
|
||||
<Box sx={{ p: 1 }}>
|
||||
<TextField
|
||||
multiline
|
||||
fullWidth
|
||||
minRows={4}
|
||||
error={sampleTextError != ""}
|
||||
helperText={sampleTextError}
|
||||
value={sampleText}
|
||||
onChange={(e) => setSampleText(e.target.value)}
|
||||
placeholder={`GET /path/api HTTP/1.1
|
||||
Host: example.com`}
|
||||
sx={{ mb: 2, overflow: "auto", maxHeight: "65vh" }}
|
||||
/>
|
||||
<Button fullWidth variant="contained" onClick={handleCommit}>
|
||||
提交样本
|
||||
</Button>
|
||||
</Box>
|
||||
)}
|
||||
{activeStep == 1 && (
|
||||
<SampleMarkable onChange={handleMark} samples={[sampleText]} />
|
||||
)}
|
||||
{activeStep == 2 && (
|
||||
<Box>
|
||||
<SampleCount
|
||||
total={count.total}
|
||||
normal={count.normal}
|
||||
attack={count.attack}
|
||||
/>
|
||||
|
||||
<FormControlLabel
|
||||
sx={{ mt: 1 }}
|
||||
control={
|
||||
<Checkbox
|
||||
checked={checked}
|
||||
onChange={(e: any) => setChecked(e.target.checked)}
|
||||
/>
|
||||
}
|
||||
label="提交到公开样本集"
|
||||
/>
|
||||
|
||||
<Button
|
||||
sx={{ mt: 2 }}
|
||||
fullWidth
|
||||
variant="contained"
|
||||
onClick={handleDetect}
|
||||
>
|
||||
开始检测
|
||||
</Button>
|
||||
</Box>
|
||||
)}
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
function SampleMarkable({
|
||||
samples,
|
||||
onChange,
|
||||
}: {
|
||||
samples: Array<string>;
|
||||
onChange: (value: Array<{ sample: string; isAttack: boolean }>) => void;
|
||||
}) {
|
||||
const [sampleDetail, setSampleDetail] = useState("");
|
||||
const [code, setCode] = useState("");
|
||||
const [rows, setRows] = useState(() => {
|
||||
const rows: Array<{
|
||||
isAttack: boolean;
|
||||
summary: string;
|
||||
size: string;
|
||||
raw: string;
|
||||
}> = [];
|
||||
|
||||
samples.forEach((i) => {
|
||||
rows.push({
|
||||
isAttack: false,
|
||||
summary: sampleSummary(i),
|
||||
raw: i,
|
||||
size: sampleLength(i),
|
||||
});
|
||||
});
|
||||
|
||||
return rows;
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
const highlighted = hljs.highlight(sampleDetail, { language: "http" });
|
||||
setCode(highlighted.value);
|
||||
}, [sampleDetail]);
|
||||
|
||||
const handle = () => {
|
||||
onChange(rows.map((i) => ({ sample: i.raw, isAttack: i.isAttack })));
|
||||
};
|
||||
|
||||
const handleType = (n: number) => (v: string) => {
|
||||
rows[n].isAttack = v == "attack";
|
||||
setRows([...rows]);
|
||||
};
|
||||
|
||||
const handleSampleDetail = (text: string) => () => {
|
||||
setSampleDetail(text);
|
||||
};
|
||||
|
||||
const handleClose = () => {
|
||||
setSampleDetail("");
|
||||
};
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Table sx={{ mb: 2 }}>
|
||||
<TableHead>
|
||||
<TableRow>
|
||||
<TableCell width={350}>样本类型</TableCell>
|
||||
<TableCell width={150}>样本大小</TableCell>
|
||||
<TableCell>摘要</TableCell>
|
||||
<TableCell width={100}></TableCell>
|
||||
</TableRow>
|
||||
</TableHead>
|
||||
<TableBody>
|
||||
{rows.map((row, index) => (
|
||||
<TableRow
|
||||
key={index}
|
||||
sx={{ "&:last-child td, &:last-child th": { border: 0 } }}
|
||||
>
|
||||
<TableCell>
|
||||
<RadioGroup
|
||||
value={row.isAttack ? "attack" : "normal"}
|
||||
onChange={(e) => handleType(index)(e.target.value)}
|
||||
sx={{ flexDirection: "row" }}
|
||||
>
|
||||
<FormControlLabel
|
||||
value="attack"
|
||||
control={<Radio sx={{ color: "divider" }} />}
|
||||
label="攻击样本"
|
||||
/>
|
||||
<FormControlLabel
|
||||
value="normal"
|
||||
control={<Radio sx={{ color: "divider" }} />}
|
||||
label="普通样本"
|
||||
/>
|
||||
</RadioGroup>
|
||||
</TableCell>
|
||||
<TableCell>{row.size}</TableCell>
|
||||
<TableCell>
|
||||
<Typography
|
||||
sx={{
|
||||
width: "220px",
|
||||
fontFamily:
|
||||
"ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace",
|
||||
}}
|
||||
>
|
||||
{row.summary}
|
||||
</Typography>
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
<Button onClick={handleSampleDetail(row.raw)}>详情</Button>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
))}
|
||||
</TableBody>
|
||||
</Table>
|
||||
<Button onClick={handle} fullWidth variant="contained">
|
||||
标记样本
|
||||
</Button>
|
||||
|
||||
<Dialog open={sampleDetail != ""} onClick={handleClose}>
|
||||
{/* <DialogTitle>样本详情</DialogTitle> */}
|
||||
<DialogContent>
|
||||
<DialogContentText>
|
||||
<Box
|
||||
component="code"
|
||||
style={{ whiteSpace: "pre-line", wordBreak: "break-all" }}
|
||||
dangerouslySetInnerHTML={{ __html: code }}
|
||||
/>
|
||||
</DialogContentText>
|
||||
</DialogContent>
|
||||
|
||||
<DialogActions>
|
||||
<Button onClick={handleClose}>关闭</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
@@ -1,116 +0,0 @@
|
||||
import { useState } from "react";
|
||||
import { Message } from "@/components";
|
||||
import { submitSampleSet, getSampleSetResult } from "@/api/detection";
|
||||
import CircularProgress from "@mui/material/CircularProgress";
|
||||
import CloseIcon from "@mui/icons-material/Close";
|
||||
import IconButton from "@mui/material/IconButton";
|
||||
import SampleSteps from "@/components/detection/SampleSteps";
|
||||
import Button from "@mui/material/Button";
|
||||
import Modal from "@mui/material/Modal";
|
||||
import Box from "@mui/material/Box";
|
||||
import Title from "@/components/Home/Title";
|
||||
|
||||
export default SamplesForm;
|
||||
|
||||
function SamplesForm({
|
||||
onSetIdChange,
|
||||
}: {
|
||||
onSetIdChange: (id: string) => void;
|
||||
}) {
|
||||
const [open, setOpen] = useState(false);
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
const testHandler = () => {
|
||||
setOpen(true);
|
||||
};
|
||||
const closeHandler = () => {
|
||||
setOpen(false);
|
||||
};
|
||||
|
||||
const getSetId = async (content: string, publish: boolean, tag: string) => {
|
||||
const res = await submitSampleSet({pocs: [{ content, tag, }], record_it: publish});
|
||||
if (res.code != 0) throw res.msg;
|
||||
if (res.data.total != 1) throw "样本数量错误";
|
||||
return res.data.id;
|
||||
};
|
||||
|
||||
const submit = async ({
|
||||
sample,
|
||||
publish,
|
||||
isAttack,
|
||||
}: {
|
||||
sample: string;
|
||||
publish: boolean;
|
||||
isAttack: boolean;
|
||||
}) => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const setId = await getSetId(
|
||||
sample,
|
||||
publish,
|
||||
isAttack ? "black" : "white"
|
||||
);
|
||||
onSetIdChange(setId);
|
||||
} catch (e) {
|
||||
Message.error(("解析失败: " + e) as string);
|
||||
}
|
||||
setOpen(false);
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Button variant="contained" onClick={testHandler}>
|
||||
测试我的样本
|
||||
</Button>
|
||||
<Modal open={open} onClose={closeHandler}>
|
||||
<Box
|
||||
sx={{
|
||||
position: "absolute" as "absolute",
|
||||
top: "50%",
|
||||
left: "50%",
|
||||
transform: "translate(-50%, -50%)",
|
||||
width: 750,
|
||||
bgcolor: "background.paper",
|
||||
boxShadow: 24,
|
||||
borderRadius: "6px",
|
||||
p: 3,
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
justifyContent: "space-between",
|
||||
alignItems: "center",
|
||||
}}
|
||||
>
|
||||
{loading && (
|
||||
<Box
|
||||
sx={{
|
||||
position: "absolute",
|
||||
top: "0",
|
||||
left: "0",
|
||||
right: "0",
|
||||
bottom: "0",
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
background: "rgba(0,0,0,0.3)",
|
||||
}}
|
||||
>
|
||||
<CircularProgress />
|
||||
</Box>
|
||||
)}
|
||||
<Title title="测试我的样本" sx={{ fontSize: "18px", mb: 2 }} />
|
||||
<IconButton onClick={closeHandler}>
|
||||
<CloseIcon fontSize="small" />
|
||||
</IconButton>
|
||||
</Box>
|
||||
<Box>
|
||||
<SampleSteps onDetect={submit} />
|
||||
</Box>
|
||||
</Box>
|
||||
</Modal>
|
||||
</>
|
||||
);
|
||||
}
|
||||