mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-07-07 00:04:57 +03:00
Compare commits
824 Commits
Author | SHA1 | Date | |
---|---|---|---|
cd86bd810d | |||
831905d281 | |||
5ee8e3f00c | |||
2f9f157a1e | |||
5cf45ad62b | |||
c838ba0009 | |||
9982e128ef | |||
ac28302b59 | |||
9a009d750a | |||
c36d7187a8 | |||
465df16505 | |||
723d8e0682 | |||
6582955cfa | |||
71d71e51db | |||
74ea87d725 | |||
ca832a9cef | |||
23e9f74e7e | |||
7b9fd5bdcd | |||
53b7db3578 | |||
4c1eeb717b | |||
7981e16e0b | |||
62e7f0ba8a | |||
2dbebe271d | |||
eb793dc257 | |||
97203568e7 | |||
9c0b5f7001 | |||
a39560749d | |||
495cddd518 | |||
0d9b4faae3 | |||
e8c14cba68 | |||
ff37c35cfa | |||
56c12de929 | |||
2789b16c12 | |||
f6c185f279 | |||
44821c7130 | |||
64cb8e1eff | |||
fc7093ed36 | |||
370d83ffa0 | |||
645d5ebb55 | |||
09b7e4f6e5 | |||
0dfc82c14e | |||
48cb3fdebe | |||
913934f7c0 | |||
442885deb5 | |||
d4dbf3cdc5 | |||
b58d57ffeb | |||
01b05af333 | |||
60ee463044 | |||
36456e63a6 | |||
4e4bd79ad2 | |||
dc2b11918a | |||
7398bf2724 | |||
ff4b74afda | |||
e6792d8893 | |||
8cde812157 | |||
3574f8aa98 | |||
9429243dbe | |||
895c16e3e8 | |||
6a170ac691 | |||
6dbf7e9ae2 | |||
54ae7f725b | |||
35077deaf1 | |||
3b932f5fee | |||
f4bbe476be | |||
2dec52b875 | |||
c49e462ed1 | |||
b8e542105f | |||
18dc2621ec | |||
f57f05a599 | |||
f736d18267 | |||
1be55ebb94 | |||
d8dec75bc5 | |||
fc2a33d1f3 | |||
68615fe64e | |||
2fd6c0b76a | |||
6833a7a11d | |||
643cbbbf88 | |||
205a94cda2 | |||
2868ff1ef6 | |||
a9a93a2824 | |||
979eb803a6 | |||
68e704097d | |||
8162ca3d12 | |||
d9686df302 | |||
8345deebe4 | |||
63595f79c5 | |||
7fe3e6a800 | |||
107c4ba362 | |||
aa65e11fc8 | |||
519d94f925 | |||
950ecc186c | |||
2abd9de923 | |||
5d8ff7ed4f | |||
8f8677f164 | |||
088b5c2df3 | |||
acb6a53b31 | |||
e122e964f3 | |||
df108b559d | |||
efac849ed7 | |||
a80d3f2032 | |||
1cf2e7a8ea | |||
137b8ef67a | |||
c2fe874865 | |||
14fea1f4a2 | |||
f6f2660060 | |||
5d667e4261 | |||
adccc6b7d4 | |||
a2aa254f11 | |||
c0440031e9 | |||
07733b29cb | |||
eb785e08fe | |||
1493ccb44d | |||
49f8112d83 | |||
5633314981 | |||
dcdbce63d5 | |||
8ac021a38c | |||
e4330ca71a | |||
35b5d0640f | |||
f88341ce40 | |||
0ab5199272 | |||
41be858df0 | |||
6665efb822 | |||
8826484245 | |||
09708bc8cb | |||
696a9bc0a1 | |||
1c0bdb0c30 | |||
96e4fc040f | |||
0f689d9dfc | |||
867c992111 | |||
96b1961d78 | |||
939eb3130e | |||
0ba7ad392e | |||
8482a52522 | |||
9c33605f5e | |||
3c70698c35 | |||
56b4ebfa65 | |||
c68d93c2e9 | |||
2fdd9ec4dc | |||
6ae786d542 | |||
c59df82666 | |||
db7d6c83d5 | |||
a89adaebc3 | |||
c46871688b | |||
aadc068964 | |||
46e73e944f | |||
8fc27da780 | |||
c983ebffc1 | |||
df6df007a3 | |||
f7a2cc5a7d | |||
544f03ec8b | |||
82ce34fccb | |||
6ff0ce7076 | |||
d2e673a47d | |||
b3df7a0b90 | |||
22c602f630 | |||
b4e26dec05 | |||
df7ea3c54a | |||
423631100f | |||
fb83ac08f2 | |||
e6123d36a0 | |||
0ff9d1a455 | |||
96ab969152 | |||
1f3a730d0a | |||
21963c6c68 | |||
91053622ab | |||
1519e23b3e | |||
f7d33568f3 | |||
1fe26ccb6c | |||
8c64dc0cd7 | |||
bedf1cd7e9 | |||
d7c487619a | |||
2b7b728077 | |||
cd2838795b | |||
4ff9c6393a | |||
e81ecbb0ec | |||
e20fa9ec2e | |||
1741dfdccc | |||
d045d1eeb7 | |||
cc61b5b3c3 | |||
eea1de3d25 | |||
7e19bbc421 | |||
d49b9f108b | |||
c67d9ee201 | |||
1062692d08 | |||
025ebec4cc | |||
11828be9e6 | |||
edcdc923ad | |||
7c642c7d55 | |||
6ce91e9c81 | |||
064d211fab | |||
43aaca509d | |||
f4934abc9a | |||
0cdf0eacbf | |||
0e8174c6cf | |||
54593e8cac | |||
26403c70e3 | |||
0a60cdf141 | |||
149096e13c | |||
8362637353 | |||
c7766d072b | |||
8215de91f9 | |||
6a5f4b0dfd | |||
58c0e1ded4 | |||
6e48227d93 | |||
1b79df7954 | |||
cbb90c5f23 | |||
2e8723b967 | |||
64396e2c05 | |||
89cc6ae717 | |||
ec3769ba32 | |||
86e44e8d7b | |||
260413d242 | |||
99374ba446 | |||
23c3e1d9e5 | |||
68283fca80 | |||
d8e56f9dbc | |||
dca2eaa370 | |||
c223fbe8a3 | |||
334e8be915 | |||
e2ad7d5e8f | |||
9eb9d57c27 | |||
28ec0d54b8 | |||
506677bf60 | |||
6a1b55293c | |||
49c1a84752 | |||
34a9a7bc46 | |||
bf9ebe21ff | |||
e7980ae9b1 | |||
9f53cf5bdb | |||
1027dbf385 | |||
675b78e502 | |||
c492276a94 | |||
661e61538e | |||
b5a83cc208 | |||
7f65bae400 | |||
3781d0f91c | |||
d76888434b | |||
b6d2ec3b76 | |||
4ebf713911 | |||
4981008534 | |||
b5727b3525 | |||
372759d2ad | |||
86e28db3d7 | |||
797696a9f4 | |||
8ae0a932da | |||
bfee06d144 | |||
e4f9abba1c | |||
05fa675d5a | |||
ac04c469c7 | |||
dc5da0c6a9 | |||
e85fc4435e | |||
cf38a3b6c2 | |||
04569c81c7 | |||
6adc996bf9 | |||
fa99fde893 | |||
d854fd6baf | |||
ee1ecf8b42 | |||
1ba86c0dc1 | |||
d8768367b9 | |||
a14d812dcb | |||
49ea58dd58 | |||
37aa1ba534 | |||
3ed7f7cbce | |||
209f60f079 | |||
333cbb3f29 | |||
5146bbbadc | |||
e74d9dec25 | |||
ad4ce138e9 | |||
34d443648b | |||
27d7f4cfbe | |||
4a3b4589c6 | |||
53d8b10de2 | |||
ca996ed89a | |||
0d075f0b42 | |||
8f3915417f | |||
bf206bd7ad | |||
cb6d9531b5 | |||
2f1bff96b2 | |||
5a0227ba1d | |||
4f9c75a3a7 | |||
0735af9fdf | |||
ca226cdc9d | |||
900947bd08 | |||
817ecf2348 | |||
a8be4c38e1 | |||
c8dca265b4 | |||
4c2e0867e4 | |||
b3afbe37e9 | |||
3a91490b7f | |||
b4bb90ec5b | |||
192d4938da | |||
43f0d3b4fa | |||
a742e2d193 | |||
fade8672c2 | |||
992a998a34 | |||
3c0e3fa49c | |||
c6334a44f9 | |||
d86cf181bf | |||
e8b88fd225 | |||
9764485774 | |||
a52a3928db | |||
32a970f976 | |||
56aedd6817 | |||
b603d2658a | |||
1e604407af | |||
24926bcc17 | |||
a4334753ad | |||
fd92c754fc | |||
10b5034f0d | |||
0a4455ac40 | |||
f94ac6351e | |||
034aae5a70 | |||
879bd34af4 | |||
a4d414891f | |||
09dd8a8b07 | |||
3c7d78a1bf | |||
adbbe94675 | |||
1c1560f6ca | |||
68dc4e23d8 | |||
f6edb5e165 | |||
a5565fce4b | |||
d95d8ddefa | |||
5ecade7950 | |||
f3905cc421 | |||
3cdad95ee1 | |||
1c3dc59892 | |||
529d2c232f | |||
7f7d72cca9 | |||
e65cacdf96 | |||
f1b464e84d | |||
18598b5d96 | |||
51585e63e3 | |||
c72d4fddb8 | |||
82b6422821 | |||
fc15d1ebd5 | |||
73ffa10f50 | |||
a0f831c071 | |||
77ee848caa | |||
0b74a8e4ce | |||
918fedb9d4 | |||
fc94843579 | |||
b91d9af5e3 | |||
2a40d21ef9 | |||
02ee7b45d7 | |||
384ab07996 | |||
e6bf956806 | |||
528f313dbe | |||
5cac4481f0 | |||
b4aad09f21 | |||
14f5854ecf | |||
a9239a6aab | |||
b178f26e52 | |||
9692a8d961 | |||
2d1c8765aa | |||
8392ccd1fa | |||
2955dc5580 | |||
235d5d1d0d | |||
e095283641 | |||
fb004345b4 | |||
9d4970841f | |||
4d594e00f8 | |||
d7be057ae0 | |||
2990b5ae93 | |||
462ebfb960 | |||
6e7eba8e71 | |||
8e292138b1 | |||
582a739179 | |||
3a2d588722 | |||
9c2a573cf2 | |||
4657d7ee49 | |||
c9508b7fb7 | |||
2853337b81 | |||
03859eb515 | |||
a56cfac947 | |||
82af38c482 | |||
f74c53b449 | |||
f85dff25dc | |||
f301ba1e60 | |||
dcb1023999 | |||
26c8fbe538 | |||
115b8aab82 | |||
3cc85c1d51 | |||
fc9286b11b | |||
224abd99b8 | |||
5adeeb75ea | |||
d0fe38384c | |||
84bc94b232 | |||
78e89eb3c7 | |||
fcd00547aa | |||
0eb0152437 | |||
472dde05de | |||
1e6806bee7 | |||
c01d8e6058 | |||
d061abae8f | |||
888cf188bb | |||
fbdd6f1f3c | |||
024b68120d | |||
2d00ab7dcc | |||
51a3346f70 | |||
7f8e527883 | |||
832c69add2 | |||
ffc095f95a | |||
b6d31af188 | |||
ee3bf7f507 | |||
9b3077d955 | |||
dd9c3546f7 | |||
4ddf39e760 | |||
ce0591d924 | |||
5a05e7a249 | |||
c3573561ed | |||
97a04888b7 | |||
37b5644291 | |||
101d79d7c3 | |||
9182a9b4e9 | |||
bf14817f1f | |||
8b87c9d4ef | |||
2761c1ca42 | |||
1f40de2dda | |||
ddf9e48c10 | |||
1bb01e55e5 | |||
b531d8e234 | |||
fce3592917 | |||
410b7a959d | |||
1590e6afb3 | |||
996f2f2aa0 | |||
7863ce8a8e | |||
26a27553b2 | |||
a1dff0f594 | |||
7881f8657a | |||
bd501ba9bf | |||
dfb105c2d7 | |||
66dc5ee581 | |||
56bd9733d6 | |||
eff784b624 | |||
22a9231c33 | |||
a2f30c8aad | |||
41b9973c24 | |||
60db1962f9 | |||
6e400c19af | |||
f2466eb919 | |||
c310163244 | |||
9dbbfcd388 | |||
4328e6e5ab | |||
505c854303 | |||
4efed994dc | |||
513ad6e792 | |||
0d5b05ef02 | |||
bcba88ca73 | |||
883d4d4cd7 | |||
4eae5820f6 | |||
f6adcd6bfc | |||
dc296f1eff | |||
43f8b5fc56 | |||
08905e57a6 | |||
233e28f38c | |||
8798978951 | |||
af84a30adc | |||
b64c15b097 | |||
03d67fd5b1 | |||
46ca5f7b98 | |||
ce6ea9f781 | |||
4221579e95 | |||
56bb573b17 | |||
e3f0837bd1 | |||
c1370987bf | |||
79d1ade09d | |||
a3f984e521 | |||
65bcbc8db3 | |||
43a80702a9 | |||
682052e0dc | |||
ad139a7cbb | |||
64f1e349f8 | |||
214992c232 | |||
82b4b083b3 | |||
f18837b491 | |||
28c90b190c | |||
5f76dbcfa2 | |||
b4817fd27a | |||
89ca29f259 | |||
7a208d6114 | |||
5b910322a7 | |||
2262b8a160 | |||
2923b5500a | |||
7acd52d724 | |||
8c12e79448 | |||
dc8d705854 | |||
81c71d309a | |||
e0182ca3d9 | |||
97d9761a9b | |||
544c9a73da | |||
f9a1d72ce7 | |||
e2d61133fe | |||
2f801f30de | |||
60568da9b7 | |||
515d823ef8 | |||
146455e97d | |||
c20bcb2e60 | |||
ce54531b53 | |||
cf318d7219 | |||
285e322171 | |||
cca769e2e6 | |||
4e248e833c | |||
92f41341d9 | |||
19af52e288 | |||
3a595b4a46 | |||
76395d8f8d | |||
2aaf9012a0 | |||
aeff295c01 | |||
4b05de1a93 | |||
92966e0f5c | |||
485e680cff | |||
f8c4713fad | |||
789ed26113 | |||
6f050f2b01 | |||
6a25ccfa28 | |||
138e0b76d6 | |||
ee84891559 | |||
0472f9c286 | |||
f7e988ffc7 | |||
a541c0286e | |||
30f707d6c0 | |||
bad9310aa4 | |||
d4d15b66d3 | |||
c4b5455663 | |||
192083e7c4 | |||
1708998a11 | |||
01663f836d | |||
4ec2995604 | |||
2bb6fb2845 | |||
a6ba9b8788 | |||
46b54f00be | |||
5cab279a8c | |||
3e17c818a6 | |||
84588095d5 | |||
a79f91161f | |||
ed6013affc | |||
ac04e15b72 | |||
4db6247b80 | |||
3761876254 | |||
934e49fea0 | |||
b7e7d3b028 | |||
808f081e3a | |||
8fb9bfd39c | |||
9d29d8813b | |||
68367fa2fb | |||
d5fa90cc71 | |||
68574e9af9 | |||
de03b3ec59 | |||
9e7f26395a | |||
b00aa39b29 | |||
2d82d84fd5 | |||
42dbfb7c7e | |||
ef5c32dca1 | |||
65483499bf | |||
3ffdda6c13 | |||
3d69a71d9b | |||
4506b60e80 | |||
b6b692046c | |||
56a19d7651 | |||
2078a069de | |||
562ffe8945 | |||
914bfe7d44 | |||
7f30cbccf4 | |||
2dab282eb2 | |||
ef24ff74c8 | |||
a8580458c4 | |||
6115f1c713 | |||
dd1eebdbed | |||
8495388933 | |||
afe576dcdc | |||
decfcecc97 | |||
d8aa470192 | |||
b339104f4f | |||
8a37f5ce11 | |||
e7bf97583d | |||
a39905c288 | |||
dbd4dd5ae7 | |||
ec201f340a | |||
0a924aea4d | |||
d161b75a7d | |||
621fb087f8 | |||
809f891f0c | |||
82f2c73ce9 | |||
5cddafbb3b | |||
dd6e79d526 | |||
5792aa7c41 | |||
0325c13c40 | |||
25e2854725 | |||
cf2585c079 | |||
1301dc93c6 | |||
5ed11a0270 | |||
5c346ef96e | |||
2715d80e18 | |||
a08857150b | |||
e5cfa347da | |||
a6239a4ae3 | |||
8e2616ef7d | |||
ea2c8f9861 | |||
e5e86abc0e | |||
992410c3d4 | |||
cd889f78dc | |||
cabcba1ef9 | |||
2969237e04 | |||
78f06569b3 | |||
1fa6c14e4e | |||
586c27d43b | |||
63b841efc0 | |||
2981a44de3 | |||
2db9f15ea7 | |||
ebd1d281dd | |||
9620dcbcd0 | |||
943ddadd3d | |||
272ec5a8ef | |||
d53f80bfa6 | |||
ac48ac348b | |||
44447e9762 | |||
394354ff8a | |||
6ff00f637b | |||
5611156ca8 | |||
f03e83369e | |||
501fe217ff | |||
bf1201aa26 | |||
a207260e38 | |||
eddf593e22 | |||
3fa24c6731 | |||
5f12684b42 | |||
5f6306d5e5 | |||
023250df9a | |||
16ca0694fb | |||
99e99a46b1 | |||
fffed52f3b | |||
69b4001355 | |||
c029b34b80 | |||
7fdacec2a6 | |||
190672bd84 | |||
5ca62bdd8a | |||
d0b3cde485 | |||
bb2e2ff997 | |||
a2d15615f3 | |||
945715e4bb | |||
1ac7602b3a | |||
3c140dde8d | |||
d29d1f516a | |||
b890c7d813 | |||
8bb787f233 | |||
819f2f92f6 | |||
e6a80fb4f2 | |||
249575a5a5 | |||
2c9ac51c84 | |||
9e7d87bea6 | |||
3cf23e58a3 | |||
f52ccc6493 | |||
2e0c24f6c8 | |||
d1ad4196bb | |||
1e164ecc4e | |||
51ffe4be2c | |||
20b84f3928 | |||
dec532a8eb | |||
ff3910eb86 | |||
684d17e86a | |||
efd24133be | |||
1c4b257a1b | |||
77aee2d21c | |||
f22b013dda | |||
488eb06d64 | |||
763e1b67a5 | |||
fc39173b73 | |||
1a4ed27e89 | |||
cd0db9c7d6 | |||
c5a3fd74c0 | |||
a800e6f6cc | |||
5b07163975 | |||
feba98199b | |||
7b73e3c0c8 | |||
490fc7b65c | |||
a8fdc1184a | |||
7edda54b9a | |||
cc5d68a7c3 | |||
6a7883b5fe | |||
61ccaed4f6 | |||
09f24e46b3 | |||
69cd39616b | |||
e18bb465c9 | |||
337a04b758 | |||
1c56562cc7 | |||
b4cd4ce360 | |||
818103950c | |||
5d782a67b4 | |||
cda0062367 | |||
a8c6a0c1b3 | |||
712c51a971 | |||
ac1b045634 | |||
3b2db45509 | |||
10e292b196 | |||
e8793a0098 | |||
5cdd2a4e4a | |||
e1d9eaf590 | |||
6b3ac84ba2 | |||
18ad35ebfe | |||
b853140626 | |||
5209b310e3 | |||
3a275d7257 | |||
aa65327e73 | |||
b352aa4cc3 | |||
6d85fffdb5 | |||
8685fe0da1 | |||
cd850c07ae | |||
14a410a179 | |||
c865103795 | |||
60410accce | |||
352ed759b2 | |||
b57a4b051b | |||
6c665f889f | |||
5bf08e63bb | |||
4b9c33cd30 | |||
78dad1d568 | |||
6a472d827a | |||
a3eb115b0a | |||
24d64222ea | |||
cc61c90372 | |||
35200a29ea | |||
c084ce30f9 | |||
755e09e5c1 | |||
2cdffffa54 | |||
8e53b948c5 | |||
ff247687ed | |||
588d7539f4 | |||
112b4c2c67 | |||
28d4a113dc | |||
3732447571 | |||
0133682eb3 | |||
3747d2bf3f | |||
3c99f64621 | |||
74a1e9bd1b | |||
59be67df25 | |||
5e0c036e39 | |||
6801e4b384 | |||
c948f65850 | |||
a9b30b829f | |||
d074899fd8 | |||
3c2f5a41ba | |||
369a8850c4 | |||
7b042e53d2 | |||
844dcdb0af | |||
144392c587 | |||
3baf4674e7 | |||
869496be3e | |||
d917b2ac73 | |||
96a2d5a124 | |||
3090688506 | |||
19dbdf46be | |||
eb5150a002 | |||
e0c6813d44 | |||
6869955acc | |||
f84513c95b | |||
45399d9797 | |||
b60844e276 | |||
40ed982079 | |||
eeaac4e78c | |||
6fe678fe84 | |||
853b4a57bc | |||
275e8a81ef | |||
235bd07e67 | |||
47d08b055e | |||
485a5922eb | |||
4514ba5e2f | |||
5ebdb394fc | |||
2fafd7c70e | |||
d726719602 | |||
09be880263 | |||
f7f6eeec44 | |||
c4838006b1 | |||
c52e49de2d | |||
9e6476c7b2 | |||
37f28b4119 | |||
f1cb86d979 | |||
c4ec63fe32 | |||
60cc784aee | |||
b77dd167ff | |||
1a8e1385cf | |||
e3e35f5a4c | |||
c15a4ba04f | |||
5e1c728f92 | |||
eb9d6e77a4 | |||
6e707f7550 | |||
71b814060d | |||
8e1a377b82 | |||
adf0f18b7a | |||
20bbe325fe | |||
1d5ded9388 | |||
cbbac659a3 | |||
2cfe031398 | |||
a2a6502ab9 | |||
f2fee4d32c | |||
f627b64264 | |||
1d6a4d3ec8 | |||
3b7dd25b65 | |||
3f16a7e704 | |||
4e583e43f1 | |||
8fdf7302a5 | |||
981b57ee28 | |||
27f7d43ff7 | |||
a3aea00820 | |||
0570f7d31c | |||
667108319d | |||
7e8b3c0b39 | |||
34dfc14549 | |||
1fe863e866 | |||
b41c17f45a | |||
ca1c6a5f3f | |||
8fb456f6a6 | |||
132926ee09 | |||
8a856e4672 | |||
e6803a1fab | |||
9180e065a0 | |||
39becfe4ab | |||
723f38e72f | |||
a2b7cb0148 | |||
24bd2b3198 | |||
9f2a5cecf3 | |||
a65c436e8f | |||
aa0ec4343c | |||
1bdd9a92bc | |||
942051d3a8 |
101
.appveyor.yml
101
.appveyor.yml
@ -1,101 +0,0 @@
|
|||||||
version: '{build}'
|
|
||||||
|
|
||||||
image:
|
|
||||||
- Visual Studio 2015
|
|
||||||
- Visual Studio 2017
|
|
||||||
- Ubuntu1604
|
|
||||||
- Ubuntu1804
|
|
||||||
|
|
||||||
configuration: Release
|
|
||||||
|
|
||||||
skip_branch_with_pr: true
|
|
||||||
clone_depth: 1
|
|
||||||
|
|
||||||
skip_commits:
|
|
||||||
files:
|
|
||||||
- .travis.yml
|
|
||||||
- .gitlab-ci.yml
|
|
||||||
- .azure-pipelines.yml
|
|
||||||
- .cirrus.yml
|
|
||||||
|
|
||||||
init:
|
|
||||||
- ps: Update-AppveyorBuild -Version "build-$env:APPVEYOR_BUILD_NUMBER-$($env:APPVEYOR_REPO_COMMIT.substring(0,7))"
|
|
||||||
|
|
||||||
install: git submodule update --init --recursive
|
|
||||||
|
|
||||||
for:
|
|
||||||
-
|
|
||||||
matrix:
|
|
||||||
only:
|
|
||||||
- image: Visual Studio 2015
|
|
||||||
build_script:
|
|
||||||
- src\BuildAll.cmd
|
|
||||||
- exit %errorlevel%
|
|
||||||
after_build:
|
|
||||||
- 7z a "%APPVEYOR_BUILD_FOLDER%\%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x86_%CONFIGURATION%_PDBs-vs2015.zip" "%APPVEYOR_BUILD_FOLDER%\src\DebugFiles\pdb\Win32_Release\*.pdb"
|
|
||||||
- 7z a "%APPVEYOR_BUILD_FOLDER%\%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x64_%CONFIGURATION%_PDBs-vs2015.zip" "%APPVEYOR_BUILD_FOLDER%\src\DebugFiles\pdb\x64_Release\*.pdb"
|
|
||||||
artifacts:
|
|
||||||
- path: output\pkg\*\*
|
|
||||||
name: Release
|
|
||||||
- path: "%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x86_%CONFIGURATION%_PDBs-vs2015.zip"
|
|
||||||
name: PDBs (x86)
|
|
||||||
- path: "%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x64_%CONFIGURATION%_PDBs-vs2015.zip"
|
|
||||||
name: PDBs (x64)
|
|
||||||
-
|
|
||||||
matrix:
|
|
||||||
only:
|
|
||||||
- image: Visual Studio 2017
|
|
||||||
init:
|
|
||||||
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
|
|
||||||
before_build:
|
|
||||||
- configure
|
|
||||||
build_script:
|
|
||||||
- nmake
|
|
||||||
test_script:
|
|
||||||
- ps: cd $env:APPVEYOR_BUILD_FOLDER
|
|
||||||
- ps: .\.ci\appveyor-vpntest.ps1
|
|
||||||
after_build:
|
|
||||||
- 7z a "%APPVEYOR_BUILD_FOLDER%\%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x64_%CONFIGURATION%-vs2017.zip" "%APPVEYOR_BUILD_FOLDER%\build\*.exe"
|
|
||||||
- 7z a "%APPVEYOR_BUILD_FOLDER%\%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x64_%CONFIGURATION%-vs2017.zip" "%APPVEYOR_BUILD_FOLDER%\build\hamcore.se2"
|
|
||||||
- 7z a "%APPVEYOR_BUILD_FOLDER%\%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x64_%CONFIGURATION%_PDBs-vs2017.zip" "%APPVEYOR_BUILD_FOLDER%\build\*.pdb"
|
|
||||||
artifacts:
|
|
||||||
- path: "%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x64_%CONFIGURATION%-vs2017.zip"
|
|
||||||
name: Release
|
|
||||||
- path: "%APPVEYOR_PROJECT_NAME%_%APPVEYOR_BUILD_VERSION%_Windows_x64_%CONFIGURATION%_PDBs-vs2017.zip"
|
|
||||||
name: PDBs
|
|
||||||
-
|
|
||||||
matrix:
|
|
||||||
only:
|
|
||||||
- image: Ubuntu1604
|
|
||||||
before_build:
|
|
||||||
- ./configure
|
|
||||||
build_script:
|
|
||||||
- make package -C tmp -j $(nproc || sysctl -n hw.ncpu || echo 4)
|
|
||||||
test_script:
|
|
||||||
- .ci/appveyor-deb-install-test.sh
|
|
||||||
- sudo apt-get update && sudo apt-get -y install autoconf libtool liblzo2-dev libpam-dev fping unzip # openvpn build deps
|
|
||||||
- sudo .ci/start-se-openvpn.sh
|
|
||||||
- sudo .ci/run-openvpn-tests.sh
|
|
||||||
|
|
||||||
-
|
|
||||||
matrix:
|
|
||||||
only:
|
|
||||||
- image: Ubuntu1804
|
|
||||||
before_build:
|
|
||||||
- sh: "if [ ${APPVEYOR_REPO_TAG} == \"true\" ]; then .ci/appveyor-create-release-tarball.sh\nfi"
|
|
||||||
- ./configure
|
|
||||||
build_script:
|
|
||||||
- make package -C tmp -j $(nproc || sysctl -n hw.ncpu || echo 4)
|
|
||||||
- .ci/memory-leak-test.sh
|
|
||||||
test_script:
|
|
||||||
- .ci/appveyor-deb-install-test.sh
|
|
||||||
- sudo apt-get update && sudo apt-get -y install autoconf libtool liblzo2-dev libpam-dev fping unzip # openvpn build deps
|
|
||||||
- sudo .ci/start-se-openvpn.sh
|
|
||||||
- sudo .ci/run-openvpn-tests.sh
|
|
||||||
|
|
||||||
deploy:
|
|
||||||
description: 'automatic release'
|
|
||||||
provider: GitHub
|
|
||||||
auth_token: $(github_token)
|
|
||||||
on:
|
|
||||||
APPVEYOR_REPO_TAG: true
|
|
@ -1,6 +0,0 @@
|
|||||||
jobs:
|
|
||||||
- template: .ci/azure-pipelines-linux.yml
|
|
||||||
|
|
||||||
# - template: .ci/azure-pipelines-osx.yml
|
|
||||||
|
|
||||||
- template: .ci/azure-pipelines-win.yml
|
|
@ -1,7 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -eux
|
|
||||||
|
|
||||||
tar --exclude=.git --transform "s//SoftEtherVPN-${APPVEYOR_REPO_TAG_NAME}\//" -czf /tmp/softether-vpn-src-${APPVEYOR_REPO_TAG_NAME}.tar.gz .
|
|
||||||
appveyor PushArtifact /tmp/softether-vpn-src-${APPVEYOR_REPO_TAG_NAME}.tar.gz
|
|
||||||
|
|
@ -2,11 +2,13 @@
|
|||||||
|
|
||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
sudo dpkg -i build/softether-common*.deb
|
BUILD_BINARIESDIRECTORY="${BUILD_BINARIESDIRECTORY:-build}"
|
||||||
sudo dpkg -i build/softether-vpnbridge*.deb
|
|
||||||
sudo dpkg -i build/softether-vpnclient*.deb
|
sudo dpkg -i $BUILD_BINARIESDIRECTORY/softether-common*.deb
|
||||||
sudo dpkg -i build/softether-vpncmd*.deb
|
sudo dpkg -i $BUILD_BINARIESDIRECTORY/softether-vpnbridge*.deb
|
||||||
sudo dpkg -i build/softether-vpnserver*.deb
|
sudo dpkg -i $BUILD_BINARIESDIRECTORY/softether-vpnclient*.deb
|
||||||
|
sudo dpkg -i $BUILD_BINARIESDIRECTORY/softether-vpncmd*.deb
|
||||||
|
sudo dpkg -i $BUILD_BINARIESDIRECTORY/softether-vpnserver*.deb
|
||||||
|
|
||||||
sudo systemctl restart softether-vpnserver || (sudo journalctl -xe --no-pager >> systemctl.log && appveyor PushArtifact systemctl.log && exit 1)
|
sudo systemctl restart softether-vpnserver || (sudo journalctl -xe --no-pager >> systemctl.log && appveyor PushArtifact systemctl.log && exit 1)
|
||||||
|
|
||||||
|
@ -1,20 +1,25 @@
|
|||||||
$ErrorActionPreference = 'Stop'
|
$ErrorActionPreference = 'Stop'
|
||||||
|
|
||||||
|
if (Test-Path "env:BUILD_BINARIESDIRECTORY") {
|
||||||
|
$BUILD_BINARIESDIRECTORY = $env:BUILD_BINARIESDIRECTORY
|
||||||
|
} else {
|
||||||
|
$BUILD_BINARIESDIRECTORY = "build"
|
||||||
|
}
|
||||||
|
|
||||||
# ('s', 'c', 'b', 'sm', 'cm') ??
|
# ('s', 'c', 'b', 'sm', 'cm') ??
|
||||||
('s', 'c', 'b') | % {
|
('s', 'c', 'b') | % {
|
||||||
|
|
||||||
[String] $mode = $_
|
[String] $mode = $_
|
||||||
Write-Host "testing: $mode"
|
Write-Host "testing: $mode"
|
||||||
|
|
||||||
$full = (Write-Output "q\n" | & .\build\vpntest.exe $mode)
|
$full = (Write-Output "q\n" | & "$BUILD_BINARIESDIRECTORY\vpntest.exe" $mode)
|
||||||
$t = ($full | Select-String -Pattern 'NO MEMORY LEAKS' -CaseSensitive)
|
$t = ($full | Select-String -Pattern 'NO MEMORY LEAKS' -CaseSensitive)
|
||||||
|
|
||||||
if( ($t).Count -ne 1){
|
if (($t).Count -ne 1) {
|
||||||
$full
|
$full
|
||||||
Write-Error 'failed'
|
Write-Error 'failed'
|
||||||
return $false
|
return $false
|
||||||
}else{
|
} else {
|
||||||
Write-Host 'ok'
|
Write-Host 'ok'
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
jobs:
|
|
||||||
- job: linux_64
|
|
||||||
displayName: 'Ubuntu 16.04'
|
|
||||||
pool:
|
|
||||||
vmImage: ubuntu-16.04
|
|
||||||
variables:
|
|
||||||
CPACK_GENERATOR: DEB
|
|
||||||
steps:
|
|
||||||
- checkout: self
|
|
||||||
submodules: recursive
|
|
||||||
- script: |
|
|
||||||
sudo apt -y install cmake gcc g++ libncurses5-dev libreadline-dev libssl-dev make zlib1g-dev
|
|
||||||
./configure
|
|
||||||
make package -C tmp -j $(nproc || sysctl -n hw.ncpu || echo 4)
|
|
||||||
.ci/appveyor-deb-install-test.sh
|
|
||||||
sudo apt-get -y install autoconf libtool liblzo2-dev libpam-dev fping unzip # openvpn build deps
|
|
||||||
sudo .ci/start-se-openvpn.sh
|
|
||||||
sudo .ci/run-openvpn-tests.sh
|
|
||||||
displayName: 'Ubuntu 16.04'
|
|
@ -1,28 +0,0 @@
|
|||||||
jobs:
|
|
||||||
- job: win_64
|
|
||||||
displayName: 'Visual Studio 2017'
|
|
||||||
pool:
|
|
||||||
vmImage: vs2017-win2016
|
|
||||||
steps:
|
|
||||||
- checkout: self
|
|
||||||
submodules: recursive
|
|
||||||
- script: |
|
|
||||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
|
||||||
configure
|
|
||||||
- script: |
|
|
||||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
|
||||||
cd tmp
|
|
||||||
nmake
|
|
||||||
- powershell: |
|
|
||||||
. .ci\appveyor-vpntest.ps1
|
|
||||||
- powershell: |
|
|
||||||
New-Item -Path '$(build.artifactstagingdirectory)/publish' -ItemType Directory
|
|
||||||
- task: CopyFiles@2
|
|
||||||
inputs:
|
|
||||||
sourceFolder: '$(Build.SourcesDirectory)'
|
|
||||||
contents: 'build/?(*.exe|*.se2|*.pdb)'
|
|
||||||
TargetFolder: '$(build.artifactstagingdirectory)/publish'
|
|
||||||
- task: PublishBuildArtifacts@1
|
|
||||||
inputs:
|
|
||||||
pathtoPublish: '$(build.artifactstagingdirectory)/publish'
|
|
||||||
artifactName: vs2017
|
|
@ -1,17 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
RUN_COVERITY="${RUN_COVERITY:-0}"
|
|
||||||
|
|
||||||
export COVERITY_SCAN_PROJECT_NAME="SoftEtherVPN/SoftEtherVPN"
|
|
||||||
export COVERITY_SCAN_BRANCH_PATTERN="master"
|
|
||||||
export COVERITY_SCAN_NOTIFICATION_EMAIL="chipitsine@gmail.com"
|
|
||||||
export COVERITY_SCAN_BUILD_COMMAND_PREPEND="./configure"
|
|
||||||
export COVERITY_SCAN_BUILD_COMMAND="make -C tmp"
|
|
||||||
|
|
||||||
if [ "${RUN_COVERITY}" = "1" ]; then
|
|
||||||
# Ignore exit code, script exits with 1 if we're not on the right branch
|
|
||||||
curl -s "https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh" | bash || true
|
|
||||||
else
|
|
||||||
echo "Skipping coverity scan because \$RUN_COVERITY != \"1\""
|
|
||||||
fi
|
|
@ -2,7 +2,10 @@
|
|||||||
|
|
||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
cd
|
BUILD_BINARIESDIRECTORY="${BUILD_BINARIESDIRECTORY:-build}"
|
||||||
|
|
||||||
|
cd $BUILD_BINARIESDIRECTORY
|
||||||
|
|
||||||
git clone https://github.com/openvpn/openvpn
|
git clone https://github.com/openvpn/openvpn
|
||||||
cd openvpn
|
cd openvpn
|
||||||
autoreconf -iv
|
autoreconf -iv
|
||||||
@ -18,7 +21,7 @@ cat << EOF > tests/t_client.rc
|
|||||||
CA_CERT=fake
|
CA_CERT=fake
|
||||||
TEST_RUN_LIST="1 2"
|
TEST_RUN_LIST="1 2"
|
||||||
|
|
||||||
OPENVPN_BASE="--remote 127.0.0.1 --config $CONFIG --auth-user-pass /tmp/auth.txt"
|
OPENVPN_BASE="--config $CONFIG --auth-user-pass /tmp/auth.txt"
|
||||||
|
|
||||||
RUN_TITLE_1="testing udp/ipv4"
|
RUN_TITLE_1="testing udp/ipv4"
|
||||||
OPENVPN_CONF_1="--dev null --proto udp --port 1194 \$OPENVPN_BASE"
|
OPENVPN_CONF_1="--dev null --proto udp --port 1194 \$OPENVPN_BASE"
|
||||||
@ -27,4 +30,6 @@ RUN_TITLE_2="testing tcp/ipv4"
|
|||||||
OPENVPN_CONF_2="--dev null --proto tcp --port 1194 \$OPENVPN_BASE"
|
OPENVPN_CONF_2="--dev null --proto tcp --port 1194 \$OPENVPN_BASE"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
sed -i 's/^remote.*$/remote 127.0.0.1 1194/g' /tmp/*l3*ovpn
|
||||||
|
|
||||||
make test_scripts=t_client.sh check
|
make test_scripts=t_client.sh check
|
||||||
|
@ -5,7 +5,7 @@ RUN_SONARCLOUD="${RUN_SONARCLOUD:-0}"
|
|||||||
|
|
||||||
if [ "${RUN_SONARCLOUD}" = "1" ] && [ ! -z ${SONAR_TOKEN+x} ]; then
|
if [ "${RUN_SONARCLOUD}" = "1" ] && [ ! -z ${SONAR_TOKEN+x} ]; then
|
||||||
./configure
|
./configure
|
||||||
build-wrapper-linux-x86-64 --out-dir bw-output make -C tmp
|
build-wrapper-linux-x86-64 --out-dir bw-output make -C build
|
||||||
sonar-scanner -Dsonar.projectKey=SoftEtherVPN_SoftEtherVPN -Dsonar.organization=softethervpn -Dsonar.sources=. -Dsonar.cfamily.build-wrapper-output=bw-output -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=${SONAR_TOKEN}
|
sonar-scanner -Dsonar.projectKey=SoftEtherVPN_SoftEtherVPN -Dsonar.organization=softethervpn -Dsonar.sources=. -Dsonar.cfamily.build-wrapper-output=bw-output -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=${SONAR_TOKEN}
|
||||||
else
|
else
|
||||||
echo "Skipping sonar-scan because \$RUN_SONARCLOUD != \"1\" or \$SONAR_TOKEN is not set"
|
echo "Skipping sonar-scan because \$RUN_SONARCLOUD != \"1\" or \$SONAR_TOKEN is not set"
|
||||||
|
@ -1,13 +1,42 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
build/vpnserver start
|
BUILD_BINARIESDIRECTORY="${BUILD_BINARIESDIRECTORY:-build}"
|
||||||
|
|
||||||
build/vpncmd 127.0.0.1:443 /SERVER /HUB:DEFAULT /CMD:SecureNatEnable
|
cd $BUILD_BINARIESDIRECTORY
|
||||||
build/vpncmd 127.0.0.1:443 /SERVER /CMD:"OpenVpnEnable yes /PORTS:1194"
|
|
||||||
build/vpncmd 127.0.0.1:443 /SERVER /HUB:DEFAULT /CMD:"UserCreate test /GROUP:none /REALNAME:none /NOTE:none"
|
|
||||||
build/vpncmd 127.0.0.1:443 /SERVER /HUB:DEFAULT /CMD:"UserPasswordSet test /PASSWORD:test"
|
|
||||||
build/vpncmd 127.0.0.1:443 /SERVER /CMD:"OpenVpnMakeConfig ~/my_openvpn_config.zip"
|
|
||||||
|
|
||||||
unzip -d /tmp ~/my_openvpn_config.zip
|
./vpnserver start
|
||||||
|
|
||||||
|
#
|
||||||
|
# wait until server listen 443
|
||||||
|
#
|
||||||
|
set +e
|
||||||
|
started="false"
|
||||||
|
for i in 1 2 3 4 5 6
|
||||||
|
do
|
||||||
|
s=$(echo exit | telnet 127.0.0.1 443 | grep "Connected")
|
||||||
|
if [ "$s" != "" ]
|
||||||
|
then
|
||||||
|
started="true"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
sleep 10
|
||||||
|
done
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$started" == "false" ]
|
||||||
|
then
|
||||||
|
echo "vpnserver is not listening 127.0.0.1:443"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
./vpncmd 127.0.0.1:443 /SERVER /HUB:DEFAULT /CMD:SecureNatEnable
|
||||||
|
./vpncmd 127.0.0.1:443 /SERVER /CMD:"ProtoOptionsSet OpenVPN /NAME:Enabled /VALUE:True"
|
||||||
|
./vpncmd 127.0.0.1:443 /SERVER /CMD:"PortsUDPSet 1194"
|
||||||
|
./vpncmd 127.0.0.1:443 /SERVER /HUB:DEFAULT /CMD:"UserCreate test /GROUP:none /REALNAME:none /NOTE:none"
|
||||||
|
./vpncmd 127.0.0.1:443 /SERVER /HUB:DEFAULT /CMD:"UserPasswordSet test /PASSWORD:test"
|
||||||
|
./vpncmd 127.0.0.1:443 /SERVER /CMD:"OpenVpnMakeConfig my_openvpn_config.zip"
|
||||||
|
|
||||||
|
unzip -d /tmp my_openvpn_config.zip
|
||||||
|
12
.cirrus.yml
12
.cirrus.yml
@ -2,23 +2,23 @@ FreeBSD_task:
|
|||||||
matrix:
|
matrix:
|
||||||
env:
|
env:
|
||||||
SSL: openssl
|
SSL: openssl
|
||||||
|
OPENSSL_ROOT_DIR: /usr/local
|
||||||
env:
|
env:
|
||||||
SSL: libressl
|
SSL: openssl32
|
||||||
env:
|
OPENSSL_ROOT_DIR: /usr/local
|
||||||
SSL: libressl-devel
|
|
||||||
env:
|
env:
|
||||||
# base openssl
|
# base openssl
|
||||||
SSL:
|
SSL:
|
||||||
matrix:
|
matrix:
|
||||||
freebsd_instance:
|
freebsd_instance:
|
||||||
image_family: freebsd-12-1
|
image_family: freebsd-13-2
|
||||||
prepare_script:
|
prepare_script:
|
||||||
- pkg install -y cmake git $SSL
|
- pkg install -y pkgconf cmake git libsodium $SSL
|
||||||
- git submodule update --init --recursive
|
- git submodule update --init --recursive
|
||||||
configure_script:
|
configure_script:
|
||||||
- ./configure
|
- ./configure
|
||||||
build_script:
|
build_script:
|
||||||
- make -j $(sysctl -n hw.ncpu || echo 4) -C tmp
|
- make -j $(sysctl -n hw.ncpu || echo 4) -C build
|
||||||
test_script:
|
test_script:
|
||||||
- ldd build/vpnserver
|
- ldd build/vpnserver
|
||||||
- .ci/memory-leak-test.sh
|
- .ci/memory-leak-test.sh
|
||||||
|
47
.github/ISSUE_TEMPLATE.md
vendored
47
.github/ISSUE_TEMPLATE.md
vendored
@ -1,47 +0,0 @@
|
|||||||
Hi, there!
|
|
||||||
|
|
||||||
Thank you for using SoftEther.
|
|
||||||
|
|
||||||
Before you submit an issue, please read the following:
|
|
||||||
|
|
||||||
Is this a question?
|
|
||||||
|
|
||||||
- If the answer is "yes", then please ask your question on [www.vpnusers.com](http://www.vpnusers.com).
|
|
||||||
The issue section on GitHub is reserved for bugs and feature requests.
|
|
||||||
|
|
||||||
- If the answer is "no", please read the following:
|
|
||||||
|
|
||||||
We provide a template which is specifically made for bug reports, in order to be sure that the report includes enough details to be helpful.
|
|
||||||
|
|
||||||
Please use or adapt it as needed.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Prerequisites
|
|
||||||
|
|
||||||
* [ ] Can you reproduce?
|
|
||||||
* [ ] Are you running the latest version of SoftEtherVPN?
|
|
||||||
|
|
||||||
**SoftEther version:**
|
|
||||||
**Component:** [Server, Client, Bridge, etc.]
|
|
||||||
**Operating system:** [Windows, Linux, BSD, macOS, etc.]
|
|
||||||
**Architecture:** [64 bit, 32 bit]
|
|
||||||
|
|
||||||
[In case it's a computer with known specs, such as the Raspberry Pi, you can specify it omitting the details.]
|
|
||||||
**Processor:** [Specify brand and model. Example: AMD Ryzen 7 1800x]
|
|
||||||
|
|
||||||
### Description
|
|
||||||
|
|
||||||
[Description of the bug]
|
|
||||||
|
|
||||||
**Expected behavior:**
|
|
||||||
[What you expected to happen]
|
|
||||||
|
|
||||||
**Actual behavior:**
|
|
||||||
[What actually happened]
|
|
||||||
|
|
||||||
### Steps to reproduce
|
|
||||||
|
|
||||||
1. [First step]
|
|
||||||
2. [Second step]
|
|
||||||
3. [And so on...]
|
|
87
.github/ISSUE_TEMPLATE/bug_report_or_issue_report.yml
vendored
Normal file
87
.github/ISSUE_TEMPLATE/bug_report_or_issue_report.yml
vendored
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
name: Bug Report or Issue Report
|
||||||
|
description: File a bug report or an issue report
|
||||||
|
labels: "needs-triage"
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Thanks for taking the time to fill out this bug report!
|
||||||
|
We provide a template which is specifically made for bug reports, to be sure that the report includes enough details to be helpful.
|
||||||
|
|
||||||
|
- type: checkboxes
|
||||||
|
attributes:
|
||||||
|
label: Are you using SoftEther VPN 5.x?
|
||||||
|
description: |
|
||||||
|
This issue tracker is for SoftEther VPN Developer Edition versioned 5.x.
|
||||||
|
Please report issues about SoftEther VPN Stable Edition versioned 4.x through the correct path.
|
||||||
|
See also [the top of the issue tracker](https://github.com/SoftEtherVPN/SoftEtherVPN/issues/new/choose).
|
||||||
|
options:
|
||||||
|
- label: Yes, I'm using SoftEther VPN 5.x, not 4.x.
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: Version
|
||||||
|
description: |
|
||||||
|
The exact version you are using.
|
||||||
|
It would be very nice if you let us know version tag or commit hash.
|
||||||
|
placeholder: "5.02.5180 / 09b7e4f / 5.01.9674+git20200806+8181039+dfsg2-2build1"
|
||||||
|
|
||||||
|
- type: dropdown
|
||||||
|
attributes:
|
||||||
|
label: Component
|
||||||
|
description: Which component did you encounter an issue with?
|
||||||
|
multiple: true
|
||||||
|
options:
|
||||||
|
- VPN Server
|
||||||
|
- VPN Bridge
|
||||||
|
- VPN Client
|
||||||
|
- VPN Tools
|
||||||
|
- Other
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: Operating system & version
|
||||||
|
placeholder: "Windows 11 Pro 23H2 / Ubuntu 22.04 / FreeBSD 14.0 / macOS Sonoma / Independent"
|
||||||
|
description: |
|
||||||
|
Let us know about your operating system and version.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: Architecture or Hardware model
|
||||||
|
placeholder: "amd64 / aarch64 / Raspberry Pi 4B+ / Apple M2"
|
||||||
|
description: |
|
||||||
|
Necessary if your issue is architecture-specific.
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Steps to reproduce
|
||||||
|
placeholder: Having detailed steps helps us reproduce the bug.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: ✔️ Expected Behavior
|
||||||
|
placeholder: What do you expect to happen?
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: ❌ Actual Behavior
|
||||||
|
placeholder: What happened actually?
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Anything else?
|
||||||
|
description: |
|
||||||
|
Links? References?
|
||||||
|
Anything that will give us more context about the issue you are encountering!
|
||||||
|
|
8
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
8
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
contact_links:
|
||||||
|
- name: Are you using SoftEther VPN 4.x?
|
||||||
|
about: This repository is for SoftEther VPN 5.x Developer Edition, developed independently from SoftEther VPN 4.x. Visit vpnusers.com if you would like to report issues or ask questions about version 4.x!
|
||||||
|
url: https://www.vpnusers.com/
|
||||||
|
|
||||||
|
- name: Questions about SoftEtherVPN 5.x
|
||||||
|
about: Visit Discussions to ask community to help.
|
||||||
|
url: https://github.com/SoftEtherVPN/SoftEtherVPN/discussions/new?category=q-a
|
39
.github/workflows/build_source_release.yml
vendored
Normal file
39
.github/workflows/build_source_release.yml
vendored
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
name: Build Source Release
|
||||||
|
|
||||||
|
# Trigger whenever a release is created
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- created
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: archive
|
||||||
|
id: archive
|
||||||
|
run: |
|
||||||
|
VERSION=${{ github.event.release.tag_name }}
|
||||||
|
PKGNAME="SoftEtherVPN-$VERSION"
|
||||||
|
mkdir -p /tmp/$PKGNAME
|
||||||
|
mv * /tmp/$PKGNAME
|
||||||
|
mv /tmp/$PKGNAME .
|
||||||
|
TARBALL=$PKGNAME.tar.xz
|
||||||
|
tar cJf $TARBALL $PKGNAME
|
||||||
|
echo "tarball=$TARBALL" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: upload tarball
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ github.event.release.upload_url }}
|
||||||
|
asset_path: ./${{ steps.archive.outputs.tarball }}
|
||||||
|
asset_name: ${{ steps.archive.outputs.tarball }}
|
||||||
|
asset_content_type: application/gzip
|
43
.github/workflows/coverity.yml
vendored
Normal file
43
.github/workflows/coverity.yml
vendored
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
|
||||||
|
name: Coverity
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 * * *"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
scan:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ github.repository_owner == 'SoftEtherVPN' }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- name: Install apt dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y cmake gcc g++ libncurses5-dev libreadline-dev libssl-dev make zlib1g-dev libsodium-dev
|
||||||
|
- name: Download Coverity build tool
|
||||||
|
run: |
|
||||||
|
wget -c -N https://scan.coverity.com/download/linux64 --post-data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=SoftEtherVPN%2FSoftEtherVPN" -O coverity_tool.tar.gz
|
||||||
|
mkdir coverity_tool
|
||||||
|
tar xzf coverity_tool.tar.gz --strip 1 -C coverity_tool
|
||||||
|
- name: Configure
|
||||||
|
run: |
|
||||||
|
./configure
|
||||||
|
- name: Build with Coverity build tool
|
||||||
|
run: |
|
||||||
|
export PATH=`pwd`/coverity_tool/bin:$PATH
|
||||||
|
cov-build --dir cov-int make -C build
|
||||||
|
- name: Submit build result to Coverity Scan
|
||||||
|
run: |
|
||||||
|
tar czvf cov.tar.gz cov-int
|
||||||
|
curl --form token=${{ secrets.COVERITY_SCAN_TOKEN }} \
|
||||||
|
--form email=chipitsine@gmail.com \
|
||||||
|
--form file=@cov.tar.gz \
|
||||||
|
--form version="Commit $GITHUB_SHA" \
|
||||||
|
--form description="Build submitted via CI" \
|
||||||
|
https://scan.coverity.com/builds?project=SoftEtherVPN%2FSoftEtherVPN
|
33
.github/workflows/fedora-rawhide.yml
vendored
Normal file
33
.github/workflows/fedora-rawhide.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
name: Fedora/Rawhide
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 25 * *"
|
||||||
|
push:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_and_test:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
cc: [ gcc, clang ]
|
||||||
|
name: ${{ matrix.cc }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: fedora:rawhide
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
dnf -y install git cmake ncurses-devel openssl-devel libsodium-devel readline-devel zlib-devel gcc-c++ clang
|
||||||
|
- name: Compile with ${{ matrix.cc }}
|
||||||
|
run: |
|
||||||
|
export CC=${{ matrix.cc }}
|
||||||
|
./configure
|
||||||
|
make -C build
|
||||||
|
|
34
.github/workflows/linux.yml
vendored
Normal file
34
.github/workflows/linux.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_and_test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: sudo apt update && sudo apt-get -y install cmake gcc g++ ninja-build libncurses5-dev libreadline-dev libsodium-dev libssl-dev make zlib1g-dev liblz4-dev libnl-genl-3-dev
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
|
||||||
|
cmake --build .
|
||||||
|
|
||||||
|
- name: Build deb packages
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
cpack -C Release -G DEB
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: |
|
||||||
|
.ci/appveyor-deb-install-test.sh
|
||||||
|
sudo apt-get -y install autoconf libtool liblzo2-dev libpam-dev fping unzip libcap-ng-dev # To build OpenVPN
|
||||||
|
sudo .ci/start-se-openvpn.sh
|
||||||
|
sudo .ci/run-openvpn-tests.sh
|
28
.github/workflows/macos.yml
vendored
Normal file
28
.github/workflows/macos.yml
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
on: [push, pull_request, workflow_dispatch]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_and_test:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [macos-13, macos-12, macos-11]
|
||||||
|
name: ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
brew install libsodium
|
||||||
|
- name: Compile
|
||||||
|
run: |
|
||||||
|
./configure
|
||||||
|
make -C build
|
||||||
|
- name: Test
|
||||||
|
run: |
|
||||||
|
otool -L build/vpnserver
|
||||||
|
.ci/memory-leak-test.sh
|
||||||
|
|
23
.github/workflows/musl.yml
vendored
Normal file
23
.github/workflows/musl.yml
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
name: alpine/musl
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
musl:
|
||||||
|
name: gcc
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: alpine:latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- name: Install dependencies
|
||||||
|
run: apk add binutils --no-cache build-base readline-dev openssl-dev ncurses-dev git cmake zlib-dev libsodium-dev gnu-libiconv
|
||||||
|
- name: Configure
|
||||||
|
run: ./configure
|
||||||
|
- name: make
|
||||||
|
run: make -C build
|
16
.github/workflows/stb_check.yml
vendored
Normal file
16
.github/workflows/stb_check.yml
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- name: Check
|
||||||
|
run: |
|
||||||
|
cd developer_tools/stbchecker
|
||||||
|
dotnet run ../../src/bin/hamcore
|
63
.github/workflows/windows.yml
vendored
Normal file
63
.github/workflows/windows.yml
vendored
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_and_test:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
platform: [
|
||||||
|
{ ARCHITECTURE: x86, COMPILER_PATH: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/Llvm/bin/clang-cl.exe", VCPKG_TRIPLET: "x86-windows-static", VCVARS_PATH: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars32.bat"},
|
||||||
|
{ ARCHITECTURE: x64, COMPILER_PATH: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/Llvm/x64/bin/clang-cl.exe", VCPKG_TRIPLET: "x64-windows-static", VCVARS_PATH: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat"}
|
||||||
|
]
|
||||||
|
runs-on: windows-latest
|
||||||
|
name: ${{ matrix.platform.ARCHITECTURE }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- name: Cache vcpkg
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: 'build/vcpkg_installed/'
|
||||||
|
key: vcpkg-${{ matrix.platform.VCPKG_TRIPLET }}
|
||||||
|
- name: Set version variables
|
||||||
|
run: |
|
||||||
|
$v = python version.py
|
||||||
|
echo "VERSION=$v" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
|
shell: pwsh
|
||||||
|
- name: Build
|
||||||
|
env:
|
||||||
|
ARCHITECTURE: ${{ matrix.platform.ARCHITECTURE }}
|
||||||
|
COMPILER_PATH: ${{ matrix.platform.COMPILER_PATH }}
|
||||||
|
VCPKG_TRIPLET: ${{ matrix.platform.VCPKG_TRIPLET }}
|
||||||
|
VCVARS_PATH: ${{ matrix.platform.VCVARS_PATH }}
|
||||||
|
run: |
|
||||||
|
set BUILD_NUMBER=0
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
call "%VCVARS_PATH%"
|
||||||
|
cmake -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="C:\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=%VCPKG_TRIPLET% -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER="%COMPILER_PATH%" -DCMAKE_CXX_COMPILER="%COMPILER_PATH%" -DBUILD_NUMBER=%BUILD_NUMBER% ..
|
||||||
|
cmake --build .
|
||||||
|
mkdir installers
|
||||||
|
vpnsetup /SFXMODE:vpnclient /SFXOUT:"installers\softether-vpnclient-%VERSION%.%BUILD_NUMBER%.%ARCHITECTURE%.exe"
|
||||||
|
vpnsetup /SFXMODE:vpnserver_vpnbridge /SFXOUT:"installers\softether-vpnserver_vpnbridge-%VERSION%.%BUILD_NUMBER%.%ARCHITECTURE%.exe"
|
||||||
|
shell: cmd
|
||||||
|
- name: Test
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
. .ci/appveyor-vpntest.ps1
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
if-no-files-found: error
|
||||||
|
name: Binaries-${{ matrix.platform.ARCHITECTURE }}
|
||||||
|
path: |
|
||||||
|
build/*.exe
|
||||||
|
build/*.pdb
|
||||||
|
build/*.se2
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
if-no-files-found: error
|
||||||
|
name: Installers-${{ matrix.platform.ARCHITECTURE }}
|
||||||
|
path: build/installers
|
94
.github/workflows/windows_release.yml
vendored
Normal file
94
.github/workflows/windows_release.yml
vendored
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
name: "Release"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: "${{ github.workflow }}-${{ github.ref }}"
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: windows-latest
|
||||||
|
outputs:
|
||||||
|
upload_url: "${{ steps.create_release.outputs.upload_url }}"
|
||||||
|
steps:
|
||||||
|
- name: "Checkout repository"
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: "Create GitHub release"
|
||||||
|
id: create_release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
build-windows:
|
||||||
|
name: ${{ matrix.platform.ARCHITECTURE }}
|
||||||
|
runs-on: windows-latest
|
||||||
|
needs: ["release"]
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
platform: [
|
||||||
|
{ ARCHITECTURE: x86, COMPILER_PATH: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/Llvm/bin/clang-cl.exe", VCPKG_TRIPLET: "x86-windows-static", VCVARS_PATH: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars32.bat"},
|
||||||
|
{ ARCHITECTURE: x64, COMPILER_PATH: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/Llvm/x64/bin/clang-cl.exe", VCPKG_TRIPLET: "x64-windows-static", VCVARS_PATH: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat"}
|
||||||
|
]
|
||||||
|
steps:
|
||||||
|
- name: "Checkout repository"
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- name: Cache vcpkg
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: 'build/vcpkg_installed/'
|
||||||
|
key: vcpkg-release-${{ matrix.platform.VCPKG_TRIPLET }}
|
||||||
|
- name: Set version variables
|
||||||
|
run: |
|
||||||
|
$b=(Get-Content CMakeSettings.json | Out-String | ConvertFrom-Json).environments.BuildNumber
|
||||||
|
echo "BUILD_NUMBER=$b" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
|
$v = python version.py
|
||||||
|
echo "VERSION=$v" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
|
shell: pwsh
|
||||||
|
- name: Build
|
||||||
|
env:
|
||||||
|
ARCHITECTURE: ${{ matrix.platform.ARCHITECTURE }}
|
||||||
|
COMPILER_PATH: ${{ matrix.platform.COMPILER_PATH }}
|
||||||
|
VCPKG_TRIPLET: ${{ matrix.platform.VCPKG_TRIPLET }}
|
||||||
|
VCVARS_PATH: ${{ matrix.platform.VCVARS_PATH }}
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
call "%VCVARS_PATH%"
|
||||||
|
cmake -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="C:\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=%VCPKG_TRIPLET% -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER="%COMPILER_PATH%" -DCMAKE_CXX_COMPILER="%COMPILER_PATH%" -DBUILD_NUMBER=%BUILD_NUMBER% ..
|
||||||
|
cmake --build .
|
||||||
|
mkdir installers
|
||||||
|
vpnsetup /SFXMODE:vpnclient /SFXOUT:"installers\softether-vpnclient-%VERSION%.%BUILD_NUMBER%.%ARCHITECTURE%.exe"
|
||||||
|
vpnsetup /SFXMODE:vpnserver_vpnbridge /SFXOUT:"installers\softether-vpnserver_vpnbridge-%VERSION%.%BUILD_NUMBER%.%ARCHITECTURE%.exe"
|
||||||
|
shell: cmd
|
||||||
|
|
||||||
|
- name: dir
|
||||||
|
run: |
|
||||||
|
Get-ChildItem -Recurse build/installers
|
||||||
|
shell: pwsh
|
||||||
|
|
||||||
|
- name: "Upload softether-vpnclient"
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: "${{ github.token }}"
|
||||||
|
with:
|
||||||
|
upload_url: "${{ needs.release.outputs.upload_url }}"
|
||||||
|
asset_path: "build/installers/softether-vpnclient-${{ env.VERSION }}.${{ env.BUILD_NUMBER }}.${{ matrix.platform.ARCHITECTURE }}.exe"
|
||||||
|
asset_name: "softether-vpnclient-${{ env.VERSION }}.${{ env.BUILD_NUMBER }}.${{ matrix.platform.ARCHITECTURE }}.exe"
|
||||||
|
asset_content_type: "application/octet-stream"
|
||||||
|
- name: "Upload softether-vpnserver_vpnbridge"
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: "${{ github.token }}"
|
||||||
|
with:
|
||||||
|
upload_url: "${{ needs.release.outputs.upload_url }}"
|
||||||
|
asset_path: "build/installers/softether-vpnserver_vpnbridge-${{ env.VERSION }}.${{ env.BUILD_NUMBER }}.${{ matrix.platform.ARCHITECTURE }}.exe"
|
||||||
|
asset_name: "softether-vpnserver_vpnbridge-${{ env.VERSION }}.${{ env.BUILD_NUMBER }}.${{ matrix.platform.ARCHITECTURE }}.exe"
|
||||||
|
asset_content_type: "application/octet-stream"
|
||||||
|
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,6 +2,7 @@
|
|||||||
.cproject
|
.cproject
|
||||||
.project
|
.project
|
||||||
.settings/
|
.settings/
|
||||||
|
.vs/
|
||||||
Makefile
|
Makefile
|
||||||
/src/bin/*
|
/src/bin/*
|
||||||
!/src/bin/hamcore/
|
!/src/bin/hamcore/
|
||||||
@ -208,4 +209,4 @@ developer_tools/stbchecker/**/ASALocalRun/
|
|||||||
developer_tools/stbchecker/**/*.binlog
|
developer_tools/stbchecker/**/*.binlog
|
||||||
developer_tools/stbchecker/**/*.nvuser
|
developer_tools/stbchecker/**/*.nvuser
|
||||||
developer_tools/stbchecker/**/.mfractor/
|
developer_tools/stbchecker/**/.mfractor/
|
||||||
|
/vcpkg_installed
|
||||||
|
@ -1,32 +1,3 @@
|
|||||||
.ubuntu: &ubuntu_def
|
|
||||||
variables:
|
|
||||||
CMAKE_VERSION: 3.9.6
|
|
||||||
except:
|
|
||||||
changes:
|
|
||||||
- .appveyor.yml
|
|
||||||
- .travis.yml
|
|
||||||
- .azure-pipelines.yml
|
|
||||||
- .cirrus.yml
|
|
||||||
before_script:
|
|
||||||
- REPOSITORY="$PWD" && cd ..
|
|
||||||
- apt-get update && apt-get install -y dpkg-dev wget g++ gcc libncurses5-dev libreadline-dev libssl-dev make zlib1g-dev git file
|
|
||||||
- wget https://cmake.org/files/v${CMAKE_VERSION%.*}/cmake-${CMAKE_VERSION}.tar.gz && tar -xzf cmake-${CMAKE_VERSION}.tar.gz
|
|
||||||
- cd cmake-${CMAKE_VERSION} && ./bootstrap && make install
|
|
||||||
- cd "$REPOSITORY" && git submodule update --init --recursive
|
|
||||||
script:
|
|
||||||
- ./configure
|
|
||||||
- make package -C tmp
|
|
||||||
- dpkg -i build/softether-vpn*.deb
|
|
||||||
- .ci/memory-leak-test.sh
|
|
||||||
|
|
||||||
trusty:
|
|
||||||
<<: *ubuntu_def
|
|
||||||
image: ubuntu:trusty
|
|
||||||
|
|
||||||
precise:
|
|
||||||
<<: *ubuntu_def
|
|
||||||
image: ubuntu:precise
|
|
||||||
|
|
||||||
# illumos gitlab-runner maintained by @hww3
|
# illumos gitlab-runner maintained by @hww3
|
||||||
build_illumos:
|
build_illumos:
|
||||||
only:
|
only:
|
||||||
@ -36,25 +7,5 @@ build_illumos:
|
|||||||
script:
|
script:
|
||||||
- git submodule init && git submodule update
|
- git submodule init && git submodule update
|
||||||
- CMAKE_FLAGS="-DCMAKE_PREFIX_PATH=/opt/local -DCMAKE_CXX_FLAGS=-m64 -DCMAKE_C_FLAGS=-m64" ./configure
|
- CMAKE_FLAGS="-DCMAKE_PREFIX_PATH=/opt/local -DCMAKE_CXX_FLAGS=-m64 -DCMAKE_C_FLAGS=-m64" ./configure
|
||||||
- gmake -C tmp
|
- gmake -C build
|
||||||
|
|
||||||
#
|
|
||||||
# flawfinder
|
|
||||||
# see https://docs.gitlab.com/ee/user/project/merge_requests/sast.html
|
|
||||||
#
|
|
||||||
sast:
|
|
||||||
image: docker:stable
|
|
||||||
variables:
|
|
||||||
DOCKER_DRIVER: overlay2
|
|
||||||
allow_failure: true
|
|
||||||
services:
|
|
||||||
- docker:stable-dind
|
|
||||||
script:
|
|
||||||
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
|
|
||||||
- docker run
|
|
||||||
--env SAST_CONFIDENCE_LEVEL="${SAST_CONFIDENCE_LEVEL:-3}"
|
|
||||||
--volume "$PWD:/code"
|
|
||||||
--volume /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
"registry.gitlab.com/gitlab-org/security-products/sast:$SP_VERSION" /app/bin/run /code
|
|
||||||
artifacts:
|
|
||||||
paths: [gl-sast-report.json]
|
|
||||||
|
12
.gitmodules
vendored
12
.gitmodules
vendored
@ -1,6 +1,12 @@
|
|||||||
[submodule "src/Mayaqua/3rdparty/cpu_features"]
|
[submodule "src/Mayaqua/3rdparty/cpu_features"]
|
||||||
path = src/Mayaqua/3rdparty/cpu_features
|
path = src/Mayaqua/3rdparty/cpu_features
|
||||||
url = https://github.com/google/cpu_features.git
|
url = https://github.com/google/cpu_features.git
|
||||||
[submodule "src/Mayaqua/3rdparty/zlib"]
|
[submodule "3rdparty/tinydir"]
|
||||||
path = src/Mayaqua/3rdparty/zlib
|
path = 3rdparty/tinydir
|
||||||
url = https://github.com/madler/zlib.git
|
url = https://github.com/cxong/tinydir.git
|
||||||
|
[submodule "3rdparty/BLAKE2"]
|
||||||
|
path = 3rdparty/BLAKE2
|
||||||
|
url = https://github.com/BLAKE2/BLAKE2.git
|
||||||
|
[submodule "src/libhamcore"]
|
||||||
|
path = src/libhamcore
|
||||||
|
url = https://github.com/SoftEtherVPN/libhamcore.git
|
||||||
|
38
.travis.yml
38
.travis.yml
@ -1,5 +1,5 @@
|
|||||||
sudo: required
|
sudo: required
|
||||||
dist: xenial
|
dist: bionic
|
||||||
|
|
||||||
language: c
|
language: c
|
||||||
|
|
||||||
@ -20,7 +20,8 @@ matrix:
|
|||||||
os: linux
|
os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
- env: OPENSSL_VERSION="1.1.1c" LABEL="linux-ppc64le" CMAKE_VERSION="3.9.6"
|
- env: OPENSSL_VERSION="1.1.1c" LABEL="linux-ppc64le" CMAKE_VERSION="3.9.6"
|
||||||
os: linux-ppc64le
|
arch: ppc64le
|
||||||
|
os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
install:
|
install:
|
||||||
- wget https://cmake.org/files/v${CMAKE_VERSION%.*}/cmake-${CMAKE_VERSION}.tar.gz && tar -xzf cmake-${CMAKE_VERSION}.tar.gz
|
- wget https://cmake.org/files/v${CMAKE_VERSION%.*}/cmake-${CMAKE_VERSION}.tar.gz && tar -xzf cmake-${CMAKE_VERSION}.tar.gz
|
||||||
@ -28,9 +29,6 @@ matrix:
|
|||||||
- ./bootstrap > build-deps.log 2>&1 || (cat build-deps.log && exit 1)
|
- ./bootstrap > build-deps.log 2>&1 || (cat build-deps.log && exit 1)
|
||||||
- sudo make install > build-deps.log 2>&1 || (cat build-deps.log && exit 1)
|
- sudo make install > build-deps.log 2>&1 || (cat build-deps.log && exit 1)
|
||||||
- cd ..
|
- cd ..
|
||||||
- env: OPENSSL_VERSION="1.0.2s" RUN_COVERITY="1"
|
|
||||||
os: linux
|
|
||||||
compiler: clang
|
|
||||||
- env: OPENSSL_VERSION="1.1.1c"
|
- env: OPENSSL_VERSION="1.1.1c"
|
||||||
os: linux
|
os: linux
|
||||||
compiler: clang
|
compiler: clang
|
||||||
@ -38,26 +36,8 @@ matrix:
|
|||||||
os: linux
|
os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
before_install:
|
before_install:
|
||||||
|
- sudo apt-get -y install libsodium-dev
|
||||||
- bash .ci/build-libressl.sh > build-deps.log 2>&1 || (cat build-deps.log && exit 1)
|
- bash .ci/build-libressl.sh > build-deps.log 2>&1 || (cat build-deps.log && exit 1)
|
||||||
- env: LABEL="check stb files"
|
|
||||||
os: linux
|
|
||||||
language: csharp
|
|
||||||
mono: none
|
|
||||||
dotnet: 2.2.203
|
|
||||||
before_install:
|
|
||||||
- true
|
|
||||||
script:
|
|
||||||
- cd developer_tools/stbchecker
|
|
||||||
- dotnet run ../../src/bin/hamcore
|
|
||||||
- os: osx
|
|
||||||
compiler: clang
|
|
||||||
before_install:
|
|
||||||
- true
|
|
||||||
script:
|
|
||||||
- ./configure
|
|
||||||
- make -C tmp
|
|
||||||
- otool -L build/vpnserver
|
|
||||||
- .ci/memory-leak-test.sh
|
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
@ -65,18 +45,16 @@ cache:
|
|||||||
- ${HOME}/opt
|
- ${HOME}/opt
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
|
- sudo apt-get -y install libsodium-dev
|
||||||
- bash .ci/build-openssl.sh > build-deps.log 2>&1 || (cat build-deps.log && exit 1)
|
- bash .ci/build-openssl.sh > build-deps.log 2>&1 || (cat build-deps.log && exit 1)
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- export OPENSSL_ROOT_DIR=${OPENSSL_INSTALL_DIR}
|
- export OPENSSL_ROOT_DIR=${OPENSSL_INSTALL_DIR}
|
||||||
- export LD_LIBRARY_PATH="${HOME}/opt/lib:${LD_LIBRARY_PATH:-}"
|
|
||||||
- export CFLAGS="-I${HOME}/opt/include"
|
- export CFLAGS="-I${HOME}/opt/include"
|
||||||
- export LDFLAGS="-L${HOME}/opt/lib"
|
- export LDFLAGS="-L${HOME}/opt/lib -Wl,-rpath,${HOME}/opt/lib"
|
||||||
- echo "check_certificate = off" > ~/.wgetrc
|
|
||||||
- .ci/coverity.sh
|
|
||||||
- .ci/sonarcloud.sh
|
- .ci/sonarcloud.sh
|
||||||
- ./configure
|
- ./configure
|
||||||
- make -j $(nproc || sysctl -n hw.ncpu || echo 4) -C tmp
|
- make -j $(nproc || sysctl -n hw.ncpu || echo 4) -C build
|
||||||
- ldd build/vpnserver
|
- ldd build/vpnserver
|
||||||
- if [ "${BUILD_DEB}" = "1" ]; then make package -C tmp; fi
|
- if [ "${BUILD_DEB}" = "1" ]; then make package -C build; fi
|
||||||
- .ci/memory-leak-test.sh
|
- .ci/memory-leak-test.sh
|
||||||
|
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"cmake.configureOnOpen": false
|
||||||
|
}
|
1
3rdparty/BLAKE2
vendored
Submodule
1
3rdparty/BLAKE2
vendored
Submodule
Submodule 3rdparty/BLAKE2 added at b52178a376
1
3rdparty/tinydir
vendored
Submodule
1
3rdparty/tinydir
vendored
Submodule
Submodule 3rdparty/tinydir added at ec6bff2043
@ -52,6 +52,8 @@ DEVELOPMENT BOARD MEMBERS:
|
|||||||
- Ilya Shipitsin
|
- Ilya Shipitsin
|
||||||
https://github.com/chipitsine
|
https://github.com/chipitsine
|
||||||
|
|
||||||
|
- Yihong Wu
|
||||||
|
https://github.com/domosekai
|
||||||
|
|
||||||
SPECIAL CONTRIBUTORS:
|
SPECIAL CONTRIBUTORS:
|
||||||
|
|
||||||
@ -112,6 +114,7 @@ CONTRIBUTORS:
|
|||||||
- NV <nvsofts@gmail.com>
|
- NV <nvsofts@gmail.com>
|
||||||
- Olimjon <olim98@bk.ru>
|
- Olimjon <olim98@bk.ru>
|
||||||
- parly <https://github.com/parly>
|
- parly <https://github.com/parly>
|
||||||
|
- PeTeeR <tom2pet@gmail.com>
|
||||||
- Quantum <quantum2048@gmail.com>
|
- Quantum <quantum2048@gmail.com>
|
||||||
- Quintin <quintin@last.za.net>
|
- Quintin <quintin@last.za.net>
|
||||||
- Raymond Tau <raymondtau@gmail.com>
|
- Raymond Tau <raymondtau@gmail.com>
|
||||||
|
@ -1,12 +1,34 @@
|
|||||||
cmake_minimum_required(VERSION 3.7)
|
cmake_minimum_required(VERSION 3.10)
|
||||||
|
|
||||||
|
set(BUILD_NUMBER CACHE STRING "The number of the current build.")
|
||||||
|
|
||||||
|
if ("${BUILD_NUMBER}" STREQUAL "")
|
||||||
|
set(BUILD_NUMBER "5183")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (BUILD_NUMBER LESS 5180)
|
||||||
|
message(WARNING
|
||||||
|
"Setting BUILD_NUMBER to a value less than 5180 will break compatibility with client binaries distributed by SoftEther Corporation. "
|
||||||
|
"Set to a value greater than or equal to 5180 if you want such clients to work properly.\n"
|
||||||
|
"For detailed info: https://github.com/SoftEtherVPN/SoftEtherVPN/issues/1392#issuecomment-867348281")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
#
|
||||||
|
# Link MSVC runtime statically
|
||||||
|
# this should be revisited after installer migration to MSI
|
||||||
|
#
|
||||||
|
cmake_policy(SET CMP0091 NEW)
|
||||||
|
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
|
|
||||||
project("SoftEther VPN"
|
project("SoftEther VPN"
|
||||||
VERSION 5.01.9674
|
VERSION "5.02.${BUILD_NUMBER}"
|
||||||
LANGUAGES C
|
LANGUAGES C
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(CMAKE_C_STANDARD 99)
|
||||||
|
|
||||||
set(TOP_DIRECTORY ${CMAKE_SOURCE_DIR})
|
set(TOP_DIRECTORY ${CMAKE_SOURCE_DIR})
|
||||||
set(BUILD_DIRECTORY ${TOP_DIRECTORY}/build)
|
set(BUILD_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||||
|
|
||||||
# We define a dedicated variable because CMAKE_BUILD_TYPE can have different
|
# We define a dedicated variable because CMAKE_BUILD_TYPE can have different
|
||||||
# configurations than "Debug" and "Release", such as "RelWithDebInfo".
|
# configurations than "Debug" and "Release", such as "RelWithDebInfo".
|
||||||
@ -17,27 +39,22 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Check that submodules are present only if source was downloaded with git
|
# Check that submodules are present only if source was downloaded with git
|
||||||
if(EXISTS "${TOP_DIRECTORY}/.git" AND NOT EXISTS "${TOP_DIRECTORY}/src/Mayaqua/3rdparty/cpu_features/CMakeLists.txt")
|
if(EXISTS "${TOP_DIRECTORY}/.git" AND NOT EXISTS "${TOP_DIRECTORY}/src/libhamcore/CMakeLists.txt")
|
||||||
message (FATAL_ERROR "Submodules are not initialized. Run\n\tgit submodule update --init --recursive")
|
message (FATAL_ERROR "Submodules are not initialized. Run\n\tgit submodule update --init --recursive")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Compare ${PROJECT_VERSION} and src/CurrentBuild.txt
|
if(WIN32 AND VCPKG_TARGET_TRIPLET AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
|
||||||
file(READ ${TOP_DIRECTORY}/src/CurrentBuild.txt CurrentBuild)
|
message (FATAL_ERROR "vcpkg not installed or integrated with Visual Studio. Install it and run\n\tvcpkg integrate install")
|
||||||
|
|
||||||
string(REGEX MATCH "VERSION_MAJOR ([0-9]+)" temp ${CurrentBuild})
|
|
||||||
string(REGEX REPLACE "VERSION_MAJOR ([0-9]+)" "\\1" CurrentBuild_MAJOR ${temp})
|
|
||||||
string(REGEX MATCH "VERSION_MINOR ([0-9]+)" temp ${CurrentBuild})
|
|
||||||
string(REGEX REPLACE "VERSION_MINOR ([0-9]+)" "\\1" CurrentBuild_MINOR ${temp})
|
|
||||||
string(REGEX MATCH "VERSION_BUILD ([0-9]+)" temp ${CurrentBuild})
|
|
||||||
string(REGEX REPLACE "VERSION_BUILD ([0-9]+)" "\\1" CurrentBuild_BUILD ${temp})
|
|
||||||
|
|
||||||
if(NOT ${PROJECT_VERSION} VERSION_EQUAL "${CurrentBuild_MAJOR}.${CurrentBuild_MINOR}.${CurrentBuild_BUILD}")
|
|
||||||
message (FATAL_ERROR "PROJECT_VERSION does not match to src/CurrentBuild.txt")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
|
|
||||||
|
#
|
||||||
|
# use rpath for locating installed libraries
|
||||||
|
#
|
||||||
|
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
||||||
|
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||||
|
|
||||||
include(CheckIncludeFile)
|
include(CheckIncludeFile)
|
||||||
Check_Include_File(sys/auxv.h HAVE_SYS_AUXV)
|
Check_Include_File(sys/auxv.h HAVE_SYS_AUXV)
|
||||||
@ -59,8 +76,6 @@ string(TIMESTAMP TIME_SECOND "%S" UTC)
|
|||||||
message(STATUS "Build date: ${DATE_DAY}/${DATE_MONTH}/${DATE_YEAR}")
|
message(STATUS "Build date: ${DATE_DAY}/${DATE_MONTH}/${DATE_YEAR}")
|
||||||
message(STATUS "Build time: ${TIME_HOUR}:${TIME_MINUTE}:${TIME_SECOND}")
|
message(STATUS "Build time: ${TIME_HOUR}:${TIME_MINUTE}:${TIME_SECOND}")
|
||||||
|
|
||||||
set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
|
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
@ -90,5 +105,14 @@ if(UNIX)
|
|||||||
set(CPACK_RPM_PACKAGE_GROUP "Applications/Internet")
|
set(CPACK_RPM_PACKAGE_GROUP "Applications/Internet")
|
||||||
set(CPACK_RPM_PACKAGE_LICENSE "ASL 2.0")
|
set(CPACK_RPM_PACKAGE_LICENSE "ASL 2.0")
|
||||||
|
|
||||||
|
# Exclude system directories
|
||||||
|
if(CPACK_GENERATOR STREQUAL "RPM")
|
||||||
|
execute_process(
|
||||||
|
COMMAND rpm -ql filesystem
|
||||||
|
COMMAND tr \n \;
|
||||||
|
OUTPUT_VARIABLE CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION
|
||||||
|
ERROR_QUIET)
|
||||||
|
endif()
|
||||||
|
|
||||||
include(CPack)
|
include(CPack)
|
||||||
endif()
|
endif()
|
||||||
|
141
CMakeSettings.json
Normal file
141
CMakeSettings.json
Normal file
@ -0,0 +1,141 @@
|
|||||||
|
{
|
||||||
|
"environments": [ { "BuildNumber": "5183" } ],
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "x64-native",
|
||||||
|
"description": "Target x64 with 64-bit compiler",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"configurationType": "RelWithDebInfo",
|
||||||
|
"inheritEnvironments": [ "clang_cl_x64_x64" ],
|
||||||
|
"buildRoot": "${projectDir}\\out\\build\\${name}",
|
||||||
|
"installRoot": "${projectDir}\\out\\install\\${name}",
|
||||||
|
"cmakeCommandArgs": "",
|
||||||
|
"buildCommandArgs": "",
|
||||||
|
"ctestCommandArgs": "",
|
||||||
|
"variables": [
|
||||||
|
{
|
||||||
|
"name": "BUILD_NUMBER",
|
||||||
|
"value": "${env.BuildNumber}",
|
||||||
|
"type": "STRING"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "CMAKE_C_COMPILER",
|
||||||
|
"value": "${env.VCINSTALLDIR}Tools/Llvm/x64/bin/clang-cl.exe",
|
||||||
|
"type": "FILEPATH"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "CMAKE_CXX_COMPILER",
|
||||||
|
"value": "${env.VCINSTALLDIR}Tools/Llvm/x64/bin/clang-cl.exe",
|
||||||
|
"type": "FILEPATH"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "VCPKG_TARGET_TRIPLET",
|
||||||
|
"value": "x64-windows-static",
|
||||||
|
"type": "STRING"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "x86-on-x64",
|
||||||
|
"description": "Target x86 with 64-bit compiler",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"configurationType": "RelWithDebInfo",
|
||||||
|
"inheritEnvironments": [ "clang_cl_x86_x64" ],
|
||||||
|
"buildRoot": "${projectDir}\\out\\build\\${name}",
|
||||||
|
"installRoot": "${projectDir}\\out\\install\\${name}",
|
||||||
|
"cmakeCommandArgs": "",
|
||||||
|
"buildCommandArgs": "",
|
||||||
|
"ctestCommandArgs": "",
|
||||||
|
"variables": [
|
||||||
|
{
|
||||||
|
"name": "BUILD_NUMBER",
|
||||||
|
"value": "${env.BuildNumber}",
|
||||||
|
"type": "STRING"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "CMAKE_C_COMPILER",
|
||||||
|
"value": "${env.VCINSTALLDIR}Tools/Llvm/x64/bin/clang-cl.exe",
|
||||||
|
"type": "FILEPATH"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "CMAKE_CXX_COMPILER",
|
||||||
|
"value": "${env.VCINSTALLDIR}Tools/Llvm/x64/bin/clang-cl.exe",
|
||||||
|
"type": "FILEPATH"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "VCPKG_TARGET_TRIPLET",
|
||||||
|
"value": "x86-windows-static",
|
||||||
|
"type": "STRING"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "x64-on-x86",
|
||||||
|
"description": "Target x64 with 32-bit compiler",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"configurationType": "RelWithDebInfo",
|
||||||
|
"inheritEnvironments": [ "clang_cl_x64" ],
|
||||||
|
"buildRoot": "${projectDir}\\out\\build\\${name}",
|
||||||
|
"installRoot": "${projectDir}\\out\\install\\${name}",
|
||||||
|
"cmakeCommandArgs": "",
|
||||||
|
"buildCommandArgs": "",
|
||||||
|
"ctestCommandArgs": "",
|
||||||
|
"variables": [
|
||||||
|
{
|
||||||
|
"name": "BUILD_NUMBER",
|
||||||
|
"value": "${env.BuildNumber}",
|
||||||
|
"type": "STRING"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "CMAKE_C_COMPILER",
|
||||||
|
"value": "${env.VCINSTALLDIR}Tools/Llvm/bin/clang-cl.exe",
|
||||||
|
"type": "FILEPATH"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "CMAKE_CXX_COMPILER",
|
||||||
|
"value": "${env.VCINSTALLDIR}Tools/Llvm/bin/clang-cl.exe",
|
||||||
|
"type": "FILEPATH"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "VCPKG_TARGET_TRIPLET",
|
||||||
|
"value": "x64-windows-static",
|
||||||
|
"type": "STRING"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "x86-native",
|
||||||
|
"description": "Target x86 with 32-bit compiler",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"configurationType": "RelWithDebInfo",
|
||||||
|
"inheritEnvironments": [ "clang_cl_x86" ],
|
||||||
|
"buildRoot": "${projectDir}\\out\\build\\${name}",
|
||||||
|
"installRoot": "${projectDir}\\out\\install\\${name}",
|
||||||
|
"cmakeCommandArgs": "",
|
||||||
|
"buildCommandArgs": "",
|
||||||
|
"ctestCommandArgs": "",
|
||||||
|
"variables": [
|
||||||
|
{
|
||||||
|
"name": "BUILD_NUMBER",
|
||||||
|
"value": "${env.BuildNumber}",
|
||||||
|
"type": "STRING"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "CMAKE_C_COMPILER",
|
||||||
|
"value": "${env.VCINSTALLDIR}Tools/Llvm/bin/clang-cl.exe",
|
||||||
|
"type": "FILEPATH"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "CMAKE_CXX_COMPILER",
|
||||||
|
"value": "${env.VCINSTALLDIR}Tools/Llvm/bin/clang-cl.exe",
|
||||||
|
"type": "FILEPATH"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "VCPKG_TARGET_TRIPLET",
|
||||||
|
"value": "x86-windows-static",
|
||||||
|
"type": "STRING"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
5
CODE_OF_CONDUCT.md
Normal file
5
CODE_OF_CONDUCT.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Contributor Code of Conduct
|
||||||
|
|
||||||
|
This project adheres to No Code of Conduct. We are all adults. We accept anyone's contributions. Nothing else matters.
|
||||||
|
|
||||||
|
For more information please visit the [No Code of Conduct](https://nocodeofconduct.com) homepage.
|
@ -1 +1 @@
|
|||||||
custom: https://salt.bountysource.com/teams/softether-vpn
|
liberapay: softether
|
||||||
|
79
README.md
79
README.md
@ -1,14 +1,18 @@
|
|||||||
# SoftEther VPN
|
# SoftEther VPN
|
||||||
|
|
||||||
[](https://ci.appveyor.com/project/softethervpn/softethervpn) [](https://travis-ci.org/SoftEtherVPN/SoftEtherVPN) [](https://gitlab.com/SoftEther/SoftEtherVPN/pipelines) [](https://scan.coverity.com/projects/softethervpn-softethervpn)
|
||Badges|
|
||||||
|
|---|---|
|
||||||
|
|GitLab CI|[](https://gitlab.com/SoftEther/SoftEtherVPN/pipelines)|
|
||||||
|
|Coverity Scan|[](https://scan.coverity.com/projects/softethervpn-softethervpn)|
|
||||||
|
|Cirrus CI|[](https://cirrus-ci.com/github/SoftEtherVPN/SoftEtherVPN)|
|
||||||
|
|
||||||
- [SoftEther VPN](#softether-vpn)
|
- [SoftEther VPN](#softether-vpn)
|
||||||
- [BOARD MEMBERS OF THIS REPOSITORY](#board-members-of-this-repository)
|
- [BOARD MEMBERS OF THIS REPOSITORY](#board-members-of-this-repository)
|
||||||
- [SOFTETHER VPN ADVANTAGES](#softether-vpn-advantages)
|
- [SOFTETHER VPN ADVANTAGES](#softether-vpn-advantages)
|
||||||
- [Installation](#installation)
|
- [Installation](#installation)
|
||||||
* [For Ubuntu](#for-ubuntu)
|
|
||||||
* [For FreeBSD](#for-freebsd)
|
* [For FreeBSD](#for-freebsd)
|
||||||
* [From binary installers:](#from-binary-installers)
|
* [For Windows](#for-windows)
|
||||||
|
* [From binary installers (stable channel)](#from-binary-installers-stable-channel)
|
||||||
* [Build from Source code](#build-from-source-code)
|
* [Build from Source code](#build-from-source-code)
|
||||||
- [About HTML5-based Modern Admin Console and JSON-RPC API Suite](#about-html5-based-modern-admin-console-and-json-rpc-api-suite)
|
- [About HTML5-based Modern Admin Console and JSON-RPC API Suite](#about-html5-based-modern-admin-console-and-json-rpc-api-suite)
|
||||||
* [Built-in SoftEther VPN Server HTML5 Ajax-based Web Administration Console](#built-in-softether-vpn-server-html5-ajax-based-web-administration-console)
|
* [Built-in SoftEther VPN Server HTML5 Ajax-based Web Administration Console](#built-in-softether-vpn-server-html5-ajax-based-web-administration-console)
|
||||||
@ -28,6 +32,8 @@ Stable Edition is available on
|
|||||||
https://github.com/SoftEtherVPN/SoftEtherVPN_Stable
|
https://github.com/SoftEtherVPN/SoftEtherVPN_Stable
|
||||||
which the non-developer user can stable use.
|
which the non-developer user can stable use.
|
||||||
|
|
||||||
|
Please note that [some features](#comparison-with-stable-edition) are not available in Stable Edition.
|
||||||
|
|
||||||
Source code packages (.zip and .tar.gz) and binary files of Stable Edition are also available:
|
Source code packages (.zip and .tar.gz) and binary files of Stable Edition are also available:
|
||||||
https://www.softether-download.com/
|
https://www.softether-download.com/
|
||||||
|
|
||||||
@ -66,7 +72,7 @@ world's most powerful and easy-to-use multi-protocol VPN software.
|
|||||||
SoftEther VPN runs on Windows, Linux, Mac, FreeBSD and Solaris.
|
SoftEther VPN runs on Windows, Linux, Mac, FreeBSD and Solaris.
|
||||||
|
|
||||||
SoftEther VPN supports most of widely-used VPN protocols
|
SoftEther VPN supports most of widely-used VPN protocols
|
||||||
including SSL-VPN, OpenVPN, IPsec, L2TP, MS-SSTP, L2TPv3 and EtherIP
|
including SSL-VPN, WireGuard, OpenVPN, IPsec, L2TP, MS-SSTP, L2TPv3 and EtherIP
|
||||||
by the single SoftEther VPN Server program.
|
by the single SoftEther VPN Server program.
|
||||||
|
|
||||||
More details on https://www.softether.org/.
|
More details on https://www.softether.org/.
|
||||||
@ -99,6 +105,7 @@ https://github.com/chipitsine
|
|||||||
|
|
||||||
- Supporting all popular VPN protocols by the single VPN server:
|
- Supporting all popular VPN protocols by the single VPN server:
|
||||||
SSL-VPN (HTTPS)
|
SSL-VPN (HTTPS)
|
||||||
|
WireGuard
|
||||||
OpenVPN
|
OpenVPN
|
||||||
IPsec
|
IPsec
|
||||||
L2TP
|
L2TP
|
||||||
@ -133,17 +140,37 @@ https://github.com/chipitsine
|
|||||||
releasing the build.
|
releasing the build.
|
||||||
- More details at https://www.softether.org/.
|
- More details at https://www.softether.org/.
|
||||||
|
|
||||||
|
# Comparison with Stable Edition
|
||||||
|
|
||||||
|
| Protocol | Stable Edition (SE) | Developer Edition (DE) | Comment |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| SSL-VPN | ✅ | ✅ | |
|
||||||
|
| OpenVPN | ✅ | ✅ | AEAD mode is supported in DE only. |
|
||||||
|
| IPsec | ✅ | ✅ | |
|
||||||
|
| L2TP | ✅ | ✅ | |
|
||||||
|
| MS-SSTP | ✅ | ✅ | |
|
||||||
|
| L2TPv3 | ✅ | ✅ | |
|
||||||
|
| EtherIP | ✅ | ✅ | |
|
||||||
|
| WireGuard | ❌ | ✅ | |
|
||||||
|
| IKEv2 | ❌ | ❌ | |
|
||||||
|
|
||||||
|
| Feature | Stable Edition (SE) | Developer Edition (DE) | Comment |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| Password Authentication | ✅ | ✅ | |
|
||||||
|
| RADIUS / NT Authentication | ✅ | ✅ | |
|
||||||
|
| Certificate Authentication | ⚠️ | ✅ | SE supports the feature in SSL-VPN only. |
|
||||||
|
| IPv6-capable VPN Tunnel | ⚠️ | ✅ | SE supports IPv6 in L2 VPN tunnels only. |
|
||||||
|
| IPv4 Route Management | ✅ | ✅ | Windows clients only |
|
||||||
|
| IPv6 Route Management | ❌ | ✅ | Windows clients only |
|
||||||
|
| TLS Server Verification | ⚠️ | ✅ | In SE you need to specify the exact certificate or CA to verify. DE can perform standard TLS verification and use the system CA store. |
|
||||||
|
| Dual-stack Name Resolution | ⚠️ | ✅ | SE attempts in IPv6 only after IPv4 has failed. |
|
||||||
|
| ECDSA Certificates Import | ❌ | ✅ | |
|
||||||
|
| Runs on Windows XP and Earlier | ✅ | ❌ | |
|
||||||
|
| Compatible with SoftEther VPN 1.0 | ✅ | ❌ | |
|
||||||
|
| AES-NI Hardware Acceleration | ⚠️ | ✅ | SE requires [intel_aes_lib](https://software.intel.com/sites/default/files/article/181731/intel-aesni-sample-library-v1.2.zip) to enable AES-NI, so x86 only. In DE, enabled by default as long as processor supports it (at least x86 and ARM). |
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
|
|
||||||
## For Ubuntu
|
|
||||||
|
|
||||||
Launchpad PPA maintained by [Dmitry Verkhoturov](https://github.com/paskal):
|
|
||||||
|
|
||||||
[Daily builds](https://code.launchpad.net/~paskal-07/+archive/ubuntu/softethervpn) (latest released tag)
|
|
||||||
|
|
||||||
[Nightly builds](https://code.launchpad.net/~paskal-07/+archive/ubuntu/softethervpn-nightly)
|
|
||||||
|
|
||||||
## For FreeBSD
|
## For FreeBSD
|
||||||
|
|
||||||
SoftEther VPN in FreeBSD Ports Collection is maintained by
|
SoftEther VPN in FreeBSD Ports Collection is maintained by
|
||||||
@ -172,7 +199,12 @@ sysrc softether_server_enable=yes
|
|||||||
Also SoftEther VPN [Stable Edition](https://www.freshports.org/security/softether-devel/) and
|
Also SoftEther VPN [Stable Edition](https://www.freshports.org/security/softether-devel/) and
|
||||||
[RTM version](https://www.freshports.org/security/softether/) are available on FreeBSD.
|
[RTM version](https://www.freshports.org/security/softether/) are available on FreeBSD.
|
||||||
|
|
||||||
## From binary installers:
|
## For Windows
|
||||||
|
|
||||||
|
[Nightly builds](https://dev.azure.com/SoftEther-VPN/SoftEther%20VPN/_build?definitionId=6)
|
||||||
|
(choose appropriate platform, then find binaries or installers as artifacts)
|
||||||
|
|
||||||
|
## From binary installers (stable channel)
|
||||||
|
|
||||||
Those can be found under https://www.softether-download.com/
|
Those can be found under https://www.softether-download.com/
|
||||||
There you can also find SoftEtherVPN source code in zip and tar formats.
|
There you can also find SoftEtherVPN source code in zip and tar formats.
|
||||||
@ -226,22 +258,23 @@ some censorship governments want to block your access to the source code
|
|||||||
of SoftEther VPN, by abusing their censorship firewalls.
|
of SoftEther VPN, by abusing their censorship firewalls.
|
||||||
|
|
||||||
To circumvent your censor's unjust restriction,
|
To circumvent your censor's unjust restriction,
|
||||||
SoftEther VPN Project distributes the up-to-date source-code
|
SoftEther VPN Project distributes the up-to-date source code
|
||||||
on all the following open-source repositories:
|
on all the following open-source repositories:
|
||||||
|
|
||||||
- GitHub
|
- GitHub
|
||||||
https://github.com/SoftEtherVPN/SoftEtherVPN/
|
https://github.com/SoftEtherVPN/SoftEtherVPN
|
||||||
|
|
||||||
```
|
$ git clone https://github.com/SoftEtherVPN/SoftEtherVPN.git
|
||||||
$ git clone https://github.com/SoftEtherVPN/SoftEtherVPN.git
|
|
||||||
```
|
|
||||||
|
|
||||||
- GitLab (mirrored from GitHub)
|
- GitLab (mirrored from GitHub)
|
||||||
https://gitlab.com/SoftEther/SoftEtherVPN/
|
https://gitlab.com/SoftEther/VPN
|
||||||
|
|
||||||
```
|
$ git clone https://gitlab.com/SoftEther/VPN.git
|
||||||
$ git clone https://gitlab.com/SoftEther/SoftEtherVPN.git
|
|
||||||
```
|
- OneDev (mirrored from GitHub)
|
||||||
|
https://code.onedev.io/SoftEther/VPN
|
||||||
|
|
||||||
|
$ git clone https://code.onedev.io/SoftEther/VPN.git
|
||||||
|
|
||||||
We hope that you can reach one of the above URLs at least!
|
We hope that you can reach one of the above URLs at least!
|
||||||
|
|
||||||
@ -254,7 +287,7 @@ Please send patches to us through GitHub.
|
|||||||
|
|
||||||
# DEAR SECURITY EXPERTS
|
# DEAR SECURITY EXPERTS
|
||||||
|
|
||||||
If you find a bug or a security vulnerability please kindly inform us
|
If you find a bug or a security vulnerability please [kindly inform](https://github.com/SoftEtherVPN/SoftEtherVPN/security/advisories/new) us
|
||||||
about the problem immediately so that we can fix the security problem
|
about the problem immediately so that we can fix the security problem
|
||||||
to protect a lot of users around the world as soon as possible.
|
to protect a lot of users around the world as soon as possible.
|
||||||
|
|
||||||
|
15
SECURITY.md
Normal file
15
SECURITY.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Security Policy
|
||||||
|
|
||||||
|
## Supported Versions
|
||||||
|
|
||||||
|
Use this section to tell people about which versions of your project are
|
||||||
|
currently being supported with security updates.
|
||||||
|
|
||||||
|
| Version | Supported |
|
||||||
|
| ------- | ------------------ |
|
||||||
|
| 5.x | :white_check_mark: |
|
||||||
|
|
||||||
|
|
||||||
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
|
Please use [github security reporting](https://github.com/SoftEtherVPN/SoftEtherVPN/security/advisories/new)
|
8
configure
vendored
8
configure
vendored
@ -17,8 +17,8 @@ echo
|
|||||||
echo 'Welcome to the corner-cutting configure script !'
|
echo 'Welcome to the corner-cutting configure script !'
|
||||||
echo
|
echo
|
||||||
|
|
||||||
if [ ! -d "tmp" ]; then
|
if [ ! -d "build" ]; then
|
||||||
mkdir tmp
|
mkdir build
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -z ${CMAKE_FLAGS+x} ]; then
|
if [ ! -z ${CMAKE_FLAGS+x} ]; then
|
||||||
@ -50,9 +50,9 @@ fi
|
|||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
(cd tmp && cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ${CMAKE_FLAGS} .. || exit 1)
|
(cd build && cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ${CMAKE_FLAGS} .. || exit 1)
|
||||||
|
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
echo "The Makefile is generated. Run 'make -C tmp' to build SoftEther VPN."
|
echo "The Makefile is generated. Run 'make -C build' to build SoftEther VPN."
|
||||||
|
@ -13,11 +13,11 @@ echo.
|
|||||||
echo Welcome to the corner-cutting configure script !
|
echo Welcome to the corner-cutting configure script !
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
if not exist "tmp" (
|
if not exist "build" (
|
||||||
mkdir tmp
|
mkdir build
|
||||||
)
|
)
|
||||||
|
|
||||||
cd tmp
|
cd build
|
||||||
|
|
||||||
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -G "NMake Makefiles" ..
|
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -G "NMake Makefiles" ..
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
|
@ -580,32 +580,32 @@ All APIs are based on the <a href="https://www.jsonrpc.org/specification">JSON-R
|
|||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.BroadcastBytes_u64</code></td>
|
<td><code>Recv.BroadcastBytes_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Number of broadcast packets (Recv)</td>
|
<td>Broadcast bytes (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.BroadcastCount_u64</code></td>
|
<td><code>Recv.BroadcastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Broadcast bytes (Recv)</td>
|
<td>Number of broadcast packets (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.UnicastBytes_u64</code></td>
|
<td><code>Recv.UnicastBytes_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Unicast count (Recv)</td>
|
<td>Unicast bytes (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.UnicastCount_u64</code></td>
|
<td><code>Recv.UnicastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Unicast bytes (Recv)</td>
|
<td>Unicast count (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.BroadcastBytes_u64</code></td>
|
<td><code>Send.BroadcastBytes_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Number of broadcast packets (Send)</td>
|
<td>Broadcast bytes (Send)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.BroadcastCount_u64</code></td>
|
<td><code>Send.BroadcastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Broadcast bytes (Send)</td>
|
<td>Number of broadcast packets (Send)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.UnicastBytes_u64</code></td>
|
<td><code>Send.UnicastBytes_u64</code></td>
|
||||||
@ -615,7 +615,7 @@ All APIs are based on the <a href="https://www.jsonrpc.org/specification">JSON-R
|
|||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.UnicastCount_u64</code></td>
|
<td><code>Send.UnicastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Unicast bytes (Send)</td>
|
<td>Unicast count (Send)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>CurrentTime_dt</code></td>
|
<td><code>CurrentTime_dt</code></td>
|
||||||
@ -2695,32 +2695,32 @@ All APIs are based on the <a href="https://www.jsonrpc.org/specification">JSON-R
|
|||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.BroadcastBytes_u64</code></td>
|
<td><code>Recv.BroadcastBytes_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Number of broadcast packets (Recv)</td>
|
<td>Broadcast bytes (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.BroadcastCount_u64</code></td>
|
<td><code>Recv.BroadcastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Broadcast bytes (Recv)</td>
|
<td>Number of broadcast packets (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.UnicastBytes_u64</code></td>
|
<td><code>Recv.UnicastBytes_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Unicast count (Recv)</td>
|
<td>Unicast bytes (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.UnicastCount_u64</code></td>
|
<td><code>Recv.UnicastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Unicast bytes (Recv)</td>
|
<td>Unicast count (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.BroadcastBytes_u64</code></td>
|
<td><code>Send.BroadcastBytes_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Number of broadcast packets (Send)</td>
|
<td>Broadcast bytes (Send)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.BroadcastCount_u64</code></td>
|
<td><code>Send.BroadcastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Broadcast bytes (Send)</td>
|
<td>Number of broadcast packets (Send)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.UnicastBytes_u64</code></td>
|
<td><code>Send.UnicastBytes_u64</code></td>
|
||||||
@ -2730,7 +2730,7 @@ All APIs are based on the <a href="https://www.jsonrpc.org/specification">JSON-R
|
|||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.UnicastCount_u64</code></td>
|
<td><code>Send.UnicastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Unicast bytes (Send)</td>
|
<td>Unicast count (Send)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>SecureNATEnabled_bool</code></td>
|
<td><code>SecureNATEnabled_bool</code></td>
|
||||||
@ -6212,32 +6212,32 @@ All APIs are based on the <a href="https://www.jsonrpc.org/specification">JSON-R
|
|||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.BroadcastBytes_u64</code></td>
|
<td><code>Recv.BroadcastBytes_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Number of broadcast packets (Recv)</td>
|
<td>Broadcast bytes (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.BroadcastCount_u64</code></td>
|
<td><code>Recv.BroadcastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Broadcast bytes (Recv)</td>
|
<td>Number of broadcast packets (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.UnicastBytes_u64</code></td>
|
<td><code>Recv.UnicastBytes_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Unicast count (Recv)</td>
|
<td>Unicast bytes (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.UnicastCount_u64</code></td>
|
<td><code>Recv.UnicastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Unicast bytes (Recv)</td>
|
<td>Unicast count (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.BroadcastBytes_u64</code></td>
|
<td><code>Send.BroadcastBytes_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Number of broadcast packets (Send)</td>
|
<td>Broadcast bytes (Send)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.BroadcastCount_u64</code></td>
|
<td><code>Send.BroadcastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Broadcast bytes (Send)</td>
|
<td>Number of broadcast packets (Send)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.UnicastBytes_u64</code></td>
|
<td><code>Send.UnicastBytes_u64</code></td>
|
||||||
@ -6247,7 +6247,7 @@ All APIs are based on the <a href="https://www.jsonrpc.org/specification">JSON-R
|
|||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.UnicastCount_u64</code></td>
|
<td><code>Send.UnicastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Unicast bytes (Send)</td>
|
<td>Unicast count (Send)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>UsePolicy_bool</code></td>
|
<td><code>UsePolicy_bool</code></td>
|
||||||
@ -6683,32 +6683,32 @@ All APIs are based on the <a href="https://www.jsonrpc.org/specification">JSON-R
|
|||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.BroadcastBytes_u64</code></td>
|
<td><code>Recv.BroadcastBytes_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Number of broadcast packets (Recv)</td>
|
<td>Broadcast bytes (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.BroadcastCount_u64</code></td>
|
<td><code>Recv.BroadcastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Broadcast bytes (Recv)</td>
|
<td>Number of broadcast packets (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.UnicastBytes_u64</code></td>
|
<td><code>Recv.UnicastBytes_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Unicast count (Recv)</td>
|
<td>Unicast bytes (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.UnicastCount_u64</code></td>
|
<td><code>Recv.UnicastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Unicast bytes (Recv)</td>
|
<td>Unicast count (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.BroadcastBytes_u64</code></td>
|
<td><code>Send.BroadcastBytes_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Number of broadcast packets (Send)</td>
|
<td>Broadcast bytes (Send)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.BroadcastCount_u64</code></td>
|
<td><code>Send.BroadcastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Broadcast bytes (Send)</td>
|
<td>Number of broadcast packets (Send)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.UnicastBytes_u64</code></td>
|
<td><code>Send.UnicastBytes_u64</code></td>
|
||||||
@ -6718,7 +6718,7 @@ All APIs are based on the <a href="https://www.jsonrpc.org/specification">JSON-R
|
|||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.UnicastCount_u64</code></td>
|
<td><code>Send.UnicastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Unicast bytes (Send)</td>
|
<td>Unicast count (Send)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>UsePolicy_bool</code></td>
|
<td><code>UsePolicy_bool</code></td>
|
||||||
@ -7103,32 +7103,32 @@ All APIs are based on the <a href="https://www.jsonrpc.org/specification">JSON-R
|
|||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.BroadcastBytes_u64</code></td>
|
<td><code>Recv.BroadcastBytes_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Number of broadcast packets (Recv)</td>
|
<td>Broadcast bytes (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.BroadcastCount_u64</code></td>
|
<td><code>Recv.BroadcastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Broadcast bytes (Recv)</td>
|
<td>Number of broadcast packets (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.UnicastBytes_u64</code></td>
|
<td><code>Recv.UnicastBytes_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Unicast count (Recv)</td>
|
<td>Unicast bytes (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.UnicastCount_u64</code></td>
|
<td><code>Recv.UnicastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Unicast bytes (Recv)</td>
|
<td>Unicast count (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.BroadcastBytes_u64</code></td>
|
<td><code>Send.BroadcastBytes_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Number of broadcast packets (Send)</td>
|
<td>Broadcast bytes (Send)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.BroadcastCount_u64</code></td>
|
<td><code>Send.BroadcastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Broadcast bytes (Send)</td>
|
<td>Number of broadcast packets (Send)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.UnicastBytes_u64</code></td>
|
<td><code>Send.UnicastBytes_u64</code></td>
|
||||||
@ -7138,7 +7138,7 @@ All APIs are based on the <a href="https://www.jsonrpc.org/specification">JSON-R
|
|||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.UnicastCount_u64</code></td>
|
<td><code>Send.UnicastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Unicast bytes (Send)</td>
|
<td>Unicast count (Send)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>UsePolicy_bool</code></td>
|
<td><code>UsePolicy_bool</code></td>
|
||||||
@ -7747,32 +7747,32 @@ All APIs are based on the <a href="https://www.jsonrpc.org/specification">JSON-R
|
|||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.BroadcastBytes_u64</code></td>
|
<td><code>Recv.BroadcastBytes_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Number of broadcast packets (Recv)</td>
|
<td>Broadcast bytes (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.BroadcastCount_u64</code></td>
|
<td><code>Recv.BroadcastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Broadcast bytes (Recv)</td>
|
<td>Number of broadcast packets (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.UnicastBytes_u64</code></td>
|
<td><code>Recv.UnicastBytes_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Unicast count (Recv)</td>
|
<td>Unicast bytes (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.UnicastCount_u64</code></td>
|
<td><code>Recv.UnicastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Unicast bytes (Recv)</td>
|
<td>Unicast count (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.BroadcastBytes_u64</code></td>
|
<td><code>Send.BroadcastBytes_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Number of broadcast packets (Send)</td>
|
<td>Broadcast bytes (Send)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.BroadcastCount_u64</code></td>
|
<td><code>Send.BroadcastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Broadcast bytes (Send)</td>
|
<td>Number of broadcast packets (Send)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.UnicastBytes_u64</code></td>
|
<td><code>Send.UnicastBytes_u64</code></td>
|
||||||
@ -7782,7 +7782,7 @@ All APIs are based on the <a href="https://www.jsonrpc.org/specification">JSON-R
|
|||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.UnicastCount_u64</code></td>
|
<td><code>Send.UnicastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Unicast bytes (Send)</td>
|
<td>Unicast count (Send)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>UsePolicy_bool</code></td>
|
<td><code>UsePolicy_bool</code></td>
|
||||||
@ -8137,32 +8137,32 @@ All APIs are based on the <a href="https://www.jsonrpc.org/specification">JSON-R
|
|||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.BroadcastBytes_u64</code></td>
|
<td><code>Recv.BroadcastBytes_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Number of broadcast packets (Recv)</td>
|
<td>Broadcast bytes (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.BroadcastCount_u64</code></td>
|
<td><code>Recv.BroadcastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Broadcast bytes (Recv)</td>
|
<td>Number of broadcast packets (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.UnicastBytes_u64</code></td>
|
<td><code>Recv.UnicastBytes_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Unicast count (Recv)</td>
|
<td>Unicast bytes (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.UnicastCount_u64</code></td>
|
<td><code>Recv.UnicastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Unicast bytes (Recv)</td>
|
<td>Unicast count (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.BroadcastBytes_u64</code></td>
|
<td><code>Send.BroadcastBytes_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Number of broadcast packets (Send)</td>
|
<td>Broadcast bytes (Send)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.BroadcastCount_u64</code></td>
|
<td><code>Send.BroadcastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Broadcast bytes (Send)</td>
|
<td>Number of broadcast packets (Send)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.UnicastBytes_u64</code></td>
|
<td><code>Send.UnicastBytes_u64</code></td>
|
||||||
@ -8172,7 +8172,7 @@ All APIs are based on the <a href="https://www.jsonrpc.org/specification">JSON-R
|
|||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.UnicastCount_u64</code></td>
|
<td><code>Send.UnicastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Unicast bytes (Send)</td>
|
<td>Unicast count (Send)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>UsePolicy_bool</code></td>
|
<td><code>UsePolicy_bool</code></td>
|
||||||
@ -8485,32 +8485,32 @@ All APIs are based on the <a href="https://www.jsonrpc.org/specification">JSON-R
|
|||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.BroadcastBytes_u64</code></td>
|
<td><code>Recv.BroadcastBytes_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Number of broadcast packets (Recv)</td>
|
<td>Broadcast bytes (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.BroadcastCount_u64</code></td>
|
<td><code>Recv.BroadcastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Broadcast bytes (Recv)</td>
|
<td>Number of broadcast packets (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.UnicastBytes_u64</code></td>
|
<td><code>Recv.UnicastBytes_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Unicast count (Recv)</td>
|
<td>Unicast bytes (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Recv.UnicastCount_u64</code></td>
|
<td><code>Recv.UnicastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Unicast bytes (Recv)</td>
|
<td>Unicast count (Recv)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.BroadcastBytes_u64</code></td>
|
<td><code>Send.BroadcastBytes_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Number of broadcast packets (Send)</td>
|
<td>Broadcast bytes (Send)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.BroadcastCount_u64</code></td>
|
<td><code>Send.BroadcastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Broadcast bytes (Send)</td>
|
<td>Number of broadcast packets (Send)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.UnicastBytes_u64</code></td>
|
<td><code>Send.UnicastBytes_u64</code></td>
|
||||||
@ -8520,7 +8520,7 @@ All APIs are based on the <a href="https://www.jsonrpc.org/specification">JSON-R
|
|||||||
<tr>
|
<tr>
|
||||||
<td><code>Send.UnicastCount_u64</code></td>
|
<td><code>Send.UnicastCount_u64</code></td>
|
||||||
<td><code>number</code> (uint64)</td>
|
<td><code>number</code> (uint64)</td>
|
||||||
<td>Unicast bytes (Send)</td>
|
<td>Unicast count (Send)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>UsePolicy_bool</code></td>
|
<td><code>UsePolicy_bool</code></td>
|
||||||
|
@ -404,14 +404,14 @@ Name | Type | Description
|
|||||||
`AssignedClientLicenses_u32` | `number` (uint32) | Number of assigned client licenses (Useful to make a commercial version)
|
`AssignedClientLicenses_u32` | `number` (uint32) | Number of assigned client licenses (Useful to make a commercial version)
|
||||||
`AssignedBridgeLicensesTotal_u32` | `number` (uint32) | Number of Assigned bridge license (cluster-wide), useful to make a commercial version
|
`AssignedBridgeLicensesTotal_u32` | `number` (uint32) | Number of Assigned bridge license (cluster-wide), useful to make a commercial version
|
||||||
`AssignedClientLicensesTotal_u32` | `number` (uint32) | Number of assigned client licenses (cluster-wide), useful to make a commercial version
|
`AssignedClientLicensesTotal_u32` | `number` (uint32) | Number of assigned client licenses (cluster-wide), useful to make a commercial version
|
||||||
`Recv.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Recv)
|
`Recv.BroadcastBytes_u64` | `number` (uint64) | Broadcast bytes (Recv)
|
||||||
`Recv.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Recv)
|
`Recv.BroadcastCount_u64` | `number` (uint64) | Number of broadcast packets (Recv)
|
||||||
`Recv.UnicastBytes_u64` | `number` (uint64) | Unicast count (Recv)
|
`Recv.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Recv)
|
||||||
`Recv.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Recv)
|
`Recv.UnicastCount_u64` | `number` (uint64) | Unicast count (Recv)
|
||||||
`Send.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Send)
|
`Send.BroadcastBytes_u64` | `number` (uint64) | Broadcast bytes (Send)
|
||||||
`Send.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Send)
|
`Send.BroadcastCount_u64` | `number` (uint64) | Number of broadcast packets (Send)
|
||||||
`Send.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Send)
|
`Send.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Send)
|
||||||
`Send.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Send)
|
`Send.UnicastCount_u64` | `number` (uint64) | Unicast count (Send)
|
||||||
`CurrentTime_dt` | `Date` | Current time
|
`CurrentTime_dt` | `Date` | Current time
|
||||||
`CurrentTick_u64` | `number` (uint64) | 64 bit High-Precision Logical System Clock
|
`CurrentTick_u64` | `number` (uint64) | 64 bit High-Precision Logical System Clock
|
||||||
`StartTime_dt` | `Date` | VPN Server Start-up time
|
`StartTime_dt` | `Date` | VPN Server Start-up time
|
||||||
@ -1759,14 +1759,14 @@ Name | Type | Description
|
|||||||
`NumGroups_u32` | `number` (uint32) | Number of groups
|
`NumGroups_u32` | `number` (uint32) | Number of groups
|
||||||
`NumMacTables_u32` | `number` (uint32) | Number of MAC table entries
|
`NumMacTables_u32` | `number` (uint32) | Number of MAC table entries
|
||||||
`NumIpTables_u32` | `number` (uint32) | Number of IP table entries
|
`NumIpTables_u32` | `number` (uint32) | Number of IP table entries
|
||||||
`Recv.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Recv)
|
`Recv.BroadcastBytes_u64` | `number` (uint64) | Broadcast bytes (Recv)
|
||||||
`Recv.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Recv)
|
`Recv.BroadcastCount_u64` | `number` (uint64) | Number of broadcast packets (Recv)
|
||||||
`Recv.UnicastBytes_u64` | `number` (uint64) | Unicast count (Recv)
|
`Recv.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Recv)
|
||||||
`Recv.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Recv)
|
`Recv.UnicastCount_u64` | `number` (uint64) | Unicast count (Recv)
|
||||||
`Send.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Send)
|
`Send.BroadcastBytes_u64` | `number` (uint64) | Broadcast bytes (Send)
|
||||||
`Send.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Send)
|
`Send.BroadcastCount_u64` | `number` (uint64) | Number of broadcast packets (Send)
|
||||||
`Send.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Send)
|
`Send.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Send)
|
||||||
`Send.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Send)
|
`Send.UnicastCount_u64` | `number` (uint64) | Unicast count (Send)
|
||||||
`SecureNATEnabled_bool` | `boolean` | Whether SecureNAT is enabled
|
`SecureNATEnabled_bool` | `boolean` | Whether SecureNAT is enabled
|
||||||
`LastCommTime_dt` | `Date` | Last communication date and time
|
`LastCommTime_dt` | `Date` | Last communication date and time
|
||||||
`LastLoginTime_dt` | `Date` | Last login date and time
|
`LastLoginTime_dt` | `Date` | Last login date and time
|
||||||
@ -2210,7 +2210,7 @@ Name | Type | Description
|
|||||||
`NoUdpAcceleration_bool` | `boolean` | Client Option Parameters: Do not use UDP acceleration mode if the value is true
|
`NoUdpAcceleration_bool` | `boolean` | Client Option Parameters: Do not use UDP acceleration mode if the value is true
|
||||||
`AuthType_u32` | `number` (enum) | Authentication type<BR>Values:<BR>`0`: Anonymous authentication<BR>`1`: SHA-0 hashed password authentication<BR>`2`: Plain password authentication<BR>`3`: Certificate authentication
|
`AuthType_u32` | `number` (enum) | Authentication type<BR>Values:<BR>`0`: Anonymous authentication<BR>`1`: SHA-0 hashed password authentication<BR>`2`: Plain password authentication<BR>`3`: Certificate authentication
|
||||||
`Username_str` | `string` (ASCII) | User name
|
`Username_str` | `string` (ASCII) | User name
|
||||||
`HashedPassword_bin` | `string` (Base64 binary) | SHA-0 Hashed password. Valid only if ClientAuth_AuthType_u32 == SHA0_Hashed_Password (1). The SHA-0 hashed password must be caluclated by the SHA0(UpperCase(username_ascii_string) + password_ascii_string).
|
`HashedPassword_bin` | `string` (Base64 binary) | SHA-0 Hashed password. Valid only if ClientAuth_AuthType_u32 == SHA0_Hashed_Password (1). The SHA-0 hashed password must be caluclated by the SHA0(password_ascii_string + UpperCase(username_ascii_string)).
|
||||||
`PlainPassword_str` | `string` (ASCII) | Plaintext Password. Valid only if ClientAuth_AuthType_u32 == PlainPassword (2).
|
`PlainPassword_str` | `string` (ASCII) | Plaintext Password. Valid only if ClientAuth_AuthType_u32 == PlainPassword (2).
|
||||||
`ClientX_bin` | `string` (Base64 binary) | Client certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3).
|
`ClientX_bin` | `string` (Base64 binary) | Client certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3).
|
||||||
`ClientK_bin` | `string` (Base64 binary) | Client private key of the certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3).
|
`ClientK_bin` | `string` (Base64 binary) | Client private key of the certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3).
|
||||||
@ -2352,7 +2352,7 @@ Name | Type | Description
|
|||||||
`NoUdpAcceleration_bool` | `boolean` | Client Option Parameters: Do not use UDP acceleration mode if the value is true
|
`NoUdpAcceleration_bool` | `boolean` | Client Option Parameters: Do not use UDP acceleration mode if the value is true
|
||||||
`AuthType_u32` | `number` (enum) | Authentication type<BR>Values:<BR>`0`: Anonymous authentication<BR>`1`: SHA-0 hashed password authentication<BR>`2`: Plain password authentication<BR>`3`: Certificate authentication
|
`AuthType_u32` | `number` (enum) | Authentication type<BR>Values:<BR>`0`: Anonymous authentication<BR>`1`: SHA-0 hashed password authentication<BR>`2`: Plain password authentication<BR>`3`: Certificate authentication
|
||||||
`Username_str` | `string` (ASCII) | User name
|
`Username_str` | `string` (ASCII) | User name
|
||||||
`HashedPassword_bin` | `string` (Base64 binary) | SHA-0 Hashed password. Valid only if ClientAuth_AuthType_u32 == SHA0_Hashed_Password (1). The SHA-0 hashed password must be caluclated by the SHA0(UpperCase(username_ascii_string) + password_ascii_string).
|
`HashedPassword_bin` | `string` (Base64 binary) | SHA-0 Hashed password. Valid only if ClientAuth_AuthType_u32 == SHA0_Hashed_Password (1). The SHA-0 hashed password must be caluclated by the SHA0(password_ascii_string + UpperCase(username_ascii_string)).
|
||||||
`PlainPassword_str` | `string` (ASCII) | Plaintext Password. Valid only if ClientAuth_AuthType_u32 == PlainPassword (2).
|
`PlainPassword_str` | `string` (ASCII) | Plaintext Password. Valid only if ClientAuth_AuthType_u32 == PlainPassword (2).
|
||||||
`ClientX_bin` | `string` (Base64 binary) | Client certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3).
|
`ClientX_bin` | `string` (Base64 binary) | Client certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3).
|
||||||
`ClientK_bin` | `string` (Base64 binary) | Client private key of the certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3).
|
`ClientK_bin` | `string` (Base64 binary) | Client private key of the certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3).
|
||||||
@ -2537,7 +2537,7 @@ Name | Type | Description
|
|||||||
`NoUdpAcceleration_bool` | `boolean` | Client Option Parameters: Do not use UDP acceleration mode if the value is true
|
`NoUdpAcceleration_bool` | `boolean` | Client Option Parameters: Do not use UDP acceleration mode if the value is true
|
||||||
`AuthType_u32` | `number` (enum) | Authentication type<BR>Values:<BR>`0`: Anonymous authentication<BR>`1`: SHA-0 hashed password authentication<BR>`2`: Plain password authentication<BR>`3`: Certificate authentication
|
`AuthType_u32` | `number` (enum) | Authentication type<BR>Values:<BR>`0`: Anonymous authentication<BR>`1`: SHA-0 hashed password authentication<BR>`2`: Plain password authentication<BR>`3`: Certificate authentication
|
||||||
`Username_str` | `string` (ASCII) | User name
|
`Username_str` | `string` (ASCII) | User name
|
||||||
`HashedPassword_bin` | `string` (Base64 binary) | SHA-0 Hashed password. Valid only if ClientAuth_AuthType_u32 == SHA0_Hashed_Password (1). The SHA-0 hashed password must be caluclated by the SHA0(UpperCase(username_ascii_string) + password_ascii_string).
|
`HashedPassword_bin` | `string` (Base64 binary) | SHA-0 Hashed password. Valid only if ClientAuth_AuthType_u32 == SHA0_Hashed_Password (1). The SHA-0 hashed password must be caluclated by the SHA0(password_ascii_string + UpperCase(username_ascii_string)).
|
||||||
`PlainPassword_str` | `string` (ASCII) | Plaintext Password. Valid only if ClientAuth_AuthType_u32 == PlainPassword (2).
|
`PlainPassword_str` | `string` (ASCII) | Plaintext Password. Valid only if ClientAuth_AuthType_u32 == PlainPassword (2).
|
||||||
`ClientX_bin` | `string` (Base64 binary) | Client certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3).
|
`ClientX_bin` | `string` (Base64 binary) | Client certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3).
|
||||||
`ClientK_bin` | `string` (Base64 binary) | Client private key of the certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3).
|
`ClientK_bin` | `string` (Base64 binary) | Client private key of the certificate. Valid only if ClientAuth_AuthType_u32 == Cert (3).
|
||||||
@ -3712,14 +3712,14 @@ Name | Type | Description
|
|||||||
`RadiusUsername_utf` | `string` (UTF8) | Username in RADIUS server, optional, valid only if AuthType_u32 == Radius(4).
|
`RadiusUsername_utf` | `string` (UTF8) | Username in RADIUS server, optional, valid only if AuthType_u32 == Radius(4).
|
||||||
`NtUsername_utf` | `string` (UTF8) | Username in NT Domain server, optional, valid only if AuthType_u32 == NT(5).
|
`NtUsername_utf` | `string` (UTF8) | Username in NT Domain server, optional, valid only if AuthType_u32 == NT(5).
|
||||||
`NumLogin_u32` | `number` (uint32) | Number of total logins of the user
|
`NumLogin_u32` | `number` (uint32) | Number of total logins of the user
|
||||||
`Recv.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Recv)
|
`Recv.BroadcastBytes_u64` | `number` (uint64) | Broadcast bytes (Recv)
|
||||||
`Recv.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Recv)
|
`Recv.BroadcastCount_u64` | `number` (uint64) | Number of broadcast packets (Recv)
|
||||||
`Recv.UnicastBytes_u64` | `number` (uint64) | Unicast count (Recv)
|
`Recv.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Recv)
|
||||||
`Recv.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Recv)
|
`Recv.UnicastCount_u64` | `number` (uint64) | Unicast count (Recv)
|
||||||
`Send.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Send)
|
`Send.BroadcastBytes_u64` | `number` (uint64) | Broadcast bytes (Send)
|
||||||
`Send.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Send)
|
`Send.BroadcastCount_u64` | `number` (uint64) | Number of broadcast packets (Send)
|
||||||
`Send.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Send)
|
`Send.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Send)
|
||||||
`Send.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Send)
|
`Send.UnicastCount_u64` | `number` (uint64) | Unicast count (Send)
|
||||||
`UsePolicy_bool` | `boolean` | The flag whether to use security policy
|
`UsePolicy_bool` | `boolean` | The flag whether to use security policy
|
||||||
`policy:Access_bool` | `boolean` | Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server.
|
`policy:Access_bool` | `boolean` | Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server.
|
||||||
`policy:DHCPFilter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
|
`policy:DHCPFilter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
|
||||||
@ -3925,14 +3925,14 @@ Name | Type | Description
|
|||||||
`RadiusUsername_utf` | `string` (UTF8) | Username in RADIUS server, optional, valid only if AuthType_u32 == Radius(4).
|
`RadiusUsername_utf` | `string` (UTF8) | Username in RADIUS server, optional, valid only if AuthType_u32 == Radius(4).
|
||||||
`NtUsername_utf` | `string` (UTF8) | Username in NT Domain server, optional, valid only if AuthType_u32 == NT(5).
|
`NtUsername_utf` | `string` (UTF8) | Username in NT Domain server, optional, valid only if AuthType_u32 == NT(5).
|
||||||
`NumLogin_u32` | `number` (uint32) | Number of total logins of the user
|
`NumLogin_u32` | `number` (uint32) | Number of total logins of the user
|
||||||
`Recv.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Recv)
|
`Recv.BroadcastBytes_u64` | `number` (uint64) | Broadcast bytes (Recv)
|
||||||
`Recv.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Recv)
|
`Recv.BroadcastCount_u64` | `number` (uint64) | Number of broadcast packets (Recv)
|
||||||
`Recv.UnicastBytes_u64` | `number` (uint64) | Unicast count (Recv)
|
`Recv.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Recv)
|
||||||
`Recv.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Recv)
|
`Recv.UnicastCount_u64` | `number` (uint64) | Unicast count (Recv)
|
||||||
`Send.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Send)
|
`Send.BroadcastBytes_u64` | `number` (uint64) | Broadcast bytes (Send)
|
||||||
`Send.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Send)
|
`Send.BroadcastCount_u64` | `number` (uint64) | Number of broadcast packets (Send)
|
||||||
`Send.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Send)
|
`Send.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Send)
|
||||||
`Send.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Send)
|
`Send.UnicastCount_u64` | `number` (uint64) | Unicast count (Send)
|
||||||
`UsePolicy_bool` | `boolean` | The flag whether to use security policy
|
`UsePolicy_bool` | `boolean` | The flag whether to use security policy
|
||||||
`policy:Access_bool` | `boolean` | Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server.
|
`policy:Access_bool` | `boolean` | Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server.
|
||||||
`policy:DHCPFilter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
|
`policy:DHCPFilter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
|
||||||
@ -4087,14 +4087,14 @@ Name | Type | Description
|
|||||||
`RadiusUsername_utf` | `string` (UTF8) | Username in RADIUS server, optional, valid only if AuthType_u32 == Radius(4).
|
`RadiusUsername_utf` | `string` (UTF8) | Username in RADIUS server, optional, valid only if AuthType_u32 == Radius(4).
|
||||||
`NtUsername_utf` | `string` (UTF8) | Username in NT Domain server, optional, valid only if AuthType_u32 == NT(5).
|
`NtUsername_utf` | `string` (UTF8) | Username in NT Domain server, optional, valid only if AuthType_u32 == NT(5).
|
||||||
`NumLogin_u32` | `number` (uint32) | Number of total logins of the user
|
`NumLogin_u32` | `number` (uint32) | Number of total logins of the user
|
||||||
`Recv.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Recv)
|
`Recv.BroadcastBytes_u64` | `number` (uint64) | Broadcast bytes (Recv)
|
||||||
`Recv.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Recv)
|
`Recv.BroadcastCount_u64` | `number` (uint64) | Number of broadcast packets (Recv)
|
||||||
`Recv.UnicastBytes_u64` | `number` (uint64) | Unicast count (Recv)
|
`Recv.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Recv)
|
||||||
`Recv.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Recv)
|
`Recv.UnicastCount_u64` | `number` (uint64) | Unicast count (Recv)
|
||||||
`Send.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Send)
|
`Send.BroadcastBytes_u64` | `number` (uint64) | Broadcast bytes (Send)
|
||||||
`Send.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Send)
|
`Send.BroadcastCount_u64` | `number` (uint64) | Number of broadcast packets (Send)
|
||||||
`Send.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Send)
|
`Send.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Send)
|
||||||
`Send.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Send)
|
`Send.UnicastCount_u64` | `number` (uint64) | Unicast count (Send)
|
||||||
`UsePolicy_bool` | `boolean` | The flag whether to use security policy
|
`UsePolicy_bool` | `boolean` | The flag whether to use security policy
|
||||||
`policy:Access_bool` | `boolean` | Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server.
|
`policy:Access_bool` | `boolean` | Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server.
|
||||||
`policy:DHCPFilter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
|
`policy:DHCPFilter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
|
||||||
@ -4425,14 +4425,14 @@ Name | Type | Description
|
|||||||
`Name_str` | `string` (ASCII) | The group name
|
`Name_str` | `string` (ASCII) | The group name
|
||||||
`Realname_utf` | `string` (UTF8) | Optional real name (full name) of the group, allow using any Unicode characters
|
`Realname_utf` | `string` (UTF8) | Optional real name (full name) of the group, allow using any Unicode characters
|
||||||
`Note_utf` | `string` (UTF8) | Optional, specify a description of the group
|
`Note_utf` | `string` (UTF8) | Optional, specify a description of the group
|
||||||
`Recv.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Recv)
|
`Recv.BroadcastBytes_u64` | `number` (uint64) | Broadcast bytes (Recv)
|
||||||
`Recv.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Recv)
|
`Recv.BroadcastCount_u64` | `number` (uint64) | Number of broadcast packets (Recv)
|
||||||
`Recv.UnicastBytes_u64` | `number` (uint64) | Unicast count (Recv)
|
`Recv.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Recv)
|
||||||
`Recv.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Recv)
|
`Recv.UnicastCount_u64` | `number` (uint64) | Unicast count (Recv)
|
||||||
`Send.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Send)
|
`Send.BroadcastBytes_u64` | `number` (uint64) | Broadcast bytes (Send)
|
||||||
`Send.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Send)
|
`Send.BroadcastCount_u64` | `number` (uint64) | Number of broadcast packets (Send)
|
||||||
`Send.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Send)
|
`Send.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Send)
|
||||||
`Send.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Send)
|
`Send.UnicastCount_u64` | `number` (uint64) | Unicast count (Send)
|
||||||
`UsePolicy_bool` | `boolean` | The flag whether to use security policy
|
`UsePolicy_bool` | `boolean` | The flag whether to use security policy
|
||||||
`policy:Access_bool` | `boolean` | Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server.
|
`policy:Access_bool` | `boolean` | Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server.
|
||||||
`policy:DHCPFilter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
|
`policy:DHCPFilter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
|
||||||
@ -4605,14 +4605,14 @@ Name | Type | Description
|
|||||||
`Name_str` | `string` (ASCII) | The group name
|
`Name_str` | `string` (ASCII) | The group name
|
||||||
`Realname_utf` | `string` (UTF8) | Optional real name (full name) of the group, allow using any Unicode characters
|
`Realname_utf` | `string` (UTF8) | Optional real name (full name) of the group, allow using any Unicode characters
|
||||||
`Note_utf` | `string` (UTF8) | Optional, specify a description of the group
|
`Note_utf` | `string` (UTF8) | Optional, specify a description of the group
|
||||||
`Recv.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Recv)
|
`Recv.BroadcastBytes_u64` | `number` (uint64) | Broadcast bytes (Recv)
|
||||||
`Recv.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Recv)
|
`Recv.BroadcastCount_u64` | `number` (uint64) | Number of broadcast packets (Recv)
|
||||||
`Recv.UnicastBytes_u64` | `number` (uint64) | Unicast count (Recv)
|
`Recv.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Recv)
|
||||||
`Recv.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Recv)
|
`Recv.UnicastCount_u64` | `number` (uint64) | Unicast count (Recv)
|
||||||
`Send.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Send)
|
`Send.BroadcastBytes_u64` | `number` (uint64) | Broadcast bytes (Send)
|
||||||
`Send.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Send)
|
`Send.BroadcastCount_u64` | `number` (uint64) | Number of broadcast packets (Send)
|
||||||
`Send.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Send)
|
`Send.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Send)
|
||||||
`Send.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Send)
|
`Send.UnicastCount_u64` | `number` (uint64) | Unicast count (Send)
|
||||||
`UsePolicy_bool` | `boolean` | The flag whether to use security policy
|
`UsePolicy_bool` | `boolean` | The flag whether to use security policy
|
||||||
`policy:Access_bool` | `boolean` | Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server.
|
`policy:Access_bool` | `boolean` | Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server.
|
||||||
`policy:DHCPFilter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
|
`policy:DHCPFilter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
|
||||||
@ -4743,14 +4743,14 @@ Name | Type | Description
|
|||||||
`Name_str` | `string` (ASCII) | The group name
|
`Name_str` | `string` (ASCII) | The group name
|
||||||
`Realname_utf` | `string` (UTF8) | Optional real name (full name) of the group, allow using any Unicode characters
|
`Realname_utf` | `string` (UTF8) | Optional real name (full name) of the group, allow using any Unicode characters
|
||||||
`Note_utf` | `string` (UTF8) | Optional, specify a description of the group
|
`Note_utf` | `string` (UTF8) | Optional, specify a description of the group
|
||||||
`Recv.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Recv)
|
`Recv.BroadcastBytes_u64` | `number` (uint64) | Broadcast bytes (Recv)
|
||||||
`Recv.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Recv)
|
`Recv.BroadcastCount_u64` | `number` (uint64) | Number of broadcast packets (Recv)
|
||||||
`Recv.UnicastBytes_u64` | `number` (uint64) | Unicast count (Recv)
|
`Recv.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Recv)
|
||||||
`Recv.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Recv)
|
`Recv.UnicastCount_u64` | `number` (uint64) | Unicast count (Recv)
|
||||||
`Send.BroadcastBytes_u64` | `number` (uint64) | Number of broadcast packets (Send)
|
`Send.BroadcastBytes_u64` | `number` (uint64) | Broadcast bytes (Send)
|
||||||
`Send.BroadcastCount_u64` | `number` (uint64) | Broadcast bytes (Send)
|
`Send.BroadcastCount_u64` | `number` (uint64) | Number of broadcast packets (Send)
|
||||||
`Send.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Send)
|
`Send.UnicastBytes_u64` | `number` (uint64) | Unicast bytes (Send)
|
||||||
`Send.UnicastCount_u64` | `number` (uint64) | Unicast bytes (Send)
|
`Send.UnicastCount_u64` | `number` (uint64) | Unicast count (Send)
|
||||||
`UsePolicy_bool` | `boolean` | The flag whether to use security policy
|
`UsePolicy_bool` | `boolean` | The flag whether to use security policy
|
||||||
`policy:Access_bool` | `boolean` | Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server.
|
`policy:Access_bool` | `boolean` | Security policy: Allow Access. The users, which this policy value is true, have permission to make VPN connection to VPN Server.
|
||||||
`policy:DHCPFilter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
|
`policy:DHCPFilter_bool` | `boolean` | Security policy: Filter DHCP Packets (IPv4). All IPv4 DHCP packets in sessions defined this policy will be filtered.
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="2.10.0" />
|
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="2.10.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "vpnrpc",
|
"name": "vpnrpc",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -54,12 +54,6 @@
|
|||||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"big.js": {
|
|
||||||
"version": "5.2.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
|
|
||||||
"integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"brace-expansion": {
|
"brace-expansion": {
|
||||||
"version": "1.1.11",
|
"version": "1.1.11",
|
||||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||||
@ -123,42 +117,20 @@
|
|||||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"core-util-is": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
|
||||||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"diff": {
|
"diff": {
|
||||||
"version": "3.5.0",
|
"version": "3.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
|
||||||
"integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
|
"integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"emojis-list": {
|
|
||||||
"version": "2.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz",
|
|
||||||
"integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"enhanced-resolve": {
|
"enhanced-resolve": {
|
||||||
"version": "4.1.0",
|
"version": "5.12.0",
|
||||||
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz",
|
||||||
"integrity": "sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==",
|
"integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"graceful-fs": "^4.1.2",
|
"graceful-fs": "^4.2.4",
|
||||||
"memory-fs": "^0.4.0",
|
"tapable": "^2.2.0"
|
||||||
"tapable": "^1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"errno": {
|
|
||||||
"version": "0.1.7",
|
|
||||||
"resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz",
|
|
||||||
"integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"prr": "~1.0.1"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"escape-string-regexp": {
|
"escape-string-regexp": {
|
||||||
@ -209,9 +181,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"graceful-fs": {
|
"graceful-fs": {
|
||||||
"version": "4.1.15",
|
"version": "4.2.10",
|
||||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz",
|
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
|
||||||
"integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==",
|
"integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"has-flag": {
|
"has-flag": {
|
||||||
@ -242,12 +214,6 @@
|
|||||||
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
|
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"isarray": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
|
||||||
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"js-tokens": {
|
"js-tokens": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||||
@ -264,76 +230,47 @@
|
|||||||
"esprima": "^4.0.0"
|
"esprima": "^4.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"json5": {
|
"lru-cache": {
|
||||||
"version": "1.0.1",
|
"version": "6.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
||||||
"integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
|
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"minimist": "^1.2.0"
|
"yallist": "^4.0.0"
|
||||||
}
|
|
||||||
},
|
|
||||||
"loader-utils": {
|
|
||||||
"version": "1.2.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz",
|
|
||||||
"integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"big.js": "^5.2.2",
|
|
||||||
"emojis-list": "^2.0.0",
|
|
||||||
"json5": "^1.0.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"memory-fs": {
|
|
||||||
"version": "0.4.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz",
|
|
||||||
"integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"errno": "^0.1.3",
|
|
||||||
"readable-stream": "^2.0.1"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"micromatch": {
|
"micromatch": {
|
||||||
"version": "4.0.2",
|
"version": "4.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
|
||||||
"integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==",
|
"integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"braces": "^3.0.1",
|
"braces": "^3.0.2",
|
||||||
"picomatch": "^2.0.5"
|
"picomatch": "^2.3.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minimatch": {
|
"minimatch": {
|
||||||
"version": "3.0.4",
|
"version": "3.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"brace-expansion": "^1.1.7"
|
"brace-expansion": "^1.1.7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.7",
|
||||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz",
|
||||||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
"integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"mkdirp": {
|
"mkdirp": {
|
||||||
"version": "0.5.1",
|
"version": "0.5.6",
|
||||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
|
||||||
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
"integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"minimist": "0.0.8"
|
"minimist": "^1.2.6"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"minimist": {
|
|
||||||
"version": "0.0.8",
|
|
||||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
|
||||||
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
|
|
||||||
"dev": true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"once": {
|
"once": {
|
||||||
@ -352,44 +289,17 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"path-parse": {
|
"path-parse": {
|
||||||
"version": "1.0.6",
|
"version": "1.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
|
||||||
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
|
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"picomatch": {
|
"picomatch": {
|
||||||
"version": "2.0.7",
|
"version": "2.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
|
||||||
"integrity": "sha512-oLHIdio3tZ0qH76NybpeneBhYVj0QFTfXEFTc/B3zKQspYfYYkWYgFsmzo+4kvId/bQRcNkVeguI3y+CD22BtA==",
|
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"process-nextick-args": {
|
|
||||||
"version": "2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
|
|
||||||
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"prr": {
|
|
||||||
"version": "1.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
|
|
||||||
"integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"readable-stream": {
|
|
||||||
"version": "2.3.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
|
|
||||||
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"core-util-is": "~1.0.0",
|
|
||||||
"inherits": "~2.0.3",
|
|
||||||
"isarray": "~1.0.0",
|
|
||||||
"process-nextick-args": "~2.0.0",
|
|
||||||
"safe-buffer": "~5.1.1",
|
|
||||||
"string_decoder": "~1.1.1",
|
|
||||||
"util-deprecate": "~1.0.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"resolve": {
|
"resolve": {
|
||||||
"version": "1.11.0",
|
"version": "1.11.0",
|
||||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz",
|
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz",
|
||||||
@ -399,17 +309,14 @@
|
|||||||
"path-parse": "^1.0.6"
|
"path-parse": "^1.0.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"safe-buffer": {
|
|
||||||
"version": "5.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
|
||||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"semver": {
|
"semver": {
|
||||||
"version": "6.1.0",
|
"version": "7.3.8",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
|
||||||
"integrity": "sha512-kCqEOOHoBcFs/2Ccuk4Xarm/KiWRSLEX9CAZF8xkJ6ZPlIoTZ8V5f7J16vYLJqDbR7KrxTJpR2lqjIEm2Qx9cQ==",
|
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"lru-cache": "^6.0.0"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"sprintf-js": {
|
"sprintf-js": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
@ -417,15 +324,6 @@
|
|||||||
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
|
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"string_decoder": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
|
|
||||||
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"safe-buffer": "~5.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"supports-color": {
|
"supports-color": {
|
||||||
"version": "5.5.0",
|
"version": "5.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
||||||
@ -436,9 +334,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tapable": {
|
"tapable": {
|
||||||
"version": "1.1.3",
|
"version": "2.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz",
|
||||||
"integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==",
|
"integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"to-regex-range": {
|
"to-regex-range": {
|
||||||
@ -451,16 +349,66 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ts-loader": {
|
"ts-loader": {
|
||||||
"version": "6.0.1",
|
"version": "9.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-6.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.4.2.tgz",
|
||||||
"integrity": "sha512-9H5ErTIw5t73sdSoFE0hX0RO45B7cdDA4pW1VIQ2wNFAhxSpZcAlv2fwMcfv6SAYLoI7uGwHuzC5dECzmzqtzA==",
|
"integrity": "sha512-OmlC4WVmFv5I0PpaxYb+qGeGOdm5giHU7HwDDUjw59emP2UYMHy9fFSDcYgSNoH8sXcj4hGCSEhlDZ9ULeDraA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"chalk": "^2.3.0",
|
"chalk": "^4.1.0",
|
||||||
"enhanced-resolve": "^4.0.0",
|
"enhanced-resolve": "^5.0.0",
|
||||||
"loader-utils": "^1.0.2",
|
|
||||||
"micromatch": "^4.0.0",
|
"micromatch": "^4.0.0",
|
||||||
"semver": "^6.0.0"
|
"semver": "^7.3.4"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"ansi-styles": {
|
||||||
|
"version": "4.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||||
|
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"color-convert": "^2.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"chalk": {
|
||||||
|
"version": "4.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
||||||
|
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ansi-styles": "^4.1.0",
|
||||||
|
"supports-color": "^7.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"color-convert": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"color-name": "~1.1.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"color-name": {
|
||||||
|
"version": "1.1.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||||
|
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"has-flag": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"supports-color": {
|
||||||
|
"version": "7.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
||||||
|
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"has-flag": "^4.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tslib": {
|
"tslib": {
|
||||||
@ -513,17 +461,17 @@
|
|||||||
"integrity": "sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw==",
|
"integrity": "sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"util-deprecate": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
|
||||||
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"wrappy": {
|
"wrappy": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
|
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
|
||||||
"dev": true
|
"dev": true
|
||||||
|
},
|
||||||
|
"yallist": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
|
||||||
|
"dev": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
"homepage": "https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/#readme",
|
"homepage": "https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/#readme",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^12.0.2",
|
"@types/node": "^12.0.2",
|
||||||
"ts-loader": "^6.0.1",
|
"ts-loader": "^9.4.2",
|
||||||
"tslint": "^5.16.0",
|
"tslint": "^5.16.0",
|
||||||
"typescript": "^3.4.5"
|
"typescript": "^3.4.5"
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Markdig" Version="0.15.4" />
|
<PackageReference Include="Markdig" Version="0.15.4" />
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="2.10.0" />
|
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="2.10.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -33,18 +33,18 @@ You need to install the following software to build SoftEther VPN for UNIX.
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo yum -y groupinstall "Development Tools"
|
sudo yum -y groupinstall "Development Tools"
|
||||||
sudo yum -y install cmake ncurses-devel openssl-devel readline-devel zlib-devel
|
sudo yum -y install cmake ncurses-devel openssl-devel libsodium-devel readline-devel zlib-devel
|
||||||
```
|
```
|
||||||
|
|
||||||
## Install requirements on Debian/Ubuntu
|
## Install requirements on Debian/Ubuntu
|
||||||
```bash
|
```bash
|
||||||
sudo apt -y install cmake gcc g++ libncurses5-dev libreadline-dev libssl-dev make zlib1g-dev
|
sudo apt -y install cmake gcc g++ make pkgconf libncurses5-dev libssl-dev libsodium-dev libreadline-dev zlib1g-dev
|
||||||
```
|
```
|
||||||
|
|
||||||
## Install requirements on macOS
|
## Install requirements on macOS
|
||||||
```bash
|
```bash
|
||||||
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
|
||||||
brew install cmake openssl readline
|
brew install cmake openssl libsodium readline
|
||||||
```
|
```
|
||||||
|
|
||||||
# Build from source code and install
|
# Build from source code and install
|
||||||
@ -56,8 +56,8 @@ git clone https://github.com/SoftEtherVPN/SoftEtherVPN.git
|
|||||||
cd SoftEtherVPN
|
cd SoftEtherVPN
|
||||||
git submodule init && git submodule update
|
git submodule init && git submodule update
|
||||||
./configure
|
./configure
|
||||||
make -C tmp
|
make -C build
|
||||||
make -C tmp install
|
make -C build install
|
||||||
```
|
```
|
||||||
|
|
||||||
This will compile and install SoftEther VPN Server, Bridge and Client binaries under your executable path.
|
This will compile and install SoftEther VPN Server, Bridge and Client binaries under your executable path.
|
||||||
@ -74,8 +74,8 @@ git clone https://github.com/SoftEtherVPN/SoftEtherVPN.git
|
|||||||
cd SoftEtherVPN
|
cd SoftEtherVPN
|
||||||
git submodule init && git submodule update
|
git submodule init && git submodule update
|
||||||
./configure
|
./configure
|
||||||
make -C tmp
|
make -C build
|
||||||
make -C tmp install
|
make -C build install
|
||||||
```
|
```
|
||||||
|
|
||||||
Building without USE_MUSL environment variable set compiles, but produced executables exhibit bad run-time behaviour.
|
Building without USE_MUSL environment variable set compiles, but produced executables exhibit bad run-time behaviour.
|
||||||
@ -228,7 +228,7 @@ You can write your own VPN Server management application in your favorite langua
|
|||||||
|
|
||||||
You can use any SoftEtherVPN component (server, client, bridge) without installing it, if you wish so.
|
You can use any SoftEtherVPN component (server, client, bridge) without installing it, if you wish so.
|
||||||
|
|
||||||
In this case please do not run the `make install` command after compiling the source code, and head directly to the **bin/** directory. There you will find the generated binaries for SoftEtherVPN and those could be used without installing SoftEtherVPN.
|
In this case please do not run the `make install` command after compiling the source code, and head directly to the **build/** directory. There you will find the generated binaries for SoftEtherVPN and those could be used without installing SoftEtherVPN.
|
||||||
|
|
||||||
************************************
|
************************************
|
||||||
Thank You Using SoftEther VPN !
|
Thank You Using SoftEther VPN !
|
||||||
|
@ -1,77 +1,155 @@
|
|||||||
How to build SoftEther VPN for Windows
|
How to build SoftEther VPN for Windows
|
||||||
======================================
|
======================================
|
||||||
|
|
||||||
|
There are several methods for using CMake but the easiest by far is through Visual Studio by importing the CMake project directly
|
||||||
Requirements
|
|
||||||
------------
|
|
||||||
|
|
||||||
You need to install the following software to run a full release build of SoftEther VPN for Windows.
|
|
||||||
|
|
||||||
- Microsoft Windows XP, Vista, 7, 8 or later.
|
|
||||||
- Microsoft Visual Studio 2008 with the latest SP (SP1 9.0.30729.4462 QFE).
|
|
||||||
Make sure that you installed the x64 compiler and build tools.
|
|
||||||
- Microsoft Windows Driver Kit 7.1.0.
|
|
||||||
|
|
||||||
|
|
||||||
Full Build Instructions
|
|
||||||
-----------------------
|
|
||||||
|
|
||||||
The following steps will build all SoftEther VPN program files, and also build
|
|
||||||
the installer packages of SoftEther VPN. It is very easy.
|
|
||||||
|
|
||||||
1. Run the "BuildAll.cmd" batch file in the "src" directory.
|
|
||||||
2. Wait until the building process will complete.
|
|
||||||
3. The built files are stored on the "output" directory.
|
|
||||||
|
|
||||||
|
|
||||||
Partly Build, Debug, or Development Instructions on Visual Studio 2008
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
|
|
||||||
If you are a programmer, you can open the SoftEther VPN solution file
|
|
||||||
with Visual Studio 2008 to customize. Open "src\SEVPN.sln" and enjoy it.
|
|
||||||
|
|
||||||
Visual Studio 2008 is required as to maintain compatibility with Windows 9x, due to Visual C++ 2008 being the last version compatibile with Windows 9x and Windows NT 4.x binary linking.
|
|
||||||
|
|
||||||
- Visual Studio 2008's installer ISO can be found on Microsoft's site here: https://download.microsoft.com/download/E/8/E/E8EEB394-7F42-4963-A2D8-29559B738298/VS2008ExpressWithSP1ENUX1504728.iso
|
|
||||||
|
|
||||||
- The Microsoft Windows Driver Kit 7.1.0 can be found here: https://download.microsoft.com/download/4/A/2/4A25C7D5-EFBE-4182-B6A9-AE6850409A78/GRMWDK_EN_7600_1.ISO
|
|
||||||
|
|
||||||
If using anything else other than Visual Studio 2008 for development, your code **MUST** support Microsoft Visual C++ 2008 due to aforementioned reasons.
|
|
||||||
|
|
||||||
It is OK to add newer Visual Studio (2015, 2017) solution files to the project, but there then must be dual solution files for both Visual C++ 2008 and the latest Visual Studio.
|
|
||||||
|
|
||||||
Build and Development Instructions with Visual Studio 2017 & CMake
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
|
|
||||||
An alternative method for development of the SoftEtherVPN project on Windows is through CMake.
|
|
||||||
|
|
||||||
There are several methods for using CMake but the easiest by far is through Visual Studio 2017 by importing the CMake project directly
|
|
||||||
into it. So that is what will be described below.
|
into it. So that is what will be described below.
|
||||||
|
|
||||||
Requirements:
|
## Requirements
|
||||||
|
|
||||||
1. Download Visual Studio 2017 (Community Edition is fine).
|
- Visual Studio 2019 or 2022 (Community Edition is fine)
|
||||||
2. During install, make sure to check "Desktop development with C++" under "Workloads".
|
|
||||||
3. Click on individual components and scroll until you see "Visual C++ tools for CMake" under the compilers section. Make sure this is checked.
|
|
||||||
4. Proceed with and finish Visual Studio 2017 install.
|
|
||||||
5. Install the needed submodules to build the project, avoiding CMake telling you to do so with: `git submodule update --init --recursive`
|
|
||||||
|
|
||||||
Building:
|
https://visualstudio.microsoft.com/downloads
|
||||||
|
|
||||||
Once both installs have finished, launch Visual Studio. Once its started go to the File menu click `Open --> CMake`. Then navigate to where you
|
- Git for Windows (or other git tool)
|
||||||
cloned the project and open the `CMakeLists.txt` file in the projects root directory.
|
|
||||||
|
|
||||||
Visual Studio will proceed to start the CMake configuration process and once its finished, you can simply go to toolbar and click `CMake -> Build All`.
|
https://gitforwindows.org/
|
||||||
|
|
||||||
Once it has finished, hopefully with no errors, look in the newly created `/build` directory in the project's folder. Inside are the development versions
|
- vcpkg
|
||||||
of all the SoftEtherVPN components.
|
|
||||||
|
|
||||||
Congrats, you now have a complete CMake development environment for SoftEtherVPN on Windows, enjoy and happy contributing!
|
https://github.com/microsoft/vcpkg
|
||||||
|
|
||||||
Download Links:
|
## Installation
|
||||||
- Visual Studio 2017 from Microsoft: https://visualstudio.microsoft.com/downloads
|
|
||||||
|
|
||||||
************************************
|
- Visual Studio
|
||||||
Thank You Using SoftEther VPN !
|
|
||||||
By SoftEther VPN Open-Source Project
|
Download from the official site and run the installer.
|
||||||
https://www.softether.org/
|
|
||||||
|
Make sure to check **Desktop development with C++** under *Workloads* and **Clang C++ Tools for Windows** in *Optional* components.
|
||||||
|
|
||||||
|
- Git
|
||||||
|
|
||||||
|
Nothing special. Just follow the installer.
|
||||||
|
|
||||||
|
- vcpkg
|
||||||
|
|
||||||
|
Let's say you will install it to `C:\vcpkg`.
|
||||||
|
|
||||||
|
Open your preferred terminal and go to `C:\`. Then run these commands.
|
||||||
|
|
||||||
|
```
|
||||||
|
C:\> git clone https://github.com/microsoft/vcpkg
|
||||||
|
C:\> cd vcpkg
|
||||||
|
C:\vcpkg> bootstrap-vcpkg.bat
|
||||||
|
C:\vcpkg> vcpkg integrate install
|
||||||
|
```
|
||||||
|
|
||||||
|
## Update
|
||||||
|
|
||||||
|
- vcpkg
|
||||||
|
|
||||||
|
You are recommended to update vcpkg from time to time, so that the latest libraries are used in the build.
|
||||||
|
|
||||||
|
Go to the installation path, pull the latest repo and the binary:
|
||||||
|
|
||||||
|
```
|
||||||
|
C:\vcpkg> git pull
|
||||||
|
C:\vcpkg> bootstrap-vcpkg.bat
|
||||||
|
```
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
1. Launch Visual Studio
|
||||||
|
|
||||||
|
Choose either **Clone a repository** to clone from GitHub or **Open a local folder** if you already have a copy.
|
||||||
|
|
||||||
|
1. Open Terminal (*View -> Terminal*). Install the needed submodules to build the project, avoiding CMake telling you to do so with:
|
||||||
|
|
||||||
|
`git submodule update --init --recursive`
|
||||||
|
|
||||||
|
**Note**: This step is not necessary if you have chosen **Clone a repository** as Visual Studio automatically takes care of it.
|
||||||
|
|
||||||
|
1. Switch to folder view in the solution explorer
|
||||||
|
|
||||||
|
1. Select a configuration from the dropdown menu below the search box. The default configurations are:
|
||||||
|
|
||||||
|
- x64-native
|
||||||
|
|
||||||
|
Build x64 executables with 64-bit compiler (most common)
|
||||||
|
|
||||||
|
- x64-on-x86
|
||||||
|
|
||||||
|
Cross compile x64 executables with 32-bit compiler
|
||||||
|
|
||||||
|
- x86-native
|
||||||
|
|
||||||
|
Build x86 executables with 32-bit compiler
|
||||||
|
|
||||||
|
- x86-on-x64
|
||||||
|
|
||||||
|
Cross compile x86 executables with 64-bit compiler
|
||||||
|
|
||||||
|
On 64-bit Windows, all four configurations can be used. 32-bit platforms can only use 32-bit compiler.
|
||||||
|
|
||||||
|
1. Visual Studio will try generating CMake cache. If not, click **Project -> Configure Cache** or **Generate Cache**.
|
||||||
|
|
||||||
|
If CMake is busy, you will find **Generate Cache** greyed out. Wait until it finishes or click **Cancel CMake Cache Generation** to stop it.
|
||||||
|
|
||||||
|
The initial configuration will take a longer time since it needs to download and install dependencies.
|
||||||
|
|
||||||
|
1. When *CMake generation finished* is displayed, simply go to toolbar and click **Build -> Build All**.
|
||||||
|
|
||||||
|
1. Once building has finished, hopefully with no errors, look in the newly created `/build` directory in the project's folder.
|
||||||
|
|
||||||
|
Run `vpnsetup.exe` to install desired components.
|
||||||
|
|
||||||
|
1. Congrats, you now have a complete CMake development environment for SoftEtherVPN on Windows, enjoy and happy contributing!
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
1. Build number
|
||||||
|
|
||||||
|
You can change the build number in `CMakeSettings.json`. Use any integer no less than 5180.
|
||||||
|
|
||||||
|
Delete and regenerate CMake cache after the change.
|
||||||
|
|
||||||
|
1. OpenSSL
|
||||||
|
|
||||||
|
The above instruction builds OpenSSL library statically in the SoftEther binaries,
|
||||||
|
so that when you distribute the installer to others they will not need to install OpenSSL separately.
|
||||||
|
However, the downside is that the OpenSSL library cannot be updated without a rebuild and reinstallation of SoftEther.
|
||||||
|
|
||||||
|
It's also possible to build OpenSSL library dynamically so that you can update OpenSSL without rebuilding SoftEther.
|
||||||
|
To achieve that, you need to remove `openssl` from `vcpkg.json` and install OpenSSL directly.
|
||||||
|
|
||||||
|
Installing from a package manager such as [Scoop](https://scoop.sh/) would make the subsequent updates easily.
|
||||||
|
However, you should avoid using [Winget](https://learn.microsoft.com/en-us/windows/package-manager/winget/)
|
||||||
|
for the time being because due to a bug it cannot detect the correct version of OpenSSL, causing endless updates.
|
||||||
|
|
||||||
|
If you install from Scoop, make sure to add the OpenSSL folder to the system's `PATH`.
|
||||||
|
As Scoop already adds it to the user's `PATH`, just copy the same location into the system environment variable(s).
|
||||||
|
SoftEther Client Service starts from the System account and will fail to start if OpenSSL is not in the global `PATH`.
|
||||||
|
|
||||||
|
Building should be straightforward. You can verify that the binaries are now linked against the locally installed OpenSSL
|
||||||
|
with tools like `ldd` (available from Git Bash):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ ldd /c/Program\ Files/SoftEther\ VPN\ Client\ Developer\ Edition/vpnclient.exe
|
||||||
|
...
|
||||||
|
libcrypto-3-x64.dll => /c/Scoop/apps/openssl/current/bin/libcrypto-3-x64.dll (0x7ff8beb70000)
|
||||||
|
libssl-3-x64.dll => /c/Scoop/apps/openssl/current/bin/libssl-3-x64.dll (0x7ff8beaa0000)
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
1. 32-bit Windows
|
||||||
|
|
||||||
|
You don't need 32-bit Windows to build 32-bit executables. However, if 32-bit Windows is what you only have, things become a little complicated.
|
||||||
|
|
||||||
|
Visual Studio 2019 is the last version that works on 32-bit Windows. It does the job but its bundled CMake and Ninja are 64-bit versions.
|
||||||
|
|
||||||
|
After the installation of VS 2019, you need to download 32-bit CMake and Ninja and replace those that come with VS in:
|
||||||
|
|
||||||
|
```
|
||||||
|
C:\Program Files\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake
|
||||||
|
```
|
||||||
|
|
||||||
|
Currently CMake has an official x86 installer but Ninja does not. You may need to download from a 3rd party or build from source.
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
SETLOCAL
|
|
||||||
SET BATCH_FILE_NAME=%0
|
|
||||||
SET BATCH_DIR_PATH=%~dp0
|
|
||||||
SET NOW_TMP=%time:~0,2%
|
|
||||||
SET NOW=%date:~0,4%%date:~5,2%%date:~8,2%_%NOW_TMP: =0%%time:~3,2%%time:~6,2%
|
|
||||||
|
|
||||||
if exist "C:\Program Files\Microsoft Visual Studio 9.0" (
|
|
||||||
call "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"
|
|
||||||
) else if exist "C:\Program Files (x86)\Microsoft Visual Studio 9.0" (
|
|
||||||
call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"
|
|
||||||
) else (
|
|
||||||
echo "Visual Studio 2008 not found!"
|
|
||||||
exit /b 1
|
|
||||||
)
|
|
||||||
|
|
||||||
if not exist "C:\windows\Microsoft.NET\Framework\v3.5" (
|
|
||||||
echo ".NET Framework 3.5 not found!"
|
|
||||||
exit /b 1
|
|
||||||
)
|
|
||||||
|
|
||||||
echo on
|
|
||||||
|
|
||||||
copy "%BATCH_DIR_PATH%..\AUTHORS.TXT" "%BATCH_DIR_PATH%bin\hamcore\authors.txt"
|
|
||||||
|
|
||||||
echo f | xcopy "%BATCH_DIR_PATH%BuildFiles\Library\vs2008\Win32_Release\ossl_static.pdb" "%BATCH_DIR_PATH%DebugFiles\pdb\Win32_Release\ossl_static.pdb"
|
|
||||||
echo f | xcopy "%BATCH_DIR_PATH%BuildFiles\Library\vs2008\x64_Release\ossl_static.pdb" "%BATCH_DIR_PATH%DebugFiles\pdb\x64_Release\ossl_static.pdb"
|
|
||||||
|
|
||||||
if exist "%BATCH_DIR_PATH%bin\BuildUtil.exe" (
|
|
||||||
del "%BATCH_DIR_PATH%bin\BuildUtil.exe"
|
|
||||||
)
|
|
||||||
|
|
||||||
C:\windows\Microsoft.NET\Framework\v3.5\MSBuild.exe /toolsversion:3.5 /target:Clean;Rebuild /property:Configuration=Debug "%BATCH_DIR_PATH%BuildUtil\BuildUtil.csproj"
|
|
||||||
|
|
||||||
cd "%BATCH_DIR_PATH%bin"
|
|
||||||
|
|
||||||
BuildUtil.exe /CMD:All
|
|
||||||
|
|
||||||
if errorlevel 1 exit /b %errorlevel%
|
|
@ -1 +0,0 @@
|
|||||||
crosslib_win32_191019_02
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
crosslib_win32_191019_02
|
|
@ -1 +0,0 @@
|
|||||||
crosslib_win32_191019_02
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
crosslib_win32_191019_02
|
|
29
src/BuildFiles/Manifests/common.manifest
Normal file
29
src/BuildFiles/Manifests/common.manifest
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<dependency>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity
|
||||||
|
type="win32"
|
||||||
|
name="Microsoft.Windows.Common-Controls"
|
||||||
|
version="6.0.0.0"
|
||||||
|
processorArchitecture="*"
|
||||||
|
publicKeyToken="6595b64144ccf1df"
|
||||||
|
language="*"
|
||||||
|
/>
|
||||||
|
</dependentAssembly>
|
||||||
|
</dependency>
|
||||||
|
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||||
|
<application>
|
||||||
|
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"></supportedOS>
|
||||||
|
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"></supportedOS>
|
||||||
|
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"></supportedOS>
|
||||||
|
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"></supportedOS>
|
||||||
|
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"></supportedOS>
|
||||||
|
</application>
|
||||||
|
</compatibility>
|
||||||
|
<asmv3:application>
|
||||||
|
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
|
||||||
|
<dpiAware>true</dpiAware>
|
||||||
|
</asmv3:windowsSettings>
|
||||||
|
</asmv3:application>
|
||||||
|
</assembly>
|
@ -1,29 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
||||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
|
|
||||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
|
||||||
<security>
|
|
||||||
<requestedPrivileges>
|
|
||||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false"></requestedExecutionLevel>
|
|
||||||
</requestedPrivileges>
|
|
||||||
</security>
|
|
||||||
</trustInfo>
|
|
||||||
<dependency>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="amd64" publicKeyToken="6595b64144ccf1df" language="*"></assemblyIdentity>
|
|
||||||
</dependentAssembly>
|
|
||||||
</dependency>
|
|
||||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
|
||||||
<application>
|
|
||||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"></supportedOS>
|
|
||||||
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"></supportedOS>
|
|
||||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"></supportedOS>
|
|
||||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"></supportedOS>
|
|
||||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"></supportedOS>
|
|
||||||
</application>
|
|
||||||
</compatibility>
|
|
||||||
<asmv3:application>
|
|
||||||
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
|
|
||||||
<dpiAware>true</dpiAware>
|
|
||||||
</asmv3:windowsSettings>
|
|
||||||
</asmv3:application>
|
|
||||||
</assembly>
|
|
@ -1,29 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
||||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
|
|
||||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
|
||||||
<security>
|
|
||||||
<requestedPrivileges>
|
|
||||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
|
|
||||||
</requestedPrivileges>
|
|
||||||
</security>
|
|
||||||
</trustInfo>
|
|
||||||
<dependency>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="amd64" publicKeyToken="6595b64144ccf1df" language="*"></assemblyIdentity>
|
|
||||||
</dependentAssembly>
|
|
||||||
</dependency>
|
|
||||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
|
||||||
<application>
|
|
||||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"></supportedOS>
|
|
||||||
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"></supportedOS>
|
|
||||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"></supportedOS>
|
|
||||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"></supportedOS>
|
|
||||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"></supportedOS>
|
|
||||||
</application>
|
|
||||||
</compatibility>
|
|
||||||
<asmv3:application>
|
|
||||||
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
|
|
||||||
<dpiAware>true</dpiAware>
|
|
||||||
</asmv3:windowsSettings>
|
|
||||||
</asmv3:application>
|
|
||||||
</assembly>
|
|
@ -1,29 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
||||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
|
|
||||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
|
||||||
<security>
|
|
||||||
<requestedPrivileges>
|
|
||||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false"></requestedExecutionLevel>
|
|
||||||
</requestedPrivileges>
|
|
||||||
</security>
|
|
||||||
</trustInfo>
|
|
||||||
<dependency>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="x86" publicKeyToken="6595b64144ccf1df" language="*"></assemblyIdentity>
|
|
||||||
</dependentAssembly>
|
|
||||||
</dependency>
|
|
||||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
|
||||||
<application>
|
|
||||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"></supportedOS>
|
|
||||||
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"></supportedOS>
|
|
||||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"></supportedOS>
|
|
||||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"></supportedOS>
|
|
||||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"></supportedOS>
|
|
||||||
</application>
|
|
||||||
</compatibility>
|
|
||||||
<asmv3:application>
|
|
||||||
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
|
|
||||||
<dpiAware>true</dpiAware>
|
|
||||||
</asmv3:windowsSettings>
|
|
||||||
</asmv3:application>
|
|
||||||
</assembly>
|
|
@ -1,29 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
||||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
|
|
||||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
|
||||||
<security>
|
|
||||||
<requestedPrivileges>
|
|
||||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
|
|
||||||
</requestedPrivileges>
|
|
||||||
</security>
|
|
||||||
</trustInfo>
|
|
||||||
<dependency>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="x86" publicKeyToken="6595b64144ccf1df" language="*"></assemblyIdentity>
|
|
||||||
</dependentAssembly>
|
|
||||||
</dependency>
|
|
||||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
|
||||||
<application>
|
|
||||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"></supportedOS>
|
|
||||||
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"></supportedOS>
|
|
||||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"></supportedOS>
|
|
||||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"></supportedOS>
|
|
||||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"></supportedOS>
|
|
||||||
</application>
|
|
||||||
</compatibility>
|
|
||||||
<asmv3:application>
|
|
||||||
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
|
|
||||||
<dpiAware>true</dpiAware>
|
|
||||||
</asmv3:windowsSettings>
|
|
||||||
</asmv3:application>
|
|
||||||
</assembly>
|
|
@ -1,214 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup>
|
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProductVersion>9.0.30729</ProductVersion>
|
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
|
||||||
<ProjectGuid>{384815C3-333C-4CEC-9DCD-B6AB2602EBB9}</ProjectGuid>
|
|
||||||
<OutputType>Exe</OutputType>
|
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
||||||
<RootNamespace>BuildUtil</RootNamespace>
|
|
||||||
<AssemblyName>BuildUtilTmp</AssemblyName>
|
|
||||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
|
||||||
<FileAlignment>512</FileAlignment>
|
|
||||||
<ApplicationIcon>BuildUtilIcon.ico</ApplicationIcon>
|
|
||||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
|
||||||
<StartupObject>BuildUtil.BuildUtilMain</StartupObject>
|
|
||||||
<NoWin32Manifest>true</NoWin32Manifest>
|
|
||||||
<PublishUrl>publish\</PublishUrl>
|
|
||||||
<Install>true</Install>
|
|
||||||
<InstallFrom>Disk</InstallFrom>
|
|
||||||
<UpdateEnabled>false</UpdateEnabled>
|
|
||||||
<UpdateMode>Foreground</UpdateMode>
|
|
||||||
<UpdateInterval>7</UpdateInterval>
|
|
||||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
|
||||||
<UpdatePeriodically>false</UpdatePeriodically>
|
|
||||||
<UpdateRequired>false</UpdateRequired>
|
|
||||||
<MapFileExtensions>true</MapFileExtensions>
|
|
||||||
<ApplicationRevision>0</ApplicationRevision>
|
|
||||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
|
||||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>..\bin\</OutputPath>
|
|
||||||
<DefineConstants>TRACE;DEBUG;BU_SOFTETHER;BU_OSS</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<DocumentationFile>
|
|
||||||
</DocumentationFile>
|
|
||||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="System" />
|
|
||||||
<Reference Include="System.Configuration" />
|
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.DirectoryServices" />
|
|
||||||
<Reference Include="System.Drawing" />
|
|
||||||
<Reference Include="System.EnterpriseServices" />
|
|
||||||
<Reference Include="System.Runtime.Serialization.Formatters.Soap" />
|
|
||||||
<Reference Include="System.Transactions" />
|
|
||||||
<Reference Include="System.Web" />
|
|
||||||
<Reference Include="System.Web.Services" />
|
|
||||||
<Reference Include="System.Windows.Forms" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="BuildUtilCommands.cs" />
|
|
||||||
<Compile Include="BuildUtilMain.cs" />
|
|
||||||
<Compile Include="CodeSign.cs" />
|
|
||||||
<Compile Include="CoreUtil\Bmp.cs" />
|
|
||||||
<Compile Include="CoreUtil\Buf.cs" />
|
|
||||||
<Compile Include="CoreUtil\Cache.cs" />
|
|
||||||
<Compile Include="CoreUtil\Compress.cs" />
|
|
||||||
<Compile Include="CoreUtil\Console.cs" />
|
|
||||||
<Compile Include="CoreUtil\Csv.cs" />
|
|
||||||
<Compile Include="CoreUtil\Env.cs" />
|
|
||||||
<Compile Include="CoreUtil\FileIO.cs" />
|
|
||||||
<Compile Include="CoreUtil\GZip.cs" />
|
|
||||||
<Compile Include="CoreUtil\Kernel.cs" />
|
|
||||||
<Compile Include="CoreUtil\MultiLang.cs" />
|
|
||||||
<Compile Include="CoreUtil\Packer.cs" />
|
|
||||||
<Compile Include="CoreUtil\RC4.cs" />
|
|
||||||
<Compile Include="CoreUtil\ReadIni.cs" />
|
|
||||||
<Compile Include="CoreUtil\Reg.cs" />
|
|
||||||
<Compile Include="CoreUtil\Secure.cs" />
|
|
||||||
<Compile Include="CoreUtil\Stb.cs" />
|
|
||||||
<Compile Include="CoreUtil\Str.cs" />
|
|
||||||
<Compile Include="CoreUtil\Tar.cs" />
|
|
||||||
<Compile Include="CoreUtil\Thread.cs" />
|
|
||||||
<Compile Include="CoreUtil\Time.cs" />
|
|
||||||
<Compile Include="CoreUtil\Util.cs" />
|
|
||||||
<Compile Include="CoreUtil\Win32.cs" />
|
|
||||||
<Compile Include="CoreUtil\Zip.cs" />
|
|
||||||
<Compile Include="CoreUtil\ZLib.cs" />
|
|
||||||
|
|
||||||
<Compile Include="PEUtil.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
<Compile Include="Properties\Resources.Designer.cs">
|
|
||||||
<AutoGen>True</AutoGen>
|
|
||||||
<DesignTime>True</DesignTime>
|
|
||||||
<DependentUpon>Resources.resx</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Properties\Settings.Designer.cs">
|
|
||||||
<AutoGen>True</AutoGen>
|
|
||||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
|
||||||
<DependentUpon>Settings.settings</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Test.cs" />
|
|
||||||
<Compile Include="UnixBuildSoftwares.cs" />
|
|
||||||
<Compile Include="VpnBuilder.cs" />
|
|
||||||
<Compile Include="VpnBuilderConfig.cs" />
|
|
||||||
<Compile Include="VpnBuilderConfigTypes.cs" />
|
|
||||||
<Compile Include="Web References\HvSignService\Reference.cs">
|
|
||||||
<AutoGen>True</AutoGen>
|
|
||||||
<DesignTime>True</DesignTime>
|
|
||||||
<DependentUpon>Reference.map</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Web References\SignService\Reference.cs">
|
|
||||||
<AutoGen>True</AutoGen>
|
|
||||||
<DesignTime>True</DesignTime>
|
|
||||||
<DependentUpon>Reference.map</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Win32BuildSoftware.cs" />
|
|
||||||
<Compile Include="Win32BuildUtil.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<WebReferences Include="Web References\" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<WebReferenceUrl Include="http://dv/Sign/Sign.asmx">
|
|
||||||
<UrlBehavior>Dynamic</UrlBehavior>
|
|
||||||
<RelPath>Web References\SignService\</RelPath>
|
|
||||||
<UpdateFromURL>http://dv/Sign/Sign.asmx</UpdateFromURL>
|
|
||||||
<ServiceLocationURL>
|
|
||||||
</ServiceLocationURL>
|
|
||||||
<CachedDynamicPropName>
|
|
||||||
</CachedDynamicPropName>
|
|
||||||
<CachedAppSettingsObjectName>Settings</CachedAppSettingsObjectName>
|
|
||||||
<CachedSettingsPropName>BuildUtil_SignService_Sign</CachedSettingsPropName>
|
|
||||||
</WebReferenceUrl>
|
|
||||||
<WebReferenceUrl Include="http://hvsigncode/Sign.asmx">
|
|
||||||
<UrlBehavior>Dynamic</UrlBehavior>
|
|
||||||
<RelPath>Web References\HvSignService\</RelPath>
|
|
||||||
<UpdateFromURL>http://hvsigncode/Sign.asmx</UpdateFromURL>
|
|
||||||
<ServiceLocationURL>
|
|
||||||
</ServiceLocationURL>
|
|
||||||
<CachedDynamicPropName>
|
|
||||||
</CachedDynamicPropName>
|
|
||||||
<CachedAppSettingsObjectName>Settings</CachedAppSettingsObjectName>
|
|
||||||
<CachedSettingsPropName>BuildUtilTmp_HvSignService_Sign</CachedSettingsPropName>
|
|
||||||
</WebReferenceUrl>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="app.config" />
|
|
||||||
<None Include="Properties\Settings.settings">
|
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
|
||||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
|
||||||
</None>
|
|
||||||
<None Include="Web References\HvSignService\Sign.wsdl" />
|
|
||||||
<None Include="Web References\SignService\Reference.map">
|
|
||||||
<Generator>MSDiscoCodeGenerator</Generator>
|
|
||||||
<LastGenOutput>Reference.cs</LastGenOutput>
|
|
||||||
</None>
|
|
||||||
<None Include="Web References\SignService\Sign.disco" />
|
|
||||||
<None Include="Web References\SignService\Sign.wsdl" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Content Include="BuildUtilIcon.ico" />
|
|
||||||
<None Include="Web References\HvSignService\Reference.map">
|
|
||||||
<Generator>MSDiscoCodeGenerator</Generator>
|
|
||||||
<LastGenOutput>Reference.cs</LastGenOutput>
|
|
||||||
</None>
|
|
||||||
<None Include="Web References\HvSignService\Sign.disco" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
|
||||||
<Visible>False</Visible>
|
|
||||||
<ProductName>.NET Framework Client Profile</ProductName>
|
|
||||||
<Install>false</Install>
|
|
||||||
</BootstrapperPackage>
|
|
||||||
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
|
||||||
<Visible>False</Visible>
|
|
||||||
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
|
|
||||||
<Install>true</Install>
|
|
||||||
</BootstrapperPackage>
|
|
||||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
|
|
||||||
<Visible>False</Visible>
|
|
||||||
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
|
|
||||||
<Install>false</Install>
|
|
||||||
</BootstrapperPackage>
|
|
||||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
|
|
||||||
<Visible>False</Visible>
|
|
||||||
<ProductName>.NET Framework 3.5</ProductName>
|
|
||||||
<Install>false</Install>
|
|
||||||
</BootstrapperPackage>
|
|
||||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
|
||||||
<Visible>False</Visible>
|
|
||||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
|
||||||
<Install>false</Install>
|
|
||||||
</BootstrapperPackage>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<EmbeddedResource Include="Properties\Resources.resx">
|
|
||||||
<Generator>ResXFileCodeGenerator</Generator>
|
|
||||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
|
||||||
</EmbeddedResource>
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
|
||||||
<Target Name="BeforeBuild">
|
|
||||||
</Target>
|
|
||||||
<Target Name="AfterBuild">
|
|
||||||
</Target>
|
|
||||||
-->
|
|
||||||
<PropertyGroup>
|
|
||||||
<PostBuildEvent>$(ProjectDir)CopyBuildUtil.cmd</PostBuildEvent>
|
|
||||||
</PropertyGroup>
|
|
||||||
</Project>
|
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 30 KiB |
@ -1,113 +0,0 @@
|
|||||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
|
||||||
// Build Utility
|
|
||||||
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Text;
|
|
||||||
using System.Configuration;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Collections.Specialized;
|
|
||||||
using System.Security.Cryptography;
|
|
||||||
using System.Web;
|
|
||||||
using System.Web.Security;
|
|
||||||
using System.Web.UI;
|
|
||||||
using System.Web.UI.WebControls;
|
|
||||||
using System.Web.UI.WebControls.WebParts;
|
|
||||||
using System.Web.UI.HtmlControls;
|
|
||||||
using System.IO;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Drawing.Imaging;
|
|
||||||
using System.Drawing.Drawing2D;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Net;
|
|
||||||
using System.Net.Security;
|
|
||||||
using System.Security.Cryptography.X509Certificates;
|
|
||||||
using CoreUtil;
|
|
||||||
|
|
||||||
namespace BuildUtil
|
|
||||||
{
|
|
||||||
public class BuildUtilMain
|
|
||||||
{
|
|
||||||
public static bool pause = false;
|
|
||||||
|
|
||||||
// Main function
|
|
||||||
public static int Main(string[] args)
|
|
||||||
{
|
|
||||||
string errMsg = "";
|
|
||||||
|
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
ret = ConsoleService.EntryPoint("BuildUtil " + Env.CommandLine, "BuildUtil", typeof(BuildUtilMain), out errMsg);
|
|
||||||
|
|
||||||
if (ret != 0)
|
|
||||||
{
|
|
||||||
Con.WriteLine("{0}: fatal error C0001: {1}", Path.GetFileNameWithoutExtension(Env.ExeFileName), errMsg);
|
|
||||||
|
|
||||||
if (pause)
|
|
||||||
{
|
|
||||||
Console.Write("Press any key to exit...");
|
|
||||||
Console.ReadKey();
|
|
||||||
}
|
|
||||||
|
|
||||||
Environment.Exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Command execution
|
|
||||||
[ConsoleCommandMethod(
|
|
||||||
"VPN Build Utility",
|
|
||||||
"[/IN:infile] [/OUT:outfile] [/CSV] [/PAUSEIFERROR:yes|no] [/CMD command_line...]",
|
|
||||||
"VPN Build Utility",
|
|
||||||
"IN:This will specify the text file 'infile' that contains the list of commands that are automatically executed after the connection is completed. If the /IN parameter is specified, the vpncmd program will terminate automatically after the execution of all commands in the file are finished. If the file contains multiple-byte characters, the encoding must be Unicode (UTF-8). This cannot be specified together with /CMD (if /CMD is specified, /IN will be ignored).",
|
|
||||||
"OUT:You can specify the text file 'outfile' to write all strings such as onscreen prompts, message, error and execution results. Note that if the specified file already exists, the contents of the existing file will be overwritten. Output strings will be recorded using Unicode (UTF-8) encoding.",
|
|
||||||
"CMD:If the optional command 'command_line...' is included after /CMD, that command will be executed after the connection is complete and the vpncmd program will terminate after that. This cannot be specified together with /IN (if specified together with /IN, /IN will be ignored). Specify the /CMD parameter after all other vpncmd parameters.",
|
|
||||||
"CSV:Enable CSV Mode.",
|
|
||||||
"PAUSEIFERROR:Specify yes if you'd like to pause before exiting the process if there are any errors."
|
|
||||||
)]
|
|
||||||
public static int BuildUtil(ConsoleService c, string cmdName, string str)
|
|
||||||
{
|
|
||||||
Con.WriteLine("");
|
|
||||||
Con.WriteLine("Copyright (c) SoftEther VPN Project. All Rights Reserved.");
|
|
||||||
Con.WriteLine("");
|
|
||||||
|
|
||||||
ConsoleParam[] args =
|
|
||||||
{
|
|
||||||
new ConsoleParam("IN", null, null, null, null),
|
|
||||||
new ConsoleParam("OUT", null, null, null, null),
|
|
||||||
new ConsoleParam("CMD", null, null, null, null),
|
|
||||||
new ConsoleParam("CSV", null, null, null, null),
|
|
||||||
new ConsoleParam("PAUSEIFERROR", null, null, null, null),
|
|
||||||
new ConsoleParam("DT", null, null, null, null),
|
|
||||||
};
|
|
||||||
|
|
||||||
ConsoleParamValueList vl = c.ParseCommandList(cmdName, str, args);
|
|
||||||
|
|
||||||
pause = vl["PAUSEIFERROR"].BoolValue;
|
|
||||||
|
|
||||||
string cmdline = vl["CMD"].StrValue;
|
|
||||||
|
|
||||||
if (vl["DT"].IsEmpty == false)
|
|
||||||
{
|
|
||||||
BuildSoftwareList.ListCreatedDateTime = Str.StrToDateTime(vl["DT"].StrValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
ConsoleService cs = c;
|
|
||||||
|
|
||||||
while (cs.DispatchCommand(cmdline, "BuildUtil>", typeof(BuildUtilCommands), null))
|
|
||||||
{
|
|
||||||
if (Str.IsEmptyStr(cmdline) == false)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return cs.RetCode;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,195 +0,0 @@
|
|||||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
|
||||||
// Build Utility
|
|
||||||
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Text;
|
|
||||||
using System.Configuration;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Collections.Specialized;
|
|
||||||
using System.Security.Cryptography;
|
|
||||||
using System.Web;
|
|
||||||
using System.Web.Security;
|
|
||||||
using System.Web.UI;
|
|
||||||
using System.Web.UI.WebControls;
|
|
||||||
using System.Web.UI.WebControls.WebParts;
|
|
||||||
using System.Web.UI.HtmlControls;
|
|
||||||
using System.IO;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Drawing.Imaging;
|
|
||||||
using System.Drawing.Drawing2D;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Net;
|
|
||||||
using System.Net.Security;
|
|
||||||
using System.Security.Cryptography.X509Certificates;
|
|
||||||
using CoreUtil;
|
|
||||||
using BuildUtil.HvSignService;
|
|
||||||
|
|
||||||
namespace BuildUtil
|
|
||||||
{
|
|
||||||
public static class CodeSign
|
|
||||||
{
|
|
||||||
public const int NumRetries = 1;
|
|
||||||
public const int RetryIntervals = 200;
|
|
||||||
|
|
||||||
public const int NumRetriesForCopy = 50;
|
|
||||||
public const int RetryIntervalsForCopy = 10;
|
|
||||||
|
|
||||||
const string in_dir = @"\\hvsigncode\SIGN\IN";
|
|
||||||
const string out_dir = @"\\hvsigncode\SIGN\OUT";
|
|
||||||
|
|
||||||
#if !BU_SOFTETHER
|
|
||||||
public static int UsingCertId = 1;
|
|
||||||
#else
|
|
||||||
public static int UsingCertId = 2;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static object lockObj = new object();
|
|
||||||
|
|
||||||
// Digital-sign the data on the memory
|
|
||||||
public static byte[] SignMemory(byte[] srcData, string comment, bool kernelModeDriver, int cert_id, int sha_mode)
|
|
||||||
{
|
|
||||||
#if !BU_OSS
|
|
||||||
int i;
|
|
||||||
string out_filename = null;
|
|
||||||
byte[] ret = null;
|
|
||||||
|
|
||||||
string in_tmp_filename = Path.Combine(in_dir,
|
|
||||||
Str.DateTimeToStrShortWithMilliSecs(DateTime.Now) + "_" +
|
|
||||||
Env.MachineName + "_" +
|
|
||||||
Secure.Rand63i().ToString() + ".dat");
|
|
||||||
|
|
||||||
IO.SaveFile(in_tmp_filename, srcData);
|
|
||||||
|
|
||||||
for (i = 0; i < NumRetries; i++)
|
|
||||||
{
|
|
||||||
Sign sign = new Sign();
|
|
||||||
sign.Proxy = new WebProxy();
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
out_filename = sign.ExecSignEx(Path.GetFileName(in_tmp_filename),
|
|
||||||
kernelModeDriver,
|
|
||||||
comment,
|
|
||||||
cert_id,
|
|
||||||
sha_mode);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
if (i != (NumRetries - 1))
|
|
||||||
{
|
|
||||||
Kernel.SleepThread(RetryIntervals);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw ex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < NumRetriesForCopy; i++)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
ret = IO.ReadFile(Path.Combine(out_dir, out_filename));
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
if (i != (NumRetriesForCopy - 1))
|
|
||||||
{
|
|
||||||
Kernel.SleepThread(RetryIntervalsForCopy);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw ex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
string tmpFileName = IO.CreateTempFileNameByExt(".exe");
|
|
||||||
try
|
|
||||||
{
|
|
||||||
File.Delete(tmpFileName);
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
}
|
|
||||||
File.WriteAllBytes(tmpFileName, ret);
|
|
||||||
|
|
||||||
lock (lockObj)
|
|
||||||
{
|
|
||||||
if (ExeSignChecker.CheckFileDigitalSignature(tmpFileName) == false)
|
|
||||||
{
|
|
||||||
throw new ApplicationException("CheckFileDigitalSignature failed.");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (kernelModeDriver)
|
|
||||||
{
|
|
||||||
if (ExeSignChecker.IsKernelModeSignedFile(tmpFileName) == false)
|
|
||||||
{
|
|
||||||
throw new ApplicationException("IsKernelModeSignedFile failed.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
File.Delete(tmpFileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
#else // BU_OSS
|
|
||||||
return srcData;
|
|
||||||
#endif // BU_OSS
|
|
||||||
}
|
|
||||||
|
|
||||||
// Digital-sign the data on the file
|
|
||||||
public static void SignFile(string destFileName, string srcFileName, string comment, bool kernelModeDriver)
|
|
||||||
{
|
|
||||||
int cert_id = UsingCertId;
|
|
||||||
|
|
||||||
SignFile(destFileName, srcFileName, comment, kernelModeDriver, cert_id, 0);
|
|
||||||
}
|
|
||||||
public static void SignFile(string destFileName, string srcFileName, string comment, bool kernelModeDriver, int cert_id, int sha_mode)
|
|
||||||
{
|
|
||||||
#if !BU_OSS
|
|
||||||
if (cert_id == 0)
|
|
||||||
{
|
|
||||||
cert_id = UsingCertId;
|
|
||||||
}
|
|
||||||
|
|
||||||
Con.WriteLine("Signing for '{0}'...", Path.GetFileName(destFileName));
|
|
||||||
byte[] srcData = File.ReadAllBytes(srcFileName);
|
|
||||||
|
|
||||||
if (srcFileName.EndsWith(".msi", StringComparison.InvariantCultureIgnoreCase))
|
|
||||||
{
|
|
||||||
sha_mode = 1;
|
|
||||||
// todo: Set 2 in future !!!
|
|
||||||
}
|
|
||||||
|
|
||||||
byte[] destData = SignMemory(srcData, comment, kernelModeDriver, cert_id, sha_mode);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
File.Delete(destFileName);
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
File.WriteAllBytes(destFileName, destData);
|
|
||||||
|
|
||||||
Con.WriteLine("Done.");
|
|
||||||
#else // BU_OSS
|
|
||||||
Con.WriteLine("Skipping the code signing for '{0}' in the build process. You can insert your own authenticode sign process here.", srcFileName);
|
|
||||||
#endif // BU_OSS
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
|||||||
copy "%0\..\..\bin\BuildUtilTmp.exe" "%0\..\..\bin\BuildUtil.exe"
|
|
||||||
exit /b 0
|
|
@ -1,117 +0,0 @@
|
|||||||
// CoreUtil
|
|
||||||
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Data;
|
|
||||||
using System.Data.Sql;
|
|
||||||
using System.Data.SqlClient;
|
|
||||||
using System.Data.SqlTypes;
|
|
||||||
using System.Text;
|
|
||||||
using System.Configuration;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Security.Cryptography;
|
|
||||||
using System.Web;
|
|
||||||
using System.Web.Security;
|
|
||||||
using System.Web.UI;
|
|
||||||
using System.Web.UI.WebControls;
|
|
||||||
using System.Web.UI.WebControls.WebParts;
|
|
||||||
using System.Web.UI.HtmlControls;
|
|
||||||
using System.IO;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Drawing.Imaging;
|
|
||||||
using System.Drawing.Drawing2D;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Web.Mail;
|
|
||||||
using System.Net;
|
|
||||||
using System.Net.Sockets;
|
|
||||||
using System.Net.NetworkInformation;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace CoreUtil
|
|
||||||
{
|
|
||||||
public static class Bmp
|
|
||||||
{
|
|
||||||
public static Bitmap Load(string filename)
|
|
||||||
{
|
|
||||||
return Load(IO.ReadFile(filename));
|
|
||||||
}
|
|
||||||
public static Bitmap Load(byte[] data)
|
|
||||||
{
|
|
||||||
MemoryStream ms = new MemoryStream();
|
|
||||||
ms.Write(data, 0, data.Length);
|
|
||||||
ms.Seek(0, SeekOrigin.Begin);
|
|
||||||
|
|
||||||
return new Bitmap(ms);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void SaveAsBitmap(Bitmap bmp, string filename)
|
|
||||||
{
|
|
||||||
IO.SaveFile(filename, SaveAsBitmap(bmp));
|
|
||||||
}
|
|
||||||
public static byte[] SaveAsBitmap(Bitmap bmp)
|
|
||||||
{
|
|
||||||
MemoryStream ms = new MemoryStream();
|
|
||||||
|
|
||||||
bmp.Save(ms, ImageFormat.Bmp);
|
|
||||||
|
|
||||||
return ms.ToArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void SaveAsJpeg(Bitmap bmp, string filename)
|
|
||||||
{
|
|
||||||
IO.SaveFile(filename, SaveAsJpeg(bmp));
|
|
||||||
}
|
|
||||||
public static byte[] SaveAsJpeg(Bitmap bmp)
|
|
||||||
{
|
|
||||||
return SaveAsJpeg(bmp, 100);
|
|
||||||
}
|
|
||||||
public static void SaveAsJpeg(Bitmap bmp, string filename, int quality)
|
|
||||||
{
|
|
||||||
IO.SaveFile(filename, SaveAsJpeg(bmp, quality));
|
|
||||||
}
|
|
||||||
public static byte[] SaveAsJpeg(Bitmap bmp, int quality)
|
|
||||||
{
|
|
||||||
EncoderParameters eps = new EncoderParameters(1);
|
|
||||||
EncoderParameter ep = new EncoderParameter(System.Drawing.Imaging.Encoder.Quality, quality);
|
|
||||||
eps.Param[0] = ep;
|
|
||||||
|
|
||||||
ImageCodecInfo info = getEncoderInfo("image/jpeg");
|
|
||||||
|
|
||||||
MemoryStream ms = new MemoryStream();
|
|
||||||
bmp.Save(ms, info, eps);
|
|
||||||
|
|
||||||
return ms.ToArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
static ImageCodecInfo getEncoderInfo(string type)
|
|
||||||
{
|
|
||||||
ImageCodecInfo[] encs = ImageCodecInfo.GetImageEncoders();
|
|
||||||
|
|
||||||
foreach (ImageCodecInfo enc in encs)
|
|
||||||
{
|
|
||||||
if (Str.StrCmpi(enc.MimeType, type))
|
|
||||||
{
|
|
||||||
return enc;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Bitmap ResizeBitmap(Bitmap bmp, int width, int height)
|
|
||||||
{
|
|
||||||
Bitmap dst = new Bitmap(width, height, PixelFormat.Format24bppRgb);
|
|
||||||
Graphics g = Graphics.FromImage(dst);
|
|
||||||
g.SmoothingMode = SmoothingMode.HighQuality;
|
|
||||||
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
|
||||||
|
|
||||||
Rectangle r = new Rectangle(0, 0, width, height);
|
|
||||||
|
|
||||||
g.DrawImage(bmp, r);
|
|
||||||
|
|
||||||
return dst;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,602 +0,0 @@
|
|||||||
// CoreUtil
|
|
||||||
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Data;
|
|
||||||
using System.Data.Sql;
|
|
||||||
using System.Data.SqlClient;
|
|
||||||
using System.Data.SqlTypes;
|
|
||||||
using System.Text;
|
|
||||||
using System.Configuration;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Security.Cryptography;
|
|
||||||
using System.Web;
|
|
||||||
using System.Web.Security;
|
|
||||||
using System.Web.UI;
|
|
||||||
using System.Web.UI.WebControls;
|
|
||||||
using System.Web.UI.WebControls.WebParts;
|
|
||||||
using System.Web.UI.HtmlControls;
|
|
||||||
using System.IO;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Drawing.Imaging;
|
|
||||||
using System.Drawing.Drawing2D;
|
|
||||||
using System.Web.Mail;
|
|
||||||
|
|
||||||
namespace CoreUtil
|
|
||||||
{
|
|
||||||
// FIFO
|
|
||||||
public class Fifo
|
|
||||||
{
|
|
||||||
byte[] p;
|
|
||||||
int pos, size;
|
|
||||||
public int Size
|
|
||||||
{
|
|
||||||
get { return size; }
|
|
||||||
}
|
|
||||||
public byte[] Data
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this.p;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public int DataOffset
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this.pos;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public int PhysicalSize
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return p.Length;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int reallocMemSize;
|
|
||||||
public const int FifoInitMemSize = 4096;
|
|
||||||
public const int FifoReallocMemSize = 65536;
|
|
||||||
public const int FifoReallocMemSizeSmall = 65536;
|
|
||||||
|
|
||||||
long totalWriteSize = 0, totalReadSize = 0;
|
|
||||||
|
|
||||||
public long TotalReadSize
|
|
||||||
{
|
|
||||||
get { return totalReadSize; }
|
|
||||||
}
|
|
||||||
public long TotalWriteSize
|
|
||||||
{
|
|
||||||
get { return totalWriteSize; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public Fifo()
|
|
||||||
{
|
|
||||||
init(0);
|
|
||||||
}
|
|
||||||
public Fifo(int reallocMemSize)
|
|
||||||
{
|
|
||||||
init(reallocMemSize);
|
|
||||||
}
|
|
||||||
|
|
||||||
void init(int reallocMemSize)
|
|
||||||
{
|
|
||||||
if (reallocMemSize == 0)
|
|
||||||
{
|
|
||||||
reallocMemSize = FifoReallocMemSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.size = this.pos = 0;
|
|
||||||
this.reallocMemSize = reallocMemSize;
|
|
||||||
|
|
||||||
this.p = new byte[FifoInitMemSize];
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Write(Buf buf)
|
|
||||||
{
|
|
||||||
Write(buf.ByteData);
|
|
||||||
}
|
|
||||||
public void Write(byte[] src)
|
|
||||||
{
|
|
||||||
Write(src, src.Length);
|
|
||||||
}
|
|
||||||
public void SkipWrite(int size)
|
|
||||||
{
|
|
||||||
Write(null, size);
|
|
||||||
}
|
|
||||||
public void Write(byte[] src, int size)
|
|
||||||
{
|
|
||||||
Write(src, 0, size);
|
|
||||||
}
|
|
||||||
public void Write(byte[] src, int offset, int size)
|
|
||||||
{
|
|
||||||
int i, need_size;
|
|
||||||
bool realloc_flag;
|
|
||||||
|
|
||||||
i = this.size;
|
|
||||||
this.size += size;
|
|
||||||
need_size = this.pos + this.size;
|
|
||||||
realloc_flag = false;
|
|
||||||
|
|
||||||
int memsize = p.Length;
|
|
||||||
while (need_size > memsize)
|
|
||||||
{
|
|
||||||
memsize = Math.Max(memsize, FifoInitMemSize) * 3;
|
|
||||||
realloc_flag = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (realloc_flag)
|
|
||||||
{
|
|
||||||
byte[] new_p = new byte[memsize];
|
|
||||||
Util.CopyByte(new_p, 0, this.p, 0, this.p.Length);
|
|
||||||
this.p = new_p;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (src != null)
|
|
||||||
{
|
|
||||||
Util.CopyByte(this.p, this.pos + i, src, offset, size);
|
|
||||||
}
|
|
||||||
|
|
||||||
totalWriteSize += size;
|
|
||||||
}
|
|
||||||
|
|
||||||
public byte[] Read()
|
|
||||||
{
|
|
||||||
return Read(this.Size);
|
|
||||||
}
|
|
||||||
public void ReadToBuf(Buf buf, int size)
|
|
||||||
{
|
|
||||||
byte[] data = Read(size);
|
|
||||||
|
|
||||||
buf.Write(data);
|
|
||||||
}
|
|
||||||
public Buf ReadToBuf(int size)
|
|
||||||
{
|
|
||||||
byte[] data = Read(size);
|
|
||||||
|
|
||||||
return new Buf(data);
|
|
||||||
}
|
|
||||||
public byte[] Read(int size)
|
|
||||||
{
|
|
||||||
byte[] ret = new byte[size];
|
|
||||||
int read_size = Read(ret);
|
|
||||||
Array.Resize<byte>(ref ret, read_size);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
public int Read(byte[] dst)
|
|
||||||
{
|
|
||||||
return Read(dst, dst.Length);
|
|
||||||
}
|
|
||||||
public int SkipRead(int size)
|
|
||||||
{
|
|
||||||
return Read(null, size);
|
|
||||||
}
|
|
||||||
public int Read(byte[] dst, int size)
|
|
||||||
{
|
|
||||||
return Read(dst, 0, size);
|
|
||||||
}
|
|
||||||
public int Read(byte[] dst, int offset, int size)
|
|
||||||
{
|
|
||||||
int read_size;
|
|
||||||
|
|
||||||
read_size = Math.Min(size, this.size);
|
|
||||||
if (read_size == 0)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if (dst != null)
|
|
||||||
{
|
|
||||||
Util.CopyByte(dst, offset, this.p, this.pos, size);
|
|
||||||
}
|
|
||||||
this.pos += read_size;
|
|
||||||
this.size -= read_size;
|
|
||||||
|
|
||||||
if (this.size == 0)
|
|
||||||
{
|
|
||||||
this.pos = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.pos >= FifoInitMemSize &&
|
|
||||||
this.p.Length >= this.reallocMemSize &&
|
|
||||||
(this.p.Length / 2) > this.size)
|
|
||||||
{
|
|
||||||
byte[] new_p;
|
|
||||||
int new_size;
|
|
||||||
|
|
||||||
new_size = Math.Max(this.p.Length / 2, FifoInitMemSize);
|
|
||||||
new_p = new byte[new_size];
|
|
||||||
Util.CopyByte(new_p, 0, this.p, this.pos, this.size);
|
|
||||||
|
|
||||||
this.p = new_p;
|
|
||||||
|
|
||||||
this.pos = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
totalReadSize += read_size;
|
|
||||||
|
|
||||||
return read_size;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Buf
|
|
||||||
{
|
|
||||||
MemoryStream buf;
|
|
||||||
|
|
||||||
public Buf()
|
|
||||||
{
|
|
||||||
init(new byte[0]);
|
|
||||||
}
|
|
||||||
public Buf(byte[] data)
|
|
||||||
{
|
|
||||||
init(data);
|
|
||||||
}
|
|
||||||
void init(byte[] data)
|
|
||||||
{
|
|
||||||
buf = new MemoryStream();
|
|
||||||
Write(data);
|
|
||||||
SeekToBegin();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Clear()
|
|
||||||
{
|
|
||||||
buf.SetLength(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void WriteByte(byte data)
|
|
||||||
{
|
|
||||||
byte[] a = new byte[1] { data };
|
|
||||||
|
|
||||||
Write(a);
|
|
||||||
}
|
|
||||||
public void Write(byte[] data)
|
|
||||||
{
|
|
||||||
buf.Write(data, 0, data.Length);
|
|
||||||
}
|
|
||||||
public void Write(byte[] data, int pos, int len)
|
|
||||||
{
|
|
||||||
buf.Write(data, pos, len);
|
|
||||||
}
|
|
||||||
|
|
||||||
public uint Size
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return (uint)buf.Length;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public uint Pos
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return (uint)buf.Position;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public byte[] ByteData
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return buf.ToArray();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public byte this[uint i]
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return buf.GetBuffer()[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
buf.GetBuffer()[i] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public byte[] Read()
|
|
||||||
{
|
|
||||||
return Read(this.Size);
|
|
||||||
}
|
|
||||||
public byte[] Read(uint size)
|
|
||||||
{
|
|
||||||
byte[] tmp = new byte[size];
|
|
||||||
int i = buf.Read(tmp, 0, (int)size);
|
|
||||||
|
|
||||||
byte[] ret = new byte[i];
|
|
||||||
Array.Copy(tmp, 0, ret, 0, i);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
public byte ReadByte()
|
|
||||||
{
|
|
||||||
byte[] a = Read(1);
|
|
||||||
|
|
||||||
return a[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SeekToBegin()
|
|
||||||
{
|
|
||||||
Seek(0);
|
|
||||||
}
|
|
||||||
public void SeekToEnd()
|
|
||||||
{
|
|
||||||
Seek(0, SeekOrigin.End);
|
|
||||||
}
|
|
||||||
public void Seek(uint offset)
|
|
||||||
{
|
|
||||||
Seek(offset, SeekOrigin.Begin);
|
|
||||||
}
|
|
||||||
public void Seek(uint offset, SeekOrigin mode)
|
|
||||||
{
|
|
||||||
buf.Seek(offset, mode);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ushort ReadShort()
|
|
||||||
{
|
|
||||||
byte[] data = Read(2);
|
|
||||||
if (data.Length != 2)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if (Env.IsLittleEndian)
|
|
||||||
{
|
|
||||||
Array.Reverse(data);
|
|
||||||
}
|
|
||||||
return BitConverter.ToUInt16(data, 0);
|
|
||||||
}
|
|
||||||
public ushort RawReadShort()
|
|
||||||
{
|
|
||||||
byte[] data = Read(2);
|
|
||||||
if (data.Length != 2)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return BitConverter.ToUInt16(data, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public uint ReadInt()
|
|
||||||
{
|
|
||||||
byte[] data = Read(4);
|
|
||||||
if (data.Length != 4)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if (Env.IsLittleEndian)
|
|
||||||
{
|
|
||||||
Array.Reverse(data);
|
|
||||||
}
|
|
||||||
return BitConverter.ToUInt32(data, 0);
|
|
||||||
}
|
|
||||||
public uint RawReadInt()
|
|
||||||
{
|
|
||||||
byte[] data = Read(4);
|
|
||||||
if (data.Length != 4)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return BitConverter.ToUInt32(data, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ulong ReadInt64()
|
|
||||||
{
|
|
||||||
byte[] data = Read(8);
|
|
||||||
if (data.Length != 8)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if (Env.IsLittleEndian)
|
|
||||||
{
|
|
||||||
Array.Reverse(data);
|
|
||||||
}
|
|
||||||
return BitConverter.ToUInt64(data, 0);
|
|
||||||
}
|
|
||||||
public ulong RawReadInt64()
|
|
||||||
{
|
|
||||||
byte[] data = Read(8);
|
|
||||||
if (data.Length != 8)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return BitConverter.ToUInt64(data, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public string ReadStr()
|
|
||||||
{
|
|
||||||
return ReadStr(false);
|
|
||||||
}
|
|
||||||
public string ReadStr(bool include_null)
|
|
||||||
{
|
|
||||||
uint len = ReadInt();
|
|
||||||
byte[] data = Read(len - (uint)(include_null ? 1 : 0));
|
|
||||||
return Str.ShiftJisEncoding.GetString(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public string ReadUniStr()
|
|
||||||
{
|
|
||||||
return ReadUniStr(false);
|
|
||||||
}
|
|
||||||
public string ReadUniStr(bool include_null)
|
|
||||||
{
|
|
||||||
uint len = ReadInt();
|
|
||||||
if (len == 0)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
byte[] data = Read(len - (uint)(include_null ? 2 : 0));
|
|
||||||
return Str.Utf8Encoding.GetString(data);
|
|
||||||
}
|
|
||||||
public void WriteShort(ushort shortValue)
|
|
||||||
{
|
|
||||||
byte[] data = BitConverter.GetBytes(shortValue);
|
|
||||||
if (Env.IsLittleEndian)
|
|
||||||
{
|
|
||||||
Array.Reverse(data);
|
|
||||||
}
|
|
||||||
Write(data);
|
|
||||||
}
|
|
||||||
public void RawWriteShort(ushort shortValue)
|
|
||||||
{
|
|
||||||
byte[] data = BitConverter.GetBytes(shortValue);
|
|
||||||
Write(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void WriteInt(uint intValue)
|
|
||||||
{
|
|
||||||
byte[] data = BitConverter.GetBytes(intValue);
|
|
||||||
if (Env.IsLittleEndian)
|
|
||||||
{
|
|
||||||
Array.Reverse(data);
|
|
||||||
}
|
|
||||||
Write(data);
|
|
||||||
}
|
|
||||||
public void RawWriteInt(uint intValue)
|
|
||||||
{
|
|
||||||
byte[] data = BitConverter.GetBytes(intValue);
|
|
||||||
Write(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void WriteInt64(ulong int64Value)
|
|
||||||
{
|
|
||||||
byte[] data = BitConverter.GetBytes(int64Value);
|
|
||||||
if (Env.IsLittleEndian)
|
|
||||||
{
|
|
||||||
Array.Reverse(data);
|
|
||||||
}
|
|
||||||
Write(data);
|
|
||||||
}
|
|
||||||
public void RawWriteInt64(ulong int64Value)
|
|
||||||
{
|
|
||||||
byte[] data = BitConverter.GetBytes(int64Value);
|
|
||||||
Write(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public string ReadNextLineAsString()
|
|
||||||
{
|
|
||||||
return ReadNextLineAsString(Str.Utf8Encoding);
|
|
||||||
}
|
|
||||||
public string ReadNextLineAsString(Encoding encoding)
|
|
||||||
{
|
|
||||||
byte[] ret = ReadNextLineAsData();
|
|
||||||
if (ret == null)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return encoding.GetString(ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
public byte[] ReadNextLineAsData()
|
|
||||||
{
|
|
||||||
if (this.Size <= this.Pos)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
long pos = buf.Position;
|
|
||||||
|
|
||||||
long i;
|
|
||||||
byte[] tmp = new byte[1];
|
|
||||||
for (i = pos; i < buf.Length; i++)
|
|
||||||
{
|
|
||||||
buf.Read(tmp, 0, 1);
|
|
||||||
|
|
||||||
if (tmp[0] == 13 || tmp[0] == 10)
|
|
||||||
{
|
|
||||||
if (tmp[0] == 13)
|
|
||||||
{
|
|
||||||
if ((i + 2) < buf.Length)
|
|
||||||
{
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
long len = i - pos;
|
|
||||||
|
|
||||||
buf.Position = pos;
|
|
||||||
|
|
||||||
byte[] ret = Read((uint)((int)len));
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Seek(1, SeekOrigin.Current);
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ret.Length >= 1 && ret[ret.Length - 1] == 13)
|
|
||||||
{
|
|
||||||
Array.Resize<byte>(ref ret, ret.Length - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void WriteStr(string strValue)
|
|
||||||
{
|
|
||||||
WriteStr(strValue, false);
|
|
||||||
}
|
|
||||||
public void WriteStr(string strValue, bool include_null)
|
|
||||||
{
|
|
||||||
byte[] data = Str.ShiftJisEncoding.GetBytes(strValue);
|
|
||||||
WriteInt((uint)data.Length + (uint)(include_null ? 1 : 0));
|
|
||||||
Write(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void WriteUniStr(string strValue)
|
|
||||||
{
|
|
||||||
WriteUniStr(strValue, false);
|
|
||||||
}
|
|
||||||
public void WriteUniStr(string strValue, bool include_null)
|
|
||||||
{
|
|
||||||
byte[] data = Str.Utf8Encoding.GetBytes(strValue);
|
|
||||||
WriteInt((uint)data.Length + (uint)(include_null ? 2 : 0));
|
|
||||||
Write(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Buf ReadFromFile(string filename)
|
|
||||||
{
|
|
||||||
return new Buf(IO.ReadFile(filename));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void WriteToFile(string filename)
|
|
||||||
{
|
|
||||||
IO.SaveFile(filename, this.ByteData);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Buf ReadFromStream(Stream st)
|
|
||||||
{
|
|
||||||
Buf ret = new Buf();
|
|
||||||
int size = 32767;
|
|
||||||
|
|
||||||
while (true)
|
|
||||||
{
|
|
||||||
byte[] tmp = new byte[size];
|
|
||||||
int i = st.Read(tmp, 0, tmp.Length);
|
|
||||||
|
|
||||||
if (i <= 0)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
Array.Resize<byte>(ref tmp, i);
|
|
||||||
|
|
||||||
ret.Write(tmp);
|
|
||||||
}
|
|
||||||
|
|
||||||
ret.SeekToBegin();
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,249 +0,0 @@
|
|||||||
// CoreUtil
|
|
||||||
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Data;
|
|
||||||
using System.Data.Sql;
|
|
||||||
using System.Data.SqlClient;
|
|
||||||
using System.Data.SqlTypes;
|
|
||||||
using System.Text;
|
|
||||||
using System.Configuration;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Security.Cryptography;
|
|
||||||
using System.Web;
|
|
||||||
using System.Web.Security;
|
|
||||||
using System.Web.UI;
|
|
||||||
using System.Web.UI.WebControls;
|
|
||||||
using System.Web.UI.WebControls.WebParts;
|
|
||||||
using System.Web.UI.HtmlControls;
|
|
||||||
using System.IO;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Drawing.Imaging;
|
|
||||||
using System.Drawing.Drawing2D;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Web.Mail;
|
|
||||||
using System.Net;
|
|
||||||
using System.Net.Sockets;
|
|
||||||
using System.Net.NetworkInformation;
|
|
||||||
|
|
||||||
namespace CoreUtil
|
|
||||||
{
|
|
||||||
public enum CacheType
|
|
||||||
{
|
|
||||||
UpdateExpiresWhenAccess = 0,
|
|
||||||
DoNotUpdateExpiresWhenAccess = 1,
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Cache<TKey, TValue>
|
|
||||||
{
|
|
||||||
class Entry
|
|
||||||
{
|
|
||||||
DateTime createdDateTime;
|
|
||||||
public DateTime CreatedDateTime
|
|
||||||
{
|
|
||||||
get { return createdDateTime; }
|
|
||||||
}
|
|
||||||
DateTime updatedDateTime;
|
|
||||||
public DateTime UpdatedDateTime
|
|
||||||
{
|
|
||||||
get { return updatedDateTime; }
|
|
||||||
}
|
|
||||||
DateTime lastAccessedDateTime;
|
|
||||||
public DateTime LastAccessedDateTime
|
|
||||||
{
|
|
||||||
get { return lastAccessedDateTime; }
|
|
||||||
}
|
|
||||||
|
|
||||||
TKey key;
|
|
||||||
public TKey Key
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return key;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
TValue value;
|
|
||||||
public TValue Value
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
lastAccessedDateTime = Time.NowDateTime;
|
|
||||||
return this.value;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
this.value = value;
|
|
||||||
updatedDateTime = Time.NowDateTime;
|
|
||||||
lastAccessedDateTime = Time.NowDateTime;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Entry(TKey key, TValue value)
|
|
||||||
{
|
|
||||||
this.key = key;
|
|
||||||
this.value = value;
|
|
||||||
lastAccessedDateTime = updatedDateTime = createdDateTime = Time.NowDateTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int GetHashCode()
|
|
||||||
{
|
|
||||||
return key.GetHashCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string ToString()
|
|
||||||
{
|
|
||||||
return key.ToString() + "," + value.ToString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static readonly TimeSpan DefaultExpireSpan = new TimeSpan(0, 5, 0);
|
|
||||||
public const CacheType DefaultCacheType = CacheType.UpdateExpiresWhenAccess;
|
|
||||||
|
|
||||||
TimeSpan expireSpan;
|
|
||||||
public TimeSpan ExpireSpan
|
|
||||||
{
|
|
||||||
get { return expireSpan; }
|
|
||||||
}
|
|
||||||
CacheType type;
|
|
||||||
public CacheType Type
|
|
||||||
{
|
|
||||||
get { return type; }
|
|
||||||
}
|
|
||||||
Dictionary<TKey, Entry> list;
|
|
||||||
object lockObj;
|
|
||||||
|
|
||||||
public Cache()
|
|
||||||
{
|
|
||||||
init(DefaultExpireSpan, DefaultCacheType);
|
|
||||||
}
|
|
||||||
public Cache(CacheType type)
|
|
||||||
{
|
|
||||||
init(DefaultExpireSpan, type);
|
|
||||||
}
|
|
||||||
public Cache(TimeSpan expireSpan)
|
|
||||||
{
|
|
||||||
init(expireSpan, DefaultCacheType);
|
|
||||||
}
|
|
||||||
public Cache(TimeSpan expireSpan, CacheType type)
|
|
||||||
{
|
|
||||||
init(expireSpan, type);
|
|
||||||
}
|
|
||||||
void init(TimeSpan expireSpan, CacheType type)
|
|
||||||
{
|
|
||||||
this.expireSpan = expireSpan;
|
|
||||||
this.type = type;
|
|
||||||
|
|
||||||
list = new Dictionary<TKey, Entry>();
|
|
||||||
lockObj = new object();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Add(TKey key, TValue value)
|
|
||||||
{
|
|
||||||
lock (lockObj)
|
|
||||||
{
|
|
||||||
Entry e;
|
|
||||||
|
|
||||||
deleteExpired();
|
|
||||||
|
|
||||||
if (list.ContainsKey(key) == false)
|
|
||||||
{
|
|
||||||
e = new Entry(key, value);
|
|
||||||
|
|
||||||
list.Add(e.Key, e);
|
|
||||||
|
|
||||||
deleteExpired();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
e = list[key];
|
|
||||||
e.Value = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Delete(TKey key)
|
|
||||||
{
|
|
||||||
lock (lockObj)
|
|
||||||
{
|
|
||||||
if (list.ContainsKey(key))
|
|
||||||
{
|
|
||||||
list.Remove(key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public TValue this[TKey key]
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
lock (lockObj)
|
|
||||||
{
|
|
||||||
deleteExpired();
|
|
||||||
|
|
||||||
if (list.ContainsKey(key) == false)
|
|
||||||
{
|
|
||||||
return default(TValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
return list[key].Value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static long last_deleted = 0;
|
|
||||||
|
|
||||||
void deleteExpired()
|
|
||||||
{
|
|
||||||
bool do_delete = false;
|
|
||||||
long now = Tick64.Value;
|
|
||||||
long delete_interval = expireSpan.Milliseconds / 10;
|
|
||||||
|
|
||||||
lock (lockObj)
|
|
||||||
{
|
|
||||||
if (last_deleted == 0 || now > (last_deleted + delete_interval))
|
|
||||||
{
|
|
||||||
last_deleted = now;
|
|
||||||
do_delete = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (do_delete == false)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
lock (lockObj)
|
|
||||||
{
|
|
||||||
List<Entry> o = new List<Entry>();
|
|
||||||
DateTime expire = Time.NowDateTime - this.expireSpan;
|
|
||||||
|
|
||||||
foreach (Entry e in list.Values)
|
|
||||||
{
|
|
||||||
if (this.type == CacheType.UpdateExpiresWhenAccess)
|
|
||||||
{
|
|
||||||
if (e.LastAccessedDateTime < expire)
|
|
||||||
{
|
|
||||||
o.Add(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (e.UpdatedDateTime < expire)
|
|
||||||
{
|
|
||||||
o.Add(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (Entry e in o)
|
|
||||||
{
|
|
||||||
list.Remove(e.Key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,111 +0,0 @@
|
|||||||
// CoreUtil
|
|
||||||
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Data;
|
|
||||||
using System.Data.Sql;
|
|
||||||
using System.Data.SqlClient;
|
|
||||||
using System.Data.SqlTypes;
|
|
||||||
using System.Text;
|
|
||||||
using System.Configuration;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Security.Cryptography;
|
|
||||||
using System.Web;
|
|
||||||
using System.Web.Security;
|
|
||||||
using System.Web.UI;
|
|
||||||
using System.Web.UI.WebControls;
|
|
||||||
using System.Web.UI.WebControls.WebParts;
|
|
||||||
using System.Web.UI.HtmlControls;
|
|
||||||
using System.IO;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Drawing.Imaging;
|
|
||||||
using System.Drawing.Drawing2D;
|
|
||||||
using System.Web.Mail;
|
|
||||||
using CoreUtil.Internal;
|
|
||||||
|
|
||||||
namespace CoreUtil
|
|
||||||
{
|
|
||||||
public static class ZLib
|
|
||||||
{
|
|
||||||
public static byte[] Compress(byte[] src)
|
|
||||||
{
|
|
||||||
return Compress(src, zlibConst.Z_DEFAULT_COMPRESSION);
|
|
||||||
}
|
|
||||||
public static byte[] Compress(byte[] src, int level)
|
|
||||||
{
|
|
||||||
return Compress(src, level, false);
|
|
||||||
}
|
|
||||||
public static byte[] Compress(byte[] src, int level, bool noHeader)
|
|
||||||
{
|
|
||||||
int dstSize = src.Length * 2 + 100;
|
|
||||||
byte[] dst = new byte[dstSize];
|
|
||||||
|
|
||||||
compress2(ref dst, src, level, noHeader);
|
|
||||||
|
|
||||||
return dst;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static byte[] Uncompress(byte[] src, int originalSize)
|
|
||||||
{
|
|
||||||
byte[] dst = new byte[originalSize];
|
|
||||||
|
|
||||||
uncompress(ref dst, src);
|
|
||||||
|
|
||||||
return dst;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void compress2(ref byte[] dest, byte[] src, int level, bool noHeader)
|
|
||||||
{
|
|
||||||
ZStream stream = new ZStream();
|
|
||||||
|
|
||||||
stream.next_in = src;
|
|
||||||
stream.avail_in = src.Length;
|
|
||||||
|
|
||||||
stream.next_out = dest;
|
|
||||||
stream.avail_out = dest.Length;
|
|
||||||
|
|
||||||
if (noHeader == false)
|
|
||||||
{
|
|
||||||
stream.deflateInit(level);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
stream.deflateInit(level, -15);
|
|
||||||
}
|
|
||||||
|
|
||||||
stream.deflate(zlibConst.Z_FINISH);
|
|
||||||
|
|
||||||
Array.Resize<byte>(ref dest, (int)stream.total_out);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void uncompress(ref byte[] dest, byte[] src)
|
|
||||||
{
|
|
||||||
ZStream stream = new ZStream();
|
|
||||||
|
|
||||||
stream.next_in = src;
|
|
||||||
stream.avail_in = src.Length;
|
|
||||||
|
|
||||||
stream.next_out = dest;
|
|
||||||
stream.avail_out = dest.Length;
|
|
||||||
|
|
||||||
stream.inflateInit();
|
|
||||||
|
|
||||||
int err = stream.inflate(zlibConst.Z_FINISH);
|
|
||||||
if (err != zlibConst.Z_STREAM_END)
|
|
||||||
{
|
|
||||||
stream.inflateEnd();
|
|
||||||
throw new ApplicationException();
|
|
||||||
}
|
|
||||||
|
|
||||||
Array.Resize<byte>(ref dest, (int)stream.total_out);
|
|
||||||
|
|
||||||
err = stream.inflateEnd();
|
|
||||||
if (err != zlibConst.Z_OK)
|
|
||||||
{
|
|
||||||
throw new ApplicationException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
@ -1,426 +0,0 @@
|
|||||||
// CoreUtil
|
|
||||||
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Data;
|
|
||||||
using System.Data.Sql;
|
|
||||||
using System.Data.SqlClient;
|
|
||||||
using System.Data.SqlTypes;
|
|
||||||
using System.Text;
|
|
||||||
using System.Configuration;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Security.Cryptography;
|
|
||||||
using System.Web;
|
|
||||||
using System.Web.Security;
|
|
||||||
using System.Web.UI;
|
|
||||||
using System.Web.UI.WebControls;
|
|
||||||
using System.Web.UI.WebControls.WebParts;
|
|
||||||
using System.Web.UI.HtmlControls;
|
|
||||||
using System.IO;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Drawing.Imaging;
|
|
||||||
using System.Drawing.Drawing2D;
|
|
||||||
using System.Web.Mail;
|
|
||||||
|
|
||||||
|
|
||||||
namespace CoreUtil
|
|
||||||
{
|
|
||||||
class CsvTimeSpan
|
|
||||||
{
|
|
||||||
public DateTime StartDateTime;
|
|
||||||
public DateTime EndDateTime;
|
|
||||||
public int StartIndex;
|
|
||||||
public int NumIndex;
|
|
||||||
|
|
||||||
public CsvTimeSpan(DateTime startDateTime, DateTime endDateTime, int startIndex, int numIndex)
|
|
||||||
{
|
|
||||||
StartDateTime = startDateTime;
|
|
||||||
EndDateTime = endDateTime;
|
|
||||||
StartIndex = startIndex;
|
|
||||||
NumIndex = numIndex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Csv
|
|
||||||
{
|
|
||||||
List<CsvEntry> entryList;
|
|
||||||
Encoding encoding;
|
|
||||||
static Encoding defaultEncoding = Str.ShiftJisEncoding;
|
|
||||||
|
|
||||||
public Encoding Encoding
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return encoding;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
this.encoding = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public CsvEntry First
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return entryList[0];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public CsvEntry Last
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return entryList[entryList.Count - 1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Csv()
|
|
||||||
: this(defaultEncoding)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
public Csv(Encoding encoding)
|
|
||||||
{
|
|
||||||
init(null, encoding);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Csv(string filename)
|
|
||||||
: this(filename, defaultEncoding)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
public Csv(string filename, Encoding encoding)
|
|
||||||
{
|
|
||||||
init(Buf.ReadFromFile(filename), encoding);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Csv(Buf data)
|
|
||||||
{
|
|
||||||
byte[] src = data.ByteData;
|
|
||||||
int bomSize;
|
|
||||||
|
|
||||||
Encoding enc = Str.CheckBOM(src, out bomSize);
|
|
||||||
|
|
||||||
if (bomSize >= 1)
|
|
||||||
{
|
|
||||||
src = Util.RemoveStartByteArray(src, bomSize);
|
|
||||||
}
|
|
||||||
|
|
||||||
init(new Buf(src), enc);
|
|
||||||
}
|
|
||||||
public Csv(Buf data, Encoding encoding)
|
|
||||||
{
|
|
||||||
init(data, encoding);
|
|
||||||
}
|
|
||||||
|
|
||||||
void init(Buf data, Encoding encoding)
|
|
||||||
{
|
|
||||||
if (encoding == null)
|
|
||||||
{
|
|
||||||
encoding = defaultEncoding;
|
|
||||||
}
|
|
||||||
|
|
||||||
int bomSize = 0;
|
|
||||||
Encoding enc2 = null;
|
|
||||||
if (data != null)
|
|
||||||
{
|
|
||||||
enc2 = Str.CheckBOM(data.ByteData, out bomSize);
|
|
||||||
}
|
|
||||||
if (bomSize >= 1)
|
|
||||||
{
|
|
||||||
data = new Buf(Util.RemoveStartByteArray(data.ByteData, bomSize));
|
|
||||||
}
|
|
||||||
if (enc2 != null)
|
|
||||||
{
|
|
||||||
encoding = enc2;
|
|
||||||
}
|
|
||||||
this.encoding = encoding;
|
|
||||||
|
|
||||||
entryList = new List<CsvEntry>();
|
|
||||||
|
|
||||||
if (data != null)
|
|
||||||
{
|
|
||||||
MemoryStream ms = new MemoryStream(data.ByteData);
|
|
||||||
StreamReader sr = new StreamReader(ms, this.encoding);
|
|
||||||
|
|
||||||
while (true)
|
|
||||||
{
|
|
||||||
string s = sr.ReadLine();
|
|
||||||
|
|
||||||
if (s == null)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
char[] sep = { ',' };
|
|
||||||
string[] strings = s.Trim().Split(sep, StringSplitOptions.None);
|
|
||||||
|
|
||||||
CsvEntry e = new CsvEntry(strings);
|
|
||||||
Add(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string ToString()
|
|
||||||
{
|
|
||||||
StringBuilder b = new StringBuilder();
|
|
||||||
|
|
||||||
foreach (CsvEntry e in entryList)
|
|
||||||
{
|
|
||||||
b.AppendLine(e.ToString());
|
|
||||||
}
|
|
||||||
|
|
||||||
return b.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Buf ToBuf()
|
|
||||||
{
|
|
||||||
string s = ToString();
|
|
||||||
|
|
||||||
Buf b = new Buf();
|
|
||||||
|
|
||||||
byte[] bom = Str.GetBOM(this.Encoding);
|
|
||||||
|
|
||||||
if (bom != null)
|
|
||||||
{
|
|
||||||
b.Write(bom);
|
|
||||||
}
|
|
||||||
|
|
||||||
b.Write(encoding.GetBytes(s));
|
|
||||||
|
|
||||||
b.SeekToBegin();
|
|
||||||
|
|
||||||
return b;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SaveToFile(string filename)
|
|
||||||
{
|
|
||||||
File.WriteAllBytes(filename, ToBuf().ByteData);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Add(CsvEntry e)
|
|
||||||
{
|
|
||||||
entryList.Add(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int Count
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return entryList.Count;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public CsvEntry this[int index]
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return entryList[index];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public IEnumerable Items
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i = 0; i < entryList.Count; i++)
|
|
||||||
{
|
|
||||||
yield return entryList[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
CsvCompare csvCompareMethod;
|
|
||||||
int csvCompareIndex;
|
|
||||||
Type csvCompareType;
|
|
||||||
bool csvCompareReverse;
|
|
||||||
|
|
||||||
int sortInternal(CsvEntry e1, CsvEntry e2)
|
|
||||||
{
|
|
||||||
if (csvCompareMethod != null)
|
|
||||||
{
|
|
||||||
object o1 = e1.Convert(csvCompareType, csvCompareIndex);
|
|
||||||
object o2 = e2.Convert(csvCompareType, csvCompareIndex);
|
|
||||||
|
|
||||||
return csvCompareMethod(o1, o2) * (csvCompareReverse ? -1 : 1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
IComparable o1 = (IComparable)e1.Convert(csvCompareType, csvCompareIndex);
|
|
||||||
IComparable o2 = (IComparable)e2.Convert(csvCompareType, csvCompareIndex);
|
|
||||||
|
|
||||||
return o1.CompareTo(o2) * (csvCompareReverse ? -1 : 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Sort(Type type)
|
|
||||||
{
|
|
||||||
Sort(null, type);
|
|
||||||
}
|
|
||||||
public void Sort(CsvCompare cmp, Type type)
|
|
||||||
{
|
|
||||||
Sort(cmp, type, false);
|
|
||||||
}
|
|
||||||
public void Sort(Type type, bool reverse)
|
|
||||||
{
|
|
||||||
Sort(null, type, reverse);
|
|
||||||
}
|
|
||||||
public void Sort(CsvCompare cmp, Type type, bool reverse)
|
|
||||||
{
|
|
||||||
Sort(cmp, 0, type, reverse);
|
|
||||||
}
|
|
||||||
public void Sort(int index, Type type)
|
|
||||||
{
|
|
||||||
Sort(null, index, type);
|
|
||||||
}
|
|
||||||
public void Sort(CsvCompare cmp, int index, Type type)
|
|
||||||
{
|
|
||||||
Sort(cmp, 0, type, false);
|
|
||||||
}
|
|
||||||
public void Sort(int index, Type type, bool reverse)
|
|
||||||
{
|
|
||||||
Sort(null, index, type, reverse);
|
|
||||||
}
|
|
||||||
public void Sort(CsvCompare cmp, int index, Type type, bool reverse)
|
|
||||||
{
|
|
||||||
csvCompareMethod = cmp;
|
|
||||||
csvCompareIndex = index;
|
|
||||||
csvCompareType = type;
|
|
||||||
csvCompareReverse = reverse;
|
|
||||||
|
|
||||||
entryList.Sort(new Comparison<CsvEntry>(sortInternal));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int CompareString(object o1, object o2)
|
|
||||||
{
|
|
||||||
string s1 = (string)o1;
|
|
||||||
string s2 = (string)o2;
|
|
||||||
return s1.CompareTo(s2);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int CompareDatetime(object o1, object o2)
|
|
||||||
{
|
|
||||||
DateTime d1 = (DateTime)o1;
|
|
||||||
DateTime d2 = (DateTime)o2;
|
|
||||||
|
|
||||||
return d1.CompareTo(d2);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetEncoding(Encoding e)
|
|
||||||
{
|
|
||||||
this.encoding = e;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Csv Clone()
|
|
||||||
{
|
|
||||||
Csv csv = new Csv(this.encoding);
|
|
||||||
|
|
||||||
foreach (CsvEntry e in entryList)
|
|
||||||
{
|
|
||||||
csv.Add(e.Clone());
|
|
||||||
}
|
|
||||||
|
|
||||||
return csv;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public delegate int CsvCompare(object o1, object o2);
|
|
||||||
|
|
||||||
public class CsvEntry
|
|
||||||
{
|
|
||||||
List<string> strings;
|
|
||||||
|
|
||||||
public CsvEntry Clone()
|
|
||||||
{
|
|
||||||
string[] array = (string[])strings.ToArray().Clone();
|
|
||||||
|
|
||||||
CsvEntry e = new CsvEntry(array);
|
|
||||||
|
|
||||||
return e;
|
|
||||||
}
|
|
||||||
|
|
||||||
public CsvEntry(params string[] elements)
|
|
||||||
{
|
|
||||||
strings = new List<string>();
|
|
||||||
foreach (string s in elements)
|
|
||||||
{
|
|
||||||
string str = s;
|
|
||||||
|
|
||||||
if (str.StartsWith("\"") && str.EndsWith("\"") && str.Length >= 2)
|
|
||||||
{
|
|
||||||
str = str.Substring(1, str.Length - 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
strings.Add(str);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string this[int index]
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return strings[index];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public int Count
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return strings.Count;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string ToString()
|
|
||||||
{
|
|
||||||
int i, num;
|
|
||||||
string ret = "";
|
|
||||||
|
|
||||||
num = strings.Count;
|
|
||||||
for (i = 0; i < num; i++)
|
|
||||||
{
|
|
||||||
string s = strings[i];
|
|
||||||
|
|
||||||
s = Str.ReplaceStr(s, ",", ".", false);
|
|
||||||
s = Str.ReplaceStr(s, "\r\n", " ", false);
|
|
||||||
s = Str.ReplaceStr(s, "\r", " ", false);
|
|
||||||
s = Str.ReplaceStr(s, "\n", " ", false);
|
|
||||||
|
|
||||||
ret += s;
|
|
||||||
|
|
||||||
if ((i + 1) < num)
|
|
||||||
{
|
|
||||||
ret += ",";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
Type lastType = null;
|
|
||||||
object lastObject = null;
|
|
||||||
int lastIndex = -1;
|
|
||||||
|
|
||||||
public object Convert(Type type, int index)
|
|
||||||
{
|
|
||||||
if (lastType == type && lastIndex == index)
|
|
||||||
{
|
|
||||||
return lastObject;
|
|
||||||
}
|
|
||||||
|
|
||||||
lastType = type;
|
|
||||||
lastIndex = index;
|
|
||||||
lastObject = System.Convert.ChangeType(strings[index], type);
|
|
||||||
|
|
||||||
return lastObject;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DateTime ToDateTime(int index)
|
|
||||||
{
|
|
||||||
return (DateTime)Convert(typeof(DateTime), index);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,501 +0,0 @@
|
|||||||
// CoreUtil
|
|
||||||
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Data;
|
|
||||||
using System.Data.Sql;
|
|
||||||
using System.Data.SqlClient;
|
|
||||||
using System.Data.SqlTypes;
|
|
||||||
using System.Text;
|
|
||||||
using System.Configuration;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Security.Cryptography;
|
|
||||||
using System.Web;
|
|
||||||
using System.Web.Security;
|
|
||||||
using System.Web.UI;
|
|
||||||
using System.Web.UI.WebControls;
|
|
||||||
using System.Web.UI.WebControls.WebParts;
|
|
||||||
using System.Web.UI.HtmlControls;
|
|
||||||
using System.IO;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Drawing.Imaging;
|
|
||||||
using System.Drawing.Drawing2D;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Web.Mail;
|
|
||||||
using System.Net;
|
|
||||||
using System.Net.Sockets;
|
|
||||||
using System.Net.NetworkInformation;
|
|
||||||
using System.Net.Mail;
|
|
||||||
using System.Net.Mime;
|
|
||||||
using System.Reflection;
|
|
||||||
using CoreUtil;
|
|
||||||
|
|
||||||
namespace CoreUtil
|
|
||||||
{
|
|
||||||
public static class Env
|
|
||||||
{
|
|
||||||
static object lockObj = new object();
|
|
||||||
static bool inited = false;
|
|
||||||
|
|
||||||
static Env()
|
|
||||||
{
|
|
||||||
initCache();
|
|
||||||
}
|
|
||||||
|
|
||||||
static void initCache()
|
|
||||||
{
|
|
||||||
lock (lockObj)
|
|
||||||
{
|
|
||||||
if (inited == false)
|
|
||||||
{
|
|
||||||
initValues();
|
|
||||||
inited = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static string homeDir;
|
|
||||||
static public string HomeDir
|
|
||||||
{
|
|
||||||
get { return homeDir; }
|
|
||||||
}
|
|
||||||
static string exeFileName;
|
|
||||||
static public string ExeFileName
|
|
||||||
{
|
|
||||||
get { return exeFileName; }
|
|
||||||
}
|
|
||||||
static string exeFileDir;
|
|
||||||
static public string ExeFileDir
|
|
||||||
{
|
|
||||||
get { return exeFileDir; }
|
|
||||||
}
|
|
||||||
static string windowsDir;
|
|
||||||
static public string WindowsDir
|
|
||||||
{
|
|
||||||
get { return windowsDir; }
|
|
||||||
}
|
|
||||||
static string systemDir;
|
|
||||||
static public string SystemDir
|
|
||||||
{
|
|
||||||
get { return systemDir; }
|
|
||||||
}
|
|
||||||
static string tempDir;
|
|
||||||
static public string TempDir
|
|
||||||
{
|
|
||||||
get { return tempDir; }
|
|
||||||
}
|
|
||||||
static string winTempDir;
|
|
||||||
static public string WinTempDir
|
|
||||||
{
|
|
||||||
get { return winTempDir; }
|
|
||||||
}
|
|
||||||
static string windowsDrive;
|
|
||||||
static public string WindowsDrive
|
|
||||||
{
|
|
||||||
get { return windowsDrive; }
|
|
||||||
}
|
|
||||||
static string programFilesDir;
|
|
||||||
static public string ProgramFilesDir
|
|
||||||
{
|
|
||||||
get { return programFilesDir; }
|
|
||||||
}
|
|
||||||
static string personalStartMenuDir;
|
|
||||||
static public string PersonalStartMenuDir
|
|
||||||
{
|
|
||||||
get { return personalStartMenuDir; }
|
|
||||||
}
|
|
||||||
static string personalProgramsDir;
|
|
||||||
static public string PersonalProgramsDir
|
|
||||||
{
|
|
||||||
get { return personalProgramsDir; }
|
|
||||||
}
|
|
||||||
static string personalStartupDir;
|
|
||||||
static public string PersonalStartupDir
|
|
||||||
{
|
|
||||||
get { return personalStartupDir; }
|
|
||||||
}
|
|
||||||
static string personalAppDataDir;
|
|
||||||
static public string PersonalAppDataDir
|
|
||||||
{
|
|
||||||
get { return personalAppDataDir; }
|
|
||||||
}
|
|
||||||
static string personalDesktopDir;
|
|
||||||
static public string PersonalDesktopDir
|
|
||||||
{
|
|
||||||
get { return personalDesktopDir; }
|
|
||||||
}
|
|
||||||
static string myDocumentsDir;
|
|
||||||
static public string MyDocumentsDir
|
|
||||||
{
|
|
||||||
get { return myDocumentsDir; }
|
|
||||||
}
|
|
||||||
static string localAppDataDir;
|
|
||||||
static public string LocalAppDataDir
|
|
||||||
{
|
|
||||||
get { return localAppDataDir; }
|
|
||||||
}
|
|
||||||
static string userName;
|
|
||||||
static public string UserName
|
|
||||||
{
|
|
||||||
get { return userName; }
|
|
||||||
}
|
|
||||||
static string userNameEx;
|
|
||||||
static public string UserNameEx
|
|
||||||
{
|
|
||||||
get { return userNameEx; }
|
|
||||||
}
|
|
||||||
static string machineName;
|
|
||||||
static public string MachineName
|
|
||||||
{
|
|
||||||
get { return machineName; }
|
|
||||||
}
|
|
||||||
static string commandLine;
|
|
||||||
public static string CommandLine
|
|
||||||
{
|
|
||||||
get { return commandLine; }
|
|
||||||
}
|
|
||||||
public static StrToken CommandLineList
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return new StrToken(CommandLine);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
static OperatingSystem osInfo;
|
|
||||||
public static OperatingSystem OsInfo
|
|
||||||
{
|
|
||||||
get { return osInfo; }
|
|
||||||
}
|
|
||||||
static bool isNt;
|
|
||||||
public static bool IsNt
|
|
||||||
{
|
|
||||||
get { return isNt; }
|
|
||||||
}
|
|
||||||
static bool is9x;
|
|
||||||
public static bool Is9x
|
|
||||||
{
|
|
||||||
get { return is9x; }
|
|
||||||
}
|
|
||||||
static bool isCe;
|
|
||||||
public static bool IsCe
|
|
||||||
{
|
|
||||||
get { return isCe; }
|
|
||||||
}
|
|
||||||
static bool isLittleEndian;
|
|
||||||
public static bool IsLittleEndian
|
|
||||||
{
|
|
||||||
get { return Env.isLittleEndian; }
|
|
||||||
}
|
|
||||||
public static bool IsBigEndian
|
|
||||||
{
|
|
||||||
get { return !IsLittleEndian; }
|
|
||||||
}
|
|
||||||
static bool isAdmin;
|
|
||||||
public static bool IsAdmin
|
|
||||||
{
|
|
||||||
get { return Env.isAdmin; }
|
|
||||||
}
|
|
||||||
static int processId;
|
|
||||||
public static int ProcessId
|
|
||||||
{
|
|
||||||
get { return Env.processId; }
|
|
||||||
}
|
|
||||||
static string myTempDir;
|
|
||||||
public static string MyTempDir
|
|
||||||
{
|
|
||||||
get { return myTempDir; }
|
|
||||||
}
|
|
||||||
static IO lockFile;
|
|
||||||
|
|
||||||
public static bool Is64BitProcess
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return (IntPtr.Size == 8);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool Is64BitWindows
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Is64BitProcess || Kernel.InternalCheckIsWow64();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool IsWow64
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Kernel.InternalCheckIsWow64();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void initValues()
|
|
||||||
{
|
|
||||||
exeFileName = IO.RemoteLastEnMark(getMyExeFileName());
|
|
||||||
if (Str.IsEmptyStr(exeFileName) == false)
|
|
||||||
{
|
|
||||||
exeFileDir = IO.RemoteLastEnMark(Path.GetDirectoryName(exeFileName));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
exeFileDir = "";
|
|
||||||
}
|
|
||||||
homeDir = IO.RemoteLastEnMark(Kernel.GetEnvStr("HOME"));
|
|
||||||
if (Str.IsEmptyStr(homeDir))
|
|
||||||
{
|
|
||||||
homeDir = IO.RemoteLastEnMark(Kernel.GetEnvStr("HOMEDRIVE") + Kernel.GetEnvStr("HOMEPATH"));
|
|
||||||
}
|
|
||||||
if (Str.IsEmptyStr(homeDir))
|
|
||||||
{
|
|
||||||
homeDir = CurrentDir;
|
|
||||||
}
|
|
||||||
systemDir = IO.RemoteLastEnMark(Environment.GetFolderPath(Environment.SpecialFolder.System));
|
|
||||||
windowsDir = IO.RemoteLastEnMark(Path.GetDirectoryName(systemDir));
|
|
||||||
tempDir = IO.RemoteLastEnMark(Path.GetTempPath());
|
|
||||||
winTempDir = IO.RemoteLastEnMark(Path.Combine(windowsDir, "Temp"));
|
|
||||||
IO.MakeDir(winTempDir);
|
|
||||||
if (windowsDir.Length >= 2 && windowsDir[1] == ':')
|
|
||||||
{
|
|
||||||
windowsDrive = windowsDir.Substring(0, 2).ToUpper();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
windowsDrive = "C:";
|
|
||||||
}
|
|
||||||
programFilesDir = IO.RemoteLastEnMark(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles));
|
|
||||||
personalStartMenuDir = IO.RemoteLastEnMark(Environment.GetFolderPath(Environment.SpecialFolder.StartMenu));
|
|
||||||
personalProgramsDir = IO.RemoteLastEnMark(Environment.GetFolderPath(Environment.SpecialFolder.Programs));
|
|
||||||
personalStartupDir = IO.RemoteLastEnMark(Environment.GetFolderPath(Environment.SpecialFolder.Startup));
|
|
||||||
personalAppDataDir = IO.RemoteLastEnMark(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData));
|
|
||||||
personalDesktopDir = IO.RemoteLastEnMark(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory));
|
|
||||||
myDocumentsDir = IO.RemoteLastEnMark(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments));
|
|
||||||
localAppDataDir = IO.RemoteLastEnMark(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData));
|
|
||||||
userName = Environment.UserName;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
userNameEx = Environment.UserDomainName + "\\" + userName;
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
userNameEx = userName;
|
|
||||||
}
|
|
||||||
machineName = Environment.MachineName;
|
|
||||||
commandLine = initCommandLine(Environment.CommandLine);
|
|
||||||
osInfo = Environment.OSVersion;
|
|
||||||
isNt = (osInfo.Platform == PlatformID.Win32NT);
|
|
||||||
isCe = (osInfo.Platform == PlatformID.WinCE);
|
|
||||||
is9x = !(isNt || isCe);
|
|
||||||
isLittleEndian = BitConverter.IsLittleEndian;
|
|
||||||
processId = System.Diagnostics.Process.GetCurrentProcess().Id;
|
|
||||||
isAdmin = checkIsAdmin();
|
|
||||||
initMyTempDir();
|
|
||||||
}
|
|
||||||
|
|
||||||
static void deleteUnusedTempDir()
|
|
||||||
{
|
|
||||||
DirEntry[] files;
|
|
||||||
|
|
||||||
files = IO.EnumDir(Env.tempDir);
|
|
||||||
|
|
||||||
foreach (DirEntry e in files)
|
|
||||||
{
|
|
||||||
if (e.IsFolder)
|
|
||||||
{
|
|
||||||
if (e.FileName.StartsWith("NET_", StringComparison.CurrentCultureIgnoreCase) && e.FileName.Length == 8)
|
|
||||||
{
|
|
||||||
string dirFullName = Path.Combine(Env.tempDir, e.fileName);
|
|
||||||
string lockFileName = Path.Combine(dirFullName, "LockFile.dat");
|
|
||||||
bool deleteNow = false;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
IO io = IO.FileOpen(lockFileName);
|
|
||||||
io.Close();
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
io = IO.FileOpen(lockFileName, true);
|
|
||||||
deleteNow = true;
|
|
||||||
io.Close();
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
DirEntry[] files2;
|
|
||||||
|
|
||||||
deleteNow = true;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
files2 = IO.EnumDir(dirFullName);
|
|
||||||
|
|
||||||
foreach (DirEntry e2 in files2)
|
|
||||||
{
|
|
||||||
if (e2.IsFolder == false)
|
|
||||||
{
|
|
||||||
string fullPath = Path.Combine(dirFullName, e2.fileName);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
IO io2 = IO.FileOpen(fullPath, true);
|
|
||||||
io2.Close();
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
deleteNow = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
deleteNow = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (deleteNow)
|
|
||||||
{
|
|
||||||
IO.DeleteDir(dirFullName, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void initMyTempDir()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
deleteUnusedTempDir();
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
int num = 0;
|
|
||||||
|
|
||||||
while (true)
|
|
||||||
{
|
|
||||||
byte[] rand = Secure.Rand(2);
|
|
||||||
string tmp2 = Str.ByteToStr(rand);
|
|
||||||
|
|
||||||
string tmp = Path.Combine(Env.tempDir, "NET_" + tmp2);
|
|
||||||
|
|
||||||
if (IO.IsDirExists(tmp) == false && IO.MakeDir(tmp))
|
|
||||||
{
|
|
||||||
Env.myTempDir = tmp;
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((num++) >= 100)
|
|
||||||
{
|
|
||||||
throw new SystemException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
string lockFileName = Path.Combine(Env.myTempDir, "LockFile.dat");
|
|
||||||
lockFile = IO.FileCreate(lockFileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool checkIsAdmin()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
string name = "Vpn_Check_Admin_Key_NET_" + processId.ToString();
|
|
||||||
string teststr = Str.GenRandStr();
|
|
||||||
|
|
||||||
if (Reg.WriteStr(RegRoot.LocalMachine, "", name, teststr) == false)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
|
|
||||||
string ret = Reg.ReadStr(RegRoot.LocalMachine, "", name);
|
|
||||||
|
|
||||||
if (ret == teststr)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
Reg.DeleteValue(RegRoot.LocalMachine, "", name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static string initCommandLine(string src)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
if (src.Length >= 1 && src[0] == '\"')
|
|
||||||
{
|
|
||||||
i = src.IndexOf('\"', 1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
i = src.IndexOf(' ');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (i == -1)
|
|
||||||
{
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return src.Substring(i + 1).TrimStart(' ');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static string getMyExeFileName()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Assembly mainAssembly = Assembly.GetEntryAssembly();
|
|
||||||
Module[] modules = mainAssembly.GetModules();
|
|
||||||
return modules[0].FullyQualifiedName;
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static public string CurrentDir
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return IO.RemoteLastEnMark(Environment.CurrentDirectory);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
static public string NewLine
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Environment.NewLine;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
@ -1,162 +0,0 @@
|
|||||||
// CoreUtil
|
|
||||||
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Data;
|
|
||||||
using System.Data.Sql;
|
|
||||||
using System.Data.SqlClient;
|
|
||||||
using System.Data.SqlTypes;
|
|
||||||
using System.Text;
|
|
||||||
using System.Configuration;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Security.Cryptography;
|
|
||||||
using System.Web;
|
|
||||||
using System.Web.Security;
|
|
||||||
using System.Web.UI;
|
|
||||||
using System.Web.UI.WebControls;
|
|
||||||
using System.Web.UI.WebControls.WebParts;
|
|
||||||
using System.Web.UI.HtmlControls;
|
|
||||||
using System.IO;
|
|
||||||
using System.IO.Compression;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Drawing.Imaging;
|
|
||||||
using System.Drawing.Drawing2D;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using CoreUtil.Internal;
|
|
||||||
|
|
||||||
namespace CoreUtil
|
|
||||||
{
|
|
||||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
|
||||||
public struct GZipHeader
|
|
||||||
{
|
|
||||||
public byte ID1, ID2, CM, FLG;
|
|
||||||
public uint MTIME;
|
|
||||||
public byte XFL, OS;
|
|
||||||
}
|
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
|
||||||
public struct GZipFooter
|
|
||||||
{
|
|
||||||
public uint CRC32;
|
|
||||||
public uint ISIZE;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class GZipUtil
|
|
||||||
{
|
|
||||||
public static byte[] Decompress(byte[] gzip)
|
|
||||||
{
|
|
||||||
using (GZipStream stream = new GZipStream(new MemoryStream(gzip), CompressionMode.Decompress))
|
|
||||||
{
|
|
||||||
const int size = 4096;
|
|
||||||
byte[] buffer = new byte[size];
|
|
||||||
using (MemoryStream memory = new MemoryStream())
|
|
||||||
{
|
|
||||||
int count = 0;
|
|
||||||
do
|
|
||||||
{
|
|
||||||
count = stream.Read(buffer, 0, size);
|
|
||||||
if (count > 0)
|
|
||||||
{
|
|
||||||
memory.Write(buffer, 0, count);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
while (count > 0);
|
|
||||||
return memory.ToArray();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class GZipPacker
|
|
||||||
{
|
|
||||||
Fifo fifo;
|
|
||||||
ZStream zs;
|
|
||||||
long currentSize;
|
|
||||||
uint crc32;
|
|
||||||
bool finished;
|
|
||||||
|
|
||||||
public bool Finished
|
|
||||||
{
|
|
||||||
get { return finished; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public Fifo GeneratedData
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this.fifo;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public GZipPacker()
|
|
||||||
{
|
|
||||||
fifo = new Fifo();
|
|
||||||
|
|
||||||
zs = new ZStream();
|
|
||||||
zs.deflateInit(-1, -15);
|
|
||||||
|
|
||||||
this.currentSize = 0;
|
|
||||||
this.crc32 = 0xffffffff;
|
|
||||||
this.finished = false;
|
|
||||||
|
|
||||||
GZipHeader h = new GZipHeader();
|
|
||||||
h.ID1 = 0x1f;
|
|
||||||
h.ID2 = 0x8b;
|
|
||||||
h.FLG = 0;
|
|
||||||
h.MTIME = Util.DateTimeToUnixTime(DateTime.Now.ToUniversalTime());
|
|
||||||
h.XFL = 0;
|
|
||||||
h.OS = 3;
|
|
||||||
h.CM = 8;
|
|
||||||
|
|
||||||
fifo.Write(Util.StructToByte(h));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Write(byte[] data, int pos, int len, bool finish)
|
|
||||||
{
|
|
||||||
byte[] srcData = Util.ExtractByteArray(data, pos, len);
|
|
||||||
byte[] dstData = new byte[srcData.Length * 2 + 100];
|
|
||||||
|
|
||||||
if (this.finished)
|
|
||||||
{
|
|
||||||
throw new ApplicationException("already finished");
|
|
||||||
}
|
|
||||||
|
|
||||||
zs.next_in = srcData;
|
|
||||||
zs.avail_in = srcData.Length;
|
|
||||||
zs.next_in_index = 0;
|
|
||||||
|
|
||||||
zs.next_out = dstData;
|
|
||||||
zs.avail_out = dstData.Length;
|
|
||||||
zs.next_out_index = 0;
|
|
||||||
|
|
||||||
if (finish)
|
|
||||||
{
|
|
||||||
zs.deflate(zlibConst.Z_FINISH);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
zs.deflate(zlibConst.Z_SYNC_FLUSH);
|
|
||||||
}
|
|
||||||
|
|
||||||
fifo.Write(dstData, 0, dstData.Length - zs.avail_out);
|
|
||||||
|
|
||||||
currentSize += len;
|
|
||||||
|
|
||||||
this.crc32 = ZipUtil.Crc32Next(data, pos, len, this.crc32);
|
|
||||||
|
|
||||||
if (finish)
|
|
||||||
{
|
|
||||||
this.finished = true;
|
|
||||||
this.crc32 = ~this.crc32;
|
|
||||||
|
|
||||||
GZipFooter f = new GZipFooter();
|
|
||||||
f.CRC32 = this.crc32;
|
|
||||||
f.ISIZE = (uint)(this.currentSize % 0x100000000);
|
|
||||||
|
|
||||||
fifo.Write(Util.StructToByte(f));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,99 +0,0 @@
|
|||||||
// CoreUtil
|
|
||||||
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Data;
|
|
||||||
using System.Data.Sql;
|
|
||||||
using System.Data.SqlClient;
|
|
||||||
using System.Data.SqlTypes;
|
|
||||||
using System.Text;
|
|
||||||
using System.Configuration;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Security.Cryptography;
|
|
||||||
using System.Web;
|
|
||||||
using System.Web.Security;
|
|
||||||
using System.Web.UI;
|
|
||||||
using System.Web.UI.WebControls;
|
|
||||||
using System.Web.UI.WebControls.WebParts;
|
|
||||||
using System.Web.UI.HtmlControls;
|
|
||||||
using System.IO;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Drawing.Imaging;
|
|
||||||
using System.Drawing.Drawing2D;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Web.Mail;
|
|
||||||
using System.Net;
|
|
||||||
using System.Net.Sockets;
|
|
||||||
using System.Net.NetworkInformation;
|
|
||||||
using System.Net.Mail;
|
|
||||||
using System.Net.Mime;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace CoreUtil
|
|
||||||
{
|
|
||||||
public static class Kernel
|
|
||||||
{
|
|
||||||
[DllImport("kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)]
|
|
||||||
[return: MarshalAs(UnmanagedType.Bool)]
|
|
||||||
private static extern bool IsWow64Process(
|
|
||||||
[In] IntPtr hProcess,
|
|
||||||
[Out] out bool wow64Process
|
|
||||||
);
|
|
||||||
|
|
||||||
public static bool InternalCheckIsWow64()
|
|
||||||
{
|
|
||||||
if ((Environment.OSVersion.Version.Major == 5 && Environment.OSVersion.Version.Minor >= 1) ||
|
|
||||||
Environment.OSVersion.Version.Major >= 6)
|
|
||||||
{
|
|
||||||
using (Process p = Process.GetCurrentProcess())
|
|
||||||
{
|
|
||||||
bool retVal;
|
|
||||||
if (!IsWow64Process(p.Handle, out retVal))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void SleepThread(int millisec)
|
|
||||||
{
|
|
||||||
ThreadObj.Sleep(millisec);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetEnvStr(string name)
|
|
||||||
{
|
|
||||||
string ret = Environment.GetEnvironmentVariable(name);
|
|
||||||
|
|
||||||
if (ret == null)
|
|
||||||
{
|
|
||||||
ret = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static public void SelfKill()
|
|
||||||
{
|
|
||||||
System.Diagnostics.Process.GetCurrentProcess().Kill();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Process Run(string exeName, string args)
|
|
||||||
{
|
|
||||||
Process p = new Process();
|
|
||||||
p.StartInfo.FileName = IO.InnerFilePath(exeName);
|
|
||||||
p.StartInfo.Arguments = args;
|
|
||||||
|
|
||||||
p.Start();
|
|
||||||
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,868 +0,0 @@
|
|||||||
// CoreUtil
|
|
||||||
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Data;
|
|
||||||
using System.Data.Sql;
|
|
||||||
using System.Data.SqlClient;
|
|
||||||
using System.Data.SqlTypes;
|
|
||||||
using System.Text;
|
|
||||||
using System.Configuration;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Security.Cryptography;
|
|
||||||
using System.Web;
|
|
||||||
using System.Web.Security;
|
|
||||||
using System.Web.UI;
|
|
||||||
using System.Web.UI.WebControls;
|
|
||||||
using System.Web.UI.WebControls.WebParts;
|
|
||||||
using System.Web.UI.HtmlControls;
|
|
||||||
using System.IO;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Drawing.Imaging;
|
|
||||||
using System.Drawing.Drawing2D;
|
|
||||||
using System.Web.Mail;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Xml;
|
|
||||||
using System.Xml.Schema;
|
|
||||||
using System.Xml.Serialization;
|
|
||||||
using CoreUtil;
|
|
||||||
|
|
||||||
public static class AspUtil
|
|
||||||
{
|
|
||||||
public static void Redirect(Page page, string url)
|
|
||||||
{
|
|
||||||
Redirect(page, url, true);
|
|
||||||
}
|
|
||||||
public static void Redirect(Page page, string url, bool endSession)
|
|
||||||
{
|
|
||||||
MultiLang ml = new MultiLang(page, true);
|
|
||||||
|
|
||||||
ml.Redirect(url, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetCurrentRequestUrl(Page page)
|
|
||||||
{
|
|
||||||
string s = (string)page.Request.Headers["SEISAPI_PHYSICAL_URL"];
|
|
||||||
if (Str.IsEmptyStr(s) == false)
|
|
||||||
{
|
|
||||||
string[] tokens = s.Split('?');
|
|
||||||
return tokens[0];
|
|
||||||
}
|
|
||||||
return page.Request.Path;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetCurrentPhysicalFilePathForUser(Page page)
|
|
||||||
{
|
|
||||||
string s = (string)page.Request.Headers["SEISAPI_ORIGINAL_FILEPATH"];
|
|
||||||
if (Str.IsEmptyStr(s) == false)
|
|
||||||
{
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
return page.Request.PhysicalPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string RemoveDefaultHtml(string url)
|
|
||||||
{
|
|
||||||
string tmp = url.ToLower();
|
|
||||||
if (tmp.EndsWith("/default.asp") || tmp.EndsWith("/default.aspx") || tmp.EndsWith("/default.htm") || tmp.EndsWith("/default.html"))
|
|
||||||
{
|
|
||||||
return GetUrlDirNameFromPath(url);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return url;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetUrlDirNameFromPath(string url)
|
|
||||||
{
|
|
||||||
string ret = "";
|
|
||||||
string[] strs = url.Split('/');
|
|
||||||
int i;
|
|
||||||
if (strs.Length >= 1)
|
|
||||||
{
|
|
||||||
for (i = 0; i < strs.Length - 1; i++)
|
|
||||||
{
|
|
||||||
ret += strs[i] + "/";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string WebPathToFilePath(System.Web.UI.Page page, string path)
|
|
||||||
{
|
|
||||||
string appRootFilePath = page.Request.PhysicalApplicationPath;
|
|
||||||
string appRootVirtualPath = page.Request.ApplicationPath;
|
|
||||||
string ret;
|
|
||||||
|
|
||||||
path = RemoveDefaultHtml(path);
|
|
||||||
if (path.ToUpper().StartsWith(appRootVirtualPath.ToUpper()) == false)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
path = path.Substring(appRootVirtualPath.Length).Replace("/", "\\");
|
|
||||||
|
|
||||||
if (path.StartsWith("\\"))
|
|
||||||
{
|
|
||||||
path = path.Substring(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = appRootFilePath + path;
|
|
||||||
|
|
||||||
if (ret.IndexOf("..") != -1)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ret.EndsWith("\\"))
|
|
||||||
{
|
|
||||||
ret = GetDefaultDocumentIfExists(ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetDefaultDocumentIfExists(string dir)
|
|
||||||
{
|
|
||||||
string[] targets =
|
|
||||||
{
|
|
||||||
"default.aspx",
|
|
||||||
"default.asp",
|
|
||||||
"default.html",
|
|
||||||
"default.htm",
|
|
||||||
"index.html",
|
|
||||||
"index.htm",
|
|
||||||
};
|
|
||||||
|
|
||||||
foreach (string s in targets)
|
|
||||||
{
|
|
||||||
string name = dir + s;
|
|
||||||
|
|
||||||
if (IsFileExists(name))
|
|
||||||
{
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool IsFileExists(string name)
|
|
||||||
{
|
|
||||||
return File.Exists(name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class MultiLang
|
|
||||||
{
|
|
||||||
public readonly Page Page;
|
|
||||||
public readonly HttpRequest Request;
|
|
||||||
public readonly HttpResponse Response;
|
|
||||||
public readonly bool IsUrlModified;
|
|
||||||
public readonly string OriginalUrl;
|
|
||||||
public readonly string PhysicalUrl;
|
|
||||||
public readonly bool IsFilenameModified;
|
|
||||||
public readonly string OriginalFileName;
|
|
||||||
public readonly string OriginalFilePath;
|
|
||||||
public readonly string Args;
|
|
||||||
public readonly CoreLanguageClass CurrentLanguage;
|
|
||||||
public readonly CoreLanguageClass ContentsPrintLanguage;
|
|
||||||
public readonly string CurrentLanguageCode;
|
|
||||||
public readonly bool IsCurrentLanguageSupported;
|
|
||||||
public readonly string GoogleTranslateUrl;
|
|
||||||
public readonly string OriginalFullUrl;
|
|
||||||
public readonly bool IsSSL;
|
|
||||||
public readonly string Host;
|
|
||||||
public readonly string BasicHostName;
|
|
||||||
MultiLanguageFilterStream mfs;
|
|
||||||
public readonly List<KeyValuePair<string, string>> ReplaceList;
|
|
||||||
|
|
||||||
public bool DisableFilter
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return mfs.DisableFilter;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
mfs.DisableFilter = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public readonly string HtmlBody = "";
|
|
||||||
public readonly string HtmlFileName = "";
|
|
||||||
|
|
||||||
static MultiLang()
|
|
||||||
{
|
|
||||||
CoreLanguageList.RegardsJapanAsJP = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsJapanese
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (this.CurrentLanguage == CoreLanguageList.Japanese)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsJapanesePrinting
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (this.ContentsPrintLanguage == CoreLanguageList.Japanese)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Redirect(string url, bool endSession)
|
|
||||||
{
|
|
||||||
url = ConvertPath(url);
|
|
||||||
if (url.StartsWith("http://") || url.StartsWith("https://") || url.StartsWith("ftp://") ||
|
|
||||||
url.StartsWith("/"))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
string originalUrl = OriginalUrl;
|
|
||||||
if (originalUrl.EndsWith("/"))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i = originalUrl.Length - 1; i >= 0; i--)
|
|
||||||
{
|
|
||||||
if (originalUrl[i] == '/' || originalUrl[i] == '\\')
|
|
||||||
{
|
|
||||||
originalUrl = originalUrl.Substring(0, i + 1);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
url = originalUrl + url;
|
|
||||||
}
|
|
||||||
Response.Redirect(url, endSession);
|
|
||||||
}
|
|
||||||
|
|
||||||
public MultiLang(Page currentPage)
|
|
||||||
: this(currentPage, false)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
public MultiLang(Page currentPage, bool fast) : this(currentPage, fast, null)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
public MultiLang(Page currentPage, bool fast, string basicHostName)
|
|
||||||
: this(currentPage, fast, basicHostName, new List<KeyValuePair<string, string>>())
|
|
||||||
{
|
|
||||||
}
|
|
||||||
public MultiLang(Page currentPage, bool fast, string basicHostName, List<KeyValuePair<string, string>> replaceList)
|
|
||||||
{
|
|
||||||
this.Page = currentPage;
|
|
||||||
|
|
||||||
this.Request = Page.Request;
|
|
||||||
this.Response = Page.Response;
|
|
||||||
this.BasicHostName = basicHostName;
|
|
||||||
string tmp = Page.Request.ServerVariables["HTTPS"];
|
|
||||||
string hostRaw = Page.Request.Headers["Host"];
|
|
||||||
this.ReplaceList = replaceList;
|
|
||||||
bool isSsl = false;
|
|
||||||
string[] tokens;
|
|
||||||
string host = "";
|
|
||||||
|
|
||||||
tokens = hostRaw.Split(':');
|
|
||||||
if (tokens.Length >= 1)
|
|
||||||
{
|
|
||||||
host = tokens[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
host = host.ToLower();
|
|
||||||
|
|
||||||
if (tmp != null)
|
|
||||||
{
|
|
||||||
if (tmp.Equals("on", StringComparison.InvariantCultureIgnoreCase))
|
|
||||||
{
|
|
||||||
isSsl = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.IsSSL = isSsl;
|
|
||||||
this.Host = host;
|
|
||||||
|
|
||||||
this.IsUrlModified = Str.StrToBool((string)Request.Headers["SEISAPI_MODIFIED_URL"]);
|
|
||||||
this.OriginalUrl = (string)Request.Headers["SEISAPI_ORIGINAL_URL"];
|
|
||||||
|
|
||||||
int i;
|
|
||||||
i = this.OriginalUrl.IndexOf("?");
|
|
||||||
if (i != -1)
|
|
||||||
{
|
|
||||||
this.OriginalUrl = this.OriginalUrl.Substring(0, i);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Str.IsEmptyStr(this.OriginalUrl) || this.IsUrlModified == false)
|
|
||||||
{
|
|
||||||
this.OriginalUrl = AspUtil.RemoveDefaultHtml(AspUtil.GetCurrentRequestUrl(Page));
|
|
||||||
}
|
|
||||||
|
|
||||||
string s = (string)Request.Headers["SEISAPI_ORIGINAL_FILENAME"];
|
|
||||||
if (Str.IsEmptyStr(s) == false)
|
|
||||||
{
|
|
||||||
this.IsFilenameModified = true;
|
|
||||||
this.OriginalFileName = s;
|
|
||||||
this.OriginalFilePath = (string)Request.Headers["SEISAPI_ORIGINAL_FILEPATH"];
|
|
||||||
}
|
|
||||||
|
|
||||||
string langCode = GetCurrentLangCodeFromPath(this.OriginalUrl);
|
|
||||||
|
|
||||||
this.CurrentLanguage = CoreLanguageList.GetLanguageClassByName(langCode);
|
|
||||||
this.CurrentLanguageCode = CurrentLanguage.Name;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
HtmlFileName = AspUtil.WebPathToFilePath(currentPage, AspUtil.GetCurrentRequestUrl(currentPage));
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.IsFilenameModified)
|
|
||||||
{
|
|
||||||
HtmlFileName = Path.Combine(Path.GetDirectoryName(HtmlFileName), Path.GetFileName(OriginalFilePath));
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (fast == false)
|
|
||||||
{
|
|
||||||
HtmlBody = File.ReadAllText(HtmlFileName, Str.Utf8Encoding);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
PhysicalUrl = AspUtil.RemoveDefaultHtml(AspUtil.GetCurrentRequestUrl((currentPage)));
|
|
||||||
|
|
||||||
Args = currentPage.Request.ServerVariables["QUERY_STRING"];
|
|
||||||
|
|
||||||
if (CurrentLanguage == CoreLanguageList.Japanese)
|
|
||||||
{
|
|
||||||
IsCurrentLanguageSupported = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
IsCurrentLanguageSupported = Str.SearchStr(HtmlBody, string.Format("<!-- ml:{0} -->", CurrentLanguage.Name), 0, false) != -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
GoogleTranslateUrl = string.Format("http://translate.google.com/translate?js=n&prev=_t&hl=en&ie=UTF-8&layout=2&eotf=1&sl=ja&tl={1}&u={0}",
|
|
||||||
HttpUtility.UrlEncode((isSsl ? "https://" : "http://") + host + this.OriginalUrl, Str.Utf8Encoding),
|
|
||||||
this.CurrentLanguageCode);
|
|
||||||
|
|
||||||
OriginalFullUrl = (isSsl ? "https://" : "http://") + host + this.OriginalUrl;
|
|
||||||
|
|
||||||
ContentsPrintLanguage = this.CurrentLanguage;
|
|
||||||
if (IsCurrentLanguageSupported == false)
|
|
||||||
{
|
|
||||||
ContentsPrintLanguage = CoreLanguageList.Japanese;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fast == false)
|
|
||||||
{
|
|
||||||
mfs = new MultiLanguageFilterStream(Response.Filter, ContentsPrintLanguage, this.CurrentLanguage, this.BasicHostName, this.ReplaceList);
|
|
||||||
mfs.Page = Page;
|
|
||||||
Response.Filter = mfs;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string ConvertPath(string url)
|
|
||||||
{
|
|
||||||
return ConvertPath(url, this.CurrentLanguage);
|
|
||||||
}
|
|
||||||
public string ConvertPath(string url, CoreLanguageClass lang)
|
|
||||||
{
|
|
||||||
string ja = CoreLanguageList.Japanese.Name;
|
|
||||||
|
|
||||||
if (url.StartsWith("/" + ja, StringComparison.InvariantCultureIgnoreCase))
|
|
||||||
{
|
|
||||||
url = "/" + lang.Name + url.Substring(ja.Length + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
return url;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string GetPathForLanguage(CoreLanguageClass lang)
|
|
||||||
{
|
|
||||||
string url = PhysicalUrl;
|
|
||||||
|
|
||||||
return ConvertPath(url, lang);
|
|
||||||
}
|
|
||||||
|
|
||||||
public string GetFullUrlForLanguage(CoreLanguageClass lang)
|
|
||||||
{
|
|
||||||
string url = (IsSSL ? "https://" : "http://") + Host + GetPathForLanguage(lang);
|
|
||||||
|
|
||||||
if (Str.IsEmptyStr(Args) == false)
|
|
||||||
{
|
|
||||||
url += "?" + Args;
|
|
||||||
}
|
|
||||||
|
|
||||||
return url;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string ProcStr(string str)
|
|
||||||
{
|
|
||||||
return ProcStr(str, ContentsPrintLanguage);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string ProcStrDefault(string str)
|
|
||||||
{
|
|
||||||
return ProcStr(str, CoreLanguageClass.CurrentThreadLanguageClass);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string ProcStr(string str, CoreLanguageClass lang)
|
|
||||||
{
|
|
||||||
return ProcStr(str, lang, lang);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string ProcStr(string str, CoreLanguageClass lang, CoreLanguageClass langPure)
|
|
||||||
{
|
|
||||||
MultiLanguageFilterStream st = new MultiLanguageFilterStream(null, lang, langPure, null, null);
|
|
||||||
|
|
||||||
return st.FilterString(str);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetCurrentLangCodeFromPath(string str)
|
|
||||||
{
|
|
||||||
char[] sps =
|
|
||||||
{
|
|
||||||
'/', '?',
|
|
||||||
};
|
|
||||||
string[] tokens = str.Split(sps, StringSplitOptions.RemoveEmptyEntries);
|
|
||||||
|
|
||||||
if (tokens.Length >= 1)
|
|
||||||
{
|
|
||||||
return tokens[0].ToLower();
|
|
||||||
}
|
|
||||||
|
|
||||||
return CoreLanguageList.Japanese.Name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class MultiString
|
|
||||||
{
|
|
||||||
public const string ChangeLanguage = "[j]Select Language[e]Select Language[/]";
|
|
||||||
public const string LanguageNotSupported = "[j]申し訳ございませんが、以下のコンテンツは現在日本語で公開されていません。[e]Unfortunately, following contents are not published in English yet. [/]";
|
|
||||||
public const string ThisIsTranslatedByMachine = "Following contents are translated automatically by Google Translate.";
|
|
||||||
public const string GoogleTranslate = "[j]Google で翻訳[e]Click here to translate the contents into English by Google Now[/]";
|
|
||||||
public const string ShowSrc = "Show the original page";
|
|
||||||
|
|
||||||
public static string GetStr(string srcStr, CoreLanguageClass lang)
|
|
||||||
{
|
|
||||||
return MultiLang.ProcStr(srcStr, lang);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class MultiLanguageFilterStream : Stream
|
|
||||||
{
|
|
||||||
public static readonly List<KeyValuePair<string, CoreLanguageClass>> langKeys = new List<KeyValuePair<string, CoreLanguageClass>>();
|
|
||||||
public readonly List<KeyValuePair<string, string>> ReplaceList = null;
|
|
||||||
public const string TagPure = "<!-- ml:pure -->";
|
|
||||||
public const string TagEndPure = "<!-- ml:endpure -->";
|
|
||||||
public bool DisableFilter = false;
|
|
||||||
public Page Page;
|
|
||||||
|
|
||||||
static MultiLanguageFilterStream()
|
|
||||||
{
|
|
||||||
langKeys.Add(new KeyValuePair<string, CoreLanguageClass>("[j]", CoreLanguageList.Japanese));
|
|
||||||
langKeys.Add(new KeyValuePair<string, CoreLanguageClass>("[e]", CoreLanguageList.English));
|
|
||||||
langKeys.Add(new KeyValuePair<string, CoreLanguageClass>("[/]", null));
|
|
||||||
}
|
|
||||||
|
|
||||||
Stack<CoreLanguageClass> stack = new Stack<CoreLanguageClass>();
|
|
||||||
CoreLanguageClass currentBodyLanguage
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (stack.Count == 0)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return stack.ToArray()[0];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
bool isLang(CoreLanguageClass lang)
|
|
||||||
{
|
|
||||||
CoreLanguageClass[] langList = stack.ToArray();
|
|
||||||
|
|
||||||
foreach (CoreLanguageClass c in langList)
|
|
||||||
{
|
|
||||||
if (c != lang)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
CoreLanguageClass lastBodyLanguage
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (stack.Count == 0)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return stack.Peek();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string FilterString(string src)
|
|
||||||
{
|
|
||||||
string[] strList = Str.DivideStringMulti(src, true,
|
|
||||||
TagPure, TagEndPure);
|
|
||||||
|
|
||||||
bool b = false;
|
|
||||||
|
|
||||||
StringBuilder ret = new StringBuilder();
|
|
||||||
|
|
||||||
foreach (string str in strList)
|
|
||||||
{
|
|
||||||
if (str == TagPure)
|
|
||||||
{
|
|
||||||
b = true;
|
|
||||||
}
|
|
||||||
else if (str == TagEndPure)
|
|
||||||
{
|
|
||||||
b = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret.Append(filterStringInner(str, b ? this.currentLanguagePure : this.currentLanguage, this.currentLanguagePure));
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
string filterStringInner(string src, CoreLanguageClass useLang, CoreLanguageClass useLangPure)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
string ret = src;
|
|
||||||
|
|
||||||
if (Str.IsEmptyStr(basicHostName) == false)
|
|
||||||
{
|
|
||||||
ret = Str.ReplaceStr(ret, "=\"/\"", "=\"http://" + basicHostName + "/\"", false);
|
|
||||||
ret = Str.ReplaceStr(ret, "=\'/\'", "=\'http://" + basicHostName + "/\'", false);
|
|
||||||
|
|
||||||
ret = Str.ReplaceStr(ret, "=\"/" + CoreLanguageList.Japanese.Name + "/\"", "=\"http://" + basicHostName + "/" + useLangPure.Name + "/\"", false);
|
|
||||||
ret = Str.ReplaceStr(ret, "=\'/" + CoreLanguageList.Japanese.Name + "/\'", "=\'http://" + basicHostName + "/" + useLangPure.Name + "/\'", false);
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = Str.ReplaceStr(ret, "=\"/" + CoreLanguageList.Japanese.Name + "/", "=\"/" + useLangPure.Name + "/", false);
|
|
||||||
ret = Str.ReplaceStr(ret, "=\'/" + CoreLanguageList.Japanese.Name + "/", "=\'/" + useLangPure.Name + "/", false);
|
|
||||||
|
|
||||||
ret = Str.ReplaceStr(ret, "_lm_" + CoreLanguageList.Japanese.Name, "_lm_" + useLang.Name, false);
|
|
||||||
|
|
||||||
if (this.ReplaceList != null)
|
|
||||||
{
|
|
||||||
foreach (KeyValuePair<string, string> p in this.ReplaceList)
|
|
||||||
{
|
|
||||||
ret = Str.ReplaceStr(ret, p.Key, p.Value, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
StringBuilder ret2 = new StringBuilder();
|
|
||||||
|
|
||||||
int next = 0;
|
|
||||||
while (true)
|
|
||||||
{
|
|
||||||
int min = int.MaxValue;
|
|
||||||
int j = -1;
|
|
||||||
for (i = 0; i < langKeys.Count; i++)
|
|
||||||
{
|
|
||||||
int r = Str.SearchStr(ret, langKeys[i].Key, next, false);
|
|
||||||
if (r != -1)
|
|
||||||
{
|
|
||||||
if (r < min)
|
|
||||||
{
|
|
||||||
j = i;
|
|
||||||
min = r;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (j != -1)
|
|
||||||
{
|
|
||||||
KeyValuePair<string, CoreLanguageClass> v = langKeys[j];
|
|
||||||
|
|
||||||
if (currentBodyLanguage == null || isLang(useLang))
|
|
||||||
{
|
|
||||||
ret2.Append(ret.Substring(next, min - next));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (v.Value != null)
|
|
||||||
{
|
|
||||||
if (lastBodyLanguage == null || v.Value.Id <= lastBodyLanguage.Id)
|
|
||||||
{
|
|
||||||
stack.Push(v.Value);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
stack.Pop();
|
|
||||||
stack.Push(v.Value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
stack.Pop();
|
|
||||||
}
|
|
||||||
|
|
||||||
next = min + v.Key.Length;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (currentBodyLanguage == null || isLang(useLang))
|
|
||||||
{
|
|
||||||
ret2.Append(ret.Substring(next, ret.Length - next));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = ret2.ToString();
|
|
||||||
|
|
||||||
string lang = useLangPure != CoreLanguageList.Japanese ? useLangPure.Name : "ja";
|
|
||||||
|
|
||||||
if (useLangPure != CoreLanguageList.Japanese)
|
|
||||||
{
|
|
||||||
ret = Str.ReplaceStr(ret, "<meta http-equiv=\"Content-Language\" content=\"ja\" />",
|
|
||||||
string.Format("<meta http-equiv=\"Content-Language\" content=\"{0}\" />", lang), false);
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = Str.ReplaceStr(ret, "<html>", string.Format("<html lang=\"{0}\">", lang), false);
|
|
||||||
|
|
||||||
next = 0;
|
|
||||||
while (true)
|
|
||||||
{
|
|
||||||
i = Str.SearchStr(ret, "<link rel=\"stylesheet\" href=\"", next, false);
|
|
||||||
if (i == -1)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
next = i + 1;
|
|
||||||
int j = Str.SearchStr(ret, "/>", next, false);
|
|
||||||
if (j == -1)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
string linkStr = ret.Substring(i, j - i + 2 - 1);
|
|
||||||
int k = Str.SearchStr(linkStr, "href=\"", 0, false);
|
|
||||||
if (k != -1)
|
|
||||||
{
|
|
||||||
int m = Str.SearchStr(linkStr, "\"", k + 6, false);
|
|
||||||
if (m != -1)
|
|
||||||
{
|
|
||||||
string fileName = linkStr.Substring(k + 6, m - k - 6);
|
|
||||||
fileName = Str.ReplaceStr(fileName, ".css", "_" + lang + ".css", false);
|
|
||||||
string linkStr2 = string.Format("<link rel=\"stylesheet\" href=\"{0}\" type=\"text/css\" />", fileName);
|
|
||||||
|
|
||||||
ret = ret.Substring(0, j + 2) + linkStr2 + ret.Substring(j + 2);
|
|
||||||
next = j + 2 + linkStr2.Length;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
Stream baseStream;
|
|
||||||
long position;
|
|
||||||
CoreLanguageClass currentLanguage;
|
|
||||||
CoreLanguageClass currentLanguagePure;
|
|
||||||
string basicHostName;
|
|
||||||
|
|
||||||
public override bool CanRead
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool CanSeek
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool CanWrite
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Flush()
|
|
||||||
{
|
|
||||||
baseStream.Flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override long Length
|
|
||||||
{
|
|
||||||
get { return 0; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public override long Position
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return position;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
position = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override long Seek(long offset, SeekOrigin origin)
|
|
||||||
{
|
|
||||||
return baseStream.Seek(offset, origin);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void SetLength(long value)
|
|
||||||
{
|
|
||||||
baseStream.SetLength(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
public MultiLanguageFilterStream(Stream baseStream, CoreLanguageClass currentLanguage, CoreLanguageClass currentLanguagePure, string basicHostName, List<KeyValuePair<string, string>> replaceList)
|
|
||||||
{
|
|
||||||
this.baseStream = baseStream;
|
|
||||||
this.currentLanguage = currentLanguage;
|
|
||||||
this.currentLanguagePure = currentLanguagePure;
|
|
||||||
this.basicHostName = basicHostName;
|
|
||||||
this.ReplaceList = replaceList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int Read(byte[] buffer, int offset, int count)
|
|
||||||
{
|
|
||||||
return baseStream.Read(buffer, offset, count);
|
|
||||||
}
|
|
||||||
|
|
||||||
string savedString = "";
|
|
||||||
|
|
||||||
public override void Write(byte[] buffer, int offset, int count)
|
|
||||||
{
|
|
||||||
if (DisableFilter)
|
|
||||||
{
|
|
||||||
baseStream.Write(buffer, offset, count);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
byte[] data = new byte[count];
|
|
||||||
Buffer.BlockCopy(buffer, offset, data, 0, count);
|
|
||||||
|
|
||||||
string inSrc = savedString + ByteDataToString(data);// Str.Utf8Encoding.GetString(data);
|
|
||||||
|
|
||||||
savedString = "";
|
|
||||||
|
|
||||||
if (inSrc.Length >= 2)
|
|
||||||
{
|
|
||||||
int len = inSrc.Length;
|
|
||||||
string last2 = inSrc.Substring(len - 2, 2);
|
|
||||||
string last1 = inSrc.Substring(len - 1, 1);
|
|
||||||
|
|
||||||
if (last1 == "[")
|
|
||||||
{
|
|
||||||
inSrc = inSrc.Substring(0, len - 1);
|
|
||||||
|
|
||||||
savedString = last1;
|
|
||||||
}
|
|
||||||
else if (Str.InStr(last2, "["))
|
|
||||||
{
|
|
||||||
inSrc = inSrc.Substring(0, len - 2);
|
|
||||||
|
|
||||||
savedString = last2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
string inStr = FilterString(inSrc);
|
|
||||||
|
|
||||||
data = StringToByteData(inStr);// Str.Utf8Encoding.GetBytes(inStr);
|
|
||||||
|
|
||||||
if (data.Length >= 1)
|
|
||||||
{
|
|
||||||
baseStream.Write(data, 0, data.Length);
|
|
||||||
//byte[] t = Str.Utf8Encoding.GetBytes("" + count.ToString() + "");
|
|
||||||
//baseStream.Write(t, 0, t.Length);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string ByteDataToString(byte[] data)
|
|
||||||
{
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
|
|
||||||
foreach (byte b in data)
|
|
||||||
{
|
|
||||||
if (b <= 0x7f && b != (byte)('\\'))
|
|
||||||
{
|
|
||||||
sb.Append((char)b);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sb.Append("\\" + ((uint)b).ToString("X2"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return sb.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public byte[] StringToByteData(string str)
|
|
||||||
{
|
|
||||||
int i, len;
|
|
||||||
|
|
||||||
len = str.Length;
|
|
||||||
Buf b = new Buf();
|
|
||||||
|
|
||||||
for (i = 0; i < len; i++)
|
|
||||||
{
|
|
||||||
char c = str[i];
|
|
||||||
if (c == '\\')
|
|
||||||
{
|
|
||||||
string tmp = "";
|
|
||||||
|
|
||||||
//try
|
|
||||||
{
|
|
||||||
tmp = "" + str[i + 1] + str[i + 2];
|
|
||||||
}
|
|
||||||
/*catch (Exception ex)
|
|
||||||
{
|
|
||||||
tmp += "|err=" + ex.Message + ",len=" + len + ",i=" + i + "|src=" + str + "|";
|
|
||||||
byte[] aa = Str.Utf8Encoding.GetBytes(tmp);
|
|
||||||
b.Write(aa);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
i += 2;
|
|
||||||
|
|
||||||
//try
|
|
||||||
{
|
|
||||||
b.WriteByte(byte.Parse(tmp, System.Globalization.NumberStyles.HexNumber));
|
|
||||||
}
|
|
||||||
//catch
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
b.WriteByte((byte)c);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return b.ByteData;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user