1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-06-28 11:55:08 +03:00

Compare commits

..

1248 Commits

Author SHA1 Message Date
Ilya Shipitsin
12ed43f6eb
Merge pull request #2126 from kiraware/fix-indonesian-translation
Fix Indonesian translation with printf formatting
2025-05-09 07:43:12 +02:00
Kira
d8bcb863f5
rephrase the string 2025-05-09 11:37:21 +07:00
Kira
7228de494d
rephrase the string 2025-05-09 11:34:45 +07:00
Kira
afa848454a
fix printf formatting 2025-05-09 10:34:53 +07:00
Ilya Shipitsin
6f76880767
Merge pull request #2124 from kiraware/add-id-translation
Add id translation
2025-05-08 18:25:54 +02:00
Ilya Shipitsin
cb9ccf41a5
Merge pull request #2125 from AhmadReza6610/master
Add iOS client implementation with SoftEther protocol handshake support
2025-05-08 18:22:14 +02:00
Ahmad Reza
62c71ebe5c Add iOS client implementation with SoftEther protocol handshake support 2025-05-04 14:02:44 +03:30
Kira
80bab0f7d7
fix errors 2025-05-01 10:43:45 +07:00
kiraware
c742f6c5cf
Merge branch 'SoftEtherVPN:master' into add-id-translation 2025-04-30 10:53:52 +07:00
Kira
7a6a1e2ed0
add translation for strtable_id.stb 2025-04-30 10:50:27 +07:00
Ilya Shipitsin
e1ec3d42e5
Merge pull request #2072 from korokke2/master
Update description
2025-04-14 00:05:51 +02:00
Ilya Shipitsin
6e9247fff1
Merge pull request #2119 from weidi/patch-1
set static hostname in docker-compose so ddns feature works cross restarts
2025-04-13 21:58:38 +02:00
weidi
80179d5cc5
Update docker-compose.yaml
Fixes SoftEtherVPN/SoftetherVPN-docker#15 by configuring static hostname
2025-04-13 21:13:32 +02:00
Ilya Shipitsin
2265435d62
Merge pull request #2117 from chipitsine/master
CI: use system cpu_features
2025-04-08 23:17:32 +02:00
Ilia Shipitsin
b4916f20af CI: use system cpu_features 2025-04-08 23:00:13 +02:00
Ilya Shipitsin
260bc09276
Merge pull request #2092 from metalefty/cpu_features
cpu_features improvements
2025-04-08 22:56:47 +02:00
Kira
d01781d537
add indonesian translation file 2025-03-29 12:01:43 +07:00
Ilya Shipitsin
48042cfbc1
Merge pull request #2106 from chipitsine/master
CI: docker: fix tags
2025-02-17 16:40:43 +01:00
Ilia Shipitsin
a7a7eef82b CI: docker: fix tags 2025-02-17 16:02:24 +01:00
Ilya Shipitsin
a4c3713f4b
Merge pull request #2104 from chipitsine/docker_ci_followup
Docker ci followup
2025-02-16 21:32:49 +01:00
Ilia Shipitsin
abc516757e CI: mention temporary qemu version pin 2025-02-16 20:58:30 +01:00
Ilia Shipitsin
3fee01e1cf CI: limit docker ci to SoftEtherVPN repo only 2025-02-16 20:56:47 +01:00
Ilya Shipitsin
b3dfdc2ad0
Merge pull request #2102 from weidi/docker-ci
build arm and x86 as one tag
2025-02-16 20:53:28 +01:00
Ilya Shipitsin
8d06ac3348
Merge pull request #2103 from chipitsine/modernize_freebsd
CI: cirrus-ci: bump FreeBSD image to 14-2
2025-02-16 18:32:08 +01:00
Ilia Shipitsin
9d1c3306e0 CI: cirrus-ci: bump FreeBSD image to 14-2 2025-02-16 17:41:05 +01:00
weidi
7729966c50 Add README and remove no longer required Actions 2025-02-16 16:49:25 +01:00
weidi
591cf0e9b9 run all build sequentially, should help with caching layers 2025-02-10 21:40:34 +01:00
weidi
39996ab0a2 build arm and x86 as one tag 2025-02-10 21:16:41 +01:00
Ilya Shipitsin
f525b4d660
Merge pull request #2101 from chipitsine/master
CI: move docker build machinery to the main repo
2025-02-10 19:59:22 +01:00
Ilia Shipitsin
a081fdd5c8 CI: move docker build machinery to the main repo
more details: https://github.com/SoftEtherVPN/SoftetherVPN-docker/issues/4
2025-02-09 23:32:26 +01:00
Koichiro Iwao
10a2806f12 CI: Use system's cpu_features in FreeBSD CI 2025-01-15 17:09:18 +09:00
Ilya Shipitsin
2628ac1884
Merge pull request #2091 from siddharth-narayan/oqs-submodule-update
Update liboqs and oqs-provider submodules - Add X25519MLKEM768 NIST f…
2025-01-15 07:22:50 +01:00
Siddharth
972256c578 Update liboqs and oqs-provider submodules - Add X25519MLKEM768 NIST finalized PQ Key exchange 2025-01-14 17:37:55 -06:00
Koichiro Iwao
e2e8193495 Improve the usage of cpu_features
- Add USE_SYSTEM_CPU_FEATURES flag to use system's cpu_features
  instead of the bundled one
- Allow the use of cpu_features for more architectures on Linux [1]

[1] https://github.com/google/cpu_features/tree/v0.9.0?tab=readme-ov-file#whats-supported
2025-01-14 22:58:20 +09:00
Koichiro Iwao
71b6aa7a8c Update cpu_features to 0.9.0 2025-01-14 18:09:18 +09:00
Ilya Shipitsin
8be6d756b8
Merge pull request #2089 from metalefty/drop_exec
Drop unnecessary exec permission
2025-01-14 07:36:11 +01:00
Koichiro Iwao
a6c5f0d135 Drop unnecessary exec permission 2025-01-14 14:35:34 +09:00
Ilya Shipitsin
c2487c6b2e
Merge pull request #2086 from Mastemmah/ArtifactsPublising
Adding artifact publishing for Linux
2025-01-07 11:26:05 +01:00
Matt Rodak
817214da1f Adding artifact publishing for Linux
Simple Workflow change to download deb packages created within the Linux workflow
2025-01-07 00:13:06 +01:00
Ilya Shipitsin
015f93f7b7
Merge pull request #2082 from chipitsine/master
stbchecker: modernize .net version
2024-12-15 01:18:01 +01:00
Ilia Shipitsin
cdd3bddcc6 stbchecker: modernize .net version 2024-12-15 00:55:46 +01:00
Ilya Shipitsin
0a1f0913d9
Merge pull request #2081 from chipitsine/master
CI: modernize macos versions
2024-12-15 00:49:45 +01:00
Ilia Shipitsin
18cbd4627a CI: modernize macos versions 2024-12-15 00:25:35 +01:00
korokke2
a8bc827706
Update description
Updated with the most recent and appropriate description.
2024-11-12 12:06:06 +09:00
Ilya Shipitsin
e475d70c0b
Merge pull request #2056 from nynauy/nynauy-systemd-patch
Correct and simplify systemd service files
2024-09-24 16:47:23 +02:00
Ilya Shipitsin
e94240d9a0
Merge pull request #2033 from siddharth-narayan/nt-fix
Fix "Not on NT" error message and add uihelp to vpncmd
2024-09-21 21:59:10 +02:00
nynauy
023eb3465d
Correct and simplify systemd service files
Remove unnecessary wrappers and change to start services directly. Also remove misused "EnvironmentFile" and unrecommended "KillMode=process".
2024-09-17 07:03:19 +08:00
Ilya Shipitsin
5d1ce1a2cd
Merge pull request #2051 from chipitsine/master
bump version for upcoming 5187 release
2024-09-09 21:57:51 +02:00
Ilia Shipitsin
d8569ad31a bump version for upcoming 5187 release 2024-09-09 21:12:38 +02:00
Ilya Shipitsin
e3e0c33e3b
Merge pull request #2044 from Evengard/fix2043
Incorrect variable used while iterating through sessions which makes the loop stuck
2024-09-09 21:06:40 +02:00
Ilya Shipitsin
9f01143c83
Merge pull request #2045 from SoftEtherVPN/dependabot/npm_and_yarn/src/bin/hamcore/wwwroot/admin/default/webpack-5.94.0
Bump webpack from 5.76.0 to 5.94.0 in /src/bin/hamcore/wwwroot/admin/default
2024-08-30 15:54:45 +02:00
dependabot[bot]
93df1ee631
Bump webpack in /src/bin/hamcore/wwwroot/admin/default
Bumps [webpack](https://github.com/webpack/webpack) from 5.76.0 to 5.94.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.76.0...v5.94.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-30 10:46:29 +00:00
Evengard
8f0deb576c Incorrect variable used while iterating through sessions which makes the loop stuck 2024-08-25 15:36:50 +03:00
siddharth-narayan
27d233a522
Merge branch 'SoftEtherVPN:master' into nt-fix 2024-08-15 04:28:13 -04:00
Siddharth
128fefc63e Add UI helper to vpncmd on Windows 2024-08-15 04:26:15 -04:00
Ilya Shipitsin
31fed5a28f
Merge pull request #2036 from icy17/null-check3
Fix potential NULL pointer dereference
2024-08-14 22:08:43 +02:00
Ilya Shipitsin
a8ce56b28b
Merge pull request #2041 from e-kud/update-cmake
Update minimal cmake version to 3.15
2024-08-13 00:25:22 +02:00
Evgeny Kudryashov
08e24917b8 Update minimal cmake version to 3.15
* 3.12 is required for add_compile_definitions
* 3.15 is required for CMP0091 policy
2024-08-12 22:26:51 +02:00
icy17
e2017772c7 Fix potential NULL pointer dereference 2024-08-01 15:43:34 +08:00
Ilya Shipitsin
a836b3bd5e
Merge pull request #2022 from siddharth-narayan/built-in-post-quantum
Add built in post quantum functionality
2024-07-19 20:05:47 +02:00
Siddharth
3a25c6bf73 Fix incorrect "Not on NT" error messages 2024-07-17 15:16:11 -07:00
Siddharth
67fe99e1dc Move duplicated code to one place 2024-07-16 02:33:16 -04:00
Ilya Shipitsin
4e8f797036
Merge pull request #2019 from LinearAlpha/patch-1
URL for Nightly builds  for windows is updated
2024-07-10 21:43:09 +02:00
Ilia Shipitsin
b1bdc03cd7 adjust nightly/releases links 2024-07-10 21:34:31 +02:00
Siddharth
d4d20e4443 Remove testing code 2024-07-04 13:56:13 -04:00
Ilya Shipitsin
c76f11a523
Merge pull request #2026 from siddharth-narayan/fedora-fix-engine
Fix openssl engine support on Fedora Rawhide
2024-07-04 19:26:11 +02:00
Siddharth
a45219bb78 Revert "Fix engine include errors on Fedora Rawhide"
This reverts commit 1d57ccf94a.
2024-07-04 13:15:50 -04:00
siddharth-narayan
25585a1e3d
Guard engine.h include 2024-07-04 13:05:30 -04:00
siddharth-narayan
4370efcc90
replace openssl-devel with openssl-devel-engine 2024-07-04 13:02:16 -04:00
Siddharth
1d57ccf94a Fix engine include errors on Fedora Rawhide 2024-07-04 06:55:06 -04:00
siddharth-narayan
04912037c0
Merge branch 'SoftEtherVPN:master' into built-in-post-quantum 2024-07-03 20:12:21 -04:00
Ilya Shipitsin
b8fbb3e3d8
Merge pull request #2025 from chipitsine/fedora_pull_request
CI: enable Fedora Rawgide on pull requests
2024-07-03 23:43:19 +02:00
Ilia Shipitsin
98a8d5249d CI: enable Fedora Rawgide on pull requests 2024-07-03 23:21:44 +02:00
Ilya Shipitsin
dd2a53e049
Merge pull request #2024 from chipitsine/master
bump version for upcoming 5186 release
2024-07-03 21:16:01 +02:00
Ilia Shipitsin
7ce9c088ff bump version for upcoming 5186 release 2024-07-03 19:20:14 +02:00
Siddharth
1f9ce6f9c2 Skip oqsprovider build when OpenSSL version is less than 3.0 2024-06-28 17:05:52 -04:00
Siddharth
28ded982a7 Remove empty OpenSSL version guard 2024-06-28 14:18:48 -04:00
siddharth-narayan
de9c566f33
Merge branch 'SoftEtherVPN:master' into built-in-post-quantum 2024-06-28 13:43:55 -04:00
Siddharth
0af6c96d88 Skip tests for oqsprovider 2024-06-28 04:01:30 -04:00
Siddharth
c2c1388f8c Update liboqs and oqs-provider git submodules 2024-06-28 04:00:51 -04:00
Siddharth
d15f92c9b2 Make oqsprovider not build tests 2024-06-28 04:00:51 -04:00
Siddharth
7dc3f2240c Add liboqs with find_package 2024-06-26 20:55:09 -04:00
Ilya Shipitsin
c2a7aa5481
Merge pull request from GHSA-j35p-p8pj-vqxq
src/Cedar/Proto_IKE.c: ignore packets with no IPSec SA
2024-06-22 18:57:28 +02:00
Ilia Shipitsin
6f57449164 src/Cedar/Proto_IKE.c: ignore packets with no IPSec SA
many thanks to Jonathan Phillibert from Amazon Web Services
for investigating and reporting that responding to such packets
might lead to traffic amplification
2024-06-22 18:53:35 +02:00
Minpyo Kim
48f6bc57cc
URL for Nightly builds is updated
Based on issue #1993, the build has been moved from Azure to Github.
2024-06-22 23:43:23 +09:00
Siddharth
eb66e7d360 That's not how you comment in C! 2024-06-21 15:16:27 -04:00
Siddharth
13e6369db3 Add liboqs because it isn't normally packaged 2024-06-21 15:14:49 -04:00
Siddharth
102485a4b8 Add oqsprovider statically (built in) by default 2024-06-20 22:08:38 -04:00
Ilya Shipitsin
bc31a5cfd3
Merge pull request #2002 from siddharth-narayan/quantum-safe-key-agreement
Add Post Quantum key agreement
2024-06-18 22:41:52 +02:00
Siddharth
68964ab0d7 Guard variables with OpenSSL version 2024-06-18 16:09:10 -04:00
siddharth-narayan
bf3c50fde4
Merge branch 'SoftEtherVPN:master' into quantum-safe-key-agreement 2024-06-18 14:55:45 -04:00
Siddharth
b06486b37d Remove unecessary provider include 2024-06-18 00:01:58 -04:00
Ilya Shipitsin
26c61b3213
Merge pull request #2014 from SoftEtherVPN/dependabot/npm_and_yarn/src/bin/hamcore/wwwroot/admin/default/braces-3.0.3
Bump braces from 3.0.2 to 3.0.3 in /src/bin/hamcore/wwwroot/admin/default
2024-06-17 17:45:14 +02:00
Ilya Shipitsin
1bea86ef94
Merge pull request #2006 from hiura2023/master
Change ssl error handler: Having to read all of the errors using ERR_get_error.
2024-06-17 17:36:55 +02:00
dependabot[bot]
6825234e0a
Bump braces in /src/bin/hamcore/wwwroot/admin/default
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-17 15:36:07 +00:00
Ilya Shipitsin
a794726a07
Merge pull request #2011 from SoftEtherVPN/dependabot/npm_and_yarn/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/braces-3.0.3
Bump braces from 3.0.2 to 3.0.3 in /developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package
2024-06-17 17:35:33 +02:00
dependabot[bot]
dae352104c
Bump braces
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-16 09:58:05 +00:00
Ilya Shipitsin
4fe5352931
Merge pull request #2007 from metalefty/freebsd-ci
CI: Update to FreeBSD 14.0-RELEASE
2024-06-09 17:23:48 +02:00
Koichiro Iwao
ebe52afa9a CI: Update to FreeBSD 14.0-RELEASE
since FreeBSD 13.2 image is no longer available on the CI platform.
2024-06-09 21:33:46 +09:00
hiura2023
c06e5ad1dd
Merge branch 'SoftEtherVPN:master' into master 2024-06-08 02:30:04 +09:00
hiura
b2ec1bd5dd Change ssl error handler: Having to read all of the errors using ERR_get_error 2024-06-08 02:28:28 +09:00
Ilya Shipitsin
bfaff4fdb0
Merge pull request #1994 from hiura2023/master
Fix Virtual DHCP Server: Correct IP reassignment
2024-05-27 13:13:40 +02:00
hiura
08213b7f0e CHANGE ERROR HANDLER FOR SSL ERROR: Change of indent 2024-05-26 23:50:05 +09:00
hiura
98852b77d9 CHANGE ERROR HANDLER FOR SSL ERROR: 2024-05-26 23:36:21 +09:00
Ilya Shipitsin
645a078f8e
Merge pull request #2003 from djony/master
Minor russian traslation update
2024-05-22 18:40:57 +02:00
djony
af2196468a
Update strtable_ru.stb 2024-05-22 17:40:11 +03:00
djony
42647480b0
Update strtable_ru.stb 2024-05-22 17:02:03 +03:00
djony
60496ac7fb
Merge branch 'SoftEtherVPN:master' into master 2024-05-22 16:26:44 +03:00
siddharth-narayan
63ffab9ee4
Merge branch 'SoftEtherVPN:master' into quantum-safe-key-agreement 2024-05-20 23:20:52 -04:00
Siddharth
2fe4ca0f8c Fix incorrect PQ_GROUP_LIST string 2024-05-20 21:46:57 -04:00
Siddharth
a50d8910ba Add PQ Groups and the provider for them 2024-05-20 19:48:23 -04:00
Ilya Shipitsin
315ffffeec
Merge pull request #2001 from chipitsine/ci_drop_macos_11
CI: drop macos-11
2024-05-20 23:37:52 +02:00
Ilia Shipitsin
141060101d CI: drop macos-11
more details: https://github.blog/changelog/2024-05-20-actions-upcoming-changes-to-github-hosted-macos-runners/
2024-05-20 21:50:07 +02:00
hiura
5a88b34ddb Fix Virtual DHCP Server: Correct IP reassignment 2024-05-08 10:55:00 +09:00
Ilya Shipitsin
7006539732
Merge pull request #1992 from chipitsine/macos_14
CI: add macos-14
2024-05-04 22:16:00 +02:00
Ilya Shipitsin
8ad34b2012
Merge pull request #1991 from chipitsine/master
bump version for upcoming 5185 release
2024-05-04 22:04:21 +02:00
Ilia Shipitsin
186d48fba2 CI: add macos-14 2024-05-04 21:25:39 +02:00
Ilia Shipitsin
37231ac006 bump version for upcoming 5185 release 2024-05-04 21:23:00 +02:00
Ilya Shipitsin
9378c341f7
Merge pull request #1989 from hiura2023/master
Fix Virtual DHCP Server: Correct DHCP Sequence
2024-05-04 20:47:48 +02:00
Ilya Shipitsin
99e277aa71
Merge pull request #1986 from panakuma/fix-cmake-lib-dir
Change var of CMAKE_INSTALL_RPATH
2024-05-04 20:45:49 +02:00
hiura2023
bcb896b178
Merge branch 'SoftEtherVPN:master' into master 2024-05-03 17:19:47 +09:00
hiura
6e5395cc8d Fix Virtual DHCP Server: Correct DHCP renewal request 2024-05-03 17:18:13 +09:00
Ilya Shipitsin
9ce27f363e
Merge pull request #1990 from SoftEtherVPN/fix1972
Fix memory access error when IPv6 prefix reading, should resolve #1972
2024-04-28 17:25:16 +02:00
Evengard
d568cc1727 Fix another memory access error again because of a missing MAC address in IPv6 headers 2024-04-27 21:57:36 +03:00
Evengard
c9b5e25c87 Fix memory access error when IPv6 prefix reading, should resolve #1972 2024-04-27 02:01:48 +03:00
hiura
7f074d0c0b Fix Virtual DHCP Server: Correct HDCP Sequence 2024-04-26 12:42:27 +09:00
panakuma
f8c5fa5384 Change var of CMAKE_INSTALL_RPATH 2024-04-20 00:48:24 +09:00
Ilya Shipitsin
74f7269ef6
Merge pull request #1679 from tickerguy/tickerguy-patch-1
BridgeUnix.c: Disable MTU changes on FreeBSD
2024-04-19 16:46:16 +02:00
Ilya Shipitsin
41f83c9e32
Merge pull request #1840 from RoelvandeWiel/issue1838
Changed 'settng' to 'setting' and regenerated the RPC docs
2024-04-17 20:53:42 +02:00
Ilya Shipitsin
f66866fda1
Merge pull request #1984 from chipitsine/prepare_5184
bump version for upcoming 5184 release
2024-04-17 14:54:54 +02:00
Ilia Shipitsin
071a87297b bump version for upcoming 5184 release 2024-04-17 13:20:04 +02:00
Ilya Shipitsin
cd86bd810d
Merge pull request #1983 from chipitsine/master
cleanup deprecated CI
2024-04-17 09:29:16 +02:00
Ilia Shipitsin
831905d281 doc: remove badges of deprecated CI 2024-04-17 09:18:00 +02:00
Ilia Shipitsin
5ee8e3f00c CI: cleanup azure pipeline helpers 2024-04-17 09:10:07 +02:00
Ilya Shipitsin
2f9f157a1e
Merge pull request #1982 from chipitsine/master
simplify windows CI, create windows installer automatically on release
2024-04-17 08:32:17 +02:00
Ilya Shipitsin
5cf45ad62b
Merge pull request #1981 from hiura2023/master
Fix 'RemoveDefGwOnDhcpForLocalhost' function No.2: Change the minimum size of DHCP reply
2024-04-16 22:31:21 +02:00
Ilia Shipitsin
c838ba0009 CI: create windows installer on release 2024-04-16 22:26:51 +02:00
Ilia Shipitsin
9982e128ef CI: simplify GHA windows workflow 2024-04-16 22:26:00 +02:00
hiura2023
ac28302b59
Merge branch 'SoftEtherVPN:master' into master 2024-04-16 19:16:20 +09:00
hiura
9a009d750a Use macro 'MAX' instead of 'max' 2024-04-16 19:14:44 +09:00
hiura
c36d7187a8 Fix 'RemoveDefGwOnDhcpForLocalhost' function No.2: Change the minimum size of DHCP reply 2024-04-16 10:30:10 +09:00
Ilya Shipitsin
465df16505
Merge pull request #1980 from Alexey-I/master
OpenVPN certificate authorization with cn_username in 'email' format
2024-04-14 10:58:27 +02:00
Ilya Shipitsin
723d8e0682
Merge pull request #1979 from chipitsine/master
CI: drop app veyor in favour of GHA
2024-04-14 10:37:35 +02:00
Ilya Shipitsin
6582955cfa
Update src/Cedar/Protocol.c
Co-authored-by: Davide Beatrici <github@davidebeatrici.dev>
2024-04-14 10:36:55 +02:00
Alexey Ivanov
71d71e51db OpenVPN certificate authorization with cn_username in 'email' format 2024-04-12 23:08:24 +05:00
Ilia Shipitsin
74ea87d725 CI: drop app veyor in favour of GHA 2024-04-12 12:44:19 +02:00
Ilya Shipitsin
ca832a9cef
Merge pull request #1977 from chipitsine/master
CI: move linux builds to GHA, drop ADO
2024-04-10 21:33:16 +02:00
Ilia Shipitsin
23e9f74e7e CI: move linux builds to GHA, drop ADO 2024-04-07 17:16:45 +02:00
Ilya Shipitsin
7b9fd5bdcd
Merge pull request #1976 from chipitsine/master
Windows CI: migrate ADO --> Github Actions
2024-04-06 23:42:06 +02:00
Ilya Shipitsin
53b7db3578
Merge pull request #1973 from hiura2023/master
Fix "RemoveDefGwOnDhcpForLocalhost" function: Change to exclude unplugged device from MAC address list.
2024-04-06 16:34:03 +02:00
Ilia Shipitsin
4c1eeb717b CI: harden artifacts upload 2024-04-05 22:15:35 +02:00
Ilia Shipitsin
7981e16e0b CI: add windows GitHub Actions 2024-04-05 22:09:39 +02:00
Ilia Shipitsin
62e7f0ba8a CI: adopt windows_build.bat for GitHub actions 2024-04-05 22:08:51 +02:00
hiura2023
2dbebe271d
Merge branch 'SoftEtherVPN:master' into master 2024-03-31 23:10:42 +09:00
hiura
eb793dc257 Merge branch 'master' of https://github.com/hiura2023/SoftEtherVPN 2024-03-31 23:08:12 +09:00
hiura
97203568e7 Fix 'RemoveDefGwOnDhcpForLocalhost' function: Change to exclude unplugged device from MAC address list. 2024-03-31 23:07:16 +09:00
Ilya Shipitsin
9c0b5f7001
Merge pull request #1970 from chipitsine/master
bump version for upcoming 5183 release
2024-03-26 09:04:38 +01:00
Ilya Shipitsin
a39560749d
Merge pull request #1969 from hiura2023/master
Fix "Session Timeouted.":  Change the time for checking wether all the TCP connectins are alive or not.
2024-03-24 20:21:24 +01:00
Ilya Shipitsin
495cddd518 bump version for upcoming 5183 release 2024-03-24 20:18:38 +01:00
hiura2023
0d9b4faae3
Merge branch 'SoftEtherVPN:master' into master 2024-03-24 19:13:07 +09:00
hiura
e8c14cba68 Fix 'Session Timeouted.': Change the time for checking wether all the TCP connectins are alive or not. 2024-03-24 19:11:24 +09:00
Ilya Shipitsin
ff37c35cfa
Merge pull request #1966 from hiura2023/master
Fix hamcore access: Correcting path separator for hamcore.
2024-03-17 04:56:15 +01:00
hiura
56c12de929 Merge branch 'master' of https://github.com/hiura2023/SoftEtherVPN 2024-03-16 13:02:38 +09:00
hiura
2789b16c12 Fix hamcore access: Correcting path separator for hamcore. 2024-03-16 12:52:46 +09:00
Ilya Shipitsin
f6c185f279
Merge pull request #1963 from hiura2023/master
Change bridge function: Make the NIC appear in the "Local Bridge Settings" list
2024-03-11 20:52:35 +01:00
hiura2023
44821c7130
Merge branch 'SoftEtherVPN:master' into master 2024-03-11 02:27:36 +09:00
hiura
64cb8e1eff Change bridge function: Make the NIC appear in the 'Local Bridge Settings' list No.2 2024-03-11 00:16:22 +09:00
Ilya Shipitsin
fc7093ed36
Merge pull request #1965 from metalefty/issue-template
New issue form
2024-03-08 08:26:27 +01:00
Koichiro Iwao
370d83ffa0 Introduce new issue form 2024-03-08 14:16:59 +09:00
hiura
645d5ebb55 Change bridge function: Make the NIC appear in the 'Local Bridge Settings' list regardless of a NULL character consisted in 'FriendlyName' 2024-03-06 11:33:56 +09:00
Ilya Shipitsin
09b7e4f6e5
Merge pull request #1960 from libnumafly/patch-2
Update BUILD_UNIX.md for fix location
2024-02-26 21:49:46 +01:00
Kensei Sakai
0dfc82c14e
Update BUILD_UNIX.md for fix location
# Using SoftEther without installation
Correct location for build output dir.
2024-02-27 03:27:20 +09:00
Ilya Shipitsin
48cb3fdebe
Merge pull request #1958 from tew42/master
Update BuildNumber to match (next) tagged release
2024-02-24 22:45:10 +01:00
Thomas Winkler
913934f7c0
Update CMakeSettings.json with version bump (upcoming 5182) 2024-02-24 22:24:41 +01:00
Thomas Winkler
442885deb5
Update CMakeLists.txt with version bump (upcoming 5182) 2024-02-24 22:24:15 +01:00
Ilya Shipitsin
d4dbf3cdc5
Merge pull request #1956 from chipitsine/ignore_vcpkg_installed
add "vcpkg_installed" to gitignore
2024-02-24 11:03:41 +01:00
Ilya Shipitsin
b58d57ffeb
Merge pull request #1954 from chipitsine/gcc_14_fix
adjust types of variables found by gcc14
2024-02-24 10:45:17 +01:00
Ilya Shipitsin
01b05af333
add "vcpkg_installed" to gitignore 2024-02-23 16:28:11 +01:00
Ilya Shipitsin
60ee463044 adjust types of variables
gcc14 is not happy on "error: passing argument .. from incompatible pointer type [-Wincompatible-pointer-types]"
2024-02-23 11:06:27 +01:00
Ilya Shipitsin
36456e63a6
Merge pull request #1953 from hiura2023/master
IPC.c: Cast the pointer to a defined size due to the error in compiling.
2024-02-21 21:49:53 +01:00
hiura
4e4bd79ad2 IPC.c:Cast the pointer to a defined size due to the error in compiling. 2024-02-20 12:01:35 +09:00
Ilya Shipitsin
dc2b11918a
Merge pull request #1933 from chipitsine/master
CI: use OPENSSL_ROOT_DIR for cirrus-ci builds
2023-12-03 14:08:34 +01:00
Ilya Shipitsin
7398bf2724 CI: use OPENSSL_ROOT_DIR for cirrus-ci builds 2023-12-02 22:30:26 +01:00
Ilya Shipitsin
ff4b74afda
Merge pull request #1929 from chipitsine/pr_1921_followup
fix nullptr deref
2023-12-01 17:18:40 +01:00
Ilya Shipitsin
e6792d8893 fix nullptr deref
Co-authored-by: icy17 <1061499390@qq.com>
2023-11-19 10:57:28 +01:00
Ilya Shipitsin
8cde812157
Merge pull request #1924 from hiura2023/master
Fix azure pipelines: Publish separate artifacts for both x64 and x86.
2023-11-10 13:49:45 +01:00
hiura
3574f8aa98 Fix azure pipelines: Publish separate artifacts for both x64 and x86. 2023-11-02 18:42:12 +09:00
Ilya Shipitsin
9429243dbe
Merge pull request #1906 from hiura2023/master
Fix access violation: correct typing mistake in calling Debug().
2023-11-01 10:26:37 +01:00
Yihong Wu
895c16e3e8 Revert "README.md: Add me to members"
This reverts commit 1f40de2dda.
2023-10-15 06:13:59 +00:00
Davide Beatrici
6a170ac691
Merge PR #1911: Fix 7 vulnerabilities, add softether.net after-2038 year certificate hash, add vpncmd message about Developer Edition 2023-10-09 18:01:47 +02:00
Daiyuu Nobori
6dbf7e9ae2 Showing an explanation of the purpose of the Developer Edition and the difference from the Stable Editon by Daiyuu Nobori 2023-10-09 17:14:32 +02:00
Daiyuu Nobori
54ae7f725b Add four new certificate hashes to the DDNS_CERT_HASH list by Daiyuu Nobori. These certificates will be used to University of Tsukuba's built-in "softether.net" DDNS server after year 2038. 2023-10-09 17:14:32 +02:00
Daiyuu Nobori
35077deaf1 Fix Vulnerability: CVE-2023-25774 TALOS-2023-1743
SoftEther VPN vpnserver ConnectionAccept () denial of service vulnerability
2023-10-09 17:13:57 +02:00
Daiyuu Nobori
3b932f5fee Fix Vulnerability: CVE-2023-27516 TALOS-2023-1754 and CVE-2023-32634 TALOS-2023-1755
SoftEther VPN CiRpcAccepted () authentication bypass vulnerability
and SoftEther VPN CiRpcServerThread () MitM authentication bypass vulnerability
https://www.softether.org/9-about/News/904-SEVPN202301
https://jvn.jp/en/jp/JVN64316789/
2023-10-07 04:42:41 +02:00
Daiyuu Nobori
f4bbe476be Fix Vulnerability: CVE-2023-32275 TALOS-2023-1753
SoftEther VPN CtEnumCa () information disclosure vulnerability
https://www.softether.org/9-about/News/904-SEVPN202301
https://jvn.jp/en/jp/JVN64316789/
2023-10-07 04:42:41 +02:00
Daiyuu Nobori
2dec52b875 Heap area protection of memory has been enhanced.
When memory is released and reallocated, a random security value called a canary is written to the before/after area of memory, and if the value has been modified, the process is terminated (restarted) for safety, assuming it is a buffer overflow of the memory area. This feature may effectively prevent confidentiality or integrity violations in the event that some heap area overflow vulnerability is discovered in this system in the future.
2023-10-07 04:42:34 +02:00
Daiyuu Nobori
c49e462ed1 Fix Vulnerability: CVE-2023-22325 TALOS-2023-1736
SoftEther VPN DCRegister DDNS_RPC_MAX_RECV_SIZE denial of service vulnerability
https://www.softether.org/9-about/News/904-SEVPN202301
https://jvn.jp/en/jp/JVN64316789/
2023-09-28 18:26:17 +09:00
Daiyuu Nobori
b8e542105f Fix Vulnerability: CVE-2023-27395 TALOS-2023-1735
SoftEther VPN vpnserver WpcParsePacket () heap-based buffer overflow vulnerability
https://www.softether.org/9-about/News/904-SEVPN202301
https://jvn.jp/en/jp/JVN64316789/
2023-09-28 18:24:12 +09:00
Ilya Shipitsin
18dc2621ec
Merge pull request #1905 from chipitsine/master
fix windows build
2023-09-17 21:02:58 +02:00
hiura
f57f05a599 Bind outgoing connection to a specific IP address (fix a bug) 2023-09-17 16:36:57 +09:00
Ilya Shipitsin
f736d18267 temporarily suppress clang warnings on "-Wincompatible-function-pointer-types" 2023-09-16 00:03:03 +02:00
Ilya Shipitsin
1be55ebb94 src/vpndrvinst/main.c: add missing header file 2023-09-16 00:02:29 +02:00
Ilya Shipitsin
d8dec75bc5
Merge pull request #1903 from puripuri2100/fix-missing-arg-name
Fix missing argument name in strtable file
2023-09-15 14:27:22 +02:00
puripuri2100
fc2a33d1f3 fix missing arg 2023-09-15 09:39:11 +09:00
Ilya Shipitsin
68615fe64e
Merge pull request #1902 from chipitsine/master
add missing localization
2023-09-13 12:21:02 +02:00
Ilya Shipitsin
2fd6c0b76a add missing localization
this is a follow up of
https://github.com/SoftEtherVPN/SoftEtherVPN/pull/1867

English localization is added for now
2023-09-12 22:43:01 +02:00
Ilya Shipitsin
6833a7a11d
Merge pull request #1901 from hiura2023/master
Bind outgoing connection to a specific IP address (avoid illegal access)
2023-09-12 09:39:18 +02:00
hiura
643cbbbf88 Bind outgoing connection to a specific IP address (avoid illegal access) 2023-09-12 10:20:51 +09:00
Ilya Shipitsin
205a94cda2
Merge pull request #1867 from hiura2023/master
Bind outgoing connection to a specific IP address
2023-09-10 17:18:31 +02:00
Ilya Shipitsin
2868ff1ef6
Merge pull request #1897 from puripuri2100/fix_strtable_VpnAzureSetStatus
fixed comments in strtable file
2023-09-01 22:43:29 +02:00
puripuri2100
a9a93a2824 fixed VpnAzureSetStatus to VpnAzureSetEnable 2023-08-31 01:30:15 +09:00
Ilya Shipitsin
979eb803a6
Merge pull request #1894 from chipitsine/master
CI: move stb check from travis-ci to GHA
2023-08-27 21:23:50 +02:00
djony
5e63124bb5
Update strtable_ru.stb 2023-08-27 22:20:11 +03:00
Ilya Shipitsin
68e704097d fix another stb complaints 2023-08-27 21:11:53 +02:00
djony
716ae59f1f
Update strtable_ru.stb 2023-08-27 22:11:51 +03:00
Ilya Shipitsin
8162ca3d12
Merge branch 'SoftEtherVPN:master' into master 2023-08-27 21:01:22 +02:00
Ilya Shipitsin
d9686df302
Merge pull request #1895 from djony/master
Update file strtable_ru.stb
2023-08-27 21:00:43 +02:00
djony
8345deebe4
Add files via upload 2023-08-27 19:21:13 +03:00
Ilya Shipitsin
63595f79c5 fix some missing localization 2023-08-25 22:24:53 +02:00
Ilya Shipitsin
7fe3e6a800 CI: travis: cleanup stb check 2023-08-25 22:07:07 +02:00
Ilya Shipitsin
107c4ba362 CI: add stb check 2023-08-25 22:06:09 +02:00
Ilya Shipitsin
aa65e11fc8 stbchecker: retarget against net7.0 2023-08-25 22:05:08 +02:00
Ilya Shipitsin
519d94f925
Merge pull request #1893 from djony/master
Big Russian language update
2023-08-24 22:53:55 +02:00
djony
950ecc186c
Update strtable_ru.stb 2023-08-24 00:39:17 +03:00
djony
2abd9de923
Update strtable_ru.stb 2023-08-24 00:37:55 +03:00
Ilya Shipitsin
5d8ff7ed4f
Merge pull request #1887 from chipitsine/master
additional error handling if SSL_CTX_new failed
2023-08-16 22:47:14 +02:00
Ilya Shipitsin
8f8677f164 set PPPSetStatus(p, PPP_STATUS_FAIL); in case of failure 2023-08-16 22:32:00 +02:00
Ilya Shipitsin
088b5c2df3 additional error handling if SSL_CTX_new failed
this is a folloup to https://github.com/SoftEtherVPN/SoftEtherVPN/pull/1873
2023-08-16 19:17:18 +02:00
Ilya Shipitsin
acb6a53b31
Merge pull request #1884 from chipitsine/master
CI: enable GHA macos builds
2023-08-15 10:00:06 +02:00
Ilya Shipitsin
e122e964f3 CI: cleanup osx travis-ci due to migration to GHA 2023-08-14 22:10:03 +02:00
Ilya Shipitsin
df108b559d CI: enable macos builds 2023-08-14 22:03:38 +02:00
Ilya Shipitsin
efac849ed7
Merge pull request #1883 from barracuda156/darwin
Fix macOS build: add missing headers
2023-08-14 19:58:06 +02:00
barracuda156
a80d3f2032 TunTap.h: fix for undefined u_char, u_short on MacOS 2023-08-14 15:54:56 +08:00
barracuda156
1cf2e7a8ea Network.h: include forgotten pthread.h for MacOS too 2023-08-14 15:40:53 +08:00
Ilya Shipitsin
137b8ef67a
Merge pull request #1877 from chipitsine/master
CI: get rid of travis-ci coverity wrapper
2023-08-09 07:41:20 +02:00
hiura
c2fe874865 Bind outgoing connection to a specific IP address No.2 2023-08-08 18:14:22 +09:00
Ilya Shipitsin
14fea1f4a2 CI: get rid of travis-ci coverity wrapper 2023-08-08 07:53:58 +02:00
Ilya Shipitsin
f6f2660060
Merge pull request #1869 from metalefty/bsdunixvlan-group
Cedar/VLanUnix: assign virtual interface to softether group
2023-08-07 08:16:17 +02:00
Ilya Shipitsin
5d667e4261
Merge pull request #1876 from chipitsine/fedora_rawhide
CI: introduce monthly Fedora Rawhide builds
2023-08-06 23:29:32 +02:00
Yihong Wu
adccc6b7d4
Merge pull request #1775 from domosekai/radius2
Support more EAP methods for RADIUS auth
2023-08-07 02:50:13 +09:00
Ilya Shipitsin
a2aa254f11 CI: introduce monthly Fedora Rawhide builds
Fedora Rawhide includes latest compilers
2023-08-06 15:43:53 +02:00
Ilya Shipitsin
c0440031e9
Merge pull request #1873 from icy17/master
fix potential crash.
2023-08-05 23:09:56 +02:00
icy17
07733b29cb fix potential crash. 2023-07-30 11:01:09 +00:00
Davide Beatrici
eb785e08fe
Merge PR #1866: Translate GenX25519/GetPublicX25519 command 2023-07-05 09:55:53 +02:00
Davide Beatrici
1493ccb44d
Merge PR #1865: Fix build when NO_VLAN 2023-07-05 09:55:35 +02:00
Koichiro IWAO
49f8112d83 Cedar/VLanUnix: assign virtual interface to softether group
Interface grouping is available on FreeBSD and OpenBSD. This will allow
you to enumerate only SoftEther virtual interfaces or exclude SoftEther
virtual interfaces, and be helpful when making custom scripts to start
DHCP client when virtual interface become up (=VPN connection
established) for example.

Usage examples as follows.

List all interfaces' names available on the system:
```
$ ifconfig -l
vtnet0 lo0 vpn_client0 vpn_client1 vpn_client2
```

Display a list of SoftEther virtual interfaces:
```
$ ifconfig -g softether
vpn_client0
vpn_client1
vpn_client2
```

Display details about SoftEther virtual interfaces that are up:
```
$ ifconfig -a -u -g softether
vpn_client0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        description: SoftEther Virtual Network Adapter
        options=80000<LINKSTATE>
        ether 5e:71:fa:f8:91:4a
        hwaddr 58:9c:fc:10:34:2a
        groups: tap softether
        media: Ethernet autoselect
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        Opened by PID 1445
```

Display details about interfaces except for SoftEther virtual interfaces:
```
$ ifconfig -a -G softether
vtnet0: flags=8863<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=80028<VLAN_MTU,JUMBO_MTU,LINKSTATE>
        ether 58:9c:fc:00:f0:23
        inet6 fe80::5a9c:fcff:fe00:f023%vtnet0 prefixlen 64 scopeid 0x1
        inet 192.168.96.7 netmask 0xffffff00 broadcast 192.168.96.255
        media: Ethernet autoselect (10Gbase-T <full-duplex>)
        status: active
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
        inet 127.0.0.1 netmask 0xff000000
        groups: lo
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
```
2023-07-04 14:38:36 +09:00
Davide Beatrici
5633314981
Merge PR #1868: Fix build on __FreeBSD_version >= 140091 (LLVM 16) 2023-07-04 06:08:21 +02:00
Koichiro Iwao
dcdbce63d5 Fix build on __FreeBSD_version >= 140091 (LLVM 16)
Fails to build after:
https://cgit.freebsd.org/src/commit/?id=a681cba16d8967651a2146385ce44a2bfeb1c4c3

As the commit title is "Bump __FreeBSD_version for llvm 16.0.6 merge",
I suppose LLVM 16 is stricter than LLVM 15. It was building successfully
at least the previous week.

Build log: https://pkg-status.freebsd.org/beefy18/data/main-amd64-default/p4785b313b958_se8efee297c/logs/softether5-5.02.5180.335,2.log

```
[ 32%] Building C object src/Mayaqua/CMakeFiles/mayaqua.dir/Unix.c.o
cd /wrkdirs/usr/ports/security/softether5/work/.build/src/Mayaqua && /usr/bin/cc -DBRIDGE_BPF -DCPU_64 -DHAVE_SSL_CTX_SET_NUM_TICKETS -DNDEBUG -DOS_UNIX -DREENTRANT -DSE_DBDIR=\"/var/db/softether\" -DSE_LOGDIR=\"/var/log/softether\" -DSE_PIDDIR=\"/var/run/softether\" -DSE_TAGNAME=\"5.02.5180-335-g1c0bdb0c/freebsd\" -DTHREADSAFE -DTHREAD_SAFE -DUNIX -DUNIX_BSD -DVPN_SPEED -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_THREADSAFE -D_THREAD_SAFE -Dmayaqua_EXPORTS -I/wrkdirs/usr/ports/security/softether5/work/SoftEtherVPN-5.02.5180-335-g1c0bdb0c/src/. -I/wrkdirs/usr/ports/security/softether5/work/SoftEtherVPN-5.02.5180-335-g1c0bdb0c/src/Mayaqua/. -I/wrkdirs/usr/ports/security/softether5/work/SoftEtherVPN-5.02.5180-335-g1c0bdb0c/src/libhamcore/include -O2 -pipe  -I/usr/local/include/cpu_features -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -fsigned-char -O2 -pipe  -I/usr/local/include/cpu_features -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -DNDEBUG -O2 -std=gnu99 -fPIC -pthread -MD -MT src/Mayaqua/CMakeFiles/mayaqua.dir/Unix.c.o -MF CMakeFiles/mayaqua.dir/Unix.c.o.d -o CMakeFiles/mayaqua.dir/Unix.c.o -c /wrkdirs/usr/ports/security/softether5/work/SoftEtherVPN-5.02.5180-335-g1c0bdb0c/src/Mayaqua/Unix.c
/wrkdirs/usr/ports/security/softether5/work/SoftEtherVPN-5.02.5180-335-g1c0bdb0c/src/Mayaqua/Unix.c:259:18: error: incompatible function pointer types assigning to 'void (*)(int, struct __siginfo *, void *)' from 'void *(int, siginfo_t *, void *)' (aka 'void *(int, struct __siginfo *, void *)') [-Wincompatible-function-pointer-types]
        sa.sa_sigaction = signal_received_for_ignore;
                        ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
```
2023-07-04 08:50:53 +09:00
Ilya Shipitsin
8ac021a38c
Merge pull request #1863 from metalefty/bsdunixvlan-bridge
FreeBSD: Make sure to destroy tap device for bridge
2023-07-03 22:45:37 +02:00
hiura
e4330ca71a bind outgoing connection 2023-06-28 23:18:09 +09:00
Koichiro Iwao
35b5d0640f Translate GenX25519/GetPublicX25519 command 2023-06-21 15:16:47 +09:00
Koichiro Iwao
f88341ce40 Fix case of WireGuard 2023-06-21 15:11:38 +09:00
Koichiro IWAO
0ab5199272 Fix build when NO_VLAN
Occurred at:	 #670
Closes:		#1864

Tested build on FreeBSD with NO_VLAN by modifying CMakeLists.txt like this:

```diff
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c49a3c78..1dad3691 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -93,6 +93,7 @@ if(UNIX)
if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
     add_definitions(-DUNIX_BSD -DBRIDGE_BPF)
+    add_definitions(-DNO_VLAN)
     include_directories(SYSTEM /usr/local/include)
     link_directories(SYSTEM /usr/local/lib)
   endif()
```
2023-06-17 02:18:04 +09:00
Koichiro IWAO
41be858df0 Collect garbage at development 2023-06-17 01:54:36 +09:00
Koichiro IWAO
6665efb822 Remove unnecessary quotation to fix build 2023-06-15 10:17:33 +09:00
Koichiro IWAO
8826484245 Rename macro BRDEST -> BRIDGE for simplicity
UNIX_VLAN_BRDEST_IFACE_PREFIX -> UNIX_VLAN_BRIDGE_IFACE_PREFIX
2023-06-15 00:15:17 +09:00
Koichiro IWAO
09708bc8cb Cedar/BridgeUnix: make sure to destroy tap device for bridge on FreeBSD
Also, rename NewTap/FreeTap to NewBridgeTap/FreeBridgeTap because these
functions are used to create/destroy tap device used for bridge
destination.
2023-06-15 00:15:17 +09:00
Koichiro IWAO
696a9bc0a1 Cedar: Don't hardcode prefix for virtual brige destination 2023-06-15 00:15:17 +09:00
Davide Beatrici
1c0bdb0c30
Merge PR #1860: Cedar/VLanUnix: add description to FreeBSD tap device 2023-06-08 19:09:02 +02:00
Koichiro IWAO
96e4fc040f Cedar/VLanUnix: add description to FreeBSD tap device
$ ifconfig vpn_client
vpn_client: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        description: SoftEther Virtual Network Adapter
        options=80000<LINKSTATE>
        ether 5e:51:5e:48:ea:ef
        hwaddr 58:9c:fc:10:34:2a
        groups: tap
        media: Ethernet autoselect
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        Opened by PID 35981
2023-06-01 16:50:30 +09:00
Davide Beatrici
0f689d9dfc
Merge PR #1859: FreeBSD: Improve client's virtual network interface handling 2023-06-01 09:38:26 +02:00
Koichiro IWAO
867c992111 Cedar/VLanUnix: use space after #ifdef 2023-06-01 15:18:13 +09:00
Koichiro IWAO
96b1961d78 Cedar/VLanUnix: add UnixDestroyTapDevice prototype declaration 2023-06-01 11:57:50 +09:00
Koichiro IWAO
939eb3130e Cedar/Client: Enable CtVLans{Up,Down} on FreeBSD
The same trick also works on FreeBSD. There's no reason to limit it to
Linux.
2023-05-31 17:48:31 +09:00
Koichiro IWAO
0ba7ad392e Cedar/VLanUnix: Enable UnixVLanSetState on FreeBSD 2023-05-31 17:48:31 +09:00
Koichiro IWAO
8482a52522 Cedar/VLanUnix: Make NicDelete work on FreeBSD
In contrast to Linux, FreeBSD's tap devices are still plumbed after fd
closed. The tap device must be destroyed in addition to closing fd
to delete virtual network interfaces used for VPN connection.

NicDelete command now works properly and virtual network interfaces used
by vpnclient are cleaned up when shutting down vpnclient.
2023-05-31 17:48:31 +09:00
Koichiro IWAO
9c33605f5e Cedar: Don't hardcode prefix for UNIX virtual network interface 2023-05-31 17:48:06 +09:00
Ilya Shipitsin
3c70698c35
Merge pull request #1845 from chipitsine/master
introduce security policy, add security reporting link to README.md
2023-05-21 19:16:44 +02:00
Ilya Shipitsin
56b4ebfa65 add github security reporting to README.md 2023-05-14 21:21:03 +02:00
Ilya Shipitsin
c68d93c2e9 introduce security policy 2023-05-14 21:13:42 +02:00
Ilya Shipitsin
2fdd9ec4dc
Merge pull request #1832 from chipitsine/master
src/Cedar/Server.c: fix race condition
2023-05-13 20:42:38 +02:00
Roel van de Wiel
36505e3896 Changed 'settng' to 'setting' and regenerated the RPC docs 2023-05-10 15:09:57 +02:00
Ilya Shipitsin
6ae786d542
Merge pull request #1833 from chipitsine/coverity_fix
several potential null pointer dereferences fix
2023-05-01 09:14:17 +02:00
Ilya Shipitsin
c59df82666 src/Mayaqua/Secure.c: fix potential null pointer dereference
found by coverity

   CID 343528 (#1 of 1): Dereference before null check (REVERSE_INULL)
   check_after_deref: Null-checking name suggests that it may be null,
   but it has already been dereferenced on all paths leading to the
   check.
   438        if (name == NULL || k == NULL || k->private_key == false)
   439        {
   440                sec->Error = SEC_ERROR_BAD_PARAMETER;
   441                return false;
   442        }
2023-05-01 06:18:39 +02:00
Ilya Shipitsin
db7d6c83d5 src/Mayaqua/Secure.c: fix potential null pointer dereference
found by coverity

   CID 343537 (#1 of 1): Dereference before null check (REVERSE_INULL)
   check_after_deref: Null-checking name suggests that it may be null
   but it has already been dereferenced on all paths leading to the
   check.
   664        if (name == NULL)
   665        {
   666                sec->Error = SEC_ERROR_BAD_PARAMETER;
   667                return false;
   668        }
2023-05-01 06:09:38 +02:00
Ilya Shipitsin
a89adaebc3 src/Mayaqua/Secure.c: fix potential null pointer dereference
found by coverity

 CID 343536 (#1 of 1): Dereference before null check (REVERSE_INULL)
 check_after_deref: Null-checking name suggests that it may be null, but
 it has already been dereferenced on all paths leading to the check.
 1339        if (name == NULL || data == NULL || size == 0)
 1340        {
 1341                sec->Error = SEC_ERROR_BAD_PARAMETER;
 1342                return false;
 1343        }
2023-05-01 06:07:19 +02:00
Ilya Shipitsin
c46871688b src/Cedar/Server.c: fix race condition
=================================================================
==1505093==ERROR: AddressSanitizer: heap-use-after-free on address 0x607000366b88 at pc 0x7f72afadc34a bp 0x7f72990fa390 sp 0x7f72990fa388
READ of size 4 at 0x607000366b88 thread T22
    #0 0x7f72afadc349 in GetCaps /home/ilia/SoftEtherVPN/src/Cedar/Server.c:1861
    #1 0x7f72afadc382 in GetCapsInt /home/ilia/SoftEtherVPN/src/Cedar/Server.c:1802
    #2 0x7f72afaf72a5 in GetServerCapsInt /home/ilia/SoftEtherVPN/src/Cedar/Server.c:1098
    #3 0x7f72afaf7318 in GetServerCapsBool /home/ilia/SoftEtherVPN/src/Cedar/Server.c:1104
    #4 0x7f72afaf771e in SiWriteHubCfg /home/ilia/SoftEtherVPN/src/Cedar/Server.c:4887
    #5 0x7f72afaf771e in SiWriteHubCfg /home/ilia/SoftEtherVPN/src/Cedar/Server.c:4824
    #6 0x7f72afaf7c0b in SiWriteHubs /home/ilia/SoftEtherVPN/src/Cedar/Server.c:5548
    #7 0x7f72afaf7c0b in SiWriteHubs /home/ilia/SoftEtherVPN/src/Cedar/Server.c:5515
    #8 0x7f72afaf81d6 in SiWriteConfigurationToCfg /home/ilia/SoftEtherVPN/src/Cedar/Server.c:3166
    #9 0x7f72afaf86bc in SiWriteConfigurationFile /home/ilia/SoftEtherVPN/src/Cedar/Server.c:6593
    #10 0x7f72afaf86bc in SiWriteConfigurationFile /home/ilia/SoftEtherVPN/src/Cedar/Server.c:6569
    #11 0x7f72afaf8914 in SiSaverThread /home/ilia/SoftEtherVPN/src/Cedar/Server.c:6561
    #12 0x7f72afaf8914 in SiSaverThread /home/ilia/SoftEtherVPN/src/Cedar/Server.c:6547
    #13 0x7f72af6e0cfa in ThreadPoolProc /home/ilia/SoftEtherVPN/src/Mayaqua/Kernel.c:872
    #14 0x7f72af6e0cfa in ThreadPoolProc /home/ilia/SoftEtherVPN/src/Mayaqua/Kernel.c:827
    #15 0x7f72af76eeb4 in UnixDefaultThreadProc /home/ilia/SoftEtherVPN/src/Mayaqua/Unix.c:1604
    #16 0x7f72af4ffc56 in start_thread (/lib64/libc.so.6+0x8cc56) (BuildId: 6107835fa7d4725691b2b7f6aaee7abe09f493b2)
    #17 0x7f72af585a6f in __clone3 (/lib64/libc.so.6+0x112a6f) (BuildId: 6107835fa7d4725691b2b7f6aaee7abe09f493b2)

0x607000366b88 is located 24 bytes inside of 72-byte region [0x607000366b70,0x607000366bb8)
freed by thread T0 here:
    #0 0x7f72afed7fc8 in __interceptor_free.part.0 (/lib64/libasan.so.8+0xd7fc8) (BuildId: 9501248886f79bf1482f3e153f794be742818172)
    #1 0x7f72af76ed6f in UnixMemoryFree /home/ilia/SoftEtherVPN/src/Mayaqua/Unix.c:2072

previously allocated by thread T22 here:
    #0 0x7f72afed92ff in malloc (/lib64/libasan.so.8+0xd92ff) (BuildId: 9501248886f79bf1482f3e153f794be742818172)
    #1 0x7f72af76f35d in UnixMemoryAlloc /home/ilia/SoftEtherVPN/src/Mayaqua/Unix.c:2053

Thread T22 created by T0 here:
    #0 0x7f72afe48966 in pthread_create (/lib64/libasan.so.8+0x48966) (BuildId: 9501248886f79bf1482f3e153f794be742818172)
    #1 0x7f72af76f713 in UnixInitThread /home/ilia/SoftEtherVPN/src/Mayaqua/Unix.c:1683

SUMMARY: AddressSanitizer: heap-use-after-free /home/ilia/SoftEtherVPN/src/Cedar/Server.c:1861 in GetCaps
Shadow bytes around the buggy address:
  0x607000366900: 00 00 00 fa fa fa fa fa 00 00 00 00 00 00 00 00
  0x607000366980: 00 fa fa fa fa fa 00 00 00 00 00 00 00 00 00 fa
  0x607000366a00: fa fa fa fa 00 00 00 00 00 00 00 00 00 fa fa fa
  0x607000366a80: fa fa 00 00 00 00 00 00 00 00 00 fa fa fa fa fa
  0x607000366b00: 00 00 00 00 00 00 00 00 00 fa fa fa fa fa fd fd
=>0x607000366b80: fd[fd]fd fd fd fd fd fa fa fa fa fa fd fd fd fd
  0x607000366c00: fd fd fd fd fd fa fa fa fa fa fd fd fd fd fd fd
  0x607000366c80: fd fd fd fa fa fa fa fa fd fd fd fd fd fd fd fd
  0x607000366d00: fd fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x607000366d80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x607000366e00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
2023-05-01 05:53:36 +02:00
Ilya Shipitsin
aadc068964
Merge pull request #1831 from chipitsine/master
src/Mayaqua/Unix.c: fix guarding
2023-04-29 23:47:35 +02:00
Ilya Shipitsin
46e73e944f src/Mayaqua/Unix.c: fix guarding
SoftEtherVPN/src/Mayaqua/Unix.c:51:25: warning: missing
terminating ' character
   51 | #include <sys/statvfs.h>'
2023-04-29 22:31:55 +02:00
Ilya Shipitsin
8fc27da780
Merge pull request #1829 from chipitsine/master
src/Mayaqua/Str.c: fix denial of service reported by Cisco Talos
2023-04-22 08:26:47 +02:00
Ilya Shipitsin
c983ebffc1
Merge pull request #1828 from chipitsine/cleanup_source_release_pipeline
Cleanup source release pipeline
2023-04-21 23:22:02 +02:00
Ilya Shipitsin
df6df007a3 src/Mayaqua/Str.c: fix denial of service reported by Cisco Talos
TALOS-2023-1741
CVE-2023-23581

SoftEther VPN vpnserver EnSafeHttpHeaderValueStr denial of service
vulnerability

A denial of service vulnerability exists in the vpnserver
EnSafeHttpHeaderValueStr functionality of SoftEther VPN 5.01.9674 and
5.02. A specially-crafted network packet can lead to denial of service.
2023-04-21 22:38:22 +02:00
Ilya Shipitsin
f7a2cc5a7d CI: modernize GH release creation
details:
https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
2023-04-21 22:27:47 +02:00
Ilya Shipitsin
544f03ec8b CI: drop AppVeyor source release creation in favour of GH Actions 2023-04-21 22:26:30 +02:00
Ilya Shipitsin
82ce34fccb
Merge pull request #1824 from chipitsine/master
src/Cedar/Proto_OpenVPN.c: fix denial of service found by Cisco Talos
2023-04-17 00:22:03 +02:00
Ilya Shipitsin
6ff0ce7076
Merge pull request #1823 from chipitsine/bump_cirrus_ci
CI: cirrus-ci: switch to freebsd-13.2
2023-04-17 00:21:39 +02:00
Ilya Shipitsin
d2e673a47d src/Cedar/Proto_OpenVPN.c: fix denial of service found by Cisco Talos
specially crafted network packet lead to buffer overrun and process
crash. working exploit was provided by Cisco Talos team.

An integer underflow vulnerability exists in the vpnserver
OvsProcessData functionality of SoftEther VPN 5.01.9674 and 5.02. A
specially-crafted network packet can lead to denial of service. An
attacker can send a malicious packet to trigger this vulnerability.

The versions below were either tested or verified to be vulnerable by
Talos or confirmed to be vulnerable by the vendor.

SoftEther VPN 5.01.9674
SoftEther VPN 5.02
While 5.01.9674 is a development version, it is distributed at the time
of writing by Ubuntu and other Debian-based distributions.
2023-04-16 23:06:30 +02:00
Ilya Shipitsin
b3df7a0b90 CI: cirrus-ci: switch to freebsd-13.2
openssl-devel has been renamed to openssl3{0,1}.
2023-04-16 22:58:03 +02:00
Ilya Shipitsin
22c602f630
Merge pull request #1801 from chipitsine/master
Windows: link MSVC runtime static
2023-04-03 09:43:13 +02:00
Yihong Wu
b4e26dec05
Merge pull request #1815 from domosekai/b64
Mayaqua/Memory: Fix memory corruption in base64
2023-04-01 13:16:39 +09:00
Yihong Wu
df7ea3c54a Mayaqua/Memory: Fix memory corruption in base64 2023-03-31 09:14:39 +00:00
Ilya Shipitsin
423631100f
Merge pull request #1802 from SoftEtherVPN/dependabot/npm_and_yarn/src/bin/hamcore/wwwroot/admin/default/webpack-5.76.0
Bump webpack from 5.75.0 to 5.76.0 in /src/bin/hamcore/wwwroot/admin/default
2023-03-15 13:32:01 +01:00
dependabot[bot]
fb83ac08f2
Bump webpack in /src/bin/hamcore/wwwroot/admin/default
Bumps [webpack](https://github.com/webpack/webpack) from 5.75.0 to 5.76.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.75.0...v5.76.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-15 09:35:00 +00:00
Ilya Shipitsin
e6123d36a0
Merge pull request #1782 from metalefty/adjust-version-string
Cedar: Trim contiguous whitespaces in version string
2023-03-12 08:32:55 +01:00
Ilya Shipitsin
0ff9d1a455 CI: Windows: use static link for MSVC runtime 2023-03-11 23:08:59 +01:00
Ilya Shipitsin
96ab969152 build: windows: link MSVC runtime statically 2023-03-11 21:52:11 +01:00
Ilya Shipitsin
1f3a730d0a .gitignore: do not count Visual Studio user settings 2023-03-11 21:48:31 +01:00
Ilya Shipitsin
21963c6c68
Merge pull request #1796 from SoftEtherVPN/dependabot/npm_and_yarn/src/bin/hamcore/wwwroot/admin/default/minimist-and-mkdirp-1.2.8
Bump minimist and mkdirp in /src/bin/hamcore/wwwroot/admin/default
2023-03-03 09:44:10 +06:00
dependabot[bot]
91053622ab
Bump minimist and mkdirp in /src/bin/hamcore/wwwroot/admin/default
Bumps [minimist](https://github.com/minimistjs/minimist) and [mkdirp](https://github.com/isaacs/node-mkdirp). These dependencies needed to be updated together.

Updates `minimist` from 0.0.8 to 1.2.8
- [Release notes](https://github.com/minimistjs/minimist/releases)
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v0.0.8...v1.2.8)

Updates `mkdirp` from 0.5.1 to 0.5.6
- [Release notes](https://github.com/isaacs/node-mkdirp/releases)
- [Changelog](https://github.com/isaacs/node-mkdirp/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-mkdirp/compare/0.5.1...v0.5.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
- dependency-name: mkdirp
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-03 01:26:17 +00:00
Ilya Shipitsin
1519e23b3e
Merge pull request #1795 from metalefty/se-vs-de
README: SEvsDE: document AES-NI hardware acceleration support
2023-03-02 16:28:35 +06:00
Koichiro IWAO
f7d33568f3
README: SEvsDE: document AES-NI hardware acceleration support
Stable Edition requires intel_aes_lib to enable AES-NI [1]. Developer
Edition depends on OpeSSL to use AES-NI. It is enabled by default as
long as processor supports it.

[1] https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/blob/bf23fe0/src/Mayaqua/Encrypt.c#L145-L147
2023-03-02 18:44:02 +09:00
Koichiro IWAO
1fe26ccb6c
Cedar: Trim contiguous whitespaces in version string
Before change, contiguous whitespaces appeared in version string.
This room is for beta string (such as Alpha, Beta) and beta number but
it looks a bit odd if the build is not alpha/beta/RC.

> Version 5.02 Build 5180 Alpha 3 (Japanese)
> Version 5.02 Build 5180 Beta 3 (Japanese)
> Version 5.02 Build 5180 Release Candidate 3 (Japanese)
> Version 5.02 Build 5180   (Japanese)
>                        ^^^

Now version string looks neat like this:

> Version 5.02 Build 5180 (Japanese)
> Version 5.02 Build 5180 Release Candidate 3 (Japanese)
2023-03-01 16:14:04 +09:00
Ilya Shipitsin
8c64dc0cd7
Merge pull request #1781 from metalefty/vm-detection/freebsd-on-vm
Mayaqua/Unix: Make VM detection work on FreeBSD
2023-02-28 20:32:26 +06:00
Koichiro IWAO
bedf1cd7e9
Mayaqua/Unix: Make VM detection work on FreeBSD
This is just a cosmetic problem in the result of "Caps" command which
gets the list of server functions/capability.  There's no behavioural
change in SoftEtherVPN whether running on VM so far.
2023-02-28 20:08:04 +09:00
Ilya Shipitsin
d7c487619a
Merge pull request #1780 from chipitsine/master
CI: bump Ubuntu to newer version, install missing DCO dependencies
2023-02-28 08:31:52 +06:00
Ilya Shipitsin
2b7b728077 CI: bump Ubuntu to newer version, install missing DCO dependencies 2023-02-27 20:51:23 +06:00
Yihong Wu
cd2838795b Radius: Make sure MS-CHAP response matches the original username 2023-02-27 08:37:23 +00:00
Yihong Wu
4ff9c6393a Support all EAP methods for PPP sessions with RADIUS 2023-02-27 08:37:23 +00:00
Yihong Wu
e81ecbb0ec Support EAP auth with RADIUS server for SEVPN 2023-02-24 13:05:34 +00:00
Yihong Wu
e20fa9ec2e
Merge pull request #1773 from domosekai/radius
Cedar/Proto_PPP: Fix radius authentication
2023-02-24 11:36:42 +08:00
Yihong Wu
1741dfdccc Cedar/Proto_PPP: Fix radius authentication 2023-02-23 13:03:10 +00:00
Yihong Wu
d045d1eeb7
Merge pull request #1771 from ChurchillSD/master
Fix Incorrect password hash on documentation
2023-02-21 10:16:34 +08:00
Yihong Wu
cc61b5b3c3
Merge pull request #1772 from domosekai/udp
Mayaqua/Network: Fix empty packet being treated as error
2023-02-21 10:14:36 +08:00
Yihong Wu
eea1de3d25 Mayaqua/Network: Fix empty packet being treated as error 2023-02-19 05:41:55 +00:00
Hector
7e19bbc421
Fix Incorrect password hash on documentation 2023-02-17 11:30:55 +00:00
Yihong Wu
d49b9f108b
Merge pull request #1762 from Evengard/ppp-coverity-fixes
Fixing up coverity report flags from #1760 and #1761
2023-02-05 00:15:51 +09:00
Evengard
c67d9ee201 Fixing up coverity report flags from #1760 and #1761 2023-02-04 17:47:20 +03:00
Yihong Wu
1062692d08
Merge pull request #1759 from domosekai/fixtls
Fix thread safety after #1751
2023-02-02 17:40:23 +09:00
Yihong Wu
025ebec4cc Fix thread safety after #1751 2023-02-02 06:53:30 +00:00
Ilya Shipitsin
11828be9e6
Merge pull request #1751 from Evengard/eap-tls-fixups
TLS 1.3 for EAP-TLS, user search by certificate CN
2023-02-01 09:47:38 +06:00
Evengard
edcdc923ad Reworked EAP-TLS 1.3 to account for RFC9190, implemented searching by certificate instead of certificate CN 2023-01-31 20:33:18 +03:00
Yihong Wu
7c642c7d55
Merge pull request #1758 from domosekai/ipv6rs
Cedar/IPC: Change IPv6 router lookup to non-blocking
2023-01-31 19:52:10 +09:00
Yihong Wu
6ce91e9c81 Cedar/IPC: Change IPv6 router lookup to non-blocking
Fix #1755
2023-01-31 05:20:40 +00:00
Ilya Shipitsin
064d211fab
Merge pull request #1757 from domosekai/domosekai-patch-1
Cedar/Proto_PPP: Fix memory leak
2023-01-31 01:52:07 +06:00
Yihong Wu
43aaca509d
Cedar/Proto_PPP: Fix memory leak 2023-01-30 20:24:45 +09:00
Yihong Wu
f4934abc9a
Merge pull request #1755 from domosekai/ipv6cp
Cedar/IPC: Improve IPv6CP configuration
2023-01-29 03:34:56 +09:00
Yihong Wu
0cdf0eacbf Cedar/IPC: Improve IPv6CP configuration 2023-01-28 09:05:28 +00:00
Ilya Shipitsin
0e8174c6cf
Merge pull request #1754 from libnumafly/patch-1
add requirements package on Debian/Ubuntu
2023-01-25 22:56:56 +06:00
Kensei Sakai
54593e8cac
add requirements package on Debian/Ubuntu
On Ubuntu Server 22.04 LTS (and newer?), the ./configure command fails because the 'pkgconf' package is not installed by default. Suggest that the 'pkgconf' package be installed in this command line.
2023-01-26 01:35:37 +09:00
Evengard
26403c70e3 Reworking the EAP CN matching option from admin options to extended options 2023-01-24 12:18:20 +03:00
Evengard
0a60cdf141 Hiding the EAP-TLS match user by certificate behind an admin option, disabled by default 2023-01-24 11:48:49 +03:00
Evengard
149096e13c * Implementing user search by certificate common name.
* Reworking EAP-TLS flow
* Implementing iterative TLS downgrade supporting PPPD TLS 1.3+Tickets, Windows TLS 1.3 w/o Tickets, VPN Client Pro TLS 1.2.
2023-01-23 23:57:19 +03:00
Ilya Shipitsin
8362637353
Merge pull request #1749 from chipitsine/master
src/Mayaqua/Unix.c: improve memory allocation handling according to Coverity
2023-01-15 22:09:00 +06:00
Ilya Shipitsin
c7766d072b src/Mayaqua/Unix.c: improve memory allocation handling according to Coverity
1875        if (mutex == NULL)
1876        {
    CID 367204 (#1 of 1): Resource leak (RESOURCE_LEAK)4. leaked_storage: Variable lock going out of scope leaks the storage it points to.
1877                return NULL;
1878        }
2023-01-15 13:30:37 +06:00
Ilya Shipitsin
8215de91f9
Merge pull request #1747 from chipitsine/master
src/Cedar/Virtual.c: mute Coverity warning
2023-01-14 23:46:27 +06:00
Ilya Shipitsin
6a5f4b0dfd src/Cedar/Virtual.c: mute Coverity warning
4272                FreeBlock(block);
    CID 375153 (#1 of 1): Uninitialized scalar variable (UNINIT)44. uninit_use: Using uninitialized value send_size.
4273                if (send_size == 0)
2023-01-14 21:38:28 +06:00
Yihong Wu
58c0e1ded4
Merge pull request #1740 from domosekai/cmake
Mayaqua/CMakeLists: Fix win32 build without vcpkg
2023-01-07 09:52:12 +08:00
Yihong Wu
6e48227d93
Update CMakeLists.txt 2023-01-07 10:27:47 +09:00
Yihong Wu
1b79df7954 Mayaqua/CMakeLists: Fix win32 build without vcpkg 2023-01-06 22:32:28 +09:00
Ilya Shipitsin
cbb90c5f23
Merge pull request #1738 from SoftEtherVPN/dependabot/npm_and_yarn/src/bin/hamcore/wwwroot/admin/default/json5-and-ts-loader-and-webpack-and-webpack-cli--removed
Bump json5, ts-loader, webpack and webpack-cli in /src/bin/hamcore/wwwroot/admin/default
2023-01-01 19:40:00 +06:00
dependabot[bot]
2e8723b967
Bump json5, ts-loader, webpack and webpack-cli
Removes [json5](https://github.com/json5/json5). It's no longer used after updating ancestor dependencies [json5](https://github.com/json5/json5), [ts-loader](https://github.com/TypeStrong/ts-loader), [webpack](https://github.com/webpack/webpack) and [webpack-cli](https://github.com/webpack/webpack-cli). These dependencies need to be updated together.


Removes `json5`

Updates `ts-loader` from 6.0.1 to 9.4.2
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v6.0.1...v9.4.2)

Updates `webpack` from 4.32.2 to 5.75.0
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.32.2...v5.75.0)

Updates `webpack-cli` from 3.3.12 to 5.0.1
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/v3.3.12...webpack-cli@5.0.1)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
- dependency-name: ts-loader
  dependency-type: direct:development
- dependency-name: webpack
  dependency-type: direct:development
- dependency-name: webpack-cli
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-01 08:28:23 +00:00
Ilya Shipitsin
64396e2c05
Merge pull request #1737 from SoftEtherVPN/dependabot/npm_and_yarn/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/json5-and-ts-loader--removed
Bump json5 and ts-loader in /developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package
2023-01-01 14:27:25 +06:00
dependabot[bot]
89cc6ae717
Bump json5 and ts-loader
Removes [json5](https://github.com/json5/json5). It's no longer used after updating ancestor dependency [ts-loader](https://github.com/TypeStrong/ts-loader). These dependencies need to be updated together.


Removes `json5`

Updates `ts-loader` from 6.0.1 to 9.4.2
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v6.0.1...v9.4.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
- dependency-name: ts-loader
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-01 08:00:19 +00:00
Ilya Shipitsin
ec3769ba32
Merge pull request #1731 from chipitsine/master
LibreSSL-3.7.0 compatibility
2022-12-26 07:08:28 +06:00
Ilya Shipitsin
86e44e8d7b LibreSSL-3.7.0 compatibility 2022-12-25 11:35:29 +06:00
Ilya Shipitsin
260413d242
Merge pull request #1718 from SoftEtherVPN/dependabot/npm_and_yarn/src/bin/hamcore/wwwroot/admin/default/decode-uri-component-0.2.2
Bump decode-uri-component from 0.2.0 to 0.2.2 in /src/bin/hamcore/wwwroot/admin/default
2022-12-03 19:11:03 +05:00
dependabot[bot]
99374ba446
Bump decode-uri-component in /src/bin/hamcore/wwwroot/admin/default
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-03 13:51:53 +00:00
Davide Beatrici
23c3e1d9e5 README.md: Update OneDev URL
https://code.onedev.io/onedev/server/~issues/458
2022-11-29 02:08:17 +01:00
Yihong Wu
68283fca80
Merge pull request #1715 from domosekai/domosekai-patch-1
Add build instruction for dynamic linking OpenSSL
2022-11-27 19:52:10 +09:00
Yihong Wu
d8e56f9dbc Add build instruction for dynamic linking OpenSSL
Co-authored-by: Davide Beatrici <github@davidebeatrici.dev>
2022-11-27 19:33:52 +09:00
Davide Beatrici
dca2eaa370
Merge PR #1707: FreeBSD CI: Add test with OpenSSL 3.0.x 2022-11-22 19:33:27 +01:00
Koichiro IWAO
c223fbe8a3 FreeBSD CI: Add test with OpenSSL 3.0.x
As the stable version uses OpenSSL 3.0.x, it is nice to perform test
with OpenSSL 3.0.x as well.

Also, update FreeBSD to 13.1.
2022-11-23 00:27:39 +09:00
Yihong Wu
334e8be915
Merge pull request #1703 from metalefty/shortcut_key_fix
Cedar/CM.c: Fix wrong shortcut key assignment in the menu
2022-11-17 16:18:42 +09:00
Koichiro IWAO
e2ad7d5e8f Fix wrong shortcut key assignment
Fixes #1702.
2022-11-17 16:11:30 +09:00
Ilya Shipitsin
9eb9d57c27
Merge pull request #1700 from SoftEtherVPN/dependabot/npm_and_yarn/src/bin/hamcore/wwwroot/admin/default/kind-of-6.0.3
Bump kind-of from 6.0.2 to 6.0.3 in /src/bin/hamcore/wwwroot/admin/default
2022-11-12 21:00:03 +05:00
Ilya Shipitsin
28ec0d54b8
Merge pull request #1697 from SoftEtherVPN/dependabot/npm_and_yarn/src/bin/hamcore/wwwroot/admin/default/yargs-parser-13.1.2
Bump yargs-parser from 11.1.1 to 13.1.2 in /src/bin/hamcore/wwwroot/admin/default
2022-11-12 20:56:54 +05:00
dependabot[bot]
506677bf60
Bump kind-of in /src/bin/hamcore/wwwroot/admin/default
Bumps [kind-of](https://github.com/jonschlinkert/kind-of) from 6.0.2 to 6.0.3.
- [Release notes](https://github.com/jonschlinkert/kind-of/releases)
- [Changelog](https://github.com/jonschlinkert/kind-of/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jonschlinkert/kind-of/compare/6.0.2...6.0.3)

---
updated-dependencies:
- dependency-name: kind-of
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-12 15:42:01 +00:00
dependabot[bot]
6a1b55293c
Bump yargs-parser in /src/bin/hamcore/wwwroot/admin/default
Bumps [yargs-parser](https://github.com/yargs/yargs-parser) from 11.1.1 to 13.1.2.
- [Release notes](https://github.com/yargs/yargs-parser/releases)
- [Changelog](https://github.com/yargs/yargs-parser/blob/main/docs/CHANGELOG-full.md)
- [Commits](https://github.com/yargs/yargs-parser/commits)

---
updated-dependencies:
- dependency-name: yargs-parser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-12 15:39:28 +00:00
Ilya Shipitsin
49c1a84752
Merge pull request #1699 from SoftEtherVPN/dependabot/npm_and_yarn/src/bin/hamcore/wwwroot/admin/default/serialize-javascript-and-terser-webpack-plugin-4.0.0
Bump serialize-javascript and terser-webpack-plugin in /src/bin/hamcore/wwwroot/admin/default
2022-11-12 20:35:18 +05:00
Ilya Shipitsin
34a9a7bc46
Merge pull request #1698 from SoftEtherVPN/dependabot/npm_and_yarn/src/bin/hamcore/wwwroot/admin/default/set-value-and-union-value-2.0.1
Bump set-value and union-value in /src/bin/hamcore/wwwroot/admin/default
2022-11-12 20:22:47 +05:00
Ilya Shipitsin
bf9ebe21ff
Merge pull request #1701 from chipitsine/master
CI: install libcap-ng-dev as OpenVPN dependency
2022-11-12 20:22:19 +05:00
dependabot[bot]
e7980ae9b1
Bump serialize-javascript and terser-webpack-plugin
Bumps [serialize-javascript](https://github.com/yahoo/serialize-javascript) and [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin). These dependencies needed to be updated together.

Updates `serialize-javascript` from 1.7.0 to 4.0.0
- [Release notes](https://github.com/yahoo/serialize-javascript/releases)
- [Commits](https://github.com/yahoo/serialize-javascript/compare/v1.7.0...v4.0.0)

Updates `terser-webpack-plugin` from 1.3.0 to 1.4.5
- [Release notes](https://github.com/webpack-contrib/terser-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/terser-webpack-plugin/blob/v1.4.5/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v1.3.0...v1.4.5)

---
updated-dependencies:
- dependency-name: serialize-javascript
  dependency-type: indirect
- dependency-name: terser-webpack-plugin
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-12 14:44:52 +00:00
dependabot[bot]
9f53cf5bdb
Bump set-value and union-value in /src/bin/hamcore/wwwroot/admin/default
Bumps [set-value](https://github.com/jonschlinkert/set-value) and [union-value](https://github.com/jonschlinkert/union-value). These dependencies needed to be updated together.

Updates `set-value` from 2.0.0 to 2.0.1
- [Release notes](https://github.com/jonschlinkert/set-value/releases)
- [Commits](https://github.com/jonschlinkert/set-value/compare/2.0.0...2.0.1)

Updates `union-value` from 1.0.0 to 1.0.1
- [Release notes](https://github.com/jonschlinkert/union-value/releases)
- [Commits](https://github.com/jonschlinkert/union-value/compare/1.0.0...1.0.1)

---
updated-dependencies:
- dependency-name: set-value
  dependency-type: indirect
- dependency-name: union-value
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-12 14:43:12 +00:00
Ilya Shipitsin
1027dbf385 CI: install libcap-ng-dev as OpenVPN dependency 2022-11-12 19:42:37 +05:00
Ilya Shipitsin
675b78e502
Merge pull request #1696 from SoftEtherVPN/dependabot/npm_and_yarn/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/minimatch-3.1.2
Bump minimatch from 3.0.4 to 3.1.2 in /developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package
2022-11-12 19:36:27 +05:00
Ilya Shipitsin
c492276a94
Merge pull request #1695 from SoftEtherVPN/dependabot/npm_and_yarn/src/bin/hamcore/wwwroot/admin/default/glob-parent-and-watchpack-5.1.2
Bump glob-parent and watchpack in /src/bin/hamcore/wwwroot/admin/default
2022-11-12 19:36:00 +05:00
Ilya Shipitsin
661e61538e
Merge pull request #1694 from SoftEtherVPN/dependabot/npm_and_yarn/src/bin/hamcore/wwwroot/admin/default/ansi-regex-3.0.1
Bump ansi-regex from 3.0.0 to 3.0.1 in /src/bin/hamcore/wwwroot/admin/default
2022-11-12 19:34:56 +05:00
Ilya Shipitsin
b5a83cc208
Merge pull request #1691 from SoftEtherVPN/dependabot/npm_and_yarn/src/bin/hamcore/wwwroot/admin/default/loader-utils-1.4.2
Bump loader-utils from 1.2.3 to 1.4.2 in /src/bin/hamcore/wwwroot/admin/default
2022-11-12 19:34:07 +05:00
dependabot[bot]
7f65bae400
Bump minimatch
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-12 14:27:01 +00:00
Ilya Shipitsin
3781d0f91c
Merge pull request #1690 from SoftEtherVPN/dependabot/npm_and_yarn/src/bin/hamcore/wwwroot/admin/default/minimatch-3.1.2
Bump minimatch from 3.0.4 to 3.1.2 in /src/bin/hamcore/wwwroot/admin/default
2022-11-12 19:26:36 +05:00
Ilya Shipitsin
d76888434b
Merge pull request #1692 from SoftEtherVPN/dependabot/npm_and_yarn/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/minimist-and-mkdirp-1.2.7
Bump minimist and mkdirp in /developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package
2022-11-12 19:26:00 +05:00
dependabot[bot]
b6d2ec3b76
Bump glob-parent and watchpack in /src/bin/hamcore/wwwroot/admin/default
Bumps [glob-parent](https://github.com/gulpjs/glob-parent) and [watchpack](https://github.com/webpack/watchpack). These dependencies needed to be updated together.

Updates `glob-parent` from 3.1.0 to 5.1.2
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/glob-parent/compare/v3.1.0...v5.1.2)

Updates `watchpack` from 1.6.0 to 1.7.5
- [Release notes](https://github.com/webpack/watchpack/releases)
- [Commits](https://github.com/webpack/watchpack/compare/v1.6.0...v1.7.5)

---
updated-dependencies:
- dependency-name: glob-parent
  dependency-type: indirect
- dependency-name: watchpack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-12 09:32:44 +00:00
dependabot[bot]
4ebf713911
Bump ansi-regex in /src/bin/hamcore/wwwroot/admin/default
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-12 09:31:04 +00:00
dependabot[bot]
4981008534
Bump minimist and mkdirp
Bumps [minimist](https://github.com/minimistjs/minimist) and [mkdirp](https://github.com/isaacs/node-mkdirp). These dependencies needed to be updated together.

Updates `minimist` from 1.2.0 to 1.2.7
- [Release notes](https://github.com/minimistjs/minimist/releases)
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v1.2.0...v1.2.7)

Updates `mkdirp` from 0.5.1 to 0.5.6
- [Release notes](https://github.com/isaacs/node-mkdirp/releases)
- [Changelog](https://github.com/isaacs/node-mkdirp/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-mkdirp/compare/0.5.1...v0.5.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
- dependency-name: mkdirp
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-12 09:15:56 +00:00
dependabot[bot]
b5727b3525
Bump loader-utils in /src/bin/hamcore/wwwroot/admin/default
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.2.3 to 1.4.2.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v1.2.3...v1.4.2)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-12 09:14:27 +00:00
dependabot[bot]
372759d2ad
Bump minimatch in /src/bin/hamcore/wwwroot/admin/default
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-12 09:14:23 +00:00
Ilya Shipitsin
86e28db3d7
Merge pull request #1689 from SoftEtherVPN/dependabot/npm_and_yarn/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/loader-utils-1.4.2
Bump loader-utils from 1.2.3 to 1.4.2 in /developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package
2022-11-12 14:13:34 +05:00
dependabot[bot]
797696a9f4
Bump loader-utils
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.2.3 to 1.4.2.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v1.2.3...v1.4.2)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-12 03:11:42 +00:00
tickerguy
0643ae70f5
Update BridgeUnix.c
On FreeBSD the stock code will attempt to expand the interface MTU any time a packet is to be sent that exceeds the current MTU.  This results in a down/up on the interface that is wildly disruptive to existing services on that adapter and, eventually, is likely to run into MTU limits and start logging failures, even with jumbo-frame capable adapters.  Thus if compiling on a FreeBSD machine disable this capability.  Tested against 12.3-STABLE and 13.1-STABLE on v4.38-9760 from the FreeBSD ports tree but likely applies here as well; see bug report https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267178
2022-10-19 12:39:32 -04:00
Yihong Wu
8ae0a932da
Merge pull request #1666 from domosekai/domosekai-patch-1
Add edition comparison to README.md
2022-09-27 11:41:53 +09:00
Yihong Wu
bfee06d144 Add comparison with Stable Edition 2022-09-27 11:37:34 +09:00
Yihong Wu
e4f9abba1c
Merge pull request #1659 from domosekai/route6 2022-09-16 20:01:55 +09:00
Yihong Wu
05fa675d5a Exclude inactive routes in Windows routing management 2022-09-16 17:25:11 +09:00
Yihong Wu
ac04c469c7
Merge pull request #1657 from domosekai/detail 2022-09-14 10:06:46 +09:00
Yihong Wu
dc5da0c6a9 Zero out protocol strings when reconnecting 2022-09-13 19:14:33 +09:00
Davide Beatrici
e85fc4435e README.md: Replace Codeberg with OneDev, update GitLab URL 2022-08-07 23:23:57 +02:00
Davide Beatrici
cf38a3b6c2
Merge PR #1641: fix typo of disclaimers 2022-08-03 19:39:41 +02:00
Guest126
04569c81c7
fix typo 2022-08-03 23:30:05 +09:00
Ilya Shipitsin
6adc996bf9
Merge pull request #1627 from SoftEtherVPN/dependabot/npm_and_yarn/src/bin/hamcore/wwwroot/admin/default/terser-4.8.1
Bump terser from 4.0.0 to 4.8.1 in /src/bin/hamcore/wwwroot/admin/default
2022-07-22 15:22:21 +05:00
dependabot[bot]
fa99fde893
Bump terser in /src/bin/hamcore/wwwroot/admin/default
Bumps [terser](https://github.com/terser/terser) from 4.0.0 to 4.8.1.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-20 08:39:28 +00:00
Ilya Shipitsin
d854fd6baf
Merge pull request #1618 from SoftEtherVPN/dependabot/nuget/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp/Newtonsoft.Json-13.0.1
Bump Newtonsoft.Json from 11.0.2 to 13.0.1 in /developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-csharp
2022-06-24 10:45:25 +05:00
Ilya Shipitsin
ee1ecf8b42
Merge pull request #1617 from SoftEtherVPN/dependabot/nuget/developer_tools/vpnserver-jsonrpc-codegen/Newtonsoft.Json-13.0.1
Bump Newtonsoft.Json from 11.0.2 to 13.0.1 in /developer_tools/vpnserver-jsonrpc-codegen
2022-06-24 10:44:47 +05:00
dependabot[bot]
1ba86c0dc1
Bump Newtonsoft.Json
Bumps [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json) from 11.0.2 to 13.0.1.
- [Release notes](https://github.com/JamesNK/Newtonsoft.Json/releases)
- [Commits](https://github.com/JamesNK/Newtonsoft.Json/compare/11.0.2...13.0.1)

---
updated-dependencies:
- dependency-name: Newtonsoft.Json
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-22 21:07:32 +00:00
dependabot[bot]
d8768367b9
Bump Newtonsoft.Json in /developer_tools/vpnserver-jsonrpc-codegen
Bumps [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json) from 11.0.2 to 13.0.1.
- [Release notes](https://github.com/JamesNK/Newtonsoft.Json/releases)
- [Commits](https://github.com/JamesNK/Newtonsoft.Json/compare/11.0.2...13.0.1)

---
updated-dependencies:
- dependency-name: Newtonsoft.Json
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-22 21:07:27 +00:00
Davide Beatrici
a14d812dcb
Merge PR #1610: Proto_OpenVPN: Set max allowed ACKs to 8 for P_ACK_V1 2022-06-14 04:53:56 +02:00
Yihong Wu
49ea58dd58
Merge pull request #1611 from domosekai/mss
Adjust TCP MSS if UDP acceleration is enabled (even if inactive)
2022-06-14 11:26:26 +09:00
Arne Schwabe
37aa1ba534 Proto_OpenVPN: Set max allowed ACKs to 8 for P_ACK_V1
OpenVPN always allowed 8 ACKs in P_ACK_V1 packets but only used
up to 4 in other control packets. Since Softether drops all packets with
more than 4 ACKs it also drops legimate P_ACK_V1.

See also this issue: https://github.com/schwabe/ics-openvpn/issues/1486
2022-06-14 00:06:02 +02:00
Yihong Wu
3ed7f7cbce Adjust TCP MSS if UDP acceleration is enabled (even if inactive) 2022-06-13 22:15:44 +09:00
Yihong Wu
209f60f079
Merge pull request #1604 from domosekai/docs 2022-05-29 10:47:59 +09:00
Yihong Wu
333cbb3f29 Update Windows build instructions
Co-authored-by: Davide Beatrici <github@davidebeatrici.dev>
2022-05-28 15:26:23 +09:00
Yihong Wu
5146bbbadc Remove vcpkg baseline as openssl build has been fixed upstream 2022-05-28 15:26:23 +09:00
Yihong Wu
e74d9dec25
Merge pull request #1593 from domosekai/cm 2022-05-26 12:54:09 +09:00
Yihong Wu
ad4ce138e9
Merge pull request #1594 from domosekai/tray
Show connection names in tray tips
2022-05-16 15:23:36 +09:00
Yihong Wu
34d443648b
Merge pull request #1596 from domosekai/route
Fix route tracking on x86 Windows
2022-05-16 10:55:37 +09:00
Yihong Wu
27d7f4cfbe Fix route tracking on x86 Windows 2022-05-15 19:42:57 +09:00
Yihong Wu
4a3b4589c6 Show connection names in icon tips 2022-05-15 15:22:46 +08:00
Yihong Wu
53d8b10de2 Remove CM timer event to fix taskbar behavior on Win 11 2022-05-14 14:05:31 +08:00
Yihong Wu
ca996ed89a
Merge pull request #1522 from domosekai/tls
Implement complete server certificate verification
2022-05-12 23:38:38 +08:00
Davide Beatrici
0d075f0b42
Merge PR #1592: Fix invalid systemd TasksMax 2022-05-11 20:21:58 +02:00
Yihong Wu
8f3915417f Fix invalid systemd TasksMax 2022-05-11 18:23:48 +08:00
Davide Beatrici
bf206bd7ad
Merge PR #1589: Fix static route pushing to OpenVPN clients 2022-05-10 21:09:19 +02:00
Daehun Hyun
cb6d9531b5 Fixed an issue where routing was not added when receiving DHCP static routing options. 2022-05-10 17:35:01 +09:00
Davide Beatrici
2f1bff96b2
Merge PR #1587: Implement additional option for PrivacyFilter Mode settings 2022-05-09 20:21:23 +02:00
sfreet
5a0227ba1d Allow packets if the both source and destination session users are the same, even in PrivacyFilter mode 2022-05-09 15:45:55 +09:00
Yihong Wu
4f9c75a3a7
Merge pull request #1582 from domosekai/vcpkg
Add vcpkg manifest, VS presets and update build instruction for Windows
2022-04-30 15:38:05 +08:00
Yihong Wu
0735af9fdf Warn user if vcpkg is not integrated with VS 2022-04-30 15:03:32 +08:00
Yihong Wu
ca226cdc9d Add CMakeSettings.json to facilitate VS configuration
Update build instructions for Windows
2022-04-30 15:03:05 +08:00
Yihong Wu
900947bd08 Use vcpkg manifest and pin to OpenSSL 1.1.1 2022-04-30 15:03:05 +08:00
Yihong Wu
817ecf2348
Merge pull request #1583 from domosekai/domosekai-patch-1
Fix Azure x86 environment inconsistency
2022-04-29 16:07:45 +08:00
Yihong Wu
a8be4c38e1 Fix inconsistent Azure environment and compiler 2022-04-29 13:43:22 +08:00
Yihong Wu
c8dca265b4
Merge pull request #1576 from domosekai/ipv6
Fix IPv6 ND for Windows 11 PPP clients
2022-04-27 20:37:25 +08:00
Yihong Wu
4c2e0867e4
Merge pull request #1581 from domosekai/pkcs12
Fix PKCS12 import under OpenSSL 3.0
2022-04-27 09:59:10 +08:00
Yihong Wu
b3afbe37e9 Load legacy provider under OpenSSL 3.0 2022-04-26 22:00:15 +08:00
Yihong Wu
3a91490b7f
Merge pull request #1580 from updatede/patch-2
Fix udp acceleration unusable on big endian system
2022-04-26 10:18:04 +08:00
updatede
b4bb90ec5b
Fix udp acceleration unusable on big endian system
On big endian system, while store 32 bits and 16bits number in memory of  UINT64 variable "tmp", first 4 bytes of it always be zero makes "cookie" and "size" always be zero, lead to udpaccel unusable.
2022-04-25 18:16:50 +08:00
Yihong Wu
192d4938da
Merge pull request #1578 from SoftEtherVPN/domosekai-vs2022
Upgrade CI template for Visual Studio 2022
2022-04-21 10:02:00 +08:00
Yihong Wu
43f0d3b4fa
Upgrade CI template for Visual Studio 2022 2022-04-21 00:09:18 +08:00
Yihong Wu
a742e2d193 Fix IPv6 ND for Windows 11 PPP clients 2022-04-08 00:37:38 +08:00
Yihong Wu
fade8672c2
Merge pull request #1574 from domosekai/str 2022-04-02 11:21:47 +08:00
Yihong Wu
992a998a34 Add missing translation for protocol details 2022-04-01 22:18:54 +08:00
Yihong Wu
3c0e3fa49c
Merge pull request #1564 from domosekai/bulk 2022-03-21 10:13:56 +08:00
Davide Beatrici
c6334a44f9
Merge PR #1561: Bump tar from 4.4.8 to 4.4.19 2022-03-20 20:10:43 +01:00
Yihong Wu
d86cf181bf Fix UDP bulk v2 and protocol display 2022-03-20 16:48:15 +08:00
dependabot[bot]
e8b88fd225
Bump tar from 4.4.8 to 4.4.19 in /src/bin/hamcore/wwwroot/admin/default
Bumps [tar](https://github.com/npm/node-tar) from 4.4.8 to 4.4.19.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v4.4.8...v4.4.19)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-19 19:17:31 +00:00
Davide Beatrici
9764485774
Merge PR #1551: Bump ajv from 6.10.0 to 6.12.6 2022-03-19 20:16:53 +01:00
Davide Beatrici
a52a3928db
Merge PR #1556: Fix wrong endianness in InRpcNodeInfo() and OutRpcNodeInfo() 2022-02-22 19:47:09 +01:00
Daiyuu Nobori
32a970f976 Admin.c: Fix wrong endianness in InRpcNodeInfo() and OutRpcNodeInfo() 2022-02-22 19:38:34 +01:00
Daiyuu Nobori
56aedd6817 Memory: Add LittleEndian16(), LittleEndian32() and LittleEndian64() 2022-02-22 19:38:03 +01:00
dependabot[bot]
b603d2658a
Bump ajv from 6.10.0 to 6.12.6 in /src/bin/hamcore/wwwroot/admin/default
Bumps [ajv](https://github.com/ajv-validator/ajv) from 6.10.0 to 6.12.6.
- [Release notes](https://github.com/ajv-validator/ajv/releases)
- [Commits](https://github.com/ajv-validator/ajv/compare/v6.10.0...v6.12.6)

---
updated-dependencies:
- dependency-name: ajv
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-12 02:08:14 +00:00
Yihong Wu
1e604407af
Merge pull request #1533 from tew42/patch-2
Readme - add info for Windows & macOS nightlies
2022-02-03 16:45:26 +08:00
Yihong Wu
24926bcc17
Remove reference to macOS and Ubuntu 2022-02-01 12:39:32 +08:00
Ilya Shipitsin
a4334753ad
Merge pull request #1538 from hww3/hww3/illumos-headers
Merge pull request #1538: Add missing headers required for solaris/illumos
2022-01-07 11:13:16 +03:00
H William Welliver
fd92c754fc Add missing headers required for solaris/illumos 2022-01-06 23:06:36 -05:00
Davide Beatrici
10b5034f0d
FUNDING.yml: Remove Bountysource link 2022-01-03 03:17:56 +01:00
Yihong Wu
0a4455ac40 Add more TLS negotiation info in logging and UI 2021-12-29 17:41:29 +08:00
Yihong Wu
f94ac6351e Implement complete server certificate verification 2021-12-29 17:41:29 +08:00
Ilya Shipitsin
034aae5a70
Merge pull request #1534 from weidi/master
Merge pull request #1534: Fix build error on alpine
2021-12-27 09:53:58 +03:00
weidi
879bd34af4 trigger alpine build action also on pull request 2021-12-27 07:26:34 +01:00
weidi
a4d414891f Merge branch 'musl-workflow' 2021-12-26 21:35:56 +01:00
weidi
09dd8a8b07 endif UNIX_LINUX before BSD 2021-12-26 16:13:53 +01:00
weidi
3c7d78a1bf
Merge branch 'SoftEtherVPN:master' into master 2021-12-26 11:51:55 +01:00
Yihong Wu
adbbe94675
Merge pull request #1528 from updatede/patch-1
Mayaqua/Network.h: Fix UDP acceleration under NAT-T connections
2021-12-26 12:32:48 +08:00
Yihong Wu
1c1560f6ca Apply security level override in azure client mode 2021-12-26 12:12:00 +08:00
Yihong Wu
68dc4e23d8 Improve NAT-T hint string handling 2021-12-26 12:11:51 +08:00
Yihong Wu
f6edb5e165 Fix a typo that causes CascadeList to show blank hub name 2021-12-26 12:03:59 +08:00
Yihong Wu
a5565fce4b Fix cascade links may start before configuration is loaded 2021-12-26 12:03:59 +08:00
Yihong Wu
d95d8ddefa Fix account name in wrong case after editing 2021-12-26 12:03:59 +08:00
Yihong Wu
5ecade7950
Merge pull request #1536 from domosekai/compat 2021-12-26 09:24:51 +08:00
weidi
f3905cc421 Merge branch 'musl-workflow' of https://github.com/weidi/SoftEtherVPN into musl-workflow 2021-12-25 22:45:02 +01:00
Johannes Weidacher
3cdad95ee1 Add Musl build github workflow 2021-12-25 22:44:31 +01:00
weidi
1c3dc59892 fiexed configure step 2021-12-25 22:40:03 +01:00
weidi
529d2c232f use checkout@v1 to make submodules work 2021-12-25 22:37:34 +01:00
Johannes Weidacher
7f7d72cca9 Add Musl build github workflow 2021-12-25 22:26:43 +01:00
Johannes Weidacher
e65cacdf96 Merge branch 'master' of https://github.com/weidi/SoftEtherVPN 2021-12-25 21:22:20 +01:00
Johannes Weidacher
f1b464e84d fix alpine compile issue. 2021-12-25 21:22:06 +01:00
Johannes Weidacher
18598b5d96 Change ifdef for UNIX_LINUX Only 2021-12-25 15:36:52 +01:00
Yihong Wu
51585e63e3 Fix server manager setting compatibility since build 9658 2021-12-25 13:25:34 +08:00
weidi
c72d4fddb8
Merge branch 'SoftEtherVPN:master' into master 2021-12-24 08:47:45 +01:00
Yihong Wu
82b6422821
Merge pull request #1532 from domosekai/init 2021-12-24 09:52:50 +08:00
Johannes Weidacher
fc15d1ebd5 fix alpine compile issue. 2021-12-23 21:06:19 +01:00
Johannes Weidacher
73ffa10f50 Fix build error on alpine 2021-12-23 20:59:48 +01:00
tew42
a0f831c071
Readme - add info for Windows & macOS nightlies
This would be a very useful link/info to include I think, or is there some reason not to?

Also a small update to clarify what can be found at softether-download.com
2021-12-23 13:17:08 +01:00
Yihong Wu
77ee848caa Cedar/SM.c: Fix pointer usage before initialization 2021-12-23 17:23:15 +08:00
updatede
0b74a8e4ce
Update Network.h
Missing argument check lead to wrong value of IsIPv6 of struct UDP_ACCEL in NewUdpAccel(),  eventually lead to UdpAccelInitClient() fail.
2021-12-22 13:19:50 +08:00
Yihong Wu
918fedb9d4
Merge pull request #1519 from domosekai/dns
Fix DNS thread safety and other
2021-12-13 13:51:04 +08:00
Yihong Wu
fc94843579 Fix the creation of a zero IPv6 address
Fix #1517
2021-12-12 20:05:36 +08:00
Yihong Wu
b91d9af5e3 Mayaqua/DNS: Fix memory safety in DNS operation threads
Fix #1329
2021-12-12 20:05:36 +08:00
Yihong Wu
2a40d21ef9
Merge pull request #1512 from domosekai/he
Perform TCP connection via IPv6 and IPv4 in parallel threads
2021-12-11 17:20:12 +08:00
Yihong Wu
02ee7b45d7 Save the correct server IP for route management 2021-12-10 16:53:28 +08:00
Yihong Wu
384ab07996 Perform TCP connection attempts via IPv6 and IPv4 in parallel 2021-12-10 16:18:45 +08:00
Yihong Wu
e6bf956806 Return and cache all addresses from DNS resolver 2021-12-10 16:18:45 +08:00
Yihong Wu
528f313dbe
Merge pull request #1511 from domosekai/ipstr
Fix IPv6 address display in session info dialog
2021-12-09 12:55:10 +08:00
Yihong Wu
5cac4481f0
Merge pull request #1513 from domosekai/rudp
Restore R-UDP listener when ListenIP is ::
2021-12-09 12:54:05 +08:00
Yihong Wu
b4aad09f21 Restore R-UDP listener when ListenIP is :: 2021-12-07 21:55:41 +08:00
Yihong Wu
14f5854ecf Fix IPv6 address display in session info dialog 2021-12-07 15:48:32 +08:00
Yihong Wu
a9239a6aab
Merge pull request #1510 from domosekai/dns6
Fix DNS resolution when no IPv6 address is configured on any interface
2021-12-04 20:03:44 +08:00
Yihong Wu
b178f26e52
Reduce redundant loop
Co-authored-by: Davide Beatrici <github@davidebeatrici.dev>
2021-12-04 16:16:22 +08:00
Yihong Wu
9692a8d961 Fix DNS resolution when no IPv6 address is configured 2021-12-03 14:18:43 +08:00
Yihong Wu
2d1c8765aa
Merge pull request #1433 from domosekai/chain
Support user-specified server trust chain
2021-11-25 17:15:53 +08:00
Yihong Wu
8392ccd1fa
Merge pull request #1391 from domosekai/master 2021-11-25 11:09:12 +08:00
Davide Beatrici
2955dc5580
Merge PR #1507: Change default hub option to allow default router in IPv6 RA 2021-11-24 00:22:04 +01:00
Davide Beatrici
235d5d1d0d
Merge PR #1506: Cedar/Proto_PPP: Fix IPC DHCP renewal 2021-11-24 00:20:37 +01:00
Yihong Wu
e095283641 Change default hub option to allow default router in IPv6 RA 2021-11-23 23:54:42 +08:00
Yihong Wu
fb004345b4 Cedar/Proto_PPP: Fix IPC DHCP renewal 2021-11-23 19:48:46 +08:00
Ilya Shipitsin
9d4970841f
Merge pull request #1491 from chipitsine/master
Merge PR #1491: add "data-ciphers" to generated OpenVPN configs
2021-10-03 12:47:25 +05:00
Ilya Shipitsin
4d594e00f8 add "data-ciphers" to generated OpenVPN configs 2021-10-02 15:00:20 +05:00
Davide Beatrici
d7be057ae0
Merge PR #1489: Fix policy dialog and memory overrun 2021-09-30 21:23:17 +02:00
Yihong Wu
2990b5ae93 Fix memory overrun in policy copy 2021-09-30 19:36:36 +08:00
Yihong Wu
462ebfb960 Fix policy dialog 2021-09-30 16:59:22 +08:00
Davide Beatrici
6e7eba8e71
Merge PR #1486: Fix auto refreshing of client manager 2021-09-28 22:01:19 +02:00
Yihong Wu
8e292138b1
Update AUTHORS.TXT 2021-09-28 22:24:48 +08:00
Yihong Wu
582a739179 Fix auto refreshing of client manager 2021-09-28 20:15:41 +08:00
Yihong Wu
3a2d588722
Merge pull request #1483 from domosekai/ecc
Support ECDSA certificates on server side and show parameters in dialog
2021-09-25 20:58:18 +08:00
Yihong Wu
9c2a573cf2 Display key algorithm and parameters in cert dialog 2021-09-24 17:12:51 +08:00
Davide Beatrici
4657d7ee49
Merge PR #1484: Password change from client increments config file revision 2021-09-22 00:28:32 +02:00
Tetsuo Sugiyama
c9508b7fb7
Password change from client increments config file revision
Fixed an issue where changing the password from the client did not increment the revision of the server config file and the changes were not saved
2021-09-21 18:28:17 +09:00
Yihong Wu
2853337b81 Allow ECDSA certificates on server side 2021-09-20 08:18:36 +00:00
Yihong Wu
03859eb515
Merge pull request #1443 from domosekai/win32
Add IPv6 route management for Windows client
2021-09-18 22:12:27 +08:00
Davide Beatrici
a56cfac947
Merge PR #1482: Cedar/Protocol.c: Fix connection to server clusters 2021-09-18 10:34:20 +02:00
Yihong Wu
82af38c482 Cedar/Protocol.c: Fix connection to server clusters 2021-09-18 08:06:10 +00:00
Davide Beatrici
f74c53b449
Merge PR #1480: CI: gitlab: remove broken tasks, leave only Illumos 2021-09-08 23:03:16 +02:00
Ilya Shipitsin
f85dff25dc CI: gitlab: remove broken tasks, leave only Illumos 2021-09-08 21:15:13 +05:00
Ilya Shipitsin
f301ba1e60
Merge pull request #1478 from chipitsine/master
Merge PR #1478: BUILD: use rpath for locating dynamic libraries
2021-09-08 10:53:49 +05:00
Ilya Shipitsin
dcb1023999 BUILD: use rpath for locating dynamic libraries 2021-09-08 10:41:15 +05:00
Davide Beatrici
26c8fbe538
Merge PR #1476: openvpn live tests: change "remote" inplace 2021-08-30 08:16:50 +02:00
Ilya Shipitsin
115b8aab82 openvpn live tests: change "remote" inplace
command line override is not very stable
2021-08-30 09:46:45 +05:00
Davide Beatrici
3cc85c1d51
Merge PR #1474: enable Control-flow Enforcement Technology (CET) Shadow Stack mitigation 2021-08-27 21:06:08 +02:00
Ilya Shipitsin
fc9286b11b enable Control-flow Enforcement Technology (CET) Shadow Stack mitigation
for Windows binaries

found by BinSkim
2021-08-27 12:43:42 +05:00
Davide Beatrici
224abd99b8
Merge PR #1472: Enable Control flow guard and Qspectre protection for windows binaries 2021-08-27 06:45:51 +02:00
Ilya Shipitsin
5adeeb75ea Enable Control flow guard and Qspectre protection for windows binaries
found by BinSkim
2021-08-26 23:09:13 +05:00
Davide Beatrici
d0fe38384c
Merge PR #1471: CI: Azure Pipelines: enable submodules checkout 2021-08-26 19:40:40 +02:00
Ilya Shipitsin
84bc94b232 CI: Azure Pipelines: enable submodules checkout
it is better to have this enabled in yml, cause it allows to build
from forks easier
2021-08-26 14:34:09 +05:00
Ilya Shipitsin
78e89eb3c7
Merge pull request #1460 from stevemuskiewicz/sm/rpm-fix-1457
Merge PR #1460: Redo of PR #1402 with proper fix for #1457
2021-08-19 19:11:47 +05:00
Steve Muskiewicz
fcd00547aa Revert "reapply other RPM fixes from prior PR (service file updates and systemd path exclusions)"
This reverts commit 0eb0152437.
2021-08-19 09:50:30 -04:00
Steve Muskiewicz
0eb0152437 reapply other RPM fixes from prior PR (service file updates and systemd path exclusions) 2021-08-19 09:10:26 -04:00
Steve Muskiewicz
472dde05de apply permission fix suggested by @hornos (for #1457) 2021-08-19 08:14:50 -04:00
Ilya Shipitsin
1e6806bee7
Merge pull request #1456 from SoftEtherVPN/revert-1402-sm/rpm-pkg-fixes
Merge PR #1456: Revert "RPM package and systemd service file fixes (for CentOS 8)"
2021-08-16 16:09:39 +05:00
Ilya Shipitsin
c01d8e6058
Revert "RPM package and systemd service file fixes (for CentOS 8)" 2021-08-16 16:06:34 +05:00
Ilya Shipitsin
d061abae8f
Merge PR #1454: Merge pull request #1454 from SoftEtherVPN/dependabot/npm_and_yarn/developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package/path-parse-1.0.7
Bump path-parse from 1.0.6 to 1.0.7 in /developer_tools/vpnserver-jsonrpc-clients/vpnserver-jsonrpc-client-nodejs-package
2021-08-16 11:33:54 +05:00
dependabot[bot]
888cf188bb
Bump path-parse
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-16 06:32:50 +00:00
Ilya Shipitsin
fbdd6f1f3c
Merge pull request #1453 from SoftEtherVPN/dependabot/npm_and_yarn/src/bin/hamcore/wwwroot/admin/default/path-parse-1.0.7
Merge PR #1453: Bump path-parse from 1.0.6 to 1.0.7 in /src/bin/hamcore/wwwroot/admin/default
2021-08-16 11:32:13 +05:00
Ilya Shipitsin
024b68120d
Merge pull request #1402 from stevemuskiewicz/sm/rpm-pkg-fixes
Merge PR #1402: RPM package and systemd service file fixes (for CentOS 8)
2021-08-16 11:31:13 +05:00
dependabot[bot]
2d00ab7dcc
Bump path-parse in /src/bin/hamcore/wwwroot/admin/default
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-11 02:56:38 +00:00
Ilya Shipitsin
51a3346f70
Merge pull request #1451 from davidebeatrici/blake2-have-sse2-manual-definition
CMake: Fix BLAKE2 build failure with MSVC due to it not defining __SSE2__
2021-08-11 07:51:12 +05:00
Davide Beatrici
7f8e527883 CMake: Fix BLAKE2 build failure with MSVC due to it not defining __SSE2__ 2021-08-10 22:58:28 +02:00
Davide Beatrici
832c69add2
Merge PR #1449: CMake: Add build time check for EVP_PKEY_get_raw_public_key() availability 2021-08-09 04:41:54 +02:00
Davide Beatrici
ffc095f95a CMake: Add build time check for EVP_PKEY_get_raw_public_key() availability
We need the function since 9dbbfcd388, but unfortunately it's not provided by LibreSSL.

By introducing a build time check we inform the user about the issue explicitly instead of just letting compilation fail.
2021-08-08 19:29:32 +02:00
Ilya Shipitsin
b6d31af188
Merge pull request #1448 from neheb/eng
fix compilation without OpenSSL engines
2021-08-08 08:38:02 +05:00
Rosen Penev
ee3bf7f507 fix compilation without OpenSSL engines
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-08-07 20:05:04 -07:00
domosekai
9b3077d955 Store interface metric separately as it mau change 2021-08-02 16:18:37 +08:00
domosekai
dd9c3546f7 Prevent IPv6 leak if only IPv4 default route is added 2021-08-02 16:18:37 +08:00
domosekai
4ddf39e760 Remove obsolete Win32 functions 2021-08-02 16:18:37 +08:00
domosekai
ce0591d924 Add IPv6 route management for Windows client 2021-08-02 16:18:36 +08:00
Ilya Shipitsin
5a05e7a249
Merge pull request #1447 from chipitsine/drop_libressl_ci
CI: cirrus: drop LibreSSL builds
2021-08-01 21:39:17 +05:00
Ilya Shipitcin
c3573561ed CI: cirrus: drop LibreSSL builds
starting with 9dbbfcd388 we only support
OpenSSL-1.1.1, no LibreSSL for now. Let us drop LibreSSL builds for the
sake of simplicity
2021-08-01 21:08:34 +05:00
Davide Beatrici
97a04888b7
Merge PR #1445: src/Cedar/SW.c: treat "0" build as legitimate 2021-08-01 12:42:43 +02:00
Ilya Shipitcin
37b5644291 src/Cedar/SW.c: treat "0" build as legitimate
installers built for PR have "0" build. let us treat them as legitimate
2021-08-01 12:26:51 +05:00
Davide Beatrici
101d79d7c3
Merge PR #1441: Mayaqua/Network.c: Fix race condition in TUBE operation 2021-07-23 19:42:13 +02:00
domosekai
9182a9b4e9 Mayaqua/Network.c: Fix race condition in TUBE operation 2021-07-22 11:59:15 +00:00
Davide Beatrici
bf14817f1f
Merge PR #1434: Cedar/Proto_PPP.c: Fix memory leak in EAP-MSCHAPv2 2021-07-21 23:54:59 +02:00
domosekai
8b87c9d4ef Cedar/Proto_PPP.c: Fix memory leak in EAP-MSCHAPv2
Fixes: #1420 (Implement EAP-MSCHAPv2)
2021-07-21 11:16:35 +00:00
domosekai
2761c1ca42 Support user-specified server trust chain 2021-07-21 07:02:42 +00:00
Yihong Wu
1f40de2dda
README.md: Add me to members 2021-07-16 15:46:53 +08:00
Ilya Shipitsin
ddf9e48c10
Merge pull request #1432 from domosekai/route
Mayaqua/TcpIp.c: Fix building DHCP static routes in new format
2021-07-14 17:41:01 +05:00
domosekai
1bb01e55e5 Mayaqua/TcpIp.c: Fix building DHCP static routes in new format
Fixes: 1708998 (Change IP structure so that IPv4 addresses are stored in RFC3493 format)
2021-07-14 08:11:05 +00:00
Ilya Shipitsin
b531d8e234
Merge pull request #1429 from metalefty/typo
Fix typo, fix case, and trivial translations
2021-07-13 14:57:34 +05:00
Koichiro IWAO
fce3592917
hamcore(ja,tw,cn): translate "Authentication"
appeared in "OpenSSL Engine Authorization"
2021-07-13 18:44:42 +09:00
Koichiro IWAO
410b7a959d
Fix case of OpenSSL 2021-07-13 18:41:41 +09:00
Koichiro IWAO
1590e6afb3
Fix typo s/has beens/has been/g 2021-07-13 18:15:09 +09:00
Davide Beatrici
996f2f2aa0
Merge PR #1427: Cedar/IPC.c: Add hub release in NewIPC() 2021-07-12 23:20:53 +02:00
domosekai
7863ce8a8e Cedar/IPC.c: Add hub release in NewIPC() 2021-07-12 08:37:12 +00:00
Davide Beatrici
26a27553b2
Merge PR #1426: Mayaqua/Network.c: Create UDP listener for every interface if ListenIP is wildcard 2021-07-11 21:35:01 +02:00
domosekai
a1dff0f594 Mayaqua/Network.c: Create UDP listener for every interface if ListenIP is wildcard 2021-07-11 16:15:29 +00:00
Ilya Shipitsin
7881f8657a
Merge pull request #1420 from domosekai/eap
Implement EAP-MSCHAPv2
2021-07-10 23:27:10 +05:00
Ilya Shipitsin
bd501ba9bf
Merge pull request #1422 from domosekai/timeout
Fix use-after-free timeout issue for L2TP and SSTP
2021-07-10 22:34:57 +05:00
domosekai
dfb105c2d7 Fix use-after-free timeout issue for L2TP and SSTP 2021-07-10 16:07:09 +00:00
domosekai
66dc5ee581 Cedar/Radius.c: Fix EAP Message buffer overflow 2021-07-10 08:15:03 +00:00
domosekai
56bd9733d6 Cedar/Proto_PPP.c: Use unified format for negative condition 2021-07-10 05:30:06 +00:00
domosekai
eff784b624 Improve EAP behavior with RADIUS 2021-07-10 05:29:23 +00:00
domosekai
22a9231c33 Implement EAP-MSCHAPv2 2021-07-08 14:26:31 +00:00
Davide Beatrici
a2f30c8aad
Merge PR #1417: Mayaqua/Network.c: Fix L2TP/IPsec over IPv6 when listening on :: 2021-07-07 20:31:49 +02:00
domosekai
41b9973c24 Mayaqua/Network.c: Fix L2TP/IPsec over IPv6 when listening on :: 2021-07-07 17:37:06 +00:00
Ilya Shipitsin
60db1962f9
Merge pull request #1416 from domosekai/listener
Fix TCP and UDP listener behavior
2021-07-07 16:08:05 +05:00
domosekai
6e400c19af Fix TCP and UDP listener behavior 2021-07-07 10:50:23 +00:00
Ilya Shipitsin
f2466eb919
Merge pull request #1415 from davidebeatrici/vpncmd-wireguard-keys
Cedar/Command: Add GenX25519 and GetPublicX25519 commands
2021-07-07 13:04:13 +05:00
Davide Beatrici
c310163244 Cedar/Command: Add GenX25519 and GetPublicX25519 commands
GenX25519 command - Create new X25519 keypair
Help for command "GenX25519"

Purpose:
  Create new X25519 keypair

Description:
  Use this to create a new X25519 keypair, which can be used for WireGuard.
  Both the private and public key will be shown.
  The public key can be shared and is used to identify a peer.
  Also, it can always be retrieved from the private key using the GetPublicX25519 command.
  The private key should be kept in a secure place and never be shared.
  It cannot be recovered once lost.

Usage:
  GenX25519

==========================================================================================

GetPublicX25519 command - Retrieve public X25519 key from a private one
Help for command "GetPublicX25519"

Purpose:
  Retrieve public X25519 key from a private one

Description:
  Use this if you have a private X25519 key and want to get its corresponding public key.

Usage:
  GetPublicX25519 [private]

Parameters:
  private - The private X25519 key you want to get the corresponding public key of.
2021-07-07 08:43:41 +02:00
Davide Beatrici
9dbbfcd388 Mayaqua: Add new cryptographic functions for X25519/X448 keys management
The files are created in a new folder to keep the source tree tidier.

Please note that only X25519/X448 keys are supported due to an OpenSSL limitation:
https://www.openssl.org/docs/manmaster/man3/EVP_PKEY_new.html

We have functions that handle AES keys in Encrypt.c/.h.
Ideally we should move them into the new files.
2021-07-07 08:11:08 +02:00
Davide Beatrici
4328e6e5ab CMake: Link Cedar to Mayaqua directly
It's Cedar itself that depends on Mayaqua, not the executables.
2021-07-07 08:08:12 +02:00
Davide Beatrici
505c854303
Merge PR #1414: Mayaqua/Network.c: Use int as boolean flags for socket options 2021-07-07 06:35:50 +02:00
domosekai
4efed994dc Mayaqua/Network.c: Use int as boolean flags for socket options 2021-07-07 03:07:06 +00:00
Davide Beatrici
513ad6e792
Merge PR #1410: Mayaqua/DNS.c: Fix DNS resolution in dual stack environment 2021-07-05 20:23:09 +02:00
Davide Beatrici
0d5b05ef02
Merge PR #1411: Cedar/Protocol.c: Use real server IP in creating node info under direct mode 2021-07-05 20:15:29 +02:00
domosekai
bcba88ca73 Cedar/Protocol.c: Use real server IP in creating node info under direct mode 2021-07-05 12:17:57 +00:00
domosekai
883d4d4cd7 Mayaqua/DNS.c: Fix DNS resolution in dual stack environment 2021-07-05 11:10:03 +00:00
Davide Beatrici
4eae5820f6
Merge PR #1407: Cedar/Connection.c: Fix buffer overflow when inserting NAT-T information 2021-07-04 08:45:27 +02:00
domosekai
f6adcd6bfc Cedar/Connection.c: Fix buffer overflow when inserting NAT-T information 2021-07-04 05:53:24 +00:00
Davide Beatrici
dc296f1eff
Merge PR #1406: Add WireGuard mention to README.md 2021-07-03 23:16:31 +02:00
David Refoua
43f8b5fc56
mention WireGuard on the README.md
Now that SoftEther officially support WireGuard, it can also be mentioned on the README page.
2021-07-04 01:07:55 +04:30
Ilya Shipitsin
08905e57a6
Merge pull request #1404 from davidebeatrici/base64-revamp
Refactor Base64 functions, encode/decode using OpenSSL's EVP interface
2021-07-02 13:23:10 +05:00
Davide Beatrici
233e28f38c Refactor Base64 functions, encode/decode using OpenSSL's EVP interface
Our own implementation works fine, however we should use OpenSSL's one since we already link to the library.

Base64Decode() and Base64Encode() return the required buffer size when "dst" is NULL.

This allows to efficiently allocate a buffer, without wasting memory or risking an overflow.

Base64FromBin() and Base64ToBin() perform all steps, returning a heap-allocated buffer with the data in it.
2021-07-02 09:24:41 +02:00
Steve Muskiewicz
8798978951 move CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION list appends inside RPM generator if block 2021-06-30 15:00:05 -04:00
Steve Muskiewicz
af84a30adc Update softether-vpnserver.service files:
* change `ReadOnlyDirectories` -> `ReadOnlyPaths` and `ReadWriteDirectories` -> `ReadWritePaths`

 * add `ReadWritePaths` for other necessary directories (this should address #1111)
2021-06-30 11:48:45 -04:00
Steve Muskiewicz
b64c15b097 Fixes for RPM packaging issues (on CentOS 8):
* add "common" package provides for `libcedar.so()(64bit)` to allow `softether-vpnserver` package to install properly

* exclude `/lib/systemd/system` paths from RPM package file listing to prevent file conflicts when installing RPM (these paths already are "owned" by the systemd RPM)
2021-06-30 11:43:58 -04:00
Ilya Shipitsin
03d67fd5b1
Merge pull request #1401 from davidebeatrici/admin-proto-alog-fix
Use "%S" instead of "%s" for LA_SET_PORTS_UDP and LA_SET_PROTO_OPTIONS
2021-06-27 22:24:42 +03:00
Davide Beatrici
46ca5f7b98 Use "%S" instead of "%s" for LA_SET_PORTS_UDP and LA_SET_PROTO_OPTIONS
Turns out %S refers to ANSI/UTF-8 and %s to UTF-16.

This commit fixes a buffer overflow reported by AddressSanitizer and removes an unnecessary conversion to UTF-16.
2021-06-27 21:08:26 +02:00
Ilya Shipitsin
ce6ea9f781
Merge pull request #1400 from davidebeatrici/remove-hardcoded-build-number-checks
Remove obsolete hardcoded build number checks
2021-06-27 13:42:57 +03:00
Davide Beatrici
4221579e95 Remove obsolete hardcoded build number checks
The open-source project began with version 1.00, build 9022.

With the exception of an informative message fallback for builds older than 9428 (2014), all checks were for closed-source builds.
2021-06-27 07:21:06 +02:00
Davide Beatrici
56bb573b17
Merge PR #1395: Add warning about build number, initialize to 5180 2021-06-24 10:28:36 +02:00
Koichiro IWAO
e3f0837bd1
Set default build number to 5180 2021-06-24 17:12:50 +09:00
Koichiro IWAO
c1370987bf
Add missing parenthesis close and adjust line break 2021-06-24 17:06:48 +09:00
metalefty
79d1ade09d
Revise warning message
Co-authored-by: Davide Beatrici <github@davidebeatrici.dev>
2021-06-24 16:58:12 +09:00
Koichiro IWAO
a3f984e521
Add warning about build number and 4.x clients compatibilty
See also: https://github.com/SoftEtherVPN/SoftEtherVPN/issues/1392#issuecomment-867348281
2021-06-24 16:46:18 +09:00
domosekai
65bcbc8db3 Mayaqua/Network.c: Fix EAP-TLS chain certificate verification 2021-06-21 14:41:22 +00:00
Davide Beatrici
43a80702a9
Merge PR #1376: Cedar/Proto_PPP: Fix EAP-TLS fragmentation 2021-06-19 02:00:24 +02:00
domosekai
682052e0dc Cedar/Proto_PPP: Fix EAP-TLS fragmentation 2021-06-17 11:34:09 +00:00
Davide Beatrici
ad139a7cbb
Merge PR #1374: add missing libsodium dependency to coverity pipeline 2021-06-16 21:44:44 +02:00
Ilya Shipitsin
64f1e349f8 add missing libsodium dependency to coverity pipeline
thanks Paul Menzel for reporting this.
fixes #1372
2021-06-16 23:19:11 +05:00
Davide Beatrici
214992c232
Merge PR #1371: add github workflow to create release tarball with submodules 2021-06-14 05:49:30 +02:00
rofl0r
82b4b083b3 add github workflow to create release tarball with submodules 2021-06-14 02:36:09 +01:00
Davide Beatrici
f18837b491
Merge PR #1367: hamcore(ja): just adding a missing ":" 2021-06-11 06:05:46 +02:00
Koichiro IWAO
28c90b190c hamcore(ja): just adding a missing ":" 2021-06-11 12:51:06 +09:00
Davide Beatrici
5f76dbcfa2
Merge PR #1362: Japanese translation: WireGuard and some new messages 2021-06-06 22:16:58 +02:00
Koichiro IWAO
b4817fd27a hamdore(ja): translate OpenVPN timeout and ping transmission interval 2021-06-06 23:35:46 +09:00
Koichiro IWAO
89ca29f259 hamcore(ja): translate WireGuard log messages 2021-06-06 23:35:46 +09:00
Koichiro IWAO
7a208d6114 hamcore(ja): translate SetStaticNetwork command 2021-06-06 23:35:45 +09:00
Koichiro IWAO
5b910322a7 hamcore(ja): translate Wgk* commands 2021-06-06 23:35:45 +09:00
Davide Beatrici
2262b8a160
Merge PR #1354: Mayaqua/FileIO: Fix typo causing segmentation fault on Hamcore cache expiration 2021-05-26 21:14:59 +02:00
Davide Beatrici
2923b5500a Mayaqua/FileIO: Fix typo causing segmentation fault on Hamcore cache expiration 2021-05-26 20:46:21 +02:00
Davide Beatrici
7acd52d724
Merge PR #1352: Cedar/Proto_PPP: Fix EAP identifier duplication 2021-05-26 20:29:55 +02:00
domosekai
8c12e79448 Cedar/Proto_PPP: Fix EAP identifier duplication 2021-05-26 09:26:22 +00:00
Davide Beatrici
dc8d705854
Merge PR #1351: Read hamcore.se2 using libhamcore, set arbitrary path through HAMCORE_FILE_PATH 2021-05-26 08:42:52 +02:00
Davide Beatrici
81c71d309a Read hamcore.se2 using libhamcore, set arbitrary path through HAMCORE_FILE_PATH 2021-05-26 07:44:45 +02:00
Davide Beatrici
e0182ca3d9 src: Update "libhamcore" submodule 2021-05-26 04:18:08 +02:00
Davide Beatrici
97d9761a9b
Bump version to 5.02 2021-05-25 01:29:36 +02:00
Davide Beatrici
544c9a73da
Merge PR #1343: Fix IPv6 Neighbor Discovery for PPP based protocols 2021-05-09 19:59:34 +02:00
sl077
f9a1d72ce7 Fix IPv6 Neighbor Discovery for PPP based protocols 2021-05-09 13:55:31 +02:00
Ilya Shipitsin
e2d61133fe
Merge pull request #1342 from davidebeatrici/openbsd-compile-fix
Fix compile errors on OpenBSD
2021-05-03 23:37:41 +05:00
Davide Beatrici
2f801f30de Fix compile errors on OpenBSD
- <pthread.h> included for the "pthread_t" type definition.
- <net/ethernet.h> include removed as the header doesn't exist.
- AI_ALL and AI_V4MAPPED defined to 0 as the options don't exist.
2021-05-03 19:58:12 +02:00
Ilya Shipitsin
60568da9b7
Merge pull request #1340 from SoftEtherVPN/dependabot/npm_and_yarn/src/bin/hamcore/wwwroot/admin/default/ssri-6.0.2
Bump ssri from 6.0.1 to 6.0.2 in /src/bin/hamcore/wwwroot/admin/default
2021-04-30 01:43:58 +05:00
dependabot[bot]
515d823ef8
Bump ssri from 6.0.1 to 6.0.2 in /src/bin/hamcore/wwwroot/admin/default
Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/npm/ssri/releases)
- [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md)
- [Commits](https://github.com/npm/ssri/compare/v6.0.1...v6.0.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-29 19:34:47 +00:00
Ilya Shipitsin
146455e97d
Merge pull request #1339 from domosekai/master
Mayaqua/Network: Skip IPv6 nameservers for SecureNAT
2021-04-27 16:23:03 +05:00
domosekai
c20bcb2e60 Mayaqua/Network: Skip IPv6 nameservers for SecureNAT 2021-04-27 07:30:38 +00:00
Davide Beatrici
ce54531b53
FUNDING.yml: Add Liberapay link 2021-04-25 06:53:39 +02:00
Ilya Shipitsin
cf318d7219 src/Mayaqua/TcpIp.c: remove redundant condition
src/Mayaqua/TcpIp.c	4236	warn	V560 A part of conditional expression is always true: o2 == NULL.
2021-04-24 12:47:29 +05:00
Davide Beatrici
285e322171
Merge PR #1337: Cedar/IPC: Fix MAC address for IPv4 multicast 2021-04-24 04:01:58 +02:00
domosekai
cca769e2e6 Cedar/IPC: Fix MAC address for IPv4 multicast 2021-04-24 01:46:31 +00:00
Ilya Shipitsin
4e248e833c
Merge pull request #1336 from chipitsine/master
src/Mayaqua/TcpIp.c: remove redundant check
2021-04-23 23:27:02 +05:00
Ilya Shipitsin
92f41341d9 src/Mayaqua/TcpIp.c: remove redundant check
src/Mayaqua/TcpIp.c	1811	warn	V560 A part of conditional expression is always false: udp->Checksum == 0.
2021-04-23 15:39:11 +05:00
Ilya Shipitsin
19af52e288
Merge pull request #1335 from davidebeatrici/mayaqua-dns-memory-leaks-fix
Mayaqua/DNS.c: Fix memory leaks
2021-04-22 08:57:50 +05:00
Davide Beatrici
3a595b4a46 Mayaqua/DNS.c: Fix memory leaks
52 bytes in 2 blocks are definitely lost in loss record 5 of 13
   at 0x483877F: malloc (vg_replace_malloc.c:307)
   by 0x4ABB1BB: UnixMemoryAlloc (Unix.c:2033)
   by 0x4A7FABF: InternalMalloc (Memory.c:3819)
   by 0x4A7B769: MallocEx (Memory.c:3650)
   by 0x4A7B769: Malloc (Memory.c:3641)
   by 0x4AA71A9: CopyStr (Str.c:1884)
   by 0x4A61A9C: DnsCacheReverseUpdate (DNS.c:257)
   by 0x4A62123: DnsResolveReverse (DNS.c:506)
   by 0x4A93EB3: GetHostName (Network.c:15023)
   by 0x4A93EB3: AcceptInitEx (Network.c:12589)
   by 0x4934659: TCPAcceptedThread (Listener.c:172)
   by 0x4A76469: ThreadPoolProc (Kernel.c:872)
   by 0x4ABD159: UnixDefaultThreadProc (Unix.c:1589)
   by 0x51C2EA6: start_thread (pthread_create.c:477)

2,280 (684 direct, 1,596 indirect) bytes in 9 blocks are definitely lost in loss record 11 of 13
   at 0x483877F: malloc (vg_replace_malloc.c:307)
   by 0x4C65AC5: gaih_inet.constprop.0 (getaddrinfo.c:1058)
   by 0x4C67224: getaddrinfo (getaddrinfo.c:2256)
   by 0x4A61E06: DnsResolver (DNS.c:404)
   by 0x4A76469: ThreadPoolProc (Kernel.c:872)
   by 0x4ABD159: UnixDefaultThreadProc (Unix.c:1589)
   by 0x51C2EA6: start_thread (pthread_create.c:477)
   by 0x4C7CDEE: clone (clone.S:95)
2021-04-21 22:35:45 +02:00
Davide Beatrici
76395d8f8d
Merge PR #497: Cedar: Make OpenVPN timeout and ping transmission interval configurable 2021-04-21 22:01:15 +02:00
Davide Beatrici
2aaf9012a0 Cedar/Proto_OpenVPN: Make timeout and ping transmission interval configurable
Also, the default timeout value is set to 30000 (milliseconds) instead of 10000.

The change is made because it was reported that some routers failed to connect in time.
2021-04-21 08:29:30 +02:00
Ilya Shipitsin
aeff295c01
Merge pull request #1334 from paulmenzel/improve-readme
Improve README
2021-04-21 09:25:54 +03:00
Davide Beatrici
4b05de1a93 Cedar: Add support for 32 bit unsigned integer Proto options
This commit also fixes a bug which caused the server to initialize all boolean options to false.

It was caused by SiLoadProtoCfg() not checking whether the item exists in the configuration file.

CfgGetBool() always returns false if the item doesn't exist.
2021-04-21 08:12:45 +02:00
Paul Menzel
92966e0f5c README: Mark up one-line code blocks by four spaces instead of using ```
Using four spaces to indent code is also the [genuine Markdown
syntax][1].

[1]: https://daringfireball.net/projects/markdown/syntax#precode
2021-04-21 07:51:32 +02:00
Paul Menzel
485e680cff README: Properly indent mirror git clone commands to belong to list item 2021-04-21 07:51:06 +02:00
Paul Menzel
f8c4713fad README: Spell *source code* with a space
https://en.wikipedia.org/wiki/Source_code
2021-04-21 07:49:22 +02:00
Ilya Shipitsin
789ed26113
Merge pull request #1333 from davidebeatrici/codeberg
README.md: Add Codeberg to mirror list
2021-04-21 06:12:04 +03:00
Davide Beatrici
6f050f2b01 README.md: Add Codeberg to mirror list 2021-04-21 04:00:03 +02:00
Ilya Shipitsin
6a25ccfa28
Merge pull request #1332 from chipitsine/master
CI: drop OpenSUSE builds
2021-04-20 21:51:45 +03:00
Ilya Shipitsin
138e0b76d6 CI: drop OpenSUSE builds
it turned out to be almost impossible to install libsodium on
OpenSUSE (for example Factory repo url is broken).

Let us drop OpenSUSE builds for a while. Maybe we'll get them back later.
2021-04-20 21:51:49 +05:00
Ilya Shipitsin
ee84891559
Merge pull request #1329 from davidebeatrici/mayaqua-dns-refactor
Rewrite DNS API from scratch into dedicated file(s)
2021-04-18 08:22:40 +03:00
Davide Beatrici
0472f9c286 Rewrite DNS API from scratch into dedicated file(s)
From a functional point of view, the main improvement is that GetIP() now always prioritizes IPv6 over IPv4.
The previous implementation always returned an IPv4 address, unless not available: in such case it failed.
This means that now connections to hostnames should be established via IPv6 if available.

From a programmer point of view, getting rid of the insane wrappers is enough to justify a complete rewrite.

As an extra, several unrelated unused global variables are removed.
2021-04-18 01:46:59 +02:00
Ilya Shipitsin
f7e988ffc7
Merge pull request #1326 from chipitsine/master
CI: Azure Pipelines: explicitly install liblz4-dev
2021-04-15 22:04:55 +03:00
Ilya Shipitsin
a541c0286e CI: Azure Pipelines: explicitly install liblz4-dev
since 24596b258a
bundled lz4 was removed. openvpn (used for live tests) now relies on system lz4 lib.
2021-04-15 15:11:35 +05:00
Ilya Shipitsin
30f707d6c0
Merge pull request #1325 from chipitsine/master
CI: AppVeyor: explicitly install liblz4-dev
2021-04-15 14:06:00 +05:00
Davide Beatrici
bad9310aa4
Merge PR #1324: Cedar: Make use of IP address reported by NAT-T server for UDP acceleration 2021-04-14 20:45:41 +02:00
Davide Beatrici
d4d15b66d3 Cedar: Make use of IP address reported by NAT-T server for UDP acceleration
Before this commit, the IP address reported by the NAT-T server was immediately discarded.
That's because the peer should be accessible via the IP address used to establish the TCP connection.

User "domosekai" (https://www.domosekai.com) pointed out that the NAT-T IP address should be taken into account.
In his case it's required due to his broadband carrier's NAT causing TCP and UDP to have different external IPs.

Co-authored-by: domosekai <54519668+domosekai@users.noreply.github.com>
2021-04-14 19:49:30 +02:00
Ilya Shipitsin
c4b5455663 CI: AppVeyor: explicitly install liblz4-dev
since 24596b258a
bundled lz4 was removed. openvpn (used for live tests) now relies on system
lz4 lib.
2021-04-14 15:54:20 +05:00
Davide Beatrici
192083e7c4
Merge PR #1321: Change IP structure so that IPv4 addresses are stored in RFC3493 format 2021-04-07 21:37:42 +02:00
Davide Beatrici
1708998a11 Change IP structure so that IPv4 addresses are stored in RFC3493 format
In addition to saving 4 bytes for each instantiation, this change makes IP-related operations faster and clearer.

https://tools.ietf.org/html/rfc3493.html#section-3.7
2021-04-07 21:24:55 +02:00
Davide Beatrici
01663f836d
Merge PR #1320: Add (No) Code of Conduct 2021-04-06 20:00:52 +02:00
Davide Beatrici
4ec2995604 Add (No) Code of Conduct
https://nocodeofconduct.com
2021-04-06 19:43:00 +02:00
Ilya Shipitsin
2bb6fb2845
Merge pull request #1319 from davidebeatrici/include-headers-properly
Include headers properly
2021-04-05 13:00:39 +05:00
Davide Beatrici
a6ba9b8788 Include headers properly 2021-04-05 04:48:25 +02:00
Ilya Shipitsin
46b54f00be
Merge pull request #1318 from davidebeatrici/minimum-version-windows-vista
Cedar, Mayaqua: Set minimum Windows version to Vista
2021-04-03 22:02:50 +05:00
Davide Beatrici
5cab279a8c Cedar, Mayaqua: Set minimum Windows version to Vista 2021-04-03 02:25:19 +02:00
Davide Beatrici
3e17c818a6
Merge PR #1317: Mayaqua/Network.c: Always use fcntl() to toggle socket non-blocking mode (UNIX) 2021-04-01 19:23:45 +02:00
Davide Beatrici
84588095d5 Mayaqua/Network.c: Always use fcntl() to toggle socket non-blocking mode (UNIX)
O_NONBLOCK is standardized by POSIX, as opposed to FIONBIO.

This commit also fixes a bug: fcntl() was only called to disable the mode.
2021-04-01 08:04:27 +02:00
Davide Beatrici
a79f91161f
Merge PR #1316: Bump y18n from 4.0.0 to 4.0.1 in /src/bin/hamcore/wwwroot/admin/default 2021-03-30 20:29:50 +02:00
dependabot[bot]
ed6013affc
Bump y18n from 4.0.0 to 4.0.1 in /src/bin/hamcore/wwwroot/admin/default
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-30 18:00:59 +00:00
Davide Beatrici
ac04e15b72
Merge PR #1313: Merge Windows manifest files into a single one 2021-03-30 07:15:48 +02:00
Davide Beatrici
4db6247b80 Merge Windows manifest files into a single one 2021-03-27 00:33:20 +01:00
Davide Beatrici
3761876254
Merge PR #1306: Mayaqua: Fix UDP send error when used with reverse proxy 2021-03-23 19:46:11 +01:00
domosekai
934e49fea0 Mayaqua/Network.c: Fix UDP send error when used with reverse proxy 2021-03-23 11:59:23 +00:00
Davide Beatrici
b7e7d3b028
Merge PR #1296: Update BUILD_UNIX.md dependencies 2021-03-13 04:21:36 +01:00
David Refoua
808f081e3a
update install dependencies (libsodium) 2021-03-13 05:45:30 +03:30
Ilya Shipitsin
8fb9bfd39c
Merge pull request #1295 from davidebeatrici/vpndrvinst-revamp
New vpndrvinst implementation, independent from Cedar and Mayaqua
2021-03-12 12:55:28 +05:00
Davide Beatrici
9d29d8813b New vpndrvinst implementation, independent from Cedar and Mayaqua
This greatly improves performance and reduces the binary's size (~0.2 MB vs ~5 MB).

All recent Windows versions are supported, starting with Vista.

No dialogs are created, aside from error/warning ones in case of failure.

The only dependency (aside from Windows libraries) is libhamcore.
2021-03-12 05:46:20 +01:00
Davide Beatrici
68367fa2fb hamcore: Restore warning_*.txt files
They were accidentally removed in 8e2616ef7d.
2021-03-11 20:15:20 +01:00
Davide Beatrici
d5fa90cc71
Merge PR #1293: hamcorebuilder: Use libhamcore to build archive 2021-03-10 03:11:11 +01:00
Davide Beatrici
68574e9af9 hamcorebuilder: Use libhamcore to build archive
https://github.com/SoftEtherVPN/libhamcore
2021-03-10 02:13:00 +01:00
Davide Beatrici
de03b3ec59
Merge PR #1292: Bump elliptic from 6.5.3 to 6.5.4 in /src/bin/hamcore/wwwroot/admin/default 2021-03-09 20:13:44 +01:00
dependabot[bot]
9e7f26395a
Bump elliptic in /src/bin/hamcore/wwwroot/admin/default
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-09 08:28:13 +00:00
Davide Beatrici
b00aa39b29
Merge PR #1289: CMake: Fix regular expression for BLAKE2 SSE2 source files selection 2021-03-02 01:30:58 +01:00
Davide Beatrici
2d82d84fd5 CMake: Fix regular expression for BLAKE2 SSE2 source files selection
The comparison was being made against the variable's name instead of its value, causing the result to always be true.
For reference: https://cmake.org/cmake/help/v3.10/manual/cmake-generator-expressions.7.html#genex:BOOL

In addition to that, this commit also fixes the source file name of the non-SSE2 code.
2021-03-01 23:24:34 +01:00
Davide Beatrici
42dbfb7c7e
Merge PR #1287: Cedar/WinUi.c: Remove reference to "vpncmd_x64.exe" and "vpncmd_ia64.exe" 2021-03-01 04:45:30 +01:00
Davide Beatrici
ef5c32dca1
Merge PR #1286: Azure Pipelines: Replace "x86_64" with "x64", for consistency with the codebase 2021-03-01 04:36:50 +01:00
Davide Beatrici
65483499bf Cedar/WinUi.c: Remove reference to "vpncmd_x64.exe" and "vpncmd_ia64.exe"
It was missed in a3eb115b0a.
2021-03-01 04:27:43 +01:00
Davide Beatrici
3ffdda6c13 Azure Pipelines: Replace "x86_64" with "x64", for consistency with the codebase 2021-03-01 04:03:28 +01:00
Davide Beatrici
3d69a71d9b
Merge PR #1200: Implement support for WireGuard 2021-03-01 03:59:35 +01:00
Davide Beatrici
4506b60e80
Merge PR #1282: Use bool from stdbool.h, get rid of BOOL 2021-03-01 03:44:22 +01:00
Davide Beatrici
b6b692046c Cedar/CMInner.h: Fix wrong signature for CmPolicyDlgPrintEx2() 2021-03-01 03:01:34 +01:00
Davide Beatrici
56a19d7651 Cedar/Win32Com.cpp: Fix wrong signature for SetupCopyOEMInfW() and SetupUninstallOEMInfW()
https://docs.microsoft.com/en-us/windows/win32/api/setupapi/nf-setupapi-setupcopyoeminfw
https://docs.microsoft.com/en-us/windows/win32/api/setupapi/nf-setupapi-setupuninstalloeminfw
2021-03-01 03:01:34 +01:00
Davide Beatrici
2078a069de Cedar/Hub: Properly set value for hub admin options
Same deal as with the previous commit: worked fine as long as bool was 4-bytes wide.
2021-03-01 03:01:34 +01:00
Davide Beatrici
562ffe8945 Mayaqua/Pack: Fix PackGetStrSize() and PackGetStrSizeEx()'s return data type
The bug caused ProtoOptionsGet and ProtoOptionsSet not to work anymore after c90617e0e86dedf78e0e3c8a71263a80eec29caa.

The functions were introduced in aa65327e73, but the issue went unnoticed because bool was the same as UINT.
2021-03-01 03:01:34 +01:00
Davide Beatrici
914bfe7d44 Use bool from stdbool.h, get rid of BOOL
BOOL was just an alias for bool, this commit replaces all instances of it for consistency.

For some reason bool was defined as a 4-byte integer instead of a 1-byte one, presumably to match WinAPI's definition: https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types
Nothing should break now that bool is 1-byte, as no protocol code appears to be relying on the size of the data type.
PACK, for example, explicitly stores boolean values as 4-byte integers.

This commit can be seen as a follow-up to 61ccaed4f6.
2021-03-01 03:01:34 +01:00
Davide Beatrici
7f30cbccf4
Merge PR #1285: Mayaqua: Fix several warnings related to Windows data type mismatches 2021-03-01 03:01:25 +01:00
Davide Beatrici
2dab282eb2 CI: Switch from Ubuntu 16.04 to 18.04, install libsodium
This commit:

- Switches from Ubuntu 16.04 to 18.04 for all builds, mainly in order to use a more recent version of libsodium.
- Installs libsodium, used by the WireGuard implementation.
2021-03-01 02:56:16 +01:00
Davide Beatrici
ef24ff74c8 Cedar/Admin.c: Restrict StGetProtoOptions() access to server administrators
This is in order to protect the WireGuard private key.
2021-03-01 02:49:59 +01:00
Davide Beatrici
a8580458c4 Cedar/Command: Add WgkAdd, WgkDelete and WgkEnum commands
WgkAdd command - Add a WireGuard key
Help for command "WgkAdd"

Purpose:
  Add a WireGuard key

Description:
  This command can be used to add a WireGuard key to the allowed key list.
  To execute this command, you must have VPN Server administrator privileges.

Usage:
  WgkAdd [key] [/HUB:hub] [/USER:user]

Parameters:
  key   - WireGuard key. Make sure it is the public one!
  /HUB  - Hub the key will be associated to.
  /USER - User the key will be associated to, in the specified hub.

================================================================================

WgkDelete command - Delete a WireGuard key
Help for command "WgkDelete"

Purpose:
  Delete a WireGuard key

Description:
  This command can be used to delete a WireGuard key from the allowed key list.
  To execute this command, you must have VPN Server administrator privileges.

Usage:
  WgkDelete [key]

Parameters:
  key - WireGuard key.

================================================================================

WgkEnum command - List the WireGuard keys
Help for command "WgkEnum"

Purpose:
  List the WireGuard keys

Description:
  This command retrieves the WireGuard keys that are allowed to connect to the server, along with the associated Virtual Hub and user.
  You can add a key with the WgkAdd command.
  You can delete a key with the WgkDelete command.
  To execute this command, you must have VPN Server administrator privileges.

Usage:
  WgkEnum
2021-03-01 02:49:59 +01:00
Davide Beatrici
6115f1c713 Cedar/Admin: Implement RPC methods to add/delete/list WireGuard keys 2021-03-01 02:49:59 +01:00
Davide Beatrici
dd1eebdbed Cedar: Implement support for WireGuard
Please note that the implementation is not 100% conformant to the protocol whitepaper (https://www.wireguard.com/papers/wireguard.pdf).
More specifically: all peers are expected to send a handshake initiation once the current keypair is about to expire or is expired.
I decided not to do that because our implementation is meant to act as a server only. A true WireGuard peer acts, instead, as both a client and a server.
Once the keypair is expired, we immediately delete the session.

The cookie mechanism can be implemented in future.

As for authentication: unfortunately using the already existing methods is not possible due to the protocol not providing a way to send strings to a peer.
That's because WireGuard doesn't have a concept of "users": it identifies a peer through the public key, which is determined using the source address.
As a solution, this commit adds a special authentication method: once we receive the handshake initiation message and decrypt the peer's public key, we check whether it's in the allowed key list.
If it is, we retrieve the associated Virtual Hub and user; if the hub exists and the user is in it, the authentication is successful.

The allowed key list is stored in the configuration file like this:

declare WireGuardKeyList
{
	declare 96oA7iMvjn7oXiG3ghBDPaSUytT75uXceLV+Fx3XMlM=
	{
		string Hub DEFAULT
		string User user
	}
}
2021-03-01 02:49:59 +01:00
Davide Beatrici
8495388933 Cedar/IPC: Remove unused "UserName" and "Password" variables and assignment code
This commit also removes "HubName"'s first assignment, because the value is retrieved from PACK later (identifier: "IpcHubName").
2021-03-01 02:49:59 +01:00
Davide Beatrici
afe576dcdc Cedar: Add "DefaultGateway" and "DefaultSubnet" virtual hub options
WireGuard does not provide any configuration messages, meaning that we cannot push the IP address we receive from the DHCP server to the client.

In order to overcome the limitation we don't perform any DHCP operations and instead just extract the source IP address from the first IPv4 packet we receive in the tunnel.

The gateway address and the subnet mask can be set using the new "SetStaticNetwork" command. The values can be retrieved using "OptionsGet".

In future we will add a "allowed source IP addresses" function, similar to what the original WireGuard implementation provides.

================================================================================

SetStaticNetwork command - Set Virtual Hub static IPv4 network parameters
Help for command "SetStaticNetwork"

Purpose:
  Set Virtual Hub static IPv4 network parameters

Description:
  Set the static IPv4 network parameters for the Virtual Hub. They are used when DHCP is not available (e.g. WireGuard sessions).
  You can get the current settings by using the OptionsGet command.

Usage:
  SetStaticNetwork [/GATEWAY:gateway] [/SUBNET:subnet]

Parameters:
  /GATEWAY - Specify the IP address of the gateway that will be used for internet communication.
  /SUBNET  - Specify the subnet mask, required to determine the size of the local VPN network.
2021-03-01 02:49:59 +01:00
Davide Beatrici
decfcecc97 Cedar: Add ProtoOptionString() in PROTO_IMPL, to generate default option values
The WireGuard implementation will have two options that should not have a fixed default value, because they represent two keys (one is preshared, the other is private).

Instead of handling these two options differently in ProtoNewContainer(), this commit adds a new function to PROTO_IMPL: ProtoOptionString().

ProtoOptionString() takes the option's name as argument and returns a heap-allocated string that will be used as value. The function returns NULL when the option doesn't need a randomized value.
2021-03-01 02:49:59 +01:00
Davide Beatrici
d8aa470192 Cedar: Improve IsPacketForMe()'s "data" argumment in PROTO_IMPL
This allows a protocol implementation to implicitly cast the variable to the type it prefers.
2021-03-01 02:49:59 +01:00
Davide Beatrici
b339104f4f Cedar: Add "BLAKE2" submodule
OpenSSL provides BLAKE2s, but it only supports an output of 32 bytes. For WireGuard we need a 16 bytes output as well.

The minimum CMake version is bumped to 3.10 because it adds HAS_SSE2 to cmake_host_system_information(): https://cmake.org/cmake/help/v3.10/command/cmake_host_system_information.html
2021-03-01 02:49:57 +01:00
Davide Beatrici
8a37f5ce11 Mayaqua/Network.c: Fix several warnings related to Windows data type mismatches
Also, reported unused variables are removed.
2021-03-01 02:48:38 +01:00
Davide Beatrici
e7bf97583d Mayaqua/Microsoft: Fix several warnings related to Windows data type mismatches
Also, reported unused variables are removed.
2021-03-01 02:30:45 +01:00
Davide Beatrici
a39905c288
Merge PR #1283: Link to Windows libraries in CMake project, remove related #pragma directives 2021-02-28 21:09:05 +01:00
Davide Beatrici
dbd4dd5ae7 Link to Windows libraries in CMake project, remove related #pragma directives
In addition to making the code cleaner, this also prevents potential issues due to #pragma directives being in headers.
2021-02-28 20:35:25 +01:00
Davide Beatrici
ec201f340a
Merge PR #1281: CMake: Build hamcore.se2 only when related files change 2021-02-27 21:20:13 +01:00
Davide Beatrici
0a924aea4d CMake: Build hamcore.se2 only when related files change
Previously, the file was rebuilt even if no changes were made to the source files.
2021-02-27 20:52:44 +01:00
Davide Beatrici
d161b75a7d
Merge PR #1280: hamcorebuilder: Fix possible resource leak found by Coverity 2021-02-27 04:37:57 +01:00
Davide Beatrici
621fb087f8 hamcorebuilder: Fix possible resource leak found by Coverity
FileClose() was not called if FileRead() failed.
2021-02-27 04:18:18 +01:00
Davide Beatrici
809f891f0c
Merge PR #1279: CMake: Explicitly set C standard to 99 2021-02-27 01:25:05 +01:00
Davide Beatrici
82f2c73ce9 CMake: Explicitly set C standard to 99
This change fixes our Ubuntu Trusty and Precise builds on GitLab, which currently fail because they use C89/90 by default.
2021-02-27 00:35:58 +01:00
Davide Beatrici
5cddafbb3b
Merge PR #1278: move coverity scan to github actions, cleanup travis-ci 2021-02-27 00:24:44 +01:00
Ilya Shipitsin
dd6e79d526 remove travis-ci badge 2021-02-27 01:13:29 +05:00
Ilya Shipitsin
5792aa7c41 remove coverity scan from travis 2021-02-27 01:12:59 +05:00
Ilya Shipitsin
0325c13c40 move coverity scan to github actions 2021-02-27 01:12:07 +05:00
Ilya Shipitsin
25e2854725
Merge pull request #1277 from davidebeatrici/hamcorebuilder-revamp
New hamcorebuilder implementation, independent from Cedar and Mayaqua
2021-02-27 00:20:17 +05:00
Davide Beatrici
cf2585c079 Hamcore: Remove unused functions 2021-02-26 07:06:29 +01:00
Davide Beatrici
1301dc93c6 New hamcorebuilder implementation, independent from Cedar and Mayaqua
This new implementation can be easily compiled and executed without the need for other components to be present.

It relies on standard C functions, aside from stat() which is part of POSIX but available on Windows as well.

There's only one third-party dependency, which is tinydir: a single-file header-only library for traversing directories.
2021-02-26 07:06:26 +01:00
Davide Beatrici
5ed11a0270
Merge PR #1276: fix several issues found by Coverity 2021-02-23 21:18:42 +01:00
Ilya Shipitsin
5c346ef96e remove dead code found by Coverity
2575        // Address
    at_least: At condition size < 1U, the value of size must be at least 1.
    cannot_single: At condition size < 1U, the value of size cannot be equal to 0.
    dead_error_condition: The condition size < 1U cannot be true.
2576        if (size < 1)
2577        {
    CID 287533 (#1 of 1): Logically dead code (DEADCODE)dead_error_line: Execution cannot reach this statement: goto LABEL_ERROR;.
2578                goto LABEL_ERROR;
2579        }
2021-02-24 00:35:17 +05:00
Ilya Shipitsin
2715d80e18 fix potential null pointer dereference found by Coverity
CID 355460 (#1 of 1): Dereference before null check (REVERSE_INULL)check_after_deref: Null-checking p suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
737                if (p == NULL)
738                {
739                        return false;
740                }
2021-02-24 00:26:44 +05:00
Ilya Shipitsin
a08857150b cleanup redundant check found by Coverity
CID 287561 (#1 of 1): Array compared against 0 (NO_EFFECT)array_null: Comparing an array to null is not useful: src == NULL, since the test will always evaluate as true.
    Was src formerly declared as a pointer?
3748        if (cedar == NULL || src == NULL || dst == NULL)
3749        {
3750                return false;
3751        }
2021-02-24 00:04:52 +05:00
Ilya Shipitsin
e5cfa347da
Merge pull request #1274 from davidebeatrici/src-bin-hamcore-cleanup
hamcore: Remove files that are not referenced in the code
2021-02-22 13:36:56 +05:00
Ilya Shipitsin
a6239a4ae3
Merge pull request #1238 from metalefty/translate-LH_AUTH_NG
Japanese: translate LH_AUTH_NG again
2021-02-22 12:06:26 +05:00
Davide Beatrici
8e2616ef7d hamcore: Remove files that are not referenced in the code 2021-02-22 00:44:35 +01:00
Davide Beatrici
ea2c8f9861
Merge PR #1273: fix null pointer dereference found by ErrorSanitizer 2021-02-21 14:10:08 +01:00
Ilya Shipitsin
e5e86abc0e fix null pointer dereference found by ErrorSanitizer
(gdb) bt
0  0x00007f43857a5e14 in __GI___pthread_mutex_init (mutex=0x0, mutexattr=0x0) at pthread_mutex_init.c:89
1  0x00007f4385eaaf1b in UnixNewLock () at SoftEtherVPN/src/Mayaqua/Unix.c:1845
2  0x00007f4385e92331 in NewLockMain () at SoftEtherVPN/src/Mayaqua/Object.c:89
3  0x00007f4385e92359 in NewLock () at SoftEtherVPN/src/Mayaqua/Object.c:101
4  0x00007f4385e92765 in NewCounter () at SoftEtherVPN/src/Mayaqua/Object.c:171
5  0x00007f4385e92e76 in NewRef () at SoftEtherVPN/src/Mayaqua/Object.c:339
6  0x00007f4385e76939 in NewSkEx (no_compact=0) at SoftEtherVPN/src/Mayaqua/Memory.c:863
7  0x00007f4385e68c95 in NormalizePathW (
    dst=0x7ffe65932940 L"\xd6ff2ffb\xfbf14ce5\xad8669ca\x41998a9c\x5107d62d\x8d2ab3f2\x37ceaad2\xffc947ec\xad8ed8d8\x33e9f2f7\xc05723a9\x843263e3\x5516beb3\x12571e2a\xd81405f3\xf92194fe\xd807aa98\x12835b01\x243185be\x550c7dc3\xfd74170d\x12835b01\x553185be\x550c7dc3\x72be5d74\x80deb1fe\x9bdc06a7\xc19bf1f4\x72be5d74\x80deb1fe\x9bdc06a7\xc19bf174\x894d4018\xc54302b8\x145dc92\x143b3917\x62aa4fb8\x915764b1\xd5e11bef\x9d5fbc5\xb956c25b\x59f111f1\x923f82a4\xab1c5ed5\x3956c25b\x59f111f1\x923f82a4\xab1c5ed5\xbaeb40", size=2048, src=<optimized out>)
    at SoftEtherVPN/src/Mayaqua/FileIO.c:1960
8  0x00007f4385e69188 in ConbinePathW (
    dst=0x7ffe65932940 L"\xd6ff2ffb\xfbf14ce5\xad8669ca\x41998a9c\x5107d62d\x8d2ab3f2\x37ceaad2\xffc947ec\xad8ed8d8\x33e9f2f7\xc05723a9\x843263e3\x5516beb3\x12571e2a\xd81405f3\xf92194fe\xd807aa98\x12835b01\x243185be\x550c7dc3\xfd74170d\x12835b01\x553185be\x550c7dc3\x72be5d74\x80deb1fe\x9bdc06a7\xc19bf1f4\x72be5d74\x80deb1fe\x9bdc06a7\xc19bf174\x894d4018\xc54302b8\x145dc92\x143b3917\x62aa4fb8\x915764b1\xd5e11bef\x9d5fbc5\xb956c25b\x59f111f1\x923f82a4\xab1c5ed5\x3956c25b\x59f111f1\x923f82a4\xab1c5ed5\xbaeb40", size=2048,
    dirname=0xbace10 L"/root/.local/bin", filename=0x7ffe65932100 L"SoftEtherVPN/build/vpntest") at SoftEtherVPN/src/Mayaqua/FileIO.c:1686
9  0x00007f4385e6af48 in UnixGetExeNameW (name=0x7f4385ede820 <exe_file_name_w> L"/tmp/a.out", size=2048, arg=0xbb5050 L"./vpntest") at SoftEtherVPN/src/Mayaqua/FileIO.c:1401
10 0x00007f4385e6b04b in InitGetExeName (arg=<optimized out>) at SoftEtherVPN/src/Mayaqua/FileIO.c:1367
11 0x00007f4385e7470a in InitMayaqua (memcheck=memcheck@entry=0, debug=debug@entry=1, argc=argc@entry=3, argv=argv@entry=0x7ffe659340e8)
    at SoftEtherVPN/src/Mayaqua/Mayaqua.c:456
12 0x0000000000401282 in main (argc=3, argv=0x7ffe659340e8) at SoftEtherVPN/src/vpntest/vpntest.c:259
2021-02-21 16:13:36 +05:00
Ilya Shipitsin
992410c3d4
Merge pull request #1257 from chipitsine/master
add basic OpenSUSE workflow
2021-02-21 09:29:56 +05:00
Davide Beatrici
cd889f78dc
Merge PR #1272: Azure Pipelines: Use "python3" instead of "python" on macOS, restore inline if statement in version.py 2021-02-20 17:53:20 +01:00
Davide Beatrici
cabcba1ef9 Revert "version.py: Fix CI failure on macOS by avoiding inline if statement"
This reverts commit 63b841efc0.
2021-02-20 17:27:02 +01:00
Davide Beatrici
2969237e04 Azure Pipelines: Use "python3" instead of "python" on macOS
63b841efc0 was not the solution, the error is the print statement itself.

Python 2 is probably used by default and thus "python" is an alias to it.
2021-02-20 17:23:53 +01:00
Davide Beatrici
78f06569b3
Merge PR #1270: Update strtable_en.stb 2021-02-20 17:15:40 +01:00
Davide Beatrici
1fa6c14e4e
Merge PR #1271: version.py: Fix CI failure on macOS by avoiding inline if statement 2021-02-20 17:11:32 +01:00
Ilya Shipitsin
586c27d43b
Merge pull request #1269 from chipitsine/openssl_version_agnostic
use SSL_SECOP_VERSION macro instead of OPENSSL_VERSION
2021-02-20 20:56:26 +05:00
Davide Beatrici
63b841efc0 version.py: Fix CI failure on macOS by avoiding inline if statement
File "version.py", line 25
    print(version, end = end)
                       ^
SyntaxError: invalid syntax
2021-02-20 16:55:43 +01:00
Davide Beatrici
2981a44de3
Merge PR #1267: Improve versioning by setting the version in a single place and automatically increasing the build number 2021-02-20 16:44:21 +01:00
djony
2db9f15ea7
Update strtable_en.stb
"2050 LA_DEL_CRL" - this entry appear in logfile when you delete cert from Certificate Revocation List. Thats why need to change it. 
"2051 LA_SET_CRL" - this entry must appear in logfile when you edit cert in Certificate Revocation List, but it doesn't happen (perhaps it's a bug)
2021-02-20 17:56:33 +03:00
Ilya Shipitsin
ebd1d281dd use SSL_SECOP_VERSION macro instead of OPENSSL_VERSION
OPENSSL_VERSION is fragile in LibreSSL, BoringSSL.
security level manipulation is openssl specific defined in
b362ccab5c
2021-02-20 17:48:26 +05:00
Davide Beatrici
9620dcbcd0 Azure Pipelines: Retrieve build number from server, pass it to CMake
The script on our server bumps the build number for every new version + commit combination.
Each combination is associated to a unique build number and vice versa.
There's a separate counter for each version.

The reason why we cannot just use "git describe --tags --dirty" is because it relies on the last tag's name and generates a string like "5.01.9674-212-g54280853".
What we want, instead, is the last part of the version to be increased for every build.
Then, once we consider the branch stable enough, we create a tag like "5.01" and bump the version immediately after the new release.

Please note that for pull requests the build number will always be 0, because the secret token is only available in the Nightly pipeline.
2021-02-19 21:22:48 +01:00
Davide Beatrici
943ddadd3d Move Azure Pipelines configurations into dedicated directory 2021-02-19 21:17:05 +01:00
Davide Beatrici
272ec5a8ef Add BUILD_NUMBER option to CMake and version.py script
The BUILD_NUMBER option controls the last part of the version, allowing us to increase it for each build.

This commit also adds version.py, which simply prints the version (e.g. "5.01") specified in CMakeLists.txt.

The script will be used to determine the build number.
2021-02-19 21:17:05 +01:00
Davide Beatrici
d53f80bfa6 Remove BuildUtil and all MSBuild projects, except the ones not in CMake yet
Since 35200a29ea we build complete installers using CMake, meaning that there's no need for BuildUtil anymore.

MSBuild projects that are not migrated to CMake yet are kept for reference.

This commit also updates BUILD_WINDOWS.md so that it mentions Visual Studio 2019 instead of 2017.
2021-02-19 21:17:01 +01:00
Ilya Shipitsin
ac48ac348b add basic OpenSUSE workflow 2020-12-19 02:54:44 +05:00
Davide Beatrici
44447e9762
Merge PR #1252: Bump ini from 1.3.5 to 1.3.7 in /src/bin/hamcore/wwwroot/admin/default 2020-12-11 21:38:11 +01:00
dependabot[bot]
394354ff8a
Bump ini from 1.3.5 to 1.3.7 in /src/bin/hamcore/wwwroot/admin/default
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-11 09:21:51 +00:00
Ilya Shipitsin
6ff00f637b
Merge pull request #1249 from davidebeatrici/proto-sstp-handleconnection-crash-fix
Cedar/Proto.c: fix crash in ProtoHandleConnection()
2020-12-08 21:26:20 -08:00
sl077
5611156ca8 Cedar/Proto.c: fix crash in ProtoHandleConnection()
The bug was introduced in 8685fe0da1.
2020-12-09 01:17:59 +01:00
Davide Beatrici
f03e83369e
Merge PR #1248: Bug fix: Proxy button not enabled for SOCKS5 2020-12-08 08:23:33 +01:00
Allen Cui
501fe217ff
Bug fix: Proxy button not enabled for SOCKS5
https://github.com/SoftEtherVPN/SoftEtherVPN/issues/1247
2020-12-08 14:12:21 +08:00
Ilya Shipitsin
bf1201aa26
Merge pull request #1245 from dnobori/201130_fix_bad_remove
Found the bad remove for lock files.
2020-11-30 04:29:44 -08:00
Daiyuu Nobori
a207260e38 Found the bad remove for lock files. 2020-11-30 18:15:37 +09:00
Davide Beatrici
eddf593e22
Merge PR #1243: update Install requirements on macOS 2020-11-23 21:57:05 +01:00
Kensei Sakai
3fa24c6731
update Install requirements on macOS
Ruby-based Homebrew installer is deprecated by original authors, and replaced Bash-based Installer.
(ref1: https://github.com/Homebrew/install/blob/master/README.md )
(ref2: 2680637777 (diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5) )

note: /Homebrew/install/master/install also runs Bash-based installer now.
2020-11-23 21:22:29 +09:00
Davide Beatrici
5f12684b42
Merge PR #1240: Fixed setting change trigger of keepalive function 2020-11-17 07:17:02 +01:00
Tetsuo Sugiyama
5f6306d5e5
Fixed setting change trigger of keepalive function
To solve the problem that the escape condition of the loop that tries name resolution in UDP mode was reversed in the keep-alive function of the Internet connection, so the name resolution retry is set to 250 msec interval instead of the normal 60 second interval.
2020-11-17 12:23:14 +09:00
Koichiro IWAO
023250df9a
hamcore(ja): translate LH_AUTH_NG
Regressed to English in #1122.
2020-11-10 13:30:08 +09:00
Davide Beatrici
16ca0694fb
Merge PR #1236: wait for vpnserver to listen localhost:443 in live tests 2020-11-04 20:30:03 +01:00
Ilya Shipitsin
99e99a46b1 wait for vpnserver to listen localhost:443 in live tests 2020-11-04 22:45:56 +05:00
Davide Beatrici
fffed52f3b
Merge PR #1235: Manage security level 2020-10-31 22:12:08 +01:00
Ilya Shipitsin
69b4001355
Merge pull request #1231 from chipitsine/master
Cedar/Session.c: fix "use after free" in CleanupSession()
2020-10-31 22:28:20 +03:00
Takuho NAKANO
c029b34b80 Run SSL_CTX_set_ssl_version earlier
SSL_CTX_set_ssl_version may change security level.
2020-10-31 20:19:32 +01:00
Takuho NAKANO
7fdacec2a6 Manage OpenSSL security level
Add SslAcceptSettings option Override_Security_Level and Override_Security_Level_Value
to allow user to choose.
2020-10-31 20:19:23 +01:00
Takuho NAKANO
190672bd84 Set RSA bits considering OpenSSL security Level 2020-10-31 20:11:11 +01:00
Takuho NAKANO
5ca62bdd8a Refact: manage SSL_OP_NO_SSLv3 in NewSSLCtx 2020-10-31 20:11:11 +01:00
Takuho NAKANO
d0b3cde485 Refact: move SSL_CTX_set_ssl_version to NewSSLCtx 2020-10-31 20:11:11 +01:00
Ilya Shipitsin
bb2e2ff997 Cedar/Session.c: fix "use after free" in CleanupSession()
Fixes #1226.
2020-10-31 20:03:22 +01:00
Ilya Shipitsin
a2d15615f3
Merge pull request #1115 from takotakot/import_v4_change
Add Tls_Disable1_3 (Import v4 change)
2020-10-31 20:04:20 +03:00
Davide Beatrici
945715e4bb
Merge PR #1227: README.md: update build status badges 2020-10-15 07:18:29 +02:00
Nemo Xiong
1ac7602b3a README.md: update build status badges
This commit:

- Replaces the broken GitLab CI badge link (reference: https://docs.gitlab.com/ee/ci/pipelines/settings.html#pipeline-status-badge).
- Adds the Azure Pipelines badge for the Nightly pipeline.
- Adds the Cirrus CI badge.
- Rearranges the badges in a table.
2020-10-15 06:30:08 +02:00
Davide Beatrici
3c140dde8d
Merge PR #1218: Cedar: DHCP server now assigns static IPv4 address, if present in user note 2020-10-12 05:18:41 +02:00
PeTeeR
d29d1f516a Add myself to AUTHORS 2020-10-12 04:56:37 +02:00
PeTeeR
b890c7d813 Cedar: DHCP server now assigns static IPv4 address, if present in user note
This works for all VPN protocols.

In SessionMain(): for DHCPDISCOVER and DHCPREQUEST frames, write the static IP address (which is retrieved from the user notes) in the SIADDR field of DHCPHEADER.

In VirtualDhcpServer(): for DHCPDISCOVER and DHCPREQUEST frames, read the static IP address from the SIADDR field of DHCPHEADER and assign it to the client.
2020-10-12 04:56:33 +02:00
Ilya Shipitsin
8bb787f233
Merge pull request #1225 from chipitsine/master
travis-ci: do not use aggressive LD_LIBRARY_PATH anymore
2020-10-11 15:38:45 +03:00
Ilya Shipitsin
819f2f92f6 travis-ci: do not use aggressive LD_LIBRARY_PATH anymore
switch to more elegant "rpath" linking
2020-10-11 00:25:45 +05:00
Ilya Shipitsin
e6a80fb4f2
Merge pull request #1223 from chipitsine/master
travis-ci: fix coverity build (broken since 20 Jul 2020)
2020-10-10 22:18:03 +03:00
Davide Beatrici
249575a5a5
Merge PR #1224: fix build documentation 2020-10-10 21:10:38 +02:00
Ilya Shipitsin
2c9ac51c84 fix build documentation 2020-10-10 17:20:56 +05:00
Ilya Shipitsin
9e7d87bea6 travis-ci: fix coverity build (broken since 20 Jul 2020) 2020-10-10 17:04:34 +05:00
Ilya Shipitsin
3cf23e58a3
Merge pull request #1210 from nokia/openssl_engine_auth
Openssl engine certificate authentication
2020-10-09 12:31:18 +03:00
mcallist
f52ccc6493 Add translation for pw_type5 for the non-english languages 2020-10-09 11:03:55 +02:00
mcallist
2e0c24f6c8 Add english translation to each language for openssl engine auth 2020-10-09 10:22:23 +02:00
mcallist
d1ad4196bb Change from unix only implementation to all os and skip ENGINE_load_dynamic if oss is 1.1.0 or later 2020-10-09 09:58:34 +02:00
mcallist
1e164ecc4e Fix openssl engine's internationalisation
Only english yet
2020-10-09 09:30:50 +02:00
mcallist
51ffe4be2c Add accountcertget for openssl engine authentication type
retrigger build
2020-10-09 07:35:28 +02:00
mcallist
20b84f3928 Change openssl version checking to api compat 2020-10-09 04:58:25 +02:00
mcallist
dec532a8eb Increase required openssl version for openssl engines implementation 2020-10-09 03:32:53 +02:00
mcallist
ff3910eb86 Openssl engine certificate authentication
TODO cert get, call finish engine, call init engine in another step, handle authentication, internatiolazion (help is needed)
2020-10-09 02:56:51 +02:00
Davide Beatrici
684d17e86a
Merge PR #813: BuildUtil: fix an issue encountered with Visual Studio 2008 on Windows XP 2020-09-19 01:31:28 +02:00
C Linus Hicks
efd24133be BuildUtil: fix an issue encountered with Visual Studio 2008 on Windows XP
- When building on Windows XP using Visual Studio 2008, I encountered the following issue.
- I did a fresh install of Windows XP SP3 32-bit, then applied updates including .NET 3.5. Next I installed MS Visual Studio 2008, then updated with sp1. All of this according to the documentation in your readme for building on Windows.
- In file src/BuildUtils/VpnBuilder.cs, there are two "if" statements testing the same thing, which is to determine if it is a 32-bit or 64-bit machine/compiler. But the then and else clauses are reversed, so clearly, one of them is wrong. The result I saw is that the SDK path being used to run RC.exe is left as the NULL string and so it fails to run the RC.exe program.
- This happens early in the build process, building the build utils. The two "if" statements are used to set paths for the Visual Studio VC and SDK directories. Depending on the integer pointer size, it uses different paths in the registry.
- When I looked in the registry on my Windows XP machine, there is no key HKLM\SOFTWARE\Wow6432Node, I have only seen that on 64-bit machines.
- For the fix, I consolidated the two "if" statements into one, the existing statement on line 380 would only set a value for Paths.VisualStudioVCDir (which got set correctly). Now I moved the code for also setting Paths.MicrosoftSDKDir, while reversing the values from the incorrectly coded "if" statement.
- I can understand that under certain circumstances, this issue would not be encountered, but should be easily reproducible when installing a clean system.
2020-09-19 00:35:13 +02:00
Davide Beatrici
1c4b257a1b
Merge PR #1211: Fix Parameter Descriptions in the JSON-RPC Documentation 2020-09-09 20:40:47 +02:00
Stephen H
77aee2d21c
Fix Parameter Descriptions
Fix the packet count and bytes being mismatched in the JSON-RPC documentation.
2020-09-09 21:26:05 +10:00
Ilya Shipitsin
f22b013dda
Merge pull request #1201 from metalefty/japanese
Japanese translation
2020-09-04 16:21:53 +03:00
Koichiro IWAO
488eb06d64
hamcore(ja): translate leftovers 2020-09-04 22:19:10 +09:00
Koichiro IWAO
763e1b67a5
hamcore(ja): translate AccountRetryOnServerCert* command 2020-09-04 22:19:10 +09:00
Koichiro IWAO
fc39173b73
hamcore(ja): translate OpenVPN client certificate authentication 2020-09-04 22:19:06 +09:00
Koichiro IWAO
1a4ed27e89
hamcore(ja): revise CMD_AccountHttpHeaderDelete_[name] 2020-09-04 22:17:00 +09:00
Koichiro IWAO
cd0db9c7d6
hamcore(ja): translate CascadeHttpHeader* command 2020-09-04 22:17:00 +09:00
Koichiro IWAO
c5a3fd74c0
hamcore(ja): translate AccountHttpHeader* commands 2020-09-04 22:17:00 +09:00
Koichiro IWAO
a800e6f6cc
hamcore(ja): put trailing spaces as well as others
because these are prompt.
2020-09-04 22:17:00 +09:00
Koichiro IWAO
5b07163975
hamcore(ja): Translate UDP acceleration related messages
and put them to the correct place.
2020-09-04 22:16:55 +09:00
Davide Beatrici
feba98199b
Merge PR #1205: hamcore: correct mistake enable/disable in help meessages 2020-09-03 20:55:14 +02:00
Koichiro IWAO
7b73e3c0c8
hamcore: correct mistake enable/disable in help meessages 2020-09-03 21:54:50 +09:00
Davide Beatrici
490fc7b65c
Merge PR #1196: Use "clang-cl" for Windows builds on Azure Pipelines, fix non-const wchar_t array literal initialization 2020-08-16 02:32:57 +02:00
Davide Beatrici
a8fdc1184a Azure Pipelines: use "clang-cl" for Windows builds
Now that we can successfully compile with Clang, there's probably no reason to stick with MSVC.
2020-08-16 02:15:25 +02:00
Davide Beatrici
7edda54b9a CMake: only apply error c1010001 workaround for MSVC
Clang doesn't require it.
2020-08-16 01:22:28 +02:00
Davide Beatrici
cc5d68a7c3 Cedar/Win32Com.cpp: fix non-const wchar_t array literal initialization error
error: cannot initialize a variable of type 'wchar_t *' with an lvalue of type 'const wchar_t [4]'
        wchar_t *protocol_str = (udp ? L"UDP" : L"TCP");
                 ^              ~~~~~~~~~~~~~~~~~~~~~~~
2020-08-16 00:58:18 +02:00
Davide Beatrici
6a7883b5fe
Merge PR #1195: Define our types to the standard ones from <stdint.h>, remove unnecessary duplicate ones 2020-08-16 00:03:34 +02:00
Davide Beatrici
61ccaed4f6 Mayaqua/MayaType.h: define our types to the ones from <stdint.h> on non-Windows 2020-08-15 09:18:27 +02:00
Davide Beatrici
09f24e46b3 Remove "WORD", use "USHORT" everywhere for consistency 2020-08-15 09:18:27 +02:00
Davide Beatrici
69cd39616b Remove "UINT32" and "DWORD", use "UINT" everywhere for consistency 2020-08-15 09:18:27 +02:00
Davide Beatrici
e18bb465c9 Remove "CHAR", use lowercase everywhere for consistency
As a bonus we fix 3 cast warnings.
2020-08-15 09:18:27 +02:00
Davide Beatrici
337a04b758 Remove "BOOL", "TRUE" and "FALSE", use lowercase everywhere for consistency 2020-08-15 09:18:27 +02:00
Davide Beatrici
1c56562cc7 Remove "UINT_PTR" and "LONG_PTR", use original type everywhere 2020-08-15 09:18:21 +02:00
Davide Beatrici
b4cd4ce360 Mayaqua/MayaType.h: remove unused integer types 2020-08-15 09:09:46 +02:00
Davide Beatrici
818103950c
Merge PR #1191: Proto: write message to log on session creation/deletion, remove redundant OpenVPN messages 2020-08-06 22:45:34 +02:00
Davide Beatrici
5d782a67b4 Cedar/Proto_OpenVPN.c: remove redundant log messages
The "session created" and "session deleted" messages were useful when a single OPENVPN_SERVER object handled multiple UDP sessions.

Now that each session has its own OPENVPN_SERVER object and session creations/deletions are logged by PROTO, the messages are redundant.

In future we will change the OpenVPN implementation so that the multi-session handling code is deleted.

The messages were like this:

OpenVPN Module: The OpenVPN Server Module is starting.
OpenVPN Session 1 (192.168.122.211:47390 -> 0.0.0.0:1194): A new session is created. Protocol: UDP

OpenVPN Session 1 (192.168.122.211:47390 -> 0.0.0.0:1194): Deleting the session.
OpenVPN Module: The OpenVPN Server Module is stopped.
2020-08-06 22:24:45 +02:00
Davide Beatrici
cda0062367 Cedar/Proto: add ProtoLog(), write message to log on session creation/deletion
Example:

[OpenVPN] 192.168.122.100:47390 -> 0.0.0.0:1194 (UDP): Session created.
[OpenVPN] 192.168.122.100:47390 -> 0.0.0.0:1194 (UDP): Session deleted.

[OpenVPN] 192.168.122.100:49866 -> 192.168.122.1:1194 (TCP): Session created.
[OpenVPN] 192.168.122.100:49866 -> 192.168.122.1:1194 (TCP): Session deleted.
2020-08-06 22:24:24 +02:00
Davide Beatrici
a8c6a0c1b3 Cedar/Proto: rename "ProtoNewSession()" to "ProtoSessionNew()" and "ProtoDeleteSession()" to "ProtoSessionDelete()"
For consistency.

Also, the "proto" argument is now marked as const.
2020-08-06 02:41:13 +02:00
Davide Beatrici
712c51a971
Merge PR #1190: Cedar/Proto.c: fix session deletion not being triggered in certain cases 2020-08-05 01:53:08 +02:00
Davide Beatrici
ac1b045634 Cedar/Proto.c: fix session deletion not being triggered in certain cases
ProtoHandleDatagrams() takes care of deleting a session if marked as halted.
However, the check is performed when a packet for that session is received; that never happens if the remote host doesn't send at least a packet.

This commit fixes the issue by moving the check into the loop that iterates through all sessions.
2020-08-05 01:25:03 +02:00
Davide Beatrici
3b2db45509
Merge PR #1188: Bump elliptic from 6.4.1 to 6.5.3 in /src/bin/hamcore/wwwroot/admin/default 2020-07-30 22:53:21 +02:00
dependabot[bot]
10e292b196
Bump elliptic in /src/bin/hamcore/wwwroot/admin/default
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.4.1 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.4.1...v6.5.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-30 18:44:29 +00:00
Davide Beatrici
e8793a0098
Merge PR #1187: Find OpenSSL and zlib on Windows like we do on UNIX, use vcpkg on Azure Pipelines, remove Windows build on AppVeyor 2020-07-28 20:13:39 +02:00
Davide Beatrici
5cdd2a4e4a
Merge PR #1177: Implement options API in Proto 2020-07-28 01:35:50 +02:00
Davide Beatrici
e1d9eaf590 .ci/start-se-openvpn.sh: use new vpncmd command to enable OpenVPN 2020-07-28 00:59:28 +02:00
Davide Beatrici
6b3ac84ba2 Cedar: remove old commands and unused variables 2020-07-28 00:57:37 +02:00
Davide Beatrici
18ad35ebfe Cedar/Admin: use Proto in StGetOpenVpnSstpConfig() and StSetOpenVpnSstpConfig()
For now Server Manager still uses the two RPC methods.
2020-07-28 00:57:36 +02:00
Davide Beatrici
b853140626 Cedar: use Proto API for protocol options 2020-07-28 00:57:36 +02:00
Davide Beatrici
5209b310e3 Cedar/Command: add ProtoOptionsGet and ProtoOptionsSet commands
ProtoOptionsGet command - Lists the options for the specified protocol
Help for command "ProtoOptionsGet"

Purpose:
  Lists the options for the specified protocol

Description:
  This command can be used to retrieve the options for a specific protocol.
  Detailed info (e.g. value type) will be shown.
  You can change an option's value with the ProtoOptionsSet command.

Usage:
  ProtoOptionsGet [protocol]

Parameters:
  protocol - Protocol name.

ProtoOptionsSet command - Sets an option's value for the specified protocol
Help for command "ProtoOptionsSet"

Purpose:
  Sets an option's value for the specified protocol

Description:
  This command can be used to change an option's value for a specific protocol.
  You can retrieve the options using the ProtoOptionsGet command.
  To execute this command, you must have VPN Server administrator privileges.

Usage:
  ProtoOptionsSet [protocol] [/NAME:option_name] [/VALUE:string/true/false]

Parameters:
  protocol - Protocol name.
  /NAME    - Option name.
  /VALUE   - Option value. Make sure to write a value that is accepted by the specified protocol!
2020-07-28 00:57:36 +02:00
Davide Beatrici
3a275d7257 Cedar/Admin: implement RPC methods to get/set Proto options 2020-07-28 00:57:36 +02:00
Davide Beatrici
aa65327e73 Mayaqua/Pack: add PackGetStrSize(), for strings with non-constant length 2020-07-28 00:57:36 +02:00
Davide Beatrici
b352aa4cc3 Cedar/Server: load and save Proto settings
Snippet from the server configuration:

declare root
{
...
	declare ServerConfiguration
	{
	...
		declare Proto
		{
			declare OpenVPN
			{
				string DefaultClientOption dev-type$20tun,link-mtu$201500,tun-mtu$201500,cipher$20AES-128-CBC,auth$20SHA1,keysize$20128,key-method$202,tls-client
				bool Enabled true
				bool Obfuscation false
				string ObfuscationMask $
				bool PushDummyIPv4AddressOnL2Mode true
			}
			declare SSTP
			{
				bool Enabled true
			}
		}
	...
	}
...
}
2020-07-28 00:57:36 +02:00
Davide Beatrici
6d85fffdb5 Cedar: introduce options API in Proto
PROTO_OPTION is a structure that describes an option (who would've guessed?).

It's designed in a way that allows it to occupy as low memory as possible, while providing great flexibility.

The idea is similar to the one implemented in LIST for trivial types, with the difference that PROTO_OPTION doesn't require casting due to the use of union.
2020-07-28 00:57:36 +02:00
Davide Beatrici
8685fe0da1 Cedar/Proto: introduce PROTO_CONTAINER, to store data for each implementation
ProtoImplDetect() is renamed to ProtoDetect(), because it now returns a pointer to a PROTO_CONTAINER (if successful).
2020-07-28 00:57:36 +02:00
Davide Beatrici
cd850c07ae Cedar: improve constness of PROTO_IMPL functions, move Name() at the top 2020-07-28 00:57:36 +02:00
Davide Beatrici
14a410a179 AppVeyor: remove Windows build
AppVeyor provides vcpkg and a great guide explaining how to use it and cache the installed packages: https://www.appveyor.com/docs/lang/cpp/#vc-packaging-tool

However, we're currently relying on Azure Pipelines for the Windows builds and keeping one on AppVeyor would be a waste of CI resources.
2020-07-28 00:00:34 +02:00
Davide Beatrici
c865103795 Azure Pipelines: install OpenSSL and zlib through vcpkg on Windows
This commit also changes the x86 build so that it uses the "amd64_x86" toolchain, for potentially better build performance.

The architecture is now appended to the installers.
2020-07-27 23:34:34 +02:00
Davide Beatrici
60410accce Remove Windows libraries and zlib submodule from the repository 2020-07-27 21:35:54 +02:00
Davide Beatrici
352ed759b2 CMake: find OpenSSL and zlib on Windows like we do on UNIX
This allows the project to be built with the support of vcpkg.
2020-07-27 21:32:50 +02:00
Davide Beatrici
b57a4b051b
Merge PR #1185: Build vpndrvinst and vpnsetup, build installers on Azure Pipelines, remove MSVC 2008 build on AppVeyor 2020-07-27 21:26:56 +02:00
Davide Beatrici
6c665f889f AppVeyor: remove MSVC 2008 build
The purpose of the configuration was to build installers and continually verify that MSVC 2008 could still build the project.

MSVC 2008 was a requirement because we wanted to maintain support for very old versions of Windows (9x).

During the past few years we encountered many annoying limitations due to that requirement, such as the lack of support for designated initializers.

We ended up deciding to only keep support for operating systems older than 7 in the stable repository.

As for the installers, we now build them on Azure Pipelines (currently with MSVC 2019).
2020-07-27 21:00:13 +02:00
Davide Beatrici
5bf08e63bb Azure Pipelines: build Windows installers and provide them as artifacts 2020-07-27 21:00:12 +02:00
Davide Beatrici
4b9c33cd30 Cedar/SW.c: disable "vpninstall" and "vpnweb" tasks
The reason why we don't build these two targets is that they're not used.

More specifically: they require proper configuration to work correctly, which is currently missing.

While vpninstall may be worth salvaging, vpnweb is definitely a relict of the past because it relies on ActiveX.
2020-07-27 20:59:40 +02:00
Davide Beatrici
78dad1d568 Mayaqua/Microsoft.h: rename "driver_installer.exe" to "vpndrvinst.exe"
vpndrvinst is the name of the target and thus the default output name, let's use it.

`vpndrvinst.exe" also sounds less fishy than "driver_installer.exe"...
2020-07-27 20:59:40 +02:00
Davide Beatrici
6a472d827a Mayaqua: remove all references to binaries with "_x64" and "_ia64" suffix
See the previous commit's message for details.
2020-07-27 20:59:40 +02:00
Davide Beatrici
a3eb115b0a Cedar: remove all references to binaries with "_x64" and "_ia64" suffix
BuildUtil compiles the project as 32 bit and 64 bit, before building the installer package.

64 bit binaries have the "_x64" suffix and are added to the package alongside the 32 bit ones (that have no suffix).

The CMake project compiles the binaries for a single architecture and they have no suffix.

We decided that providing two separate installers is the best solution.

As for the binaries with the "_ia64" suffix: they never existed during the this repository's lifespan.
2020-07-27 20:59:40 +02:00
Davide Beatrici
24d64222ea Cedar/SW.c: load "vpnsetup.exe" directly instead of expecting it to be in "hamcore.se2"
The MSBuild project built the binary into "src/bin/hamcore", causing it to be added to "hamcore.se2".

As hinted by the name of the file ("vpnsetup_nosign.exe"), it is not signed by BuildUtil, possibly to save time (the setup package is signed).

The CMake project builds the binary in the same directory as the other ones, allowing the setup to install them without the need to build a package.
2020-07-27 20:59:40 +02:00
Davide Beatrici
cc61c90372 Cedar/SW.c: remove "install_src.dat" file check
Previously, the file needed to be present in order for the setup to work.

This commit removes the requirement so that the setup can be ran from the build directory without the need to copy the file (which is now removed from the repository).
2020-07-27 20:59:40 +02:00
Davide Beatrici
35200a29ea CMake: build vpnsetup 2020-07-27 20:59:40 +02:00
Davide Beatrici
c084ce30f9 CMake: build vpndrvinst 2020-07-27 20:59:40 +02:00
Davide Beatrici
755e09e5c1 Don't include OpenSSL headers in vpndrvinst.c
The inclusion of the headers is probably a very old leftover, from when OpenSSL was not encapsulated into Mayaqua yet.

In fact, there was a "HAM_C" (defined in vpndrvinst.c) definition check in Mayaqua/Encrypt.h preventing the redefinition of OpenSSL types.
2020-07-27 20:59:40 +02:00
Davide Beatrici
2cdffffa54
Merge PR #1186: Azure Pipelines: switch from MSVC 2017 to 2019 2020-07-27 20:59:31 +02:00
Davide Beatrici
8e53b948c5 Azure Pipelines: switch from MSVC 2017 to 2019 2020-07-27 20:44:15 +02:00
Davide Beatrici
ff247687ed
Merge PR #1184: vpntest.c: add "setupapi" command to test SetupAPI (Windows only) 2020-07-27 08:36:51 +02:00
Daiyuu Nobori
588d7539f4 vpntest.c: add "setupapi" command to test SetupAPI (Windows only)
Co-authored-by: Davide Beatrici <git@davidebeatrici.dev>
2020-07-27 05:31:02 +02:00
Davide Beatrici
112b4c2c67
Merge PR #1182: CMake: specify "WIN32" for targets that have WinMain(), add manifest for all targets that have it in the MSBuild project 2020-07-25 23:26:53 +02:00
Davide Beatrici
28d4a113dc CMake: add manifest for all targets that have it in the MSBuild project 2020-07-25 23:13:45 +02:00
Davide Beatrici
3732447571 CMake: specify "WIN32" for targets that have WinMain()
When "VPN_EXE" is defined, Mayaqua.h defines WinMain(), which handles arguments in a special way.

This commit passes "WIN32" to add_executable(), so that WinMain() is used as entry point instead of main().

The use of main() instead of WinMain() was causing service mode not to work due to the "/service" argument being discarded.
2020-07-25 23:13:38 +02:00
Davide Beatrici
0133682eb3
Merge PR #1180: Azure Pipelines: add macOS build 2020-07-22 00:26:31 +02:00
Davide Beatrici
3747d2bf3f Azure Pipelines: add macOS build 2020-07-21 23:23:29 +02:00
Davide Beatrici
3c99f64621
Merge PR #1179: Azure Pipelines: add Windows 32 bit build, templatize Windows steps 2020-07-21 22:32:28 +02:00
Davide Beatrici
74a1e9bd1b Azure Pipelines: add Windows 32 bit build 2020-07-21 22:01:22 +02:00
Davide Beatrici
59be67df25 Azure Pipelines: templatize Windows steps 2020-07-21 22:01:19 +02:00
Davide Beatrici
5e0c036e39
Merge PR #1178: Azure Pipelines: use Ninja and designated build directory, naming improvement 2020-07-21 21:37:33 +02:00
Davide Beatrici
6801e4b384 Azure Pipelines: improve steps, use Ninja and designated build directory 2020-07-21 21:11:57 +02:00
Davide Beatrici
c948f65850 Azure Pipelines: remove submodules checkout step, it's in the pipeline 2020-07-21 02:46:37 +02:00
Davide Beatrici
a9b30b829f Azure Pipelines: improve job names
"Ubuntu 16.04" -> "Ubuntu (x86_64)"

"Visual Studio 2017" -> "Windows (x86_64)"
2020-07-21 02:46:28 +02:00
Davide Beatrici
d074899fd8
Merge PR #1176: CMake: don't hardcode build directories 2020-07-20 20:56:44 +02:00
Davide Beatrici
3c2f5a41ba Use "build" folder instead of "tmp" in CI scripts 2020-07-20 20:33:36 +02:00
Davide Beatrici
369a8850c4 CMake: don't hardcode build directories
Our CMake project used to forcefully create and use two different build directories: "build" and "tmp".

This commit changes the behavior so that only the build directory CMake is ran in is used.

The "configure" script now runs CMake in "build" by default, instead of "tmp".
2020-07-20 18:31:41 +02:00
Davide Beatrici
7b042e53d2
Merge PR #1175: Remove all references to strtok() and wcstok(), implement and use alternatives 2020-07-20 18:17:35 +02:00
Daiyuu Nobori
844dcdb0af Remove all references to strtok() and wcstok(), implement and use alternatives
strtok() and wcstok() are considered unsafe functions.

A segmentation fault caused by the use of strtok() was recently reported.

Co-authored-by: Takuho NAKANO <takotakot@users.noreply.github.com>
2020-07-20 17:57:58 +02:00
dnobori
144392c587 Add Tls_Disable1_3
Add Tls_Disable1_3 like Tls_Disable1_2 etc.
This change is part of v4.34-9744-beta e3370fb62c .
2020-07-19 12:25:47 +09:00
Davide Beatrici
3baf4674e7
Merge PR #1171: Cedar: handle SSTP through Proto, minor improvements 2020-07-17 02:43:02 +02:00
Davide Beatrici
869496be3e Cedar: handle SSTP through Proto 2020-07-17 02:00:30 +02:00
Davide Beatrici
d917b2ac73 Cedar/Proto.c: check whether IsPacketForMe() is available before calling it
The SSTP implementation doesn't provide packet identification, because it's not required: the protocol is identified by the HTTP header it sends to the server.
2020-07-17 01:59:41 +02:00
Davide Beatrici
96a2d5a124 src/Cedar: pass client hostname and cipher to Init() function in PROTO_IMPL
The SSTP implementation must be aware of the cipher in order to be able to report it to the server's internals (i.e. IPC).
2020-07-17 01:59:22 +02:00
Davide Beatrici
3090688506 Cedar/Proto.c: support secure sockets
This is required for SSTP, because the connection is established through TLS/SSL.
2020-07-12 03:16:02 +02:00
Davide Beatrici
19dbdf46be Cedar: move buffer limit handling from ProtoHandleConnection() to protocol implementation
This allows greater control, required by SSTP: the limit only applies to data packets.
2020-07-12 03:09:12 +02:00
Davide Beatrici
eb5150a002 Cedar: change ProtoHandleConnection() so that it supports direct protocol specification 2020-07-12 03:05:51 +02:00
Davide Beatrici
e0c6813d44
Merge PR #1170: Cedar: fix server crash in CleanupSession() 2020-07-11 00:59:55 +02:00
Davide Beatrici
6869955acc Cedar: fix server crash in CleanupSession()
"ClientOption", as the name implies, is only used in a client context.

The issue was introduced in 235bd07e67. Before that, an unrelated check prevented UnixVLanSetState() from being called in a server context.
2020-07-11 00:32:07 +02:00
Davide Beatrici
f84513c95b
Merge PR #1164: Cedar: fix ProtoSetUdpPorts() call in SiLoadServerCfg() 2020-07-03 17:03:10 +02:00
Davide Beatrici
45399d9797 Cedar: fix ProtoSetUdpPorts() call in SiLoadServerCfg()
I accidentally passed the wrong variable in 4514ba5e2f.
2020-07-03 01:31:19 +02:00
Ilya Shipitsin
b60844e276
Merge pull request #1161 from ronisaacson/master
Fix three issues when building RPM packages
2020-07-01 13:00:19 +05:00
Ron Isaacson
40ed982079 Fix systemd unit file generation 2020-06-30 01:22:37 -04:00
Ron Isaacson
eeaac4e78c When generating an RPM, attempt to exclude system directories 2020-06-29 23:11:05 -04:00
Ron Isaacson
6fe678fe84 Fix wrapper script generation 2020-06-29 23:04:35 -04:00
Ron Isaacson
853b4a57bc Remove unnecessary CMake options 2020-06-28 16:21:12 -04:00
Davide Beatrici
275e8a81ef
Merge PR #1157: Cedar: remove "NicDownOnDisconnect" option, force correct behavior 2020-06-28 14:45:13 +02:00
Davide Beatrici
235bd07e67 Cedar: remove "NicDownOnDisconnect" option
SoftEther VPN originally created the NIC in the UP state and never changed it, even when the the client was not connected.

The behavior was changed in 59e1483dbf, which also added the NicDownOnDisconnect option

The option was disabled by default for backwards compatibility with scripts that don't check whether the NIC is down, but it's not ideal.

This commit forces the correct behavior and removes the commands "TUNDownOnDisconnectEnable", "TUNDownOnDisconnectDisable" and "TUNDownOnDisconnectGet".
2020-06-27 22:47:04 +02:00
Ilya Shipitsin
47d08b055e
Merge pull request #1114 from takotakot/disable_sslv3
Disable SSLv3
2020-06-18 11:21:59 +05:00
Davide Beatrici
485a5922eb
Merge PR #1146: Cedar/Server.c: load UDP ports from configuration file and apply them 2020-06-10 10:00:10 +02:00
Davide Beatrici
4514ba5e2f Cedar/Server.c: load UDP ports from configuration file and apply them
Unfortunately I realized only now that I didn't add the code in c4ec63fe32.
2020-06-10 09:42:23 +02:00
Takuho NAKANO
5ebdb394fc Disable sslv3 2020-06-09 13:59:57 +09:00
Davide Beatrici
2fafd7c70e
Merge PR #1134: Fixed that NewDhcpOption can't handle DHCP options longer than 255 bytes 2020-05-22 05:39:54 +02:00
Tetsuo Sugiyama
d726719602
Fixed that NewDhcpOption did not handle DHCP options longer than 255 bytes correctly 2020-05-22 11:05:36 +09:00
Davide Beatrici
09be880263
Merge PR #1130: Revamp UDP ports setting 2020-05-20 22:47:53 +02:00
Davide Beatrici
f7f6eeec44 .ci/start-se-openvpn.sh: use new vpncmd command to set the UDP port 2020-05-20 20:18:51 +02:00
Davide Beatrici
c4838006b1 Cedar/SM.c: move UDP ports setting outside of the OpenVPN/SSTP dialog
This commit moves the UDP ports setting right below the TCP listeners and uses the new RPC methods to get and set them.
2020-05-20 20:18:51 +02:00
Davide Beatrici
c52e49de2d Cedar/SM: replace SmStrToPortList() with StrToPortList()
The function only called StrToPortList(), thus it can safely be replaced with the upstream function.
2020-05-20 20:18:51 +02:00
Davide Beatrici
9e6476c7b2 Cedar/Command: Implement PortsUDPGet and PortsUDPSet commands
PortsUDPSet: This command can be used to specify a single or multiple UDP ports the server should listen on. "0" can be specified to disable the UDP listener.
Administrator privileges are required to execute the command.

PortsUDPGet: This command can be used to retrieve the UDP ports the server is listening on.

The two commands replace the functionality that was previously provided by OpenVpnEnable and OpenVpnGet, respectively.
2020-05-20 20:17:53 +02:00
Davide Beatrici
37f28b4119 Cedar/Command: add "limit_range" parameter to StrToPortList()
Originally, StrToPortList() returned NULL when it encountered a number equal to 0 or higher than 65535.

This commit adds a new parameter to the function called "limit_range":

- When its value is true, the function retains the original behavior.
- When its value is false, the function doesn't check whether the number is in the network port number range (1-65535).

The change is required because the command to set the UDP ports will allow to remove all ports by specifying "0" as the port number.
2020-05-20 20:17:40 +02:00
Davide Beatrici
f1cb86d979 Cedar/Admin: implement new RPC methods to get/set the UDP ports 2020-05-20 20:17:34 +02:00
Davide Beatrici
c4ec63fe32 Rename "OpenVPN_UdpPortList" to "PortsUDP", store ports in a LIST
Now that Proto supports UDP, the server can handle multiple protocols on each UDP port.

The UDP ports are specified by the "OpenVPN_UdpPortList" configuration setting, because:

- OpenVPN is currently the only UDP protocol supported by SoftEther VPN to allow a custom port number.
- Before Proto was introduced, a unified interface for the protocols didn't exist; each protocol implementation had to create its own listener.

In preparation for the upcoming WireGuard implementation, this commit renames "OpenVPN_UdpPortList" to "PortsUDP", which should clarify that the setting is global.

The change is reflected in the code. Also, the ports are now stored in a LIST rather than a string. The conversion between string and LIST only happens when loading/saving the configuration.

The default UDP ports are now the same as the TCP ones (443, 992, 1194, 5555).
2020-05-20 03:16:19 +02:00
Ilya Shipitsin
60cc784aee
Merge pull request #1131 from Evengard/ppp-ipv6-fix
Fixes from review of PPP-IPv6 stack
2020-05-19 20:17:41 +05:00
Evengard
b77dd167ff Fixes from review of PPP-IPv6 stack 2020-05-19 17:25:04 +03:00
Ilya Shipitsin
1a8e1385cf
Merge pull request #1125 from Evengard/ppp-ipv6
IPv6 support for the PPP stack
2020-05-19 17:09:09 +05:00
Ilya Shipitsin
e3e35f5a4c
Merge pull request #1122 from benrubson/ban
Log client IP in failed accesses
2020-05-13 15:35:45 +05:00
Davide Beatrici
c15a4ba04f
Merge PR #1126: Cedar/Proto.c: fix wrong NULL check in ProtoHandleDatagrams(), found by Coverity 2020-05-12 23:50:30 +02:00
Ben RUBSON
5e1c728f92
Update strtable_tw.stb 2020-05-12 22:08:59 +02:00
Ben RUBSON
eb9d6e77a4
Update strtable_ru.stb 2020-05-12 22:08:42 +02:00
Ben RUBSON
6e707f7550
Update strtable_pt_br.stb 2020-05-12 22:08:23 +02:00
Ben RUBSON
71b814060d
Update strtable_ko.stb 2020-05-12 22:08:05 +02:00
Ben RUBSON
8e1a377b82
Update strtable_ja.stb 2020-05-12 22:07:35 +02:00
Ben RUBSON
adf0f18b7a
Update strtable_cn.stb 2020-05-12 22:07:09 +02:00
Davide Beatrici
20bbe325fe Cedar/Proto.c: fix wrong NULL check in ProtoHandleDatagrams(), found by Coverity
*** CID 358434: Null pointer dereferences (REVERSE_INULL)
 /src/Cedar/Proto.c: 451 in ProtoHandleDatagrams()
 445   void ProtoHandleDatagrams(UDPLISTENER *listener, LIST *datagrams)
 446   {
 447       UINT i;
 448       HASH_LIST *sessions;
 449       PROTO *proto = listener->Param;
 450
 >>>   CID 358434: Null pointer dereferences (REVERSE_INULL)
 >>>   Null-checking "listener" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
 451       if (proto == NULL || listener == NULL || datagrams == NULL)
 452       {
 453           return;
 454       }
 455
 456       sessions = proto->Sessions;
2020-05-12 21:26:42 +02:00
Davide Beatrici
1d5ded9388
Merge PR #1123: Increase Radius timeout 2020-05-12 19:47:15 +02:00
Evengard
cbbac659a3 Fixing VS2015 quirks 2020-05-12 18:51:55 +03:00
Evengard
2cfe031398 Fixing most errors, the link on Windows is working and is stable 2020-05-12 18:10:06 +03:00
Evengard
a2a6502ab9 Numerous fixes. First working version. 2020-05-12 18:05:19 +03:00
Evengard
f2fee4d32c Preliminary implementation of IPv6CP and IPv6 for PPP (untested) 2020-05-12 18:05:18 +03:00
Evengard
f627b64264 Auto formatting with AStyle 2020-05-12 17:59:25 +03:00
Evengard
1d6a4d3ec8 Preliminary IPC IPv6 implementation (untested) 2020-05-12 17:59:24 +03:00
Ben RUBSON
3b7dd25b65
Log client IP in failed accesses 2020-05-11 23:10:40 +02:00
Ben RUBSON
3f16a7e704
Log client IP in failed accesses
to be able to feed tools such as Fail2Ban
2020-05-11 23:09:26 +02:00
Ben RUBSON
4e583e43f1
Increase Radius timeout
to make it 2FA friendly
2020-05-11 23:06:01 +02:00
Davide Beatrici
8fdf7302a5
Merge PR #1120: Cedar: implement UDP system in Proto 2020-05-11 19:58:13 +02:00
Davide Beatrici
981b57ee28 Cedar/Server: set ports in Proto, remove OpenVPN UDP server leftovers
The setting's name is still "OpenVPN_UdpPortList".

We will change it as soon as there's another UDP protocol implemented in Proto.
2020-05-11 08:23:32 +02:00
Davide Beatrici
27f7d43ff7 Cedar/Proto_OpenVPN: remove UDP system, use the one provided by Proto
As a side effect, the DH parameter is now applied to the TCP server as well.

Previously, the default value was always used, ignoring the one from the configuration.
2020-05-11 08:23:29 +02:00
Davide Beatrici
a3aea00820 Cedar/Proto: implement UDP system
When a datagram is received, the matching session is looked up in a hash list; if it's not found, a new session is created.

This method allows to use a single UDP port for multiple protocols, as we do with TCP.

Also, each session has its own dedicated thread, used to process the received datagrams and generate the ones that are then sent through the UDP listener.

In addition to guaranteeing constant performance, separate threads also prevent a single one from blocking all sessions.
2020-05-11 08:22:44 +02:00
Davide Beatrici
0570f7d31c Mayaqua/Network: add StopUdpListener()
This allows to stop a UDP listener without deleting it.

It's especially useful when no datagrams should be received anymore, but there are other threads accessing the listener.
2020-05-11 07:50:55 +02:00
Davide Beatrici
667108319d Cedar: prepare Proto for UDP support
- An additional parameter is added to IsPacketForMe(), used to specify the protocol type (currently either TCP or UDP).
- SupportedModes() is dropped because it's now redundant.
- IsOk() and EstablishedSessions() are dropped because error checking should be handled by the implementation.
- ProtoImplDetect() now takes a buffer and its size rather than a SOCK, so that it can be used to detect UDP protocols.
- The OpenVPN toggle check is moved to ProtoImplDetect(), so that we don't have to duplicate it once UDP support is implemented.
2020-05-11 07:07:04 +02:00
Ilya Shipitsin
7e8b3c0b39
Merge pull request #1112 from Evengard/making-unique-clientid-dhcp
Make DHCP Client ID more unique
2020-05-05 16:00:23 +05:00
Evengard
34dfc14549 Fixing errors discovered with Coverity. 2020-05-04 16:07:21 +03:00
Evengard
1fe863e866 Generate DHCP Client ID based on MAC all the time 2020-05-04 15:40:44 +03:00
Ilya Shipitsin
b41c17f45a
Merge pull request #1109 from Evengard/ppp-eap-tls
Implementation of EAP-TLS for PPP
2020-05-04 17:13:15 +05:00
Evengard
ca1c6a5f3f Fixing a use of unitialized variable as per CPPCHECK 2020-05-03 14:22:18 +03:00
Evengard
8fb456f6a6 Fixing a memory leak in SslCertVerifyCallback because of a duplicated callback 2020-05-03 05:36:01 +03:00
Evengard
132926ee09 Fixing alignment of struct on GCC, changing the method to server one 2020-05-03 05:17:23 +03:00
Evengard
8a856e4672 Codestyle fixes 2020-05-02 21:08:19 +03:00
Davide Beatrici
e6803a1fab
Merge PR #1108: Cedar: various improvements to Proto 2020-05-02 19:52:31 +02:00
Evengard
9180e065a0 Some weirdness fixes 2020-05-02 20:29:31 +03:00
Evengard
39becfe4ab Some hacks to make Android VPN Client Pro working 2020-05-02 20:25:01 +03:00
Evengard
723f38e72f Fixing Linux... 2020-05-02 19:52:47 +03:00
Evengard
a2b7cb0148 Added possibility to load CA certificates from chain_certs folder to allow verifying the client certificates against it. 2020-05-02 19:52:46 +03:00
Evengard
24bd2b3198 Fixing up some errors 2020-05-02 19:52:46 +03:00
Evengard
9f2a5cecf3 Preliminary (untested) EAP-TLS implementation 2020-05-02 19:52:46 +03:00
Evengard
a65c436e8f Writing skeleton for EAP-TLS implementation 2020-05-02 19:52:45 +03:00
Evengard
aa0ec4343c Fixing errors as per static analysis 2020-05-02 19:52:45 +03:00
Evengard
1bdd9a92bc Adding timeout propagation from user policy in PPP sessions (including L2TP and SSTP). 2020-05-02 19:52:45 +03:00
Davide Beatrici
942051d3a8 Cedar: various improvements to Proto
The PROTO structure is now used to identify the system as a whole, rather than a single protocol. It's stored and initialized in Server.

ProtoCompare(), ProtoAdd() and ProtoDetected() are renamed to make the difference between PROTO and PROTO_IMPL more clear.

ProtoGet() and ProtoNum() are removed because the related list can now be accessed directly by Server.
2020-05-01 07:14:38 +02:00
Ilya Shipitsin
039cd8edf0
Merge pull request #1107 from chipitsine/master
5.01.9674 release
2020-04-30 13:26:45 +05:00
Ilya Shipitsin
e025762a52
Merge pull request #1106 from SoftEtherVPN/dependabot/npm_and_yarn/src/bin/hamcore/wwwroot/admin/default/jquery-3.5.0
Bump jquery from 3.4.1 to 3.5.0 in /src/bin/hamcore/wwwroot/admin/default
2020-04-30 12:42:35 +05:00
Ilya Shipitsin
a902d3eed9 5.01.9674 release 2020-04-30 12:02:05 +05:00
dependabot[bot]
44f731f781
Bump jquery in /src/bin/hamcore/wwwroot/admin/default
Bumps [jquery](https://github.com/jquery/jquery) from 3.4.1 to 3.5.0.
- [Release notes](https://github.com/jquery/jquery/releases)
- [Commits](https://github.com/jquery/jquery/compare/3.4.1...3.5.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-04-30 06:12:25 +00:00
Ilya Shipitsin
14e9c7299d
Merge pull request #1104 from Evengard/fixup-ppp-unices
Fixup ppp unices
2020-04-26 17:26:16 +05:00
Evengard
f20e99f8e4 Treating empty IPCP requests as IPCP requests with IP-Address option zeroed out 2020-04-25 20:59:08 +03:00
Evengard
b9109211d3 ACKing an empty LCP options list 2020-04-25 15:29:57 +03:00
Davide Beatrici
9073452b09
Merge PR #1092: src/Cedar/Proto_OpenVPN.c: push "block-outside-dns" to clients 2020-04-20 03:25:43 +02:00
Ilya Shipitsin
bf65ef290a
Merge pull request #1098 from chipitsine/master
5.01.9673 release
2020-04-18 11:30:53 +05:00
Ilya Shipitsin
70a7c4596d 5.01.9673 release 2020-04-18 00:47:47 +05:00
Davide Beatrici
16cdf62cc6
Merge PR #1093: Fix security issue: Fix the security of JSON-API 2020-04-05 20:49:11 +02:00
Daiyuu Nobori
033647c8ac Fix security issue: Fix the security of JSON-API. If the administrator password of the Virtual Hub is empty, JSON-API (which was added in 4.30 Build 9696 Beta) will not be able to access to the virtual hub with a empty password since this release. Because there are relatively many cases in which administrator password is empty for a virtual hub, being able to manage a virtual hub without a password using JSON-API was a security problem. In this release, this behavior has been changed so that JSON-API cannot be accessed in the Virtual Hub management mode until it is configured with non-empty password. 2020-04-06 00:44:14 +09:00
Davide Beatrici
b6ef9f88c9 src/Cedar/Proto_OpenVPN.c: push "block-outside-dns" to clients
From https://community.openvpn.net/openvpn/wiki/Openvpn23ManPage:

--block-outside-dns

Block DNS servers on other network adapters to prevent DNS leaks.
This option prevents any application from accessing TCP or UDP port 53 except one inside the tunnel.
It uses Windows Filtering Platform (WFP) and works on Windows Vista or later.
This option is considered unknown on non-Windows platforms and unsupported on Windows XP, resulting in fatal error.
You may want to use --setenv opt or --ignore-unknown-option (not suitable for Windows XP) to ignore said error.
Note that pushing unknown options from server does not trigger fatal errors.
2020-04-04 08:37:19 +02:00
Ilya Shipitsin
c6f186bd73
Merge pull request #1084 from ffontaine/master
Only enable getifaddrs support when available
2020-04-03 17:45:19 +05:00
Ilya Shipitsin
84bd9abb30
Merge pull request #1072 from Evengard/ppp-ipv6
Rewriting the PPP stack
2020-04-02 20:29:51 +05:00
Ilya Shipitsin
5db21a1dc1
Merge pull request #1086 from jubnzv/sa-fixes
Fix some issues found with Cppcheck static analysis
2020-03-27 14:45:43 +05:00
Georgy Komarov
4772a508dc
sam: fix using pointer to local variable that is out of scope 2020-03-27 07:28:43 +03:00
Georgy Komarov
1416a693e7
protocol: fix uninitialized variable
Value of server_cert is undefined if `b = PackGetBuf(p, "Cert");` was
failed.
2020-03-27 07:25:45 +03:00
Ilya Shipitsin
22272ec838
Merge pull request #1085 from paulmenzel/remove-trailing-spaces-from-comments
Remove trailing spaces from comments
2020-03-25 16:48:57 +05:00
Paul Menzel
be3e45a4bf hamcore: Remove trailing spaces from comments 2020-03-25 12:23:55 +01:00
Fabrice Fontaine
dcecd4c0d5 Only enable getifaddrs support when available
On uClibc, the ifaddrs.h support is optional. While the default
Buildroot uClibc configuration has it enabled, some external
toolchains may not. Therefore this patch detects that and adjusts
softether usage of ifaddrs accordingly.

Based on an initial patch from Bernd Kuhls.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[Retrieved from:
https://git.buildroot.net/buildroot/tree/package/softether/0009-uclibc-ai-addrconfig.patch]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2020-03-21 17:57:37 +01:00
Ilya Shipitsin
60c1e2027d
Merge pull request #1082 from metalefty/freebsd-ci
FreeBSD CI: quit freebsd-11-3-snap
2020-03-20 19:35:58 +05:00
Koichiro IWAO
6399b0f852 FreeBSD CI: quit freebsd-11-3-snap
testing on a single FreeBSD version is enough.  `-snap` images are
unstable to perform CI test.
2020-03-20 23:11:47 +09:00
Ilya Shipitsin
3b00d4c56b
Merge pull request #1081 from metalefty/describe_cmake_flags
Describe CMake options added by myself
2020-03-20 18:43:16 +05:00
Koichiro IWAO
5dde23cb55
add myself to AUTHORS 2020-03-20 21:44:09 +09:00
Koichiro IWAO
e6b8e6eee3
replace SoftEther project related http links with https
Outside links such as http://www.openssl.org and http links appear in
source code are untouched.
2020-03-20 21:27:51 +09:00
Koichiro IWAO
78b0684dd4
Document additional CMake options
Some CMake options are added by myself (#1047 #1079). So I should
describe in document.
2020-03-20 21:24:51 +09:00
Koichiro IWAO
a6652fead2
configure: respect environment CMAKE_FLAGS 2020-03-20 20:59:29 +09:00
Koichiro IWAO
c222ef525b
Update build requirements on Unix 2020-03-18 18:28:33 +09:00
Ilya Shipitsin
c3d56c2201
Merge pull request #1079 from metalefty/skip_cpu_features
allow to SKIP_CPU_FEATURES explicitly, not only autodetect
2020-03-18 11:59:02 +05:00
Ilya Shipitsin
7e5decb72a
Merge pull request #1078 from SoftEtherVPN/dependabot/npm_and_yarn/src/bin/hamcore/wwwroot/admin/default/acorn-6.4.1
Bump acorn from 6.1.1 to 6.4.1 in /src/bin/hamcore/wwwroot/admin/default
2020-03-18 11:58:37 +05:00
Koichiro IWAO
1e601ebf65
FreeBSD CI: quit CI test with "openssl111"
It is scheduled to be removed on or after 2020-03-31. "openssl" is now
updated to 1.1.1 and it alternates "openssl111" now.
2020-03-16 19:08:34 +09:00
Koichiro IWAO
f34d3c80b1
allow to SKIP_CPU_FEATURES explicitly, not only autodetect
Formerly, SKIP_CPU_FEATURES is automatically detected by system
processor. However, "^(armv7l|aarch64|s390x)$" does not cover all
processors that cpu_features should be skipped.

"armv6", "armv7", "mips", "mips64" on FreeBSD are examples [1]
that cpu_features is not correctly skipped.

This change intends to build SoftEther without any modifications on
CMakeLists.txt on such processors.

    cmake . -DSKIP_CPU_FEATURES=1

[1] https://www.freebsd.org/platforms/
2020-03-16 18:50:55 +09:00
dependabot[bot]
c635cdd614
Bump acorn from 6.1.1 to 6.4.1 in /src/bin/hamcore/wwwroot/admin/default
Bumps [acorn](https://github.com/acornjs/acorn) from 6.1.1 to 6.4.1.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/6.1.1...6.4.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-03-15 22:06:23 +00:00
Evengard
fa9e9d15a5 Removing unrelated changes as per review 2020-02-06 10:52:34 +03:00
Evengard
60e85afd1f
Apply reviewed code style
Co-Authored-By: Davide Beatrici <davidebeatrici@gmail.com>
2020-02-06 10:49:09 +03:00
Evengard
a6970e3e61 Merge branch 'master' into ppp-ipv6 2020-02-05 00:23:03 +03:00
Ilya Shipitsin
eeec9a82f6
Merge pull request #1062 from dnobori/200101_impr_url_log_spacing
Merge pull request #1062: Improvement: Add a space character between URL and other tokens in the packet log format.
2020-01-01 17:53:27 +05:00
Ilya Shipitsin
1a5a11d146
Merge pull request #1063 from dnobori/200101_fix_securenat_ecn
Merge pull request #1063: Bugfix: Fix the SecureNAT connection problem with ignoring TCP ECN bit enabled packets
2020-01-01 16:40:47 +05:00
Daiyuu Nobori
a49219db83 Merge branch 'master' of github.com:SoftEtherVPN/SoftEtherVPN into 200101_fix_securenat_ecn 2020-01-01 19:59:42 +09:00
Daiyuu Nobori
a4f87565ae Bugfix: Fix the SecureNAT connection problem with ignoring TCP ECN bit enabled packets 2020-01-01 17:51:38 +09:00
Ilya Shipitsin
9487bc8d47
Merge pull request #1060 from dnobori/200101_fix_imperfect_lock
Merge pull request #1060: src/Cedar/Hub.c: fix possible crash because of imperfect Virtual Hub FDB lock
2020-01-01 12:33:15 +05:00
Daiyuu Nobori
70564a8f52 Bugfix: Imperfect Virtual Hub FDB lock may cause process crush. 2020-01-01 15:52:47 +09:00
Ilya Shipitsin
bd558e8f0a
Merge pull request #1061 from dnobori/200101_fix_openvpn_cert_auth_crush
Merge pull request #1061: src/Cedar/IPC.c: fix possible crash when using certificate authentication with OpenVPN
2020-01-01 11:33:23 +05:00
Daiyuu Nobori
17e7d65839 Improvement: Add a space character between URL and other tokens in the packet log format. 2020-01-01 11:00:51 +09:00
Daiyuu Nobori
e5d691977d Bugfix: OpenVPN Certificate Authentication may cause process crush. 2020-01-01 10:59:24 +09:00
Daiyuu Nobori
f083c59905 Bugfix: Imperfect Virtual Hub FDB lock may cause process crush. 2020-01-01 10:57:51 +09:00
Ilya Shipitsin
41e023b369
Merge pull request #1058 from metalefty/readme-freebsd
Merge pull request #1058: README: add installation for FreeBD etc
2019-12-28 20:10:07 +05:00
Ilya Shipitsin
a53be84e3a
Merge pull request #1057 from chipitsine/master
Merge pull request #1057: pt-br translation
2019-12-28 19:45:36 +05:00
Koichiro IWAO
4fddb7681e
README: switch softether links to https [skip ci] 2019-12-28 23:14:46 +09:00
Koichiro IWAO
76c9678015
README: add installation for FreeBSD [skip ci] 2019-12-28 23:14:46 +09:00
FelipeL
6d3fef8da6 pt-br translation 2019-12-28 15:43:06 +05:00
Ilya Shipitsin
92c544cc1f
Merge pull request #1054 from metalefty/freebsd-ci
Merge pull request #1054: Further FreeBSD CI refinements
2019-12-24 11:49:13 +05:00
Koichiro IWAO
6b6c0ae636
FreeBSD CI: freebsd_instance cannot be omitted
also fix image_family name.
2019-12-24 14:57:33 +09:00
Koichiro IWAO
543a26c6a6
FreeBSD CI: simplify image specification
and use `pkg install -y` instead of ASSUE_ALWAYS_YES=TRUE.
2019-12-24 14:55:02 +09:00
Koichiro IWAO
d836904321
FreeBSD CI: also test with base OpenSSL 2019-12-24 14:55:01 +09:00
Koichiro IWAO
9556f09166
FreeBSD CI: use matrix to perform test
on multiple FreeBSD version and with multiple SSL libraries.
2019-12-24 14:54:59 +09:00
Ilya Shipitsin
0d79b3c3b5
Merge pull request #1049 from metalefty/freebsd-ci
Merge pull request #1049: Refine FreeBSD CI
2019-12-05 22:45:12 -08:00
Koichiro IWAO
1c07ddcb8d FreeBSD CI: perform memory leak test as well as Linux/Windows
and also move `vpncmd /tools /cmd:check` under .ci directory.
2019-12-06 15:28:38 +09:00
Koichiro IWAO
c38b0b0398 FreeBSD CI: also perform test on 11.3-STABLE
The official guide [1] says 11.3-RELEASE doesn't boot properly so
using 11.3-STABLE instead.

[1] https://cirrus-ci.org/guide/FreeBSD/
2019-12-06 13:20:16 +09:00
Koichiro IWAO
e4aff409f8 FreeBSD CI: switch to the latest 12.1-RELEASE 2019-12-06 13:20:16 +09:00
Koichiro IWAO
80ba3345d1 FreeBSD CI: perform self-check command after build 2019-12-06 13:20:16 +09:00
Koichiro IWAO
d1471048d9 FreeBSD CI: sysctl -n hw.ncpu is enough to get number of cpus
nproc can be installed as gncpu as a part of sysutils/coreutils but not
necessary for this case.
2019-12-06 13:20:16 +09:00
Koichiro IWAO
614f4db8a6 FreeBSD CI: GNU make is not necessary
test if build passes with BSD make
2019-12-06 13:20:16 +09:00
Ilya Shipitsin
a455dc7f0e
Merge pull request #1047 from metalefty/log-db-pid-dir
Merge pull request #1047: Make config(db), log, pid directory customizable
2019-12-04 08:18:11 -08:00
Koichiro IWAO
c8479e3011
CMake: make db, log, pid directory customizable 2019-12-04 23:59:18 +09:00
Koichiro IWAO
b1aae5080d
put chain_certs in dbdir 2019-12-04 23:59:13 +09:00
Koichiro IWAO
a69c4980d5
log eraser, log enumerator should refer logdir 2019-12-04 23:59:11 +09:00
Koichiro IWAO
c64674479d
separte log directory and database(config) directory
@ was an alias for exedir. To separate log directory and
database(config) directory, @ is now an alias for logdir and $ is an
alias for dbdir.
2019-12-04 23:59:09 +09:00
Koichiro IWAO
01abdedc45
put PID files under PidDir 2019-12-04 23:59:07 +09:00
Koichiro IWAO
18c9b74ff0
implement Get{Db,Log,Pid}{,W} function
DbDir  : directory to store files such as vpn_server.config and backups etc
LogDir : directory to write logs (sub directories is created in this dir)
PidDir : directory to put PID files such as .ctl-* .pid-* .VPN-*
2019-12-04 23:59:01 +09:00
Ilya Shipitsin
3a309c9f6e
Merge pull request #1041 from chipitsine/master
Merge PR #1041: 5.01.9672 release
2019-11-24 17:12:05 +01:00
Ilya Shipitsin
3b6c4d02ac 5.01.9672 release 2019-11-24 20:47:23 +05:00
Davide Beatrici
876ca4ef3e
Merge PR #1039: Port latest improvements from stable repository 2019-11-23 06:41:57 +01:00
dnobori
1d2a58b172 Cedar: handle UDP acceleration and R-UDP versions 2019-11-23 04:38:27 +01:00
Davide Beatrici
6b08a451da Mayaqua: implement R-UDP version 2, powered by ChaCha20-Poly1305 2019-11-23 04:38:20 +01:00
Davide Beatrici
2ea5c2a7b0 Cedar: implement UDP acceleration version 2, powered by ChaCha20-Poly1305 2019-11-23 04:23:56 +01:00
dnobori
82a81a3ce6 Cedar: serve new web management interface 2019-11-23 04:23:56 +01:00
dnobori
9aaa9a7f15 Cedar: implement detailed protocol info 2019-11-23 04:23:56 +01:00
dnobori
ab57ef3f54 Mayaqua: add Windows Server 2019 to the supported operating systems list 2019-11-23 04:23:56 +01:00
dnobori
76ae935172 Cedar: various fixes 2019-11-23 04:23:51 +01:00
Davide Beatrici
a676a0a6fd
Merge PR #1035: Cedar: add "DisableIPsecAggressiveMode" option 2019-11-18 07:31:27 +01:00
Daiyuu Nobori
76c330e74b Cedar: add "DisableIPsecAggressiveMode" option
Setting it to "true" mitigates CVE-2002-1623.
2019-11-18 06:16:49 +01:00
Davide Beatrici
4acd7ab98e
Merge PR #1022: Move generic proxy stuff from Cedar to Mayaqua 2019-11-01 09:35:18 +01:00
Davide Beatrici
7829fe2c59
Merge PR #1024: Make install dir for unit files configurable 2019-10-31 09:37:15 +01:00
Donald Buczek
12cbf34302 Make install dir for unit files configurable
Currently the systemd service unit files are installed
into /lib/systemd/system if that directory exists. This
might not be optimal for every user, e.g. when the build
system is not the target system or when building as an
unprivileged user using CMAKE_INSTALL_PREFIX.

Make this configurable by adding a cached cmake variable
CMAKE_INSTALL_SYSTEMD_UNITDIR. Usage:

- install unit files into /lib/systemd/system if it exists (old
behavior)

    cmake

- don't install unit files

   cmake -D CMAKE_INSTALL_SYSTEMD_UNITDIR=

- install into absolute path

   cmake -D CMAKE_INSTALL_SYSTEMD_UNITDIR=/path

- install into path relative to ${CMAKE_INSTALL_PREFIX}

   cmake -D CMAKE_INSTALL_SYSTEMD_UNITDIR=path
2019-10-30 11:33:08 +01:00
Davide Beatrici
63caa4b07f Protocol.c: adapt ClientConnectGetSocket() for new proxy functions
The function has been greatly improved, here are some of the changes:

- The required SESSION (c->Session) parameter is checked correctly: the function returns immediately in case it's NULL. Previously, the function didn't return in case the parameter was NULL; multiple checks were in place, but not in all instances where the parameter was dereferenced.
- The resolved IP address is cached with all proxy types.
- The "RestoreServerNameAndPort" variable is documented.
- The Debug() messages have been improved.
2019-10-30 01:39:11 +01:00
Davide Beatrici
3c21d982fc Wpc.c: adapt WpcSockConnectEx() for new proxy functions 2019-10-30 01:39:11 +01:00
Davide Beatrici
59dc26aa21 Protocol: add ProxyCodeToCedar()
This new function translates a proxy error code to a Cedar error code.
2019-10-30 01:39:11 +01:00
Davide Beatrici
b8f58a2f94 Move generic proxy stuff from Cedar to Mayaqua
This commit moves the generic (not related to our protocol) proxy stuff from Cedar to Mayaqua, in dedicated files.

The functions are refactored so that they all have the same arguments and follow the same logic.

Dedicated error codes are added, in order to indicate clearly why the function(s) failed.
2019-10-30 01:39:04 +01:00
Davide Beatrici
1e835e7ec2
Merge PR #1020: Proto_OpenVPN.c: improve OvsProcessData(), fix out-of-bounds access found by Coverity 2019-10-27 09:37:11 +01:00
Davide Beatrici
5d73cd878f Proto_OpenVPN.c: improve OvsProcessData(), fix out-of-bounds access found by Coverity
Coverity Scan detected an out-of-bounds access issue: OvsProcessData() checked whether the payload size was bigger than the size of the buffer, instead of checking whether the entire packet size (payload size + 2 bytes) was, resulting in an out-of-bounds access in case the payload size is bigger than 1998.

This commit also improves the variable names, the comments and adds two Debug() lines.
2019-10-27 09:01:56 +01:00
Davide Beatrici
7349c4b16a
Merge PR #1018: Proto_OpenVPN.c: fix segmentation fault in OvsProceccRecvPacket() 2019-10-26 00:53:27 +02:00
Davide Beatrici
16bde47763 Proto_OpenVPN.c: fix segmentation fault in OvsProceccRecvPacket()
OvsDecrypt() returns 0 when it fails, resulting in "size" rolling over with an end result of 4294967292.

This commit fixes the issue by checking whether "size" is greater than sizeof(UINT) before performing the subtraction.
2019-10-26 00:36:07 +02:00
Davide Beatrici
79a60bc5f0
Merge PR #1014: Addressing the OpenVPN UDP reflection amplification attack 2019-10-22 09:42:08 +02:00
Daiyuu Nobori
4d42f450b2 Addressing the UDP reflection amplification attack: https://github.com/SoftEtherVPN/SoftEtherVPN/issues/1001 2019-10-22 11:14:05 +09:00
Davide Beatrici
46d8da6744
Merge PR #1012: Mayaqua.h: include <stdarg.h> for "va_list" on Illumos 2019-10-21 22:08:09 +02:00
Davide Beatrici
51330fdb43 Mayaqua.h: include <stdarg.h> for "va_list" on Illumos 2019-10-21 21:44:38 +02:00
Davide Beatrici
5b15b12ea9
Merge PR #1011: Protocol.c: fix bug in ClientConnectGetSocket() causing custom HTTP header not to work 2019-10-21 21:38:34 +02:00
Davide Beatrici
12cc242529 Protocol.c: fix bug in ClientConnectGetSocket() causing custom HTTP header not to work
The bug was caused by a typo in the StrCpy() call: the source buffer was the same as the destination one, meaning that the function didn't do anything.
2019-10-21 20:26:56 +02:00
Davide Beatrici
4afdad09a1
Merge PR #1009: Move HTTP related functions to dedicated file(s) in Mayaqua 2019-10-20 13:28:53 +02:00
Davide Beatrici
2f90e9ecb8 Mayaqua: move HTTP functions from "Network" to "HTTP" 2019-10-20 04:15:12 +02:00
Davide Beatrici
c3d6ffc533 Move GetMimeTypeFromFileName() and related structure to Mayaqua
The structure (containing all mimetypes) occupies almost 700 lines, which are a lot.

This is just the beginning of the refactor plan.
2019-10-20 04:15:12 +02:00
Davide Beatrici
04ecbf843a Mayaqua.h: include <stdio.h> for "FILE" 2019-10-20 04:15:12 +02:00
Davide Beatrici
6b41b19327 Mayaqua.h: include <stddef.h>, for "wchar_t" 2019-10-20 04:15:12 +02:00
Davide Beatrici
93dcd25d63
Merge PR #1010: Bump mixin-deep from 1.3.1 to 1.3.2 in /src/bin/hamcore/wwwroot/admin/default 2019-10-20 01:06:55 +02:00
dependabot[bot]
5fed2b8903
Bump mixin-deep in /src/bin/hamcore/wwwroot/admin/default
Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/jonschlinkert/mixin-deep/releases)
- [Commits](https://github.com/jonschlinkert/mixin-deep/compare/1.3.1...1.3.2)

Signed-off-by: dependabot[bot] <support@github.com>
2019-10-19 22:39:12 +00:00
Davide Beatrici
2aeec323f9
Merge PR #1008: Adding RADIUS and L3 MAC address fixing function, with small bug-fixes 2019-10-19 19:37:21 +02:00
Ilya Shipitsin
762c399c42
Merge pull request #1007 from dnobori/191019_win32openssl1.1.1d
Merge pull request #1007: Updating built-in Win32 libraries
2019-10-19 14:16:09 +05:00
Daiyuu Nobori
f0357d4000 - Fixed the problem occurs when RPC messages between Cluster Members exceed 64Kbytes.
- Fixed the RADIUS PEAP client to use the standard TLS versioning.
- Implementation of a function to fix the MAC address of L3 VPN protocol by entering e.g. "MAC: 112233445566" in the "Notes" field of the user information.
- Implementation of a function to fix the virtual MAC address to be assigned to the L3 VPN client as a string attribute from RADIUS server when authentication.
2019-10-19 17:34:12 +09:00
Daiyuu Nobori
7413fec646 Updating built-in Win32 libraries
- OpenSSL 1.1.1 -> 1.1.1d
- zlib 1.2.3 -> 1.2.11
2019-10-19 16:59:13 +09:00
Ilya Shipitsin
e944e6a848
Merge pull request #937 from chipitsine/cap_syslog
Merge PR #937: systemd: replace deprecated CAP_SYS_ADMIN with CAP_SYSLOG
2019-10-12 11:24:07 +05:00
Davide Beatrici
c8a0a5648b
Merge PR #970: Fix buffer overflow during NETBIOS name resolution 2019-09-30 06:59:04 +02:00
Ilya Shipitsin
e03db7ee60
Merge pull request #966 from Flucons/patch-1
Merge pull request #966: Create strtable_pt_br.stb
2019-09-21 17:33:12 +00:00
Ilya Shipitsin
93183f7b3f
Merge pull request #967 from Flucons/patch-2
Merge pull request #967 : Update SEVPN.sln
2019-09-21 17:32:03 +00:00
Ilya Shipitsin
1e9092ee94
Merge pull request #977 from Hiiragi-Yuriko/patch-1
Merge pull request #977: Update strtable_cn.stb
2019-09-17 10:36:42 +00:00
柊 ゆり子
50960dbe16
Update strtable_cn.stb
Improve some translation.
2019-09-17 17:51:03 +08:00
Ilya Shipitsin
ea37c85391
Merge pull request #973 from metalefty/hardcoded-log-path
Merge PR #973: Avoid using hardcoded paths in log file enumeration
2019-09-13 10:49:27 +00:00
Koichiro IWAO
21e3ce104b Avoid using hardcoded paths in log file enumeration
Hardcoded paths are used in log file enumeration such as LogFileList
command or GenerateEraseFileList function to delete old log files when
disk free space is lacking.

Fixes: SoftEtherVPN/SoftEtherVPN#972
2019-09-13 10:38:09 +09:00
stffabi
850a5faa0d Fix buffer overflow during NETBIOS name resolution
If SecureNAT is enabled and the hostname of the server
is longer than 16characters, every NETBIOS name resolution
query triggers the buffer overflow. If the server was built
with stack protection, the process will be killed.
2019-09-04 14:32:19 +02:00
Davide Beatrici
9e46402e6b
Merge PR #960: ci: display error if vpntest failed 2019-08-29 09:05:47 +02:00
FelipeL
1144d6c430
Update SEVPN.sln
Add pt-br
2019-08-15 13:03:14 -03:00
FelipeL
926b99047a
Create strtable_pt_br.stb
Start pt-br translation
2019-08-15 00:46:58 -03:00
Ilya Shipitsin
2fa28480f9 ci: display error if vpntest failed 2019-08-04 14:42:52 +05:00
Davide Beatrici
d10f83417f
Merge PR #962: Fix several compile warnings on MS VC++ 2008. 2019-08-04 04:03:14 +02:00
Davide Beatrici
82b84a9436
Merge PR #961: Enable crash minidump for Win32 vpntest 2019-08-04 03:51:00 +02:00
Daiyuu Nobori
bf4667cfce Fix several compile warnings on MS VC++ 2008. 2019-08-04 10:35:16 +09:00
Daiyuu Nobori
c6068d23c7 Enables crash minidump for Win32 vpntest. Minidump files will be saved to the 'C:\Users\<username>\AppData\Local\Temp\vpn_debug' (for normal user) or 'src\bin\vpn_debug\' (for administrator user). 2019-08-04 10:26:41 +09:00
Davide Beatrici
7dff0dce17
Merge PR #957: Add interface for easy protocol implementation 2019-07-29 03:33:48 +02:00
Davide Beatrici
9f19efb7af OpenVPN: use new protocol interface 2019-07-26 08:37:00 +02:00
Davide Beatrici
7d58e6bf60 Add interface for easy protocol implementation
This commit adds a protocol interface to the server, its purpose is to manage TCP connections and the various third-party protocols.

More specifically, ProtoHandleConnection() takes care of exchanging the packets between the local and remote endpoint; the protocol implementation only has to parse them and act accordingly.

The interface knows which protocol is the connection for by calling IsPacketForMe(), a function implemented for each protocol.
2019-07-26 08:36:54 +02:00
Ilya Shipitsin
3f9b610c80
Merge pull request #953 from neheb/op
Merge PR #953: Deprecated OpenSSL API fixes.
2019-07-23 00:05:38 +05:00
Ilya Shipitsin
ad33008a29
add "no-deprecated" to openssl builds "no-deprecated" is widely used in openwrt devices 2019-07-22 11:35:20 -07:00
Rosen Penev
d57fc3524c
Fix LibreSSL support
My previous patch used a wrong if directive, which disabled removed
(de)initialization and threading for LibreSSL. This most likely causes
issues at runtime.
2019-07-22 11:35:19 -07:00
Rosen Penev
a9f707c813
Switch to OpenSSL THREADID API
The old threading API was deprecated in OpenSSL 1.0.
2019-07-22 11:28:12 -07:00
Davide Beatrici
24f426162c
Merge PR #947: travis-ci: add sonar-scan, update openssl, libressl 2019-07-17 09:37:09 +02:00
Ilya Shipitsin
06fc93e08e travis-ci: update openssl, libressl 2019-07-17 12:05:51 +05:00
Ilya Shipitsin
e10983ec6f enable sonar-scan in travis-ci builds 2019-07-17 11:58:30 +05:00
Davide Beatrici
9b20444bb2
Merge PR #945: Virtual: fix race condition in DHCP server which resulted in multiple clients receiving the same IP 2019-07-15 09:23:09 +02:00
Davide Beatrici
d6cf1b85a9 Virtual: fix race condition in DHCP server which resulted in multiple clients receiving the same IP
A race condition in the DHCP server caused it to offer the same IP address to multiple clients when they connected at the same time, because an offered IP address was considered free until the final step (DHCP_ACK).

This commit introduces a list to keep track of the pending leases created during DHCP_OFFER, so that an IP address is guaranteed to be offered to a single client.
2019-07-13 23:29:16 +02:00
Davide Beatrici
831c907512
Merge PR #943: Mayaqua: Fix compilation without deprecated OpenSSL APIs 2019-07-11 22:03:23 +02:00
Rosen Penev
1bd39485cf
Mayaqua: Fix compilation without deprecated OpenSSL APIs
Initialization and deinitialization are deprecated.

Missing headers were added.

Explicit threading is also deprecated.
2019-07-11 12:42:26 -07:00
Davide Beatrici
fb5083be29
Merge PR #941: Mayaqua: Replace GNU specific sys/poll.h header with POSIX poll.h 2019-07-11 02:27:02 +02:00
Rosen Penev
a4ed656001
Mayaqua: Replace GNU specific sys/poll.h header with POSIX poll.h
Fixes warning from the musl libc:

warning redirecting incorrect #include <sys/poll.h> to <poll.h>
2019-07-10 17:01:01 -07:00
Davide Beatrici
dcc99fdbb2
Merge PR #940: release 5.01.9671 2019-07-10 19:49:13 +02:00
Ilya Shipitsin
13dbf83e95 release 5.01.9671 2019-07-10 12:45:14 +05:00
Ilya Shipitsin
5c77eddaf9
Merge pull request #935 from chipitsine/master
Merge pull request #935: Change release packaging, fixes #846
2019-07-10 11:03:48 +05:00
Daiyuu Nobori
0d69030d77
Merge pull request #939 from dnobori/190710_fix_typo
Fixing the typo "descrption" of the JSON-RPC document. Thanks to http…
2019-07-10 14:52:44 +09:00
Daiyuu Nobori
a9f31d7df9 Fixing the typo "descrption" of the JSON-RPC document. Thanks to https://github.com/SoftEtherVPN/SoftEtherVPN/issues/938 2019-07-10 14:37:30 +09:00
Ilya Shipitsin
c6117d4f8e systemd: replace deprecated CAP_SYS_ADMIN with CAP_SYSLOG 2019-07-08 21:05:35 +05:00
Ilya Shipitsin
c2ad67a907 Change release packaging
Fixes: #846
2019-07-08 12:09:58 +05:00
Ilya Shipitsin
2291bf5bf9 gitlab-ci: build illumos only when runner attached 2019-07-06 15:56:51 +05:00
Davide Beatrici
50e39826e4
Merge PR #934: src/Cedar/Admin.c: remove redundant check 2019-07-06 07:59:03 +02:00
Ilya Shipitsin
47ad2328c0 src/Cedar/Admin.c: remove redundant check
found by Coverity

*** CID 341551:  Incorrect expression  (NO_EFFECT)
/src/Cedar/Admin.c: 414 in AdminWebHandleFileRequest()
408     // Handle the file request
409     bool AdminWebHandleFileRequest(ADMIN *a, CONNECTION *c, SOCK *s, HTTP_HEADER *h, char *url_src, char *query_string, char *virtual_root_dir, char *physical_root_dir)
410     {
411             bool ret = false;
412             char url[MAX_PATH];
413             UINT i, len;
>>>     CID 341551:  Incorrect expression  (NO_EFFECT)
>>>     Comparing an array to null is not useful: "url == NULL", since the test will always evaluate as true.
414             if (a == NULL || c == NULL || s == NULL || h == NULL || url == NULL || query_string == NULL ||
415                     virtual_root_dir == NULL || physical_root_dir == NULL)
416             {
417                     return false;
418             }
419
2019-07-06 10:22:44 +05:00
Ilya Shipitsin
17a04b4387
Merge pull request #933 from chipitsine/funding
Merge pull request #933: add FUNDING.yml
2019-07-01 22:14:58 +03:00
Ilya Shipitsin
e1e29a9283 add FUNDING.yml 2019-07-01 23:25:52 +05:00
Daiyuu Nobori
2592525b64
Merge pull request #931 from dnobori/190630_update_see_ndis5_driver
Update the driver binary for https://github.com/SoftEtherVPN/SoftEtherVPN/pull/929
2019-06-30 02:24:32 +09:00
Daiyuu Nobori
896ac8e285
Merge pull request #930 from dnobori/190630_kb3033929_message
Add the warning message if KB3033929 is not installed in Windows 7 / Server 2008 R2.
2019-06-30 02:24:24 +09:00
Daiyuu Nobori
6e78068a65 Update the driver binary for https://github.com/SoftEtherVPN/SoftEtherVPN/pull/929 2019-06-30 01:22:04 +09:00
Daiyuu Nobori
9c227f3480 Add the warning message if KB3033929 is not installed in Windows 7 / Server 2008 R2. 2019-06-30 01:20:52 +09:00
Daiyuu Nobori
9c6c88a1a8
Merge pull request #927 from dnobori/190629_fix_url
Fix incorrect URLs in text files
2019-06-30 01:17:38 +09:00
Davide Beatrici
919f6c825f
Merge PR #929: Added ProbeForWrite() buffer writable check routine for Irp->UserBuffer in the NDIX 5.x See driver. 2019-06-29 17:02:57 +02:00
Davide Beatrici
9fbfa61b34
Merge PR #928: OpenVPN X.509 certificate authentication will be used only when no username / password is specified 2019-06-29 16:42:06 +02:00
Daiyuu Nobori
7ef7c36c83 OpenVPN X.509 certificate authentication will be used only when no username / password is specified 2019-06-29 21:30:58 +09:00
Daiyuu Nobori
9cba49b89a Fix incorrect URLs in text files 2019-06-29 21:16:27 +09:00
Ilya Shipitsin
2da6e4c491
Merge pull request #916 from dnobori/190528_jsonrpc_api
Merge pull request #916: Adding VPN Server Embedded HTML5-based Modern Admin Console, JSON-RPC API Suite and JSON-RPC Library for C#, JavaScript, TypeScript
2019-06-16 11:13:59 +05:00
Daiyuu Nobori
afc6a706e5 Adding wwwroot/admin/README.md 2019-05-29 20:17:43 +09:00
Daiyuu Nobori
b1d2dd8d87 Updating README 2019-05-29 19:37:29 +09:00
Daiyuu Nobori
39b80e04c5 Add initial wwwroot/admin/default/ HTML5 admin pages 2019-05-29 19:17:50 +09:00
Daiyuu Nobori
529d8f593c Update developer tools for JSON-RPC 2019-05-29 18:23:33 +09:00
Daiyuu Nobori
458906b151 Added JSON-RPC error message 2019-05-28 22:48:26 +09:00
Daiyuu Nobori
98b08c2ad1 Implementation of the JSON-RPC API and the Web Admin interface. (dnobori's internal note: 7579 - 7682) 2019-05-28 12:51:51 +09:00
Daiyuu Nobori
03841e4181 Initial vpnserver-jsonrpc-clients 2019-05-28 11:48:16 +09:00
Daiyuu Nobori
d63f637253 JSON-RPC CodeGen Developer Tool 2019-05-28 11:42:12 +09:00
Daiyuu Nobori
18cfe18950 Added ProbeForWrite() buffer writable check routine for Irp->UserBuffer in the See driver. The See driver is a legacy driver for packet capturing with NDIS 5.x (Windows 2000 or XP). It is based on the source code of WinPcap. 2019-05-28 10:36:31 +09:00
Ilya Shipitsin
a3c29fbca6
Merge pull request #911 from hww3/hww3/illumos-ci
Merge PR #911: illumos: remove stage and document the runner's maintainer
2019-05-10 18:09:53 +00:00
William Welliver
b078e1a849 illumos: remove stage and document the runner's maintainer 2019-05-10 08:54:16 -04:00
Ilya Shipitsin
2584adfd87
Merge pull request #905 from chipitsine/master
Merge PR #905: travis-ci: update dotnet sdk version
2019-05-03 20:48:23 +00:00
Ilya Shipitsin
b0f6ac1248
Merge branch 'master' into master 2019-05-03 18:15:45 +00:00
Ilya Shipitsin
4e9c3358d1
Merge pull request #906 from hww3/hww3/illumos-ci
Merge PR #906: Add basic CI definition for illumos
2019-04-26 23:39:38 +00:00
William Welliver
59d57338a5 Add basic CI definition for illumos 2019-04-26 10:36:11 -04:00
Ilya Shipitsin
0060ba6c18 travis-ci: update dotnet sdk version
also, we need to to switch to xenial, dotnet sdk is not available for trusty
2019-04-22 00:54:39 +05:00
Ilya Shipitsin
560b90d02c
Merge pull request #904 from ronneke1996/increase-tasksmax-vpnserver-unit-file
Merge PR #904: Increased the task limit of the unit file
2019-04-20 12:06:24 +00:00
Ron Nabuurs
a2e2d5133b
Increased the task limit of the unit file to be 4096 (max
connections per hub) * 4096 (max hubs)
2019-04-19 11:59:48 +02:00
Davide Beatrici
b43a1e76da
Merge PR #900: release 5.01.9670 2019-04-08 20:49:22 +02:00
Ilya Shipitsin
854814475c release 5.01.9670 2019-04-07 19:11:27 +00:00
Ilya Shipitsin
bf8cd35508
Merge pull request #899 from MatAtBread/issue-898
Merge PR #899: Set unbuffered mode for *nix systems stdout, allowing interactive use…
2019-04-07 23:52:50 +05:00
MatAtBread
6dbcda6026 Set unbuffered mode for *nix systems stdout, allowing interactive use within spawned processes. Fixes issue #898 2019-04-07 19:13:18 +01:00
Davide Beatrici
afa93c8b84
Merge PR #896: introduce cirrus-ci builds 2019-04-02 19:48:07 +02:00
Ilya Shipitsin
388da69793 avoid non needed ci builds 2019-04-02 11:16:36 +05:00
Ilya Shipitsin
9e8c277cf3 initial cirrus-ci config 2019-03-27 22:49:48 +05:00
Davide Beatrici
89dfa319f3
Merge PR #893: travis-ci: add linux-ppc64le to build matrix 2019-03-15 23:34:19 +01:00
Ilya Shipitsin
abbacdf2a0 travis-ci: add linux-ppc64le to build matrix 2019-03-16 00:30:54 +05:00
Davide Beatrici
ec72d90140
Merge PR #892: azure pipelines improvements 2019-03-13 20:11:24 +01:00
Ilya Shipitsin
d25d0c2465 azure pipelines windows: build artifacts, tests 2019-03-13 23:59:04 +05:00
Ilya Shipitsin
1de08b05b2 azure pipelines linux: remove not needed setting 2019-03-13 23:58:17 +05:00
Ilya Shipitsin
03f4ced2c7
Merge pull request #891 from chipitsine/master
Merge PR #891: Azure Pipelines: refactoring, adding windows target
2019-03-13 01:51:17 +05:00
Ilya Shipitsin
13b531c763 Azure Pipelines: refactoring, adding windows target 2019-03-13 01:37:47 +05:00
Davide Beatrici
2f12e54fbc
Merge PR #889: some build cleanup 2019-03-11 19:15:26 +01:00
Ilya Shipitsin
8f790eeca0 rename azure-pipelines.yml to .azure-pipelines.yml 2019-03-11 22:43:35 +05:00
Ilya Shipitsin
a9468c8cd9 configure.cmd: fail on compilation fail 2019-03-11 22:42:53 +05:00
Davide Beatrici
ec7a0512f6
Merge PR #888: Fixed the RsaVerifyEx function buffer overflow problem 2019-03-06 17:43:37 +01:00
Daiyuu Nobori
98443715d9 Fixed the vulnerability that a malformed packet will cause the buffer overflow at the receive path. This vulnerability may occur abnormal process exit with the buffer security check mechanism built-in with SoftEther VPN binary. Although this buffer overflow can theoretically bypass the security check in theory, in the actual binary it is detected by the buffer security check inserted by the C compiler and the process is forcibly terminated. Therefore, as a result, it can be abused by a DoS attacker. Acknowledgments: The last problems is discovered and reported by Fabrizio Steiner. 2019-02-28 20:40:23 +09:00
Davide Beatrici
beef8d6892
Merge PR #885: Rename "azure-pipelines.yml" to ".azure-pipelines.yml" 2019-02-27 22:40:14 +01:00
Davide Beatrici
bb56998a4e Rename "azure-pipelines.yml" to ".azure-pipelines.yml" 2019-02-27 21:51:53 +01:00
Davide Beatrici
ba94d8a6fa
Merge PR #884: Fix memory leak in OpenSSL deinitialization function 2019-02-27 21:47:52 +01:00
vvd
372e8aa031 Fixed memory leak in OpenSSL deinitialization function 2019-02-27 21:41:20 +01:00
Davide Beatrici
e750ace40a
Merge PR #883: Fix compilation without OpenSSL ENGINE 2019-02-25 23:33:54 +01:00
Rosen Penev
26261236ba
Fix compilation without OpenSSL ENGINE 2019-02-25 14:24:31 -08:00
Ilya Shipitsin
6773eb3e0b
Merge pull request #877 from paskal/patch-1
Merge PR #877: Adjust launchpad ppa links
2019-02-16 22:44:59 +05:00
Dmitry Verkhoturov
e0467c0a39
adjust launchpad ppa links 2019-02-16 19:42:07 +03:00
Davide Beatrici
d7941be664
Merge PR #875: Fixed wrong function name in Debug message 2019-02-16 03:04:07 +01:00
Nick
23b8161ac2
Fixed wrong function name in Debug message 2019-02-15 20:41:16 -05:00
Davide Beatrici
c1243c5198
Merge PR #873: ver.rc: fix misspelling 2019-02-14 08:51:19 +01:00
Davide Beatrici
270d9f1e0b
Merge PR #872: Fix to show correct version in Server Manager GUI 2019-02-14 08:38:09 +01:00
parly
962356af9c Fix misspelling 2019-02-14 16:07:35 +09:00
parly
5a7e4693fc Fix GetCedarVersionNumber() 2019-02-14 16:04:16 +09:00
Ilya Shipitsin
d790223700 release 5.01.9669 2019-02-03 19:43:50 +00:00
Ilya Shipitsin
a5b816aa59
Merge pull request #869 from chipitsine/launchpad
Merge PR #869: disable cpu features on arm64, amrhf, s390x
2019-02-04 00:19:52 +05:00
Ilya Shipitsin
45c13c5409 disable cpu features on arm64, amrhf, s390x
tested on launchpad
2019-02-03 18:05:34 +05:00
Ilya Shipitsin
c253c55a8c
Merge pull request #862 from davidebeatrici/mayaqua-getcipherlist-double-free-fix
Merge PR #862: Fix crashes in GetCipherList() and StGetServerCipherList()
2019-01-29 19:31:57 +05:00
Ilya Shipitsin
ce6e49a3f9 release 5.01.9668 2019-01-27 07:49:56 +00:00
Davide Beatrici
8657955c92 Merge PR #867: Improve translations for inf file. 2019-01-24 01:42:25 +01:00
Davide Beatrici
a97b87da68 Cedar/Admin.c: fix segmentation fault caused by non-initialized string in StGetServerCipherList()
StrCat() appends a string to an already existing string. In order to know where the existing string ends, it uses StrLen() which in turn uses strlen(), a function considered unsafe because it doesn't stop until it finds the null character.

Since the string was allocated but not initialized, StrCat() was either:

- Working correctly.
- Copying only a part of the string.
- Making the program crash via strlen().

The fix consists in using StrCpy(), which starts writing at the beginning of the string.
2019-01-21 04:15:55 +01:00
Davide Beatrici
09ee19e72b Mayaqua/Network.c: fix double free crash in GetCipherList()
SSL_free() also frees the associated context.

d6c3c1896c/ssl/ssl_lib.c (L1209)

From https://www.openssl.org/docs/man1.1.1/man3/SSL_free.html:

"SSL_free() also calls the free()ing procedures for indirectly affected items, if applicable: the buffering BIO, the read and write BIOs, cipher lists specially created for this ssl, the SSL_SESSION. Do not explicitly free these indirectly freed up items before or after calling SSL_free(), as trying to free things twice may lead to program failure."
2019-01-21 04:14:47 +01:00
Umi
e939f887c4 Update vpninstall_cn.inf 2019-01-21 03:59:31 +01:00
Daiyuu Nobori
63c01ba736
Merge pull request #832 from dnobori/181202_switch_to_apache_license
Switching license from GPLv2 to Apache License 2.0.
2019-01-21 09:36:19 +09:00
Daiyuu Nobori
dbfda5bad4 Date change of Declaration_Switch_License_from_GPL_to_Apache.pdf 2019-01-21 09:34:14 +09:00
Umi
d0bc360907
Merge pull request #1 from Umiiii/Umiiii-patch-1
Update vpninstall_cn.inf
2019-01-19 16:57:36 +08:00
Umi
bf493e359b
Update vpninstall_cn.inf 2019-01-19 16:56:15 +08:00
Daiyuu Nobori
ca1ccc204f Update CMakeLists.txt for Apache License 2.0 2019-01-14 12:42:15 +09:00
Daiyuu Nobori
575ebc1fd4 Update Declaration_Switch_License_from_GPL_to_Apache.pdf. The date will be 2019/01/19. 2019-01-14 12:31:24 +09:00
Daiyuu Nobori
881f34ac56 Compacting headers, updating trivial texts to fit to the license change from GPLv2 to Apache License 2.0. 2019-01-14 12:25:53 +09:00
Davide Beatrici
3b85a116ff
Merge PR #857: remove unused functions 2019-01-06 20:31:36 +01:00
Ilya Shipitsin
3bb0e20add src/Mayaqua/FileIO: remove unused function
found by cppcheck

[src/Mayaqua/FileIO.c:2082]: (style) The function 'FileRename' is never used.
2019-01-06 23:44:23 +05:00
Ilya Shipitsin
7f8e5b00dc src/Cedar/UT: remove unused function
found by cppcheck

[src/Cedar/Proto_SSTP.c:126]: (style) The function 'SetNoSstp' is never used.
2019-01-06 23:39:43 +05:00
Ilya Shipitsin
057984b87c src/Cedar/Proto_SSTP: remove unused function
found by cppcheck

[src/Cedar/Proto_SSTP.c:126]: (style) The function 'SetNoSstp' is never used.
2019-01-06 23:34:10 +05:00
Ilya Shipitsin
dcf5c57fc2 src/Cedar/Proto_IPsec" remove unused function
found by cppcheck

[src/Cedar/Proto_IPsec.c:120]: (style) The function 'IPSecSetDisable' is never used.
2019-01-06 23:31:29 +05:00
Ilya Shipitsin
162a181b04 src/Cedar/Protocol: remove unused function
found by cppcheck

[src/Cedar/Protocol.c:6643]: (style) The function 'ProxyConnectEx' is never used.
2019-01-06 23:22:08 +05:00
Ilya Shipitsin
8534f2843e src/Cedar/DDNS: remove unused function, variables
found by cppcheck

[src/Cedar/DDNS.c:656]: (style) Condition 'ret==NULL' is always true
[src/Cedar/DDNS.c:515] -> [src/Cedar/DDNS.c:640]: (style) The expression 'use_https == false' is always true because 'use_https' and 'false' represent the same value.
[src/Cedar/DDNS.c:516] -> [src/Cedar/DDNS.c:648]: (style) The expression 'no_cert_verify == false' is always true because 'no_cert_verify' and 'false' represent the same value.
[src/Cedar/DDNS.c:816] -> [src/Cedar/DDNS.c:860]: (style) The expression 'no_cert_verify == false' is always true because 'no_cert_verify' and 'false' represent the same value.
[src/Cedar/DDNS.c:530]: (style) Variable 'use_vgs' is assigned a value that is never used.
[src/Cedar/DDNS.c:497]: (style) The function 'DCUpdateNow' is never used.
2019-01-06 23:18:25 +05:00
Davide Beatrici
b882265f84
Merge PR #856: remove unused functions 2019-01-06 17:26:23 +01:00
Ilya Shipitsin
72bd221bb4 src/Cedar/Account: remove unused functions
found by cppcheck

[src/Cedar/Account.c:523]: (style) The function 'GetUserPolicy' is never used.
[src/Cedar/Account.c:163]: (style) The function 'NormalizePolicyName' is never used.
2019-01-06 18:53:18 +05:00
Ilya Shipitsin
266f013880 src/Cedar/Command: remove redundant assignment
found by cppcheck

[src/Cedar/Command.c:23220] -> [src/Cedar/Command.c:23232]: (style) Variable 'len' is reassigned a value before the old one has been used.
2019-01-06 18:49:56 +05:00
Ilya Shipitsin
9d4d111555 src/Cedar/CM: remove unused function, variables
found by cppcheck

[src/Cedar/CM.c:4509]: (style) Variable 'easy' is assigned a value that is never used.
[src/Cedar/CM.c:4547]: (style) Variable 'hub_name' is assigned a value that is never used.
[src/Cedar/CM.c:4609]: (style) Variable 'is_account' is assigned a value that is never used.
[src/Cedar/CM.c:8545]: (style) The function 'CmLoadK' is never used.
2019-01-06 18:43:51 +05:00
Ilya Shipitsin
4760b3d0c3 src/Cedar/AzureClient: remove unused function
found by cppcheck

[src/Cedar/AzureClient.c:526]: (style) The function 'AcGetEnable' is never used.
2019-01-06 18:34:04 +05:00
Davide Beatrici
359918c1cb
Merge PR #855: AppVeyor: run openvpn integration tests 2019-01-06 13:24:13 +01:00
Ilya Shipitsin
77894a34ce AppVeyor: run openvpn integration tests 2019-01-06 16:53:42 +05:00
Davide Beatrici
4e6f58584e
Merge PR #854: run openvpn tests within Azure Pipelines 2019-01-05 22:33:23 +01:00
Ilya Shipitsin
eb64940d36 run openvpn tests within Azure Pipelines 2019-01-05 19:18:39 +05:00
Davide Beatrici
8ec43e7618
Merge PR #852: Cedar: retrieve the list of available encryption algorithms from the server 2019-01-01 22:10:33 +01:00
Davide Beatrici
d62421adcb Cedar: retrieve the list of available encryption algorithms from the server 2019-01-01 20:31:13 +01:00
Davide Beatrici
422076d6c9
Merge PR #851: Mayaqua: fix segmentation fault, add new FreeHttpHeaderSafe() function 2018-12-30 15:00:21 +01:00
Davide Beatrici
2a572aab21 Mayaqua: fix segmentation fault, add new FreeHttpHeaderSafe() function 2018-12-30 14:46:26 +01:00
Ilya Shipitsin
f32775ba47
Merge pull request #850 from chipitsine/master
Merge PR #850: travis-ci: try to fix coverity scan
2018-12-28 19:38:28 +00:00
Davide Beatrici
619a533b8f
Merge PR #843: Mayaqua: query OpenSSL for the list of available ciphers instead of relying on a static list 2018-12-28 20:24:13 +01:00
Ilya Shipitsin
80317444d8 travis-ci: try to fix coverity scan 2018-12-29 00:06:05 +05:00
Davide Beatrici
2aaeed67c4
Merge PR #848: Fixed a typo in Chinese translation 2018-12-24 22:55:47 +01:00
Kero Yang
5ea5dd34b6
Update strtable_cn.stb
fixed a typo ("取消l" => "取消")
2018-12-25 04:05:37 +08:00
Davide Beatrici
eee494f046
Merge PR #847: Mayaqua: add "PTR_TO_PTR" macro intended to be used with FreeSafe() 2018-12-23 11:36:40 +01:00
Davide Beatrici
fca10c0975
Merge PR #845: Cedar/IPC.c: fix memory leak occurring when both the username and common name are not present (OpenVPN) 2018-12-23 11:35:47 +01:00
Davide Beatrici
e51c319648 Mayaqua: add "PTR_TO_PTR" macro intended to be used with FreeSafe() 2018-12-22 07:38:38 +01:00
Davide Beatrici
ef77e95f87 Cedar/IPC.c: fix memory leak occurring when both the username and common name are not present (OpenVPN) 2018-12-21 21:24:22 +01:00
Ilya Shipitsin
0cf6fac7a3 5.01.9667
Signed-off-by: Ilya Shipitsin <chipitsine@gmail.com>
2018-12-21 11:18:18 +00:00
Davide Beatrici
7f9d47b3aa Mayaqua: query OpenSSL for the list of available ciphers instead of relying on a static list 2018-12-21 09:54:51 +01:00
Davide Beatrici
545c987a8a
Merge PR #842: hamcore: fix port number shown in the server management info string of vpncmd 2018-12-21 09:06:02 +01:00
Davide Beatrici
ac5e68b3ed hamcore: fix port number shown in the server management info string of vpncmd 2018-12-21 07:27:57 +01:00
Davide Beatrici
3c3aa900b6
Merge PR #841: Mayaqua: fix segmentation fault, add new FreeSafe() function 2018-12-20 03:19:43 +01:00
Davide Beatrici
bd01cbff9a Mayaqua: add new FreeSafe() function which calls Free() and set the pointer's value to NULL 2018-12-20 02:52:22 +01:00
Davide Beatrici
ada06e218e Mayaqua: revamp RecvHttpHeader() so that cleanup functions are not called twice 2018-12-19 20:00:18 +01:00
Davide Beatrici
30f37beed2
Merge PR #838: cleanup: remove ChangeLog, it is not actively maintained 2018-12-18 00:21:04 +01:00
Ilya Shipitsin
1db9123297 cleanup: remove ChangeLog, it is not actively maintained 2018-12-18 02:14:07 +05:00
Ilya Shipitsin
3c02cb32b2
Merge pull request #834 from chipitsine/master
Merge PR #834: setup azure pipelines
2018-12-17 22:03:45 +05:00
Davide Beatrici
fcba22988f
Merge PR #835: Cedar: Bind the special listeners to the specified IP address 2018-12-16 17:02:47 +01:00
Davide Beatrici
6c44cecc64 Cedar: Bind the special listeners to the specified IP address 2018-12-15 21:33:37 +01:00
Ilya Shipitsin
3ff10dc8ed CI: avoid not needed builds when possible 2018-12-15 22:35:40 +05:00
Ilya Shipitsin
6d32be3eb3 initial setup of Azure Pipelines 2018-12-15 22:34:43 +05:00
Ilya Shipitsin
07c5716374 configure: allow to specify CPACK_GENERATOR explicitly 2018-12-15 22:32:19 +05:00
Davide Beatrici
aa3a797edb
Merge PR #833: Add new icons based on the one made by Icons8 2018-12-14 03:02:23 +01:00
Daiyuu Nobori
9c0eee0aad Merge branch 'master' of github.com:SoftEtherVPN/SoftEtherVPN into 181202_switch_to_apache_license 2018-12-14 10:58:58 +09:00
Davide Beatrici
884a402c0c README.md: Mention Icons8's support 2018-12-07 08:50:34 +00:00
Davide Beatrici
a812910f85 src: Update VPN Client Manager and VPN Server Manager icons 2018-12-07 08:35:02 +00:00
Davide Beatrici
79012b4b21 resources: Add icons based on the one made by Icons8
https://icons8.com/icon/39916/softether-vpn
2018-12-07 08:34:33 +00:00
Daiyuu Nobori
fa2ab80723 Edit README.md 2018-12-02 16:02:02 +09:00
Daiyuu Nobori
456efa7f87 Modification the header comments for some definitions in TunTap.h. 2018-12-02 16:00:45 +09:00
Daiyuu Nobori
eb40a80bac Edit PULL_REQUEST_TEMPLATE.md. 2018-12-02 15:58:24 +09:00
Daiyuu Nobori
f7e9510472 Add Declaration_Switch_License_from_GPL_to_Apache.pdf 2018-12-02 15:58:23 +09:00
Daiyuu Nobori
337aaa0dfa Modification the header comments for some definitions in TunTap.h. 2018-12-02 15:58:23 +09:00
Daiyuu Nobori
16ed2f3e0c Documents: Switching license from GPLv2 to Apache License 2.0. 2018-12-02 09:37:24 +09:00
Evengard
9fff38de2b Rewriting PPP stack, preparing for IPv6 support 2018-03-15 12:49:18 +03:00
658 changed files with 154293 additions and 126323 deletions

View File

@ -1,92 +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
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
-
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
deploy:
description: 'automatic release'
provider: GitHub
auth_token: $(github_token)
on:
APPVEYOR_REPO_TAG: true

View File

@ -2,11 +2,13 @@
set -eux
sudo dpkg -i build/softether-common*.deb
sudo dpkg -i build/softether-vpnbridge*.deb
sudo dpkg -i build/softether-vpnclient*.deb
sudo dpkg -i build/softether-vpncmd*.deb
sudo dpkg -i build/softether-vpnserver*.deb
BUILD_BINARIESDIRECTORY="${BUILD_BINARIESDIRECTORY:-build}"
sudo dpkg -i $BUILD_BINARIESDIRECTORY/softether-common*.deb
sudo dpkg -i $BUILD_BINARIESDIRECTORY/softether-vpnbridge*.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)

View File

@ -1,18 +1,25 @@
$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') | % {
[String] $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'
return $false
}else{
} else {
Write-Host 'ok'
}
}

View File

@ -12,7 +12,7 @@ build_openssl () {
if [[ "$(cat ${OPENSSL_INSTALL_DIR}/.openssl-version)" != "${OPENSSL_VERSION}" ]]; then
tar zxf "download-cache/openssl-${OPENSSL_VERSION}.tar.gz"
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 install_sw
echo "${OPENSSL_VERSION}" > "${OPENSSL_INSTALL_DIR}/.openssl-version"

View File

@ -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

35
.ci/run-openvpn-tests.sh Executable file
View File

@ -0,0 +1,35 @@
#!/bin/bash
set -eux
BUILD_BINARIESDIRECTORY="${BUILD_BINARIESDIRECTORY:-build}"
cd $BUILD_BINARIESDIRECTORY
git clone https://github.com/openvpn/openvpn
cd openvpn
autoreconf -iv
./configure > build.log 2>&1 || (cat build.log && exit 1)
make > build.log 2>&1 || (cat build.log && exit 1)
echo test > /tmp/auth.txt
echo test >> /tmp/auth.txt
CONFIG=`ls /tmp/*l3*ovpn`
cat << EOF > tests/t_client.rc
CA_CERT=fake
TEST_RUN_LIST="1 2"
OPENVPN_BASE="--config $CONFIG --auth-user-pass /tmp/auth.txt"
RUN_TITLE_1="testing udp/ipv4"
OPENVPN_CONF_1="--dev null --proto udp --port 1194 \$OPENVPN_BASE"
RUN_TITLE_2="testing tcp/ipv4"
OPENVPN_CONF_2="--dev null --proto tcp --port 1194 \$OPENVPN_BASE"
EOF
sed -i 's/^remote.*$/remote 127.0.0.1 1194/g' /tmp/*l3*ovpn
make test_scripts=t_client.sh check

12
.ci/sonarcloud.sh Executable file
View 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

42
.ci/start-se-openvpn.sh Executable file
View File

@ -0,0 +1,42 @@
#!/bin/bash
set -eux
BUILD_BINARIESDIRECTORY="${BUILD_BINARIESDIRECTORY:-build}"
cd $BUILD_BINARIESDIRECTORY
./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
View File

@ -0,0 +1,5 @@
#!/bin/sh
set -eux
./build/vpncmd /tools /cmd:check

25
.cirrus.yml Normal file
View 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-2
prepare_script:
- pkg install -y pkgconf cmake git libsodium cpu_features $SSL
- git submodule update --init --recursive
configure_script:
- CMAKE_FLAGS="-DUSE_SYSTEM_CPU_FEATURES=1" CFLAGS="-I/usr/local/include/cpu_features" ./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

View File

@ -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...]

View 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
View 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

View File

@ -3,17 +3,3 @@ Changes proposed in this pull request:
-
-
Your great patch is much appreciated. We are considering to apply your patch into the SoftEther VPN main tree.
SoftEther VPN Patch Acceptance Policy:
http://www.softether.org/5-download/src/9.patch
You have two options which are described on the above policy.
Could you please choose either option 1 or 2, and specify it clearly on the reply?
-
PRELIMINARY DECLARATION FOR FUTURE SWITCH TO A NON-GPL LICENSE
I hereby agree in advance that my work will be licensed automatically under the Apache License or a similar BSD/MIT-like open-source license in case the SoftEther VPN Project adopts such a license in future.

View 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
View 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

98
.github/workflows/docker-aio.yml vendored Normal file
View File

@ -0,0 +1,98 @@
name: docker-aio
on:
push:
branches:
- 'master'
tags:
- '*'
pull_request:
workflow_dispatch:
jobs:
docker:
name: docker-aio
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'SoftEtherVPN' }}
steps:
-
name: Docker meta vpnserver
id: metavpnserver
uses: docker/metadata-action@v5
with:
images: ${{ github.repository_owner }}/vpnserver
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
-
name: Docker meta vpnclient
id: metavpnclient
uses: docker/metadata-action@v5
with:
images: ${{ github.repository_owner }}/vpnclient
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
-
name: Docker meta vpnbridge
id: metavpnbridge
uses: docker/metadata-action@v5
with:
images: ${{ github.repository_owner }}/vpnbridge
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:qemu-v9.2.0
#
# TODO: unpin qemu version after default is updated
#
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push vpnserver
uses: docker/build-push-action@v6
with:
file: ./Dockerfile
target: vpnserver
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64
tags: ${{ steps.metavpnserver.outputs.tags }}
labels: ${{ steps.metavpnserver.outputs.labels }}
-
name: Build and push vpnclient
uses: docker/build-push-action@v6
with:
file: ./Dockerfile
target: vpnclient
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64
tags: ${{ steps.metavpnclient.outputs.tags }}
labels: ${{ steps.metavpnclient.outputs.labels }}
-
name: Build and push vpnbridge
uses: docker/build-push-action@v6
with:
file: ./Dockerfile
target: vpnbridge
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64
tags: ${{ steps.metavpnbridge.outputs.tags }}
labels: ${{ steps.metavpnbridge.outputs.labels }}

34
.github/workflows/fedora-rawhide.yml vendored Normal file
View File

@ -0,0 +1,34 @@
name: Fedora/Rawhide
on:
schedule:
- cron: "0 0 25 * *"
push:
pull_request:
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-engine libsodium-devel readline-devel zlib-devel gcc-c++ clang google-cpu_features-devel
- name: Compile with ${{ matrix.cc }}
run: |
export CC=${{ matrix.cc }}
CMAKE_FLAGS="-DUSE_SYSTEM_CPU_FEATURES=1" CFLAGS="-I/usr/include/cpu_features" ./configure
make -C build

41
.github/workflows/linux.yml vendored Normal file
View File

@ -0,0 +1,41 @@
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: Upload DEB packages as artifacts
if: github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v4
with:
name: deb-packages
path: build/*.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
View File

@ -0,0 +1,28 @@
on: [push, pull_request, workflow_dispatch]
permissions:
contents: read
jobs:
build_and_test:
strategy:
matrix:
os: [macos-15, macos-14, macos-13]
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
View 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
View 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
View 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
View 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
View File

@ -2,8 +2,12 @@
.cproject
.project
.settings/
.vs/
Makefile
bin/
/src/bin/*
!/src/bin/hamcore/
/src/bin/hamcore/*
!/src/bin/hamcore/wwwroot/
build/
cmake-build-debug/
src/bin/hamcore/authors.txt
@ -205,4 +209,4 @@ developer_tools/stbchecker/**/ASALocalRun/
developer_tools/stbchecker/**/*.binlog
developer_tools/stbchecker/**/*.nvuser
developer_tools/stbchecker/**/.mfractor/
/vcpkg_installed

View File

@ -1,48 +1,11 @@
.ubuntu: &ubuntu_def
variables:
CMAKE_VERSION: 3.9.6
except:
changes:
- .appveyor.yml
- .travis.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
# illumos gitlab-runner maintained by @hww3
build_illumos:
only:
- master@SoftEther/SoftEtherVPN
tags:
- illumos
script:
- ./configure
- make package -C tmp
- dpkg -i build/softether-vpn*.deb
- .ci/memory-leak-test.sh
- git submodule init && git submodule update
- CMAKE_FLAGS="-DCMAKE_PREFIX_PATH=/opt/local -DCMAKE_CXX_FLAGS=-m64 -DCMAKE_C_FLAGS=-m64" ./configure
- gmake -C build
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]

18
.gitmodules vendored
View File

@ -1,6 +1,18 @@
[submodule "src/Mayaqua/3rdparty/cpu_features"]
path = src/Mayaqua/3rdparty/cpu_features
url = https://github.com/google/cpu_features.git
[submodule "src/Mayaqua/3rdparty/zlib"]
path = src/Mayaqua/3rdparty/zlib
url = https://github.com/madler/zlib.git
[submodule "3rdparty/tinydir"]
path = 3rdparty/tinydir
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
[submodule "src/Mayaqua/3rdparty/oqs-provider"]
path = src/Mayaqua/3rdparty/oqs-provider
url = https://github.com/open-quantum-safe/oqs-provider.git
[submodule "src/Mayaqua/3rdparty/liboqs"]
path = src/Mayaqua/3rdparty/liboqs
url = https://github.com/open-quantum-safe/liboqs.git

View File

@ -1,4 +1,5 @@
sudo: required
dist: bionic
language: c
@ -6,44 +7,37 @@ env:
global:
- OPENSSL_INSTALL_DIR="${HOME}/opt"
addons:
sonarcloud:
organization: "softethervpn"
matrix:
include:
- env: OPENSSL_VERSION="1.0.2o" BUILD_DEB="1"
- env: OPENSSL_VERSION="1.0.2s" BUILD_DEB="1"
os: linux
compiler: gcc
- env: OPENSSL_VERSION="1.1.0f"
- env: RUN_SONARCLOUD=1 OPENSSL_VERSION="1.1.1c"
os: linux
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
compiler: clang
- env: OPENSSL_VERSION="1.1.0f"
os: linux
compiler: clang
- env: LIBRESSL_VERSION="2.8.2"
- env: LIBRESSL_VERSION="2.9.2"
os: linux
compiler: gcc
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)
- 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:
directories:
@ -51,16 +45,16 @@ cache:
- ${HOME}/opt
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)
script:
- export OPENSSL_ROOT_DIR=${OPENSSL_INSTALL_DIR}
- export LD_LIBRARY_PATH="${HOME}/opt/lib:${LD_LIBRARY_PATH:-}"
- export CFLAGS="-I${HOME}/opt/include"
- export LDFLAGS="-L${HOME}/opt/lib"
- .ci/coverity.sh
- export LDFLAGS="-L${HOME}/opt/lib -Wl,-rpath,${HOME}/opt/lib"
- .ci/sonarcloud.sh
- ./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
- 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

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"cmake.configureOnOpen": false
}

1
3rdparty/BLAKE2 vendored Submodule

@ -0,0 +1 @@
Subproject commit b52178a376ca85a8ffe50492263c2a5bc0fa4f46

1
3rdparty/tinydir vendored Submodule

@ -0,0 +1 @@
Subproject commit ec6bff2043eaac3ad25423705e63a781762a0dfd

View File

@ -1,5 +1,5 @@
SoftEther VPN is developed by SoftEther VPN Project at University of Tsukuba.
http://www.softether.org/
https://www.softether.org/
AUTHORS OF SOFTETHER VPN
------------------------
@ -52,6 +52,8 @@ DEVELOPMENT BOARD MEMBERS:
- Ilya Shipitsin
https://github.com/chipitsine
- Yihong Wu
https://github.com/domosekai
SPECIAL CONTRIBUTORS:
@ -89,6 +91,7 @@ CONTRIBUTORS:
- Johan de Vries <devries@wivion.nl>
- Josh Soref <https://github.com/jsoref>
- Joshua Perry <josh@6bit.com>
- Koichiro Iwao <meta@FreeBSD.org>
- Luiz Eduardo Gava <luiz.gava@procempa.com.br>
- macvk <tutumbul@gmail.com>
- Maks Naumov <maksqwe1@ukr.net>
@ -111,6 +114,7 @@ CONTRIBUTORS:
- NV <nvsofts@gmail.com>
- Olimjon <olim98@bk.ru>
- parly <https://github.com/parly>
- PeTeeR <tom2pet@gmail.com>
- Quantum <quantum2048@gmail.com>
- Quintin <quintin@last.za.net>
- Raymond Tau <raymondtau@gmail.com>
@ -134,5 +138,5 @@ JOIN THE SOFTETHER VPN DEVELOPMENT
Want to become a contributor? Please send us a patch.
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

View File

@ -1,12 +1,34 @@
cmake_minimum_required(VERSION 3.7)
cmake_minimum_required(VERSION 3.15)
set(BUILD_NUMBER CACHE STRING "The number of the current build.")
if ("${BUILD_NUMBER}" STREQUAL "")
set(BUILD_NUMBER "5187")
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"
VERSION 5.01.9666
VERSION "5.02.${BUILD_NUMBER}"
LANGUAGES C
)
set(CMAKE_C_STANDARD 99)
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
# configurations than "Debug" and "Release", such as "RelWithDebInfo".
@ -17,30 +39,28 @@ else()
endif()
# 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")
endif()
# Compare ${PROJECT_VERSION} and src/CurrentBuild.txt
file(READ ${TOP_DIRECTORY}/src/CurrentBuild.txt CurrentBuild)
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")
if(WIN32 AND VCPKG_TARGET_TRIPLET AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
message (FATAL_ERROR "vcpkg not installed or integrated with Visual Studio. Install it and run\n\tvcpkg integrate install")
endif()
if(UNIX)
include(GNUInstallDirs)
#
# use rpath for locating installed libraries
#
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
include(CheckIncludeFile)
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()
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 time: ${TIME_HOUR}:${TIME_MINUTE}:${TIME_SECOND}")
set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
add_subdirectory(src)
if(UNIX)
@ -85,7 +103,16 @@ if(UNIX)
set(CPACK_RPM_COMPONENT_INSTALL ON)
set(CPACK_RPM_FILE_NAME "RPM-DEFAULT")
set(CPACK_RPM_PACKAGE_GROUP "Applications/Internet")
set(CPACK_RPM_PACKAGE_LICENSE "GPLv2")
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)
endif()

141
CMakeSettings.json Normal file
View File

@ -0,0 +1,141 @@
{
"environments": [ { "BuildNumber": "5187" } ],
"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
View 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.

372
ChangeLog
View File

@ -1,372 +0,0 @@
SoftEther VPN 5.1 (February 14, 2018)
Use the new agreed versioning pattern, where we use 5.x for the unstable version and slowely drop the incremental number
Add the Alternative subject name field on the new X.509 certificate creation. PR #421
Fix a bug in the Win32EnumDirExW() function. PR #420
remove unused functions (identified by cppcheck). PR #440
Allow specifying cipher suites instead of single ciphers. PR #343
Add parameter "ListenIP" to server configuration (vpn_server.config). PR #202
cppcheck findings. PR #275
Add DhParamBits configuration to set Diffie-Hellman parameters. PR #129
Fix log msg for IKE with aggressive exchange mode. PR #425
Fixes 11 vulnerabilities found by Max Planck Institute for Molecular Genetics and Mr. Guido Vranken. PR #419
Fixed the bug which occurs the L2TP/IPsec connection error with Android Oreo, etc. PR #405
build documentation refactoring. PR #395
initial travis-ci support feature. PR #348
Reformat README. Add compile requirements. PR #379
Fix: vpncmd thinks that "hamcore.se2" is missing or broken. PR #339
fix aarch64 build. PR #281
Initial Commit of gitignore. PR #380
SoftEther VPN 4.23 Build 9647 Beta (October 18, 2017)
Upgraded OpenSSL to 1.0.2l.
Source code is now compatible with OpenSSL 1.1.x. Supports DHE-RSA-CHACHA 20-POLY 1305 and ECDHE-RSA-CHACHA 20-POLY 1305, which are new encryption methods of TLS 1.2. (In order to use this new function, you need to recompile yourself using OpenSSL 1.1.x.)
TrafficServer / TrafficClient function (The traffic throughput measurement function) is now multithreaded and compatible with about 10 Gbps using NIC with the RSS feature.
Changed the default algorithm for SSL from RC4-MD5 to AES128-SHA.
Fixed a bug that occur wrong checksum recalculation in special case of the TCP-MSS clamp processing.
Fixed the calculation interval of update interval of DHCP client packet issued by kernel mode virtual NAT function of SecureNAT function.
Driver upgrade and DLL name change with Crypto ID support of USB security token.
Fixed a problem that CPU sleep processing was not performed when the wait time of the Select () function was INFINITE on Mac OS X.
Added the StrictSyslogDatetimeFormat flag onto the ServerConfiguration section on the VPN Server configuration file, which sets Syslog date format to RFC3164.
Fixed wrong English in the UI.
Using client parameter in function CtConnect
Remove blank line at the start from init file (Debian)
Stop Radius Delay from counting to next_resend
Add DH groups 2048,3072,4096 to IPSec_IKE
Add HMAC SHA2-256, HMAC SHA2-384, HMAC SHA2-512 support
Openvpn extend ciphers
Fixed RSA key bits wrong calculation for certain x509 certificate
Added support for RuToken USB key PKCS#11
OpenSSL 1.1 Port
SoftEther VPN 4.22 Build 9634 Beta (November 27, 2016)
Added the support for TLS 1.2. Added TLS 1.2-based cipher sets: AES128-GCM-SHA256, AES128-SHA256, AES256-GCM-SHA384, AES256-SHA256, DHE-RSA-AES128-GCM-SHA256, DHE-RSA-AES128-SHA256, DHE-RSA-AES256-GCM-SHA384, DHE-RSA-AES256-SHA256, ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-GCM-SHA384 and ECDHE-RSA-AES256-SHA384.
Added the function to allow to configure specific TLS versions to accept / deny. In the VPN Server configuration file you can set Tls_Disable1_0, Tls_Disable1_1 and Tls_Disable1_2 flags to true to disable these TLS versions individually.
Added the support for TLS 1.2 on the OpenVPN protocol.
Updated the version of OpenSSL to 1.0.2j.
Added the support for Windows Server 2016.
Fixed the 2038-year problem.
Added the support for recording HTTPS destination hostnames, using SNI attributes, on the packet logging function.
Added the function to append the name of Virtual Hub into the "Called-Station-ID (30)" attribute value in the RADIUS authentication request packet.
Improved the behavior of Virtual Layer-3 switches. The interval of ARP request is set to 1 second.
Fixed the problem of the slow startup of VPN Server in Windows 10.
Added the support for 4096 bits RSA authentication with smart cards.
Added the support for the CryptoID USB token.
Fixed the UI string resource in English.
Fix that ParseTcpOption doesn't work correctly
Add LSB header
Support Debian package build on aarch64 architecture
Support Debian package build on ARMv7l architecture
cppcheck issues
Default to TLS connections only
Allow specific SSL/TLS versions to be disabled
Adding Radius AVP Called-Station-Id
Fixed typo
Update CentOS makefiles and spec file
Systemd service configuration files for SoftEther
Fix set initialization, set.OnlyCapsuleModeIsInvalid could be garbage
Fixed OSX CPU utilization by replacing broken kevent () with select ()
Add the possibility to send the Virtual Hub Name to an external DHCP server
Added armv5tel for debian/rules and made pushed routes work correct with OpenVPN
fix LogFileGet won't save to SAVEPATH
Fix for Debian Package
Try to autodetect OS and CPU instead of requiring user input
Support For Radius Realm
SoftEther VPN 4.21 Build 9613 Beta (April 24, 2016)
Added SoftEther VPN Server Manager for Mac OS X.
Now you can manage your SoftEther VPN Server, running remotely, from your Mac in local.
SoftEther VPN 4.20 Build 9608 RTM (April 18, 2016)
All cumulative updates below are included.
Fixed a minor English typo.
SoftEther VPN 4.19 Build 9605 Beta (March 3, 2016)
The version of OpenSSL is updated to 1.0.2g to fix the vulnerability which was published in March 2016. SSLv2 is now disabled completely.
Fixed a multi-byte character problem in the certificate generating tool.
Enable the cache of the destination IP address of the additional TCP connection for a VPN session.
SoftEther VPN 4.19 Build 9599 Beta (October 19, 2015)
Fixed the problem that an unnecessary "Insert disk" dialog box appears when installing VPN Server or VPN Bridge on Windows 10.
Added the "/NOHUP" parameter in the "TrafficServer" command of vpncmd.
Added the "/REDIRECTURL" parameter in some access list commands of vpncmd.
Added the virtual address check routines in kernel-mode drivers to prevent blue screen or invalid memory access. Previous versions of kernel-mode drivers did not check the virtual addresses from the user-mode. (NOTE: All kernel-mode drivers are protected by ACL to avoid privilege escalation in all previous versions. Only users with Administrator privileges were able to cause blue screen or invalid memory access by passing invalid addresses from the user-mode. Therefore this was not a security flaw.) Appreciate Meysam Firozi's contribution to report the similar problem in the Win10Pcap driver.
SoftEther VPN 4.19 Build 9582 Beta (October 6, 2015)
Dramatically improvement of the performance of the Virtual NAT function of SecureNAT in Linux. In the previous versions of SoftEther VPN, the SecureNAT performance was very slow in the specific situation that the Linux Virtual Machine (VM) is running with virtual Ethernet interfaces which are prohibited to enable the promiscuous mode (this problem has been frequently appeared on cloud servers such like Amazon EC2/AWS or Windows Azure). In such a situation, SecureNAT must use the user-mode TCP/IP stack simulation and it was very slow and had high latency. This version of SoftEther VPN Server adds the new "RAW IP Mode" in the SecureNAT function. The RAW IP Mode is enabled by default, and is effective only if the VPN Server process is running in the root privileges. In the RAW IP Mode, the SecureNAT function realizes to transmit and receive TCP, UDP and ICMP packets which headers are modified. This behavior realizes drastically improved performance than legacy user-mode SecureNAT in the previous versions. In order to avoid the misunderstanding of receiving packets which are towards to the Virtual NAT function, some packet filter rules are automatically added to the iptables chain list. You can disable the RAW IP Mode by setting the "DisableIpRawModeSecureNAT" value to "1" on the Virtual Hub Extending Options.
Improved the performance of the Kernel-mode SecureNAT.
Improved the stability of the L2TP VPN sessions on the network with heavy packet-losses.
Added the compatibility with Cisco 800 series routers (e.g. Cisco 841M) on the L2TPv3 over IPsec protocol. These new Cisco routers have modified L2TPv3 header interpreter. Therefore SoftEther VPN Server needed to add new codes to support these new Cisco routers.
Added the support the compatibility to YAMAHA RTX series routers on the L2TPv3 over IPsec protocol.
Added the support for EAP and PEAP. SoftEther VPN Server can now speak RFC3579 (EAP) or Protected EAP (PEAP) to request user authentications to the RADIUS server with the MS-CHAPv2 mechanism. If this function is enabled, all requests from L2TP VPN clients which contain MS-CHAPv2 authentication data will be converted automatically to EAP or PEAP when it is transferred to the RADIUS server. You must enable this function manually for each of Virtual Hubs. To enable the function converting from MS-CHAPv2 to EAP, set the "RadiusConvertAllMsChapv2AuthRequestToEap" value to "true" in the vpn_server.config. To enable the function converting from MS-CHAPv2 to PEAP, set both "RadiusConvertAllMsChapv2AuthRequestToEap" and "RadiusUsePeapInsteadOfEap" options to "true".
SoftEther VPN 4.19 Build 9578 Beta (September 15, 2015)
Solved the problem that kernel mode drivers do not pass the general tests of "Driver Verifier Manager" in Windows 10.
SoftEther VPN 4.18 Build 9570 RTM (July 26, 2015)
Compatible with Windows 10.
Solved the problem that the customized language setting on the "lang.config" file.
config sometimes corrupts in the rare condition.
SoftEther VPN 4.17 Build 9566 Beta (July 16, 2015)
Improved stability with Windows 10 Beta.
Updated the OpenSSL library to 1.0.2d.
SoftEther VPN 4.17 Build 9562 Beta (May 30, 2015)
Added supports for Windows 10 Technical Preview Build 10130.
Increased the maximum Ethernet frame size from 1560 bytes to 1600 bytes.
Fixed the compiler error while building the source code of SoftEther VPN on Windows.
Added memory tags on the memory allocation function calls in kernel-mode device drivers.
Fixed the freeze problem of the VPN Client that the computer enters to suspend or hibernation state while the VPN Client is connected to the VPN Server.
Windows-version executable and driver files are now signed by the SHA-256 digital code-sign certificate.
SoftEther VPN 4.15 Build 9546 Beta (April 5, 2015)
Fixed the problem that the Local Bridge function does not work correctly on Windows 10 Technical Preview Build 10049.
SoftEther VPN 4.15 Build 9539 Beta (April 4, 2015)
Add the code to instruct the VPN Client to disconnect the VPN session automatically when Windows is being suspending or hibernating.
SoftEther VPN 4.15 Build 9538 Beta (March 27, 2015)
Fixed the dialog-box size problem on Windows 10 Technical Preview Build 10041.
SoftEther VPN 4.15 Build 9537 Beta (March 26, 2015)
Upgraded built-in OpenSSL from 0.9.8za to 1.0.2a. Please note that this change has not been well-tested. This upgrading of OpenSSL might cause problems. In that case, please post the bug report.
SoftEther VPN 4.14 Build 9529 Beta (February 2, 2015)
We are very sorry. The previous version 4.13 (beta) has a problem to accept L2TP connections due to the session-state quota-limitation code by the minor change between Build 9514 and 9524. The problem is fixed on this build. Please update to this build if you are facing to the L2TP problem on version 4.13.
Added the function to record underlying source IP addresses of VPN clients on every packet log lines. This function can be disabled by set the "NoPhysicalIPOnPacketLog" flag in the Virtual Hub Extended Option to "1".
SoftEther VPN 4.13 Build 9524 Beta (January 31, 2015)
Modified the behavior of the Local Bridge function in the VPN Server on Linux. In the previous versions, if several Local Bridge creation operations will be made, then the operations to disable the offloading function on the target Ethernet devices will be conducted as many as same. After this version, the operation to disable the offloading function will be called only once for each device if several Local Bridge creation operations will be made on the same Ethernet device.
Added the "SecureNAT_RandomizeAssignIp" Virtual Hub Extended Option. If you set this option to non-zero value, then the Virtual DHCP Server of the SecureNAT function will choose an unused IP address randomly from the DHCP pool while the default behavior is to choose the first unused IP address.
Added the "DetectDormantSessionInterval" Virtual Hub Extended Option. If you set this option to non-zero value, then the Virtual Hub will treat the VPN sessions, which have transmitted no packets for the last specified intervals (in seconds), as Dormant Sessions. The Virtual Hub will not flood packets, which should be flood, to any Dormant Sessions.
Added the implementation of the SHA () function in the source code. This made the building process easier on the low-memory embedded hardware which has its OpenSSL implementation without the SHA () function.
Improved the behavior on Windows 10 Technical Preview to show the OS version information correctly.
SoftEther VPN 4.12 Build 9514 Beta (November 17, 2014)
Added the VLAN ID dynamic assignment function by RADIUS. It is very useful when the layer-2 Ethernet segment with aggregated IEEE802.1Q tagged VLANs is bridged to your Virtual Hub. Each VPN session will be assigned its own VLAN ID by the RADIUS attribute value when the user is authenticated by the external RADIUS server unless the user object has a VLAN ID security policy. The RADIUS attribute with the name "Tunnel-Pvt-Group-ID" (ID = 81) will be used as the VLAN ID. The data type must be STRING. This function is disabled by default. You have to set the "AssignVLanIdByRadiusAttribute" value to "1" in the Virtual Hub Extended Options in advance.
Added the OpenVPNDefaultClientOption option in the vpn_server.config. The specified option string will be used alternatively when the connecting OpenVPN Client does not provide the connection string. Some incomplete OpenVPN Clients with the --enable-small compiling option always forget to specify this connection string. This option can make VPN Server allow such OpenVPN Clients.
Improved the DHCP option parser to allow the external DHCP server pushes the classless routing table which exceeds 255 bytes.
Added the support for "hair-pin connection" on the NAT Traversal function.
Fixed the performance problem when the server computer has the wrong resolv.conf setting file on Linux.
Fixed the VPN Client configuration backup folder name which the setup wizard automatically creates.
Fixed the UDP checksum value of the beacon packets which are sent by the Virtual Layer 3 Switch function.
SoftEther VPN 4.11 Build 9506 Beta (October 22, 2014)
As a response to the SSLv3 POODLE problem we added the "AcceptOnlyTls" configuration flag on the vpn_server.config for SoftEther VPN Server. Please set this flag is you want to completely disable the SSLv3 function in SoftEther VPN Server.
Added the perfect forward security (PFS) support on SSL/TLS. SoftEther VPN Server can now accept connections with DHE-RSA-AES128-SHA or DHE-RSA-AES256-SHA ciphers.
SoftEther VPN 4.10 Build 9505 Beta (October 3, 2014)
Implemented the hash table algorithm for the MAC address database of Virtual Hubs. It improves the performance when there are a large number of MAC addresses registered on the database.
Improved the performance on slow-CPU hardware (e.g. embedded Linux boxes).
Added the DoNotDisableOffloading flag on Local Bridge settings. This flag will disable the automated disabling operation for hardware offloading on the specified Ethernet interface on Linux.
Supports the kernel-supported IEEE802.1Q tagged VLAN on Windows and Linux. It will enable tagged-VLAN support on the Local Bridge function with some specific network interface drivers.
Added the FloodingSendQueueBufferQuota option.
Sets the lower priority value on the oom_adj process parameter for Linux.
Randomized the reconnection interval in Cascade Connection.
Increased the memory usage limit on 64-bit systems.
Modified the behavior of the ConfigGet command and the /CSV option in vpncmd for Windows to work around for the Windows console API bug.
Added the DisableSessionReconnect option on VPN Server and VPN Bridge. It makes Cascade Connection client sessions to disconnect immediately from the destination VPN Server when the based TCP connection is disconnected.
Makes it enable to use the PrivacyFilterMode security policy on Cascade server VPN sessions.
Added the GlobalParams configuration option on VPN Server and VPN Bridge. It allows administrators to modify and optimize the performance parameters of VPN Server and VPN Bridge.
Reduced the processor time of looking up the ACL entries when storing and forwarding packets across a Virtual Hub.
Reduced the usage of the memory on embedded Linux environments.
Fixed a minor bug on the GUI setting screen of the SecureNAT routing table pushing option.
Added the ServerLogSwitchType and the LoggerMaxLogSize option on VPN Server and VPN Bridge. They can change the logging behavior of VPN Server and VPN Bridge.
Implemented the config template file. The template filename is "vpn_server_template.config" for VPN Server, and "vpn_server_template.config" for VPN Bridge. The VPN Server and VPN Bridge loads the template file as the initial configuration state when the configuration file does not exists.
SoftEther VPN 4.10 Build 9473 Beta (July 12, 2014)
Added the "SuppressClientUpdateNotification" option in the Virtual Hub Extended Option list. This option will push the flag to the VPN Client to suppress the update notification screen on the VPN Client manager. To push this flag, set "1" to the "SuppressClientUpdateNotification" option in your Virtual Hub.
Added the warning message when the background service process is run by a non-root user (only in UNIX).
Fixed the deadlock bug when UNIX versions of SoftEther VPN Server process is shutting down.
Added supports for third-party PKCS#11 DLLs: ePass 1000 ND / ePass 2000 / ePass 2003 / ePass 3000.
Fixed typo.
The expression of the disclaimer statement for exporting / importing has been modified.
Fixed the VPN Azure connection problem on Version 4.09 Build 9451 Beta.
Fixed the problem that VPN Server Manager and VPN Client Manager sometimes become slow when the update check server is unreachable from the computer.
Removed space characters in every URLs of all download files on the SoftEther VPN Download Center web site to avoid the downloading problem in some HTTP clients.
A github patch which was posted by a contributor has been applied: "update debian packaging, install init script".
SoftEther VPN 4.09 Build 9451 Beta (June 9, 2014)
Improves User-mode SecureNAT performance by modifying the processing of TCP_FIN packets. It should improve the performance of the FTP protocol.
SoftEther VPN 4.08 Build 9449 (June 8, 2014)
Add a new command to generate a RSA 2048 bit certificate.
The vpncmd command-line utility has MakeCert command to generate a 1024 bit self-signed RSA certificate. However, in recent years it is recommended to use 2048 bit RSA certificates. Therefore, on this version a new command MakeCert2048 has been added. Use this command to generate a 2048 bit self-signed RSA certificate.
Workaround for the NAT traversal problem.
Adjusted the priority between TCP/IP Direct Connection and UDP-based NAT-Traversal. On this version (Ver 4.08), NAT-Traversal will always be used if the client program detects that the specified TCP destination port on the destination server is occupied by non-SoftEther VPN Server. Anyone who faces to the connection problem on the VPN Server which is behind the NAT-box should install this update.
In the previous version (Ver 4.07), when the VPN Client attempts to connect to the VPN Server, the client firstly establish the connection via the TCP/IP direct protocol. If the TCP connection establishes successfully (in the layer-3) but the TCP port returns non-VPN protocol data (in the layer-7), the protocol error occurs immediately even if the NAT-Traversal connection attempt is still pending. This phenomenon often occurs when the VPN Server is behind the NAT-box, and the NAT-box has a listening TCP-443 port by itself. In that condition, the VPN Client attempts to connect to that TCP-443 port firstly, and the protocol error occurs immediately NAT-box returns non-VPN protocol (e.g. HTML-based administration page).
In order to work around that, this version (Ver 4.08) of VPN Client changed the behavior. On this version, if the VPN Client detects that the destination TCP Port is occupied by a non-VPN program, then the client will always use NAT-Traversal socket. This minor change will fix the connection problem to VPN servers behind the NATs.
Note: The built-in NAT-Traversal function on SoftEther VPN is for temporary use only. It is not recommended to keep using UDP-based NAT-Traversal connection to beyond the NAT-box when the VPN Server is behind the NAT-box, for long-term use. It is reported that some cheap NAT-boxes disconnect UDP session in regular period (a few minutes) after NAT-Traversal connection has been made. The strongly recommended method to run VPN Server behind the NAT is to make a TCP port mapping on the NAT-box to transfer incoming VPN connection packets (e.g. TCP port 443) to the private IP address of the VPN Server.
SoftEther VPN 4.07 Build 9448 (June 6, 2014)
We updated the internal OpenSSL to 0.9.8za.
This fixes the latest OpenSSL vulnerability which has unfold on June 05.
This vulnerability does not affect on SoftEther VPN. However, we updated the SoftEther VPN build with OpenSSL 0.9.8za. The new build also includes additional improvements.
More details about this OpenVPN vulnerability is described at http://www.openssl.org/news/secadv_20140605.txt.
Other updates on this build are as followings:
The problem with OpenVPN Connect for Android 1.1.14 has been fixed. In the previous versions, OpenVPN Connect for Android 1.1.14 reports "PolarSSL Error" when it connects to the SoftEther VPN Server, if the server SSL certificate is self-signed root certificate. This X.509 certificate parsing problem is OpenVPN Connect's bug, however we performed work around for this OpenVPN Connect's bug. Please mind that you need to regenerate your self-signed root certificate in order to comply with OpenVPN Connect at once after upgrading the VPN Server to this version. To regenerate the certificate, use the GUI tool on VPN Server Manager, or execute the "ServerCertRegenerate" command on vpncmd.
The automated root certificate and intermediate certificates downloading function has been implemented. It is very helpful when you use a commercial certificate which has been issued by a commercial CA (Certificate Authority), including VeriSign, GlobalSign or RapidSSL. In previous versions, you had to install the root certificate and intermediate certificates manually into the "chain_certs" directory. On this version, you do not need any longer to do such a manual installation of chained certs.
The OpenVPN configuration file generating function identifies the root certificate correctly, in order to embed it as the "<ca>" inline directive in the auto-generated OpenVPN configuration file. It is very helpful if you are using a commercial certificate which has been issued by a commercial CA (Certificate Authority), including VeriSign, GlobalSign or RapidSSL. (In previous versions, you had to perform the editing task for the OpenVPN configuration file manually.)
UI typos have been fixed, and some minor bugs have been fixed.
SoftEther VPN 4.06 Build 9435 (Beta) (March 26, 2014)
Previous versions of VPN Client have a port-confliction problem of the TCP port (TCP 9930) for RPC (Remote Procedure Call) on the VPN Client service for Windows, if the same port is occupied by another service. This version has solved the confliction problem.
SoftEther VPN 4.06 Build 9433 (Beta) (March 21, 2014)
Fixed a crashing bug on NAT-Traversal connections.
We sincerely apologize that the SoftEther VPN Server of the last build (Build 9432) has a serious crashing bug if a VPN client connects to the VPN Server in the NAT Traversal mode, in UNIX system. This serious bug was caused by the problem of the processing of Unicode string (which is used by a warning message for NAT Traversal connections). We fixed the serious bug by this Build 9433. If you are using SoftEther VPN Server Build 9430 or 9432 in UNIX, please update it to Build 9433 as soon as possible.
SoftEther VPN 4.06 Build 9432 (Beta) (March 20, 2014)
We apologize that the previous build (Build 9430) has a problem that the RSA certificate authentication doesn't work.
This build has been fixed the problem. Please use Build 9432 if you are intending to use the RSA certificate authentication function.
SoftEther VPN 4.06 Build 9430 (Beta) (March 20, 2014)
Thank you for waiting!
Added the following five advanced functions into SoftEther VPN Server (experimental) :
- RADIUS / NT Domain user authentication function
- RSA certificate user authentication function
- Deep-inspect packet logging function
- Source IP address control list function
- syslog transfer function
Added the split-tunneling function (experimental) :
- Split tunneling is the function for enterprises to allow users communicate only to the specified IPv4 subnets through a VPN tunnel.
- You can set up either SecureNAT Virtual DHCP Server or any external DHCP server to push static routing tables to all VPN clients.
- The Virtual DHCP Server function in SecureNAT now supports classless static routing table pushing option (RFC 3442).
- All types of VPN clients (SoftEther VPN Client, OpenVPN Client, L2TP/IPsec client and MS-SSTP client) can receive the static routing table pushed.
Added the function which allows the VPN server administrator to obtain the DDNS private key on the DDNS setup dialog-box.
Improved the behavior of the Privacy Filter Mode security policy. In the previous versions, a VPN session which is enabled the Privacy Filter Mode option cannot transmit any packets toward other Privacy Filter Mode enabled VPN sessions, except broadcast packets and ARP packets. On or after this version, both broadcast packets and ARP packets will also be blocked by the Privacy Filter Mode policy to eliminate the broadcast traffics. For the backward compatibility, this behavior can be changed by the "DropBroadcastsInPrivacyFilterMode" and "DropArpInPrivacyFilterMode" bool options on the Virtual Hub Extended Options.
Added the generating function of X.509 v3 certificates with the SHA-2 (SHA-256) hashing algorithm to improve the security.
According to the users reports, on very minor Linux environment, the "vpnserver stop" shutdown operation sometimes hangs up. The SoftEther VPN Project hasn't reproduce the issue yet. However, we added the fail-safe code to run "killall -KILL vpnserver" after the process shutdown operation times out (90 seconds).
Added the option to disable the NAT Traversal tunneling function on the connection settings screen in VPN Client and Cascade Connection.
Added Several Fixes for OS X.
Added Improved Simplified Chinese UI resources.
Added Workaround for when vpnserver hangs on stop on minor Linux environments.
On VPN Servers in People's Republic of China, the above five functions are currently disabled by default, under the orders from Beijing. Although Chinese users can enable these functions manually, Enterprise users in People's Republic of China are recommended to use these enterprise functions with PacketiX VPN Server 4.0 Chinese Edition.
SoftEther VPN 4.05 Build 9423 (Beta) (February 18, 2014)
Added Files for building CentOS/RHEL RPM.
Set the "VPN over DNS" and "VPN over ICMP" functions disabled by default on VPN Server / VPN Bridge.
SoftEther VPN 4.05 Build 9422 (Beta) (February 17, 2014)
Added the supporting of /hostname and /password command-line arguments on VPN Client.
Added the NSDI 6.x Lightweight Helper Kernel-mode Module for the local-bridge function. This kernel-mode driver runs only on Windows 8.1 / Windows Server 2012 R2 or later.
SoftEther VPN 4.05 Build 9416 (Beta) (February 6, 2014)
Added the support for OpenBSD on the source code.
Added the debian packaging on the source code.
Added the adminip.txt CIDR support.
Added the supporting VLAN for Mac OS X using TunTapOSX.
Added the .zip package with vpnsmgr.exe and vpncmd.exe for system administrators.
SoftEther VPN 4.04 Build 9412 (January 15, 2014)
Whole English UI texts are checked and corrected by a native speaker of English. Fixed typos.
SoftEther VPN 4.03 Build 9411 (January 7, 2014)
Modified the source-code tree. In the build 9408, some C# build-utility source codes were missing. In this build, full set of all source codes including the BuildUtil program are appended. No functional differences between this build and the last build.
SoftEther VPN 4.03 Build 9408 (January 4, 2014)
SoftEther VPN became open source software from this build. More details on this page. Note that the major version 3.xx was skipped for internal reason of our project. So this open-sourced new version starts with major version 4.xx.
SoftEther VPN 2.00 Build 9387 (September 16, 2013)
This build realizes the compatibility with Microsoft Windows 8.1 and Windows Server 2012 R2 (RTM). This build supports Windows 8.1 and Windows Server 2012 R2 officially. This build fixes the former problem when the user upgrades from Windows 8 to Windows 8.1 by upgrade installation.
The major version number of SoftEther VPN was incremented on this build.
SoftEther VPN 1.01 Build 9379 RTM (August 18, 2013)
This security update is to strengthen the security of SoftEther VPN 1.0 (Server and Bridge).
There is a remote administration function on SoftEther VPN 1.0. The function is to allow administrators to connect to the VPN server remotely to manage the server. In older versions, a third person can login to the VPN Server in the Virtual Hub Administration Mode if the administrator has forgot to set the administrator's password on a Virtual Hub. Older versions are also safe if any strong password is set on the Virtual Hub. However we suppose that there are some administrators who have forgot to set passwords for Virtual Hubs. In order to protect such potential vulnerable servers, this security update strengthens the VPN server program to deny all empty (not set) passwords on the Virtual Hub Administration Mode. Your VPN server has been safe also in older versions if you set any passwords for Virtual Hubs. However, we strongly recommend to apply this update program to all VPN server administrators who might have potential empty passwords on Virtual Hubs.
SoftEther VPN 1.00 Build 9376, 9377 RTM (August 3, 2013)
This is a minor fix.
Improvement Stability of NAT Traversal.
Add HTTP User-Agent Indication Behavior when using VPN Gate Client.
SoftEther VPN 1.00 Build 9371 RTM (July 25, 2013)
This is the RTM version of SoftEther VPN 1.0. It is not a BETA version.
We have fixed a lot of bugs in former builds. This RTM build is a stable build for everyone.
We will continue to improve features and performances on SoftEther VPN hereafter.
SoftEther VPN 1.00 Build 9367 RC4 (July 21, 2013)
This should be the final beta release before the RTM version of SoftEther VPN 1.0.
SoftEther VPN 1.00 Build 9091 RC3 (May 19, 2013)
We released RC3 with the following improvements. RC3 should be the final release candidate before the GA (Generally Available) build.
- Fixed a crush bug which might occurred during the shutdown of vpnserver process with using L2TPv3 or EtherIP over IPsec.
- The statistics of cumulative transferred-bytes and packets-counter are appended on the list of Visual Hubs and on the list of User Objects on each Virtual Hub, on VPN Server Manager and vpncmd.
- On the list of User Objects enumeration in both VPN Server Manager and vpncmd, the expire-date of each User Object are appended on the displayed list.
- Improvements of stability of Dynamic DNS Function and NAT-Traversal Function.
SoftEther VPN 1.00 Build 9079 RC2 Fix17 (May 5, 2013)
Fixed a typo. Fixed a wrong bitmap image on the installer.
SoftEther VPN 1.00 Build 9078 RC2 Fix16 (April 28, 2013)
A security fix. The previous versions have ignored the "deny_empty_password" option in the Virtual Hub Administration Options List. This build fixed this security bug.
Fixed some minor bugs.
Improvement of the respond-time on IPv6 DNS name resolver.
SoftEther VPN 1.00 Build 9074 RC2 Fix15 (April 24, 2013)
Minor improvement around the Dynamic DNS Client function.
SoftEther VPN 1.00 Build 9071 RC2 Fix14 (April 20, 2013)
Fixed a minor timeout bug.
SoftEther VPN 1.00 Build 9070 RC2 Fix13 (April 18, 2013)
Enabled advanced security check routines for butter overflow (Win32 binaries only.)
File sizes have been increased a little, but the performance wasn't affected.
SoftEther VPN 1.00 Build 9069 RC2 Fix12 (April 17, 2013)
Fixed a minor bug on SSL packet processing.
Fixed a miror bug on TCP listener. (very rare crash)
SoftEther VPN 1.00 Build 9053 RC2 Fix11 (April 8, 2013)
Fixed a minor bug on UDP packet processing.
Added a new feature: IKE and OpenVPN (in UDP packets) Packet Logging Function.
SoftEther VPN 1.00 Build 9045 RC2 Fix10 (April 2, 2013)
Fixed a minor bug, and improved the stability.
SoftEther VPN 1.00 Build 9043 RC2 Fix9 (April 1, 2013)
Fixed a critical bug was in the HTTP packet parser.
Improvement of the stability of UDP-based communication.
Fixed a problem: SecureNAT's connectivity polling packet interval was too short.
SoftEther VPN 1.00 Build 9035 RC2 Fix8 (March 26, 2013)
Fixed a crash bug: While you are changing the X.509 server certificate, if a new SSL-VPN connection is being made, the new connection attempt will cause the crash because lack of critical section locking. However this bug was very rare. We found it in the heavy stress test.
SoftEther VPN 1.00 Build 9033 RC2 Fix7 (March 22, 2013)
Fixed a minor bug.
SoftEther VPN 1.00 Build 9030 RC2 Fix6 (March 21, 2013)
Fixed a bug: A logged error message around the L2TP/SSTP/OpenVPN user-authentication was incorrect.
SoftEther VPN 1.00 Build 9029 RC2 Fix5 (March 17, 2013)
Fixed a minor bug and typo.
SoftEther VPN 1.00 Build 9027 RC2 Fix4 (March 12, 2013)
Fixed a minor bug.
SoftEther VPN 1.00 Build 9026 RC2 Fix3 (March 10, 2013)
Fixed a bug: the timeout to the DDNS server was too small.
SoftEther VPN 1.00 Build 9024 RC2 Fix2 (March 09, 2013)
Fixed a bug: On Windows, VPN over DNS could not be enabled.
SoftEther VPN 1.00 Build 9023 RC2 Fix1 (March 08, 2013)
Fixed a minor bug.
SoftEther VPN 1.00 Build 9022 RC2 (March 08, 2013)
The initial release.

104
ContainerREADME.md Normal file
View File

@ -0,0 +1,104 @@
# SoftetherVPN Container images
This container is designed to be as small as possible and host a SoftEther VPN Server, Bridge or Client.
It´s based on Alpine so resulting Image is kept as small as 15MB!
## Not working
* bridging to a physical Ethernet adapter
## working
* OpenVPN
* L2tp
* SSL
* SecureNAT
* Wireguard (not with the "stable" tag)
## Available Tags
|Image|Description|
|---|---|
|softethervpn/vpnserver:stable|Latest stable release from https://github.com/SoftEtherVPN/SoftEtherVPN_Stable|
|softethervpn/vpnserver:v4.39-9772-beta|Tagged build|
|softethervpn/vpnserver:latest|Latest commits from https://github.com/SoftEtherVPN/SoftEtherVPN|
You should always specify your wanted version like `softethervpn/vpnserver:5.02.5180`
## Usage docker run
This will keep your config and Logfiles in the docker volume `softetherdata`
`docker run -d --rm --name softether-vpn-server -v softetherdata:/var/lib/softether -v softetherlogs:/var/log/softether -p 443:443/tcp -p 992:992/tcp -p 1194:1194/udp -p 5555:5555/tcp -p 500:500/udp -p 4500:4500/udp -p 1701:1701/udp --cap-add NET_ADMIN softethervpn/vpnserver:stable`
## Port requirements
As there are different operating modes for SoftetherVPN there is a variety of ports that might or might not be needed.
For operation with Softether Clients at least 443, 992 or 5555 is needed.
See https://www.softether.org/4-docs/1-manual/1/1.6 for reference on the Softether ports.
Others are commented out in the docker-compose example.
## Usage docker-compose
The same command can be achieved by docker-compose, the docker compose file is in the repository.
You can specify the respective docker-compose.yaml like so:
`docker-compose -f docker-compose.vpnclient.yaml up -d`
By default the docker-compose.yaml is used:
```
version: '3'
services:
softether:
image: softethervpn/vpnserver:latest
cap_add:
- NET_ADMIN
restart: always
ports:
#- 53:53 #DNS tunneling
- 443:443 #Management and HTTPS tunneling
#- 992:992 #HTTPS tunneling
#- 1194:1194/udp #OpenVPN
#- 5555:5555 #HTTPS tunneling
#- 500:500/udp #IPsec/L2TP
#- 4500:4500/udp #IPsec/L2TP
#- 1701:1701/udp #IPsec/L2TP
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "/etc/timezone:/etc/timezone:ro"
- "./softether_data:/var/lib/softether"
- "./softether_log:/var/log/softether"
# - "./adminip.txt:/var/lib/softether/adminip.txt:ro"
```
### Use vpncmd
With newer releases vpncmd is directly in the container so you can use it to configure vpn. You can can run it once the container is running :
`docker exec -it softether-vpn-server vpncmd localhost`
example to configure a vpnclient
```
docker exec -it softether-vpn-server vpncmd localhost /client
VPN Client> AccountSet homevpn /SERVER:192.168.1.1:443 /HUB:VPN
VPN Client> AccountPasswordSet homevpn /PASSWORD:verysecurepassword /TYPE:standard
VPN Client> AccountConnect homevpn
#Automatically connect once container starts
VPN Client> AccountStartupSet homevpn
#Checking State
VPN Client> AccountStatusGet homevpn
```
## Building
` docker build --target vpnclient -t softethevpn:latest .`

Binary file not shown.

51
Dockerfile Normal file
View File

@ -0,0 +1,51 @@
FROM alpine AS builder
RUN mkdir /usr/local/src && apk add binutils --no-cache\
linux-headers \
build-base \
readline-dev \
openssl-dev \
ncurses-dev \
git \
cmake \
zlib-dev \
libsodium-dev \
gnu-libiconv
ENV LD_PRELOAD=/usr/lib/preloadable_libiconv.so
ADD ./ /usr/local/src/SoftEtherVPN/
WORKDIR /usr/local/src
ENV USE_MUSL=YES
ENV CMAKE_FLAGS="-DSE_PIDDIR=/run/softether -DSE_LOGDIR=/var/log/softether -DSE_DBDIR=/var/lib/softether"
RUN cd SoftEtherVPN &&\
./configure &&\
make -j $(getconf _NPROCESSORS_ONLN) -C build
FROM alpine AS base
RUN apk add --no-cache readline \
openssl \
libsodium \
gnu-libiconv \
iptables
ENV LD_PRELOAD=/usr/lib/preloadable_libiconv.so
WORKDIR /usr/local/bin
VOLUME /var/log/softether
VOLUME /var/lib/softether
VOLUME /run/softether
COPY --from=builder /usr/local/src/SoftEtherVPN/build/vpncmd /usr/local/src/SoftEtherVPN/build/hamcore.se2 ./
COPY --from=builder /usr/local/src/SoftEtherVPN/build/libcedar.so /usr/local/src/SoftEtherVPN/build/libmayaqua.so /usr/local/lib/
FROM base AS vpnserver
COPY --from=builder /usr/local/src/SoftEtherVPN/build/vpnserver ./
EXPOSE 443/tcp 992/tcp 1194/tcp 1194/udp 5555/tcp 500/udp 4500/udp
CMD ["/usr/local/bin/vpnserver", "execsvc"]
FROM base AS vpnclient
COPY --from=builder /usr/local/src/SoftEtherVPN/build/vpnclient ./
CMD ["/usr/local/bin/vpnclient", "execsvc"]
FROM base AS vpnbridge
COPY --from=builder /usr/local/src/SoftEtherVPN/build/vpnbridge ./
CMD ["/usr/local/bin/vpnbridge", "execsvc"]

1
FUNDING.yml Normal file
View File

@ -0,0 +1 @@
liberapay: softether

487
LICENSE
View File

@ -1,31 +1,200 @@
SoftEther VPN Server, Client and Bridge are free software, and released as
open-source. You can redistribute them and/or modify them under the terms of
the GNU General Public License version 2 as published by the Free Software
Foundation.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Copyright (c) Daiyuu Nobori.
Copyright (c) SoftEther Project at University of Tsukuba, Japan.
Copyright (c) SoftEther Corporation.
All Rights Reserved.
http://www.softether.org/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License version 2 as published by the Free
Software Foundation.
1. Definitions.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
You should have received a copy of the GNU General Public License version 2
along with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
Neither the name of SoftEther nor the names of its contributors may be used to
endorse or promote products derived from this software without specific prior
written permission.
"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
Copyright (c) all contributors on SoftEther VPN project in GitHub.
Copyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation.
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.
DISCLAIMER
==========
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
@ -67,278 +236,6 @@ LIABLE TO RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL
RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT JUST A
STATEMENT FOR WARNING AND DISCLAIMER.
THE FOLLOWING GPLV2 CONDITIONS APPLY ON ALL SOFTETHER VPN PROGRAMS WHICH ARE
DEVELOPED BY SOFTETHER VPN PROJECT.
READ AND UNDERSTAND THE 'src/WARNING.TXT' FILE BEFORE USING THIS SOFTWARE.
SOME SOFTWARE PROGRAMS FROM THIRD PARTIES ARE INCLUDED ON THIS SOFTWARE WITH
LICENSE CONDITIONS WHICH ARE DESCRIBED ON THE 'src/THIRD_PARTY.TXT' FILE.
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your freedom to
share and change it. By contrast, the GNU General Public License is intended
to guarantee your freedom to share and change free software--to make sure the
software is free for all its users. This General Public License applies to
most of the Free Software Foundation's software and to any other program whose
authors commit to using it. (Some other Free Software Foundation software is
covered by the GNU Lesser General Public License instead.) You can apply it
to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our
General Public Licenses are designed to make sure that you have the freedom to
distribute copies of free software (and charge for this service if you wish),
that you receive source code or can get it if you want it, that you can change
the software or use pieces of it in new free programs; and that you know you
can do these things.
To protect your rights, we need to make restrictions that forbid anyone to
deny you these rights or to ask you to surrender the rights. These
restrictions translate to certain responsibilities for you if you distribute
copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or
for a fee, you must give the recipients all the rights that you have. You
must make sure that they, too, receive or can get the source code. And you
must show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2)
offer you this license which gives you legal permission to copy, distribute
and/or modify the software.
Also, for each author's protection and ours, we want to make certain that
everyone understands that there is no warranty for this free software. If the
software is modified by someone else and passed on, we want its recipients to
know that what they have is not the original, so that any problems introduced
by others will not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We
wish to avoid the danger that redistributors of a free program will
individually obtain patent licenses, in effect making the program proprietary.
To prevent this, we have made it clear that any patent must be licensed for
everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification
follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains a notice
placed by the copyright holder saying it may be distributed under the terms of
this General Public License. The "Program", below, refers to any such program
or work, and a "work based on the Program" means either the Program or any
derivative work under copyright law: that is to say, a work containing the
Program or a portion of it, either verbatim or with modifications and/or
translated into another language. (Hereinafter, translation is included
without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not covered
by this License; they are outside its scope. The act of running the Program
is not restricted, and the output from the Program is covered only if its
contents constitute a work based on the Program (independent of having been
made by running the Program). Whether that is true depends on what the Program
does.
1. You may copy and distribute verbatim copies of the Program's source code
as you receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice and
disclaimer of warranty; keep intact all the notices that refer to this License
and to the absence of any warranty; and give any other recipients of the
Program a copy of this License along with the Program.
You may charge a fee for the physical act of transferring a copy, and you may
at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion of it,
thus forming a work based on the Program, and copy and distribute such
modifications or work under the terms of Section 1 above, provided that you
also meet all of these conditions:
a) You must cause the modified files to carry prominent notices stating
that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in whole
or in part contains or is derived from the Program or any part thereof, to be
licensed as a whole at no charge to all third parties under the terms of this
License.
c) If the modified program normally reads commands interactively when run,
you must cause it, when started running for such interactive use in the most
ordinary way, to print or display an announcement including an appropriate
copyright notice and a notice that there is no warranty (or else, saying that
you provide a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this License.
(Exception: if the Program itself is interactive but does not normally print
such an announcement, your work based on the Program is not required to print
an announcement.)
These requirements apply to the modified work as a whole. If identifiable
sections of that work are not derived from the Program, and can be reasonably
considered independent and separate works in themselves, then this License,
and its terms, do not apply to those sections when you distribute them as
separate works. But when you distribute the same sections as part of a whole
which is a work based on the Program, the distribution of the whole must be on
the terms of this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your
rights to work written entirely by you; rather, the intent is to exercise the
right to control the distribution of derivative or collective works based on
the Program.
In addition, mere aggregation of another work not based on the Program with
the Program (or with a work based on the Program) on a volume of a storage or
distribution medium does not bring the other work under the scope of this
License.
3. You may copy and distribute the Program (or a work based on it, under
Section 2) in object code or executable form under the terms of Sections 1 and
2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable source
code, which must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three years, to
give any third party, for a charge no more than your cost of physically
performing source distribution, a complete machine-readable copy of the
corresponding source code, to be distributed under the terms of Sections 1 and
2 above on a medium customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer to
distribute corresponding source code. (This alternative is allowed only for
noncommercial distribution and only if you received the program in object code
or executable form with such an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for making
modifications to it. For an executable work, complete source code means all
the source code for all modules it contains, plus any associated interface
definition files, plus the scripts used to control compilation and
installation of the executable. However, as a special exception, the source
code distributed need not include anything that is normally distributed (in
either source or binary form) with the major components (compiler, kernel, and
so on) of the operating system on which the executable runs, unless that
component itself accompanies the executable.
If distribution of executable or object code is made by offering access to
copy from a designated place, then offering equivalent access to copy the
source code from the same place counts as distribution of the source code,
even though third parties are not compelled to copy the source along with the
object code.
4. You may not copy, modify, sublicense, or distribute the Program except as
expressly provided under this License. Any attempt otherwise to copy, modify,
sublicense or distribute the Program is void, and will automatically terminate
your rights under this License. However, parties who have received copies, or
rights, from you under this License will not have their licenses terminated so
long as such parties remain in full compliance.
5. You are not required to accept this License, since you have not signed
it. However, nothing else grants you permission to modify or distribute the
Program or its derivative works. These actions are prohibited by law if you
do not accept this License. Therefore, by modifying or distributing the
Program (or any work based on the Program), you indicate your acceptance of
this License to do so, and all its terms and conditions for copying,
distributing or modifying the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the original
licensor to copy, distribute or modify the Program subject to these terms and
conditions. You may not impose any further restrictions on the recipients'
exercise of the rights granted herein. You are not responsible for enforcing
compliance by third parties to this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or otherwise)
that contradict the conditions of this License, they do not excuse you from
the conditions of this License. If you cannot distribute so as to satisfy
simultaneously your obligations under this License and any other pertinent
obligations, then as a consequence you may not distribute the Program at all.
For example, if a patent license would not permit royalty-free redistribution
of the Program by all those who receive copies directly or indirectly through
you, then the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply and
the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or
other property right claims or to contest validity of any such claims; this
section has the sole purpose of protecting the integrity of the free software
distribution system, which is implemented by public license practices. Many
people have made generous contributions to the wide range of software
distributed through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing to
distribute software through any other system and a licensee cannot impose that
choice.
This section is intended to make thoroughly clear what is believed to be a
consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in certain
countries either by patents or by copyrighted interfaces, the original
copyright holder who places the Program under this License may add an explicit
geographical distribution limitation excluding those countries, so that
distribution is permitted only in or among countries not thus excluded. In
such case, this License incorporates the limitation as if written in the body
of this License.
9. The Free Software Foundation may publish revised and/or new versions of
the General Public License from time to time. Such new versions will be
similar in spirit to the present version, but may differ in detail to address
new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any later
version", you have the option of following the terms and conditions either of
that version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of this License,
you may choose any version ever published by the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free programs
whose distribution conditions are different, write to the author to ask for
permission. For software which is copyrighted by the Free Software
Foundation, write to the Free Software Foundation; we sometimes make
exceptions for this. Our decision will be guided by the two goals of
preserving the free status of all derivatives of our free software and of
promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE,
YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO
LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR
THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
READ AND UNDERSTAND THE 'src/WARNING.TXT' FILE BEFORE USING THIS SOFTWARE.
SOME SOFTWARE PROGRAMS FROM THIRD PARTIES ARE INCLUDED ON THIS SOFTWARE WITH
LICENSE CONDITIONS WHICH ARE DESCRIBED ON THE 'src/THIRD_PARTY.TXT' FILE.

181
README.md
View File

@ -1,21 +1,29 @@
# SoftEther VPN
[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/softethervpn/softethervpn?branch=master&svg=true)](https://ci.appveyor.com/project/softethervpn/softethervpn) [![Travis CI build status](https://travis-ci.org/SoftEtherVPN/SoftEtherVPN.svg?branch=master)](https://travis-ci.org/SoftEtherVPN/SoftEtherVPN) [![gitlab-ci build status](https://gitlab.com/SoftEther/SoftEtherVPN/badges/master/build.svg)](https://gitlab.com/SoftEther/SoftEtherVPN/pipelines) [![Coverity Scan Build Status](https://scan.coverity.com/projects/16304/badge.svg)](https://scan.coverity.com/projects/softethervpn-softethervpn)
||Badges|
|---|---|
|GitLab CI|[![GitLab CI build status](https://gitlab.com/SoftEther/SoftEtherVPN/badges/master/pipeline.svg)](https://gitlab.com/SoftEther/SoftEtherVPN/pipelines)|
|Coverity Scan|[![Coverity Scan build status](https://scan.coverity.com/projects/16304/badge.svg)](https://scan.coverity.com/projects/softethervpn-softethervpn)|
|Cirrus CI|[![Cirrus CI build status](https://api.cirrus-ci.com/github/SoftEtherVPN/SoftEtherVPN.svg)](https://cirrus-ci.com/github/SoftEtherVPN/SoftEtherVPN)|
- [SoftEther VPN](#softether-vpn)
- [BOARD MEMBERS OF THIS REPOSITORY](#board-members-of-this-repository)
- [SOFTETHER VPN ADVANTAGES](#softether-vpn-advantages)
- [Installation](#installation)
* [For Ubuntu](#for-ubuntu)
* [From binary installers:](#from-binary-installers)
* [For FreeBSD](#for-freebsd)
* [For Windows](#for-windows)
* [From binary installers (stable channel)](#from-binary-installers-stable-channel)
* [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)
- [SOURCE CODE CONTRIBUTION](#source-code-contribution)
- [DEAR SECURITY EXPERTS](#dear-security-experts)
SoftEther VPN (Developer Edition Master Repository)
- 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.
@ -24,13 +32,15 @@ Stable Edition is available on
https://github.com/SoftEtherVPN/SoftEtherVPN_Stable
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:
http://www.softether-download.com/
https://www.softether-download.com/
We accept your patches by the acceptance policy:
http://www.softether.org/5-download/src/9.patch
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) SoftEther Project at University of Tsukuba, Japan.
---
The development of SoftEther VPN was supported by the MITOH Project,
a research and development project by Japanese Government,
@ -38,10 +48,23 @@ subsidized by Ministry of Economy, Trade and Industry of Japan,
administrated by Information Promotion Agency.
https://www.ipa.go.jp/english/humandev/
---
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
![https://icons8.com](resources/icons8.png "Icons8")
[Icons8](https://icons8.com) kindly supported the project by gifting a license which allows to edit and redistribute their icons.
Please note that you are not allowed to redistribute those icons outside of this repository.
The developers of SoftEther VPN love Icons8's work and kindly ask the users to support them as much as possible.
---
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
SoftEther VPN ("SoftEther" means "Software Ethernet") is one of the
world's most powerful and easy-to-use multi-protocol VPN software.
@ -49,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 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.
More details on http://www.softether.org/.
More details on https://www.softether.org/.
# BOARD MEMBERS OF THIS REPOSITORY
@ -82,6 +105,7 @@ https://github.com/chipitsine
- Supporting all popular VPN protocols by the single VPN server:
SSL-VPN (HTTPS)
WireGuard
OpenVPN
IPsec
L2TP
@ -114,20 +138,83 @@ https://github.com/chipitsine
- No memory leaks. High quality stable codes, intended for long-term runs.
We always verify that there are no memory or resource leaks before
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
## 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
[Releases](https://github.com/SoftEtherVPN/SoftEtherVPN/releases)
[Nightly builds](https://github.com/SoftEtherVPN/SoftEtherVPN/actions/workflows/windows.yml)
(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.
## Docker Container Image
Please look at the [ContainerREADME.md](ContainerREADME.md)
## Build from Source code
see [BUILD_UNIX](src/BUILD_UNIX.md) or [BUILD_WINDOWS](src/BUILD_WINDOWS.md)
@ -137,6 +224,39 @@ There are two flavours of SoftEtherVPN source code:
1. Unstable. Found under https://github.com/SoftEtherVPN/SoftEtherVPN
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
Because SoftEther VPN is overly strong tool to build a VPN tunnel,
@ -144,22 +264,23 @@ some censorship governments want to block your access to the source code
of SoftEther VPN, by abusing their censorship firewalls.
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:
- 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)
https://gitlab.com/SoftEther/SoftEtherVPN/
https://gitlab.com/SoftEther/VPN
```
$ git clone https://gitlab.com/SoftEther/SoftEtherVPN.git
```
$ git clone https://gitlab.com/SoftEther/VPN.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!
@ -168,13 +289,11 @@ We hope that you can reach one of the above URLs at least!
Your contribution to SoftEther VPN Project is much appreciated.
Please send patches to us through GitHub.
Read the SoftEther VPN Patch Acceptance Policy in advance:
http://www.softether.org/5-download/src/9.patch
# 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
to protect a lot of users around the world as soon as possible.
@ -183,4 +302,4 @@ Our e-mail address for security reports is:
Please note that the above e-mail address is not a technical support
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
View 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)

View File

@ -0,0 +1,118 @@
import Foundation
import Network
import Security
/// SecureConnection handles the TLS connection with the SoftEther VPN server
class SecureConnection {
// MARK: - Properties
private var connection: NWConnection?
private let host: String
private let port: UInt16
private let queue = DispatchQueue(label: "com.softether.connection", qos: .userInitiated)
// MARK: - Initialization
/// Initialize a secure connection
/// - Parameters:
/// - host: Server hostname or IP address
/// - port: Server port number
init(host: String, port: UInt16) {
self.host = host
self.port = port
}
// MARK: - Public Methods
/// Connect to the server using TLS
/// - Parameter completion: Callback with connection result
func connect(completion: @escaping (Bool, Error?) -> Void) {
let hostEndpoint = NWEndpoint.Host(host)
let portEndpoint = NWEndpoint.Port(rawValue: port)!
// Create TLS parameters
let tlsOptions = NWProtocolTLS.Options()
// Configure TLS for maximum compatibility with SoftEther
let securityOptions = tlsOptions.securityProtocolOptions
sec_protocol_options_set_tls_min_version(securityOptions, .TLSv12)
sec_protocol_options_set_tls_max_version(securityOptions, .TLSv13)
// Allow all cipher suites for compatibility
sec_protocol_options_set_cipher_suites(securityOptions, nil, 0)
// Disable certificate validation for initial development (ENABLE IN PRODUCTION)
sec_protocol_options_set_verify_block(securityOptions, { (_, _, trustResult, _) in
return true // Accept all certificates for testing
}, queue)
// Create TCP options with TLS
let tcpOptions = NWProtocolTCP.Options()
tcpOptions.enableKeepalive = true
tcpOptions.keepaliveIdle = 30
// Create connection parameters
let parameters = NWParameters(tls: tlsOptions, tcp: tcpOptions)
// Create the connection
connection = NWConnection(host: hostEndpoint, port: portEndpoint, using: parameters)
// Set up state handling
connection?.stateUpdateHandler = { [weak self] state in
switch state {
case .ready:
completion(true, nil)
case .failed(let error):
self?.disconnect()
completion(false, error)
case .cancelled:
completion(false, NSError(domain: "SoftEtherError", code: 1000, userInfo: [NSLocalizedDescriptionKey: "Connection cancelled"]))
default:
break
}
}
// Start the connection
connection?.start(queue: queue)
}
/// Disconnect from the server
func disconnect() {
connection?.cancel()
connection = nil
}
/// Send data to the server
/// - Parameters:
/// - data: Data to send
/// - completion: Callback with error if any
func send(data: Data, completion: @escaping (Error?) -> Void) {
guard let connection = connection, connection.state == .ready else {
completion(NSError(domain: "SoftEtherError", code: 1001, userInfo: [NSLocalizedDescriptionKey: "Connection not ready"]))
return
}
connection.send(content: data, completion: .contentProcessed { error in
completion(error)
})
}
/// Receive data from the server
/// - Parameter completion: Callback with received data and error if any
func receive(completion: @escaping (Data?, Error?) -> Void) {
guard let connection = connection, connection.state == .ready else {
completion(nil, NSError(domain: "SoftEtherError", code: 1001, userInfo: [NSLocalizedDescriptionKey: "Connection not ready"]))
return
}
connection.receive(minimumIncompleteLength: 1, maximumLength: 65536) { data, _, isComplete, error in
completion(data, error)
if isComplete {
// Connection was closed by the peer
self.disconnect()
}
}
}
}

View File

@ -0,0 +1,90 @@
import Foundation
/// Handles the specific client signature format that SoftEther expects
class SoftEtherClientSignature {
// MARK: - Constants
private enum Constants {
static let clientBuildNumber: UInt32 = 5187
static let clientVersion: UInt32 = 5_02_0000 + clientBuildNumber
static let clientString = "SoftEther VPN Client"
static let softEtherMagic: [UInt8] = [0x5E, 0x68] // 'Se' in hex
// Protocol identification constants from SoftEther source
static let cedar = "CEDAR"
static let sessionKey = "sessionkey"
static let protocol1 = "PROTOCOL"
static let protocol2 = "PROTOCOL2"
}
// MARK: - Public Methods
/// Generate the client signature packet that identifies this client as a legitimate SoftEther VPN client
/// - Returns: Data containing the formatted client signature
static func generateSignature() -> Data {
var data = Data()
// 1. Add SoftEther magic bytes
data.append(contentsOf: Constants.softEtherMagic)
// 2. Add client version in network byte order (big endian)
data.appendUInt32(Constants.clientVersion)
// 3. Add client build number in network byte order
data.appendUInt32(Constants.clientBuildNumber)
// 4. Add cedar protocol identifier
if let cedarData = Constants.cedar.data(using: .ascii) {
data.append(cedarData)
data.append(0) // null terminator
}
// 5. Add client string with null terminator
if let clientString = (Constants.clientString + "\0").data(using: .ascii) {
data.append(clientString)
}
// 6. Add protocol identifiers
if let protocolData = (Constants.protocol1 + "\0").data(using: .ascii) {
data.append(protocolData)
}
if let protocol2Data = (Constants.protocol2 + "\0").data(using: .ascii) {
data.append(protocol2Data)
}
// 7. Add session key marker
if let sessionKeyData = (Constants.sessionKey + "\0").data(using: .ascii) {
data.append(sessionKeyData)
}
// 8. Add random data for session key (typically 20 bytes)
let randomSessionKey = SoftEtherCrypto.randomBytes(count: 20)
data.append(randomSessionKey)
// 9. Calculate and append SHA-1 hash of the entire data for integrity verification
let hash = SoftEtherCrypto.sha1(data)
data.append(hash)
return data
}
/// Verify a server response to the client signature
/// - Parameter data: Response data from server
/// - Returns: True if valid response, false otherwise
static func verifyServerResponse(_ data: Data) -> Bool {
// Basic validation - a real implementation would parse and validate the server response format
// This is a minimal check to see if we have enough data and it starts with the magic bytes
guard data.count >= 8 else {
return false
}
// Check if response starts with SoftEther magic bytes
if data[0] == Constants.softEtherMagic[0] && data[1] == Constants.softEtherMagic[1] {
return true
}
return false
}
}

View File

@ -0,0 +1,97 @@
import Foundation
import CryptoKit
/// Handles encryption operations for SoftEther protocol
class SoftEtherCrypto {
// MARK: - Constants
private enum Constants {
static let sha1Size = 20
static let md5Size = 16
}
// MARK: - Public Methods
/// Generate secure random bytes
/// - Parameter count: Number of random bytes to generate
/// - Returns: Data containing random bytes
static func randomBytes(count: Int) -> Data {
var data = Data(count: count)
_ = data.withUnsafeMutableBytes {
SecRandomCopyBytes(kSecRandomDefault, count, $0.baseAddress!)
}
return data
}
/// Calculate SHA-1 hash
/// - Parameter data: Input data
/// - Returns: SHA-1 hash of the input data
static func sha1(_ data: Data) -> Data {
let digest = SHA1.hash(data: data)
return Data(digest)
}
/// Calculate MD5 hash
/// - Parameter data: Input data
/// - Returns: MD5 hash of the input data
static func md5(_ data: Data) -> Data {
let digest = Insecure.MD5.hash(data: data)
return Data(digest)
}
/// Encrypt data using RC4 algorithm (for SoftEther compatibility)
/// - Parameters:
/// - data: Data to encrypt
/// - key: Encryption key
/// - Returns: Encrypted data
static func rc4Encrypt(data: Data, key: Data) -> Data {
let rc4 = RC4(key: key)
return rc4.process(data)
}
/// Decrypt data using RC4 algorithm (for SoftEther compatibility)
/// - Parameters:
/// - data: Data to decrypt
/// - key: Decryption key
/// - Returns: Decrypted data
static func rc4Decrypt(data: Data, key: Data) -> Data {
// RC4 is symmetric, so encryption and decryption are the same operation
return rc4Encrypt(data: data, key: key)
}
}
/// Simple RC4 implementation for SoftEther compatibility
/// Note: RC4 is considered insecure, but SoftEther uses it in parts of its protocol
private class RC4 {
private var state: [UInt8]
init(key: Data) {
state = Array(0...255)
var j: Int = 0
// Key scheduling algorithm
for i in 0..<256 {
let keyByte = key[i % key.count]
j = (j + Int(state[i]) + Int(keyByte)) & 0xFF
state.swapAt(i, j)
}
}
func process(_ data: Data) -> Data {
var result = Data(count: data.count)
var i: Int = 0
var j: Int = 0
// Generate keystream and XOR with plaintext
for k in 0..<data.count {
i = (i + 1) & 0xFF
j = (j + Int(state[i])) & 0xFF
state.swapAt(i, j)
let keyStreamByte = state[(Int(state[i]) + Int(state[j])) & 0xFF]
result[k] = data[k] ^ keyStreamByte
}
return result
}
}

View File

@ -0,0 +1,123 @@
import Foundation
/// Handles the SoftEther packet structure for communication
class SoftEtherPacket {
// MARK: - Constants
private enum PacketType: UInt32 {
case clientSignature = 0x01
case serverResponse = 0x02
case sessionRequest = 0x03
case sessionResponse = 0x04
case data = 0x05
case keepAlive = 0x06
}
private enum Constants {
static let headerSize: UInt32 = 16
static let maxPacketSize: UInt32 = 1024 * 1024 // 1MB
}
// MARK: - Properties
private var packetType: PacketType
private var packetId: UInt32
private var packetData: Data
// MARK: - Initialization
/// Initialize a packet with type, ID and data
/// - Parameters:
/// - type: Packet type
/// - id: Packet ID
/// - data: Packet payload
init(type: UInt32, id: UInt32, data: Data) {
self.packetType = PacketType(rawValue: type) ?? .data
self.packetId = id
self.packetData = data
}
/// Initialize a packet from raw data
/// - Parameter data: Raw packet data
init?(fromData data: Data) {
guard data.count >= Int(Constants.headerSize) else {
return nil
}
// Parse header
let typeValue = data.readUInt32(at: 0)
self.packetId = data.readUInt32(at: 4)
let dataSize = data.readUInt32(at: 8)
// Validate packet
guard let type = PacketType(rawValue: typeValue),
dataSize <= Constants.maxPacketSize,
data.count >= Int(Constants.headerSize + dataSize) else {
return nil
}
self.packetType = type
// Extract payload
let startIndex = Int(Constants.headerSize)
let endIndex = startIndex + Int(dataSize)
self.packetData = data.subdata(in: startIndex..<endIndex)
}
// MARK: - Public Methods
/// Serialize the packet to binary data format
/// - Returns: Serialized packet data
func serialize() -> Data {
var result = Data(capacity: Int(Constants.headerSize) + packetData.count)
// Write header
result.appendUInt32(packetType.rawValue)
result.appendUInt32(packetId)
result.appendUInt32(UInt32(packetData.count))
result.appendUInt32(0) // Reserved
// Write payload
result.append(packetData)
return result
}
/// Get the packet type
/// - Returns: Packet type
func getType() -> UInt32 {
return packetType.rawValue
}
/// Get the packet ID
/// - Returns: Packet ID
func getId() -> UInt32 {
return packetId
}
/// Get the packet payload
/// - Returns: Packet payload data
func getData() -> Data {
return packetData
}
}
// MARK: - Extensions
extension Data {
/// Read a UInt32 value from the data at specified offset
/// - Parameter offset: Offset to read from
/// - Returns: UInt32 value in big-endian order
func readUInt32(at offset: Int) -> UInt32 {
let slice = self.subdata(in: offset..<(offset + 4))
return slice.withUnsafeBytes { $0.load(as: UInt32.self).bigEndian }
}
/// Append a UInt32 value to the data in big-endian order
/// - Parameter value: UInt32 value to append
mutating func appendUInt32(_ value: UInt32) {
var bigEndian = value.bigEndian
append(UnsafeBufferPointer(start: &bigEndian, count: 1))
}
}

View File

@ -0,0 +1,184 @@
import Foundation
import Network
import Security
import CryptoKit
/// SoftEtherProtocol manages the communication between iOS client and SoftEther VPN server
class SoftEtherProtocol {
// MARK: - Properties
private var secureConnection: SecureConnection?
private var isConnected = false
private var host: String = ""
private var port: UInt16 = 443
private var nextPacketId: UInt32 = 1
// MARK: - Public Methods
/// Connect to a SoftEther VPN server
/// - Parameters:
/// - host: The server hostname or IP address
/// - port: The server port (default: 443)
/// - completion: Callback with connection result
public func connect(to host: String, port: UInt16 = 443, completion: @escaping (Bool, Error?) -> Void) {
self.host = host
self.port = port
// Create a secure connection
secureConnection = SecureConnection(host: host, port: port)
// Connect using TLS
secureConnection?.connect { [weak self] success, error in
guard let self = self, success else {
completion(false, error ?? NSError(domain: "SoftEtherError", code: 1, userInfo: [NSLocalizedDescriptionKey: "TLS connection failed"]))
return
}
// After successful TLS connection, send the client signature
self.sendClientSignature { success, error in
if success {
self.isConnected = true
}
completion(success, error)
}
}
}
/// Disconnect from the server
public func disconnect() {
secureConnection?.disconnect()
isConnected = false
}
// MARK: - Private Methods
/// Send the SoftEther client signature to identify as a legitimate client
/// - Parameter completion: Callback with result
private func sendClientSignature(completion: @escaping (Bool, Error?) -> Void) {
// Generate client signature using our specialized class
let signatureData = SoftEtherClientSignature.generateSignature()
// Create a packet with the signature data
let packetId = self.nextPacketId
self.nextPacketId += 1
let packet = SoftEtherPacket(type: 0x01, id: packetId, data: signatureData)
let packetData = packet.serialize()
print("Sending client signature packet: \(packetData.count) bytes")
// Send the packet
secureConnection?.send(data: packetData) { [weak self] error in
guard let self = self else { return }
if let error = error {
print("Error sending client signature: \(error)")
completion(false, error)
return
}
// After sending signature, wait for server response
self.receiveServerResponse { success, error in
completion(success, error)
}
}
}
/// Receive and process server response after sending signature
/// - Parameter completion: Callback with result
private func receiveServerResponse(completion: @escaping (Bool, Error?) -> Void) {
secureConnection?.receive { data, error in
if let error = error {
print("Error receiving server response: \(error)")
completion(false, error)
return
}
guard let data = data, data.count > 4 else {
let error = NSError(domain: "SoftEtherError", code: 2, userInfo: [NSLocalizedDescriptionKey: "Invalid server response"])
print("Invalid server response: insufficient data")
completion(false, error)
return
}
print("Received server response: \(data.count) bytes")
// Parse the response packet
guard let packet = SoftEtherPacket(fromData: data) else {
let error = NSError(domain: "SoftEtherError", code: 3, userInfo: [NSLocalizedDescriptionKey: "Invalid packet format"])
print("Could not parse server response packet")
completion(false, error)
return
}
// Verify the response
let packetData = packet.getData()
let isValid = SoftEtherClientSignature.verifyServerResponse(packetData)
if isValid {
print("Server accepted our client signature")
completion(true, nil)
} else {
print("Server rejected our client signature")
let error = NSError(domain: "SoftEtherError", code: 4, userInfo: [NSLocalizedDescriptionKey: "Server rejected client signature"])
completion(false, error)
}
}
}
/// Send a data packet to the server
/// - Parameters:
/// - data: Data to send
/// - completion: Callback with result
func sendData(data: Data, completion: @escaping (Bool, Error?) -> Void) {
guard isConnected else {
completion(false, NSError(domain: "SoftEtherError", code: 5, userInfo: [NSLocalizedDescriptionKey: "Not connected to server"]))
return
}
let packetId = self.nextPacketId
self.nextPacketId += 1
let packet = SoftEtherPacket(type: 0x05, id: packetId, data: data)
let packetData = packet.serialize()
secureConnection?.send(data: packetData) { error in
if let error = error {
completion(false, error)
return
}
completion(true, nil)
}
}
/// Receive data from the server
/// - Parameter completion: Callback with received data and result
func receiveData(completion: @escaping (Data?, Bool, Error?) -> Void) {
guard isConnected else {
completion(nil, false, NSError(domain: "SoftEtherError", code: 5, userInfo: [NSLocalizedDescriptionKey: "Not connected to server"]))
return
}
secureConnection?.receive { data, error in
if let error = error {
completion(nil, false, error)
return
}
guard let data = data, data.count > 4 else {
completion(nil, false, NSError(domain: "SoftEtherError", code: 2, userInfo: [NSLocalizedDescriptionKey: "Invalid server response"]))
return
}
// Parse the packet
guard let packet = SoftEtherPacket(fromData: data) else {
completion(nil, false, NSError(domain: "SoftEtherError", code: 3, userInfo: [NSLocalizedDescriptionKey: "Invalid packet format"]))
return
}
completion(packet.getData(), true, nil)
}
}
}

View File

@ -0,0 +1,149 @@
import Foundation
import UIKit
/// SoftEtherVPNClient provides a simple interface for connecting to SoftEther VPN servers
public class SoftEtherVPNClient {
// MARK: - Properties
private let protocol: SoftEtherProtocol
private var connectionState: ConnectionState = .disconnected
// MARK: - Public Types
/// Connection states for the VPN client
public enum ConnectionState {
case disconnected
case connecting
case connected
case disconnecting
case error(Error)
}
/// Connection delegate to receive state updates
public protocol ConnectionDelegate: AnyObject {
func connectionStateDidChange(_ state: ConnectionState)
}
/// Weak reference to the delegate
public weak var delegate: ConnectionDelegate?
// MARK: - Initialization
public init() {
self.protocol = SoftEtherProtocol()
}
// MARK: - Public Methods
/// Connect to a SoftEther VPN server
/// - Parameters:
/// - host: Server hostname or IP address
/// - port: Server port (default: 443)
/// - completion: Optional completion handler
public func connect(to host: String, port: UInt16 = 443, completion: ((Bool, Error?) -> Void)? = nil) {
// Update state
connectionState = .connecting
delegate?.connectionStateDidChange(connectionState)
// Connect using the protocol implementation
protocol.connect(to: host, port: port) { [weak self] success, error in
guard let self = self else { return }
if success {
self.connectionState = .connected
} else if let error = error {
self.connectionState = .error(error)
} else {
self.connectionState = .disconnected
}
self.delegate?.connectionStateDidChange(self.connectionState)
completion?(success, error)
}
}
/// Disconnect from the server
/// - Parameter completion: Optional completion handler
public func disconnect(completion: (() -> Void)? = nil) {
// Update state
connectionState = .disconnecting
delegate?.connectionStateDidChange(connectionState)
// Disconnect
protocol.disconnect()
// Update state again
connectionState = .disconnected
delegate?.connectionStateDidChange(connectionState)
completion?()
}
/// Get the current connection state
/// - Returns: Current ConnectionState
public func getConnectionState() -> ConnectionState {
return connectionState
}
/// Check if currently connected
/// - Returns: True if connected, false otherwise
public func isConnected() -> Bool {
if case .connected = connectionState {
return true
}
return false
}
// MARK: - Example Usage
/// Example showing how to use this class in a view controller
public static func exampleUsage() -> String {
return """
// In your view controller:
private let vpnClient = SoftEtherVPNClient()
override func viewDidLoad() {
super.viewDidLoad()
// Set delegate
vpnClient.delegate = self
}
@IBAction func connectButtonTapped(_ sender: UIButton) {
if vpnClient.isConnected() {
vpnClient.disconnect()
} else {
vpnClient.connect(to: "vpn.example.com") { success, error in
if !success {
print("Failed to connect: \\(error?.localizedDescription ?? "Unknown error")")
}
}
}
}
// MARK: - ConnectionDelegate
extension YourViewController: SoftEtherVPNClient.ConnectionDelegate {
func connectionStateDidChange(_ state: SoftEtherVPNClient.ConnectionState) {
switch state {
case .connected:
connectButton.setTitle("Disconnect", for: .normal)
statusLabel.text = "Connected"
case .connecting:
statusLabel.text = "Connecting..."
case .disconnecting:
statusLabel.text = "Disconnecting..."
case .disconnected:
connectButton.setTitle("Connect", for: .normal)
statusLabel.text = "Disconnected"
case .error(let error):
statusLabel.text = "Error: \\(error.localizedDescription)"
connectButton.setTitle("Connect", for: .normal)
}
}
}
"""
}
}

29
configure vendored
View File

@ -5,26 +5,28 @@ set -e
echo '---------------------------------------------------------------------'
echo 'SoftEther VPN for Unix'
echo
echo 'Copyright (c) SoftEther VPN Project at University of Tsukuba, Japan.'
echo 'Copyright (c) Daiyuu Nobori. All Rights Reserved.'
echo 'Copyright (c) all contributors on SoftEther VPN project in GitHub.'
echo 'Copyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation.'
echo
echo 'This program is free software; you can redistribute it and/or'
echo 'modify it under the terms of the GNU General Public License'
echo 'version 2 as published by the Free Software Foundation.'
echo 'Licensed under the Apache License, Version 2.0 (the License).'
echo
echo 'Read and understand README.TXT, LICENSE.TXT and WARNING.TXT before use.'
echo 'Read and understand README, LICENSE and WARNING before use.'
echo '---------------------------------------------------------------------'
echo
echo 'Welcome to the corner-cutting configure script !'
echo
if [ ! -d "tmp" ]; then
mkdir tmp
if [ ! -d "build" ]; then
mkdir build
fi
if [ ! -z ${CMAKE_FLAGS+x} ]; then
CMAKE_FLAGS="${CMAKE_FLAGS}"
fi
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
if [ -z ${OPENSSL_ROOT_DIR} ]; then
@ -35,7 +37,10 @@ if [ -z ${OPENSSL_ROOT_DIR} ]; then
fi
fi
if [ -x "$(command -v rpm)" ]; then
if [ ! -z ${CPACK_GENERATOR+x} ]; then
echo "CPACK_GENERATOR is set, CPack will generate ${CPACK_GENERATOR} packages."
CMAKE_FLAGS="-DCPACK_GENERATOR=${CPACK_GENERATOR} ${CMAKE_FLAGS}"
elif [ -x "$(command -v rpm)" ]; then
echo "'rpm' executable found, CPack will generate RPM packages."
CMAKE_FLAGS="-DCPACK_GENERATOR='RPM' ${CMAKE_FLAGS}"
else
@ -45,9 +50,9 @@ fi
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 "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."

View File

@ -3,25 +3,21 @@
echo ---------------------------------------------------------------------
echo SoftEther VPN for Windows
echo.
echo Copyright (c) SoftEther VPN Project at University of Tsukuba, Japan.
echo Copyright (c) Daiyuu Nobori. All Rights Reserved.
echo Copyright (c) all contributors on SoftEther VPN project in GitHub.
echo Copyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation.
echo.
echo This program is free software; you can redistribute it and/or
echo modify it under the terms of the GNU General Public License
echo version 2 as published by the Free Software Foundation.
echo.
echo Read and understand README.TXT, LICENSE.TXT and WARNING.TXT before use.
echo Read and understand README, LICENSE and WARNING before use.
echo ---------------------------------------------------------------------
echo.
echo Welcome to the corner-cutting configure script !
echo.
if not exist "tmp" (
mkdir tmp
if not exist "build" (
mkdir build
)
cd tmp
cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -G "NMake Makefiles" ..
@ -30,4 +26,5 @@ if %errorlevel% == 0 (
echo The Makefile is generated. Run 'nmake' to build SoftEther VPN.
) else (
cd ..
exit /b 1
)

View File

@ -2,4 +2,4 @@ SoftEther VPN ("SoftEther" means "Software Ethernet") is an open-source cross-pl
Its protocol is very fast and it can be used in very restricted environments, as it's able to transfer packets over DNS and ICMP.
The server includes a free Dynamic DNS service, which can be used to access the server even if the public IP address changes.
A NAT-Traversal function is also available, very useful in case the required ports cannot be opened on the firewall.
The supported third party protocols are OpenVPN, L2TP/IPSec and SSTP.
The supported third party protocols are OpenVPN, L2TP/IPSec, SSTP and WireGuard.

View File

@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

View 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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -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;
}
}
}

View File

@ -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();
}
}

View File

@ -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>

View File

@ -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

View 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/

View File

@ -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.

View File

@ -0,0 +1,5 @@
npm install
npm run build
npm publish

View File

@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=sample.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"sample.d.ts","sourceRoot":"","sources":["../src/sample.ts"],"names":[],"mappings":""}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View 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
}
}
}

View File

@ -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

View File

@ -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"
]
}

View File

@ -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

View 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

File diff suppressed because it is too large Load Diff

View 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);
}
}
}

View File

@ -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();
}
}

View File

@ -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>

View File

@ -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

View 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.
***

View File

@ -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>

View 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

View File

@ -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__

View File

@ -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

View File

@ -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>

View File

@ -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

View File

@ -0,0 +1,16 @@
version: '3'
services:
softether:
image: softethervpn/vpnclient:latest
devices:
- /dev/net/tun:/dev/net/tun
cap_add:
- NET_ADMIN
restart: always
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "/etc/timezone:/etc/timezone:ro"
- "./softether_data:/var/lib/softether"
- "./softether_log:/var/log/softether"
# - "./adminip.txt:/var/lib/softether/adminip.txt:ro"

22
docker-compose.yaml Normal file
View File

@ -0,0 +1,22 @@
services:
softether:
image: softethervpn/vpnserver:latest
hostname: softethervpnserver
cap_add:
- NET_ADMIN
restart: always
ports:
#- 53:53 #DNS tunneling
- 443:443 #Management and HTTPS tunneling
- 992:992 #HTTPS tunneling
#- 1194:1194/udp #OpenVPN
#- 5555:5555 #HTTPS tunneling
#- 500:500/udp #IPsec/L2TP
#- 4500:4500/udp #IPsec/L2TP
#- 1701:1701/udp #IPsec/L2TP
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "/etc/timezone:/etc/timezone:ro"
- "./softether_data:/var/lib/softether"
- "./softether_log:/var/log/softether"
# - "./adminip.txt:/var/lib/softether/adminip.txt:ro"

Some files were not shown because too many files have changed in this diff Show More