Compare commits
953 Commits
0.0.2
...
ops/releas
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
40eac988cc | ||
|
|
2c0702874b | ||
|
|
171762d676 | ||
|
|
76e091900b | ||
|
|
bfa4ceab90 | ||
|
|
b18cfa797a | ||
|
|
8a117a41e8 | ||
|
|
17ba41320e | ||
|
|
476c0bfefc | ||
|
|
1c6691d785 | ||
|
|
36ae290cb6 | ||
|
|
597715ce33 | ||
|
|
a8a08c1dcc | ||
|
|
7757729efd | ||
|
|
b246bfdac7 | ||
|
|
d35393ba22 | ||
|
|
c893dd7095 | ||
|
|
9bdb18d833 | ||
|
|
58fc1af74f | ||
|
|
1b3cf33bf0 | ||
|
|
c9005d0c04 | ||
|
|
37bda20d08 | ||
|
|
1819861647 | ||
|
|
352b86b40d | ||
|
|
853ad0154f | ||
|
|
c88bf04a0d | ||
|
|
6a84e61ecb | ||
|
|
dd6e369e6a | ||
|
|
bd20546b6d | ||
|
|
c41c14bf3c | ||
|
|
3fbf0156e2 | ||
|
|
530304b832 | ||
|
|
5499150395 | ||
|
|
2dcc62f3da | ||
|
|
405a12ef07 | ||
|
|
bb0734b3d3 | ||
|
|
a9e394950f | ||
|
|
be6023701c | ||
|
|
02bcd35779 | ||
|
|
b6dd8129ea | ||
|
|
db5cd68a1e | ||
|
|
d1c310ab63 | ||
|
|
b10e14899d | ||
|
|
eee3a2ed38 | ||
|
|
68d4d23a4b | ||
|
|
bb457924cd | ||
|
|
a0d78c57e3 | ||
|
|
7f16243270 | ||
|
|
36a75e86ac | ||
|
|
7c41200028 | ||
|
|
3da0c523e8 | ||
|
|
8c3bc81e08 | ||
|
|
9d72706c2d | ||
|
|
0aa8de27d4 | ||
|
|
b08f4657e5 | ||
|
|
1e04822532 | ||
|
|
4e5e9b7cba | ||
|
|
a2fe4658c4 | ||
|
|
e43f10138f | ||
|
|
7dc0469b30 | ||
|
|
904af89190 | ||
|
|
2425bea9b6 | ||
|
|
b5579ae890 | ||
|
|
595f3f55f2 | ||
|
|
c96b7ebd1e | ||
|
|
9a3ec88390 | ||
|
|
ea35da6694 | ||
|
|
00a8e094db | ||
|
|
58d0b24b16 | ||
|
|
b20637652a | ||
|
|
e1e146cb5f | ||
|
|
e52f374252 | ||
|
|
daab5963bc | ||
|
|
38a9c142e2 | ||
|
|
4afe1caa33 | ||
|
|
2dd008532a | ||
|
|
92ca92bee6 | ||
|
|
64c82a2406 | ||
|
|
e44ef813a1 | ||
|
|
9f3b45a4c7 | ||
|
|
b1af0c7d72 | ||
|
|
421640221b | ||
|
|
f6c6e22b0d | ||
|
|
51653483b9 | ||
|
|
a9787b0add | ||
|
|
6cdbf92fb0 | ||
|
|
fdb40680d3 | ||
|
|
6746325bf2 | ||
|
|
05a8bff1e0 | ||
|
|
874ff5b3f6 | ||
|
|
2230cfa52b | ||
|
|
83c581364d | ||
|
|
1d39360c60 | ||
|
|
8c763599fe | ||
|
|
9632f6070c | ||
|
|
cc63659650 | ||
|
|
177f389814 | ||
|
|
406e9ea6ee | ||
|
|
bb461cd74a | ||
|
|
782509376c | ||
|
|
63dc58d088 | ||
|
|
77f5adb19f | ||
|
|
7abfb67451 | ||
|
|
c8dc638c29 | ||
|
|
48ac926289 | ||
|
|
0a4ae41b0c | ||
|
|
bb0139bee6 | ||
|
|
7bf07cb64c | ||
|
|
ab370e66a5 | ||
|
|
421a2760d5 | ||
|
|
42f0e079f0 | ||
|
|
9150346926 | ||
|
|
b65a04857c | ||
|
|
59315c3200 | ||
|
|
08e5a15424 | ||
|
|
b8c283f602 | ||
|
|
11f7ee34de | ||
|
|
5be0d60caf | ||
|
|
6504ae2f45 | ||
|
|
c3155204eb | ||
|
|
ebd35803c6 | ||
|
|
55bda80d33 | ||
|
|
3886e62e8e | ||
|
|
07edf77ba8 | ||
|
|
ddefeb630a | ||
|
|
f050701d64 | ||
|
|
5a50327f8f | ||
|
|
b4cd038c86 | ||
|
|
9b22f9a412 | ||
|
|
99aeeb5faa | ||
|
|
29b09965a3 | ||
|
|
312c31a426 | ||
|
|
c54610caf6 | ||
|
|
72014e1534 | ||
|
|
d407b88b67 | ||
|
|
d1d8ffef7a | ||
|
|
787e9fe615 | ||
|
|
e79c53156b | ||
|
|
7dcd225cea | ||
|
|
3482ee51da | ||
|
|
211df6965f | ||
|
|
448a700687 | ||
|
|
7d17dae1fd | ||
|
|
20a5c1b494 | ||
|
|
4852b1479b | ||
|
|
bef81a940e | ||
|
|
8441d18a7f | ||
|
|
09f4400552 | ||
|
|
4f422f5ef0 | ||
|
|
fdd3bbd5c1 | ||
|
|
bb3c8a1188 | ||
|
|
bad3db400b | ||
|
|
8ac8cd8487 | ||
|
|
a54cd75469 | ||
|
|
26d8c7ab62 | ||
|
|
6b802b6545 | ||
|
|
8d56923efc | ||
|
|
79b9d703dc | ||
|
|
a5d29a4e3c | ||
|
|
7a9b3f0b8f | ||
|
|
9de1ae8c11 | ||
|
|
218f9f0015 | ||
|
|
0c6ea7248a | ||
|
|
13dfca016e | ||
|
|
904b9497a0 | ||
|
|
69444a4d72 | ||
|
|
7d67d0d857 | ||
|
|
a95dda6c20 | ||
|
|
148046f105 | ||
|
|
6d01caee50 | ||
|
|
9f9790d4fd | ||
|
|
fdb5325e02 | ||
|
|
be4080c80d | ||
|
|
a057808624 | ||
|
|
355a69b4fc | ||
|
|
7597864337 | ||
|
|
724db1936b | ||
|
|
75061d843a | ||
|
|
502b21147d | ||
|
|
deb91728d4 | ||
|
|
790c29c205 | ||
|
|
b1bfd81a97 | ||
|
|
a056c9c6c9 | ||
|
|
c559efcceb | ||
|
|
8d5c987fe7 | ||
|
|
fa034d54b6 | ||
|
|
e39e8bd907 | ||
|
|
693b13e818 | ||
|
|
6cd22e0975 | ||
|
|
22c881bbaa | ||
|
|
3cfc51a4d7 | ||
|
|
3e08deb50e | ||
|
|
42cf6b2955 | ||
|
|
02c64977cb | ||
|
|
32b0a46574 | ||
|
|
94a76a72a4 | ||
|
|
bcb278dd0b | ||
|
|
8eab415430 | ||
|
|
aa3108fe98 | ||
|
|
56965b4ff4 | ||
|
|
6eaf04aa71 | ||
|
|
5fe0dd3d29 | ||
|
|
091c955363 | ||
|
|
f09d0d8279 | ||
|
|
713edcfb8d | ||
|
|
7e0f7f6608 | ||
|
|
e4c29bf57f | ||
|
|
b2d0d50507 | ||
|
|
8c480208df | ||
|
|
b010e13de2 | ||
|
|
c2bfba865a | ||
|
|
b02debfc59 | ||
|
|
978aa0dd68 | ||
|
|
14ecf66c70 | ||
|
|
0563fde951 | ||
|
|
8f37e85aa6 | ||
|
|
0c4e5bc420 | ||
|
|
8b6e7dcbdc | ||
|
|
48fe534e77 | ||
|
|
6da291e6e3 | ||
|
|
d49b444462 | ||
|
|
692bb8f964 | ||
|
|
c2abe2f34c | ||
|
|
133973c987 | ||
|
|
8a35eb5d3e | ||
|
|
b1fbeb52a5 | ||
|
|
674cbb9bf5 | ||
|
|
6f53b41baf | ||
|
|
381e1d6b43 | ||
|
|
779c7c77b7 | ||
|
|
096426b8e2 | ||
|
|
d8146f0495 | ||
|
|
be4f3d06e8 | ||
|
|
da784aea84 | ||
|
|
bb3b5b3dff | ||
|
|
ad3e38285f | ||
|
|
60dfefd37c | ||
|
|
8268fc796e | ||
|
|
98f83d9be1 | ||
|
|
c39a205cea | ||
|
|
1671fc3572 | ||
|
|
e550df3e8b | ||
|
|
930cd2b09b | ||
|
|
36672da026 | ||
|
|
5f1e5c8f4b | ||
|
|
b71442543d | ||
|
|
146920496e | ||
|
|
cfa5771b8e | ||
|
|
25e77448d1 | ||
|
|
4a0409953a | ||
|
|
fa2a5d3e35 | ||
|
|
7c1c8a43e8 | ||
|
|
0a8be8ac95 | ||
|
|
0732344e79 | ||
|
|
c8a7371e07 | ||
|
|
aa49cc6ac0 | ||
|
|
cc01769f8f | ||
|
|
8a613513aa | ||
|
|
c249f68972 | ||
|
|
5ecfb39a9e | ||
|
|
f8039102bf | ||
|
|
88fc5910e9 | ||
|
|
41e8042bc7 | ||
|
|
a45a592a39 | ||
|
|
53cc923f1e | ||
|
|
e653eeb5c6 | ||
|
|
6e7559577c | ||
|
|
7455f8279e | ||
|
|
149e7de7fc | ||
|
|
824dbb4e45 | ||
|
|
8fef5c595d | ||
|
|
017a7dccb8 | ||
|
|
079fe5e7b0 | ||
|
|
1e03307657 | ||
|
|
ccaba78e8d | ||
|
|
75fe682433 | ||
|
|
fb6320a244 | ||
|
|
3da330341f | ||
|
|
31c7b2dfb8 | ||
|
|
d2a8ca2cdd | ||
|
|
16fca7ec61 | ||
|
|
39d8d38ee9 | ||
|
|
99982f07f7 | ||
|
|
1246a853b5 | ||
|
|
6382453327 | ||
|
|
4ebee74f70 | ||
|
|
54750f4e06 | ||
|
|
1225362c90 | ||
|
|
fe5ad49008 | ||
|
|
586561ec5a | ||
|
|
cad2d58f44 | ||
|
|
4f86a56f59 | ||
|
|
c86ca0d8cf | ||
|
|
ec633cc0e1 | ||
|
|
fa2a2b4342 | ||
|
|
2b456c9934 | ||
|
|
7965d52f29 | ||
|
|
ad322c2e10 | ||
|
|
da5dac73ab | ||
|
|
b5e711bf87 | ||
|
|
535d2baf0b | ||
|
|
294dcb1994 | ||
|
|
c54a5e9f1a | ||
|
|
3571f2b502 | ||
|
|
6f8416365f | ||
|
|
778a381b5b | ||
|
|
770769ead5 | ||
|
|
8d49abb797 | ||
|
|
d0568c53dc | ||
|
|
276ef9d704 | ||
|
|
dd75f718aa | ||
|
|
0ece6ccb51 | ||
|
|
bbd7530f77 | ||
|
|
2cfd692171 | ||
|
|
77f794831f | ||
|
|
4ee8926d5f | ||
|
|
a850e405ed | ||
|
|
cac68f88df | ||
|
|
3734a66549 | ||
|
|
2331545369 | ||
|
|
0ff1f2c22b | ||
|
|
61f1d6ac8b | ||
|
|
ac6c0e93ca | ||
|
|
43299e80d6 | ||
|
|
a936113709 | ||
|
|
bfe4f73b49 | ||
|
|
7f9f402a82 | ||
|
|
bc3a273edf | ||
|
|
645ea86502 | ||
|
|
ed1d49782f | ||
|
|
2e9062d377 | ||
|
|
8bb0f3a066 | ||
|
|
c8feb20259 | ||
|
|
a5d98b00a0 | ||
|
|
b22ae3f98a | ||
|
|
5d6cc4655f | ||
|
|
0f2af7f54d | ||
|
|
853ee48453 | ||
|
|
14b77e4a0c | ||
|
|
c145f4ca0e | ||
|
|
c0d9a8ebad | ||
|
|
19227fcbab | ||
|
|
f57e0bcf12 | ||
|
|
fbf70047eb | ||
|
|
ef8e04e767 | ||
|
|
ceaea6dcfc | ||
|
|
b93779e816 | ||
|
|
7b19c70161 | ||
|
|
35585580a4 | ||
|
|
298df02879 | ||
|
|
3b1ae77aab | ||
|
|
6e1148ffc9 | ||
|
|
75537be32e | ||
|
|
127f759f16 | ||
|
|
3f47bb32a0 | ||
|
|
7b59edcf28 | ||
|
|
a7d051cc47 | ||
|
|
eb3cef0222 | ||
|
|
37fc736e4c | ||
|
|
b9f438bc01 | ||
|
|
8135fce136 | ||
|
|
1fd322eeb6 | ||
|
|
f028eedfc1 | ||
|
|
c222755acc | ||
|
|
5dbc8a4980 | ||
|
|
ad46dd8b5b | ||
|
|
15a0851743 | ||
|
|
cc587adb7a | ||
|
|
1581fd277f | ||
|
|
900389160f | ||
|
|
f74d93a835 | ||
|
|
93fb40d282 | ||
|
|
9e3d450854 | ||
|
|
7b52827fd0 | ||
|
|
ca52ab7bee | ||
|
|
e41b18a4a8 | ||
|
|
db3f03bda9 | ||
|
|
a59abd179f | ||
|
|
44992687f8 | ||
|
|
350fbb3361 | ||
|
|
d18677b9ed | ||
|
|
65af89d711 | ||
|
|
a655be3d36 | ||
|
|
f7fa8278be | ||
|
|
9aa08c1b20 | ||
|
|
ab56253198 | ||
|
|
ce2a966867 | ||
|
|
676f3bc1ab | ||
|
|
0d0742ed20 | ||
|
|
81936ed811 | ||
|
|
e3b9df09f4 | ||
|
|
f593b0cf24 | ||
|
|
a1abdfb70a | ||
|
|
10d5b20c81 | ||
|
|
8649f20841 | ||
|
|
ae55f53325 | ||
|
|
37d4a1b7c4 | ||
|
|
2d5f5f0f23 | ||
|
|
06005201de | ||
|
|
4786068521 | ||
|
|
9aeacc6e67 | ||
|
|
4f007e0c6e | ||
|
|
ace5a1898c | ||
|
|
832420f469 | ||
|
|
98992b3d76 | ||
|
|
f8c7ce647c | ||
|
|
e840201b1e | ||
|
|
a047d7be0d | ||
|
|
73b51651a6 | ||
|
|
e54514fb39 | ||
|
|
5b6eb961cc | ||
|
|
87df3bedd0 | ||
|
|
fff3ea0e30 | ||
|
|
cfaa431e20 | ||
|
|
61ae49f510 | ||
|
|
079dfbbf92 | ||
|
|
f520001863 | ||
|
|
57a9dc78ab | ||
|
|
83e20ac83c | ||
|
|
76043a5b46 | ||
|
|
80baa4f633 | ||
|
|
66b68ecc82 | ||
|
|
ec68d9b7f9 | ||
|
|
13210a7ca7 | ||
|
|
c75c6c24ad | ||
|
|
1faa59ae1c | ||
|
|
2fc6d94e11 | ||
|
|
6a6b34f5f9 | ||
|
|
b0efe98785 | ||
|
|
a7262cda7c | ||
|
|
6834bd716c | ||
|
|
0aabf831ba | ||
|
|
d3f92b175c | ||
|
|
031db0b7d5 | ||
|
|
523623698a | ||
|
|
f714dffe70 | ||
|
|
7a9ad7546c | ||
|
|
b53ad6054e | ||
|
|
138e58a1e1 | ||
|
|
55ca17203f | ||
|
|
8916bee786 | ||
|
|
c055d3d992 | ||
|
|
7b699e08fc | ||
|
|
c7367dfcec | ||
|
|
75a46a14a8 | ||
|
|
181897ec5a | ||
|
|
e5e9611646 | ||
|
|
78d517a16e | ||
|
|
e855c9c7ed | ||
|
|
195f56e9b9 | ||
|
|
888e550453 | ||
|
|
f771d361ae | ||
|
|
2cd23b06f1 | ||
|
|
75e568e15f | ||
|
|
60b91eb79f | ||
|
|
dd7a6465aa | ||
|
|
4cd6a4e4b9 | ||
|
|
3942346f49 | ||
|
|
e697c255fc | ||
|
|
65fa326262 | ||
|
|
81043034f9 | ||
|
|
6c5bceba41 | ||
|
|
b524963892 | ||
|
|
dd4997cedc | ||
|
|
ead5505d53 | ||
|
|
bf6cee4a6a | ||
|
|
bd458bfbe9 | ||
|
|
7895597176 | ||
|
|
a44e5ba518 | ||
|
|
cc7da00001 | ||
|
|
41449aeea6 | ||
|
|
33277bc457 | ||
|
|
f2cfb4cf4a | ||
|
|
d646d72a26 | ||
|
|
1807dbd615 | ||
|
|
1e771ed649 | ||
|
|
83d04ca45d | ||
|
|
ee2dadb40d | ||
|
|
c9eb51213f | ||
|
|
81f28baabf | ||
|
|
1245e9f327 | ||
|
|
007889339b | ||
|
|
9cf5e8691d | ||
|
|
ff1bfe5f98 | ||
|
|
c2c870668b | ||
|
|
b7ed284ae9 | ||
|
|
e33db39494 | ||
|
|
f13cccf5a6 | ||
|
|
c355c915f8 | ||
|
|
92a95db34c | ||
|
|
1a821706ee | ||
|
|
604e118036 | ||
|
|
871a83e3b5 | ||
|
|
6d3f9e7cfc | ||
|
|
b5e281a3b1 | ||
|
|
60d9ef7069 | ||
|
|
98a7217b10 | ||
|
|
a867effa68 | ||
|
|
058ebd8274 | ||
|
|
784eec99de | ||
|
|
3e2e330fcb | ||
|
|
e50a664e64 | ||
|
|
94503ddc39 | ||
|
|
99bdeef754 | ||
|
|
e08c41baa9 | ||
|
|
ca9eefb80b | ||
|
|
4962b8b3ca | ||
|
|
eb372686e6 | ||
|
|
daf506e1bd | ||
|
|
b239d5b440 | ||
|
|
09a3fd2db8 | ||
|
|
eb12ced77f | ||
|
|
5521386781 | ||
|
|
24698be8be | ||
|
|
6183e8c3e5 | ||
|
|
cdc146747b | ||
|
|
ca9fcf6cf6 | ||
|
|
daa081d46d | ||
|
|
be23560ee4 | ||
|
|
134ff34c5e | ||
|
|
f9e5fd01be | ||
|
|
e278d8f049 | ||
|
|
7a25e0cb34 | ||
|
|
e25cc2e47c | ||
|
|
fd10df913f | ||
|
|
5d39246ef5 | ||
|
|
724a0124b5 | ||
|
|
976e54407e | ||
|
|
b7285dc93c | ||
|
|
8cb310ef93 | ||
|
|
c0cf4fcc39 | ||
|
|
5dc543db99 | ||
|
|
04401ee600 | ||
|
|
e0cc2b6a01 | ||
|
|
2184264831 | ||
|
|
ac3b0cb652 | ||
|
|
69566834ea | ||
|
|
aa66173625 | ||
|
|
9ceb052eb4 | ||
|
|
f52169ec27 | ||
|
|
d761d0cc88 | ||
|
|
7d3a4ebc4e | ||
|
|
281a9cfbab | ||
|
|
8c6f5bf807 | ||
|
|
bb63808767 | ||
|
|
96d2765d64 | ||
|
|
492ec024c4 | ||
|
|
eb12eb0695 | ||
|
|
d78351f72c | ||
|
|
af752cfa13 | ||
|
|
f0dc845825 | ||
|
|
5ecb5f667d | ||
|
|
3dcd183171 | ||
|
|
167189d4e4 | ||
|
|
d6c083fb5b | ||
|
|
1dd59cf764 | ||
|
|
e7930a2442 | ||
|
|
1261e6aa03 | ||
|
|
3abcfe90bc | ||
|
|
cf336781d8 | ||
|
|
4c0aa3cfc3 | ||
|
|
0a1fb6d983 | ||
|
|
99b1f83e50 | ||
|
|
4db74d0931 | ||
|
|
9860df9b6d | ||
|
|
4c225b030d | ||
|
|
9e5b9d4889 | ||
|
|
e9c4e134c6 | ||
|
|
5704a4182e | ||
|
|
489bdfbc01 | ||
|
|
53a840af4b | ||
|
|
8c8d596c43 | ||
|
|
a3f91641dd | ||
|
|
f5754be9ff | ||
|
|
12f40b831f | ||
|
|
859feff328 | ||
|
|
bba44ca057 | ||
|
|
5134f7a121 | ||
|
|
b366d0b464 | ||
|
|
e3fb1d7c15 | ||
|
|
883b45f201 | ||
|
|
8fb32e4f73 | ||
|
|
764ea702d0 | ||
|
|
b225cebc95 | ||
|
|
106036d989 | ||
|
|
026656711d | ||
|
|
35a8c4a5a6 | ||
|
|
86960e3813 | ||
|
|
b099d52520 | ||
|
|
6efe15788c | ||
|
|
3e43c2f9d0 | ||
|
|
f1b949865f | ||
|
|
ab439a17a3 | ||
|
|
dd65564af6 | ||
|
|
acffcbfe98 | ||
|
|
04703aa03c | ||
|
|
584e6b2c77 | ||
|
|
82f6d3565f | ||
|
|
8c68834e17 | ||
|
|
ba7b6eed4a | ||
|
|
051ad0f4ea | ||
|
|
05935c29e1 | ||
|
|
6a2735ec3d | ||
|
|
8bc53f76eb | ||
|
|
48f6a507dc | ||
|
|
20f328906c | ||
|
|
4d1e2eb9c6 | ||
|
|
97542b06fa | ||
|
|
0c93c7e4b6 | ||
|
|
56d9906c74 | ||
|
|
5cfe37433f | ||
|
|
45ebef3b74 | ||
|
|
2ed294bd65 | ||
|
|
91f3348a2f | ||
|
|
d424de5e9a | ||
|
|
6387ac21c9 | ||
|
|
6dce47e47f | ||
|
|
b7760ab42a | ||
|
|
e0405bc5f6 | ||
|
|
14151a6c46 | ||
|
|
00555d3544 | ||
|
|
7b2adc3979 | ||
|
|
0a5fc1e4a8 | ||
|
|
304d974b38 | ||
|
|
6792a7afa7 | ||
|
|
ded297de59 | ||
|
|
f616678d83 | ||
|
|
e10273dcdd | ||
|
|
343269670c | ||
|
|
8af157b848 | ||
|
|
9d65c999e5 | ||
|
|
4fe0d0edc9 | ||
|
|
b1aab27338 | ||
|
|
727e9ae9ed | ||
|
|
dc9df5d760 | ||
|
|
b7de791658 | ||
|
|
82c7b59650 | ||
|
|
e0b9d8f476 | ||
|
|
db2ed3a555 | ||
|
|
6efc375066 | ||
|
|
9a4c864490 | ||
|
|
a3081ef4a9 | ||
|
|
43374e02bd | ||
|
|
fb8a19469b | ||
|
|
f2d5f4a86c | ||
|
|
2177aed64f | ||
|
|
d20ac8fafc | ||
|
|
2395a489a3 | ||
|
|
0b8eedf935 | ||
|
|
807ada0bf9 | ||
|
|
216c35c0b8 | ||
|
|
d98cd5d9a9 | ||
|
|
fb6adf316f | ||
|
|
0854317cc8 | ||
|
|
fcdefa450c | ||
|
|
dc50a460e5 | ||
|
|
31187ccb69 | ||
|
|
d4b72b06e9 | ||
|
|
922e1e6ac4 | ||
|
|
79341b2c8e | ||
|
|
8a1eebb9b0 | ||
|
|
85e26c6d93 | ||
|
|
0a1ff64d18 | ||
|
|
176f38070d | ||
|
|
4f5b0f74fd | ||
|
|
c549508417 | ||
|
|
b86515a926 | ||
|
|
1ba8c31d2c | ||
|
|
06ff1d4e8f | ||
|
|
b03a11f2b5 | ||
|
|
a362d21aa4 | ||
|
|
cd33d80a8c | ||
|
|
2bb0dd545d | ||
|
|
ac2115114c | ||
|
|
831550d847 | ||
|
|
1fa7b4a911 | ||
|
|
bcdb5ce0e6 | ||
|
|
a3485dd9b7 | ||
|
|
5a28b89f46 | ||
|
|
58b1b50c2e | ||
|
|
8f75df15e2 | ||
|
|
9883d3b064 | ||
|
|
e477ce7048 | ||
|
|
0985aed0b0 | ||
|
|
2ffda7a1a6 | ||
|
|
5cad4aa93e | ||
|
|
2a61449ce1 | ||
|
|
fe0b42c5e3 | ||
|
|
6ccc724839 | ||
|
|
56cdeffaa9 | ||
|
|
5633eb4111 | ||
|
|
6255c8dbbc | ||
|
|
1fd7d5df88 | ||
|
|
01213c5d02 | ||
|
|
49685e545b | ||
|
|
2542a24675 | ||
|
|
28d3e05ca9 | ||
|
|
00fbb5cd74 | ||
|
|
fbafcd5c92 | ||
|
|
376a90772d | ||
|
|
4f4e75859d | ||
|
|
679459f53b | ||
|
|
8baef0d873 | ||
|
|
d01dddf9e3 | ||
|
|
d61e5236d0 | ||
|
|
d514e6dc0f | ||
|
|
188d2def2d | ||
|
|
17d64ad963 | ||
|
|
d95fbe02bd | ||
|
|
212526d989 | ||
|
|
ef5052e7ea | ||
|
|
3531af4a46 | ||
|
|
b2f6fb3a00 | ||
|
|
996da0862c | ||
|
|
50dd7c1b83 | ||
|
|
2dd067170b | ||
|
|
e635ca86c5 | ||
|
|
8bd36e37a3 | ||
|
|
b3b2f7c407 | ||
|
|
f1ad3d44ff | ||
|
|
ee6ff50244 | ||
|
|
196741d5dc | ||
|
|
374c06472f | ||
|
|
12c85c60c7 | ||
|
|
4747ee93b2 | ||
|
|
5ec53c4b33 | ||
|
|
ee7f7f50cc | ||
|
|
92869e8d6c | ||
|
|
c66dda239f | ||
|
|
e927760c40 | ||
|
|
8783f9059a | ||
|
|
12e1239267 | ||
|
|
7c963193ef | ||
|
|
bce9a624d7 | ||
|
|
dac3606b4e | ||
|
|
eb00385d76 | ||
|
|
986f562266 | ||
|
|
11d0441ed4 | ||
|
|
ef46e2c51e | ||
|
|
0a3c03f18b | ||
|
|
7a7e1a1855 | ||
|
|
f530f441d5 | ||
|
|
10160e8104 | ||
|
|
602e80ee9e | ||
|
|
9c83860e1b | ||
|
|
1f1970232b | ||
|
|
594bd895ec | ||
|
|
486c09b24a | ||
|
|
aaf396fbc8 | ||
|
|
4e01d6f5f3 | ||
|
|
342c391a9b | ||
|
|
f2d929e6fa | ||
|
|
41cdc227b3 | ||
|
|
0f4f1d580b | ||
|
|
37c37868a3 | ||
|
|
01218e4a5c | ||
|
|
f6d54902e9 | ||
|
|
5a559aa868 | ||
|
|
9b0f381c06 | ||
|
|
c1802b2487 | ||
|
|
d4b11a4056 | ||
|
|
da1553920b | ||
|
|
d787813bc6 | ||
|
|
4a3886e41a | ||
|
|
cf1f833d60 | ||
|
|
cb21952155 | ||
|
|
3498df0491 | ||
|
|
e3ebf1979f | ||
|
|
fb09a8c00f | ||
|
|
4c708f3cbd | ||
|
|
e1035510df | ||
|
|
c466d0399c | ||
|
|
8b33a233dd | ||
|
|
9e2962bb62 | ||
|
|
fc73deb3fd | ||
|
|
40ac4b1eb9 | ||
|
|
3d6da5f5a0 | ||
|
|
7c4fc42247 | ||
|
|
0c2a92080e | ||
|
|
b1fd13bcbb | ||
|
|
cd37ff4b41 | ||
|
|
215e9f0f4a | ||
|
|
26e147b426 | ||
|
|
c7318c2b17 | ||
|
|
c16116c7cd | ||
|
|
1a4748bbec | ||
|
|
c0f7d60213 | ||
|
|
bf83a0847d | ||
|
|
7601d49795 | ||
|
|
1edf4d83f1 | ||
|
|
f620c00785 | ||
|
|
180e7bcb8a | ||
|
|
8a52450629 | ||
|
|
a535ebfe1d | ||
|
|
3e80590a82 | ||
|
|
5196536bb4 | ||
|
|
59ac8effc1 | ||
|
|
9cc0267619 | ||
|
|
a21f35c2b0 | ||
|
|
fde31cb327 | ||
|
|
9c096605bb | ||
|
|
b90e326eec | ||
|
|
66e2acd063 | ||
|
|
44165d655d | ||
|
|
c9a6956b0d | ||
|
|
9288564195 | ||
|
|
9b8e7f812c | ||
|
|
3908f1be7e | ||
|
|
15bd035304 | ||
|
|
e0b1cd76ca | ||
|
|
2144b776b1 | ||
|
|
a8022df1d9 | ||
|
|
a5d92bf905 | ||
|
|
81a18d07c3 | ||
|
|
86e5dcb23b | ||
|
|
1339c09382 | ||
|
|
01e310a6e7 | ||
|
|
a07c962867 | ||
|
|
09b6964c0e | ||
|
|
461030d34f | ||
|
|
c1a7cd8c46 | ||
|
|
5888c56f1d | ||
|
|
0798b8d8a0 | ||
|
|
ae93d48b44 | ||
|
|
506a3ba2b3 | ||
|
|
12f197b623 | ||
|
|
2001b241ee | ||
|
|
7911edec4b | ||
|
|
7ea70bf422 | ||
|
|
b1fdbd26a3 | ||
|
|
fa7241bd4e | ||
|
|
8fdf462c6c | ||
|
|
f7c7411bcf | ||
|
|
845cb2e657 | ||
|
|
a4bfde68bd | ||
|
|
19d1ba6cf9 | ||
|
|
1060bdd00f | ||
|
|
8c2fb2bdee | ||
|
|
0fe75387eb | ||
|
|
fbea49e54f | ||
|
|
41a72798d9 | ||
|
|
03cc185085 | ||
|
|
bfbd8ee25e | ||
|
|
f3f36169ff | ||
|
|
2df88544d3 | ||
|
|
6b744d77c7 | ||
|
|
ba57dedebb | ||
|
|
affd5b3057 | ||
|
|
30c3128995 | ||
|
|
b003a05775 | ||
|
|
98ec3d7dab | ||
|
|
69e23dbb99 | ||
|
|
47bda1023a | ||
|
|
fd538a74af | ||
|
|
300d213a7a | ||
|
|
4c0a70f300 | ||
|
|
8798d344b6 | ||
|
|
63e62ab57b | ||
|
|
9a027674ac | ||
|
|
e4407467dd | ||
|
|
551eeb0390 | ||
|
|
11d6ad1ed3 | ||
|
|
e57db6925c | ||
|
|
87096364d8 | ||
|
|
ad8027a7d0 | ||
|
|
9786fa8275 | ||
|
|
37762cf034 | ||
|
|
a78f1e5f8e | ||
|
|
440b8030e0 | ||
|
|
fb7cdfbef7 | ||
|
|
cf1ee9c631 | ||
|
|
13123f8f9d | ||
|
|
189bc3965d | ||
|
|
0aa7444dba | ||
|
|
628efec6bd | ||
|
|
6d0846a551 | ||
|
|
41d9015023 | ||
|
|
3f40b60c64 | ||
|
|
f244054462 | ||
|
|
37fbc98827 | ||
|
|
795cf3393e | ||
|
|
70323b8ee3 | ||
|
|
67686e99f0 | ||
|
|
90554462dc | ||
|
|
ba3084d698 | ||
|
|
3813f75f65 | ||
|
|
a663e99bcd | ||
|
|
d517ab4e6f | ||
|
|
29726c11a3 | ||
|
|
336a18ade7 | ||
|
|
53814fe6ab | ||
|
|
50fb586e6f | ||
|
|
a49ee9d726 | ||
|
|
ae40d0233b | ||
|
|
8f7c13850e | ||
|
|
b4d3419797 | ||
|
|
68aa5db66b | ||
|
|
7e8de7c754 | ||
|
|
f989fbf9c9 | ||
|
|
af8ddc10da | ||
|
|
3713e6e550 | ||
|
|
4a7ba07df1 | ||
|
|
b625381de3 | ||
|
|
0968ac774a | ||
|
|
0db6b23bf7 | ||
|
|
6dc10e8df4 | ||
|
|
9976f0ae99 | ||
|
|
55537d3a25 | ||
|
|
02e116fd8a | ||
|
|
5af3a97720 | ||
|
|
bf08c2c26f | ||
|
|
236ed405f2 | ||
|
|
0fb02e3ccb | ||
|
|
3dd6609fd6 | ||
|
|
dd876792c7 | ||
|
|
3b79ef31e8 | ||
|
|
deb3abcac1 | ||
|
|
1c1a945959 | ||
|
|
d1c5211d03 | ||
|
|
d73bc3a031 | ||
|
|
6f2001b8c9 | ||
|
|
378920b773 | ||
|
|
c78bf0605d | ||
|
|
e8f0efe1ec | ||
|
|
f8ebc4e39b | ||
|
|
3ecea6ee6c | ||
|
|
540e434954 | ||
|
|
6754232a1d | ||
|
|
ad790f4ae9 | ||
|
|
05464bbf1c | ||
|
|
cbe22c259f | ||
|
|
976a071089 | ||
|
|
bb7407542f | ||
|
|
2f86701eea | ||
|
|
5b5388e51f | ||
|
|
02957d98fc | ||
|
|
e3126f3711 | ||
|
|
a04e68c1af | ||
|
|
d4515dfadd | ||
|
|
78de36964d | ||
|
|
dcf37b94db | ||
|
|
73764b027b | ||
|
|
6d621dc05f | ||
|
|
4d6c5501ae | ||
|
|
cd8d1e2ba8 | ||
|
|
4731772d38 | ||
|
|
bc9bb6862b | ||
|
|
4462bab4fa | ||
|
|
6d98c972d1 | ||
|
|
852abadf8f | ||
|
|
2a93f80827 | ||
|
|
a8aef1b97b | ||
|
|
3e5ba7d3ba |
5
.gitattributes
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
*.css linguist-language=java
|
||||||
|
*.less linguist-language=java
|
||||||
|
*.js linguist-language=java
|
||||||
|
*.html linguist-language=java
|
||||||
|
*.* linguist-language=java
|
||||||
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
blank_issues_enabled: false
|
||||||
|
contact_links:
|
||||||
|
- name: "Security Report / 安全漏洞报告"
|
||||||
|
url: "https://github.com/kekingcn/kkFileView/security/advisories/new"
|
||||||
|
about: "For sensitive security issues, please use private security report. / 涉及敏感安全问题请使用私密安全报告。"
|
||||||
76
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
name: "Feature Request / 功能建议"
|
||||||
|
description: "Propose a new feature with clear use case and acceptance criteria. / 提交功能建议,请明确场景与验收标准。"
|
||||||
|
title: "[FEATURE] "
|
||||||
|
labels: ["type/feature", "priority/p2", "status/needs-info"]
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Thanks for your idea! / 感谢你的建议!
|
||||||
|
|
||||||
|
Please provide concrete business scenarios and the expected behavior.
|
||||||
|
请尽量提供明确业务场景和期望行为,便于评估优先级与实现方案。
|
||||||
|
|
||||||
|
For urgent production issues, you can use our Knowledge Planet channel for faster processing:
|
||||||
|
https://wx.zsxq.com/group/48844125114258
|
||||||
|
如为线上紧急问题,可通过知识星球渠道加速处理:
|
||||||
|
https://wx.zsxq.com/group/48844125114258
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: background
|
||||||
|
attributes:
|
||||||
|
label: "Background / 背景"
|
||||||
|
description: "What problem are you trying to solve? / 你要解决什么问题?"
|
||||||
|
placeholder: "Describe current pain points... / 描述当前痛点..."
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: proposal
|
||||||
|
attributes:
|
||||||
|
label: "Proposal / 建议方案"
|
||||||
|
description: "What do you expect kkFileView to support? / 期望 kkFileView 支持什么?"
|
||||||
|
placeholder: "Describe expected feature behavior... / 描述期望功能行为..."
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: use_case
|
||||||
|
attributes:
|
||||||
|
label: "Use Case / 使用场景"
|
||||||
|
description: "Provide 1-3 concrete scenarios. / 提供 1-3 个具体场景"
|
||||||
|
placeholder: |
|
||||||
|
Scenario 1:
|
||||||
|
Scenario 2:
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: alternatives
|
||||||
|
attributes:
|
||||||
|
label: "Alternatives / 备选方案"
|
||||||
|
description: "What alternatives have you considered? / 是否考虑过替代方案?"
|
||||||
|
placeholder: "Existing workaround or alternative... / 当前替代做法..."
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: acceptance
|
||||||
|
attributes:
|
||||||
|
label: "Acceptance Criteria / 验收标准"
|
||||||
|
description: "How do we know this feature is done? / 如何判断该功能完成?"
|
||||||
|
placeholder: |
|
||||||
|
- [ ] Criterion 1
|
||||||
|
- [ ] Criterion 2
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: checkboxes
|
||||||
|
id: checklist
|
||||||
|
attributes:
|
||||||
|
label: "Checklist / 提交前检查"
|
||||||
|
options:
|
||||||
|
- label: "I have searched existing issues and did not find a duplicate feature request. / 我已搜索现有 issue,未发现重复功能建议"
|
||||||
|
required: true
|
||||||
|
- label: "I provided concrete use cases and expected behavior. / 我已提供具体使用场景和期望行为"
|
||||||
|
required: true
|
||||||
121
.github/ISSUE_TEMPLATE/issue-report.yml
vendored
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
name: "Issue Report / 问题反馈"
|
||||||
|
description: "Please provide complete required information to help us reproduce and follow up. / 请完整填写必填信息,便于复现与跟进。"
|
||||||
|
title: "[ISSUE] "
|
||||||
|
labels: ["status/needs-info"]
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Thanks for your report! / 感谢反馈!
|
||||||
|
|
||||||
|
**Please fill in all required fields.**
|
||||||
|
**请完整填写所有必填项。**
|
||||||
|
|
||||||
|
Incomplete issues may be closed and asked to resubmit.
|
||||||
|
信息不完整的问题可能会被关闭并要求重新提交。
|
||||||
|
|
||||||
|
For urgent production issues, you can use our Knowledge Planet channel for faster processing:
|
||||||
|
https://wx.zsxq.com/group/48844125114258
|
||||||
|
如为线上紧急问题,可通过知识星球渠道加速处理:
|
||||||
|
https://wx.zsxq.com/group/48844125114258
|
||||||
|
|
||||||
|
- type: dropdown
|
||||||
|
id: issue_type
|
||||||
|
attributes:
|
||||||
|
label: "Issue Type / 问题类型"
|
||||||
|
description: "Select the closest type. / 请选择最接近的问题类型"
|
||||||
|
options:
|
||||||
|
- "Bug / 缺陷"
|
||||||
|
- "Performance / 性能问题"
|
||||||
|
- "Security / 安全问题"
|
||||||
|
- "Question / 使用咨询"
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
id: kkfileview_version
|
||||||
|
attributes:
|
||||||
|
label: "kkFileView Version / kkFileView 版本"
|
||||||
|
placeholder: "e.g. 4.4.0"
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
id: deploy_mode
|
||||||
|
attributes:
|
||||||
|
label: "Deployment Mode / 部署方式"
|
||||||
|
description: "jar / docker / k8s / source, etc. / jar / docker / k8s / 源码部署等"
|
||||||
|
placeholder: "e.g. docker"
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: environment
|
||||||
|
attributes:
|
||||||
|
label: "Environment / 环境信息"
|
||||||
|
description: "OS, JDK, LibreOffice/OpenOffice, browser, reverse proxy, etc. / 操作系统、JDK、Office组件、浏览器、反向代理等"
|
||||||
|
placeholder: |
|
||||||
|
- OS:
|
||||||
|
- JDK:
|
||||||
|
- LibreOffice/OpenOffice:
|
||||||
|
- Browser:
|
||||||
|
- Proxy (Nginx/Ingress):
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: reproduce_steps
|
||||||
|
attributes:
|
||||||
|
label: "Steps to Reproduce / 复现步骤"
|
||||||
|
description: "Provide clear, minimal, reproducible steps. / 提供清晰、最小可复现步骤"
|
||||||
|
placeholder: |
|
||||||
|
1) ...
|
||||||
|
2) ...
|
||||||
|
3) ...
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: expected_result
|
||||||
|
attributes:
|
||||||
|
label: "Expected Result / 期望结果"
|
||||||
|
placeholder: "What should happen? / 期望实际应该出现什么结果?"
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: actual_result
|
||||||
|
attributes:
|
||||||
|
label: "Actual Result / 实际结果"
|
||||||
|
placeholder: "What happened instead? / 实际发生了什么?"
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: logs
|
||||||
|
attributes:
|
||||||
|
label: "Logs & Screenshots / 日志与截图"
|
||||||
|
description: "Paste key logs/error stack and attach screenshots (mask sensitive data). / 粘贴关键日志或异常堆栈,并上传截图(请脱敏)"
|
||||||
|
render: shell
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: sample_file
|
||||||
|
attributes:
|
||||||
|
label: "Sample File / 样例文件(可选)"
|
||||||
|
description: "If possible, provide a minimal sample file or reproducible URL (desensitized). / 如可提供,请附最小样例文件或可复现 URL(脱敏)"
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
|
||||||
|
- type: checkboxes
|
||||||
|
id: checklist
|
||||||
|
attributes:
|
||||||
|
label: "Checklist / 提交前检查"
|
||||||
|
options:
|
||||||
|
- label: "I have searched existing issues and did not find a duplicate. / 我已搜索现有 issue,未发现重复问题"
|
||||||
|
required: true
|
||||||
|
- label: "I can reproduce this issue on the stated version/environment. / 我可在上述版本与环境复现该问题"
|
||||||
|
required: true
|
||||||
|
- label: "I have masked sensitive information in logs/screenshots. / 我已对日志与截图中的敏感信息做脱敏处理"
|
||||||
|
required: true
|
||||||
117
.github/scripts/deploy_windows_winrm.py
vendored
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import base64
|
||||||
|
import os
|
||||||
|
import pathlib
|
||||||
|
import sys
|
||||||
|
import uuid
|
||||||
|
|
||||||
|
import winrm
|
||||||
|
|
||||||
|
|
||||||
|
def require_env(name: str) -> str:
|
||||||
|
value = os.getenv(name, "").strip()
|
||||||
|
if not value:
|
||||||
|
raise SystemExit(f"Missing required environment variable: {name}")
|
||||||
|
return value
|
||||||
|
|
||||||
|
|
||||||
|
def optional_env(name: str, default: str) -> str:
|
||||||
|
value = os.getenv(name, "").strip()
|
||||||
|
return value if value else default
|
||||||
|
|
||||||
|
|
||||||
|
def ps_quote(value: str) -> str:
|
||||||
|
return value.replace("'", "''")
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> int:
|
||||||
|
host = require_env("KK_DEPLOY_HOST")
|
||||||
|
port = optional_env("KK_DEPLOY_PORT", "5985")
|
||||||
|
username = require_env("KK_DEPLOY_USERNAME")
|
||||||
|
password = require_env("KK_DEPLOY_PASSWORD")
|
||||||
|
env_pairs = {
|
||||||
|
"KK_DEPLOY_ROOT": optional_env("KK_DEPLOY_ROOT", r"C:\kkFileView-5.0"),
|
||||||
|
"KK_DEPLOY_HEALTH_URL": optional_env("KK_DEPLOY_HEALTH_URL", "http://127.0.0.1:8012/"),
|
||||||
|
"KK_DEPLOY_REPO_URL": optional_env("KK_DEPLOY_REPO_URL", "https://github.com/kekingcn/kkFileView.git"),
|
||||||
|
"KK_DEPLOY_BRANCH": optional_env("KK_DEPLOY_BRANCH", "master"),
|
||||||
|
"KK_DEPLOY_SOURCE_ROOT": optional_env("KK_DEPLOY_SOURCE_ROOT", r"C:\kkFileView-source"),
|
||||||
|
"KK_DEPLOY_JAVA_HOME": optional_env("KK_DEPLOY_JAVA_HOME", r"C:\Program Files\jdk-21.0.2"),
|
||||||
|
"KK_DEPLOY_GIT_EXE": optional_env("KK_DEPLOY_GIT_EXE", r"C:\kkFileView-tools\git\cmd\git.exe"),
|
||||||
|
"KK_DEPLOY_MVN_CMD": optional_env("KK_DEPLOY_MVN_CMD", r"C:\kkFileView-tools\maven\bin\mvn.cmd"),
|
||||||
|
"KK_DEPLOY_MAVEN_SETTINGS": optional_env("KK_DEPLOY_MAVEN_SETTINGS", ""),
|
||||||
|
"KK_DEPLOY_DRY_RUN": optional_env("KK_DEPLOY_DRY_RUN", "false").lower(),
|
||||||
|
}
|
||||||
|
|
||||||
|
script_path = pathlib.Path(__file__).with_name("remote_windows_deploy.ps1")
|
||||||
|
script_body = script_path.read_text(encoding="utf-8")
|
||||||
|
payload = script_body.encode("utf-8-sig")
|
||||||
|
payload_b64 = base64.b64encode(payload).decode("ascii")
|
||||||
|
|
||||||
|
endpoint = f"http://{host}:{port}/wsman"
|
||||||
|
session = winrm.Session(endpoint, auth=(username, password), transport="ntlm")
|
||||||
|
|
||||||
|
suffix = uuid.uuid4().hex
|
||||||
|
remote_b64_path = fr"C:\Windows\Temp\kkfileview_deploy_{suffix}.b64"
|
||||||
|
remote_ps1_path = fr"C:\Windows\Temp\kkfileview_deploy_{suffix}.ps1"
|
||||||
|
|
||||||
|
prep = session.run_ps(
|
||||||
|
f"""
|
||||||
|
$ErrorActionPreference = 'Stop'
|
||||||
|
if (Test-Path '{ps_quote(remote_b64_path)}') {{ Remove-Item '{ps_quote(remote_b64_path)}' -Force }}
|
||||||
|
if (Test-Path '{ps_quote(remote_ps1_path)}') {{ Remove-Item '{ps_quote(remote_ps1_path)}' -Force }}
|
||||||
|
New-Item -ItemType File -Path '{ps_quote(remote_b64_path)}' -Force | Out-Null
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
if prep.status_code != 0:
|
||||||
|
sys.stderr.write(prep.std_err.decode("utf-8", errors="ignore"))
|
||||||
|
return prep.status_code
|
||||||
|
|
||||||
|
chunk_size = 1200
|
||||||
|
for start in range(0, len(payload_b64), chunk_size):
|
||||||
|
chunk = payload_b64[start : start + chunk_size]
|
||||||
|
append = session.run_ps(
|
||||||
|
f"Add-Content -LiteralPath '{ps_quote(remote_b64_path)}' -Value '{chunk}'"
|
||||||
|
)
|
||||||
|
if append.status_code != 0:
|
||||||
|
sys.stderr.write(append.std_err.decode("utf-8", errors="ignore"))
|
||||||
|
return append.status_code
|
||||||
|
|
||||||
|
result = session.run_ps(
|
||||||
|
f"""
|
||||||
|
$ErrorActionPreference = 'Stop'
|
||||||
|
$raw = Get-Content -LiteralPath '{ps_quote(remote_b64_path)}' -Raw
|
||||||
|
[System.IO.File]::WriteAllBytes('{ps_quote(remote_ps1_path)}', [Convert]::FromBase64String($raw))
|
||||||
|
try {{
|
||||||
|
"""
|
||||||
|
+ "\n".join(
|
||||||
|
f" $env:{key} = '{ps_quote(value)}'" for key, value in env_pairs.items()
|
||||||
|
)
|
||||||
|
+ f"""
|
||||||
|
powershell -NoProfile -ExecutionPolicy Bypass -File '{ps_quote(remote_ps1_path)}' `
|
||||||
|
$code = $LASTEXITCODE
|
||||||
|
}} finally {{
|
||||||
|
"""
|
||||||
|
+ "\n".join(
|
||||||
|
f" Remove-Item Env:{key} -ErrorAction SilentlyContinue" for key in env_pairs
|
||||||
|
)
|
||||||
|
+ f"""
|
||||||
|
Remove-Item '{ps_quote(remote_b64_path)}' -Force -ErrorAction SilentlyContinue
|
||||||
|
Remove-Item '{ps_quote(remote_ps1_path)}' -Force -ErrorAction SilentlyContinue
|
||||||
|
}}
|
||||||
|
exit $code
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
stdout = result.std_out.decode("utf-8", errors="ignore").strip()
|
||||||
|
stderr = result.std_err.decode("utf-8", errors="ignore").strip()
|
||||||
|
|
||||||
|
if stdout:
|
||||||
|
print(stdout)
|
||||||
|
if stderr:
|
||||||
|
print(stderr, file=sys.stderr)
|
||||||
|
|
||||||
|
return result.status_code
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
raise SystemExit(main())
|
||||||
327
.github/scripts/remote_windows_deploy.ps1
vendored
Normal file
@@ -0,0 +1,327 @@
|
|||||||
|
$ErrorActionPreference = 'Stop'
|
||||||
|
$ProgressPreference = 'SilentlyContinue'
|
||||||
|
|
||||||
|
function Write-Step {
|
||||||
|
param([string]$Message)
|
||||||
|
Write-Host "==> $Message"
|
||||||
|
}
|
||||||
|
|
||||||
|
function Get-RequiredEnv {
|
||||||
|
param([string]$Name)
|
||||||
|
|
||||||
|
$Value = [Environment]::GetEnvironmentVariable($Name)
|
||||||
|
if ([string]::IsNullOrWhiteSpace($Value)) {
|
||||||
|
throw "Missing required environment variable: $Name"
|
||||||
|
}
|
||||||
|
|
||||||
|
return $Value
|
||||||
|
}
|
||||||
|
|
||||||
|
function Get-OptionalEnv {
|
||||||
|
param(
|
||||||
|
[string]$Name,
|
||||||
|
[string]$DefaultValue
|
||||||
|
)
|
||||||
|
|
||||||
|
$Value = [Environment]::GetEnvironmentVariable($Name)
|
||||||
|
if ([string]::IsNullOrWhiteSpace($Value)) {
|
||||||
|
return $DefaultValue
|
||||||
|
}
|
||||||
|
|
||||||
|
return $Value
|
||||||
|
}
|
||||||
|
|
||||||
|
$DeployRoot = Get-OptionalEnv 'KK_DEPLOY_ROOT' 'C:\kkFileView-5.0'
|
||||||
|
$HealthUrl = Get-OptionalEnv 'KK_DEPLOY_HEALTH_URL' 'http://127.0.0.1:8012/'
|
||||||
|
$RepoUrl = Get-OptionalEnv 'KK_DEPLOY_REPO_URL' 'https://github.com/kekingcn/kkFileView.git'
|
||||||
|
$Branch = Get-OptionalEnv 'KK_DEPLOY_BRANCH' 'master'
|
||||||
|
$SourceRoot = Get-OptionalEnv 'KK_DEPLOY_SOURCE_ROOT' 'C:\kkFileView-source'
|
||||||
|
$JavaHome = Get-OptionalEnv 'KK_DEPLOY_JAVA_HOME' 'C:\Program Files\jdk-21.0.2'
|
||||||
|
$GitExe = Get-OptionalEnv 'KK_DEPLOY_GIT_EXE' 'C:\kkFileView-tools\git\cmd\git.exe'
|
||||||
|
$MvnCmd = Get-OptionalEnv 'KK_DEPLOY_MVN_CMD' 'C:\kkFileView-tools\maven\bin\mvn.cmd'
|
||||||
|
$MavenSettings = Get-OptionalEnv 'KK_DEPLOY_MAVEN_SETTINGS' ''
|
||||||
|
$DryRun = Get-OptionalEnv 'KK_DEPLOY_DRY_RUN' 'false'
|
||||||
|
|
||||||
|
$BinDir = Join-Path $DeployRoot 'bin'
|
||||||
|
$StartupScript = Join-Path $BinDir 'startup.bat'
|
||||||
|
$ReleaseDir = Join-Path $DeployRoot 'releases'
|
||||||
|
$DeployTmp = Join-Path $DeployRoot 'deploy-tmp'
|
||||||
|
$BuildOutputDir = Join-Path (Join-Path $SourceRoot 'server') 'target'
|
||||||
|
|
||||||
|
if (-not (Test-Path $DeployRoot)) {
|
||||||
|
throw "Deploy root not found: $DeployRoot"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-not (Test-Path $BinDir)) {
|
||||||
|
throw "Bin directory not found: $BinDir"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-not (Test-Path $StartupScript)) {
|
||||||
|
throw "Startup script not found: $StartupScript"
|
||||||
|
}
|
||||||
|
|
||||||
|
$CurrentJar = Get-ChildItem $BinDir -Filter 'kkFileView-*.jar' | Sort-Object LastWriteTime -Descending | Select-Object -First 1
|
||||||
|
if (-not $CurrentJar) {
|
||||||
|
throw "No kkFileView jar found in $BinDir"
|
||||||
|
}
|
||||||
|
|
||||||
|
$JavaExe = Join-Path $JavaHome 'bin\java.exe'
|
||||||
|
if (-not (Test-Path $JavaExe)) {
|
||||||
|
throw "JDK 21 java executable not found: $JavaExe"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-not (Test-Path $GitExe)) {
|
||||||
|
throw "Git executable not found: $GitExe"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-not (Test-Path $MvnCmd)) {
|
||||||
|
throw "Maven executable not found: $MvnCmd"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-not [string]::IsNullOrWhiteSpace($MavenSettings) -and -not (Test-Path $MavenSettings)) {
|
||||||
|
throw "Maven settings file not found: $MavenSettings"
|
||||||
|
}
|
||||||
|
|
||||||
|
$JarName = $CurrentJar.Name
|
||||||
|
$JarPath = $CurrentJar.FullName
|
||||||
|
|
||||||
|
Write-Step "Deploy root: $DeployRoot"
|
||||||
|
Write-Step "Current jar: $JarPath"
|
||||||
|
Write-Step "Startup script: $StartupScript"
|
||||||
|
Write-Step "Health url: $HealthUrl"
|
||||||
|
Write-Step "Source root: $SourceRoot"
|
||||||
|
Write-Step "Branch: $Branch"
|
||||||
|
Write-Step "Git exe: $GitExe"
|
||||||
|
Write-Step "Maven cmd: $MvnCmd"
|
||||||
|
Write-Step "Java home: $JavaHome"
|
||||||
|
if (-not [string]::IsNullOrWhiteSpace($MavenSettings)) {
|
||||||
|
Write-Step "Maven settings: $MavenSettings"
|
||||||
|
}
|
||||||
|
|
||||||
|
function Invoke-External {
|
||||||
|
param(
|
||||||
|
[string]$FilePath,
|
||||||
|
[string[]]$Arguments,
|
||||||
|
[string]$WorkingDirectory = $null
|
||||||
|
)
|
||||||
|
|
||||||
|
$previous = $null
|
||||||
|
if ($WorkingDirectory) {
|
||||||
|
$previous = Get-Location
|
||||||
|
Set-Location $WorkingDirectory
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
& $FilePath @Arguments
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
throw "Command failed ($LASTEXITCODE): $FilePath $($Arguments -join ' ')"
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
if ($previous) {
|
||||||
|
Set-Location $previous
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Assert-SafeSourceRoot {
|
||||||
|
param([string]$PathToCheck)
|
||||||
|
|
||||||
|
$FullPath = [System.IO.Path]::GetFullPath($PathToCheck)
|
||||||
|
$RootPath = [System.IO.Path]::GetPathRoot($FullPath)
|
||||||
|
if ($FullPath.TrimEnd('\') -eq $RootPath.TrimEnd('\')) {
|
||||||
|
throw "Refusing to use drive root as source root: $FullPath"
|
||||||
|
}
|
||||||
|
|
||||||
|
$DangerousLeafNames = @(
|
||||||
|
'Windows',
|
||||||
|
'Users',
|
||||||
|
'Program Files',
|
||||||
|
'Program Files (x86)',
|
||||||
|
'ProgramData'
|
||||||
|
)
|
||||||
|
$LeafName = Split-Path -Leaf $FullPath.TrimEnd('\')
|
||||||
|
if ($DangerousLeafNames -contains $LeafName) {
|
||||||
|
throw "Refusing to use a high-risk source root path: $FullPath"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$env:JAVA_HOME = $JavaHome
|
||||||
|
$env:Path = (Join-Path $JavaHome 'bin') + ';' + (Split-Path -Parent $GitExe) + ';' + (Split-Path -Parent $MvnCmd) + ';' + $env:Path
|
||||||
|
|
||||||
|
Write-Step 'Validating Git executable'
|
||||||
|
Invoke-External -FilePath $GitExe -Arguments @('--version')
|
||||||
|
|
||||||
|
Write-Step 'Validating Maven executable'
|
||||||
|
$MavenVersionArgs = @('-version')
|
||||||
|
if (-not [string]::IsNullOrWhiteSpace($MavenSettings)) {
|
||||||
|
$MavenVersionArgs = @('-s', $MavenSettings, '-version')
|
||||||
|
}
|
||||||
|
Invoke-External -FilePath $MvnCmd -Arguments $MavenVersionArgs
|
||||||
|
|
||||||
|
if ($DryRun -eq 'true') {
|
||||||
|
Write-Step "Dry run enabled, remote validation finished"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
New-Item -ItemType Directory -Force -Path $ReleaseDir | Out-Null
|
||||||
|
New-Item -ItemType Directory -Force -Path $DeployTmp | Out-Null
|
||||||
|
|
||||||
|
function Sync-Repository {
|
||||||
|
Assert-SafeSourceRoot -PathToCheck $SourceRoot
|
||||||
|
|
||||||
|
if (-not (Test-Path (Join-Path $SourceRoot '.git'))) {
|
||||||
|
if (Test-Path $SourceRoot) {
|
||||||
|
Remove-Item $SourceRoot -Recurse -Force
|
||||||
|
}
|
||||||
|
|
||||||
|
$parent = Split-Path -Parent $SourceRoot
|
||||||
|
if ($parent) {
|
||||||
|
New-Item -ItemType Directory -Force -Path $parent | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Step "Cloning repository from $RepoUrl"
|
||||||
|
Invoke-External -FilePath $GitExe -Arguments @('clone', '--depth', '1', '--branch', $Branch, '--single-branch', $RepoUrl, $SourceRoot)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Step "Fetching latest branch state from origin/$Branch"
|
||||||
|
Invoke-External -FilePath $GitExe -Arguments @('remote', 'set-url', 'origin', $RepoUrl) -WorkingDirectory $SourceRoot
|
||||||
|
Invoke-External -FilePath $GitExe -Arguments @('fetch', '--prune', '--depth', '1', 'origin', $Branch) -WorkingDirectory $SourceRoot
|
||||||
|
Invoke-External -FilePath $GitExe -Arguments @('checkout', '-B', $Branch, "origin/$Branch") -WorkingDirectory $SourceRoot
|
||||||
|
Invoke-External -FilePath $GitExe -Arguments @('reset', '--hard', "origin/$Branch") -WorkingDirectory $SourceRoot
|
||||||
|
Invoke-External -FilePath $GitExe -Arguments @('clean', '-fd') -WorkingDirectory $SourceRoot
|
||||||
|
}
|
||||||
|
|
||||||
|
function Build-KkFileView {
|
||||||
|
Write-Step 'Building kkFileView from source'
|
||||||
|
$BuildArgs = @('-B', 'clean', 'package', '-Dmaven.test.skip=true', '--file', 'pom.xml')
|
||||||
|
if (-not [string]::IsNullOrWhiteSpace($MavenSettings)) {
|
||||||
|
$BuildArgs = @('-s', $MavenSettings) + $BuildArgs
|
||||||
|
}
|
||||||
|
Invoke-External -FilePath $MvnCmd -Arguments $BuildArgs -WorkingDirectory $SourceRoot
|
||||||
|
}
|
||||||
|
|
||||||
|
Sync-Repository
|
||||||
|
Build-KkFileView
|
||||||
|
|
||||||
|
$DownloadedJars = Get-ChildItem $BuildOutputDir -Filter 'kkFileView-*.jar' -File
|
||||||
|
if (-not $DownloadedJars) {
|
||||||
|
throw "No kkFileView jar found in build output: $BuildOutputDir"
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($DownloadedJars.Count -ne 1) {
|
||||||
|
throw "Expected exactly one kkFileView jar in build output, found $($DownloadedJars.Count)"
|
||||||
|
}
|
||||||
|
|
||||||
|
$DownloadedJar = $DownloadedJars[0]
|
||||||
|
|
||||||
|
$Timestamp = Get-Date -Format 'yyyyMMddHHmmss'
|
||||||
|
$BackupJar = Join-Path $ReleaseDir ("{0}.{1}.bak" -f $JarName, $Timestamp)
|
||||||
|
|
||||||
|
function Stop-KkFileView {
|
||||||
|
foreach ($Process in @(Get-KkFileViewJavaProcesses) + @(Get-KkFileViewLauncherProcesses)) {
|
||||||
|
Write-Step "Stopping process $($Process.ProcessId)"
|
||||||
|
Stop-Process -Id $Process.ProcessId -Force -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Get-KkFileViewJavaProcesses {
|
||||||
|
$JarPattern = [regex]::Escape($JarName)
|
||||||
|
return Get-CimInstance Win32_Process | Where-Object {
|
||||||
|
$_.Name -match '^java(\.exe)?$' -and $_.CommandLine -and $_.CommandLine -match $JarPattern
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Get-KkFileViewLauncherProcesses {
|
||||||
|
$StartupPattern = [regex]::Escape([System.IO.Path]::GetFileName($StartupScript))
|
||||||
|
return Get-CimInstance Win32_Process | Where-Object {
|
||||||
|
$_.Name -ieq 'cmd.exe' -and $_.CommandLine -and $_.CommandLine -match $StartupPattern
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Wait-KkFileViewStopped {
|
||||||
|
param([int]$TimeoutSeconds = 30)
|
||||||
|
|
||||||
|
for ($i = 0; $i -lt $TimeoutSeconds; $i++) {
|
||||||
|
$JavaProcesses = @(Get-KkFileViewJavaProcesses)
|
||||||
|
$CmdProcesses = @(Get-KkFileViewLauncherProcesses)
|
||||||
|
if ((@($JavaProcesses).Count + @($CmdProcesses).Count) -eq 0) {
|
||||||
|
return $true
|
||||||
|
}
|
||||||
|
|
||||||
|
Start-Sleep -Seconds 1
|
||||||
|
}
|
||||||
|
|
||||||
|
return $false
|
||||||
|
}
|
||||||
|
|
||||||
|
function Start-KkFileView {
|
||||||
|
Write-Step "Starting kkFileView"
|
||||||
|
$CreateResult = Invoke-CimMethod -ClassName Win32_Process -MethodName Create -Arguments @{
|
||||||
|
CommandLine = ('cmd.exe /c ""' + $StartupScript + '""')
|
||||||
|
CurrentDirectory = $BinDir
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($CreateResult.ReturnValue -ne 0) {
|
||||||
|
throw "Failed to start kkFileView launcher, Win32_Process.Create returned $($CreateResult.ReturnValue)"
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Step "Launcher process created with pid $($CreateResult.ProcessId)"
|
||||||
|
}
|
||||||
|
|
||||||
|
function Wait-Health {
|
||||||
|
param([string]$Url)
|
||||||
|
|
||||||
|
$SuccessfulChecks = 0
|
||||||
|
for ($i = 0; $i -lt 24; $i++) {
|
||||||
|
Start-Sleep -Seconds 5
|
||||||
|
try {
|
||||||
|
$Response = Invoke-WebRequest -Uri $Url -UseBasicParsing -TimeoutSec 5
|
||||||
|
if ($Response.StatusCode -eq 200 -and @(Get-KkFileViewJavaProcesses).Count -gt 0) {
|
||||||
|
$SuccessfulChecks++
|
||||||
|
} else {
|
||||||
|
$SuccessfulChecks = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($SuccessfulChecks -ge 3) {
|
||||||
|
return $true
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
$SuccessfulChecks = 0
|
||||||
|
Start-Sleep -Milliseconds 200
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $false
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Step "Backing up current jar to $BackupJar"
|
||||||
|
Copy-Item $JarPath $BackupJar -Force
|
||||||
|
|
||||||
|
Stop-KkFileView
|
||||||
|
if (-not (Wait-KkFileViewStopped)) {
|
||||||
|
throw "Timed out waiting for the previous kkFileView process to exit"
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Step "Replacing jar with artifact output"
|
||||||
|
Copy-Item $DownloadedJar.FullName $JarPath -Force
|
||||||
|
|
||||||
|
Start-KkFileView
|
||||||
|
|
||||||
|
if (-not (Wait-Health -Url $HealthUrl)) {
|
||||||
|
Write-Step "Health check failed, rolling back"
|
||||||
|
Stop-KkFileView
|
||||||
|
if (-not (Wait-KkFileViewStopped)) {
|
||||||
|
throw "Timed out waiting for the failed kkFileView process to exit during rollback"
|
||||||
|
}
|
||||||
|
Copy-Item $BackupJar $JarPath -Force
|
||||||
|
Start-KkFileView
|
||||||
|
|
||||||
|
if (-not (Wait-Health -Url $HealthUrl)) {
|
||||||
|
throw "Deployment failed and rollback health check also failed"
|
||||||
|
}
|
||||||
|
|
||||||
|
throw "Deployment failed, rollback completed successfully"
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Step "Deployment completed successfully"
|
||||||
78
.github/workflows/auto-close-old-issues.yml
vendored
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
name: Auto Close Old Issues (1y)
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
# Daily at 02:20 UTC
|
||||||
|
- cron: '20 2 * * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
close_old_issues:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Close issues older than 1 year
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const owner = context.repo.owner;
|
||||||
|
const repo = context.repo.repo;
|
||||||
|
const now = new Date();
|
||||||
|
const cutoff = new Date(now.getTime() - 365 * 24 * 60 * 60 * 1000);
|
||||||
|
|
||||||
|
const closeComment = `该 Issue 已超过 1 年未活跃,为便于维护当前问题队列,先做关闭处理。\n\n如该问题在最新版本仍存在,欢迎直接 **Reopen** 本 Issue(或新建 Issue 并关联本单),并补充:\n1. 版本与部署方式\n2. 最小复现步骤\n3. 关键日志/截图(请脱敏)\n\n我们会优先跟进。`;
|
||||||
|
|
||||||
|
let page = 1;
|
||||||
|
let processed = 0;
|
||||||
|
while (true) {
|
||||||
|
const { data: issues } = await github.rest.issues.listForRepo({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
state: 'open',
|
||||||
|
per_page: 100,
|
||||||
|
page,
|
||||||
|
sort: 'created',
|
||||||
|
direction: 'asc'
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!issues.length) break;
|
||||||
|
|
||||||
|
for (const issue of issues) {
|
||||||
|
// skip pull requests
|
||||||
|
if (issue.pull_request) continue;
|
||||||
|
|
||||||
|
const createdAt = new Date(issue.created_at);
|
||||||
|
if (createdAt > cutoff) {
|
||||||
|
// list is sorted asc by created time; remaining items are newer
|
||||||
|
core.info('Reached issues newer than cutoff, stop scanning.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
await github.rest.issues.createComment({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
issue_number: issue.number,
|
||||||
|
body: closeComment,
|
||||||
|
});
|
||||||
|
|
||||||
|
await github.rest.issues.update({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
issue_number: issue.number,
|
||||||
|
state: 'closed',
|
||||||
|
});
|
||||||
|
|
||||||
|
processed += 1;
|
||||||
|
core.info(`Closed #${issue.number}`);
|
||||||
|
} catch (e) {
|
||||||
|
core.warning(`Failed to close #${issue.number}: ${e.message}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
page += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
core.info(`Done. Closed ${processed} old issues.`);
|
||||||
34
.github/workflows/copilot-issue-auto-comment.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
name: Copilot Issue Auto Comment
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: [opened]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
copilot_auto_comment:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Ask Copilot to triage issue automatically
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const issue = context.payload.issue;
|
||||||
|
if (!issue) return;
|
||||||
|
|
||||||
|
const owner = context.repo.owner;
|
||||||
|
const repo = context.repo.repo;
|
||||||
|
|
||||||
|
const body = `@Copilot 请自动分诊并直接给出可执行建议(无需人工先介入):\n\n- 先判断类型:Bug / Performance / Security / Question / Feature\n- 检查 Issue 信息是否完整(版本、部署方式、复现步骤、日志)\n- 若信息不完整:请直接按模板列出缺失项并引导补充\n- 若信息较完整:请给出下一步排查建议与最小复现建议\n- 若判断为已知问题或已修复:请给出对应版本/修复方向\n\nIssue #${issue.number}\n标题:${issue.title}\n链接:${issue.html_url}\n\n---\n\n补充说明 / Support Notice:\n- GitHub Issues 会持续跟进处理 / We will continue to follow up through GitHub Issues.\n- 如为线上紧急问题,可通过知识星球渠道加速处理 / For urgent production issues, you can use our Knowledge Planet channel for faster processing:\n https://wx.zsxq.com/group/48844125114258`;
|
||||||
|
|
||||||
|
await github.rest.issues.createComment({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
issue_number: issue.number,
|
||||||
|
body,
|
||||||
|
});
|
||||||
|
|
||||||
|
core.info(`Copilot prompt comment posted to #${issue.number}`);
|
||||||
91
.github/workflows/manual-release-docker-packages.yml
vendored
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
name: Manual Release Docker Packages
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- ops/release-v5.0.0-docker
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-docker-archives:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up JDK 21
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
java-version: '21'
|
||||||
|
distribution: 'temurin'
|
||||||
|
cache: 'maven'
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Build server package
|
||||||
|
run: mvn -B -pl server -DskipTests package
|
||||||
|
|
||||||
|
- name: Prepare release Dockerfile
|
||||||
|
run: |
|
||||||
|
cat > Dockerfile.release <<'EOF'
|
||||||
|
FROM ubuntu:24.04
|
||||||
|
|
||||||
|
RUN sed -i 's@//.*archive.ubuntu.com@//mirrors.aliyun.com@g' /etc/apt/sources.list.d/ubuntu.sources && \
|
||||||
|
sed -i 's@//security.ubuntu.com@//mirrors.aliyun.com@g' /etc/apt/sources.list.d/ubuntu.sources && \
|
||||||
|
sed -i 's@//ports.ubuntu.com@//mirrors.aliyun.com@g' /etc/apt/sources.list.d/ubuntu.sources && \
|
||||||
|
apt-get update && \
|
||||||
|
export DEBIAN_FRONTEND=noninteractive && \
|
||||||
|
apt-get install -y --no-install-recommends openjdk-21-jre tzdata locales xfonts-utils fontconfig libreoffice-nogui && \
|
||||||
|
echo 'Asia/Shanghai' > /etc/timezone && \
|
||||||
|
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
|
||||||
|
localedef -i zh_CN -c -f UTF-8 -A /usr/share/locale/locale.alias zh_CN.UTF-8 && \
|
||||||
|
locale-gen zh_CN.UTF-8 && \
|
||||||
|
apt-get install -y --no-install-recommends ttf-mscorefonts-installer && \
|
||||||
|
apt-get install -y --no-install-recommends ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy && \
|
||||||
|
apt-get autoremove -y && \
|
||||||
|
apt-get clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
COPY docker/kkfileview-base/fonts/ /usr/share/fonts/chinese/
|
||||||
|
|
||||||
|
RUN cd /usr/share/fonts/chinese && \
|
||||||
|
mkfontscale && \
|
||||||
|
mkfontdir && \
|
||||||
|
fc-cache -fv
|
||||||
|
|
||||||
|
ENV LANG=zh_CN.UTF-8 LC_ALL=zh_CN.UTF-8
|
||||||
|
ADD server/target/kkFileView-*.tar.gz /opt/
|
||||||
|
ENV KKFILEVIEW_BIN_FOLDER=/opt/kkFileView-5.0.0/bin
|
||||||
|
ENTRYPOINT ["java","-Dfile.encoding=UTF-8","-Dspring.config.location=/opt/kkFileView-5.0.0/config/application.properties","-jar","/opt/kkFileView-5.0.0/bin/kkFileView-5.0.0.jar"]
|
||||||
|
EOF
|
||||||
|
|
||||||
|
- name: Build amd64 docker archive
|
||||||
|
run: |
|
||||||
|
mkdir -p dist
|
||||||
|
docker buildx build \
|
||||||
|
--platform linux/amd64 \
|
||||||
|
--provenance=false \
|
||||||
|
--output type=docker,dest=dist/kkFileView-5.0.0-docker_x64.tar \
|
||||||
|
-f Dockerfile.release \
|
||||||
|
.
|
||||||
|
|
||||||
|
- name: Build arm64 docker archive
|
||||||
|
run: |
|
||||||
|
docker buildx build \
|
||||||
|
--platform linux/arm64 \
|
||||||
|
--provenance=false \
|
||||||
|
--output type=docker,dest=dist/kkFileView-5.0.0-docker_aarch64.tar \
|
||||||
|
-f Dockerfile.release \
|
||||||
|
.
|
||||||
|
|
||||||
|
- name: Upload docker archives
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: kkfileview-docker-release
|
||||||
|
path: dist/kkFileView-5.0.0-docker_*.tar
|
||||||
|
retention-days: 7
|
||||||
52
.github/workflows/master-auto-deploy.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
name: Master Auto Deploy
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: master-auto-deploy-production
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy-windows:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
env:
|
||||||
|
KK_DEPLOY_HOST: ${{ secrets.KK_DEPLOY_HOST }}
|
||||||
|
KK_DEPLOY_PORT: ${{ secrets.KK_DEPLOY_PORT }}
|
||||||
|
KK_DEPLOY_USERNAME: ${{ secrets.KK_DEPLOY_USERNAME }}
|
||||||
|
KK_DEPLOY_PASSWORD: ${{ secrets.KK_DEPLOY_PASSWORD }}
|
||||||
|
KK_DEPLOY_ROOT: ${{ secrets.KK_DEPLOY_ROOT }}
|
||||||
|
KK_DEPLOY_HEALTH_URL: ${{ secrets.KK_DEPLOY_HEALTH_URL }}
|
||||||
|
KK_DEPLOY_REPO_URL: ${{ vars.KK_DEPLOY_REPO_URL }}
|
||||||
|
KK_DEPLOY_BRANCH: ${{ vars.KK_DEPLOY_BRANCH }}
|
||||||
|
KK_DEPLOY_SOURCE_ROOT: ${{ vars.KK_DEPLOY_SOURCE_ROOT }}
|
||||||
|
KK_DEPLOY_JAVA_HOME: ${{ vars.KK_DEPLOY_JAVA_HOME }}
|
||||||
|
KK_DEPLOY_GIT_EXE: ${{ vars.KK_DEPLOY_GIT_EXE }}
|
||||||
|
KK_DEPLOY_MVN_CMD: ${{ vars.KK_DEPLOY_MVN_CMD }}
|
||||||
|
KK_DEPLOY_MAVEN_SETTINGS: ${{ vars.KK_DEPLOY_MAVEN_SETTINGS }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
|
||||||
|
- name: Install WinRM dependencies
|
||||||
|
run: pip install pywinrm
|
||||||
|
|
||||||
|
- name: Validate deploy secrets
|
||||||
|
run: |
|
||||||
|
test -n "$KK_DEPLOY_HOST" || (echo "Missing secret: KK_DEPLOY_HOST" && exit 1)
|
||||||
|
test -n "$KK_DEPLOY_USERNAME" || (echo "Missing secret: KK_DEPLOY_USERNAME" && exit 1)
|
||||||
|
test -n "$KK_DEPLOY_PASSWORD" || (echo "Missing secret: KK_DEPLOY_PASSWORD" && exit 1)
|
||||||
|
|
||||||
|
- name: Deploy to Windows server
|
||||||
|
run: python .github/scripts/deploy_windows_winrm.py
|
||||||
52
.github/workflows/maven.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
|
||||||
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
|
||||||
|
|
||||||
|
name: Java CI with Maven
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up JDK 21
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
java-version: '21'
|
||||||
|
distribution: 'temurin' # 使用 Eclipse Temurin (AdoptOpenJDK 的继任者)
|
||||||
|
cache: 'maven'
|
||||||
|
|
||||||
|
- name: Cache Maven packages
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.m2/repository
|
||||||
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-maven-
|
||||||
|
|
||||||
|
- name: Build with Maven
|
||||||
|
run: mvn -B package -Dmaven.test.skip=true --file pom.xml
|
||||||
|
|
||||||
|
- name: Upload Linux distribution package
|
||||||
|
if: success()
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: kkfileview-linux
|
||||||
|
path: server/target/*.tar.gz
|
||||||
|
retention-days: 7
|
||||||
|
|
||||||
|
- name: Upload Windows distribution package
|
||||||
|
if: success()
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: kkfileview-windows
|
||||||
|
path: server/target/*.zip
|
||||||
|
retention-days: 7
|
||||||
118
.github/workflows/nightly-e2e.yml
vendored
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
name: Nightly E2E Full
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '30 18 * * *' # 02:30 Asia/Shanghai
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
e2e-nightly:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 50
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup JDK 21
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: '21'
|
||||||
|
cache: maven
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: tests/e2e/package-lock.json
|
||||||
|
|
||||||
|
- name: Setup Python 3.11
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
|
||||||
|
- name: Install LibreOffice + archive tools
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y libreoffice zip p7zip-full
|
||||||
|
|
||||||
|
- name: Setup Python deps for office fixtures
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install -r tests/e2e/requirements.txt
|
||||||
|
|
||||||
|
- name: Build kkFileView
|
||||||
|
run: mvn -q -pl server -DskipTests package
|
||||||
|
|
||||||
|
- name: Install E2E deps
|
||||||
|
working-directory: tests/e2e
|
||||||
|
run: |
|
||||||
|
npm ci
|
||||||
|
npx playwright install --with-deps chromium
|
||||||
|
|
||||||
|
- name: Start fixture server
|
||||||
|
run: |
|
||||||
|
cd tests/e2e/fixtures
|
||||||
|
python3 -m http.server 18080 > /tmp/fixture-server.log 2>&1 &
|
||||||
|
|
||||||
|
- name: Start kkFileView
|
||||||
|
run: |
|
||||||
|
JAR_PATH=$(ls server/target/kkFileView-*.jar | head -n 1)
|
||||||
|
nohup env KK_TRUST_HOST='*' KK_NOT_TRUST_HOST='10.*,172.16.*,192.168.*' java -jar "$JAR_PATH" > /tmp/kkfileview.log 2>&1 &
|
||||||
|
|
||||||
|
- name: Wait for services
|
||||||
|
run: |
|
||||||
|
fixture_ready=false
|
||||||
|
for i in {1..60}; do
|
||||||
|
if curl -fsS http://127.0.0.1:18080/sample.txt >/dev/null; then
|
||||||
|
fixture_ready=true
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
if [ "$fixture_ready" != "true" ]; then
|
||||||
|
echo "Error: fixture server did not become ready within 60 seconds." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
kkfileview_ready=false
|
||||||
|
for i in {1..120}; do
|
||||||
|
if curl -fsS http://127.0.0.1:8012/ >/dev/null; then
|
||||||
|
kkfileview_ready=true
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
if [ "$kkfileview_ready" != "true" ]; then
|
||||||
|
echo "Error: kkFileView service did not become ready within 120 seconds." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Run nightly E2E suites
|
||||||
|
working-directory: tests/e2e
|
||||||
|
env:
|
||||||
|
KK_BASE_URL: http://127.0.0.1:8012
|
||||||
|
FIXTURE_BASE_URL: http://127.0.0.1:18080
|
||||||
|
E2E_MAX_PREVIEW_MS: 20000
|
||||||
|
run: npm run test:ci
|
||||||
|
|
||||||
|
- name: Upload Playwright report
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: nightly-playwright-report
|
||||||
|
path: tests/e2e/playwright-report
|
||||||
|
|
||||||
|
- name: Upload service logs
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: nightly-e2e-service-logs
|
||||||
|
path: |
|
||||||
|
/tmp/kkfileview.log
|
||||||
|
/tmp/fixture-server.log
|
||||||
100
.github/workflows/pr-e2e-mvp.yml
vendored
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
name: PR E2E MVP
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [master]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
e2e-mvp:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 40
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup JDK 21
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: '21'
|
||||||
|
cache: maven
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: tests/e2e/package-lock.json
|
||||||
|
|
||||||
|
- name: Setup Python 3.11
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
|
||||||
|
- name: Install LibreOffice + archive tools
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y libreoffice zip p7zip-full
|
||||||
|
|
||||||
|
- name: Setup Python deps for office fixtures
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install -r tests/e2e/requirements.txt
|
||||||
|
|
||||||
|
- name: Build kkFileView
|
||||||
|
run: mvn -q -pl server -DskipTests package
|
||||||
|
|
||||||
|
- name: Install E2E deps
|
||||||
|
working-directory: tests/e2e
|
||||||
|
run: |
|
||||||
|
npm install
|
||||||
|
npx playwright install --with-deps chromium
|
||||||
|
|
||||||
|
- name: Start fixture server
|
||||||
|
run: |
|
||||||
|
cd tests/e2e/fixtures
|
||||||
|
python3 -m http.server 18080 > /tmp/fixture-server.log 2>&1 &
|
||||||
|
|
||||||
|
- name: Start kkFileView
|
||||||
|
run: |
|
||||||
|
JAR_PATH=$(ls server/target/kkFileView-*.jar | head -n 1)
|
||||||
|
nohup env KK_TRUST_HOST='*' KK_NOT_TRUST_HOST='10.*,172.16.*,192.168.*' java -jar "$JAR_PATH" > /tmp/kkfileview.log 2>&1 &
|
||||||
|
|
||||||
|
- name: Wait for services
|
||||||
|
run: |
|
||||||
|
for i in {1..60}; do
|
||||||
|
curl -fsS http://127.0.0.1:18080/sample.txt >/dev/null && break
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
for i in {1..120}; do
|
||||||
|
curl -fsS http://127.0.0.1:8012/ >/dev/null && break
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: Run E2E
|
||||||
|
working-directory: tests/e2e
|
||||||
|
env:
|
||||||
|
KK_BASE_URL: http://127.0.0.1:8012
|
||||||
|
FIXTURE_BASE_URL: http://127.0.0.1:18080
|
||||||
|
run: npm test
|
||||||
|
|
||||||
|
- name: Upload Playwright report
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: playwright-report
|
||||||
|
path: tests/e2e/playwright-report
|
||||||
|
|
||||||
|
- name: Upload service logs
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: e2e-service-logs
|
||||||
|
path: |
|
||||||
|
/tmp/kkfileview.log
|
||||||
|
/tmp/fixture-server.log
|
||||||
23
.gitignore
vendored
@@ -17,25 +17,16 @@ target/
|
|||||||
|
|
||||||
### NetBeans ###
|
### NetBeans ###
|
||||||
nbproject/private/
|
nbproject/private/
|
||||||
build/
|
|
||||||
nbbuild/
|
nbbuild/
|
||||||
dist/
|
dist/
|
||||||
nbdist/
|
nbdist/
|
||||||
.nb-gradle/
|
.nb-gradle/
|
||||||
/*.iml
|
/*.iml
|
||||||
|
|
||||||
**/target/
|
### VS Code ###
|
||||||
.classpath
|
.vscode/
|
||||||
.project
|
.DS_Store
|
||||||
**/.settings
|
.artifacts/
|
||||||
**/bin/
|
|
||||||
**/build/
|
server/src/main/cache/
|
||||||
**/.externalToolBuilders/
|
server/src/main/file/
|
||||||
*.iml
|
|
||||||
**/.idea/
|
|
||||||
**/disconf
|
|
||||||
**/rpc.properties
|
|
||||||
/producer/tmp
|
|
||||||
/.temfile
|
|
||||||
.temfile
|
|
||||||
convertedFile/
|
|
||||||
|
|||||||
31
.workflow/MasterPipeline.yml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
version: '1.0'
|
||||||
|
name: master-pipeline
|
||||||
|
displayName: MasterPipeline
|
||||||
|
stages:
|
||||||
|
- stage:
|
||||||
|
name: compile
|
||||||
|
displayName: 编译
|
||||||
|
steps:
|
||||||
|
- step: build@maven
|
||||||
|
name: build_maven
|
||||||
|
displayName: Maven 构建
|
||||||
|
# 支持6、7、8、9、10、11六个版本
|
||||||
|
jdkVersion: 8
|
||||||
|
# 支持2.2.1、3.2.5、3.3.9、3.5.2、3.5.3、3.5.4、3.6.1、3.6.3八个版本
|
||||||
|
mavenVersion: 3.6.3
|
||||||
|
# 构建命令
|
||||||
|
commands:
|
||||||
|
- mvn -B clean package -Dmaven.test.skip=true
|
||||||
|
# 非必填字段,开启后表示将构建产物暂存,但不会上传到制品库中,7天后自动清除
|
||||||
|
artifacts:
|
||||||
|
# 构建产物名字,作为产物的唯一标识可向下传递,支持自定义,默认为BUILD_ARTIFACT。在下游可以通过${BUILD_ARTIFACT}方式引用来获取构建物地址
|
||||||
|
- name: BUILD_ARTIFACT
|
||||||
|
# 构建产物获取路径,是指代码编译完毕之后构建物的所在路径,如通常jar包在target目录下。当前目录为代码库根目录
|
||||||
|
path:
|
||||||
|
- ./server/target/kkFileView-*.tar.gz
|
||||||
|
- ./server/target/kkFileView-*.zip
|
||||||
|
triggers:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- master
|
||||||
230
AGENTS.md
Normal file
@@ -0,0 +1,230 @@
|
|||||||
|
# AGENTS.md
|
||||||
|
|
||||||
|
This document is for coding agents and automation tools working in this repository.
|
||||||
|
|
||||||
|
## Project Overview
|
||||||
|
|
||||||
|
- Project: `kkFileView`
|
||||||
|
- Stack: Spring Boot + Freemarker + Redis/Redisson (optional) + JODConverter + front-end preview pages
|
||||||
|
- Main module: `server`
|
||||||
|
- Default local URL: `http://127.0.0.1:8012/`
|
||||||
|
- Production demo: `https://file.kkview.cn/`
|
||||||
|
|
||||||
|
This repository is a document preview service. Most user-facing work falls into one of these areas:
|
||||||
|
|
||||||
|
1. preview routing and file-type dispatch
|
||||||
|
2. conversion pipelines for Office / PDF / CAD / archives / images
|
||||||
|
3. Freemarker preview templates under `server/src/main/resources/web`
|
||||||
|
4. CI, E2E fixtures, and production deployment automation
|
||||||
|
|
||||||
|
## Repository Layout
|
||||||
|
|
||||||
|
- `server/`
|
||||||
|
Main application code, templates, config, packaged artifacts
|
||||||
|
- `server/src/main/java/cn/keking/`
|
||||||
|
Core Java application code
|
||||||
|
- `server/src/main/resources/web/`
|
||||||
|
Freemarker preview templates
|
||||||
|
- `server/src/main/resources/static/`
|
||||||
|
Front-end static assets used by preview pages
|
||||||
|
- `server/src/main/config/`
|
||||||
|
Main runtime config files
|
||||||
|
- `server/src/main/bin/`
|
||||||
|
Local startup/dev scripts
|
||||||
|
- `tests/e2e/`
|
||||||
|
Playwright-based end-to-end tests and fixtures
|
||||||
|
- `.github/workflows/`
|
||||||
|
CI and deployment workflows
|
||||||
|
- `.github/scripts/`
|
||||||
|
Windows production deployment scripts over WinRM
|
||||||
|
|
||||||
|
## Key Entry Points
|
||||||
|
|
||||||
|
- App entry:
|
||||||
|
- `server/src/main/java/cn/keking/ServerMain.java`
|
||||||
|
- Preview controller:
|
||||||
|
- `server/src/main/java/cn/keking/web/controller/OnlinePreviewController.java`
|
||||||
|
- File attribute parsing / request handling:
|
||||||
|
- `server/src/main/java/cn/keking/service/FileHandlerService.java`
|
||||||
|
- Office preview flow:
|
||||||
|
- `server/src/main/java/cn/keking/service/impl/OfficeFilePreviewImpl.java`
|
||||||
|
- PDF preview flow:
|
||||||
|
- `server/src/main/java/cn/keking/service/impl/PdfFilePreviewImpl.java`
|
||||||
|
- Archive extraction:
|
||||||
|
- `server/src/main/java/cn/keking/service/CompressFileReader.java`
|
||||||
|
|
||||||
|
## Important Templates
|
||||||
|
|
||||||
|
- `server/src/main/resources/web/compress.ftl`
|
||||||
|
Archive directory/tree preview page
|
||||||
|
- `server/src/main/resources/web/pdf.ftl`
|
||||||
|
PDF preview container page
|
||||||
|
- `server/src/main/resources/web/picture.ftl`
|
||||||
|
Single image preview page
|
||||||
|
- `server/src/main/resources/web/officePicture.ftl`
|
||||||
|
Office/PDF image-mode preview page
|
||||||
|
- `server/src/main/resources/web/officeweb.ftl`
|
||||||
|
Front-end xlsx/html preview page
|
||||||
|
|
||||||
|
When debugging UX issues, inspect the exact template selected by the preview flow first. Do not assume two similar preview pages share the same CSS or behavior.
|
||||||
|
|
||||||
|
## Local Development
|
||||||
|
|
||||||
|
### Recommended dev mode
|
||||||
|
|
||||||
|
Use:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./server/src/main/bin/dev.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
This runs Spring Boot with resource hot reload using:
|
||||||
|
|
||||||
|
- `spring-boot:run`
|
||||||
|
- `-Dspring-boot.run.addResources=true`
|
||||||
|
- `server/src/main/config/application.properties`
|
||||||
|
|
||||||
|
For front-end template or CSS/JS edits, prefer `dev.sh` over rebuilding jars repeatedly.
|
||||||
|
|
||||||
|
### Jar build
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mvn -q -pl server -DskipTests package
|
||||||
|
```
|
||||||
|
|
||||||
|
### Main test command used in CI
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mvn -B package -Dmaven.test.skip=true --file pom.xml
|
||||||
|
```
|
||||||
|
|
||||||
|
## Configuration Notes
|
||||||
|
|
||||||
|
Primary runtime config used by the scripts and defaults committed in this repository:
|
||||||
|
|
||||||
|
- `server/src/main/config/application.properties`
|
||||||
|
|
||||||
|
Optional environment-specific config:
|
||||||
|
|
||||||
|
- `server/src/main/config/test.properties`
|
||||||
|
|
||||||
|
Be careful: the repository defaults point at `application.properties`. If a deployment environment explicitly starts the app with `test.properties`, treat that as an environment-specific override rather than the repository default. Always verify the actual startup command before assuming which config file is active.
|
||||||
|
|
||||||
|
Examples of config that commonly affects behavior:
|
||||||
|
|
||||||
|
- `office.preview.type`
|
||||||
|
- `office.preview.switch.disabled`
|
||||||
|
- `trust.host`
|
||||||
|
- `not.trust.host`
|
||||||
|
- `file.upload.disable`
|
||||||
|
|
||||||
|
## Preview Behavior Notes
|
||||||
|
|
||||||
|
- Office files can render in `pdf` mode or `image` mode.
|
||||||
|
- PDF preview uses `pdf.ftl`.
|
||||||
|
- Single images use `picture.ftl`.
|
||||||
|
- Office image-mode previews use `officePicture.ftl`.
|
||||||
|
- Archive previews are not simple file lists; they can load nested previews via the archive UI in `compress.ftl`.
|
||||||
|
|
||||||
|
When changing preview defaults, verify both:
|
||||||
|
|
||||||
|
1. server-side default config
|
||||||
|
2. front-end mode-switch links/buttons
|
||||||
|
|
||||||
|
## Archive Preview Notes
|
||||||
|
|
||||||
|
Archive preview is a sensitive area because it combines:
|
||||||
|
|
||||||
|
- directory tree generation
|
||||||
|
- extraction to disk
|
||||||
|
- nested preview URL construction
|
||||||
|
- inline iframe loading
|
||||||
|
|
||||||
|
If an archive-contained Office file gets stuck on loading:
|
||||||
|
|
||||||
|
1. verify the extracted file on disk is not corrupted
|
||||||
|
2. verify conversion output exists
|
||||||
|
3. verify the preview template points to the correct generated artifact
|
||||||
|
4. verify the running Office manager / LibreOffice process is healthy
|
||||||
|
|
||||||
|
Do not assume “loading forever” is a front-end issue.
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
|
||||||
|
### Targeted Java tests
|
||||||
|
|
||||||
|
Example targeted test:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mvn -q -pl server -Dtest=PdfViewerCompatibilityTests test
|
||||||
|
```
|
||||||
|
|
||||||
|
### E2E tests
|
||||||
|
|
||||||
|
See:
|
||||||
|
|
||||||
|
- `tests/e2e/README.md`
|
||||||
|
|
||||||
|
PR E2E currently covers:
|
||||||
|
|
||||||
|
- common preview smoke tests
|
||||||
|
- Office smoke tests
|
||||||
|
- archive smoke tests
|
||||||
|
- basic security and performance checks
|
||||||
|
|
||||||
|
## CI / Deployment
|
||||||
|
|
||||||
|
### CI
|
||||||
|
|
||||||
|
- `maven.yml`
|
||||||
|
- builds on `push` to `master`
|
||||||
|
- builds on PRs targeting `master`
|
||||||
|
- `pr-e2e-mvp.yml`
|
||||||
|
- runs E2E on PRs to `master`
|
||||||
|
|
||||||
|
### Production deployment
|
||||||
|
|
||||||
|
- `master-auto-deploy.yml`
|
||||||
|
- triggers on push to `master`
|
||||||
|
- deploys to Windows over WinRM
|
||||||
|
|
||||||
|
Deployment script:
|
||||||
|
|
||||||
|
- `.github/scripts/remote_windows_deploy.ps1`
|
||||||
|
|
||||||
|
Important operational detail:
|
||||||
|
|
||||||
|
- the committed `bin/startup.bat` in this repo points at `..\config\application.properties`
|
||||||
|
- if production uses a different config file, treat that as an out-of-repo server override rather than a repository default
|
||||||
|
|
||||||
|
If a production config change “does not take effect”, inspect the actual startup command or deployed `startup.bat` on the server first and verify which config file path it is using.
|
||||||
|
|
||||||
|
## Working Conventions For Agents
|
||||||
|
|
||||||
|
- Prefer minimal, targeted changes over wide refactors.
|
||||||
|
- Inspect the active preview template before editing CSS.
|
||||||
|
- Verify whether behavior is controlled by config, back-end routing, or front-end template logic before changing code.
|
||||||
|
- For production/debug tasks, distinguish clearly between:
|
||||||
|
- repository source defaults
|
||||||
|
- deployed server config
|
||||||
|
- runtime process arguments
|
||||||
|
- When changing defaults, mention whether the change affects:
|
||||||
|
- local dev only
|
||||||
|
- repository default config
|
||||||
|
- deployed server config
|
||||||
|
- existing query-param overrides
|
||||||
|
|
||||||
|
## Suggested Validation Checklist
|
||||||
|
|
||||||
|
For preview-related changes, validate as many of these as apply:
|
||||||
|
|
||||||
|
1. target URL returns `200`
|
||||||
|
2. selected template is the expected one
|
||||||
|
3. generated intermediate artifacts exist when required
|
||||||
|
4. target UI element or style change is actually present in rendered HTML
|
||||||
|
5. targeted Java test passes
|
||||||
|
6. relevant E2E path is still compatible
|
||||||
|
|
||||||
|
## Non-Goals
|
||||||
|
|
||||||
|
This file is not a replacement for user-facing product documentation. Keep it focused on helping coding agents navigate the codebase and make correct changes faster.
|
||||||
4
Dockerfile
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
FROM keking/kkfileview-base:5.0.0
|
||||||
|
ADD server/target/kkFileView-*.tar.gz /opt/
|
||||||
|
ENV KKFILEVIEW_BIN_FOLDER=/opt/kkFileView-5.0.0/bin
|
||||||
|
ENTRYPOINT ["java","-Dfile.encoding=UTF-8","-Dspring.config.location=/opt/kkFileView-5.0.0/config/application.properties","-jar","/opt/kkFileView-5.0.0/bin/kkFileView-5.0.0.jar"]
|
||||||
482
README.cn.md
Normal file
@@ -0,0 +1,482 @@
|
|||||||
|
# kkFileView
|
||||||
|
文档在线预览项目解决方案,项目使用流行的spring boot搭建,易上手和部署。万能的文件预览开源项目,基本支持主流文档格式预览,如:
|
||||||
|
1. 支持 doc, docx, xls, xlsx, xlsm, ppt, pptx, csv, tsv, dotm, xlt, xltm, dot, dotx,xlam, xla ,pages ,pptm 等 Office 办公文档
|
||||||
|
2. 支持 wps, dps, et, ett, wpt 等国产 WPS Office 办公文档
|
||||||
|
3. 支持 odt, ods, ots, odp, otp, six, ott, fodt, fods 等OpenOffice、LibreOffice 办公文档
|
||||||
|
4. 支持 vsd, vsdx 等 Visio 流程图文件
|
||||||
|
5. 支持 wmf, emf 等 Windows 系统图像文件
|
||||||
|
6. 支持 psd ,eps 等 Photoshop 软件模型文件
|
||||||
|
7. 支持 pdf ,ofd, rtf 等文档
|
||||||
|
8. 支持 xmind 软件模型文件
|
||||||
|
9. 支持 bpmn 工作流文件
|
||||||
|
10. 支持 eml, msg 邮件文件
|
||||||
|
11. 支持 epub 图书文档
|
||||||
|
12. 支持 obj, 3ds, stl, ply, gltf, glb, off, 3dm, fbx, dae, wrl, 3mf, ifc, brep, step, iges, fcstd, bim 等 3D 模型文件
|
||||||
|
13. 支持 dwg, dxf, dwf, iges , igs, dwt, dng, ifc, dwfx, stl, cf2, plt 等 CAD 模型文件
|
||||||
|
14. 支持 txt, xml(渲染), xbrl(渲染), md(渲染), java, php, py, js, css 等所有纯文本
|
||||||
|
15. 支持 zip, rar, jar, tar, gzip, 7z 等压缩包
|
||||||
|
16. 支持 jpg, jpeg, png, gif, bmp, ico, jfif, webp ,heic ,heif等图片预览(翻转,缩放,镜像)
|
||||||
|
17. 支持 tif, tiff 图信息模型文件
|
||||||
|
18. 支持 tga 图像格式文件
|
||||||
|
19. 支持 svg 矢量图像格式文件
|
||||||
|
20. 支持 mp3,wav,mp4,flv 等音视频格式文件
|
||||||
|
21. 支持 avi,mov,rm,webm,ts,rm,mkv,mpeg,ogg,mpg,rmvb,wmv,3gp,ts 等视频格式转码预览
|
||||||
|
22. 支持 dcm 等医疗数位影像预览
|
||||||
|
23. 支持 drawio 绘图预览
|
||||||
|
|
||||||
|
> 基于当前良好的架构模式,支持的文件类型在进一步丰富中
|
||||||
|
### 项目特性
|
||||||
|
|
||||||
|
- 使用 spring-boot 开发,预览服务搭建部署非常简便
|
||||||
|
- rest 接口提供服务,跨语言、跨平台特性(java,php,python,go,php,....)都支持,应用接入简单方便
|
||||||
|
- 抽象预览服务接口,方便二次开发,非常方便添加其他类型文件预览支持
|
||||||
|
- 最最重要 Apache 协议开源,代码 pull 下来想干嘛就干嘛
|
||||||
|
|
||||||
|
### 官网及文档
|
||||||
|
|
||||||
|
地址:[https://kkview.cn](https://kkview.cn/)
|
||||||
|
|
||||||
|
### 在线体验
|
||||||
|
> 请善待公共服务,会不定时停用
|
||||||
|
|
||||||
|
地址:[https://file.kkview.cn](https://file.kkview.cn)
|
||||||
|
|
||||||
|
### 项目文档(Project documentation)
|
||||||
|
1. 详细使用文档:https://kkview.cn/zh-cn/docs/home.html
|
||||||
|
|
||||||
|
### 联系我们,加入组织
|
||||||
|
> 我们会用心回答解决大家在项目使用中的问题,也请大家在提问前至少 Google 或 baidu 过,珍爱生命远离无效的交流沟通
|
||||||
|
|
||||||
|
<img src="./doc/gitee星球.png/" width="60%">
|
||||||
|
|
||||||
|
### 文档预览效果
|
||||||
|
#### 1. 文本预览
|
||||||
|
支持所有类型的文本文档预览, 由于文本文档类型过多,无法全部枚举,默认开启的类型如下 txt,html,htm,asp,jsp,xml,xbrl,json,properties,md,gitignore,log,java,py,c,cpp,sql,sh,bat,m,bas,prg,cmd
|
||||||
|
文本预览效果如下
|
||||||
|

|
||||||
|
|
||||||
|
#### 2. 图片预览
|
||||||
|
支持jpg,jpeg,png,gif等图片预览(翻转,缩放,镜像),预览效果如下
|
||||||
|

|
||||||
|
|
||||||
|
#### 3. word文档预览
|
||||||
|
支持doc,docx文档预览,word预览有两种模式:一种是每页word转为图片预览,另一种是整个word文档转成pdf,再预览pdf。两种模式的适用场景如下
|
||||||
|
* 图片预览:word文件大,前台加载整个pdf过慢
|
||||||
|
* pdf预览:内网访问,加载pdf快
|
||||||
|
图片预览模式预览效果如下
|
||||||
|

|
||||||
|
pdf预览模式预览效果如下
|
||||||
|

|
||||||
|
|
||||||
|
#### 4. ppt文档预览
|
||||||
|
支持ppt,pptx文档预览,和word文档一样,有两种预览模式
|
||||||
|
图片预览模式预览效果如下
|
||||||
|

|
||||||
|
pdf预览模式预览效果如下
|
||||||
|

|
||||||
|
|
||||||
|
#### 5. pdf文档预览
|
||||||
|
支持pdf文档预览,和word文档一样,有两种预览模式
|
||||||
|
图片预览模式预览效果如下
|
||||||
|

|
||||||
|
pdf预览模式预览效果如下
|
||||||
|

|
||||||
|
|
||||||
|
#### 6. excel文档预览
|
||||||
|
支持xls,xlsx文档预览,预览效果如下
|
||||||
|

|
||||||
|
|
||||||
|
#### 7. 压缩文件预览
|
||||||
|
支持zip,rar,jar,tar,gzip等压缩包,预览效果如下
|
||||||
|

|
||||||
|
可点击压缩包中的文件名,直接预览文件,预览效果如下
|
||||||
|

|
||||||
|
|
||||||
|
#### 8. 多媒体文件预览
|
||||||
|
理论上支持所有的视频、音频文件,由于无法枚举所有文件格式,默认开启的类型如下
|
||||||
|
mp3,wav,mp4,flv
|
||||||
|
视频预览效果如下
|
||||||
|

|
||||||
|
音频预览效果如下
|
||||||
|

|
||||||
|
|
||||||
|
#### 9. CAD文档预览
|
||||||
|
支持CAD dwg文档预览,和word文档一样,有两种预览模式
|
||||||
|
图片预览模式预览效果如下
|
||||||
|

|
||||||
|
pdf预览模式预览效果如下
|
||||||
|

|
||||||
|
|
||||||
|
#### 10. Excel文件纯前端渲染效果
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
#### 11. 流程图bpmn文件预览效果
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
#### 12. 3D模型文件预览效果:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
#### 13. dcm医疗数位影像文件预览效果:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
#### 14. drawio流程图预览效果:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
考虑说明篇幅原因,就不贴其他格式文件的预览效果了,感兴趣的可以参考下面的实例搭建下
|
||||||
|
|
||||||
|
### 快速开始
|
||||||
|
> 项目使用技术
|
||||||
|
- spring boot: [spring boot开发参考指南](http://www.kailing.pub/PdfReader/web/viewer.html?file=springboot)
|
||||||
|
- freemarker
|
||||||
|
- redisson
|
||||||
|
- jodconverter
|
||||||
|
|
||||||
|
> 依赖外部环境
|
||||||
|
- redis (可选,默认不用)
|
||||||
|
- OpenOffice 或者 LibreOffice( Windows 下已内置,Linux 脚本启动模式会自动安装,Mac OS 下需要手动安装)
|
||||||
|
|
||||||
|
1. 第一步:pull 项目 https://github.com/kekingcn/file-online-preview.git
|
||||||
|
|
||||||
|
3. 第二步:运行 ServerMain 的 main 方法,服务启动后,访问 http://localhost:8012/
|
||||||
|
会看到如下界面,代表服务启动成功
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### 历史更新记录
|
||||||
|
|
||||||
|
#### > 2026年04月14日,v5.0.0 版本发布 :
|
||||||
|
#### 优化内容
|
||||||
|
1. xlsx 前端解析优化 - 提升Excel文件前端渲染性能
|
||||||
|
2. 图片解析优化 - 改进图片处理机制
|
||||||
|
3. tif 解析优化 - 增强TIF格式支持
|
||||||
|
4. svg 解析优化 - 优化SVG矢量图渲染
|
||||||
|
5. json 解析优化 - 改进JSON文件处理
|
||||||
|
6. ftp多客户端接入优化 - 提升FTP服务兼容性
|
||||||
|
7. 首页目录访问优化 - 采用post服务端分页机制
|
||||||
|
8. marked 解析优化 - 改进Markdown渲染
|
||||||
|
9. 压缩包预览页重构为单工作区布局,支持目录折叠与右侧内嵌预览
|
||||||
|
10. 优化压缩包内文件类型标识,以及单图预览页的展示样式
|
||||||
|
11. 补充面向工程自动化与编码代理的仓库说明文档
|
||||||
|
12. 重构演示门户页面,包括首页、接入说明、版本记录与赞助页
|
||||||
|
|
||||||
|
#### 新增功能
|
||||||
|
1. msg邮件解析 - 新增msg格式邮件文件预览支持
|
||||||
|
2. heic图片解析 - 新增HEIC格式图片预览支持
|
||||||
|
3. 跨域方法 - 新增跨域处理机制
|
||||||
|
4. 高亮方法 - 新增文本高亮功能
|
||||||
|
5. 页码方法 - 新增文档页码控制
|
||||||
|
6. AES加密方法 - 新增AES加密支持
|
||||||
|
7. Basic鉴权方法 - 新增Basic认证机制
|
||||||
|
8. 秘钥方法 - 新增密钥管理功能
|
||||||
|
9. 防重复转换 - 新增重复文件转换防护
|
||||||
|
10. 异步等待 - 新增异步处理机制
|
||||||
|
11. 上传限制 - 新增不支持文件上传限制
|
||||||
|
12. cadviewer转换方法 - 新增CAD查看器转换功能
|
||||||
|
|
||||||
|
#### 修复问题
|
||||||
|
1. 压缩包路径问题 - 修复压缩包内部路径处理
|
||||||
|
2. 安全问题 - 修复安全漏洞
|
||||||
|
3. 图片水印不全问题 - 修复水印显示不完整
|
||||||
|
4. SSL自签证书接入问题 - 修复自签名证书兼容性
|
||||||
|
5. 修复压缩包内 Office 文件在重复解压后被追加写坏,导致一直卡在加载中的问题
|
||||||
|
6. Office 默认预览改为 PDF 模式,且 PDF 预览默认打开缩略图侧栏
|
||||||
|
7. 启动脚本改为自动发现当前发布包中的 jar,移除过时的硬编码 jar 名称
|
||||||
|
8. 更新 Docker 与发布辅助文档,使其与 5.0.0 发布线保持一致
|
||||||
|
9. 修复 OFD 表格竖线溢出导致的渲染异常
|
||||||
|
10. 修复 PDF.js 兼容性补丁,避免兼容环境下的预览报错
|
||||||
|
|
||||||
|
#### 更新内容
|
||||||
|
1. JDK版本要求 - 强制要求JDK 21及以上版本
|
||||||
|
2. pdf前端解析更新 - 升级PDF前端渲染组件
|
||||||
|
3. odf前端解析更新 - 升级ODF文档前端渲染
|
||||||
|
4. 3D模型前端解析更新 - 升级3D模型查看器
|
||||||
|
5. pdf后端异步转换优化 - 实现多线程异步转换
|
||||||
|
6. tif后端异步转换优化 - 实现多线程异步转换
|
||||||
|
7. 视频后端异步转换优化 - 实现多线程异步转换
|
||||||
|
8. CAD后端异步转换优化 - 实现多线程异步转换
|
||||||
|
9. 默认预览配置策略调整 - Office 预览默认切换为 PDF 模式,默认隐藏图片/PDF 模式切换按钮,且 PDF 预览默认展开缩略图侧栏。若升级后仍需保持旧的图片优先体验,请显式设置 `office.preview.type=image` 和 `office.preview.switch.disabled=false`。
|
||||||
|
10. 信任域名配置匹配策略扩展 - `trust.host` 及相关规则现已支持通配符和 CIDR 匹配,升级后如果你依赖域名/IP 模式匹配,需要重新检查白名单和黑名单的实际生效范围
|
||||||
|
|
||||||
|
#### > 2025年01月16日,v4.4.0 版本发布 :
|
||||||
|
|
||||||
|
### 新增功能
|
||||||
|
1. xlsx 新增支持打印功能
|
||||||
|
2. 配置文件新增启用 GZIP 压缩
|
||||||
|
3. CAD 格式新增支持转换成 SVG 和 TIF 格式,新增超时结束、线程管理
|
||||||
|
4. 新增删除文件使用验证码校验
|
||||||
|
5. 新增 xbrl 格式预览支持
|
||||||
|
6. PDF 预览新增控制签名、绘图、插图控制、搜索定位页码、定义显示内容等功能
|
||||||
|
7. 新增 CSV 格式前端解析支持
|
||||||
|
8. 新增 ARM64 下的 Docker 镜像支持
|
||||||
|
9. 新增 Office 预览支持转换超时属性设置功能
|
||||||
|
10. 新增预览文件 host 黑名单机制
|
||||||
|
|
||||||
|
### 优化
|
||||||
|
1. 优化 OFD 移动端预览 页面不自适应
|
||||||
|
2. 更新 xlsx 前端解析组件,加速解析速度
|
||||||
|
3. 升级 CAD 组件
|
||||||
|
4. office 功能调整,支持批注、转换页码限制、生成水印等功能
|
||||||
|
5. 升级 markdown 组件
|
||||||
|
6. 升级 dcm 解析组件
|
||||||
|
7. 升级 PDF.JS 解析组件
|
||||||
|
8. 更换视频播放插件为 ckplayer
|
||||||
|
9. tif 解析更加智能化,支持被修改的图片格式
|
||||||
|
10. 针对大小文本文件检测字符编码的正确率,处理并发隐患
|
||||||
|
11. 重构下载文件的代码,新增通用的文件服务器认证访问的设计
|
||||||
|
12. 更新 bootstrap 组件,并精简掉不需要的文件
|
||||||
|
13. 更新 epub 版本,优化 epub 显示效果
|
||||||
|
14. 解决定时清除缓存时,对于多媒体类型文件,只删除了磁盘缓存文件
|
||||||
|
15. 自动检测已安装 Office 组件,增加 LibreOffice 7.5 & 7.6 版本默认路径
|
||||||
|
16. 修改 drawio 默认为预览模式
|
||||||
|
17. 新增 PDF 线程管理、超时管理、内存缓存管理,更新 PDF 解析组件版本
|
||||||
|
18. 优化 Dockerfile,支持真正的跨平台构建镜像
|
||||||
|
|
||||||
|
### 修复
|
||||||
|
1. 修复 forceUpdatedCache 属性设置,但本地缓存文件不更新的问题
|
||||||
|
2. 修复 PDF 解密加密文件转换成功后后台报错的问题
|
||||||
|
3. 修复 BPMN 不支持跨域的问题
|
||||||
|
4. 修复压缩包二级反代特殊符号错误问题
|
||||||
|
5. 修复视频跨域配置导致视频无法预览的问题
|
||||||
|
6. 修复 TXT 文本类分页二次加载问题
|
||||||
|
7. 修复 Drawio 缺少 Base64 组件的问题
|
||||||
|
8. 修复 Markdown 被转义问题
|
||||||
|
9. 修复 EPUB 跨域报错问题
|
||||||
|
10. 修复 URL 特殊符号问题
|
||||||
|
11. 修复压缩包穿越漏洞
|
||||||
|
12. 修复压缩获取路径错误、图片合集路径错误、水印问题等 BUG
|
||||||
|
13. 修复前端解析 XLSX 包含 EMF 格式文件错误问题
|
||||||
|
|
||||||
|
#### > 2023年07月05日,v4.3.0 版本发布 :
|
||||||
|
|
||||||
|
#### 新增功能:
|
||||||
|
1. 新增dcm等医疗数位影像预
|
||||||
|
2. 新增drawio绘图预览
|
||||||
|
3. 新增开启缓存的情况下重新生成的命令 &forceUpdatedCache=true
|
||||||
|
4. 新增dwg CAD文件预览
|
||||||
|
5. 新增PDF文件支持密码功能
|
||||||
|
6. 新增PDF文件生成图片的dpi自定义配置
|
||||||
|
7. 新增删除转换后OFFICE、CAD、TIFF、压缩包源文件配置 默认开启 节约磁盘空间
|
||||||
|
8. 新增前端解析xlsx方法
|
||||||
|
9. 新增pages,eps, iges , igs, dwt, dng, ifc, dwfx, stl, cf2, plt等格式支持
|
||||||
|
|
||||||
|
#### 优化:
|
||||||
|
1. 调整生成的PDF文件 文件名称添加文件后缀 防止生成同名文件
|
||||||
|
2. 调整SQL文件预览方式
|
||||||
|
3. 优化OFD预览兼容性
|
||||||
|
4. 美化TXT文本 分页框的显示
|
||||||
|
5. 升级Linux、Docker版内置office为LibreOffice-7.5.3版本
|
||||||
|
6. 升级Windows版内置office为LibreOffice-7.5.3 Portable版本
|
||||||
|
7. 其他功能优化
|
||||||
|
|
||||||
|
#### 修复:
|
||||||
|
1. 修复反代情况下压缩包获取路径错误
|
||||||
|
2. 修复预览图片的url中如果包含&会导致.click报错
|
||||||
|
3. 修复OFD预览部分已知问题
|
||||||
|
4. 修复预览压缩包时,如果点击的是文件目录(树节点),页面会报错
|
||||||
|
5. 其他已知问题修复
|
||||||
|
|
||||||
|
#### > 2023年04月18日,v4.2.1 版本发布 :
|
||||||
|
|
||||||
|
#### 更新日志:
|
||||||
|
|
||||||
|
1. 修复 dwg 文件预览报空指针的 bug
|
||||||
|
|
||||||
|
#### > 2023年04月13日,v4.2.0 版本发布 :
|
||||||
|
|
||||||
|
#### 新增功能:
|
||||||
|
1. 新增 SVG 格式文件预览支持
|
||||||
|
2. 新增加密的 Office 文件预览支持
|
||||||
|
3. 新增加密的 zip、rar 等压缩包文件预览支持
|
||||||
|
4. 新增 xmind 软件模型文件预览支持
|
||||||
|
5. 新增 bpmn 工作流模型文件预览支持
|
||||||
|
6. 新增 eml 邮件文件预览支持
|
||||||
|
7. 新增 epub 电子书文件预览支持
|
||||||
|
8. 新增 dotm,ett,xlt,xltm,wpt,dot,xlam,xla,dotx 等格式的办公文档预览支持
|
||||||
|
9. 新增 obj, 3ds, stl, ply, gltf, glb, off, 3dm, fbx, dae, wrl, 3mf, ifc, brep, step, iges, fcstd, bim 等 3D 模型文件预览支持
|
||||||
|
10. 新增可配置限制高风险文件上传的功能,比如 exe 文件
|
||||||
|
11. 新增可配置站点的备案信息
|
||||||
|
12. 新增演示站点删除文件需要密码的功能
|
||||||
|
|
||||||
|
#### 优化:
|
||||||
|
1. 文本文档预览加入缓存
|
||||||
|
2. 美化 404、500 报错页
|
||||||
|
3. 优化发票等 ofd 文件预览的印证渲染兼容性
|
||||||
|
4. 移除 office-plugin 模块, 使用新版 jodconverter组件
|
||||||
|
5. 优化 Excel 文件的预览效果
|
||||||
|
6. 优化 CAD 文件的预览效果
|
||||||
|
7. 更新 xstream 、junrar、pdfbox 等依赖的版本
|
||||||
|
8. 更新 TIF 文件转换 PDF 的插件,添加转换缓存
|
||||||
|
9. 优化演示页 UI 部署
|
||||||
|
10. 压缩包文件预览支持目录
|
||||||
|
|
||||||
|
#### 修复:
|
||||||
|
1. 修复部分接口 XSS 问题
|
||||||
|
2. 修复控制台打印的演示地址不跟着 content-path 配置走的问题
|
||||||
|
3. 修复 ofd 文件预览跨域问题
|
||||||
|
4. 修复内部自签证书 https 协议 url 文件无法下载的问题
|
||||||
|
5. 修复特殊符号的文件无法删除的问题
|
||||||
|
6. 修复 PDF 转图片,内存无法回收导致的 OOM
|
||||||
|
7. 修复 xlsx7.4 以上版本文件预览乱码的问题
|
||||||
|
8. 修复 TrustHostFilter 未拦截跨域接口的问题,这是一个安全问题,有使用到 TrustHost 功能的务必升级
|
||||||
|
9. 修复压缩包文件预览在 Linux 系统下文件名乱码的问题
|
||||||
|
10. 修复 ofd 文件预览页码只能显示10页的问题
|
||||||
|
|
||||||
|
#### > 2022年12月14日,v4.1.0 版本发布 :
|
||||||
|
|
||||||
|
1. 全新首页视觉 @wsd7747
|
||||||
|
2. tif图片预览兼容多页tif的pdf转换、jpg转换,以及jpg在线多页预览功能 @zhangzhen1979
|
||||||
|
3. 优化docker构建方案,使用分层构建方式 @yl-yue
|
||||||
|
4. 实现基于userToken缓存加密文件 @yl-yue
|
||||||
|
5. 实现加密word、ppt、excel文件预览 @yl-yue
|
||||||
|
6. Linux & Docker镜像升级LibreOffice 7.3
|
||||||
|
7. 更新OFD预览组件、更新tif预览组件、更新PPT水印支持
|
||||||
|
8. 大量其他升级优化 & 已知问题修复
|
||||||
|
|
||||||
|
感谢 @yl-yue @wsd7747 @zhangzhen1979 @tomhusky @shenghuadun @kischn.sun 的代码贡献
|
||||||
|
|
||||||
|
#### > 2021年7月6日,v4.0.0 版本发布 :
|
||||||
|
|
||||||
|
1. 底层集成OpenOffice替换为LibreOffice,Office文件兼容性增强,预览效果提升
|
||||||
|
2. 修复压缩文件目录穿越漏洞
|
||||||
|
3. 修复PPT预览使用PDF模式无效
|
||||||
|
4. 修复PPT图片预览模式前端显示异常
|
||||||
|
5. 新增功能:首页文件上传功能可通过配置实时开启或禁用
|
||||||
|
6. 优化增加Office进程关闭日志
|
||||||
|
7. 优化Windows环境下,查找Office组件逻辑(内置的LibreOffice优先)
|
||||||
|
8. 优化启动Office进程改同步执行
|
||||||
|
|
||||||
|
#### > 2021年6月17日,v3.6.0 版本发布 :
|
||||||
|
|
||||||
|
ofd 类型文件支持版本,本次版本重要功能均由社区开发贡献,感谢 @gaoxingzaq、@zhangxiaoxiao9527 的代码贡献
|
||||||
|
1. 新增 ofd 类型文件预览支持,ofd 是国产的类似 pdf 格式的文件
|
||||||
|
2. 新增了 ffmpeg 视频文件转码预览支持,打开转码功能后,理论上支持所有主流视频的预览,如 rm、rmvb、flv 等
|
||||||
|
3. 美化了 ppt、pptx 类型文件预览效果,比之前版本好看太多
|
||||||
|
4. 更新了 pdfbox、xstream、common-io 等依赖的版本
|
||||||
|
|
||||||
|
#### > 2021年1月28日 :
|
||||||
|
|
||||||
|
2020农历年最后一个版本发布,主要包含了部分 UI 改进,和解决了 QQ 群友、 Issue 里反馈的 Bug 修复,最最重要的是发个新版,过个好年
|
||||||
|
|
||||||
|
1. 引入galimatias,解决不规范文件名导致文件下载异常
|
||||||
|
2. 更新index接入演示界面UI风格
|
||||||
|
3. 更新markdown文件预览UI风格
|
||||||
|
4. 更新XML文件预览UI风格,调整类文本预览架构,更方便扩展
|
||||||
|
5. 更新simTxT文件预览UI风格
|
||||||
|
6. 调整多图连续预览上下翻图的UI
|
||||||
|
7. 采用apache-common-io包简化所有的文件下载io操作
|
||||||
|
8. XML文件预览支持切换纯文本模式
|
||||||
|
9. 增强url base64解码失败时的提示信息
|
||||||
|
10. 修复导包错误以及图片预览 bug
|
||||||
|
11. 修复发行包运行时找不到日志目录的问题
|
||||||
|
12. 修复压缩包内多图连续预览的bug
|
||||||
|
13. 修复大小写文件类型后缀没通用匹配的问题
|
||||||
|
14. 指定Base64转码采用Apache Commons-code中的实现,修复base64部分jdk版本下出现的异常
|
||||||
|
15. 修复类文本类型HTML文件预览的bug
|
||||||
|
16. 修复:dwg文件预览时无法在jpg和pdf两种类型之间切换
|
||||||
|
17. escaping of dangerous characters to prevent reflected xss
|
||||||
|
18. 修复重复编码导致文档转图片预览失败的问题&编码规范
|
||||||
|
|
||||||
|
#### > 2020年12月27日 :
|
||||||
|
|
||||||
|
2020年年终大版本更新,架构全面设计,代码全面重构,代码质量全面提升,二次开发更便捷,欢迎拉源码品鉴,提issue、pr共同建设
|
||||||
|
|
||||||
|
1. 架构模块调整,大量的代码重构,代码质量提升N个等级,欢迎品鉴
|
||||||
|
2. 增强XML文件预览效果,新增XML文档数结构预览
|
||||||
|
3. 新增markdown文件预览支持,预览支持md渲染和源文本切换支持
|
||||||
|
4. 切换底层web server为jetty,解决这个issue:https://github.com/kekingcn/kkFileView/issues/168
|
||||||
|
5. 引入cpdetector,解决文件编码识别问题
|
||||||
|
6. url采用base64+urlencode双编码,彻底解决各种奇葩文件名预览问题
|
||||||
|
7. 新增配置项office.preview.switch.disabled,控制offic文件预览切换开关
|
||||||
|
8. 优化文本类型文件预览逻辑,采用Base64传输内容,避免预览时再次请求文件内容
|
||||||
|
9. office预览图片模式禁用图片放大效果,达到图片和pdf预览效果一致的体验
|
||||||
|
10. 直接代码静态设置pdfbox兼容低版本jdk,在IDEA中运行也不会有警告提示
|
||||||
|
11. 移除guava、hutool等非必须的工具包,减少代码体积
|
||||||
|
12. Office组件加载异步化,提速应用启动速度最快到5秒内
|
||||||
|
13. 合理设置预览消费队列的线程数
|
||||||
|
14. 修复压缩包里文件再次预览失败的bug
|
||||||
|
15. 修复图片预览的bug
|
||||||
|
|
||||||
|
#### > 2020年05月20日 :
|
||||||
|
1. 新增支持全局水印,并支持通过参数动态改变水印内容
|
||||||
|
2. 新增支持CAD文件预览
|
||||||
|
3. 新增base.url配置,支持使用nginx反向代理和使用context-path
|
||||||
|
4. 支持所有配置项支持从环境变量里读取,方便Docker镜像部署和集群中大规模使用
|
||||||
|
5. 支持配置限信任站点(只能预览来自信任点的文件源),保护预览服务不被滥用
|
||||||
|
6. 支持配置自定义缓存清理时间(cron表达式)
|
||||||
|
7. 全部能识别的纯文本直接预览,不用再转跳下载,如.md .java .py等
|
||||||
|
8. 支持配置限制转换后的PDF文件下载
|
||||||
|
9. 优化maven打包配置,解决 .sh 脚本可能出现换行符问题
|
||||||
|
10. 将前端所有CDN依赖放到本地,方便没有外网连接的用户使用
|
||||||
|
11. 首页评论服务由搜狐畅言切换到Gitalk
|
||||||
|
12. 修复url中包含特殊字符可能会引起的预览异常
|
||||||
|
13. 修复转换文件队列addTask异常
|
||||||
|
14. 修复其他已经问题
|
||||||
|
15. 官网建设:[https://kkview.cn](https://kkview.cn/)
|
||||||
|
16. 官方Docker镜像仓库建设:[https://hub.docker.com/r/keking/kkfileview](https://hub.docker.com/r/keking/kkfileview)
|
||||||
|
|
||||||
|
#### > 2019年06月18日 :
|
||||||
|
1. 支持自动清理缓存及预览文件
|
||||||
|
2. 支持http/https下载流url文件预览
|
||||||
|
3. 支持FTP url文件预览
|
||||||
|
4. 加入Docker构建
|
||||||
|
|
||||||
|
#### > 2019年04月08日 :
|
||||||
|
1. 缓存及队列实现抽象,提供JDK和REDIS两种实现(REDIS成为可选依赖)
|
||||||
|
2. 打包方式提供zip和tar.gz包,并提供一键启动脚本
|
||||||
|
|
||||||
|
#### > 2018年01月19日 :
|
||||||
|
|
||||||
|
1. 大文件入队提前处理
|
||||||
|
1. 新增addTask文件转换入队接口
|
||||||
|
1. 采用redis队列,支持kkFIleView接口和异构系统入队两种方式
|
||||||
|
|
||||||
|
#### > 2018年01月17日 :
|
||||||
|
|
||||||
|
1. 优化项目结构,抽象文件预览接口,更方便的加入更多的文件类型预览支持,方便二次开发
|
||||||
|
1. 新增英文文档说明(@幻幻Fate,@汝辉)贡献
|
||||||
|
1. 新增图片预览文件支持类型
|
||||||
|
1. 修复压缩包内轮播图片总是从第一张开始的问题
|
||||||
|
|
||||||
|
#### > 2018年01月12日 :
|
||||||
|
|
||||||
|
1. 新增多图片同时预览
|
||||||
|
1. 支持压缩包内图片轮番预览
|
||||||
|
|
||||||
|
#### > 2018年01月02日 :
|
||||||
|
|
||||||
|
1. 修复txt等文本编码问题导致预览乱码
|
||||||
|
1. 修复项目模块依赖引入不到的问题
|
||||||
|
1. 新增spring boot profile,支持多环境配置
|
||||||
|
1. 引入pdf.js预览doc等文件,支持doc标题生成pdf预览菜单,支持手机端预览
|
||||||
|
|
||||||
|
|
||||||
|
### 关于引用
|
||||||
|
ofd 引用于 [ofdview ](https://gitee.com/cnofd/ofdview ) 开源协议 Apache-2.0
|
||||||
|
CAD 引用于 aspose-cad 测试版本 商用请自行购买
|
||||||
|
xmind 引用于 [ xmind-embed-viewer](https://github.com/xmindltd/xmind-embed-viewer) 开源协议 MIT
|
||||||
|
epub 引用于 [ epub.js](https://github.com/futurepress/epub.js) 开源协议 BSD许可证
|
||||||
|
压缩包 引用于 [sevenzipjbinding](https://github.com/borisbrodski/sevenzipjbinding )开源协议LGPL
|
||||||
|
3D 引用于 [Online3DViewer](https://github.com/kovacsv/Online3DViewer )开源协议MIT
|
||||||
|
drawio 引用于 [drawio](https://github.com/jgraph/drawio )开源协议 Apache-2.0
|
||||||
|
bpmn流程图 引用于 [bpmn-js](https://github.com/bpmn-io/bpmn-js ) 自定义协议 保留水印 具体自行查看
|
||||||
|
dcm医疗数位影像 引用于 [dcmjs](https://github.com/dcmjs-org/dcmjs )开源协议MIT
|
||||||
|
|
||||||
|
### 使用登记
|
||||||
|
如果这个项目解决了你的实际问题,可在 https://gitee.com/kekingcn/file-online-preview/issues/IGSBV
|
||||||
|
登记下,如果节省了你的三方预览服务费用,也愿意支持下的话,可点击下方【捐助】请作者喝杯咖啡,也是非常感谢
|
||||||
|
|
||||||
|
### Stars
|
||||||
|
|
||||||
|
#### GitHub
|
||||||
|
|
||||||
|
[](https://starchart.cc/kekingcn/kkFileView)
|
||||||
|
|
||||||
|
### 鸣谢
|
||||||
|
- 本项目诞生于[凯京集团],在取得公司高层同意后以 Apache 协议开源出来反哺社区,在此特别感谢凯京集团,以及集团领导[@唐老大](https://github.com/tangshd)的支持、@端木详笑的贡献。
|
||||||
|
- 本项目已脱离公司由[KK开源社区]维护发展壮大,感谢所有给 kkFileView 提 Issue 、Pr 开发者
|
||||||
|
- 本项目引入的第三方组件已在 '关于引用' 列表列出,感谢这些项目,让 kkFileView 更出色
|
||||||
401
README.md
@@ -1,60 +1,371 @@
|
|||||||
# file-online-preview
|
# kkFileView
|
||||||
此项目为文件文档在线预览项目解决方案,对标业内付费产品有【[永中office](http://dcs.yozosoft.com/)】【[office365](http://www.officeweb365.com/)】【[idocv](https://www.idocv.com/)】等,在取得公司高层同意后以Apache协议开源出来反哺社区,在此特别感谢@唐老大的支持以及@端木详笑的贡献。该项目使用流行的spring boot搭建,易上手和部署,基本支持主流办公文档的在线预览,如doc,docx,Excel,pdf,txt,zip,rar,图片等等
|
|
||||||
### 在线体验
|
|
||||||
> 请善待公共服务,会不定时停用
|
|
||||||
|
|
||||||
地址:http://58.246.254.194:8012/
|
### Introduction
|
||||||
|
|
||||||
### 联系我们,加入组织
|
Document online preview project solution, built using the popular Spring Boot framework for easy setup and deployment. This versatile open source project provides basic support for a wide range of document formats, including:
|
||||||
> 我们会用心回答解决大家在项目使用中的问题,也请大家在提问前至少Google或baidu过,珍爱生命远离无效的交流沟通
|
|
||||||
|
|
||||||

|
1. Supports Office documents such as `doc`, `docx`, `xls`, `xlsx`, `xlsm`, `ppt`, `pptx`, `csv`, `tsv`, , `dotm`, `xlt`, `xltm`, `dot`, `xlam`, `dotx`, `xla,` ,`pages` ,`pptm` etc.
|
||||||
QQ群号:613025121
|
2. Supports domestic WPS Office documents such as `wps`, `dps`, `et` , `ett`, ` wpt`.
|
||||||
|
3. Supports OpenOffice, LibreOffice office documents such as `odt`, `ods`, `ots`, `odp`, `otp`, `six`, `ott`, `fodt` and `fods`.
|
||||||
|
4. Supports Visio flowchart files such as `vsd`, `vsdx`.
|
||||||
|
5. Supports Windows system image files such as `wmf`, `emf`.
|
||||||
|
6. Supports Photoshop software model files such as `psd` ,`eps`.
|
||||||
|
7. Supports document formats like `pdf`, `ofd`, and `rtf`.
|
||||||
|
8. Supports software model files like `xmind`.
|
||||||
|
9. Support for `bpmn` workflow files.
|
||||||
|
10. Support for `eml` , `msg` mail files
|
||||||
|
11. Support for `epub` book documents
|
||||||
|
12. Supports 3D model files like `obj`, `3ds`, `stl`, `ply`, `gltf`, `glb`, `off`, `3dm`, `fbx`, `dae`, `wrl`, `3mf`, `ifc`, `brep`, `step`, `iges`, `fcstd`, `bim`, etc.
|
||||||
|
13. Supports CAD model files such as `dwg`, `dxf`, `dwf` `iges` ,` igs`, `dwt` , `dng` , `ifc` , `dwfx` , `stl` , `cf2` , `plt`, etc.
|
||||||
|
14. Supports all plain text files such as `txt`, `xml` (rendering), `md` (rendering), `java`, `php`, `py`, `js`, `css`, etc.
|
||||||
|
15. Supports compressed packages such as `zip`, `rar`, `jar`, `tar`, `gzip`, `7z`, etc.
|
||||||
|
16. Supports image previewing (flip, zoom, mirror) of `jpg`, `jpeg`, `png`, `gif`, `bmp`, `ico`, `jfif`, `webp`, `heic`, ,`heif` etc.
|
||||||
|
17. Supports image information model files such as `tif` and `tiff`.
|
||||||
|
18. Supports image format files such as `tga`.
|
||||||
|
19. Supports vector image format files such as `svg`.
|
||||||
|
20. Supports `mp3`,`wav`,`mp4`,`flv` .
|
||||||
|
21. Supports many audio and video format files such as `avi`, `mov`, `wmv`, `mkv`, `3gp`, and `rm`.
|
||||||
|
22. Supports for `dcm` .
|
||||||
|
23. Supports for `drawio` .
|
||||||
|
|
||||||
### 文档预览效果
|
### Features
|
||||||
> Excel预览效果
|
- Build with the popular frame spring boot
|
||||||
|
- Easy to build and deploy
|
||||||
|
- Basically support online preview of mainstream office documents, such as Doc, docx, Excel, PDF, TXT, zip, rar, pictures, etc
|
||||||
|
- REST API
|
||||||
|
- Abstract file preview interface so that it is easy to extend more file extensions and develop this project on your own
|
||||||
|
|
||||||

|
### Official website and DOCS
|
||||||
> doc预览效果
|
|
||||||
|
|
||||||

|
URL:[https://kkview.cn](https://kkview.cn/)
|
||||||
|
|
||||||
> zip,rar压缩预览效果
|
### Live demo
|
||||||
|
> Please treat public service kindly, or this would stop at any time.
|
||||||
|
|
||||||

|
URL:[https://file.kkview.cn](https://file.kkview.cn)
|
||||||
|
|
||||||
> png,jpeg,jpg等图片预览效果,支持滚轮缩放,旋转,倒置等
|
### Contact Us
|
||||||
|
> We will answer your questions carefully and solve any problems you encounter while using the project. We also kindly ask that you at least Google or Baidu before asking questions in order to save time and avoid ineffective communication. Let's cherish our lives and stay away from ineffective communication.
|
||||||
|
|
||||||

|
<img src="./doc/github星球.png/" width="50%">
|
||||||
考虑说明篇幅原因,就不贴其他格式文件的预览效果了,感兴趣的可以参考下面的实例搭建下
|
|
||||||
|
|
||||||
### 快速开始
|
### Quick Start
|
||||||
> 项目使用技术
|
> Technology stack
|
||||||
- spring boot: [spring boot开发参考指南](http://www.kailing.pub/PdfReader/web/viewer.html?file=springboot)
|
- Spring boot: [spring boot Development Reference Guide](http://www.kailing.pub/PdfReader/web/viewer.html?file=springboot)
|
||||||
- freemarker
|
- Freemarker
|
||||||
- redisson
|
- Redisson
|
||||||
- jodconverter
|
- Jodconverter
|
||||||
> 依赖外部环境
|
> Dependencies
|
||||||
- redis
|
- Redis(Optional, Unnecessary by default)
|
||||||
- OpenOffice或者LibreOffice
|
- OpenOffice or LibreOffice(Integrated on Windows, will be installed automatically on Linux, need to be manually installed on Mac OS)
|
||||||
|
|
||||||
1. 第一步:pull项目https://github.com/kekingcn/file-online-preview.git
|
1. First step:`git pull https://github.com/kekingcn/kkFileView.git`
|
||||||
|
|
||||||
2. 第二步:配置redis地址和OpenOffice目录,如
|
2. second step:Run the main method of `/server/src/main/java/cn/keking/ServerMain.java`. After starting,visit `http://localhost:8012/`.
|
||||||
```
|
|
||||||
#=============================================#spring Redisson配置#===================================#
|
|
||||||
spring.redisson.address = 192.168.1.204:6379
|
|
||||||
##资源映射路径(因为jar方式运行的原因)
|
|
||||||
file.dir = C:\\Users\\yudian\\Desktop\\dev\\
|
|
||||||
## openoffice相关配置
|
|
||||||
office.home = C:\\Program Files (x86)\\OpenOffice 4
|
|
||||||
|
|
||||||
```
|
## Change History
|
||||||
file.dir为转换文件实际存储地址,注意要以/结尾
|
|
||||||
|
|
||||||
3. 第三步:运行FilePreviewApplication的main方法,服务启动后,访问http://localhost:8012/
|
### Version 5.0.0 (April 14, 2026)
|
||||||
会看到如下界面,代表服务启动成功
|
|
||||||

|
#### Improvements
|
||||||
### 使用登记
|
1. Enhanced xlsx front-end parsing - Improved Excel file front-end rendering performance
|
||||||
如果这个项目解决了你的实际问题,可在https://gitee.com/kekingcn/file-online-preview/issues/IGSBV
|
2. Optimized image parsing - Enhanced image processing mechanism
|
||||||
登记下,如果节省了你的三方预览服务费用,也愿意支持下的话,可点击下方【捐助】请作者喝杯咖啡,也是非常感谢
|
3. Improved tif parsing - Enhanced TIF format support
|
||||||
|
4. Enhanced svg parsing - Optimized SVG vector image rendering
|
||||||
|
5. Improved json parsing - Enhanced JSON file processing
|
||||||
|
6. Optimized ftp multi-client access - Improved FTP service compatibility
|
||||||
|
7. Enhanced home page directory access - Implemented post server-side pagination mechanism
|
||||||
|
8. Improved marked parsing - Enhanced Markdown rendering
|
||||||
|
9. Redesigned archive preview into a single workspace with a collapsible tree and inline file preview
|
||||||
|
10. Improved archive preview file-type badges and single-image preview styling
|
||||||
|
11. Added an agent-focused repository guide for engineering automation and maintenance
|
||||||
|
12. Refreshed the demo portal pages, including the index, integration guide, release record, and sponsor pages
|
||||||
|
|
||||||
|
#### New Features
|
||||||
|
1. msg email parsing - Added support for msg format email file preview
|
||||||
|
2. heic image parsing - Added support for HEIC format image preview
|
||||||
|
3. Cross-domain methods - Added cross-domain processing mechanism
|
||||||
|
4. Highlighting methods - Added text highlighting functionality
|
||||||
|
5. Pagination methods - Added document page control
|
||||||
|
6. AES encryption methods - Added AES encryption support
|
||||||
|
7. Basic authentication methods - Added Basic authentication mechanism
|
||||||
|
8. Key management methods - Added key management functionality
|
||||||
|
9. Anti-duplicate conversion - Added duplicate file conversion protection
|
||||||
|
10. Async waiting - Added asynchronous processing mechanism
|
||||||
|
11. Upload restrictions - Added restrictions for unsupported file uploads
|
||||||
|
12. cadviewer conversion methods - Added CAD viewer conversion functionality
|
||||||
|
|
||||||
|
#### Fixed Issues
|
||||||
|
1. Compressed file path issues - Fixed internal path handling in compressed files
|
||||||
|
2. Security issues - Fixed security vulnerabilities
|
||||||
|
3. Incomplete image watermark issues - Fixed incomplete watermark display
|
||||||
|
4. SSL self-signed certificate access issues - Fixed compatibility with self-signed certificates
|
||||||
|
5. Fixed archive-contained Office files that could stay stuck on loading because repeated extraction appended to existing files
|
||||||
|
6. Default Office preview now prefers PDF mode, and PDF preview opens with the thumbnail sidebar visible by default
|
||||||
|
7. Updated startup scripts to discover the packaged jar dynamically instead of relying on stale hard-coded jar names
|
||||||
|
8. Updated Docker and release helper docs to align with the 5.0.0 release line
|
||||||
|
9. Fixed OFD table border overflow rendering issues
|
||||||
|
10. Refined the PDF.js compatibility polyfill to avoid preview errors in compatibility environments
|
||||||
|
|
||||||
|
#### Updates
|
||||||
|
1. JDK version requirement - Mandatory requirement for JDK 21 or higher
|
||||||
|
2. pdf front-end parsing update - Upgraded PDF front-end rendering component
|
||||||
|
3. odf front-end parsing update - Upgraded ODF document front-end rendering
|
||||||
|
4. 3D model front-end parsing update - Upgraded 3D model viewer
|
||||||
|
5. pdf backend async conversion optimization - Implemented multi-threaded asynchronous conversion
|
||||||
|
6. tif backend async conversion optimization - Implemented multi-threaded asynchronous conversion
|
||||||
|
7. Video backend async conversion optimization - Implemented multi-threaded asynchronous conversion
|
||||||
|
8. CAD backend async conversion optimization - Implemented multi-threaded asynchronous conversion
|
||||||
|
9. Default preview configuration strategy adjusted - Office preview now defaults to PDF mode, the mode switch is hidden by default, and PDF preview opens with the thumbnail sidebar visible. If you need the previous image-first behavior after upgrade, explicitly set `office.preview.type=image` and `office.preview.switch.disabled=false`.
|
||||||
|
10. Trust host configuration matching expanded - `trust.host` and related rules now support wildcard and CIDR matching, which may broaden or narrow effective allow/deny behavior after upgrade depending on your patterns
|
||||||
|
|
||||||
|
### Version 4.4.0 (January 16, 2025)
|
||||||
|
|
||||||
|
#### New Features
|
||||||
|
1. xlsx printing support
|
||||||
|
2. Added GZIP compression enablement in configuration
|
||||||
|
3. CAD format now supports conversion to SVG and TIF formats, added timeout termination and thread management
|
||||||
|
4. Added captcha verification for file deletion
|
||||||
|
5. Added xbrl format preview support
|
||||||
|
6. PDF preview added control over signatures, drawings, illustration control, search positioning pagination, and display content definition
|
||||||
|
7. Added CSV format front-end parsing support
|
||||||
|
8. Added Docker image support for ARM64
|
||||||
|
9. Added Office preview conversion timeout property setting
|
||||||
|
10. Added preview file host blacklist mechanism
|
||||||
|
|
||||||
|
#### Optimizations
|
||||||
|
1. Optimized OFD mobile preview page adaptability
|
||||||
|
2. Updated xlsx front-end parsing component to accelerate parsing speed
|
||||||
|
3. Upgraded CAD component
|
||||||
|
4. Office function adjustments, supporting comments, conversion page limit, watermark generation, etc.
|
||||||
|
5. Upgraded markdown component
|
||||||
|
6. Upgraded dcm parsing component
|
||||||
|
7. Upgraded PDF.JS parsing component
|
||||||
|
8. Changed video player plugin to ckplayer
|
||||||
|
9. Smarter tif parsing, supporting modified image formats
|
||||||
|
10. Improved character encoding detection accuracy for large and small text files, handling concurrency vulnerabilities
|
||||||
|
11. Refactored file download code, added general file server authentication access design
|
||||||
|
12. Updated bootstrap component and streamlined unnecessary files
|
||||||
|
13. Updated epub version, optimized epub display effect
|
||||||
|
14. Fixed issue where scheduled cache cleanup only deleted disk cache files for multimedia file types
|
||||||
|
15. Auto-detection of installed Office components, added default paths for LibreOffice 7.5 & 7.6 versions
|
||||||
|
16. Changed drawio default to preview mode
|
||||||
|
17. Added PDF thread management, timeout management, memory cache management, updated PDF parsing component version
|
||||||
|
18. Optimized Dockerfile for true cross-platform image building
|
||||||
|
|
||||||
|
#### Fixes
|
||||||
|
1. Fixed forceUpdatedCache property setting issue where local cache files weren't updated
|
||||||
|
2. Fixed PDF decryption error after successful encrypted file conversion
|
||||||
|
3. Fixed BPMN cross-domain support issue
|
||||||
|
4. Fixed special character error in compressed package secondary reverse proxy
|
||||||
|
5. Fixed video cross-domain configuration causing video preview failure
|
||||||
|
6. Fixed TXT text pagination secondary loading issue
|
||||||
|
7. Fixed Drawio missing Base64 component issue
|
||||||
|
8. Fixed Markdown escaping issue
|
||||||
|
9. Fixed EPUB cross-domain error
|
||||||
|
10. Fixed URL special character issues
|
||||||
|
11. Fixed compressed package traversal vulnerability
|
||||||
|
12. Fixed compressed file path errors, image collection path errors, watermark issues, etc.
|
||||||
|
13. Fixed front-end parsing XLSX containing EMF format file errors
|
||||||
|
|
||||||
|
### Version 4.3.0 (July 5, 2023)
|
||||||
|
|
||||||
|
#### New Features
|
||||||
|
1. Added DCM medical digital imaging preview
|
||||||
|
2. Added drawio drawing preview
|
||||||
|
3. Added command to regenerate with cache enabled: &forceUpdatedCache=true
|
||||||
|
4. Added dwg CAD file preview
|
||||||
|
5. Added PDF file password support
|
||||||
|
6. Added DPI customization for PDF file image generation
|
||||||
|
7. Added configuration to delete converted OFFICE, CAD, TIFF, compressed package source files (enabled by default to save disk space)
|
||||||
|
8. Added front-end xlsx parsing method
|
||||||
|
9. Added support for pages, eps, iges, igs, dwt, dng, ifc, dwfx, stl, cf2, plt and other formats
|
||||||
|
|
||||||
|
#### Optimizations
|
||||||
|
1. Modified generated PDF file names to include file extensions to prevent duplicate names
|
||||||
|
2. Adjusted SQL file preview method
|
||||||
|
3. Optimized OFD preview compatibility
|
||||||
|
4. Beautified TXT text pagination box display
|
||||||
|
5. Upgraded Linux/Docker built-in office to LibreOffice-7.5.3
|
||||||
|
6. Upgraded Windows built-in office to LibreOffice-7.5.3 Portable
|
||||||
|
7. Other functional optimizations
|
||||||
|
|
||||||
|
#### Fixes
|
||||||
|
1. Fixed compressed package path errors in reverse proxy scenarios
|
||||||
|
2. Fixed .click error when image preview URLs contain &
|
||||||
|
3. Fixed known OFD preview issues
|
||||||
|
4. Fixed page error when clicking on file directories (tree nodes) in compressed package preview
|
||||||
|
5. Other known issue fixes
|
||||||
|
|
||||||
|
### Version 4.2.1 (April 18, 2023)
|
||||||
|
|
||||||
|
#### Change Log
|
||||||
|
1. Fixed null pointer bug in dwg file preview
|
||||||
|
|
||||||
|
### Version 4.2.0 (April 13, 2023)
|
||||||
|
|
||||||
|
#### New Features
|
||||||
|
1. Added SVG format file preview support
|
||||||
|
2. Added encrypted Office file preview support
|
||||||
|
3. Added encrypted zip, rar, and other compressed package file preview support
|
||||||
|
4. Added xmind software model file preview support
|
||||||
|
5. Added BPMN workflow model file preview support
|
||||||
|
6. Added eml email file preview support
|
||||||
|
7. Added EPUB e-book file preview support
|
||||||
|
8. Added office document format support: dotm, ett, xlt, xltm, wpt, dot, xlam, xla, dotx, etc.
|
||||||
|
9. Added 3D model file support: obj, 3ds, stl, ply, gltf, glb, off, 3dm, fbx, dae, wrl, 3mf, ifc, brep, step, iges, fcstd, bim, etc.
|
||||||
|
10. Added configurable high-risk file upload restrictions (e.g., exe files)
|
||||||
|
11. Added configurable site filing information
|
||||||
|
12. Added password requirement for demo site file deletion
|
||||||
|
|
||||||
|
#### Optimizations
|
||||||
|
1. Added caching for text document preview
|
||||||
|
2. Beautified 404, 500 error pages
|
||||||
|
3. Optimized invoice and other OFD file preview seal rendering compatibility
|
||||||
|
4. Removed office-plugin module, using new jodconverter component
|
||||||
|
5. Optimized Excel file preview effect
|
||||||
|
6. Optimized CAD file preview effect
|
||||||
|
7. Updated xstream, junrar, pdfbox, and other dependency versions
|
||||||
|
8. Updated TIF to PDF conversion plugin, added conversion cache
|
||||||
|
9. Optimized demo page UI deployment
|
||||||
|
10. Compressed package file preview supports directories
|
||||||
|
|
||||||
|
#### Fixes
|
||||||
|
1. Fixed XSS issues in some interfaces
|
||||||
|
2. Fixed console printed demo address not following content-path configuration
|
||||||
|
3. Fixed OFD file preview cross-domain issues
|
||||||
|
4. Fixed internal self-signed certificate HTTPS URL file download issues
|
||||||
|
5. Fixed special character file deletion issues
|
||||||
|
6. Fixed OOM caused by unreclaimed memory in PDF to image conversion
|
||||||
|
7. Fixed garbled preview for xlsx 7.4+ version files
|
||||||
|
8. Fixed TrustHostFilter not intercepting cross-domain interfaces (security issue - upgrade required if using TrustHost)
|
||||||
|
9. Fixed compressed package file preview filename garbled issue on Linux systems
|
||||||
|
10. Fixed OFD file preview only displaying 10 pages
|
||||||
|
|
||||||
|
|
||||||
|
### Changelog
|
||||||
|
> December 14, 2022, version 4.1.0 released:
|
||||||
|
|
||||||
|
1. Updated homepage design by @wsd7747.
|
||||||
|
2. Compatible with multipage tif for pdf and jpg conversion and multiple page online preview for tif image preview by @zhangzhen1979.
|
||||||
|
3. Optimized docker build, using layered build method by @yl-yue.
|
||||||
|
4. Implemented file encryption based on userToken cache by @yl-yue.
|
||||||
|
5. Implemented preview for encrypted Word, PPT, and Excel files by @yl-yue.
|
||||||
|
6. Upgraded Linux & Docker images to LibreOffice 7.3.
|
||||||
|
7. Updated OFD preview component, tif preview component, and added support for PPT watermarking.
|
||||||
|
8. Numerous other upgrades, optimizations, and bug fixes.
|
||||||
|
We thank @yl-yue, @wsd7747, @zhangzhen1979, @tomhusky, @shenghuadun, and @kischn.sun for their code contributions.
|
||||||
|
|
||||||
|
|
||||||
|
> July 6, 2021, version 4.0.0 released:
|
||||||
|
|
||||||
|
1. The integration of OpenOffice in the underlying system has been replaced with LibreOffice, resulting in enhanced compatibility and improved preview effects for Office files.
|
||||||
|
2. Fixed the directory traversal vulnerability in compressed files.
|
||||||
|
3. Fixed the issue where previewing PPT files in PDF mode was ineffective.
|
||||||
|
4. Fixed the issue where the front-end display of image preview mode for PPT files was abnormal.
|
||||||
|
5. Added a new feature: the file upload function on the homepage can be enabled or disabled in real-time through configuration.
|
||||||
|
6. Optimized the logging of Office process shutdown.
|
||||||
|
7. Optimized the logic for finding Office components in Windows environment, with built-in LibreOffice taking priority.
|
||||||
|
8. Optimized the synchronous execution of starting Office processes.
|
||||||
|
|
||||||
|
> June 17, 2021, version 3.6.0 released:
|
||||||
|
|
||||||
|
This version includes support for OFD file type versions, and all the important features in this release were contributed by the community. We thank @gaoxingzaq and @zhangxiaoxiao9527 for their code contributions.
|
||||||
|
|
||||||
|
1. Added support for previewing OFD type files. OFD is a domestically produced file format similar to PDF.
|
||||||
|
2. Added support for transcoding and previewing video files through ffmpeg. With transcoding enabled, theoretically, all mainstream video file formats such as RM, RMVB, FLV, etc. are supported for preview.
|
||||||
|
3. Beautified the preview effect of PPT and PPTX file types, much better looking than the previous version.
|
||||||
|
4. Updated the versions of dependencies such as pdfbox, xstream, common-io.
|
||||||
|
|
||||||
|
> January 28, 2021:
|
||||||
|
|
||||||
|
The final update of the Lunar New Year 2020 has been released, mainly including some UI improvements, bug fixes reported by QQ group users and issues, and most importantly, it is a new version for a good year.
|
||||||
|
|
||||||
|
1. Introduced galimatias to solve the problem of abnormal file download caused by non-standard file names.
|
||||||
|
2. Updated UI style of index access demonstration interface.
|
||||||
|
3. Updated UI style of markdown file preview.
|
||||||
|
4. Updated UI style of XML file preview, adjusted the architecture of text file preview to facilitate expansion.
|
||||||
|
5. Updated UI style of simTxT file preview.
|
||||||
|
6. Adjusted the UI of continuous preview of multiple images to flip up and down.
|
||||||
|
7. Simplified all file download IO operations by adopting the apache-common-io package.
|
||||||
|
8. XML file preview supports switching to pure text mode.
|
||||||
|
9. Enhanced prompt information when url base64 decoding fails.
|
||||||
|
10. Fixed import errors and image preview bug.
|
||||||
|
11. Fixed the problem of missing log directory when running the release package.
|
||||||
|
12. Fixed the bug of continuous preview of multiple images in the compressed package.
|
||||||
|
13. Fixed the problem of no universal matching for file type suffixes in uppercase and lowercase.
|
||||||
|
14. Specified the use of the Apache Commons-code implementation for Base64 encoding to fix exceptions occurring in some JDK versions.
|
||||||
|
15. Fixed the bug of HTML file preview of text-like files.
|
||||||
|
16. Fixed the problem of inability to switch between jpg and pdf when previewing dwg files.
|
||||||
|
17. Escaped dangerous characters to prevent reflected xss.
|
||||||
|
18. Fixed the problem of duplicate encoding causing the failure of document-to-image preview and standardized the encoding.
|
||||||
|
|
||||||
|
> December 27, 2020:
|
||||||
|
|
||||||
|
The year-end major update of 2020 includes comprehensive architecture design, complete code refactoring, significant improvement in code quality, and more convenient secondary development. We welcome you to review the source code and contribute to building by raising issues and pull requests.
|
||||||
|
|
||||||
|
1. Adjusted architecture modules, extensively refactored code, and improved code quality by several levels. Please feel free to review.
|
||||||
|
2. Enhanced XML file preview effect and added preview of XML document structure.
|
||||||
|
3. Added support for markdown file preview, including support for md rendering and switching between source text and preview.
|
||||||
|
4. Switched the underlying web server to jetty, resolving the issue: https://github.com/kekingcn/kkFileView/issues/168
|
||||||
|
5. Introduced cpdetector to solve the problem of file encoding recognition.
|
||||||
|
6. Adopted double encoding with base64 and urlencode for URLs to completely solve preview problems with bizarre file names.
|
||||||
|
7. Added configuration item office.preview.switch.disabled to control the switch of office file preview.
|
||||||
|
8. Optimized text file preview logic, transmitting content through Base64 to avoid requesting file content again during preview.
|
||||||
|
9. Disabled the image zoom effect in office preview mode to achieve consistent experience with image and pdf preview.
|
||||||
|
10. Directly set pdfbox to be compatible with lower version JDK, and there will be no warning prompts even when run in IDEA.
|
||||||
|
11. Removed non-essential toolkits like Guava and Hutool to reduce code volume.
|
||||||
|
12. Asynchronous loading of Office components speeds up application launch to within 5 seconds.
|
||||||
|
13. Reasonable settings of the number of threads in the preview consumption queue.
|
||||||
|
14. Fixed the bug where files in compressed packages failed to preview again.
|
||||||
|
15. Fixed the bug in image preview.
|
||||||
|
|
||||||
|
> May 20th 2020 :
|
||||||
|
1. Support for global watermark and dynamic change of watermark content through parameters
|
||||||
|
2. Support for CAD file Preview
|
||||||
|
3. Add configuration item base.url, support using nginx reverse proxy and set context-path
|
||||||
|
4. All configuration items can be read from environment variables, which is convenient for docker image deployment and large-scale use in cluster
|
||||||
|
5. Support the configuration of TrustHost (only the file source from the trust site can be previewed), and protect the preview service from abuse
|
||||||
|
6. Support configuration of customize cache cleanup time (cron expression)
|
||||||
|
7. All recognizable plain text can be previewed directly without downloading, such as .md .java .py, etc
|
||||||
|
8. Support configuration to limit PDF file download after conversion
|
||||||
|
9. Optimize Maven packaging configuration to solve the problem of line break in .sh script
|
||||||
|
10. Place all CDN dependencies on the front end locally for users without external network connection
|
||||||
|
11. Comment Service on home page switched from Sohu ChangYan to gitalk
|
||||||
|
12. Fixed preview exceptions that may be caused by special characters in the URL
|
||||||
|
13. Fixed the addtask exception of the transformation file queue
|
||||||
|
14. Fixed other known issues
|
||||||
|
15. Official website build: [https://kkview.cn](https://kkview.cn)
|
||||||
|
16. Official docker image repository build: [https://hub.docker.com/r/keking/kkfileview](https://hub.docker.com/r/keking/kkfileview)
|
||||||
|
|
||||||
|
> June 18th 2019 :
|
||||||
|
1. Support automatic cleaning of cache and preview files
|
||||||
|
2. Support http/https stream url file preview
|
||||||
|
3. Support FTP url file preview
|
||||||
|
4. Add Docker build
|
||||||
|
|
||||||
|
> April 8th 2019
|
||||||
|
1. Cache and queue implementations abstract, providing JDK and REDIS implementations (REDIS becomes optional dependencies)
|
||||||
|
2. Provides zip and tar.gz packages, and provides a one-click startup script
|
||||||
|
|
||||||
|
> January 17th 2018
|
||||||
|
|
||||||
|
1. Refined the project directory, abstract file preview interface, Easy to extend more file extensions and depoly this project on your own
|
||||||
|
1. Added English documentation (@幻幻Fate,@汝辉) contribution
|
||||||
|
1. Support for more image file extensions
|
||||||
|
1. Fixed the issue that image carousel in zip file will always start from the first
|
||||||
|
|
||||||
|
> January 12th 2018
|
||||||
|
|
||||||
|
1. Support for multiple images preview
|
||||||
|
1. Support for images rotation preview in rar/zip
|
||||||
|
|
||||||
|
> January 2nd 2018
|
||||||
|
|
||||||
|
1. Fixed gibberish issue when preview a txt document caused by the file encoding problem
|
||||||
|
1. Fixed the issue that some module dependencies can not be found
|
||||||
|
1. Add a spring boot profile, and support for Multi-environment configuration
|
||||||
|
1. Add `pdf.js` to preview the documents such as doc,etc.,support for generating doc headlines as pdf menu,support for mobile preview
|
||||||
|
|
||||||
|
### Sponsor Us
|
||||||
|
If this project has been helpful to you, we welcome your sponsorship. Your support is our greatest motivation.!
|
||||||
|
|||||||
174
SECURITY_CONFIG.md
Normal file
@@ -0,0 +1,174 @@
|
|||||||
|
# kkFileView 安全配置指南
|
||||||
|
|
||||||
|
## ⚠️ 重要安全更新
|
||||||
|
|
||||||
|
从 4.4.0 之后版本开始,kkFileView 增强了安全性,默认拒绝所有未配置的外部文件预览请求,以防止 SSRF(服务器端请求伪造)攻击。
|
||||||
|
|
||||||
|
## 🔒 安全配置说明
|
||||||
|
|
||||||
|
### 1. 信任主机白名单配置(推荐)
|
||||||
|
|
||||||
|
在 `application.properties` 中配置允许预览的域名:
|
||||||
|
|
||||||
|
```properties
|
||||||
|
# 方式1:通过配置文件
|
||||||
|
trust.host = kkview.cn,yourdomain.com,cdn.example.com
|
||||||
|
|
||||||
|
# 方式2:通过环境变量
|
||||||
|
KK_TRUST_HOST=kkview.cn,yourdomain.com,cdn.example.com
|
||||||
|
```
|
||||||
|
|
||||||
|
**示例场景**:
|
||||||
|
- 只允许预览来自 `oss.aliyuncs.com` 和 `cdn.example.com` 的文件
|
||||||
|
```properties
|
||||||
|
trust.host = oss.aliyuncs.com,cdn.example.com
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. 允许所有主机(不推荐,仅测试环境)
|
||||||
|
|
||||||
|
```properties
|
||||||
|
trust.host = *
|
||||||
|
```
|
||||||
|
|
||||||
|
⚠️ **警告**:此配置会允许访问任意外部地址,存在安全风险,仅应在测试环境使用!
|
||||||
|
|
||||||
|
### 3. 黑名单配置(高级)
|
||||||
|
|
||||||
|
禁止特定域名或内网地址:
|
||||||
|
|
||||||
|
```properties
|
||||||
|
# 禁止访问内网地址(强烈推荐)
|
||||||
|
not.trust.host = localhost,127.0.0.1,192.168.*,10.*,172.16.*,169.254.*
|
||||||
|
|
||||||
|
# 禁止特定恶意域名
|
||||||
|
not.trust.host = malicious-site.com,spam-domain.net
|
||||||
|
```
|
||||||
|
|
||||||
|
**优先级**:黑名单 > 白名单
|
||||||
|
|
||||||
|
### 4. Docker 环境配置
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run -d \
|
||||||
|
-e KK_TRUST_HOST=yourdomain.com,cdn.example.com \
|
||||||
|
-e KK_NOT_TRUST_HOST=localhost,127.0.0.1 \
|
||||||
|
-p 8012:8012 \
|
||||||
|
keking/kkfileview:4.4.0
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🛡️ 安全最佳实践
|
||||||
|
|
||||||
|
### ✅ 推荐配置
|
||||||
|
|
||||||
|
```properties
|
||||||
|
# 1. 明确配置信任主机白名单
|
||||||
|
trust.host = your-cdn.com,your-storage.com
|
||||||
|
|
||||||
|
# 2. 配置黑名单防止内网访问
|
||||||
|
not.trust.host = localhost,127.0.0.1,192.168.*,10.*,172.16.*
|
||||||
|
|
||||||
|
# 3. 禁用文件上传(生产环境)
|
||||||
|
file.upload.disable = true
|
||||||
|
|
||||||
|
# 4. 配置基础URL(使用反向代理时)
|
||||||
|
base.url = https://preview.yourdomain.com
|
||||||
|
```
|
||||||
|
|
||||||
|
### ❌ 不推荐配置
|
||||||
|
|
||||||
|
```properties
|
||||||
|
# 危险:允许所有主机访问
|
||||||
|
trust.host = *
|
||||||
|
|
||||||
|
# 危险:启用文件上传(生产环境)
|
||||||
|
file.upload.disable = false
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🔍 配置验证
|
||||||
|
|
||||||
|
### 测试白名单是否生效
|
||||||
|
|
||||||
|
1. 配置白名单:
|
||||||
|
```properties
|
||||||
|
trust.host = kkview.cn
|
||||||
|
```
|
||||||
|
|
||||||
|
2. 尝试预览白名单内的文件:
|
||||||
|
```
|
||||||
|
http://localhost:8012/onlinePreview?url=https://kkview.cn/test.pdf
|
||||||
|
✅ 应该可以正常预览
|
||||||
|
```
|
||||||
|
|
||||||
|
3. 尝试预览白名单外的文件:
|
||||||
|
```
|
||||||
|
http://localhost:8012/onlinePreview?url=https://other-domain.com/test.pdf
|
||||||
|
❌ 应该被拒绝,显示"不信任的文件源"
|
||||||
|
```
|
||||||
|
|
||||||
|
### 测试黑名单是否生效
|
||||||
|
|
||||||
|
1. 配置黑名单:
|
||||||
|
```properties
|
||||||
|
not.trust.host = localhost,127.0.0.1
|
||||||
|
```
|
||||||
|
|
||||||
|
2. 尝试访问本地文件:
|
||||||
|
```
|
||||||
|
http://localhost:8012/getCorsFile?urlPath=http://127.0.0.1:8080/admin
|
||||||
|
❌ 应该被拒绝
|
||||||
|
```
|
||||||
|
|
||||||
|
## 📋 常见问题
|
||||||
|
|
||||||
|
### Q1: 升级后无法预览文件了?
|
||||||
|
|
||||||
|
**原因**:新版本默认拒绝未配置的主机。
|
||||||
|
|
||||||
|
**解决**:在配置文件中添加信任主机列表:
|
||||||
|
```properties
|
||||||
|
trust.host = your-file-server.com
|
||||||
|
```
|
||||||
|
|
||||||
|
### Q2: 如何临时恢复旧版本行为?
|
||||||
|
|
||||||
|
**不推荐**,但如果确实需要:
|
||||||
|
```properties
|
||||||
|
trust.host = *
|
||||||
|
```
|
||||||
|
|
||||||
|
### Q3: 配置了白名单但还是无法访问?
|
||||||
|
|
||||||
|
检查以下几点:
|
||||||
|
1. 域名是否完全匹配(区分大小写)
|
||||||
|
2. 是否配置了黑名单,黑名单优先级更高
|
||||||
|
3. 查看日志中的 WARNING 信息
|
||||||
|
4. 确认环境变量是否正确设置
|
||||||
|
|
||||||
|
### Q4: 如何允许子域名?
|
||||||
|
|
||||||
|
已支持通配符域名匹配,可使用 `*.example.com`:
|
||||||
|
```properties
|
||||||
|
trust.host = *.example.com
|
||||||
|
```
|
||||||
|
|
||||||
|
说明:
|
||||||
|
- `*.example.com` 会匹配 `cdn.example.com`、`api.internal.example.com`,但不匹配根域 `example.com`
|
||||||
|
- 对于 IP 风格通配(如 `192.168.*`、`10.*`),仅匹配字面量 IPv4 地址,不匹配域名
|
||||||
|
|
||||||
|
## 🚨 安全事件响应
|
||||||
|
|
||||||
|
如果发现可疑的预览请求:
|
||||||
|
|
||||||
|
1. 检查日志文件,搜索 "拒绝访问主机" 关键字
|
||||||
|
2. 确认 `trust.host` 配置是否合理
|
||||||
|
3. 检查是否有异常的网络请求
|
||||||
|
4. 如发现攻击行为,及时更新黑名单配置
|
||||||
|
|
||||||
|
## 📞 获取帮助
|
||||||
|
|
||||||
|
- GitHub Issues: https://github.com/kekingcn/kkFileView/issues
|
||||||
|
- Gitee Issues: https://gitee.com/kekingcn/file-online-preview/issues
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**安全提示**:定期检查和更新信任主机列表,遵循最小权限原则。
|
||||||
57
doc/ci-auto-deploy.md
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
# kkFileView master 自动部署
|
||||||
|
|
||||||
|
当前线上 Windows 服务器的实际部署信息如下:
|
||||||
|
|
||||||
|
- 部署根目录:`C:\kkFileView-5.0`
|
||||||
|
- 运行 jar:`C:\kkFileView-5.0\bin\kkFileView-<当前项目版本>.jar`
|
||||||
|
- 启动脚本:`C:\kkFileView-5.0\bin\startup.bat`
|
||||||
|
- 运行配置:`C:\kkFileView-5.0\config\test.properties`
|
||||||
|
- 健康检查地址:`http://127.0.0.1:8012/`
|
||||||
|
|
||||||
|
当前自动部署链路采用服务器拉最新源码并本机编译的方式:
|
||||||
|
|
||||||
|
1. 通过 WinRM 连接 Windows 服务器
|
||||||
|
2. 在服务器上的源码目录执行 `git fetch/reset/clean`,同步到 `origin/$KK_DEPLOY_BRANCH`(默认 `master`)
|
||||||
|
3. 使用服务器上的 JDK 21 和 Maven 执行 `mvn clean package -Dmaven.test.skip=true`
|
||||||
|
4. 备份线上 jar,替换为新构建产物
|
||||||
|
5. 使用现有 `startup.bat` 重启,并做健康检查
|
||||||
|
6. 如果健康检查失败,则自动回滚旧 jar 并重新拉起
|
||||||
|
|
||||||
|
## 需要配置的 GitHub Secrets
|
||||||
|
|
||||||
|
- `KK_DEPLOY_HOST`
|
||||||
|
- `KK_DEPLOY_USERNAME`
|
||||||
|
- `KK_DEPLOY_PASSWORD`
|
||||||
|
|
||||||
|
以下部署参数当前由 workflow 从 GitHub Secrets 读取;如果未单独配置,则使用脚本默认值:
|
||||||
|
|
||||||
|
- `KK_DEPLOY_PORT=5985`
|
||||||
|
- `KK_DEPLOY_ROOT=C:\kkFileView-5.0`
|
||||||
|
- `KK_DEPLOY_HEALTH_URL=http://127.0.0.1:8012/`
|
||||||
|
|
||||||
|
下面这些非敏感参数可以通过 workflow env 或 GitHub Variables 覆盖;未配置时会使用默认值:
|
||||||
|
- `KK_DEPLOY_REPO_URL=https://github.com/kekingcn/kkFileView.git`
|
||||||
|
- `KK_DEPLOY_BRANCH=master`
|
||||||
|
- `KK_DEPLOY_SOURCE_ROOT=C:\kkFileView-source`
|
||||||
|
- `KK_DEPLOY_JAVA_HOME=C:\Program Files\jdk-21.0.2`
|
||||||
|
- `KK_DEPLOY_GIT_EXE=C:\kkFileView-tools\git\cmd\git.exe`
|
||||||
|
- `KK_DEPLOY_MVN_CMD=C:\kkFileView-tools\maven\bin\mvn.cmd`
|
||||||
|
- `KK_DEPLOY_MAVEN_SETTINGS=`
|
||||||
|
|
||||||
|
如果服务器到 GitHub 的拉取速度不稳定,也可以把 `KK_DEPLOY_REPO_URL` 改成你自己的 Git 镜像地址。
|
||||||
|
如果服务器访问 Maven Central 不稳定,也可以通过 `KK_DEPLOY_MAVEN_SETTINGS` 指向自定义 `settings.xml`,切换到就近镜像仓库。
|
||||||
|
|
||||||
|
## 服务器前置环境
|
||||||
|
|
||||||
|
服务器需要具备以下工具:
|
||||||
|
|
||||||
|
- Git for Windows(推荐安装在 `C:\kkFileView-tools\git`)
|
||||||
|
- Apache Maven 3.9.x(推荐安装在 `C:\kkFileView-tools\maven`)
|
||||||
|
- JDK 21(当前线上已存在:`C:\Program Files\jdk-21.0.2`)
|
||||||
|
|
||||||
|
## Workflow
|
||||||
|
|
||||||
|
新增 workflow:`.github/workflows/master-auto-deploy.yml`
|
||||||
|
|
||||||
|
- 触发条件:`push` 到 `master`,或手动 `workflow_dispatch`
|
||||||
|
- 部署方式:WinRM + 服务器源码同步 + 服务器本机 Maven 编译 + jar 替换/回滚
|
||||||
44
doc/e2e-improvement-checklist.md
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
# E2E 完善清单(基于 PR342 回归经验)
|
||||||
|
|
||||||
|
## 背景
|
||||||
|
本次手工回归已经验证了以下关键链路:
|
||||||
|
- TXT
|
||||||
|
- XLSX
|
||||||
|
- ZIP
|
||||||
|
- PDF
|
||||||
|
- DOCX
|
||||||
|
- MP4
|
||||||
|
- CAD / DXF
|
||||||
|
|
||||||
|
但当前 GitHub CI 中,自动化 E2E 仅覆盖了其中一部分,且大多只断言 HTTP 200,没有校验最终预览效果。
|
||||||
|
|
||||||
|
## 本次落地目标
|
||||||
|
|
||||||
|
### 1. 补齐缺失的关键链路
|
||||||
|
- [x] PDF 预览 smoke
|
||||||
|
- [x] MP4 预览 smoke
|
||||||
|
- [x] CAD / DXF 预览 smoke
|
||||||
|
|
||||||
|
### 2. 升级断言方式
|
||||||
|
- [x] 不再只看 `status === 200`
|
||||||
|
- [x] 增加标题/页面关键字断言,确认命中了正确预览模板
|
||||||
|
- [x] 对 PDF / DOCX / CAD 增加“等待页 -> 最终页面”的轮询兼容
|
||||||
|
|
||||||
|
### 3. 补齐 CI 所需 fixture
|
||||||
|
- [x] `sample.pdf` 进入 required fixture 清单
|
||||||
|
- [x] `sample.mp4` 进入 required fixture 清单
|
||||||
|
- [x] `text.dxf` 进入 required fixture 清单
|
||||||
|
- [x] 将 MP4 与 DXF fixture 作为仓库内静态样例纳入 CI
|
||||||
|
|
||||||
|
### 4. 后续可继续增强(本次未全部落地)
|
||||||
|
- [ ] 为 PDF / Office / CAD 增加截图型 nightly artifact
|
||||||
|
- [ ] 为 `/picturesPreview` 增加独立 smoke
|
||||||
|
- [ ] 为 OFD 增加稳定 fixture 和 smoke case
|
||||||
|
- [ ] 为媒体预览增加更多格式(如 wav / mp3 / mov)
|
||||||
|
- [ ] 为 CAD 增加第二份标准样例,避免单样例偏差
|
||||||
|
- [ ] 将当前 HTML 测试报告模板收敛成 nightly 自动产物
|
||||||
|
|
||||||
|
## 预期收益
|
||||||
|
- 让 CI 覆盖这次 PR342 真正验证过的关键主链路
|
||||||
|
- 避免未来出现“CI 绿了,但 PDF / MP4 / CAD 实际挂了”的情况
|
||||||
|
- 让 E2E 更接近用户真实感知,而不是仅验证接口可达
|
||||||
BIN
doc/gitee星球.png
Normal file
|
After Width: | Height: | Size: 156 KiB |
BIN
doc/github星球.png
Normal file
|
After Width: | Height: | Size: 148 KiB |
BIN
doc/img/preview/preview-3ds.png
Normal file
|
After Width: | Height: | Size: 150 KiB |
BIN
doc/img/preview/preview-audio.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
doc/img/preview/preview-bpmn.png
Normal file
|
After Width: | Height: | Size: 135 KiB |
BIN
doc/img/preview/preview-cad-image.png
Normal file
|
After Width: | Height: | Size: 138 KiB |
BIN
doc/img/preview/preview-cad-pdf.png
Normal file
|
After Width: | Height: | Size: 138 KiB |
BIN
doc/img/preview/preview-dcm.png
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
BIN
doc/img/preview/preview-doc-image.png
Normal file
|
After Width: | Height: | Size: 159 KiB |
BIN
doc/img/preview/preview-doc-pdf.png
Normal file
|
After Width: | Height: | Size: 219 KiB |
BIN
doc/img/preview/preview-drawio.png
Normal file
|
After Width: | Height: | Size: 320 KiB |
BIN
doc/img/preview/preview-image.png
Normal file
|
After Width: | Height: | Size: 68 KiB |
BIN
doc/img/preview/preview-pdf-image.png
Normal file
|
After Width: | Height: | Size: 187 KiB |
BIN
doc/img/preview/preview-pdf-pdf.png
Normal file
|
After Width: | Height: | Size: 254 KiB |
BIN
doc/img/preview/preview-ppt-image.png
Normal file
|
After Width: | Height: | Size: 392 KiB |
BIN
doc/img/preview/preview-ppt-pdf.png
Normal file
|
After Width: | Height: | Size: 211 KiB |
BIN
doc/img/preview/preview-text.png
Normal file
|
After Width: | Height: | Size: 96 KiB |
BIN
doc/img/preview/preview-video.png
Normal file
|
After Width: | Height: | Size: 469 KiB |
BIN
doc/img/preview/preview-xls.png
Normal file
|
After Width: | Height: | Size: 96 KiB |
BIN
doc/img/preview/preview-xlsx-web.png
Normal file
|
After Width: | Height: | Size: 166 KiB |
BIN
doc/img/preview/preview-xmind.png
Normal file
|
After Width: | Height: | Size: 252 KiB |
BIN
doc/img/preview/preview-zip-inner.png
Normal file
|
After Width: | Height: | Size: 236 KiB |
BIN
doc/img/preview/preview-zip.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
28
docker/kkfileview-base/Dockerfile
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
FROM ubuntu:24.04
|
||||||
|
|
||||||
|
RUN sed -i 's@//.*archive.ubuntu.com@//mirrors.aliyun.com@g' /etc/apt/sources.list.d/ubuntu.sources &&\
|
||||||
|
sed -i 's@//security.ubuntu.com@//mirrors.aliyun.com@g' /etc/apt/sources.list.d/ubuntu.sources &&\
|
||||||
|
sed -i 's@//ports.ubuntu.com@//mirrors.aliyun.com@g' /etc/apt/sources.list.d/ubuntu.sources &&\
|
||||||
|
apt-get update &&\
|
||||||
|
export DEBIAN_FRONTEND=noninteractive &&\
|
||||||
|
apt-get install -y --no-install-recommends openjdk-21-jre tzdata locales xfonts-utils fontconfig libreoffice-nogui &&\
|
||||||
|
echo 'Asia/Shanghai' > /etc/timezone &&\
|
||||||
|
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime &&\
|
||||||
|
localedef -i zh_CN -c -f UTF-8 -A /usr/share/locale/locale.alias zh_CN.UTF-8 &&\
|
||||||
|
locale-gen zh_CN.UTF-8 &&\
|
||||||
|
apt-get install -y --no-install-recommends ttf-mscorefonts-installer &&\
|
||||||
|
apt-get install -y --no-install-recommends ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy &&\
|
||||||
|
apt-get autoremove -y &&\
|
||||||
|
apt-get clean &&\
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# 内置一些常用的中文字体,避免普遍性乱码
|
||||||
|
ADD fonts/* /usr/share/fonts/chinese/
|
||||||
|
|
||||||
|
RUN cd /usr/share/fonts/chinese &&\
|
||||||
|
# 安装字体
|
||||||
|
mkfontscale &&\
|
||||||
|
mkfontdir &&\
|
||||||
|
fc-cache -fv
|
||||||
|
|
||||||
|
ENV LANG=zh_CN.UTF-8 LC_ALL=zh_CN.UTF-8
|
||||||
50
docker/kkfileview-base/README.cn.md
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
# 构建说明
|
||||||
|
|
||||||
|
由于 kkfileview 的基础运行环境很少变动且制作耗时较久,而 kkfileview 本身代码开发会频繁改动,因此把制作其 Docker 镜像的步骤拆分为两次:
|
||||||
|
|
||||||
|
首先制作 kkfileview 的基础镜像(kkfileview-base)。
|
||||||
|
|
||||||
|
然后使用 kkfileview-base 作为基础镜像进行构建,加快 kkfileview docker 镜像构建与发布。
|
||||||
|
|
||||||
|
执行如下命令即可构建基础镜像:
|
||||||
|
> 这里镜像 tag 以 5.0.0 为例,本项目所维护的 Dockerfile 文件考虑了跨平台兼容性。 如果你需要用到 arm64 架构镜像, 则在arm64 架构机器上同样执行下面的构建命令即可
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker build --tag keking/kkfileview-base:5.0.0 .
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## 跨平台构建
|
||||||
|
|
||||||
|
`docker buildx` 支持在一台机器上构建出多种平台架构的镜像。推荐使用该能力进行跨平台的镜像构建。
|
||||||
|
例如,执行 `docker buildx build` 命令时加上 `--platform=linux/arm64` 参数即可构建出 arm64 架构镜像。这极大方便了那些没有arm64 架构机器却想构建 arm64 架构镜像的用户。
|
||||||
|
|
||||||
|
> 当前本项目仅支持构建 linux/amd64 和 linux/arm64 两种平台架构的镜像
|
||||||
|
> buildx 的 builder driver 可以使用默认的 `docker` 类型, 若使用 `docker-container` 类型可以支持并行构建多种架构, 本文不再赘述, 有兴趣可以自行了解。参考 [Docker Buildx | Docker Documentation](https://docs.docker.com/buildx/working-with-buildx/#build-multi-platform-images)
|
||||||
|
|
||||||
|
**前提要求**
|
||||||
|
|
||||||
|
以当前机器为 amd64 (x86_64)架构为例。需要开启 docker 的 buildx 特性,以及开启 Linux 的 QEMU 用户模式:
|
||||||
|
|
||||||
|
> 使用 WSL2 的 Windows 用户如果安装了最新的 DockerDesktop, 则这些前提要求已满足, 无需额外下述设置。
|
||||||
|
|
||||||
|
1. 安装 docker buildx 客户端插件:
|
||||||
|
> docker 版本要求 >=19.03
|
||||||
|
|
||||||
|
若已安装, 则跳过。详情参考 https://github.com/docker/buildx
|
||||||
|
|
||||||
|
2. 开启 QEMU 的用户模式功能, 并安装其它平台的模拟器:
|
||||||
|
> Linux 内核要求 >=4.8
|
||||||
|
|
||||||
|
使用 `tonistiigi/binfmt` 镜像可快速开启并安装模拟器,执行下面命令:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker run --privileged --rm tonistiigi/binfmt --install all
|
||||||
|
```
|
||||||
|
|
||||||
|
现在就可以愉快地开始构建了,构建命令示例:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker buildx build --platform=linux/amd64,linux/arm64 -t keking/kkfileview-base:5.0.0 --push .
|
||||||
|
```
|
||||||
53
docker/kkfileview-base/README.md
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
# Build Instructions
|
||||||
|
|
||||||
|
Since the base runtime environment for kkfileview rarely changes and takes a long time to build, while the kkfileview code itself is frequently updated, the process of building its Docker image is split into two steps:
|
||||||
|
|
||||||
|
First, create the base image for kkfileview (kkfileview-base).
|
||||||
|
|
||||||
|
Then, use kkfileview-base as the base image to build and speed up the kkfileview Docker image build and release process.
|
||||||
|
|
||||||
|
To build the base image, run the following command:
|
||||||
|
|
||||||
|
> In this example, the image tag is 5.0.0. The Dockerfile maintained in this project considers cross-platform compatibility. If you need an arm64 architecture image, run the same build command on an arm64 architecture machine.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker build --tag keking/kkfileview-base:5.0.0 .
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Cross-Platform Build
|
||||||
|
|
||||||
|
`docker buildx` supports building images for multiple platform architectures on a single machine. It is recommended to use this capability for cross-platform image builds.
|
||||||
|
For example, adding the `--platform=linux/arm64` parameter when executing the `docker buildx build` command will allow you to build an arm64 architecture image. This is particularly convenient for users who want to build arm64 images but don't have an arm64 machine.
|
||||||
|
|
||||||
|
> Currently, this project only supports building images for the linux/amd64 and linux/arm64 architectures.
|
||||||
|
> The buildx builder driver can use the default `docker` type, but if you use the `docker-container` type, you can build multiple architectures in parallel. This README will not cover that in detail, you can learn more on your own. Refer to [Docker Buildx | Docker Documentation](https://docs.docker.com/buildx/working-with-buildx/#build-multi-platform-images)
|
||||||
|
|
||||||
|
**Prerequisites**
|
||||||
|
|
||||||
|
Assuming the current machine is amd64 (x86_64) architecture, you'll need to enable the docker buildx feature and enable Linux QEMU user mode:
|
||||||
|
|
||||||
|
> Windows users with WSL2 who have installed a recent version of Docker Desktop will already meet these prerequisites, so no additional setup is required.
|
||||||
|
|
||||||
|
1. Install the docker buildx client plugin:
|
||||||
|
|
||||||
|
> Docker version >=19.03 is required.
|
||||||
|
|
||||||
|
If it's already installed, you can skip this step. For more details, refer to https://github.com/docker/buildx.
|
||||||
|
|
||||||
|
2. Enable QEMU user mode and install emulators for other platforms:
|
||||||
|
|
||||||
|
> Linux kernel version >=4.8 is required.
|
||||||
|
|
||||||
|
You can quickly enable and install emulators using the tonistiigi/binfmt image by running the following command:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker run --privileged --rm tonistiigi/binfmt --install all
|
||||||
|
```
|
||||||
|
|
||||||
|
Now you can enjoy the building. Here’s an example build command:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker buildx build --platform=linux/amd64,linux/arm64 -t keking/kkfileview-base:5.0.0 --push .
|
||||||
|
```
|
||||||
@@ -1,160 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>com.yudianbank</groupId>
|
|
||||||
<artifactId>jodconverter-core</artifactId>
|
|
||||||
<version>1.0-SNAPSHOT</version>
|
|
||||||
<packaging>jar</packaging>
|
|
||||||
<properties>
|
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
||||||
</properties>
|
|
||||||
<repositories>
|
|
||||||
<repository>
|
|
||||||
<!-- required for org.hyperic:sigar -->
|
|
||||||
<id>jboss-public-repository-group</id>
|
|
||||||
<url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
|
|
||||||
</repository>
|
|
||||||
</repositories>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>commons-io</groupId>
|
|
||||||
<artifactId>commons-io</artifactId>
|
|
||||||
<version>1.4</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.openoffice</groupId>
|
|
||||||
<artifactId>juh</artifactId>
|
|
||||||
<version>3.2.1</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.openoffice</groupId>
|
|
||||||
<artifactId>ridl</artifactId>
|
|
||||||
<version>3.2.1</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.openoffice</groupId>
|
|
||||||
<artifactId>unoil</artifactId>
|
|
||||||
<version>3.2.1</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<!-- for the command line tool -->
|
|
||||||
<groupId>commons-cli</groupId>
|
|
||||||
<artifactId>commons-cli</artifactId>
|
|
||||||
<version>1.1</version>
|
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.hyperic</groupId>
|
|
||||||
<artifactId>sigar</artifactId>
|
|
||||||
<version>1.6.5.132</version>
|
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.json</groupId>
|
|
||||||
<artifactId>json</artifactId>
|
|
||||||
<version>20090211</version>
|
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.testng</groupId>
|
|
||||||
<artifactId>testng</artifactId>
|
|
||||||
<version>6.0.1</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<!-- 要将源码放上去,需要加入这个插件 -->
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-source-plugin</artifactId>
|
|
||||||
<version>2.1</version>
|
|
||||||
<configuration>
|
|
||||||
<attach>true</attach>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>compile</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>jar</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>2.3.2</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.6</source>
|
|
||||||
<target>1.6</target>
|
|
||||||
<encoding>UTF-8</encoding>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
|
||||||
<version>2.7.2</version>
|
|
||||||
<configuration>
|
|
||||||
<!-- don't run tests in parallel -->
|
|
||||||
<perCoreThreadCount>false</perCoreThreadCount>
|
|
||||||
<threadCount>1</threadCount>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
|
||||||
<version>2.3.1</version>
|
|
||||||
<configuration>
|
|
||||||
<archive>
|
|
||||||
<manifest>
|
|
||||||
<mainClass>org.artofsolving.jodconverter.cli.Convert</mainClass>
|
|
||||||
<addClasspath>true</addClasspath>
|
|
||||||
</manifest>
|
|
||||||
</archive>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
|
||||||
<version>2.2-beta-5</version>
|
|
||||||
<configuration>
|
|
||||||
<descriptors>
|
|
||||||
<descriptor>src/main/assembly/dist.xml</descriptor>
|
|
||||||
</descriptors>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
<reporting>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
|
||||||
<version>2.7</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>cobertura-maven-plugin</artifactId>
|
|
||||||
<version>2.4</version>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</reporting>
|
|
||||||
<!-- distribute目录 -->
|
|
||||||
<distributionManagement>
|
|
||||||
<repository>
|
|
||||||
<id>repo</id>
|
|
||||||
<name>User Project Releases</name>
|
|
||||||
<url>http://192.168.1.204:8081/nexus/content/repositories/releases</url>
|
|
||||||
</repository>
|
|
||||||
<snapshotRepository>
|
|
||||||
<id>repo</id>
|
|
||||||
<name>User Project SNAPSHOTS</name>
|
|
||||||
<url>http://192.168.1.204:8081/nexus/content/repositories/snapshots</url>
|
|
||||||
</snapshotRepository>
|
|
||||||
</distributionManagement>
|
|
||||||
</project>
|
|
||||||