1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-23 01:49:53 +03:00
Commit Graph

613 Commits

Author SHA1 Message Date
Yihong Wu
e81ecbb0ec Support EAP auth with RADIUS server for SEVPN 2023-02-24 13:05:34 +00:00
Yihong Wu
1741dfdccc Cedar/Proto_PPP: Fix radius authentication 2023-02-23 13:03:10 +00:00
Evengard
c67d9ee201 Fixing up coverity report flags from #1760 and #1761 2023-02-04 17:47:20 +03: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
6ce91e9c81 Cedar/IPC: Change IPv6 router lookup to non-blocking
Fix #1755
2023-01-31 05:20:40 +00:00
Yihong Wu
43aaca509d
Cedar/Proto_PPP: Fix memory leak 2023-01-30 20:24:45 +09:00
Yihong Wu
0cdf0eacbf Cedar/IPC: Improve IPv6CP configuration 2023-01-28 09:05:28 +00: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
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
Koichiro IWAO
e2ad7d5e8f Fix wrong shortcut key assignment
Fixes #1702.
2022-11-17 16:11:30 +09: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
dc5da0c6a9 Zero out protocol strings when reconnecting 2022-09-13 19:14:33 +09: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
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
e74d9dec25
Merge pull request #1593 from domosekai/cm 2022-05-26 12:54:09 +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
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
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
c8dca265b4
Merge pull request #1576 from domosekai/ipv6
Fix IPv6 ND for Windows 11 PPP clients
2022-04-27 20:37:25 +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
a742e2d193 Fix IPv6 ND for Windows 11 PPP clients 2022-04-08 00:37:38 +08:00
Yihong Wu
d86cf181bf Fix UDP bulk v2 and protocol display 2022-03-20 16:48:15 +08:00
Daiyuu Nobori
32a970f976 Admin.c: Fix wrong endianness in InRpcNodeInfo() and OutRpcNodeInfo() 2022-02-22 19:38:34 +01:00
H William Welliver
fd92c754fc Add missing headers required for solaris/illumos 2022-01-06 23:06:36 -05: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
weidi
3c7d78a1bf
Merge branch 'SoftEtherVPN:master' into master 2021-12-26 11:51:55 +01: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
Johannes Weidacher
f1b464e84d fix alpine compile issue. 2021-12-25 21:22:06 +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
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
Yihong Wu
77ee848caa Cedar/SM.c: Fix pointer usage before initialization 2021-12-23 17:23:15 +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
14f5854ecf Fix IPv6 address display in session info dialog 2021-12-07 15:48:32 +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
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
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
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
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
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
Yihong Wu
82af38c482 Cedar/Protocol.c: Fix connection to server clusters 2021-09-18 08:06:10 +00:00
Steve Muskiewicz
472dde05de apply permission fix suggested by @hornos (for #1457) 2021-08-19 08:14:50 -04: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
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
ce0591d924 Add IPv6 route management for Windows client 2021-08-02 16:18:36 +08: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
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
domosekai
7863ce8a8e Cedar/IPC.c: Add hub release in NewIPC() 2021-07-12 08:37:12 +00:00
Ilya Shipitsin
7881f8657a
Merge pull request #1420 from domosekai/eap
Implement EAP-MSCHAPv2
2021-07-10 23:27:10 +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
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
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
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
f6adcd6bfc Cedar/Connection.c: Fix buffer overflow when inserting NAT-T information 2021-07-04 05:53:24 +00: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
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
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
domosekai
682052e0dc Cedar/Proto_PPP: Fix EAP-TLS fragmentation 2021-06-17 11:34:09 +00:00
domosekai
8c12e79448 Cedar/Proto_PPP: Fix EAP identifier duplication 2021-05-26 09:26:22 +00:00
Davide Beatrici
81c71d309a Read hamcore.se2 using libhamcore, set arbitrary path through HAMCORE_FILE_PATH 2021-05-26 07:44:45 +02:00
sl077
f9a1d72ce7 Fix IPv6 Neighbor Discovery for PPP based protocols 2021-05-09 13:55:31 +02: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
domosekai
cca769e2e6 Cedar/IPC: Fix MAC address for IPv4 multicast 2021-04-24 01:46:31 +00: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
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
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
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
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
a6ba9b8788 Include headers properly 2021-04-05 04:48:25 +02:00
Davide Beatrici
5cab279a8c Cedar, Mayaqua: Set minimum Windows version to Vista 2021-04-03 02:25:19 +02: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