mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-07-06 15:54:57 +03:00
Compare commits
1098 Commits
Author | SHA1 | Date | |
---|---|---|---|
c2a7aa5481 | |||
6f57449164 | |||
bc31a5cfd3 | |||
68964ab0d7 | |||
bf3c50fde4 | |||
b06486b37d | |||
26c61b3213 | |||
1bea86ef94 | |||
6825234e0a | |||
a794726a07 | |||
dae352104c | |||
4fe5352931 | |||
ebe52afa9a | |||
c06e5ad1dd | |||
b2ec1bd5dd | |||
bfaff4fdb0 | |||
08213b7f0e | |||
98852b77d9 | |||
645a078f8e | |||
af2196468a | |||
42647480b0 | |||
60496ac7fb | |||
63ffab9ee4 | |||
2fe4ca0f8c | |||
a50d8910ba | |||
315ffffeec | |||
141060101d | |||
5a88b34ddb | |||
7006539732 | |||
8ad34b2012 | |||
186d48fba2 | |||
37231ac006 | |||
9378c341f7 | |||
99e277aa71 | |||
bcb896b178 | |||
6e5395cc8d | |||
9ce27f363e | |||
d568cc1727 | |||
c9b5e25c87 | |||
7f074d0c0b | |||
f8c5fa5384 | |||
74f7269ef6 | |||
41f83c9e32 | |||
f66866fda1 | |||
071a87297b | |||
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 | |||
5e63124bb5 | |||
68e704097d | |||
716ae59f1f | |||
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 | |||
36505e3896 | |||
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 | |||
0643ae70f5 | |||
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 | |||
039cd8edf0 | |||
e025762a52 | |||
a902d3eed9 | |||
44f731f781 | |||
14e9c7299d | |||
f20e99f8e4 | |||
b9109211d3 | |||
9073452b09 | |||
bf65ef290a | |||
70a7c4596d | |||
16cdf62cc6 | |||
033647c8ac | |||
b6ef9f88c9 | |||
c6f186bd73 | |||
84bd9abb30 | |||
5db21a1dc1 | |||
4772a508dc | |||
1416a693e7 | |||
22272ec838 | |||
be3e45a4bf | |||
dcecd4c0d5 | |||
60c1e2027d | |||
6399b0f852 | |||
3b00d4c56b | |||
5dde23cb55 | |||
e6b8e6eee3 | |||
78b0684dd4 | |||
a6652fead2 | |||
c222ef525b | |||
c3d56c2201 | |||
7e5decb72a | |||
1e601ebf65 | |||
f34d3c80b1 | |||
c635cdd614 | |||
fa9e9d15a5 | |||
60e85afd1f | |||
a6970e3e61 | |||
eeec9a82f6 | |||
1a5a11d146 | |||
a49219db83 | |||
a4f87565ae | |||
9487bc8d47 | |||
70564a8f52 | |||
bd558e8f0a | |||
17e7d65839 | |||
e5d691977d | |||
f083c59905 | |||
41e023b369 | |||
a53be84e3a | |||
4fddb7681e | |||
76c9678015 | |||
6d3fef8da6 | |||
92c544cc1f | |||
6b6c0ae636 | |||
543a26c6a6 | |||
d836904321 | |||
9556f09166 | |||
0d79b3c3b5 | |||
1c07ddcb8d | |||
c38b0b0398 | |||
e4aff409f8 | |||
80ba3345d1 | |||
d1471048d9 | |||
614f4db8a6 | |||
a455dc7f0e | |||
c8479e3011 | |||
b1aae5080d | |||
a69c4980d5 | |||
c64674479d | |||
01abdedc45 | |||
18c9b74ff0 | |||
3a309c9f6e | |||
3b6c4d02ac | |||
876ca4ef3e | |||
1d2a58b172 | |||
6b08a451da | |||
2ea5c2a7b0 | |||
82a81a3ce6 | |||
9aaa9a7f15 | |||
ab57ef3f54 | |||
76ae935172 | |||
a676a0a6fd | |||
76c330e74b | |||
4acd7ab98e | |||
7829fe2c59 | |||
12cbf34302 | |||
63caa4b07f | |||
3c21d982fc | |||
59dc26aa21 | |||
b8f58a2f94 | |||
1e835e7ec2 | |||
5d73cd878f | |||
7349c4b16a | |||
16bde47763 | |||
79a60bc5f0 | |||
4d42f450b2 | |||
46d8da6744 | |||
51330fdb43 | |||
5b15b12ea9 | |||
12cc242529 | |||
4afdad09a1 | |||
2f90e9ecb8 | |||
c3d6ffc533 | |||
04ecbf843a | |||
6b41b19327 | |||
93dcd25d63 | |||
5fed2b8903 | |||
2aeec323f9 | |||
762c399c42 | |||
f0357d4000 | |||
7413fec646 | |||
e944e6a848 | |||
c8a0a5648b | |||
e03db7ee60 | |||
93183f7b3f | |||
1e9092ee94 | |||
50960dbe16 | |||
ea37c85391 | |||
21e3ce104b | |||
850a5faa0d | |||
9e46402e6b | |||
1144d6c430 | |||
926b99047a | |||
2fa28480f9 | |||
d10f83417f | |||
82b84a9436 | |||
bf4667cfce | |||
c6068d23c7 | |||
7dff0dce17 | |||
9f19efb7af | |||
7d58e6bf60 | |||
3f9b610c80 | |||
ad33008a29 | |||
d57fc3524c | |||
a9f707c813 | |||
24f426162c | |||
06fc93e08e | |||
e10983ec6f | |||
9b20444bb2 | |||
d6cf1b85a9 | |||
831c907512 | |||
1bd39485cf | |||
fb5083be29 | |||
a4ed656001 | |||
dcc99fdbb2 | |||
13dbf83e95 | |||
5c77eddaf9 | |||
0d69030d77 | |||
a9f31d7df9 | |||
c6117d4f8e | |||
c2ad67a907 | |||
2291bf5bf9 | |||
50e39826e4 | |||
47ad2328c0 | |||
17a04b4387 | |||
e1e29a9283 | |||
2592525b64 | |||
896ac8e285 | |||
6e78068a65 | |||
9c227f3480 | |||
9c6c88a1a8 | |||
919f6c825f | |||
9fbfa61b34 | |||
7ef7c36c83 | |||
9cba49b89a | |||
2da6e4c491 | |||
afc6a706e5 | |||
b1d2dd8d87 | |||
39b80e04c5 | |||
529d8f593c | |||
458906b151 | |||
98b08c2ad1 | |||
03841e4181 | |||
d63f637253 | |||
18cfe18950 | |||
a3c29fbca6 | |||
b078e1a849 | |||
2584adfd87 | |||
b0f6ac1248 | |||
4e9c3358d1 | |||
59d57338a5 | |||
0060ba6c18 | |||
560b90d02c | |||
a2e2d5133b | |||
b43a1e76da | |||
854814475c | |||
bf8cd35508 | |||
6dbcda6026 | |||
afa93c8b84 | |||
388da69793 | |||
9e8c277cf3 | |||
89dfa319f3 | |||
abbacdf2a0 | |||
ec72d90140 | |||
d25d0c2465 | |||
1de08b05b2 | |||
03f4ced2c7 | |||
13b531c763 | |||
2f12e54fbc | |||
8f790eeca0 | |||
a9468c8cd9 | |||
ec7a0512f6 | |||
98443715d9 | |||
beef8d6892 | |||
bb56998a4e | |||
ba94d8a6fa | |||
372e8aa031 | |||
e750ace40a | |||
26261236ba | |||
6773eb3e0b | |||
e0467c0a39 | |||
d7941be664 | |||
23b8161ac2 | |||
c1243c5198 | |||
270d9f1e0b | |||
962356af9c | |||
5a7e4693fc | |||
d790223700 | |||
a5b816aa59 | |||
45c13c5409 | |||
c253c55a8c | |||
a97b87da68 | |||
09ee19e72b | |||
e939f887c4 | |||
9fff38de2b |
100
.appveyor.yml
100
.appveyor.yml
@ -1,100 +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
|
|
||||||
|
|
||||||
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 tar --exclude=.git -czf /tmp/${APPVEYOR_REPO_TAG_NAME}.tar.gz . && appveyor PushArtifact /tmp/${APPVEYOR_REPO_TAG_NAME}.tar.gz \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
|
|
@ -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,18 +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"
|
||||||
|
|
||||||
$t = (Write-Output "q\n" | & .\build\vpntest.exe $mode | Select-String -Pattern 'NO MEMORY LEAKS' -CaseSensitive)
|
$full = (Write-Output "q\n" | & "$BUILD_BINARIESDIRECTORY\vpntest.exe" $mode)
|
||||||
|
$t = ($full | Select-String -Pattern 'NO MEMORY LEAKS' -CaseSensitive)
|
||||||
|
|
||||||
if( ($t).Count -ne 1){
|
if (($t).Count -ne 1) {
|
||||||
|
$full
|
||||||
Write-Error 'failed'
|
Write-Error 'failed'
|
||||||
return $false
|
return $false
|
||||||
}else{
|
} else {
|
||||||
Write-Host 'ok'
|
Write-Host 'ok'
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ build_openssl () {
|
|||||||
if [[ "$(cat ${OPENSSL_INSTALL_DIR}/.openssl-version)" != "${OPENSSL_VERSION}" ]]; then
|
if [[ "$(cat ${OPENSSL_INSTALL_DIR}/.openssl-version)" != "${OPENSSL_VERSION}" ]]; then
|
||||||
tar zxf "download-cache/openssl-${OPENSSL_VERSION}.tar.gz"
|
tar zxf "download-cache/openssl-${OPENSSL_VERSION}.tar.gz"
|
||||||
cd "openssl-${OPENSSL_VERSION}/"
|
cd "openssl-${OPENSSL_VERSION}/"
|
||||||
./config shared --prefix="${OPENSSL_INSTALL_DIR}" --openssldir="${OPENSSL_INSTALL_DIR}" -DPURIFY
|
./config shared no-deprecated --prefix="${OPENSSL_INSTALL_DIR}" --openssldir="${OPENSSL_INSTALL_DIR}" -DPURIFY
|
||||||
make -j $(nproc || sysctl -n hw.ncpu || echo 4) all
|
make -j $(nproc || sysctl -n hw.ncpu || echo 4) all
|
||||||
make install_sw
|
make install_sw
|
||||||
echo "${OPENSSL_VERSION}" > "${OPENSSL_INSTALL_DIR}/.openssl-version"
|
echo "${OPENSSL_VERSION}" > "${OPENSSL_INSTALL_DIR}/.openssl-version"
|
||||||
|
@ -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
|
||||||
|
12
.ci/sonarcloud.sh
Executable file
12
.ci/sonarcloud.sh
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
RUN_SONARCLOUD="${RUN_SONARCLOUD:-0}"
|
||||||
|
|
||||||
|
if [ "${RUN_SONARCLOUD}" = "1" ] && [ ! -z ${SONAR_TOKEN+x} ]; then
|
||||||
|
./configure
|
||||||
|
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}
|
||||||
|
else
|
||||||
|
echo "Skipping sonar-scan because \$RUN_SONARCLOUD != \"1\" or \$SONAR_TOKEN is not set"
|
||||||
|
fi
|
@ -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
|
||||||
|
5
.ci/vpntools-check.sh
Executable file
5
.ci/vpntools-check.sh
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -eux
|
||||||
|
|
||||||
|
./build/vpncmd /tools /cmd:check
|
25
.cirrus.yml
Normal file
25
.cirrus.yml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
FreeBSD_task:
|
||||||
|
matrix:
|
||||||
|
env:
|
||||||
|
SSL: openssl
|
||||||
|
OPENSSL_ROOT_DIR: /usr/local
|
||||||
|
env:
|
||||||
|
SSL: openssl32
|
||||||
|
OPENSSL_ROOT_DIR: /usr/local
|
||||||
|
env:
|
||||||
|
# base openssl
|
||||||
|
SSL:
|
||||||
|
matrix:
|
||||||
|
freebsd_instance:
|
||||||
|
image_family: freebsd-14-0
|
||||||
|
prepare_script:
|
||||||
|
- pkg install -y pkgconf cmake git libsodium $SSL
|
||||||
|
- git submodule update --init --recursive
|
||||||
|
configure_script:
|
||||||
|
- ./configure
|
||||||
|
build_script:
|
||||||
|
- make -j $(sysctl -n hw.ncpu || echo 4) -C build
|
||||||
|
test_script:
|
||||||
|
- ldd build/vpnserver
|
||||||
|
- .ci/memory-leak-test.sh
|
||||||
|
- .ci/vpntools-check.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-14, macos-13, macos-12]
|
||||||
|
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"
|
||||||
|
|
8
.gitignore
vendored
8
.gitignore
vendored
@ -2,8 +2,12 @@
|
|||||||
.cproject
|
.cproject
|
||||||
.project
|
.project
|
||||||
.settings/
|
.settings/
|
||||||
|
.vs/
|
||||||
Makefile
|
Makefile
|
||||||
bin/
|
/src/bin/*
|
||||||
|
!/src/bin/hamcore/
|
||||||
|
/src/bin/hamcore/*
|
||||||
|
!/src/bin/hamcore/wwwroot/
|
||||||
build/
|
build/
|
||||||
cmake-build-debug/
|
cmake-build-debug/
|
||||||
src/bin/hamcore/authors.txt
|
src/bin/hamcore/authors.txt
|
||||||
@ -205,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,49 +1,11 @@
|
|||||||
.ubuntu: &ubuntu_def
|
# illumos gitlab-runner maintained by @hww3
|
||||||
variables:
|
build_illumos:
|
||||||
CMAKE_VERSION: 3.9.6
|
only:
|
||||||
except:
|
- master@SoftEther/SoftEtherVPN
|
||||||
changes:
|
tags:
|
||||||
- .appveyor.yml
|
- illumos
|
||||||
- .travis.yml
|
|
||||||
- azure-pipelines.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:
|
script:
|
||||||
- ./configure
|
- git submodule init && git submodule update
|
||||||
- make package -C tmp
|
- CMAKE_FLAGS="-DCMAKE_PREFIX_PATH=/opt/local -DCMAKE_CXX_FLAGS=-m64 -DCMAKE_C_FLAGS=-m64" ./configure
|
||||||
- dpkg -i build/softether-vpn*.deb
|
- gmake -C build
|
||||||
- .ci/memory-leak-test.sh
|
|
||||||
|
|
||||||
trusty:
|
|
||||||
<<: *ubuntu_def
|
|
||||||
image: ubuntu:trusty
|
|
||||||
|
|
||||||
precise:
|
|
||||||
<<: *ubuntu_def
|
|
||||||
image: ubuntu:precise
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# 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
|
||||||
|
57
.travis.yml
57
.travis.yml
@ -1,4 +1,5 @@
|
|||||||
sudo: required
|
sudo: required
|
||||||
|
dist: bionic
|
||||||
|
|
||||||
language: c
|
language: c
|
||||||
|
|
||||||
@ -6,44 +7,37 @@ env:
|
|||||||
global:
|
global:
|
||||||
- OPENSSL_INSTALL_DIR="${HOME}/opt"
|
- OPENSSL_INSTALL_DIR="${HOME}/opt"
|
||||||
|
|
||||||
|
addons:
|
||||||
|
sonarcloud:
|
||||||
|
organization: "softethervpn"
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- env: OPENSSL_VERSION="1.0.2o" BUILD_DEB="1"
|
- env: OPENSSL_VERSION="1.0.2s" BUILD_DEB="1"
|
||||||
os: linux
|
os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
- env: OPENSSL_VERSION="1.1.0f"
|
- env: RUN_SONARCLOUD=1 OPENSSL_VERSION="1.1.1c"
|
||||||
os: linux
|
os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
- env: OPENSSL_VERSION="1.0.2o" RUN_COVERITY="1"
|
- env: OPENSSL_VERSION="1.1.1c" LABEL="linux-ppc64le" CMAKE_VERSION="3.9.6"
|
||||||
|
arch: ppc64le
|
||||||
|
os: linux
|
||||||
|
compiler: gcc
|
||||||
|
install:
|
||||||
|
- 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 > 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 ..
|
||||||
|
- env: OPENSSL_VERSION="1.1.1c"
|
||||||
os: linux
|
os: linux
|
||||||
compiler: clang
|
compiler: clang
|
||||||
- env: OPENSSL_VERSION="1.1.0f"
|
- env: LIBRESSL_VERSION="2.9.2"
|
||||||
os: linux
|
|
||||||
compiler: clang
|
|
||||||
- env: LIBRESSL_VERSION="2.8.2"
|
|
||||||
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.1.300
|
|
||||||
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:
|
||||||
@ -51,17 +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/sonarcloud.sh
|
||||||
- .ci/coverity.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
@ -1,5 +1,5 @@
|
|||||||
SoftEther VPN is developed by SoftEther VPN Project at University of Tsukuba.
|
SoftEther VPN is developed by SoftEther VPN Project at University of Tsukuba.
|
||||||
http://www.softether.org/
|
https://www.softether.org/
|
||||||
|
|
||||||
AUTHORS OF SOFTETHER VPN
|
AUTHORS OF SOFTETHER VPN
|
||||||
------------------------
|
------------------------
|
||||||
@ -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:
|
||||||
|
|
||||||
@ -89,6 +91,7 @@ CONTRIBUTORS:
|
|||||||
- Johan de Vries <devries@wivion.nl>
|
- Johan de Vries <devries@wivion.nl>
|
||||||
- Josh Soref <https://github.com/jsoref>
|
- Josh Soref <https://github.com/jsoref>
|
||||||
- Joshua Perry <josh@6bit.com>
|
- Joshua Perry <josh@6bit.com>
|
||||||
|
- Koichiro Iwao <meta@FreeBSD.org>
|
||||||
- Luiz Eduardo Gava <luiz.gava@procempa.com.br>
|
- Luiz Eduardo Gava <luiz.gava@procempa.com.br>
|
||||||
- macvk <tutumbul@gmail.com>
|
- macvk <tutumbul@gmail.com>
|
||||||
- Maks Naumov <maksqwe1@ukr.net>
|
- Maks Naumov <maksqwe1@ukr.net>
|
||||||
@ -111,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>
|
||||||
@ -134,5 +138,5 @@ JOIN THE SOFTETHER VPN DEVELOPMENT
|
|||||||
Want to become a contributor? Please send us a patch.
|
Want to become a contributor? Please send us a patch.
|
||||||
|
|
||||||
See also: SoftEther VPN Patch Acceptance Policy
|
See also: SoftEther VPN Patch Acceptance Policy
|
||||||
http://www.softether.org/5-download/src/9.patch
|
https://www.softether.org/5-download/src/9.patch
|
||||||
|
|
||||||
|
@ -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 "5185")
|
||||||
|
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.9668
|
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,30 +39,28 @@ 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)
|
||||||
|
|
||||||
|
#
|
||||||
|
# use rpath for locating installed libraries
|
||||||
|
#
|
||||||
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
|
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
|
||||||
|
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)
|
||||||
|
if(EXISTS "/lib/systemd/system")
|
||||||
|
set(CMAKE_INSTALL_SYSTEMD_UNITDIR "/lib/systemd/system" CACHE STRING "Where to install systemd unit files")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
configure_file("${TOP_DIRECTORY}/AUTHORS.TXT" "${TOP_DIRECTORY}/src/bin/hamcore/authors.txt" COPYONLY)
|
configure_file("${TOP_DIRECTORY}/AUTHORS.TXT" "${TOP_DIRECTORY}/src/bin/hamcore/authors.txt" COPYONLY)
|
||||||
@ -56,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)
|
||||||
@ -87,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": "5185" } ],
|
||||||
|
"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
FUNDING.yml
Normal file
1
FUNDING.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
liberapay: softether
|
148
README.md
148
README.md
@ -1,21 +1,29 @@
|
|||||||
# 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)
|
||||||
* [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)
|
||||||
|
* [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 Server VPN JSON-RPC API Suite](#built-in-softether-server-vpn-json-rpc-api-suite)
|
||||||
- [TO CIRCUMVENT YOUR GOVERNMENT'S FIREWALL RESTRICTION](#to-circumvent-your-governments-firewall-restriction)
|
- [TO CIRCUMVENT YOUR GOVERNMENT'S FIREWALL RESTRICTION](#to-circumvent-your-governments-firewall-restriction)
|
||||||
- [SOURCE CODE CONTRIBUTION](#source-code-contribution)
|
- [SOURCE CODE CONTRIBUTION](#source-code-contribution)
|
||||||
- [DEAR SECURITY EXPERTS](#dear-security-experts)
|
- [DEAR SECURITY EXPERTS](#dear-security-experts)
|
||||||
|
|
||||||
SoftEther VPN (Developer Edition Master Repository)
|
SoftEther VPN (Developer Edition Master Repository)
|
||||||
- An Open-Source Cross-platform Multi-protocol VPN Program
|
- An Open-Source Cross-platform Multi-protocol VPN Program
|
||||||
http://www.softether.org/
|
https://www.softether.org/
|
||||||
|
|
||||||
|
|
||||||
This repository has experimental codes. Pull requests are welcome.
|
This repository has experimental codes. Pull requests are welcome.
|
||||||
@ -24,8 +32,10 @@ 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:
|
||||||
http://www.softether-download.com/
|
https://www.softether-download.com/
|
||||||
|
|
||||||
Copyright (c) all contributors on SoftEther VPN project in GitHub.
|
Copyright (c) all contributors on SoftEther VPN project in GitHub.
|
||||||
Copyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation.
|
Copyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation.
|
||||||
@ -62,10 +72,10 @@ 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 http://www.softether.org/.
|
More details on https://www.softether.org/.
|
||||||
|
|
||||||
|
|
||||||
# BOARD MEMBERS OF THIS REPOSITORY
|
# BOARD MEMBERS OF THIS REPOSITORY
|
||||||
@ -95,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
|
||||||
@ -127,18 +138,75 @@ https://github.com/chipitsine
|
|||||||
- No memory leaks. High quality stable codes, intended for long-term runs.
|
- No memory leaks. High quality stable codes, intended for long-term runs.
|
||||||
We always verify that there are no memory or resource leaks before
|
We always verify that there are no memory or resource leaks before
|
||||||
releasing the build.
|
releasing the build.
|
||||||
- More details at http://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
|
## For FreeBSD
|
||||||
|
|
||||||
[Launchpad PPA](https://launchpad.net/~paskal-07/+archive/ubuntu/softethervpn/+packages) maintained by [Dmitry Verkhoturov](https://github.com/paskal)
|
SoftEther VPN in FreeBSD Ports Collection is maintained by
|
||||||
|
[Koichiro Iwao](https://people.FreeBSD.org/~meta/) ([@metalefty](https://github.com/metalefty)).
|
||||||
|
|
||||||
## From binary installers:
|
Binary package can be installed by pkg:
|
||||||
|
```
|
||||||
|
pkg install softether5
|
||||||
|
```
|
||||||
|
|
||||||
Those can be found under http://www.softether-download.com/
|
Alternatively, it can be built & installed by ports:
|
||||||
|
```
|
||||||
|
make install -C /usr/ports/security/softether5
|
||||||
|
```
|
||||||
|
|
||||||
|
To run SoftEther VPN Server:
|
||||||
|
```
|
||||||
|
service softether_server start
|
||||||
|
```
|
||||||
|
|
||||||
|
To configure SoftEther VPN Server startup on boot:
|
||||||
|
```
|
||||||
|
sysrc softether_server_enable=yes
|
||||||
|
```
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
## 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/
|
||||||
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.
|
||||||
|
|
||||||
## Build from Source code
|
## Build from Source code
|
||||||
@ -150,6 +218,39 @@ There are two flavours of SoftEtherVPN source code:
|
|||||||
1. Unstable. Found under https://github.com/SoftEtherVPN/SoftEtherVPN
|
1. Unstable. Found under https://github.com/SoftEtherVPN/SoftEtherVPN
|
||||||
2. Stable. Found under https://github.com/SoftEtherVPN/SoftEtherVPN_Stable
|
2. Stable. Found under https://github.com/SoftEtherVPN/SoftEtherVPN_Stable
|
||||||
|
|
||||||
|
|
||||||
|
# About HTML5-based Modern Admin Console and JSON-RPC API Suite
|
||||||
|
|
||||||
|
## Built-in SoftEther VPN Server HTML5 Ajax-based Web Administration Console
|
||||||
|
We are developing the HTML5 Ajax-based Web Administration Console (currently very limited, under construction) in the embedded HTTPS server on the SoftEther VPN Server.
|
||||||
|
|
||||||
|
Access to the following URL from your favorite web browser.
|
||||||
|
|
||||||
|
```
|
||||||
|
https://<vpn_server_hostname>:<port>/admin/
|
||||||
|
```
|
||||||
|
|
||||||
|
For example if your VPN Server is running as the port 5555 on the host at 192.168.0.1, you can access to the web console by:
|
||||||
|
|
||||||
|
```
|
||||||
|
https://192.168.0.1:5555/admin/
|
||||||
|
```
|
||||||
|
|
||||||
|
Note: Your HTML5 development contribution is very appreciated. The current HTML5 pages are written by Daiyuu Nobori (the core developer of SoftEther VPN). He is obviously lack of HTML5 development ability. Please kindly consider to contribute for SoftEther VPN's development on GitHub. Your code will help every people running SoftEther VPN Server.
|
||||||
|
|
||||||
|
|
||||||
|
## Built-in SoftEther Server VPN JSON-RPC API Suite
|
||||||
|
The API Suite allows you to easily develop your original SoftEther VPN Server management application to control the VPN Server (e.g. creating users, adding Virtual Hubs, disconnecting a specified VPN sessions).
|
||||||
|
|
||||||
|
You can access to the [latest SoftEther VPN Server JSON-RPC Document on GitHub.](https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/)
|
||||||
|
|
||||||
|
- Almost all control APIs, which the VPN Server provides, are available as JSON-RPC API.
|
||||||
|
You can write your own VPN Server management application in your favorite languages (JavaScript, TypeScript, Java, Python, Ruby, C#, ... etc.)
|
||||||
|
- If you are planning to develop your own VPN cloud service, the JSON-RPC API is the best choice to realize the automated operations for the VPN Server.
|
||||||
|
- No need to use any specific API client library since all APIs are provided on the JSON-RPC 2.0 Specification. You can use your favorite JSON and HTTPS client library to call any of all APIs in your pure runtime environment.
|
||||||
|
- Also, the SoftEther VPN Project provides high-quality JSON-RPC client stub libraries which define all of the API client stub codes. These libraries are written in C#, JavaScript and TypeScript. The Node.js Client Library for VPN Server RPC (vpnrpc) package is also available.
|
||||||
|
|
||||||
|
|
||||||
# TO CIRCUMVENT YOUR GOVERNMENT'S FIREWALL RESTRICTION
|
# TO CIRCUMVENT YOUR GOVERNMENT'S FIREWALL RESTRICTION
|
||||||
|
|
||||||
Because SoftEther VPN is overly strong tool to build a VPN tunnel,
|
Because SoftEther VPN is overly strong tool to build a VPN tunnel,
|
||||||
@ -157,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!
|
||||||
|
|
||||||
@ -185,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.
|
||||||
|
|
||||||
@ -194,4 +296,4 @@ Our e-mail address for security reports is:
|
|||||||
|
|
||||||
Please note that the above e-mail address is not a technical support
|
Please note that the above e-mail address is not a technical support
|
||||||
inquiry address. If you need technical assistance, please visit
|
inquiry address. If you need technical assistance, please visit
|
||||||
http://www.softether.org/ and ask your question on the users forum.
|
https://www.softether.org/ and ask your question on the users forum.
|
||||||
|
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)
|
@ -1,19 +0,0 @@
|
|||||||
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'
|
|
14
configure
vendored
14
configure
vendored
@ -17,12 +17,16 @@ 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
|
||||||
|
|
||||||
|
if [ ! -z ${CMAKE_FLAGS+x} ]; then
|
||||||
|
CMAKE_FLAGS="${CMAKE_FLAGS}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -z ${CMAKE_INSTALL_PREFIX+x} ]; then
|
if [ ! -z ${CMAKE_INSTALL_PREFIX+x} ]; then
|
||||||
CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}"
|
CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} ${CMAKE_FLAGS}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z ${OPENSSL_ROOT_DIR} ]; then
|
if [ -z ${OPENSSL_ROOT_DIR} ]; then
|
||||||
@ -46,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" ..
|
||||||
|
|
||||||
@ -26,4 +26,5 @@ if %errorlevel% == 0 (
|
|||||||
echo The Makefile is generated. Run 'nmake' to build SoftEther VPN.
|
echo The Makefile is generated. Run 'nmake' to build SoftEther VPN.
|
||||||
) else (
|
) else (
|
||||||
cd ..
|
cd ..
|
||||||
|
exit /b 1
|
||||||
)
|
)
|
||||||
|
@ -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'">
|
||||||
|
350
developer_tools/vpnserver-jsonrpc-clients/.gitignore
vendored
Normal file
350
developer_tools/vpnserver-jsonrpc-clients/.gitignore
vendored
Normal file
@ -0,0 +1,350 @@
|
|||||||
|
# Created by https://www.gitignore.io/api/visualstudio
|
||||||
|
# Edit at https://www.gitignore.io/?templates=visualstudio
|
||||||
|
|
||||||
|
### VisualStudio ###
|
||||||
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
|
## files generated by popular Visual Studio add-ons.
|
||||||
|
##
|
||||||
|
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||||
|
|
||||||
|
# User-specific files
|
||||||
|
*.rsuser
|
||||||
|
*.suo
|
||||||
|
*.user
|
||||||
|
*.userosscache
|
||||||
|
*.sln.docstates
|
||||||
|
|
||||||
|
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||||
|
*.userprefs
|
||||||
|
|
||||||
|
# Mono auto generated files
|
||||||
|
mono_crash.*
|
||||||
|
|
||||||
|
# Build results
|
||||||
|
[Dd]ebug/
|
||||||
|
[Dd]ebugPublic/
|
||||||
|
[Rr]elease/
|
||||||
|
[Rr]eleases/
|
||||||
|
x64/
|
||||||
|
x86/
|
||||||
|
[Aa][Rr][Mm]/
|
||||||
|
[Aa][Rr][Mm]64/
|
||||||
|
bld/
|
||||||
|
[Bb]in/
|
||||||
|
[Oo]bj/
|
||||||
|
[Ll]og/
|
||||||
|
|
||||||
|
# Visual Studio 2015/2017 cache/options directory
|
||||||
|
.vs/
|
||||||
|
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||||
|
#wwwroot/
|
||||||
|
|
||||||
|
# Visual Studio 2017 auto generated files
|
||||||
|
Generated\ Files/
|
||||||
|
|
||||||
|
# MSTest test Results
|
||||||
|
[Tt]est[Rr]esult*/
|
||||||
|
[Bb]uild[Ll]og.*
|
||||||
|
|
||||||
|
# NUNIT
|
||||||
|
*.VisualState.xml
|
||||||
|
TestResult.xml
|
||||||
|
|
||||||
|
# Build Results of an ATL Project
|
||||||
|
[Dd]ebugPS/
|
||||||
|
[Rr]eleasePS/
|
||||||
|
dlldata.c
|
||||||
|
|
||||||
|
# Benchmark Results
|
||||||
|
BenchmarkDotNet.Artifacts/
|
||||||
|
|
||||||
|
# .NET Core
|
||||||
|
project.lock.json
|
||||||
|
project.fragment.lock.json
|
||||||
|
artifacts/
|
||||||
|
|
||||||
|
# StyleCop
|
||||||
|
StyleCopReport.xml
|
||||||
|
|
||||||
|
# Files built by Visual Studio
|
||||||
|
*_i.c
|
||||||
|
*_p.c
|
||||||
|
*_h.h
|
||||||
|
*.ilk
|
||||||
|
*.meta
|
||||||
|
*.obj
|
||||||
|
*.iobj
|
||||||
|
*.pch
|
||||||
|
*.pdb
|
||||||
|
*.ipdb
|
||||||
|
*.pgc
|
||||||
|
*.pgd
|
||||||
|
*.rsp
|
||||||
|
*.sbr
|
||||||
|
*.tlb
|
||||||
|
*.tli
|
||||||
|
*.tlh
|
||||||
|
*.tmp
|
||||||
|
*.tmp_proj
|
||||||
|
*_wpftmp.csproj
|
||||||
|
*.log
|
||||||
|
*.vspscc
|
||||||
|
*.vssscc
|
||||||
|
.builds
|
||||||
|
*.pidb
|
||||||
|
*.svclog
|
||||||
|
*.scc
|
||||||
|
|
||||||
|
# Chutzpah Test files
|
||||||
|
_Chutzpah*
|
||||||
|
|
||||||
|
# Visual C++ cache files
|
||||||
|
ipch/
|
||||||
|
*.aps
|
||||||
|
*.ncb
|
||||||
|
*.opendb
|
||||||
|
*.opensdf
|
||||||
|
*.sdf
|
||||||
|
*.cachefile
|
||||||
|
*.VC.db
|
||||||
|
*.VC.VC.opendb
|
||||||
|
|
||||||
|
# Visual Studio profiler
|
||||||
|
*.psess
|
||||||
|
*.vsp
|
||||||
|
*.vspx
|
||||||
|
*.sap
|
||||||
|
|
||||||
|
# Visual Studio Trace Files
|
||||||
|
*.e2e
|
||||||
|
|
||||||
|
# TFS 2012 Local Workspace
|
||||||
|
$tf/
|
||||||
|
|
||||||
|
# Guidance Automation Toolkit
|
||||||
|
*.gpState
|
||||||
|
|
||||||
|
# ReSharper is a .NET coding add-in
|
||||||
|
_ReSharper*/
|
||||||
|
*.[Rr]e[Ss]harper
|
||||||
|
*.DotSettings.user
|
||||||
|
|
||||||
|
# JustCode is a .NET coding add-in
|
||||||
|
.JustCode
|
||||||
|
|
||||||
|
# TeamCity is a build add-in
|
||||||
|
_TeamCity*
|
||||||
|
|
||||||
|
# DotCover is a Code Coverage Tool
|
||||||
|
*.dotCover
|
||||||
|
|
||||||
|
# AxoCover is a Code Coverage Tool
|
||||||
|
.axoCover/*
|
||||||
|
!.axoCover/settings.json
|
||||||
|
|
||||||
|
# Visual Studio code coverage results
|
||||||
|
*.coverage
|
||||||
|
*.coveragexml
|
||||||
|
|
||||||
|
# NCrunch
|
||||||
|
_NCrunch_*
|
||||||
|
.*crunch*.local.xml
|
||||||
|
nCrunchTemp_*
|
||||||
|
|
||||||
|
# MightyMoose
|
||||||
|
*.mm.*
|
||||||
|
AutoTest.Net/
|
||||||
|
|
||||||
|
# Web workbench (sass)
|
||||||
|
.sass-cache/
|
||||||
|
|
||||||
|
# Installshield output folder
|
||||||
|
[Ee]xpress/
|
||||||
|
|
||||||
|
# DocProject is a documentation generator add-in
|
||||||
|
DocProject/buildhelp/
|
||||||
|
DocProject/Help/*.HxT
|
||||||
|
DocProject/Help/*.HxC
|
||||||
|
DocProject/Help/*.hhc
|
||||||
|
DocProject/Help/*.hhk
|
||||||
|
DocProject/Help/*.hhp
|
||||||
|
DocProject/Help/Html2
|
||||||
|
DocProject/Help/html
|
||||||
|
|
||||||
|
# Click-Once directory
|
||||||
|
publish/
|
||||||
|
|
||||||
|
# Publish Web Output
|
||||||
|
*.[Pp]ublish.xml
|
||||||
|
*.azurePubxml
|
||||||
|
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||||
|
# but database connection strings (with potential passwords) will be unencrypted
|
||||||
|
*.pubxml
|
||||||
|
*.publishproj
|
||||||
|
|
||||||
|
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||||
|
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||||
|
# in these scripts will be unencrypted
|
||||||
|
PublishScripts/
|
||||||
|
|
||||||
|
# NuGet Packages
|
||||||
|
*.nupkg
|
||||||
|
# The packages folder can be ignored because of Package Restore
|
||||||
|
**/[Pp]ackages/*
|
||||||
|
# except build/, which is used as an MSBuild target.
|
||||||
|
!**/[Pp]ackages/build/
|
||||||
|
# Uncomment if necessary however generally it will be regenerated when needed
|
||||||
|
#!**/[Pp]ackages/repositories.config
|
||||||
|
# NuGet v3's project.json files produces more ignorable files
|
||||||
|
*.nuget.props
|
||||||
|
*.nuget.targets
|
||||||
|
|
||||||
|
# Microsoft Azure Build Output
|
||||||
|
csx/
|
||||||
|
*.build.csdef
|
||||||
|
|
||||||
|
# Microsoft Azure Emulator
|
||||||
|
ecf/
|
||||||
|
rcf/
|
||||||
|
|
||||||
|
# Windows Store app package directories and files
|
||||||
|
AppPackages/
|
||||||
|
BundleArtifacts/
|
||||||
|
Package.StoreAssociation.xml
|
||||||
|
_pkginfo.txt
|
||||||
|
*.appx
|
||||||
|
*.appxbundle
|
||||||
|
*.appxupload
|
||||||
|
|
||||||
|
# Visual Studio cache files
|
||||||
|
# files ending in .cache can be ignored
|
||||||
|
*.[Cc]ache
|
||||||
|
# but keep track of directories ending in .cache
|
||||||
|
!?*.[Cc]ache/
|
||||||
|
|
||||||
|
# Others
|
||||||
|
ClientBin/
|
||||||
|
~$*
|
||||||
|
*~
|
||||||
|
*.dbmdl
|
||||||
|
*.dbproj.schemaview
|
||||||
|
*.jfm
|
||||||
|
*.pfx
|
||||||
|
*.publishsettings
|
||||||
|
orleans.codegen.cs
|
||||||
|
|
||||||
|
# Including strong name files can present a security risk
|
||||||
|
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||||
|
#*.snk
|
||||||
|
|
||||||
|
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||||
|
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||||
|
#bower_components/
|
||||||
|
|
||||||
|
# RIA/Silverlight projects
|
||||||
|
Generated_Code/
|
||||||
|
|
||||||
|
# Backup & report files from converting an old project file
|
||||||
|
# to a newer Visual Studio version. Backup files are not needed,
|
||||||
|
# because we have git ;-)
|
||||||
|
_UpgradeReport_Files/
|
||||||
|
Backup*/
|
||||||
|
UpgradeLog*.XML
|
||||||
|
UpgradeLog*.htm
|
||||||
|
ServiceFabricBackup/
|
||||||
|
*.rptproj.bak
|
||||||
|
|
||||||
|
# SQL Server files
|
||||||
|
*.mdf
|
||||||
|
*.ldf
|
||||||
|
*.ndf
|
||||||
|
|
||||||
|
# Business Intelligence projects
|
||||||
|
*.rdl.data
|
||||||
|
*.bim.layout
|
||||||
|
*.bim_*.settings
|
||||||
|
*.rptproj.rsuser
|
||||||
|
*- Backup*.rdl
|
||||||
|
|
||||||
|
# Microsoft Fakes
|
||||||
|
FakesAssemblies/
|
||||||
|
|
||||||
|
# GhostDoc plugin setting file
|
||||||
|
*.GhostDoc.xml
|
||||||
|
|
||||||
|
# Node.js Tools for Visual Studio
|
||||||
|
.ntvs_analysis.dat
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# Visual Studio 6 build log
|
||||||
|
*.plg
|
||||||
|
|
||||||
|
# Visual Studio 6 workspace options file
|
||||||
|
*.opt
|
||||||
|
|
||||||
|
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||||
|
*.vbw
|
||||||
|
|
||||||
|
# Visual Studio LightSwitch build output
|
||||||
|
**/*.HTMLClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/ModelManifest.xml
|
||||||
|
**/*.Server/GeneratedArtifacts
|
||||||
|
**/*.Server/ModelManifest.xml
|
||||||
|
_Pvt_Extensions
|
||||||
|
|
||||||
|
# Paket dependency manager
|
||||||
|
.paket/paket.exe
|
||||||
|
paket-files/
|
||||||
|
|
||||||
|
# FAKE - F# Make
|
||||||
|
.fake/
|
||||||
|
|
||||||
|
# CodeRush personal settings
|
||||||
|
.cr/personal
|
||||||
|
|
||||||
|
# Python Tools for Visual Studio (PTVS)
|
||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
|
||||||
|
# Cake - Uncomment if you are using it
|
||||||
|
# tools/**
|
||||||
|
# !tools/packages.config
|
||||||
|
|
||||||
|
# Tabs Studio
|
||||||
|
*.tss
|
||||||
|
|
||||||
|
# Telerik's JustMock configuration file
|
||||||
|
*.jmconfig
|
||||||
|
|
||||||
|
# BizTalk build output
|
||||||
|
*.btp.cs
|
||||||
|
*.btm.cs
|
||||||
|
*.odx.cs
|
||||||
|
*.xsd.cs
|
||||||
|
|
||||||
|
# OpenCover UI analysis results
|
||||||
|
OpenCover/
|
||||||
|
|
||||||
|
# Azure Stream Analytics local run output
|
||||||
|
ASALocalRun/
|
||||||
|
|
||||||
|
# MSBuild Binary and Structured Log
|
||||||
|
*.binlog
|
||||||
|
|
||||||
|
# NVidia Nsight GPU debugger configuration file
|
||||||
|
*.nvuser
|
||||||
|
|
||||||
|
# MFractors (Xamarin productivity tool) working folder
|
||||||
|
.mfractor/
|
||||||
|
|
||||||
|
# Local History for Visual Studio
|
||||||
|
.localhistory/
|
||||||
|
|
||||||
|
# BeatPulse healthcheck temp database
|
||||||
|
healthchecksdb
|
||||||
|
|
||||||
|
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||||
|
MigrationBackup/
|
||||||
|
|
||||||
|
# End of https://www.gitignore.io/api/visualstudio
|
14648
developer_tools/vpnserver-jsonrpc-clients/README.html
Normal file
14648
developer_tools/vpnserver-jsonrpc-clients/README.html
Normal file
File diff suppressed because it is too large
Load Diff
8735
developer_tools/vpnserver-jsonrpc-clients/README.md
Normal file
8735
developer_tools/vpnserver-jsonrpc-clients/README.md
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,282 @@
|
|||||||
|
// SoftEther VPN Server JSON-RPC Stub code for C#
|
||||||
|
//
|
||||||
|
// JsonRpc.cs - JSON-RPC Client Utility Functions
|
||||||
|
//
|
||||||
|
// Automatically generated at 2023-05-10 14:43:37 by vpnserver-jsonrpc-codegen
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License 2.0
|
||||||
|
// Copyright (c) 2014-2023 SoftEther VPN Project
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Net.Security;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using System.Security.Cryptography.X509Certificates;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace SoftEther.JsonRpc
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Internal utility class
|
||||||
|
/// </summary>
|
||||||
|
static class ClientUtil
|
||||||
|
{
|
||||||
|
public const int DefaultMaxDepth = 8;
|
||||||
|
|
||||||
|
public static string NonNull(this string s) { if (s == null) return ""; else return s; }
|
||||||
|
public static bool IsEmpty(this string str)
|
||||||
|
{
|
||||||
|
if (str == null || str.Trim().Length == 0)
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
public static bool IsFilled(this string str) => !IsEmpty(str);
|
||||||
|
|
||||||
|
public static string ObjectToJson(this object obj, bool include_null = false, bool escape_html = false, int? max_depth = ClientUtil.DefaultMaxDepth, bool compact = false, bool reference_handling = false) => ClientUtil.Serialize(obj, include_null, escape_html, max_depth, compact, reference_handling);
|
||||||
|
public static T JsonToObject<T>(this string str, bool include_null = false, int? max_depth = ClientUtil.DefaultMaxDepth) => ClientUtil.Deserialize<T>(str, include_null, max_depth);
|
||||||
|
public static object JsonToObject(this string str, Type type, bool include_null = false, int? max_depth = ClientUtil.DefaultMaxDepth) => ClientUtil.Deserialize(str, type, include_null, max_depth);
|
||||||
|
|
||||||
|
public static string Serialize(object obj, bool include_null = false, bool escape_html = false, int? max_depth = ClientUtil.DefaultMaxDepth, bool compact = false, bool reference_handling = false)
|
||||||
|
{
|
||||||
|
JsonSerializerSettings setting = new JsonSerializerSettings()
|
||||||
|
{
|
||||||
|
MaxDepth = max_depth,
|
||||||
|
NullValueHandling = include_null ? NullValueHandling.Include : NullValueHandling.Ignore,
|
||||||
|
ReferenceLoopHandling = ReferenceLoopHandling.Error,
|
||||||
|
PreserveReferencesHandling = reference_handling ? PreserveReferencesHandling.All : PreserveReferencesHandling.None,
|
||||||
|
StringEscapeHandling = escape_html ? StringEscapeHandling.EscapeHtml : StringEscapeHandling.Default,
|
||||||
|
};
|
||||||
|
return JsonConvert.SerializeObject(obj, compact ? Formatting.None : Formatting.Indented, setting);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static T Deserialize<T>(string str, bool include_null = false, int? max_depth = ClientUtil.DefaultMaxDepth)
|
||||||
|
=> (T)Deserialize(str, typeof(T), include_null, max_depth);
|
||||||
|
|
||||||
|
public static object Deserialize(string str, Type type, bool include_null = false, int? max_depth = ClientUtil.DefaultMaxDepth)
|
||||||
|
{
|
||||||
|
JsonSerializerSettings setting = new JsonSerializerSettings()
|
||||||
|
{
|
||||||
|
MaxDepth = max_depth,
|
||||||
|
NullValueHandling = include_null ? NullValueHandling.Include : NullValueHandling.Ignore,
|
||||||
|
ObjectCreationHandling = ObjectCreationHandling.Replace,
|
||||||
|
ReferenceLoopHandling = ReferenceLoopHandling.Error,
|
||||||
|
};
|
||||||
|
return JsonConvert.DeserializeObject(str, type, setting);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void Print(this object o)
|
||||||
|
{
|
||||||
|
string str = o.ObjectToJson();
|
||||||
|
|
||||||
|
if (o is string) str = (string)o;
|
||||||
|
|
||||||
|
Console.WriteLine(str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// JSON-RPC exception class
|
||||||
|
/// </summary>
|
||||||
|
class JsonRpcException : Exception
|
||||||
|
{
|
||||||
|
public JsonRpcError RpcError { get; }
|
||||||
|
public JsonRpcException(JsonRpcError err)
|
||||||
|
: base($"Code={err.Code}, Message={err.Message.NonNull()}" +
|
||||||
|
(err == null || err.Data == null ? "" : $", Data={err.Data.ObjectToJson(compact: true)}"))
|
||||||
|
{
|
||||||
|
this.RpcError = err;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// JSON-RPC request class. See https://www.jsonrpc.org/specification
|
||||||
|
/// </summary>
|
||||||
|
class JsonRpcRequest
|
||||||
|
{
|
||||||
|
[JsonProperty("jsonrpc", Order = 1)]
|
||||||
|
public string Version { get; set; } = "2.0";
|
||||||
|
|
||||||
|
[JsonProperty("id", Order = 2)]
|
||||||
|
public string Id { get; set; } = null;
|
||||||
|
|
||||||
|
[JsonProperty("method", Order = 3)]
|
||||||
|
public string Method { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("params", Order = 4)]
|
||||||
|
public object Params { get; set; } = null;
|
||||||
|
|
||||||
|
public JsonRpcRequest() { }
|
||||||
|
|
||||||
|
public JsonRpcRequest(string method, object param, string id)
|
||||||
|
{
|
||||||
|
this.Method = method;
|
||||||
|
this.Params = param;
|
||||||
|
this.Id = id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// JSON-RPC response class with generics
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="TResult"></typeparam>
|
||||||
|
class JsonRpcResponse<TResult>
|
||||||
|
{
|
||||||
|
[JsonProperty("jsonrpc", Order = 1)]
|
||||||
|
public virtual string Version { get; set; } = "2.0";
|
||||||
|
|
||||||
|
[JsonProperty("id", NullValueHandling = NullValueHandling.Include, Order = 2)]
|
||||||
|
public virtual string Id { get; set; } = null;
|
||||||
|
|
||||||
|
[JsonProperty("result", Order = 3)]
|
||||||
|
public virtual TResult Result { get; set; } = default(TResult);
|
||||||
|
|
||||||
|
[JsonProperty("error", Order = 4)]
|
||||||
|
public virtual JsonRpcError Error { get; set; } = null;
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public virtual bool IsError => this.Error != null;
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public virtual bool IsOk => !IsError;
|
||||||
|
|
||||||
|
public virtual void ThrowIfError()
|
||||||
|
{
|
||||||
|
if (this.IsError) throw new JsonRpcException(this.Error);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return this.ObjectToJson(compact: true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// JSON-RPC error class. See https://www.jsonrpc.org/specification
|
||||||
|
/// </summary>
|
||||||
|
class JsonRpcError
|
||||||
|
{
|
||||||
|
public JsonRpcError() { }
|
||||||
|
public JsonRpcError(int code, string message, object data = null)
|
||||||
|
{
|
||||||
|
this.Code = code;
|
||||||
|
this.Message = message.NonNull();
|
||||||
|
if (this.Message.IsEmpty()) this.Message = $"JSON-RPC Error {code}";
|
||||||
|
this.Data = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
[JsonProperty("code")]
|
||||||
|
public int Code { get; set; } = 0;
|
||||||
|
|
||||||
|
[JsonProperty("message")]
|
||||||
|
public string Message { get; set; } = null;
|
||||||
|
|
||||||
|
[JsonProperty("data")]
|
||||||
|
public object Data { get; set; } = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// JSON-RPC client. See https://www.jsonrpc.org/specification
|
||||||
|
/// </summary>
|
||||||
|
class JsonRpcClient
|
||||||
|
{
|
||||||
|
HttpClientHandler client_handler;
|
||||||
|
HttpClient client;
|
||||||
|
public const int DefaultTimeoutMsecs = 60 * 1000;
|
||||||
|
public int TimeoutMsecs { get => (int)client.Timeout.TotalMilliseconds; set => client.Timeout = new TimeSpan(0, 0, 0, 0, value); }
|
||||||
|
public Dictionary<string, string> HttpHeaders { get; } = new Dictionary<string, string>();
|
||||||
|
|
||||||
|
string base_url;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// JSON-RPC client class constructor
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="url">The URL</param>
|
||||||
|
/// <param name="cert_check_proc">The SSL certificate validation callback</param>
|
||||||
|
public JsonRpcClient(string url, Func<HttpRequestMessage, X509Certificate2, X509Chain, SslPolicyErrors, bool> cert_check_proc = null)
|
||||||
|
{
|
||||||
|
if (cert_check_proc == null) cert_check_proc = (message, cert, chain, errors) => true;
|
||||||
|
client_handler = new HttpClientHandler();
|
||||||
|
|
||||||
|
this.client_handler.AllowAutoRedirect = true;
|
||||||
|
this.client_handler.MaxAutomaticRedirections = 10;
|
||||||
|
|
||||||
|
client_handler.ServerCertificateCustomValidationCallback = cert_check_proc;
|
||||||
|
|
||||||
|
client = new HttpClient(client_handler, true);
|
||||||
|
//Console.WriteLine("new HttpClient(client_handler, true);");
|
||||||
|
|
||||||
|
this.base_url = url;
|
||||||
|
|
||||||
|
this.TimeoutMsecs = DefaultTimeoutMsecs;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Call a single RPC call (without error check). You can wait for the response with Task<string> or await statement.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="method_name">The name of RPC method</param>
|
||||||
|
/// <param name="param">The parameters</param>
|
||||||
|
public async Task<string> CallInternalAsync(string method_name, object param)
|
||||||
|
{
|
||||||
|
string id = DateTime.Now.Ticks.ToString();
|
||||||
|
|
||||||
|
JsonRpcRequest req = new JsonRpcRequest(method_name, param, id);
|
||||||
|
|
||||||
|
string req_string = req.ObjectToJson();
|
||||||
|
|
||||||
|
//Console.WriteLine($"req: {req_string}");
|
||||||
|
|
||||||
|
HttpContent content = new StringContent(req_string, Encoding.UTF8, "application/json");
|
||||||
|
|
||||||
|
foreach (string key in this.HttpHeaders.Keys)
|
||||||
|
{
|
||||||
|
string value = this.HttpHeaders[key];
|
||||||
|
|
||||||
|
content.Headers.Add(key, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
HttpResponseMessage response = await this.client.PostAsync(base_url, content);
|
||||||
|
|
||||||
|
Stream responseStream = await response.Content.ReadAsStreamAsync();
|
||||||
|
|
||||||
|
if (!response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
using (StreamReader streamReader = new StreamReader(responseStream))
|
||||||
|
{
|
||||||
|
throw new Exception($"Error: {response.StatusCode}: {await streamReader.ReadToEndAsync()}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
string ret_string;
|
||||||
|
|
||||||
|
using (StreamReader streamReader = new StreamReader(responseStream))
|
||||||
|
{
|
||||||
|
ret_string = await streamReader.ReadToEndAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Console.WriteLine($"ret: {ret_string}");
|
||||||
|
|
||||||
|
return ret_string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Call a single RPC call (with error check). You can wait for the response with Promise<TResult> or await statement. In the case of error, it will be thrown.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="method_name">The name of RPC method</param>
|
||||||
|
/// <param name="param">The parameters</param>
|
||||||
|
public async Task<TResult> CallAsync<TResult>(string method_name, object param)
|
||||||
|
{
|
||||||
|
string ret_string = await CallInternalAsync(method_name, param);
|
||||||
|
|
||||||
|
JsonRpcResponse <TResult> ret = ret_string.JsonToObject<JsonRpcResponse<TResult>>();
|
||||||
|
|
||||||
|
ret.ThrowIfError();
|
||||||
|
|
||||||
|
return ret.Result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,17 @@
|
|||||||
|
// SoftEther VPN Server JSON-RPC Stub code for C#
|
||||||
|
//
|
||||||
|
// Program.cs - The Main() entry point
|
||||||
|
//
|
||||||
|
// Automatically generated at 2023-05-10 14:43:37 by vpnserver-jsonrpc-codegen
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License 2.0
|
||||||
|
// Copyright (c) 2014-2023 SoftEther VPN Project
|
||||||
|
|
||||||
|
class Program
|
||||||
|
{
|
||||||
|
static void Main(string[] args)
|
||||||
|
{
|
||||||
|
VPNRPCTest test = new VPNRPCTest();
|
||||||
|
test.Test_All();
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,14 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||||
|
<RootNamespace>SoftEther.VPNServerRpc</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="2.10.0" />
|
||||||
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 15
|
||||||
|
VisualStudioVersion = 15.0.28010.2041
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "vpnserver-jsonrpc-client-csharp", "vpnserver-jsonrpc-client-csharp.csproj", "{81CA3EC4-026E-4D37-9889-828186BBB8C0}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{81CA3EC4-026E-4D37-9889-828186BBB8C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{81CA3EC4-026E-4D37-9889-828186BBB8C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{81CA3EC4-026E-4D37-9889-828186BBB8C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{81CA3EC4-026E-4D37-9889-828186BBB8C0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {D87E5CF1-9A10-431C-AC42-F1041470AEE8}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
88
developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/.gitignore
vendored
Normal file
88
developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/.gitignore
vendored
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
|
||||||
|
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||||
|
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||||
|
|
||||||
|
# Runtime data
|
||||||
|
pids
|
||||||
|
*.pid
|
||||||
|
*.seed
|
||||||
|
*.pid.lock
|
||||||
|
|
||||||
|
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||||
|
lib-cov
|
||||||
|
|
||||||
|
# Coverage directory used by tools like istanbul
|
||||||
|
coverage
|
||||||
|
*.lcov
|
||||||
|
|
||||||
|
# nyc test coverage
|
||||||
|
.nyc_output
|
||||||
|
|
||||||
|
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||||
|
.grunt
|
||||||
|
|
||||||
|
# Bower dependency directory (https://bower.io/)
|
||||||
|
bower_components
|
||||||
|
|
||||||
|
# node-waf configuration
|
||||||
|
.lock-wscript
|
||||||
|
|
||||||
|
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||||
|
build/Release
|
||||||
|
|
||||||
|
# Dependency directories
|
||||||
|
node_modules/
|
||||||
|
jspm_packages/
|
||||||
|
|
||||||
|
# TypeScript v1 declaration files
|
||||||
|
typings/
|
||||||
|
|
||||||
|
# TypeScript cache
|
||||||
|
*.tsbuildinfo
|
||||||
|
|
||||||
|
# Optional npm cache directory
|
||||||
|
.npm
|
||||||
|
|
||||||
|
# Optional eslint cache
|
||||||
|
.eslintcache
|
||||||
|
|
||||||
|
# Optional REPL history
|
||||||
|
.node_repl_history
|
||||||
|
|
||||||
|
# Output of 'npm pack'
|
||||||
|
*.tgz
|
||||||
|
|
||||||
|
# Yarn Integrity file
|
||||||
|
.yarn-integrity
|
||||||
|
|
||||||
|
# dotenv environment variables file
|
||||||
|
.env
|
||||||
|
.env.test
|
||||||
|
|
||||||
|
# parcel-bundler cache (https://parceljs.org/)
|
||||||
|
.cache
|
||||||
|
|
||||||
|
# next.js build output
|
||||||
|
.next
|
||||||
|
|
||||||
|
# nuxt.js build output
|
||||||
|
.nuxt
|
||||||
|
|
||||||
|
# vuepress build output
|
||||||
|
.vuepress/dist
|
||||||
|
|
||||||
|
# Serverless directories
|
||||||
|
.serverless/
|
||||||
|
|
||||||
|
# FuseBox cache
|
||||||
|
.fusebox/
|
||||||
|
|
||||||
|
# DynamoDB Local files
|
||||||
|
.dynamodb/
|
@ -0,0 +1,201 @@
|
|||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
@ -0,0 +1,5 @@
|
|||||||
|
npm install
|
||||||
|
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
npm publish
|
@ -0,0 +1,2 @@
|
|||||||
|
export {};
|
||||||
|
//# sourceMappingURL=sample.d.ts.map
|
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"sample.d.ts","sourceRoot":"","sources":["../src/sample.ts"],"names":[],"mappings":""}
|
4146
developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/sample.js
vendored
Normal file
4146
developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/sample.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2721
developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/vpnrpc.d.ts
vendored
Normal file
2721
developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/vpnrpc.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
3825
developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/vpnrpc.js
vendored
Normal file
3825
developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/dist/vpnrpc.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
479
developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/package-lock.json
generated
Normal file
479
developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/package-lock.json
generated
Normal file
@ -0,0 +1,479 @@
|
|||||||
|
{
|
||||||
|
"name": "vpnrpc",
|
||||||
|
"version": "1.0.1",
|
||||||
|
"lockfileVersion": 1,
|
||||||
|
"requires": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/code-frame": {
|
||||||
|
"version": "7.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz",
|
||||||
|
"integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@babel/highlight": "^7.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@babel/highlight": {
|
||||||
|
"version": "7.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz",
|
||||||
|
"integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"chalk": "^2.0.0",
|
||||||
|
"esutils": "^2.0.2",
|
||||||
|
"js-tokens": "^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@types/node": {
|
||||||
|
"version": "12.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.2.tgz",
|
||||||
|
"integrity": "sha512-5tabW/i+9mhrfEOUcLDu2xBPsHJ+X5Orqy9FKpale3SjDA17j5AEpYq5vfy3oAeAHGcvANRCO3NV3d2D6q3NiA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"ansi-styles": {
|
||||||
|
"version": "3.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
|
||||||
|
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"color-convert": "^1.9.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"argparse": {
|
||||||
|
"version": "1.0.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
|
||||||
|
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"sprintf-js": "~1.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"balanced-match": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"brace-expansion": {
|
||||||
|
"version": "1.1.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||||
|
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"balanced-match": "^1.0.0",
|
||||||
|
"concat-map": "0.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"braces": {
|
||||||
|
"version": "3.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
|
||||||
|
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"fill-range": "^7.1.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"fill-range": {
|
||||||
|
"version": "7.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
|
||||||
|
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"to-regex-range": "^5.0.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"builtin-modules": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
|
||||||
|
"integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"chalk": {
|
||||||
|
"version": "2.4.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
|
||||||
|
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ansi-styles": "^3.2.1",
|
||||||
|
"escape-string-regexp": "^1.0.5",
|
||||||
|
"supports-color": "^5.3.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"color-convert": {
|
||||||
|
"version": "1.9.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
|
||||||
|
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"color-name": "1.1.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"color-name": {
|
||||||
|
"version": "1.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
|
||||||
|
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"commander": {
|
||||||
|
"version": "2.20.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz",
|
||||||
|
"integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"concat-map": {
|
||||||
|
"version": "0.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||||
|
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"diff": {
|
||||||
|
"version": "3.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
|
||||||
|
"integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"enhanced-resolve": {
|
||||||
|
"version": "5.12.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz",
|
||||||
|
"integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"graceful-fs": "^4.2.4",
|
||||||
|
"tapable": "^2.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"escape-string-regexp": {
|
||||||
|
"version": "1.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
||||||
|
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"esprima": {
|
||||||
|
"version": "4.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
|
||||||
|
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"esutils": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
|
||||||
|
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"fs.realpath": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"glob": {
|
||||||
|
"version": "7.1.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz",
|
||||||
|
"integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"fs.realpath": "^1.0.0",
|
||||||
|
"inflight": "^1.0.4",
|
||||||
|
"inherits": "2",
|
||||||
|
"minimatch": "^3.0.4",
|
||||||
|
"once": "^1.3.0",
|
||||||
|
"path-is-absolute": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"graceful-fs": {
|
||||||
|
"version": "4.2.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
|
||||||
|
"integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"has-flag": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
||||||
|
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"inflight": {
|
||||||
|
"version": "1.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||||
|
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"once": "^1.3.0",
|
||||||
|
"wrappy": "1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"inherits": {
|
||||||
|
"version": "2.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
||||||
|
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"is-number": {
|
||||||
|
"version": "7.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
||||||
|
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"js-tokens": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"js-yaml": {
|
||||||
|
"version": "3.13.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
|
||||||
|
"integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"argparse": "^1.0.7",
|
||||||
|
"esprima": "^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lru-cache": {
|
||||||
|
"version": "6.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
||||||
|
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"yallist": "^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"micromatch": {
|
||||||
|
"version": "4.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
|
||||||
|
"integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"braces": "^3.0.2",
|
||||||
|
"picomatch": "^2.3.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"minimatch": {
|
||||||
|
"version": "3.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||||
|
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"brace-expansion": "^1.1.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"minimist": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"mkdirp": {
|
||||||
|
"version": "0.5.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
|
||||||
|
"integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"minimist": "^1.2.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"once": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||||
|
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"wrappy": "1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"path-is-absolute": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||||
|
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"path-parse": {
|
||||||
|
"version": "1.0.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
|
||||||
|
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"picomatch": {
|
||||||
|
"version": "2.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
|
||||||
|
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"resolve": {
|
||||||
|
"version": "1.11.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz",
|
||||||
|
"integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"path-parse": "^1.0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"semver": {
|
||||||
|
"version": "7.3.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
|
||||||
|
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"lru-cache": "^6.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sprintf-js": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
|
||||||
|
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"supports-color": {
|
||||||
|
"version": "5.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
||||||
|
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"has-flag": "^3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tapable": {
|
||||||
|
"version": "2.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz",
|
||||||
|
"integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"to-regex-range": {
|
||||||
|
"version": "5.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||||
|
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"is-number": "^7.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ts-loader": {
|
||||||
|
"version": "9.4.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.4.2.tgz",
|
||||||
|
"integrity": "sha512-OmlC4WVmFv5I0PpaxYb+qGeGOdm5giHU7HwDDUjw59emP2UYMHy9fFSDcYgSNoH8sXcj4hGCSEhlDZ9ULeDraA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"chalk": "^4.1.0",
|
||||||
|
"enhanced-resolve": "^5.0.0",
|
||||||
|
"micromatch": "^4.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": {
|
||||||
|
"version": "1.9.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
|
||||||
|
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"tslint": {
|
||||||
|
"version": "5.16.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.16.0.tgz",
|
||||||
|
"integrity": "sha512-UxG2yNxJ5pgGwmMzPMYh/CCnCnh0HfPgtlVRDs1ykZklufFBL1ZoTlWFRz2NQjcoEiDoRp+JyT0lhBbbH/obyA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@babel/code-frame": "^7.0.0",
|
||||||
|
"builtin-modules": "^1.1.1",
|
||||||
|
"chalk": "^2.3.0",
|
||||||
|
"commander": "^2.12.1",
|
||||||
|
"diff": "^3.2.0",
|
||||||
|
"glob": "^7.1.1",
|
||||||
|
"js-yaml": "^3.13.0",
|
||||||
|
"minimatch": "^3.0.4",
|
||||||
|
"mkdirp": "^0.5.1",
|
||||||
|
"resolve": "^1.3.2",
|
||||||
|
"semver": "^5.3.0",
|
||||||
|
"tslib": "^1.8.0",
|
||||||
|
"tsutils": "^2.29.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"semver": {
|
||||||
|
"version": "5.7.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
|
||||||
|
"integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tsutils": {
|
||||||
|
"version": "2.29.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz",
|
||||||
|
"integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"tslib": "^1.8.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"typescript": {
|
||||||
|
"version": "3.4.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.5.tgz",
|
||||||
|
"integrity": "sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"wrappy": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||||
|
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
|
||||||
|
"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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"name": "vpnrpc",
|
||||||
|
"version": "1.0.1",
|
||||||
|
"description": "",
|
||||||
|
"main": "dist/vpnrpc.js",
|
||||||
|
"scripts": {
|
||||||
|
"prepare": "tsc",
|
||||||
|
"build": "tsc"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/SoftEtherVPN/SoftEtherVPN.git"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"vpn",
|
||||||
|
"softether"
|
||||||
|
],
|
||||||
|
"author": "",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/SoftEtherVPN/SoftEtherVPN/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/#readme",
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/node": "^12.0.2",
|
||||||
|
"ts-loader": "^9.4.2",
|
||||||
|
"tslint": "^5.16.0",
|
||||||
|
"typescript": "^3.4.5"
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,72 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
/* Basic Options */
|
||||||
|
"target": "ES3", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
|
||||||
|
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
|
||||||
|
"lib": [
|
||||||
|
"dom",
|
||||||
|
"es2015.promise",
|
||||||
|
"es5"
|
||||||
|
], // "lib": [], /* Specify library files to be included in the compilation. */
|
||||||
|
// "allowJs": true, /* Allow javascript files to be compiled. */
|
||||||
|
// "checkJs": true, /* Report errors in .js files. */
|
||||||
|
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
|
||||||
|
"declaration": true, /* Generates corresponding '.d.ts' file. */
|
||||||
|
"declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
|
||||||
|
"sourceMap": true, /* Generates corresponding '.map' file. */
|
||||||
|
// "outFile": "./", /* Concatenate and emit output to single file. */
|
||||||
|
"outDir": "./dist/", /* Redirect output structure to the directory. */
|
||||||
|
"rootDir": "./src/", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
||||||
|
// "composite": true, /* Enable project compilation */
|
||||||
|
// "incremental": true, /* Enable incremental compilation */
|
||||||
|
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
|
||||||
|
// "removeComments": true, /* Do not emit comments to output. */
|
||||||
|
// "noEmit": true, /* Do not emit outputs. */
|
||||||
|
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
|
||||||
|
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
|
||||||
|
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
|
||||||
|
|
||||||
|
/* Strict Type-Checking Options */
|
||||||
|
"strict": true, /* Enable all strict type-checking options. */
|
||||||
|
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
||||||
|
// "strictNullChecks": true, /* Enable strict null checks. */
|
||||||
|
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
||||||
|
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
|
||||||
|
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
||||||
|
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
|
||||||
|
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
||||||
|
|
||||||
|
/* Additional Checks */
|
||||||
|
// "noUnusedLocals": true, /* Report errors on unused locals. */
|
||||||
|
// "noUnusedParameters": true, /* Report errors on unused parameters. */
|
||||||
|
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
||||||
|
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||||
|
|
||||||
|
/* Module Resolution Options */
|
||||||
|
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
||||||
|
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
|
||||||
|
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
||||||
|
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
||||||
|
// "typeRoots": [], /* List of folders to include type definitions from. */
|
||||||
|
// "types": [], /* Type declaration files to be included in compilation. */
|
||||||
|
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
|
||||||
|
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
||||||
|
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
||||||
|
|
||||||
|
/* Source Map Options */
|
||||||
|
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
|
||||||
|
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
||||||
|
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
|
||||||
|
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
|
||||||
|
|
||||||
|
/* Experimental Options */
|
||||||
|
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
|
||||||
|
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"src/**/*"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"node_modules"
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"defaultSeverity": "warn",
|
||||||
|
"extends": [
|
||||||
|
"tslint:recommended"
|
||||||
|
],
|
||||||
|
"jsRules": {},
|
||||||
|
"rules": {
|
||||||
|
"comment-format": false,
|
||||||
|
"no-consecutive-blank-lines": false,
|
||||||
|
"no-trailing-whitespace": false,
|
||||||
|
"no-console": false,
|
||||||
|
"prefer-const": false,
|
||||||
|
"one-line": false,
|
||||||
|
"only-arrow-functions": false,
|
||||||
|
"space-before-function-paren": false,
|
||||||
|
"trailing-comma": false,
|
||||||
|
"no-empty": false,
|
||||||
|
},
|
||||||
|
"rulesDirectory": []
|
||||||
|
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
350
developer_tools/vpnserver-jsonrpc-codegen/.gitignore
vendored
Normal file
350
developer_tools/vpnserver-jsonrpc-codegen/.gitignore
vendored
Normal file
@ -0,0 +1,350 @@
|
|||||||
|
# Created by https://www.gitignore.io/api/visualstudio
|
||||||
|
# Edit at https://www.gitignore.io/?templates=visualstudio
|
||||||
|
|
||||||
|
### VisualStudio ###
|
||||||
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
|
## files generated by popular Visual Studio add-ons.
|
||||||
|
##
|
||||||
|
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||||
|
|
||||||
|
# User-specific files
|
||||||
|
*.rsuser
|
||||||
|
*.suo
|
||||||
|
*.user
|
||||||
|
*.userosscache
|
||||||
|
*.sln.docstates
|
||||||
|
|
||||||
|
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||||
|
*.userprefs
|
||||||
|
|
||||||
|
# Mono auto generated files
|
||||||
|
mono_crash.*
|
||||||
|
|
||||||
|
# Build results
|
||||||
|
[Dd]ebug/
|
||||||
|
[Dd]ebugPublic/
|
||||||
|
[Rr]elease/
|
||||||
|
[Rr]eleases/
|
||||||
|
x64/
|
||||||
|
x86/
|
||||||
|
[Aa][Rr][Mm]/
|
||||||
|
[Aa][Rr][Mm]64/
|
||||||
|
bld/
|
||||||
|
[Bb]in/
|
||||||
|
[Oo]bj/
|
||||||
|
[Ll]og/
|
||||||
|
|
||||||
|
# Visual Studio 2015/2017 cache/options directory
|
||||||
|
.vs/
|
||||||
|
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||||
|
#wwwroot/
|
||||||
|
|
||||||
|
# Visual Studio 2017 auto generated files
|
||||||
|
Generated\ Files/
|
||||||
|
|
||||||
|
# MSTest test Results
|
||||||
|
[Tt]est[Rr]esult*/
|
||||||
|
[Bb]uild[Ll]og.*
|
||||||
|
|
||||||
|
# NUNIT
|
||||||
|
*.VisualState.xml
|
||||||
|
TestResult.xml
|
||||||
|
|
||||||
|
# Build Results of an ATL Project
|
||||||
|
[Dd]ebugPS/
|
||||||
|
[Rr]eleasePS/
|
||||||
|
dlldata.c
|
||||||
|
|
||||||
|
# Benchmark Results
|
||||||
|
BenchmarkDotNet.Artifacts/
|
||||||
|
|
||||||
|
# .NET Core
|
||||||
|
project.lock.json
|
||||||
|
project.fragment.lock.json
|
||||||
|
artifacts/
|
||||||
|
|
||||||
|
# StyleCop
|
||||||
|
StyleCopReport.xml
|
||||||
|
|
||||||
|
# Files built by Visual Studio
|
||||||
|
*_i.c
|
||||||
|
*_p.c
|
||||||
|
*_h.h
|
||||||
|
*.ilk
|
||||||
|
*.meta
|
||||||
|
*.obj
|
||||||
|
*.iobj
|
||||||
|
*.pch
|
||||||
|
*.pdb
|
||||||
|
*.ipdb
|
||||||
|
*.pgc
|
||||||
|
*.pgd
|
||||||
|
*.rsp
|
||||||
|
*.sbr
|
||||||
|
*.tlb
|
||||||
|
*.tli
|
||||||
|
*.tlh
|
||||||
|
*.tmp
|
||||||
|
*.tmp_proj
|
||||||
|
*_wpftmp.csproj
|
||||||
|
*.log
|
||||||
|
*.vspscc
|
||||||
|
*.vssscc
|
||||||
|
.builds
|
||||||
|
*.pidb
|
||||||
|
*.svclog
|
||||||
|
*.scc
|
||||||
|
|
||||||
|
# Chutzpah Test files
|
||||||
|
_Chutzpah*
|
||||||
|
|
||||||
|
# Visual C++ cache files
|
||||||
|
ipch/
|
||||||
|
*.aps
|
||||||
|
*.ncb
|
||||||
|
*.opendb
|
||||||
|
*.opensdf
|
||||||
|
*.sdf
|
||||||
|
*.cachefile
|
||||||
|
*.VC.db
|
||||||
|
*.VC.VC.opendb
|
||||||
|
|
||||||
|
# Visual Studio profiler
|
||||||
|
*.psess
|
||||||
|
*.vsp
|
||||||
|
*.vspx
|
||||||
|
*.sap
|
||||||
|
|
||||||
|
# Visual Studio Trace Files
|
||||||
|
*.e2e
|
||||||
|
|
||||||
|
# TFS 2012 Local Workspace
|
||||||
|
$tf/
|
||||||
|
|
||||||
|
# Guidance Automation Toolkit
|
||||||
|
*.gpState
|
||||||
|
|
||||||
|
# ReSharper is a .NET coding add-in
|
||||||
|
_ReSharper*/
|
||||||
|
*.[Rr]e[Ss]harper
|
||||||
|
*.DotSettings.user
|
||||||
|
|
||||||
|
# JustCode is a .NET coding add-in
|
||||||
|
.JustCode
|
||||||
|
|
||||||
|
# TeamCity is a build add-in
|
||||||
|
_TeamCity*
|
||||||
|
|
||||||
|
# DotCover is a Code Coverage Tool
|
||||||
|
*.dotCover
|
||||||
|
|
||||||
|
# AxoCover is a Code Coverage Tool
|
||||||
|
.axoCover/*
|
||||||
|
!.axoCover/settings.json
|
||||||
|
|
||||||
|
# Visual Studio code coverage results
|
||||||
|
*.coverage
|
||||||
|
*.coveragexml
|
||||||
|
|
||||||
|
# NCrunch
|
||||||
|
_NCrunch_*
|
||||||
|
.*crunch*.local.xml
|
||||||
|
nCrunchTemp_*
|
||||||
|
|
||||||
|
# MightyMoose
|
||||||
|
*.mm.*
|
||||||
|
AutoTest.Net/
|
||||||
|
|
||||||
|
# Web workbench (sass)
|
||||||
|
.sass-cache/
|
||||||
|
|
||||||
|
# Installshield output folder
|
||||||
|
[Ee]xpress/
|
||||||
|
|
||||||
|
# DocProject is a documentation generator add-in
|
||||||
|
DocProject/buildhelp/
|
||||||
|
DocProject/Help/*.HxT
|
||||||
|
DocProject/Help/*.HxC
|
||||||
|
DocProject/Help/*.hhc
|
||||||
|
DocProject/Help/*.hhk
|
||||||
|
DocProject/Help/*.hhp
|
||||||
|
DocProject/Help/Html2
|
||||||
|
DocProject/Help/html
|
||||||
|
|
||||||
|
# Click-Once directory
|
||||||
|
publish/
|
||||||
|
|
||||||
|
# Publish Web Output
|
||||||
|
*.[Pp]ublish.xml
|
||||||
|
*.azurePubxml
|
||||||
|
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||||
|
# but database connection strings (with potential passwords) will be unencrypted
|
||||||
|
*.pubxml
|
||||||
|
*.publishproj
|
||||||
|
|
||||||
|
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||||
|
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||||
|
# in these scripts will be unencrypted
|
||||||
|
PublishScripts/
|
||||||
|
|
||||||
|
# NuGet Packages
|
||||||
|
*.nupkg
|
||||||
|
# The packages folder can be ignored because of Package Restore
|
||||||
|
**/[Pp]ackages/*
|
||||||
|
# except build/, which is used as an MSBuild target.
|
||||||
|
!**/[Pp]ackages/build/
|
||||||
|
# Uncomment if necessary however generally it will be regenerated when needed
|
||||||
|
#!**/[Pp]ackages/repositories.config
|
||||||
|
# NuGet v3's project.json files produces more ignorable files
|
||||||
|
*.nuget.props
|
||||||
|
*.nuget.targets
|
||||||
|
|
||||||
|
# Microsoft Azure Build Output
|
||||||
|
csx/
|
||||||
|
*.build.csdef
|
||||||
|
|
||||||
|
# Microsoft Azure Emulator
|
||||||
|
ecf/
|
||||||
|
rcf/
|
||||||
|
|
||||||
|
# Windows Store app package directories and files
|
||||||
|
AppPackages/
|
||||||
|
BundleArtifacts/
|
||||||
|
Package.StoreAssociation.xml
|
||||||
|
_pkginfo.txt
|
||||||
|
*.appx
|
||||||
|
*.appxbundle
|
||||||
|
*.appxupload
|
||||||
|
|
||||||
|
# Visual Studio cache files
|
||||||
|
# files ending in .cache can be ignored
|
||||||
|
*.[Cc]ache
|
||||||
|
# but keep track of directories ending in .cache
|
||||||
|
!?*.[Cc]ache/
|
||||||
|
|
||||||
|
# Others
|
||||||
|
ClientBin/
|
||||||
|
~$*
|
||||||
|
*~
|
||||||
|
*.dbmdl
|
||||||
|
*.dbproj.schemaview
|
||||||
|
*.jfm
|
||||||
|
*.pfx
|
||||||
|
*.publishsettings
|
||||||
|
orleans.codegen.cs
|
||||||
|
|
||||||
|
# Including strong name files can present a security risk
|
||||||
|
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||||
|
#*.snk
|
||||||
|
|
||||||
|
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||||
|
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||||
|
#bower_components/
|
||||||
|
|
||||||
|
# RIA/Silverlight projects
|
||||||
|
Generated_Code/
|
||||||
|
|
||||||
|
# Backup & report files from converting an old project file
|
||||||
|
# to a newer Visual Studio version. Backup files are not needed,
|
||||||
|
# because we have git ;-)
|
||||||
|
_UpgradeReport_Files/
|
||||||
|
Backup*/
|
||||||
|
UpgradeLog*.XML
|
||||||
|
UpgradeLog*.htm
|
||||||
|
ServiceFabricBackup/
|
||||||
|
*.rptproj.bak
|
||||||
|
|
||||||
|
# SQL Server files
|
||||||
|
*.mdf
|
||||||
|
*.ldf
|
||||||
|
*.ndf
|
||||||
|
|
||||||
|
# Business Intelligence projects
|
||||||
|
*.rdl.data
|
||||||
|
*.bim.layout
|
||||||
|
*.bim_*.settings
|
||||||
|
*.rptproj.rsuser
|
||||||
|
*- Backup*.rdl
|
||||||
|
|
||||||
|
# Microsoft Fakes
|
||||||
|
FakesAssemblies/
|
||||||
|
|
||||||
|
# GhostDoc plugin setting file
|
||||||
|
*.GhostDoc.xml
|
||||||
|
|
||||||
|
# Node.js Tools for Visual Studio
|
||||||
|
.ntvs_analysis.dat
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# Visual Studio 6 build log
|
||||||
|
*.plg
|
||||||
|
|
||||||
|
# Visual Studio 6 workspace options file
|
||||||
|
*.opt
|
||||||
|
|
||||||
|
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||||
|
*.vbw
|
||||||
|
|
||||||
|
# Visual Studio LightSwitch build output
|
||||||
|
**/*.HTMLClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/ModelManifest.xml
|
||||||
|
**/*.Server/GeneratedArtifacts
|
||||||
|
**/*.Server/ModelManifest.xml
|
||||||
|
_Pvt_Extensions
|
||||||
|
|
||||||
|
# Paket dependency manager
|
||||||
|
.paket/paket.exe
|
||||||
|
paket-files/
|
||||||
|
|
||||||
|
# FAKE - F# Make
|
||||||
|
.fake/
|
||||||
|
|
||||||
|
# CodeRush personal settings
|
||||||
|
.cr/personal
|
||||||
|
|
||||||
|
# Python Tools for Visual Studio (PTVS)
|
||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
|
||||||
|
# Cake - Uncomment if you are using it
|
||||||
|
# tools/**
|
||||||
|
# !tools/packages.config
|
||||||
|
|
||||||
|
# Tabs Studio
|
||||||
|
*.tss
|
||||||
|
|
||||||
|
# Telerik's JustMock configuration file
|
||||||
|
*.jmconfig
|
||||||
|
|
||||||
|
# BizTalk build output
|
||||||
|
*.btp.cs
|
||||||
|
*.btm.cs
|
||||||
|
*.odx.cs
|
||||||
|
*.xsd.cs
|
||||||
|
|
||||||
|
# OpenCover UI analysis results
|
||||||
|
OpenCover/
|
||||||
|
|
||||||
|
# Azure Stream Analytics local run output
|
||||||
|
ASALocalRun/
|
||||||
|
|
||||||
|
# MSBuild Binary and Structured Log
|
||||||
|
*.binlog
|
||||||
|
|
||||||
|
# NVidia Nsight GPU debugger configuration file
|
||||||
|
*.nvuser
|
||||||
|
|
||||||
|
# MFractors (Xamarin productivity tool) working folder
|
||||||
|
.mfractor/
|
||||||
|
|
||||||
|
# Local History for Visual Studio
|
||||||
|
.localhistory/
|
||||||
|
|
||||||
|
# BeatPulse healthcheck temp database
|
||||||
|
healthchecksdb
|
||||||
|
|
||||||
|
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||||
|
MigrationBackup/
|
||||||
|
|
||||||
|
# End of https://www.gitignore.io/api/visualstudio
|
2067
developer_tools/vpnserver-jsonrpc-codegen/CodeGen/CodeGen.cs
Normal file
2067
developer_tools/vpnserver-jsonrpc-codegen/CodeGen/CodeGen.cs
Normal file
File diff suppressed because it is too large
Load Diff
37
developer_tools/vpnserver-jsonrpc-codegen/Program.cs
Normal file
37
developer_tools/vpnserver-jsonrpc-codegen/Program.cs
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using SoftEther.VPNServerRpc;
|
||||||
|
using System.Text;
|
||||||
|
using SoftEther.JsonRpc;
|
||||||
|
|
||||||
|
|
||||||
|
namespace VPNServer_JSONRPC_CodeGen
|
||||||
|
{
|
||||||
|
class Program
|
||||||
|
{
|
||||||
|
static void Main(string[] args)
|
||||||
|
{
|
||||||
|
string output_dir = CodeGenUtil.OutputDir_Clients;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(output_dir);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
CodeGen g = new CodeGen();
|
||||||
|
|
||||||
|
g.GenerateAndSaveCodes(output_dir);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
|||||||
|
// SoftEther VPN Server JSON-RPC Stub code for C#
|
||||||
|
//
|
||||||
|
// Program.cs - The Main() entry point
|
||||||
|
//
|
||||||
|
// Automatically generated at __TIMESTAMP__ by vpnserver-jsonrpc-codegen
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License 2.0
|
||||||
|
// Copyright (c) 2014-__YEAR__ SoftEther VPN Project
|
||||||
|
|
||||||
|
class Program
|
||||||
|
{
|
||||||
|
static void Main(string[] args)
|
||||||
|
{
|
||||||
|
VPNRPCTest test = new VPNRPCTest();
|
||||||
|
test.Test_All();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||||
|
<RootNamespace>SoftEther.VPNServerRpc</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="2.10.0" />
|
||||||
|
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 15
|
||||||
|
VisualStudioVersion = 15.0.28010.2041
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "vpnserver-jsonrpc-client-csharp", "vpnserver-jsonrpc-client-csharp.csproj", "{81CA3EC4-026E-4D37-9889-828186BBB8C0}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{81CA3EC4-026E-4D37-9889-828186BBB8C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{81CA3EC4-026E-4D37-9889-828186BBB8C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{81CA3EC4-026E-4D37-9889-828186BBB8C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{81CA3EC4-026E-4D37-9889-828186BBB8C0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {D87E5CF1-9A10-431C-AC42-F1041470AEE8}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
77
developer_tools/vpnserver-jsonrpc-codegen/Templates/doc.txt
Normal file
77
developer_tools/vpnserver-jsonrpc-codegen/Templates/doc.txt
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
# SoftEther VPN Server JSON-RPC API Suite Document
|
||||||
|
This reference describes all JSON-RPC functions available on SoftEther VPN Server.
|
||||||
|
|
||||||
|
|
||||||
|
You can access to the latest [SoftEther VPN Server JSON-RPC Document on GitHub](https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/).
|
||||||
|
|
||||||
|
|
||||||
|
## What is SoftEther VPN Server JSON-RPC API Suite?
|
||||||
|
The API Suite allows you to easily develop your original SoftEther VPN Server management application to control the VPN Server (e.g. creating users, adding Virtual Hubs, disconnecting a specified VPN sessions).
|
||||||
|
|
||||||
|
- Almost all control APIs, which the VPN Server provides, are available as JSON-RPC API.
|
||||||
|
- You can write your own VPN Server management application in your favorite languages (JavaScript, TypeScript, Java, Python, Ruby, C#, ... etc.)
|
||||||
|
- If you are planning to develop your own VPN cloud service, the JSON-RPC API is the best choice to realize the automated operations for the VPN Server.
|
||||||
|
- No need to use any specific API client library since all APIs are provided on the [JSON-RPC 2.0 Specification](https://www.jsonrpc.org/specification). You can use your favorite JSON and HTTPS client library to call any of all APIs in your pure runtime environment.
|
||||||
|
- Also, the SoftEther VPN Project provides high-quality JSON-RPC client stub libraries which define all of the API client stub codes. These libraries are written in C#, JavaScript and TypeScript. [The Node.js Client Library for VPN Server RPC (vpnrpc)](https://www.npmjs.com/package/vpnrpc) package is also available.
|
||||||
|
|
||||||
|
|
||||||
|
## Principle
|
||||||
|
|
||||||
|
### Entry point
|
||||||
|
The entry point URL of JSON-RPC is:
|
||||||
|
```
|
||||||
|
https://<vpn_server_hostname>:<port>/api/
|
||||||
|
```
|
||||||
|
|
||||||
|
- Older versions of SoftEther VPN before June 2019 don't support JSON-RPC APIs.
|
||||||
|
- If you want to completely disable the JSON-RPC on your VPN Server, set the `DisableJsonRpcWebApi` variable to `true` on the `vpn_server.config`.
|
||||||
|
|
||||||
|
|
||||||
|
### JSON-RPC specification
|
||||||
|
You must use HTTPS 1.1 `POST` method to call each of JSON-RPC APIs.
|
||||||
|
All APIs are based on the [JSON-RPC 2.0 Specification](https://www.jsonrpc.org/specification).
|
||||||
|
- JSON-RPC Notification is not supported.
|
||||||
|
- JSON-RPC Batch is not supported.
|
||||||
|
|
||||||
|
|
||||||
|
### "vpnrpc": Node.js Client Library package for VPN Server JSON-RPC
|
||||||
|
If you are willing to develop your original JSON-RPC client for SoftEther VPN, you can use the [JavaScript Client Library for VPN Server RPC (vpnrpc)](https://www.npmjs.com/package/vpnrpc).
|
||||||
|
|
||||||
|
- You can use the `vpnrpc` library in JavaScript for both web browsers (e.g. Chrome, FireFox or Edge) and Node.js.
|
||||||
|
- As a sample code there is the [sample.ts](https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-typescript/sample.ts) program in TypeScript. This sample calls all of available JSON-RPC APIs against the specified SoftEther VPN Server. (Note: This sample code is written in TypeScript.)
|
||||||
|
|
||||||
|
You can use the following command to download the `vpnrpc` library package with Node.js.
|
||||||
|
```
|
||||||
|
$ npm install --save-dev vpnrpc
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### "vpnrpc.ts": TypeScript Client Library for VPN Server JSON-RPC
|
||||||
|
If you are willing to develop your original JSON-RPC client for SoftEther VPN, you can use the [TypeScript Client Library for VPN Server RPC (vpnrpc.ts)](https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-typescript/).
|
||||||
|
|
||||||
|
- You can use the [vpnrpc.ts](https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-typescript/vpnrpc.ts) library in TypeScript / JavaScript for both web browsers (e.g. Chrome, FireFox or Edge) and Node.js.
|
||||||
|
- As a sample code there is the [sample.ts](https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-typescript/sample.ts) program in TypeScript. This sample calls one by one all of available JSON-RPC APIs against the specified SoftEther VPN Server.
|
||||||
|
|
||||||
|
|
||||||
|
### "vpnserver-jsonrpc-client-csharp": C# Client Library for VPN Server JSON-RPC
|
||||||
|
If you are willing to develop your original JSON-RPC client for SoftEther VPN, you can use the [vpnserver-jsonrpc-client-csharp C# library](https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/).
|
||||||
|
|
||||||
|
- The [client library codes for C#](https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/rpc-stubs/) is written in pure C# 7.3. It works on .NET Core 2.1 or later on Windows, Linux and macOS. Very comfort with Visual Studio for both Windows or macOS.
|
||||||
|
- As a sample code there is the [VpnServerRpcTest.cs](https://github.com/SoftEtherVPN/SoftEtherVPN/blob/master/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/sample/VpnServerRpcTest.cs) program in C#. This sample calls one by one all of available JSON-RPC APIs against the specified SoftEther VPN Server.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### HTTPS Authentication
|
||||||
|
You must specify the following HTTPS custom headers for authentication on each of requests.
|
||||||
|
|
||||||
|
|
||||||
|
Value | Description
|
||||||
|
--- | ---
|
||||||
|
`X-VPNADMIN-HUBNAME` | The name of the Virtual Hub if you want to connect to the VPN Server as a Virtual Hub Admin Mode. Specify empty string if you want to connect to the VPN Server as the Entire VPN Server Admin Mode.
|
||||||
|
`X-VPNADMIN-PASSWORD` | Specify the administration password.
|
||||||
|
|
||||||
|
|
||||||
|
- You can omit the above HTTPS custom authentication headers if you are calling JSON-RPC APIs from the web browser which is already logged in to the VPN Server with HTTPS Basic Authentication. In such usage the credential of HTTPS Basic Authtication will be used.
|
||||||
|
|
||||||
|
***
|
@ -0,0 +1,16 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>SoftEther VPN Server JSON-RPC Suite Document</title>
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/2.10.0/github-markdown.css">
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.15.0/themes/prism.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.15.0/prism.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.15.0/components/prism-json.js"></script>
|
||||||
|
<article class="markdown-body">
|
||||||
|
__BODY__
|
||||||
|
</article>
|
||||||
|
</body>
|
||||||
|
</html>
|
576
developer_tools/vpnserver-jsonrpc-codegen/Templates/ts_rpc.txt
Normal file
576
developer_tools/vpnserver-jsonrpc-codegen/Templates/ts_rpc.txt
Normal file
@ -0,0 +1,576 @@
|
|||||||
|
// SoftEther VPN Server JSON-RPC Stub code for TypeScript
|
||||||
|
//
|
||||||
|
// vpnrpc.ts
|
||||||
|
// Automatically generated at __TIMESTAMP__ by vpnserver-jsonrpc-codegen
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License 2.0
|
||||||
|
// Copyright (c) 2014-__YEAR__ SoftEther VPN Project
|
||||||
|
|
||||||
|
|
||||||
|
// Trivial utility codes
|
||||||
|
let is_node_js = (typeof navigator === "undefined") || navigator.userAgent.indexOf("Node.js") !== -1 || navigator.userAgent.indexOf("jsdom") !== -1;
|
||||||
|
function is_null(obj: any)
|
||||||
|
{
|
||||||
|
return (typeof obj === "undefined") || (obj === null);
|
||||||
|
}
|
||||||
|
let debug_mode: boolean = false;
|
||||||
|
|
||||||
|
/** VPN Server RPC Stubs */
|
||||||
|
export class VpnServerRpc
|
||||||
|
{
|
||||||
|
/** Determine if this JavaScript environment is on the Node.js or not. */
|
||||||
|
public static IsNodeJS(): boolean
|
||||||
|
{
|
||||||
|
return is_node_js;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set the debug mode flag */
|
||||||
|
public static SetDebugMode(flag: boolean): void
|
||||||
|
{
|
||||||
|
debug_mode = flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
private rpc_url: string;
|
||||||
|
private rpc_client: JsonRpcClient;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor of the VpnServerRpc class
|
||||||
|
* @param vpnserver_hostname The hostname or IP address of the destination VPN Server. In the web browser you can specify null if you want to connect to the server itself.
|
||||||
|
* @param vpnserver_port The port number of the destination VPN Server. In the web browser you can specify null if you want to connect to the server itself.
|
||||||
|
* @param hubname The name of the Virtual Hub if you want to connect to the VPN Server as a Virtual Hub Admin Mode. Specify null if you want to connect to the VPN Server as the Entire VPN Server Admin Mode.
|
||||||
|
* @param password Specify the administration password. This value is valid only if vpnserver_hostname is sepcified.
|
||||||
|
* @param nodejs_https_client_reject_untrusted_server_cert In Node.js set this true to check the SSL server certificate on the destination VPN Server. Set this false to ignore the SSL server certification.
|
||||||
|
*/
|
||||||
|
constructor(vpnserver_hostname?: string, vpnserver_port?: number, hubname?: string, password?: string, nodejs_https_client_reject_untrusted_server_cert?: boolean)
|
||||||
|
{
|
||||||
|
let headers: { [name: string]: string } = {};
|
||||||
|
let send_credentials: boolean = false;
|
||||||
|
|
||||||
|
nodejs_https_client_reject_untrusted_server_cert = is_null(nodejs_https_client_reject_untrusted_server_cert) ? false : nodejs_https_client_reject_untrusted_server_cert!;
|
||||||
|
|
||||||
|
if (is_null(vpnserver_hostname))
|
||||||
|
{
|
||||||
|
this.rpc_url = "/api/";
|
||||||
|
send_credentials = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (is_null(vpnserver_port)) vpnserver_port = 443;
|
||||||
|
this.rpc_url = `https://${vpnserver_hostname}:${vpnserver_port}/api/`;
|
||||||
|
|
||||||
|
|
||||||
|
headers["X-VPNADMIN-HUBNAME"] = is_null(hubname) ? "" : hubname!;
|
||||||
|
headers["X-VPNADMIN-PASSWORD"] = is_null(password) ? "" : password!;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_null(nodejs_https_client_reject_untrusted_server_cert)) nodejs_https_client_reject_untrusted_server_cert = false;
|
||||||
|
|
||||||
|
this.rpc_client = new JsonRpcClient(this.rpc_url, headers, send_credentials, nodejs_https_client_reject_untrusted_server_cert);
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Stubs ---
|
||||||
|
__STUBS__
|
||||||
|
|
||||||
|
// -- Utility functions --
|
||||||
|
/** Call a RPC procedure */
|
||||||
|
public async CallAsync<T>(method_name: string, request: T): Promise<T>
|
||||||
|
{
|
||||||
|
let response: T = await this.rpc_client.CallAsync<T>(method_name, request);
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// --- Types ---
|
||||||
|
__TYPES__
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// --- Utility codes ---
|
||||||
|
|
||||||
|
/** JSON-RPC request class. See https://www.jsonrpc.org/specification */
|
||||||
|
export class JsonRpcRequest
|
||||||
|
{
|
||||||
|
public jsonrpc: string = "2.0";
|
||||||
|
public method: string;
|
||||||
|
public params: any;
|
||||||
|
public id: string;
|
||||||
|
|
||||||
|
constructor(method: string = "", param: any = null, id: string = "")
|
||||||
|
{
|
||||||
|
this.method = method;
|
||||||
|
this.params = param;
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** JSON-RPC error class. See https://www.jsonrpc.org/specification */
|
||||||
|
export class JsonRpcError
|
||||||
|
{
|
||||||
|
public code: number;
|
||||||
|
public message: string;
|
||||||
|
public data: any;
|
||||||
|
|
||||||
|
constructor(code: number = 0, message: string = "", data: any = null)
|
||||||
|
{
|
||||||
|
this.code = code;
|
||||||
|
this.message = message;
|
||||||
|
this.data = data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** JSON-RPC response class with generics */
|
||||||
|
export class JsonRpcResponse<TResult>
|
||||||
|
{
|
||||||
|
public jsonrpc: string = "2.0";
|
||||||
|
public result: TResult = null!;
|
||||||
|
public error: JsonRpcError = null!;
|
||||||
|
public id: string = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
/** JSON-RPC client class. See https://www.jsonrpc.org/specification */
|
||||||
|
export class JsonRpcClient
|
||||||
|
{
|
||||||
|
/** A utility function to convert any object to JSON string */
|
||||||
|
public static ObjectToJson(obj: any): string
|
||||||
|
{
|
||||||
|
return JSON.stringify(obj,
|
||||||
|
(key, value) =>
|
||||||
|
{
|
||||||
|
if (key.endsWith("_bin"))
|
||||||
|
{
|
||||||
|
return Util_Base64_Encode(value);
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
, 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** A utility function to convert JSON string to object */
|
||||||
|
public static JsonToObject(str: string): any
|
||||||
|
{
|
||||||
|
return JSON.parse(str,
|
||||||
|
(key, value) =>
|
||||||
|
{
|
||||||
|
if (key.endsWith("_bin"))
|
||||||
|
{
|
||||||
|
return Util_Base64_Decode(value);
|
||||||
|
}
|
||||||
|
else if (key.endsWith("_dt"))
|
||||||
|
{
|
||||||
|
return new Date(value);
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Base URL */
|
||||||
|
public BaseUrl: string;
|
||||||
|
|
||||||
|
/** The instance of HTTP client */
|
||||||
|
private client: HttpClient;
|
||||||
|
|
||||||
|
/** Additional HTTP headers */
|
||||||
|
private headers: { [name: string]: string };
|
||||||
|
|
||||||
|
/**
|
||||||
|
* JSON-RPC client class constructor
|
||||||
|
* @param url The URL
|
||||||
|
* @param headers Additional HTTP headers
|
||||||
|
* @param send_credential Set true to use the same credential with the browsing web site. Valid only if the code is running on the web browser.
|
||||||
|
*/
|
||||||
|
constructor(url: string, headers: { [name: string]: string }, send_credential: boolean, nodejs_https_client_reject_untrusted_server_cert: boolean)
|
||||||
|
{
|
||||||
|
this.BaseUrl = url;
|
||||||
|
this.headers = headers;
|
||||||
|
|
||||||
|
this.client = new HttpClient();
|
||||||
|
this.client.SendCredential = send_credential;
|
||||||
|
this.client.NodeJS_HTTPS_Client_Reject_Unauthorized = nodejs_https_client_reject_untrusted_server_cert;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call a single RPC call (without error check). You can wait for the response with Promise<string> or await statement.
|
||||||
|
* @param method_name The name of RPC method
|
||||||
|
* @param param The parameters
|
||||||
|
*/
|
||||||
|
public async CallInternalAsync(method_name: string, param: any): Promise<string>
|
||||||
|
{
|
||||||
|
let id = "1";
|
||||||
|
|
||||||
|
let req = new JsonRpcRequest(method_name, param, id);
|
||||||
|
|
||||||
|
let req_string = JsonRpcClient.ObjectToJson(req);
|
||||||
|
|
||||||
|
if (debug_mode)
|
||||||
|
{
|
||||||
|
console.log("--- RPC Request Body ---");
|
||||||
|
console.log(req_string);
|
||||||
|
console.log("------------------------");
|
||||||
|
}
|
||||||
|
|
||||||
|
let http_response = await this.client.PostAsync(this.BaseUrl, this.headers,
|
||||||
|
req_string, "application/json");
|
||||||
|
|
||||||
|
let ret_string = http_response.Body;
|
||||||
|
|
||||||
|
if (debug_mode)
|
||||||
|
{
|
||||||
|
console.log("--- RPC Response Body ---");
|
||||||
|
console.log(ret_string);
|
||||||
|
console.log("-------------------------");
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret_string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call a single RPC call (with error check). You can wait for the response with Promise<TResult> or await statement. In the case of error, it will be thrown.
|
||||||
|
* @param method_name The name of RPC method
|
||||||
|
* @param param The parameters
|
||||||
|
*/
|
||||||
|
public async CallAsync<TResult>(method_name: string, param: any): Promise<TResult>
|
||||||
|
{
|
||||||
|
let ret_string = await this.CallInternalAsync(method_name, param);
|
||||||
|
|
||||||
|
let ret: JsonRpcResponse<TResult> = JSON.parse(ret_string);
|
||||||
|
|
||||||
|
if (is_null(ret.error) === false)
|
||||||
|
{
|
||||||
|
throw new JsonRpcException(ret.error);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret.result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** JSON-RPC exception class */
|
||||||
|
export class JsonRpcException extends Error
|
||||||
|
{
|
||||||
|
public Error: JsonRpcError;
|
||||||
|
|
||||||
|
constructor(error: JsonRpcError)
|
||||||
|
{
|
||||||
|
super(`Code=${error.code}, Message=${error.message}`);
|
||||||
|
this.Error = error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** HTTP client exception class */
|
||||||
|
export class HttpClientException extends Error
|
||||||
|
{
|
||||||
|
constructor(message: string)
|
||||||
|
{
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** HTTP client response class */
|
||||||
|
export class HttpClientResponse
|
||||||
|
{
|
||||||
|
public Body: string = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
/** An HTTP client which can be used in both web browsers and Node.js */
|
||||||
|
export class HttpClient
|
||||||
|
{
|
||||||
|
public TimeoutMsecs: number = 60 * 5 * 1000;
|
||||||
|
public SendCredential: boolean = true;
|
||||||
|
public NodeJS_HTTPS_Client_Reject_Unauthorized: boolean = false;
|
||||||
|
|
||||||
|
/** Post method. In web browsers this function will process the request by itself. In Node.js this function will call PostAsync_NodeJS() instead. */
|
||||||
|
public async PostAsync(url: string, headers: { [name: string]: string },
|
||||||
|
req_body: string, req_media_type: string): Promise<HttpClientResponse>
|
||||||
|
{
|
||||||
|
if (is_node_js)
|
||||||
|
{
|
||||||
|
return this.PostAsync_NodeJS(url, headers, req_body, req_media_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
let fetch_header_list = new Headers();
|
||||||
|
|
||||||
|
for (let name of Object.keys(headers))
|
||||||
|
{
|
||||||
|
fetch_header_list.append(name, headers[name]);
|
||||||
|
}
|
||||||
|
|
||||||
|
let fetch_init: RequestInit =
|
||||||
|
{
|
||||||
|
mode: "cors",
|
||||||
|
headers: fetch_header_list,
|
||||||
|
credentials: (this.SendCredential ? "include" : "omit"),
|
||||||
|
method: "POST",
|
||||||
|
cache: "no-cache",
|
||||||
|
keepalive: true,
|
||||||
|
redirect: "follow",
|
||||||
|
body: req_body,
|
||||||
|
};
|
||||||
|
|
||||||
|
let fetch_response = await fetch(url, fetch_init);
|
||||||
|
|
||||||
|
if (fetch_response.ok === false)
|
||||||
|
{
|
||||||
|
throw new HttpClientException("HTTP Error: " + fetch_response.status + " " + fetch_response.statusText);
|
||||||
|
}
|
||||||
|
|
||||||
|
let ret = new HttpClientResponse();
|
||||||
|
|
||||||
|
ret.Body = await fetch_response.text();
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Post method for Node.js. */
|
||||||
|
public PostAsync_NodeJS(url: string, headers: { [name: string]: string },
|
||||||
|
req_body: string, req_media_type: string): Promise<HttpClientResponse>
|
||||||
|
{
|
||||||
|
const https = require("https");
|
||||||
|
const keepAliveAgent = new https.Agent({ keepAlive: true });
|
||||||
|
const urlparse = require("url");
|
||||||
|
|
||||||
|
const urlobj = urlparse.parse(url);
|
||||||
|
|
||||||
|
if (is_null(urlobj.host)) throw new Error("URL is invalid.");
|
||||||
|
|
||||||
|
let options =
|
||||||
|
{
|
||||||
|
host: urlobj.hostname,
|
||||||
|
port: urlobj.port,
|
||||||
|
path: urlobj.path,
|
||||||
|
rejectUnauthorized: this.NodeJS_HTTPS_Client_Reject_Unauthorized,
|
||||||
|
method: "POST",
|
||||||
|
timeout: this.TimeoutMsecs,
|
||||||
|
agent: keepAliveAgent,
|
||||||
|
};
|
||||||
|
|
||||||
|
return new Promise(function (resolve, reject)
|
||||||
|
{
|
||||||
|
let req = https.request(options, (res: any) =>
|
||||||
|
{
|
||||||
|
if (res.statusCode !== 200)
|
||||||
|
{
|
||||||
|
reject(new HttpClientException("HTTP Error: " + res.statusCode + " " + res.statusMessage));
|
||||||
|
}
|
||||||
|
|
||||||
|
let recv_str: string = "";
|
||||||
|
|
||||||
|
res.on("data", (body: any) =>
|
||||||
|
{
|
||||||
|
recv_str += body;
|
||||||
|
});
|
||||||
|
|
||||||
|
res.on("end", () =>
|
||||||
|
{
|
||||||
|
let ret = new HttpClientResponse();
|
||||||
|
|
||||||
|
ret.Body = recv_str;
|
||||||
|
|
||||||
|
resolve(ret);
|
||||||
|
});
|
||||||
|
}).on("error", (err: any) =>
|
||||||
|
{
|
||||||
|
throw err;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
for (let name of Object.keys(headers))
|
||||||
|
{
|
||||||
|
req.setHeader(name, !is_null(headers[name]) ? headers[name] : "");
|
||||||
|
}
|
||||||
|
req.setHeader("Content-Type", req_media_type);
|
||||||
|
req.setHeader("Content-Length", Buffer.byteLength(req_body));
|
||||||
|
req.write(req_body);
|
||||||
|
req.end();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//////// BEGIN: Base64 encode / decode utility functions from https://github.com/beatgammit/base64-js
|
||||||
|
// The MIT License(MIT)
|
||||||
|
// Copyright(c) 2014
|
||||||
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
// of this software and associated documentation files(the "Software"), to deal
|
||||||
|
// in the Software without restriction, including without limitation the rights
|
||||||
|
// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
|
||||||
|
// copies of the Software, and to permit persons to whom the Software is
|
||||||
|
// furnished to do so, subject to the following conditions:
|
||||||
|
// The above copyright notice and this permission notice shall be included in
|
||||||
|
// all copies or substantial portions of the Software.
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
|
||||||
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
// THE SOFTWARE.
|
||||||
|
|
||||||
|
var lookup: any = [];
|
||||||
|
var revLookup: any = [];
|
||||||
|
|
||||||
|
var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||||
|
for (var i = 0, len = code.length; i < len; ++i)
|
||||||
|
{
|
||||||
|
lookup[i] = code[i];
|
||||||
|
revLookup[code.charCodeAt(i)] = i;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Support decoding URL-safe base64 strings, as Node.js does.
|
||||||
|
// See: https://en.wikipedia.org/wiki/Base64#URL_applications
|
||||||
|
revLookup["-".charCodeAt(0)] = 62;
|
||||||
|
revLookup["_".charCodeAt(0)] = 63;
|
||||||
|
|
||||||
|
function getLens(b64: any)
|
||||||
|
{
|
||||||
|
var len = b64.length;
|
||||||
|
|
||||||
|
if (len % 4 > 0)
|
||||||
|
{
|
||||||
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Trim off extra bytes after placeholder bytes are found
|
||||||
|
// See: https://github.com/beatgammit/base64-js/issues/42
|
||||||
|
var validLen = b64.indexOf("=");
|
||||||
|
if (validLen === -1) validLen = len;
|
||||||
|
|
||||||
|
var placeHoldersLen = validLen === len
|
||||||
|
? 0
|
||||||
|
: 4 - (validLen % 4);
|
||||||
|
|
||||||
|
return [validLen, placeHoldersLen];
|
||||||
|
}
|
||||||
|
|
||||||
|
// base64 is 4/3 + up to two characters of the original data
|
||||||
|
function byteLength(b64: any)
|
||||||
|
{
|
||||||
|
var lens = getLens(b64);
|
||||||
|
var validLen = lens[0];
|
||||||
|
var placeHoldersLen = lens[1];
|
||||||
|
return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen;
|
||||||
|
}
|
||||||
|
|
||||||
|
function _byteLength(b64: any, validLen: any, placeHoldersLen: any)
|
||||||
|
{
|
||||||
|
return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Util_Base64_Decode(b64: any)
|
||||||
|
{
|
||||||
|
var tmp;
|
||||||
|
var lens = getLens(b64);
|
||||||
|
var validLen = lens[0];
|
||||||
|
var placeHoldersLen = lens[1];
|
||||||
|
|
||||||
|
var arr = new Uint8Array(_byteLength(b64, validLen, placeHoldersLen));
|
||||||
|
|
||||||
|
var curByte = 0;
|
||||||
|
|
||||||
|
// if there are placeholders, only get up to the last complete 4 chars
|
||||||
|
var len = placeHoldersLen > 0
|
||||||
|
? validLen - 4
|
||||||
|
: validLen;
|
||||||
|
|
||||||
|
for (var i = 0; i < len; i += 4)
|
||||||
|
{
|
||||||
|
tmp =
|
||||||
|
(revLookup[b64.charCodeAt(i)] << 18) |
|
||||||
|
(revLookup[b64.charCodeAt(i + 1)] << 12) |
|
||||||
|
(revLookup[b64.charCodeAt(i + 2)] << 6) |
|
||||||
|
revLookup[b64.charCodeAt(i + 3)];
|
||||||
|
arr[curByte++] = (tmp >> 16) & 0xFF;
|
||||||
|
arr[curByte++] = (tmp >> 8) & 0xFF;
|
||||||
|
arr[curByte++] = tmp & 0xFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (placeHoldersLen === 2)
|
||||||
|
{
|
||||||
|
tmp =
|
||||||
|
(revLookup[b64.charCodeAt(i)] << 2) |
|
||||||
|
(revLookup[b64.charCodeAt(i + 1)] >> 4);
|
||||||
|
arr[curByte++] = tmp & 0xFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (placeHoldersLen === 1)
|
||||||
|
{
|
||||||
|
tmp =
|
||||||
|
(revLookup[b64.charCodeAt(i)] << 10) |
|
||||||
|
(revLookup[b64.charCodeAt(i + 1)] << 4) |
|
||||||
|
(revLookup[b64.charCodeAt(i + 2)] >> 2);
|
||||||
|
arr[curByte++] = (tmp >> 8) & 0xFF;
|
||||||
|
arr[curByte++] = tmp & 0xFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
return arr;
|
||||||
|
}
|
||||||
|
|
||||||
|
function tripletToBase64(num: any)
|
||||||
|
{
|
||||||
|
return lookup[num >> 18 & 0x3F] +
|
||||||
|
lookup[num >> 12 & 0x3F] +
|
||||||
|
lookup[num >> 6 & 0x3F] +
|
||||||
|
lookup[num & 0x3F];
|
||||||
|
}
|
||||||
|
|
||||||
|
function encodeChunk(uint8: any, start: any, end: any)
|
||||||
|
{
|
||||||
|
var tmp;
|
||||||
|
var output = [];
|
||||||
|
for (var i = start; i < end; i += 3)
|
||||||
|
{
|
||||||
|
tmp =
|
||||||
|
((uint8[i] << 16) & 0xFF0000) +
|
||||||
|
((uint8[i + 1] << 8) & 0xFF00) +
|
||||||
|
(uint8[i + 2] & 0xFF);
|
||||||
|
output.push(tripletToBase64(tmp));
|
||||||
|
}
|
||||||
|
return output.join("");
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Util_Base64_Encode(uint8: any)
|
||||||
|
{
|
||||||
|
var tmp;
|
||||||
|
var len = uint8.length;
|
||||||
|
var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes
|
||||||
|
var parts = [];
|
||||||
|
var maxChunkLength = 16383; // must be multiple of 3
|
||||||
|
|
||||||
|
// go through the array every three bytes, we'll deal with trailing stuff later
|
||||||
|
for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength)
|
||||||
|
{
|
||||||
|
parts.push(encodeChunk(
|
||||||
|
uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
// pad the end with zeros, but make sure to not forget the extra bytes
|
||||||
|
if (extraBytes === 1)
|
||||||
|
{
|
||||||
|
tmp = uint8[len - 1];
|
||||||
|
parts.push(
|
||||||
|
lookup[tmp >> 2] +
|
||||||
|
lookup[(tmp << 4) & 0x3F] +
|
||||||
|
"=="
|
||||||
|
);
|
||||||
|
} else if (extraBytes === 2)
|
||||||
|
{
|
||||||
|
tmp = (uint8[len - 2] << 8) + uint8[len - 1];
|
||||||
|
parts.push(
|
||||||
|
lookup[tmp >> 10] +
|
||||||
|
lookup[(tmp >> 4) & 0x3F] +
|
||||||
|
lookup[(tmp << 2) & 0x3F] +
|
||||||
|
"="
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return parts.join("");
|
||||||
|
}
|
||||||
|
//////// END: Base64 encode / decode utility functions from https://github.com/beatgammit/base64-js
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,48 @@
|
|||||||
|
// Test sample code for SoftEther VPN Server JSON-RPC Stub
|
||||||
|
// Runs on both web browsers and Node.js
|
||||||
|
//
|
||||||
|
// sample.ts
|
||||||
|
// Automatically generated at __TIMESTAMP__ by vpnserver-jsonrpc-codegen
|
||||||
|
//
|
||||||
|
// This sample code shows how to call all available RPC functions.
|
||||||
|
// You can copy and paste test code to write your own web browser TypeScript / JavaScript codes.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License 2.0
|
||||||
|
// Copyright (c) 2014-__YEAR__ SoftEther VPN Project
|
||||||
|
|
||||||
|
// On the web browser uncomment below imports as necessary to support old browsers.
|
||||||
|
// import "core-js/es6/promise";
|
||||||
|
// import "core-js/es6/string";
|
||||||
|
// import "whatwg-fetch";
|
||||||
|
|
||||||
|
|
||||||
|
// Import the vpnrpc.ts RPC stub.
|
||||||
|
import * as VPN from "./vpnrpc";
|
||||||
|
|
||||||
|
// Output JSON-RPC request / reply strings to the debug console.
|
||||||
|
VPN.VpnServerRpc.SetDebugMode(true);
|
||||||
|
|
||||||
|
let api: VPN.VpnServerRpc;
|
||||||
|
// Creating the VpnServerRpc class instance here.
|
||||||
|
if (VPN.VpnServerRpc.IsNodeJS() === false) // // Determine if this JavaScript environment is on the Node.js or not
|
||||||
|
{
|
||||||
|
// On the web browser. We do not need to specify any hostname, port or credential as the web browser already knows it.
|
||||||
|
api = new VPN.VpnServerRpc();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// On the Node.js. We need to specify the target VPN Server's hostname, port and credential.
|
||||||
|
api = new VPN.VpnServerRpc("127.0.0.1", 443, "", "PASSWORD_HERE", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// A variable for test
|
||||||
|
let hub_name = "test";
|
||||||
|
|
||||||
|
// Call the Test_All() function to test almost all VPN APIs.
|
||||||
|
Test_All();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
__TESTS__
|
||||||
|
|
||||||
|
|
@ -0,0 +1,282 @@
|
|||||||
|
// SoftEther VPN Server JSON-RPC Stub code for C#
|
||||||
|
//
|
||||||
|
// JsonRpc.cs - JSON-RPC Client Utility Functions
|
||||||
|
//
|
||||||
|
// Automatically generated at __TIMESTAMP__ by vpnserver-jsonrpc-codegen
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License 2.0
|
||||||
|
// Copyright (c) 2014-__YEAR__ SoftEther VPN Project
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Net.Security;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using System.Security.Cryptography.X509Certificates;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace SoftEther.JsonRpc
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Internal utility class
|
||||||
|
/// </summary>
|
||||||
|
static class ClientUtil
|
||||||
|
{
|
||||||
|
public const int DefaultMaxDepth = 8;
|
||||||
|
|
||||||
|
public static string NonNull(this string s) { if (s == null) return ""; else return s; }
|
||||||
|
public static bool IsEmpty(this string str)
|
||||||
|
{
|
||||||
|
if (str == null || str.Trim().Length == 0)
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
public static bool IsFilled(this string str) => !IsEmpty(str);
|
||||||
|
|
||||||
|
public static string ObjectToJson(this object obj, bool include_null = false, bool escape_html = false, int? max_depth = ClientUtil.DefaultMaxDepth, bool compact = false, bool reference_handling = false) => ClientUtil.Serialize(obj, include_null, escape_html, max_depth, compact, reference_handling);
|
||||||
|
public static T JsonToObject<T>(this string str, bool include_null = false, int? max_depth = ClientUtil.DefaultMaxDepth) => ClientUtil.Deserialize<T>(str, include_null, max_depth);
|
||||||
|
public static object JsonToObject(this string str, Type type, bool include_null = false, int? max_depth = ClientUtil.DefaultMaxDepth) => ClientUtil.Deserialize(str, type, include_null, max_depth);
|
||||||
|
|
||||||
|
public static string Serialize(object obj, bool include_null = false, bool escape_html = false, int? max_depth = ClientUtil.DefaultMaxDepth, bool compact = false, bool reference_handling = false)
|
||||||
|
{
|
||||||
|
JsonSerializerSettings setting = new JsonSerializerSettings()
|
||||||
|
{
|
||||||
|
MaxDepth = max_depth,
|
||||||
|
NullValueHandling = include_null ? NullValueHandling.Include : NullValueHandling.Ignore,
|
||||||
|
ReferenceLoopHandling = ReferenceLoopHandling.Error,
|
||||||
|
PreserveReferencesHandling = reference_handling ? PreserveReferencesHandling.All : PreserveReferencesHandling.None,
|
||||||
|
StringEscapeHandling = escape_html ? StringEscapeHandling.EscapeHtml : StringEscapeHandling.Default,
|
||||||
|
};
|
||||||
|
return JsonConvert.SerializeObject(obj, compact ? Formatting.None : Formatting.Indented, setting);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static T Deserialize<T>(string str, bool include_null = false, int? max_depth = ClientUtil.DefaultMaxDepth)
|
||||||
|
=> (T)Deserialize(str, typeof(T), include_null, max_depth);
|
||||||
|
|
||||||
|
public static object Deserialize(string str, Type type, bool include_null = false, int? max_depth = ClientUtil.DefaultMaxDepth)
|
||||||
|
{
|
||||||
|
JsonSerializerSettings setting = new JsonSerializerSettings()
|
||||||
|
{
|
||||||
|
MaxDepth = max_depth,
|
||||||
|
NullValueHandling = include_null ? NullValueHandling.Include : NullValueHandling.Ignore,
|
||||||
|
ObjectCreationHandling = ObjectCreationHandling.Replace,
|
||||||
|
ReferenceLoopHandling = ReferenceLoopHandling.Error,
|
||||||
|
};
|
||||||
|
return JsonConvert.DeserializeObject(str, type, setting);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void Print(this object o)
|
||||||
|
{
|
||||||
|
string str = o.ObjectToJson();
|
||||||
|
|
||||||
|
if (o is string) str = (string)o;
|
||||||
|
|
||||||
|
Console.WriteLine(str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// JSON-RPC exception class
|
||||||
|
/// </summary>
|
||||||
|
class JsonRpcException : Exception
|
||||||
|
{
|
||||||
|
public JsonRpcError RpcError { get; }
|
||||||
|
public JsonRpcException(JsonRpcError err)
|
||||||
|
: base($"Code={err.Code}, Message={err.Message.NonNull()}" +
|
||||||
|
(err == null || err.Data == null ? "" : $", Data={err.Data.ObjectToJson(compact: true)}"))
|
||||||
|
{
|
||||||
|
this.RpcError = err;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// JSON-RPC request class. See https://www.jsonrpc.org/specification
|
||||||
|
/// </summary>
|
||||||
|
class JsonRpcRequest
|
||||||
|
{
|
||||||
|
[JsonProperty("jsonrpc", Order = 1)]
|
||||||
|
public string Version { get; set; } = "2.0";
|
||||||
|
|
||||||
|
[JsonProperty("id", Order = 2)]
|
||||||
|
public string Id { get; set; } = null;
|
||||||
|
|
||||||
|
[JsonProperty("method", Order = 3)]
|
||||||
|
public string Method { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("params", Order = 4)]
|
||||||
|
public object Params { get; set; } = null;
|
||||||
|
|
||||||
|
public JsonRpcRequest() { }
|
||||||
|
|
||||||
|
public JsonRpcRequest(string method, object param, string id)
|
||||||
|
{
|
||||||
|
this.Method = method;
|
||||||
|
this.Params = param;
|
||||||
|
this.Id = id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// JSON-RPC response class with generics
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="TResult"></typeparam>
|
||||||
|
class JsonRpcResponse<TResult>
|
||||||
|
{
|
||||||
|
[JsonProperty("jsonrpc", Order = 1)]
|
||||||
|
public virtual string Version { get; set; } = "2.0";
|
||||||
|
|
||||||
|
[JsonProperty("id", NullValueHandling = NullValueHandling.Include, Order = 2)]
|
||||||
|
public virtual string Id { get; set; } = null;
|
||||||
|
|
||||||
|
[JsonProperty("result", Order = 3)]
|
||||||
|
public virtual TResult Result { get; set; } = default(TResult);
|
||||||
|
|
||||||
|
[JsonProperty("error", Order = 4)]
|
||||||
|
public virtual JsonRpcError Error { get; set; } = null;
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public virtual bool IsError => this.Error != null;
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public virtual bool IsOk => !IsError;
|
||||||
|
|
||||||
|
public virtual void ThrowIfError()
|
||||||
|
{
|
||||||
|
if (this.IsError) throw new JsonRpcException(this.Error);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return this.ObjectToJson(compact: true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// JSON-RPC error class. See https://www.jsonrpc.org/specification
|
||||||
|
/// </summary>
|
||||||
|
class JsonRpcError
|
||||||
|
{
|
||||||
|
public JsonRpcError() { }
|
||||||
|
public JsonRpcError(int code, string message, object data = null)
|
||||||
|
{
|
||||||
|
this.Code = code;
|
||||||
|
this.Message = message.NonNull();
|
||||||
|
if (this.Message.IsEmpty()) this.Message = $"JSON-RPC Error {code}";
|
||||||
|
this.Data = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
[JsonProperty("code")]
|
||||||
|
public int Code { get; set; } = 0;
|
||||||
|
|
||||||
|
[JsonProperty("message")]
|
||||||
|
public string Message { get; set; } = null;
|
||||||
|
|
||||||
|
[JsonProperty("data")]
|
||||||
|
public object Data { get; set; } = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// JSON-RPC client. See https://www.jsonrpc.org/specification
|
||||||
|
/// </summary>
|
||||||
|
class JsonRpcClient
|
||||||
|
{
|
||||||
|
HttpClientHandler client_handler;
|
||||||
|
HttpClient client;
|
||||||
|
public const int DefaultTimeoutMsecs = 60 * 1000;
|
||||||
|
public int TimeoutMsecs { get => (int)client.Timeout.TotalMilliseconds; set => client.Timeout = new TimeSpan(0, 0, 0, 0, value); }
|
||||||
|
public Dictionary<string, string> HttpHeaders { get; } = new Dictionary<string, string>();
|
||||||
|
|
||||||
|
string base_url;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// JSON-RPC client class constructor
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="url">The URL</param>
|
||||||
|
/// <param name="cert_check_proc">The SSL certificate validation callback</param>
|
||||||
|
public JsonRpcClient(string url, Func<HttpRequestMessage, X509Certificate2, X509Chain, SslPolicyErrors, bool> cert_check_proc = null)
|
||||||
|
{
|
||||||
|
if (cert_check_proc == null) cert_check_proc = (message, cert, chain, errors) => true;
|
||||||
|
client_handler = new HttpClientHandler();
|
||||||
|
|
||||||
|
this.client_handler.AllowAutoRedirect = true;
|
||||||
|
this.client_handler.MaxAutomaticRedirections = 10;
|
||||||
|
|
||||||
|
client_handler.ServerCertificateCustomValidationCallback = cert_check_proc;
|
||||||
|
|
||||||
|
client = new HttpClient(client_handler, true);
|
||||||
|
//Console.WriteLine("new HttpClient(client_handler, true);");
|
||||||
|
|
||||||
|
this.base_url = url;
|
||||||
|
|
||||||
|
this.TimeoutMsecs = DefaultTimeoutMsecs;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Call a single RPC call (without error check). You can wait for the response with Task<string> or await statement.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="method_name">The name of RPC method</param>
|
||||||
|
/// <param name="param">The parameters</param>
|
||||||
|
public async Task<string> CallInternalAsync(string method_name, object param)
|
||||||
|
{
|
||||||
|
string id = DateTime.Now.Ticks.ToString();
|
||||||
|
|
||||||
|
JsonRpcRequest req = new JsonRpcRequest(method_name, param, id);
|
||||||
|
|
||||||
|
string req_string = req.ObjectToJson();
|
||||||
|
|
||||||
|
//Console.WriteLine($"req: {req_string}");
|
||||||
|
|
||||||
|
HttpContent content = new StringContent(req_string, Encoding.UTF8, "application/json");
|
||||||
|
|
||||||
|
foreach (string key in this.HttpHeaders.Keys)
|
||||||
|
{
|
||||||
|
string value = this.HttpHeaders[key];
|
||||||
|
|
||||||
|
content.Headers.Add(key, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
HttpResponseMessage response = await this.client.PostAsync(base_url, content);
|
||||||
|
|
||||||
|
Stream responseStream = await response.Content.ReadAsStreamAsync();
|
||||||
|
|
||||||
|
if (!response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
using (StreamReader streamReader = new StreamReader(responseStream))
|
||||||
|
{
|
||||||
|
throw new Exception($"Error: {response.StatusCode}: {await streamReader.ReadToEndAsync()}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
string ret_string;
|
||||||
|
|
||||||
|
using (StreamReader streamReader = new StreamReader(responseStream))
|
||||||
|
{
|
||||||
|
ret_string = await streamReader.ReadToEndAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Console.WriteLine($"ret: {ret_string}");
|
||||||
|
|
||||||
|
return ret_string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Call a single RPC call (with error check). You can wait for the response with Promise<TResult> or await statement. In the case of error, it will be thrown.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="method_name">The name of RPC method</param>
|
||||||
|
/// <param name="param">The parameters</param>
|
||||||
|
public async Task<TResult> CallAsync<TResult>(string method_name, object param)
|
||||||
|
{
|
||||||
|
string ret_string = await CallInternalAsync(method_name, param);
|
||||||
|
|
||||||
|
JsonRpcResponse <TResult> ret = ret_string.JsonToObject<JsonRpcResponse<TResult>>();
|
||||||
|
|
||||||
|
ret.ThrowIfError();
|
||||||
|
|
||||||
|
return ret.Result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,35 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||||
|
<RootNamespace>VPNServer_JSONRPC_CodeGen</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Remove="Templates\cs_main.txt" />
|
||||||
|
<None Remove="Templates\cs_proj.txt" />
|
||||||
|
<None Remove="Templates\cs_sln.txt" />
|
||||||
|
<None Remove="Templates\doc.txt" />
|
||||||
|
<None Remove="Templates\md_html.html" />
|
||||||
|
<None Remove="Templates\ts_rpc.txt" />
|
||||||
|
<None Remove="Templates\ts_test.txt" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="Templates\cs_main.txt" />
|
||||||
|
<EmbeddedResource Include="Templates\cs_proj.txt" />
|
||||||
|
<EmbeddedResource Include="Templates\cs_sln.txt" />
|
||||||
|
<EmbeddedResource Include="Templates\doc.txt" />
|
||||||
|
<EmbeddedResource Include="Templates\md_html.html" />
|
||||||
|
<EmbeddedResource Include="Templates\ts_rpc.txt" />
|
||||||
|
<EmbeddedResource Include="Templates\ts_test.txt" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Markdig" Version="0.15.4" />
|
||||||
|
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="2.10.0" />
|
||||||
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 15
|
||||||
|
VisualStudioVersion = 15.0.28010.2041
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "vpnserver-jsonrpc-codegen", "vpnserver-jsonrpc-codegen.csproj", "{00B41CF0-7AE9-4542-9970-77B312412535}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{00B41CF0-7AE9-4542-9970-77B312412535}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{00B41CF0-7AE9-4542-9970-77B312412535}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{00B41CF0-7AE9-4542-9970-77B312412535}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{00B41CF0-7AE9-4542-9970-77B312412535}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {EBB5B5A2-21A9-42A1-B4F4-7ED92CD8BBC1}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
@ -1,49 +1,50 @@
|
|||||||
This document describes how to build SoftEtherVPN for Unix based Operating systems
|
This document describes how to build SoftEtherVPN for UNIX based Operating systems
|
||||||
|
|
||||||
- [Requirements](#requirements)
|
- [Requirements](#requirements)
|
||||||
* [Install requirements on Centos/RedHat](#install-requirements-on-centosredhat)
|
* [Install requirements on Centos/RedHat](#install-requirements-on-centosredhat)
|
||||||
* [Install Requirements on Debian/Ubuntu](#install-requirements-on-debianubuntu)
|
* [Install Requirements on Debian/Ubuntu](#install-requirements-on-debianubuntu)
|
||||||
* [Install Requirements on macOS](#install-requirements-on-macos)
|
* [Install Requirements on macOS](#install-requirements-on-macos)
|
||||||
- [Build from source code and install](#build-from-source-code-and-install)
|
- [Build from source code and install](#build-from-source-code-and-install)
|
||||||
|
- [Additional Build Options](#additional-build-options)
|
||||||
- [How to Run SoftEther](#how-to-run-softether)
|
- [How to Run SoftEther](#how-to-run-softether)
|
||||||
* [Start/Stop SoftEther VPN Server](#startstop-softether-vpn-server)
|
* [Start/Stop SoftEther VPN Server](#startstop-softether-vpn-server)
|
||||||
* [Start/Stop SoftEther VPN Bridge](#startstop-softether-vpn-bridge)
|
* [Start/Stop SoftEther VPN Bridge](#startstop-softether-vpn-bridge)
|
||||||
* [Start/Stop SoftEther VPN Client](#startstop-softether-vpn-client)
|
* [Start/Stop SoftEther VPN Client](#startstop-softether-vpn-client)
|
||||||
|
- [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 Server VPN JSON-RPC API Suite](#built-in-softether-server-vpn-json-rpc-api-suite)
|
||||||
- [Using SoftEther without installation.](#using-softether-without-installation)
|
- [Using SoftEther without installation.](#using-softether-without-installation)
|
||||||
|
|
||||||
# Requirements
|
# Requirements
|
||||||
|
|
||||||
You need to install the following software to build SoftEther VPN for UNIX.
|
You need to install the following software to build SoftEther VPN for UNIX.
|
||||||
|
|
||||||
- Linux, FreeBSD, Solaris or Mac OS X.
|
- [CMake](https://cmake.org)
|
||||||
- GNU Compiler Collection (gcc) and binary utilities. ***
|
- C compiler (GCC, Clang, etc)
|
||||||
- GNU Make (gmake).
|
- C Library (BSD libc, GNU libc, musl libc, etc)
|
||||||
- GNU C Library (glibc).
|
- POSIX threads library (pthread)
|
||||||
- POSIX Threads (pthread).
|
- OpenSSL or LibreSSL (crypto, ssl)
|
||||||
- OpenSSL (crypto, ssl).
|
- make (GNU make, BSD make, etc)
|
||||||
- libiconv.
|
- libiconv
|
||||||
- readline.
|
- readline
|
||||||
- ncurses.
|
- ncurses
|
||||||
|
|
||||||
*It has been noted that clang is also supported as an alternative to gcc.*
|
|
||||||
|
|
||||||
|
|
||||||
## Install requirements on Centos/RedHat
|
## Install requirements on Centos/RedHat
|
||||||
|
|
||||||
```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
|
||||||
@ -55,15 +56,15 @@ 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.
|
||||||
|
|
||||||
If any error occurs, please check the above requirements.
|
If any error occurs, please check the above requirements.
|
||||||
|
|
||||||
# Build on musl-based linux
|
# Build on musl-based linux
|
||||||
|
|
||||||
To build the programs from the source code when using musl as libc, run the following commands:
|
To build the programs from the source code when using musl as libc, run the following commands:
|
||||||
|
|
||||||
@ -73,12 +74,44 @@ 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.
|
||||||
|
|
||||||
|
# Additional Build Options
|
||||||
|
|
||||||
|
There are some additional build options useful if you're a distro package maintainer and creating a package of SoftEther VPN. It is recommended that you only specify these options when you understand what happens.
|
||||||
|
|
||||||
|
## Specify log, config, PID directories
|
||||||
|
|
||||||
|
By default, SoftEther VPN writes out all files such as logs, config files, PID files under the same directory as `vpnserver`, `vpnbridge`, `vpnclient` executables. This behaviour is suitable when [using SoftEther without installation](#using-softether-without-installation) however not appropriate using with installation.
|
||||||
|
Usually PID files are to put in `/var/run` or `/run`. Logs are `/var/log`. Other variable state information files including config files are `/var/lib` or `/var/db`.
|
||||||
|
|
||||||
|
These directories can be changed at compile-time by specifying via CMake variables.
|
||||||
|
* `SE_PIDDIR` - PID directory
|
||||||
|
* `SE_LOGDIR` - root log directory
|
||||||
|
* `SE_DBDIR` - config files and variable state directory
|
||||||
|
|
||||||
|
To specify directories, perform `./configure` like below.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
CMAKE_FLAGS="-DSE_PIDDIR=/run/softether -DSE_LOGDIR=/var/log/softether -DSE_DBDIR=/var/lib/softether" ./configure
|
||||||
|
```
|
||||||
|
|
||||||
|
Please note that these directories are not created automatically after installation. Make sure to create these directories before starting SoftEther VPN Server, Bridge or Client.
|
||||||
|
|
||||||
|
## Build without [cpu_features](https://github.com/google/cpu_features)
|
||||||
|
|
||||||
|
SoftEther VPN uses cpu_features library to retrieve CPU features such as available processor instructions. However, cpu_features is not available on some architectures. Whether to build with cpu_features is auto detected but autodetection is not so smart.
|
||||||
|
|
||||||
|
If you want to build without cpu_features explicitly, perform `./configure` like below.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
CMAKE_FLAGS="-DSKIP_CPU_FEATURES" ./configure
|
||||||
|
```
|
||||||
|
|
||||||
# How to Run SoftEther
|
# How to Run SoftEther
|
||||||
|
|
||||||
## Start/Stop SoftEther VPN Server
|
## Start/Stop SoftEther VPN Server
|
||||||
@ -104,7 +137,7 @@ vpncmd
|
|||||||
|
|
||||||
Or you can also use VPN Server Manager GUI Tool on other Windows PC to
|
Or you can also use VPN Server Manager GUI Tool on other Windows PC to
|
||||||
connect to the VPN Server remotely. You can download the GUI Tool
|
connect to the VPN Server remotely. You can download the GUI Tool
|
||||||
from http://www.softether-download.com/.
|
from https://www.softether-download.com/.
|
||||||
|
|
||||||
|
|
||||||
## Start/Stop SoftEther VPN Bridge
|
## Start/Stop SoftEther VPN Bridge
|
||||||
@ -130,7 +163,7 @@ vpncmd
|
|||||||
|
|
||||||
Or you can also use VPN Server Manager GUI Tool on other Windows PC to
|
Or you can also use VPN Server Manager GUI Tool on other Windows PC to
|
||||||
connect to the VPN Bridge remotely. You can download the GUI Tool
|
connect to the VPN Bridge remotely. You can download the GUI Tool
|
||||||
from http://www.softether-download.com/.
|
from https://www.softether-download.com/.
|
||||||
|
|
||||||
|
|
||||||
## Start/Stop SoftEther VPN Client
|
## Start/Stop SoftEther VPN Client
|
||||||
@ -156,16 +189,48 @@ vpncmd
|
|||||||
|
|
||||||
Or you can also use VPN Client Manager GUI Tool on other Windows PC to
|
Or you can also use VPN Client Manager GUI Tool on other Windows PC to
|
||||||
connect to the VPN Client remotely. You can download the GUI Tool
|
connect to the VPN Client remotely. You can download the GUI Tool
|
||||||
from http://www.softether-download.com/.
|
from https://www.softether-download.com/.
|
||||||
|
|
||||||
|
|
||||||
# Using SoftEther without installation.
|
# About HTML5-based Modern Admin Console and JSON-RPC API Suite
|
||||||
|
|
||||||
|
## Built-in SoftEther VPN Server HTML5 Ajax-based Web Administration Console
|
||||||
|
We are developing the HTML5 Ajax-based Web Administration Console (currently very limited, under construction) in the embedded HTTPS server on the SoftEther VPN Server.
|
||||||
|
|
||||||
|
Access to the following URL from your favorite web browser.
|
||||||
|
|
||||||
|
```
|
||||||
|
https://<vpn_server_hostname>:<port>/admin/
|
||||||
|
```
|
||||||
|
|
||||||
|
For example if your VPN Server is running as the port 5555 on the host at 192.168.0.1, you can access to the web console by:
|
||||||
|
|
||||||
|
```
|
||||||
|
https://192.168.0.1:5555/admin/
|
||||||
|
```
|
||||||
|
|
||||||
|
Note: Your HTML5 development contribution is very appreciated. The current HTML5 pages are written by Daiyuu Nobori (the core developer of SoftEther VPN). He is obviously lack of HTML5 development ability. Please kindly consider to contribute for SoftEther VPN's development on GitHub. Your code will help every people running SoftEther VPN Server.
|
||||||
|
|
||||||
|
|
||||||
|
## Built-in SoftEther Server VPN JSON-RPC API Suite
|
||||||
|
The API Suite allows you to easily develop your original SoftEther VPN Server management application to control the VPN Server (e.g. creating users, adding Virtual Hubs, disconnecting a specified VPN sessions).
|
||||||
|
|
||||||
|
You can access to the [latest SoftEther VPN Server JSON-RPC Document on GitHub.](https://github.com/SoftEtherVPN/SoftEtherVPN/tree/master/developer_tools/vpnserver-jsonrpc-clients/)
|
||||||
|
|
||||||
|
- Almost all control APIs, which the VPN Server provides, are available as JSON-RPC API.
|
||||||
|
You can write your own VPN Server management application in your favorite languages (JavaScript, TypeScript, Java, Python, Ruby, C#, ... etc.)
|
||||||
|
- If you are planning to develop your own VPN cloud service, the JSON-RPC API is the best choice to realize the automated operations for the VPN Server.
|
||||||
|
- No need to use any specific API client library since all APIs are provided on the JSON-RPC 2.0 Specification. You can use your favorite JSON and HTTPS client library to call any of all APIs in your pure runtime environment.
|
||||||
|
- Also, the SoftEther VPN Project provides high-quality JSON-RPC client stub libraries which define all of the API client stub codes. These libraries are written in C#, JavaScript and TypeScript. The Node.js Client Library for VPN Server RPC (vpnrpc) package is also available.
|
||||||
|
|
||||||
|
|
||||||
|
# Using SoftEther without installation
|
||||||
|
|
||||||
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 !
|
||||||
By SoftEther VPN Open-Source Project
|
By SoftEther VPN Open-Source Project
|
||||||
http://www.softether.org/
|
https://www.softether.org/
|
||||||
|
@ -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.
|
||||||
http://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%
|
|
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.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user