1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-07-06 15:54:57 +03:00

24 Commits

Author SHA1 Message Date
89e52b7eef Merge aeb9330ddb into 4fe5352931 2024-06-11 02:21:24 -04:00
4fe5352931 Merge pull request #2007 from metalefty/freebsd-ci
CI: Update to FreeBSD 14.0-RELEASE
2024-06-09 17:23:48 +02:00
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
bfaff4fdb0 Merge pull request #1994 from hiura2023/master
Fix Virtual DHCP Server: Correct IP reassignment
2024-05-27 13:13:40 +02:00
08213b7f0e CHANGE ERROR HANDLER FOR SSL ERROR: Change of indent 2024-05-26 23:50:05 +09:00
98852b77d9 CHANGE ERROR HANDLER FOR SSL ERROR: 2024-05-26 23:36:21 +09:00
aeb9330ddb Merge branch 'SoftEtherVPN:master' into master 2024-05-23 10:24:18 +03:00
645a078f8e Merge pull request #2003 from djony/master
Minor russian traslation update
2024-05-22 18:40:57 +02:00
af2196468a Update strtable_ru.stb 2024-05-22 17:40:11 +03:00
42647480b0 Update strtable_ru.stb 2024-05-22 17:02:03 +03:00
60496ac7fb Merge branch 'SoftEtherVPN:master' into master 2024-05-22 16:26:44 +03:00
315ffffeec Merge pull request #2001 from chipitsine/ci_drop_macos_11
CI: drop macos-11
2024-05-20 23:37:52 +02:00
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
5a88b34ddb Fix Virtual DHCP Server: Correct IP reassignment 2024-05-08 10:55:00 +09:00
48b536d732 Merge branch 'SoftEtherVPN:master' into master 2024-05-04 23:56:01 +03:00
7006539732 Merge pull request #1992 from chipitsine/macos_14
CI: add macos-14
2024-05-04 22:16:00 +02:00
3087e03e0c Merge branch 'SoftEtherVPN:master' into master 2024-05-04 23:13:38 +03:00
8ad34b2012 Merge pull request #1991 from chipitsine/master
bump version for upcoming 5185 release
2024-05-04 22:04:21 +02:00
186d48fba2 CI: add macos-14 2024-05-04 21:25:39 +02:00
37231ac006 bump version for upcoming 5185 release 2024-05-04 21:23:00 +02:00
619ca3d915 Merge branch 'SoftEtherVPN:master' into master 2024-05-03 16:08:16 +03:00
36c018b1d9 fixed wrong counter modifying 2024-04-24 14:17:35 +03:00
5e63124bb5 Update strtable_ru.stb 2023-08-27 22:20:11 +03:00
716ae59f1f Update strtable_ru.stb 2023-08-27 22:11:51 +03:00
8 changed files with 84 additions and 69 deletions

View File

@ -11,7 +11,7 @@ FreeBSD_task:
SSL:
matrix:
freebsd_instance:
image_family: freebsd-13-2
image_family: freebsd-14-0
prepare_script:
- pkg install -y pkgconf cmake git libsodium $SSL
- git submodule update --init --recursive

View File

@ -7,7 +7,7 @@ jobs:
build_and_test:
strategy:
matrix:
os: [macos-13, macos-12, macos-11]
os: [macos-14, macos-13, macos-12]
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:

View File

@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.10)
set(BUILD_NUMBER CACHE STRING "The number of the current build.")
if ("${BUILD_NUMBER}" STREQUAL "")
set(BUILD_NUMBER "5184")
set(BUILD_NUMBER "5185")
endif()
if (BUILD_NUMBER LESS 5180)

View File

@ -1,5 +1,5 @@
{
"environments": [ { "BuildNumber": "5184" } ],
"environments": [ { "BuildNumber": "5185" } ],
"configurations": [
{
"name": "x64-native",

View File

@ -2103,7 +2103,7 @@ void StopL2TPThread(L2TP_SERVER *l2tp, L2TP_TUNNEL *t, L2TP_SESSION *s)
// Interrupt processing of L2TP server
void L2TPProcessInterrupts(L2TP_SERVER *l2tp)
{
UINT i, j;
UINT i, j, k;
LIST *delete_tunnel_list = NULL;
// Validate arguments
if (l2tp == NULL)
@ -2138,9 +2138,9 @@ void L2TPProcessInterrupts(L2TP_SERVER *l2tp)
UINT64 l2tpTimeout = L2TP_TUNNEL_TIMEOUT;
// If we got on ANY session a higher timeout than the default L2TP tunnel timeout, increase it
for (i = 0; i < LIST_NUM(t->SessionList); i++)
for (k = 0; k < LIST_NUM(t->SessionList); k++)
{
L2TP_SESSION* s = LIST_DATA(t->SessionList, i);
L2TP_SESSION* s = LIST_DATA(t->SessionList, k);
if (s->TubeRecv != NULL && s->TubeRecv->DataTimeout > l2tpTimeout)
{

View File

@ -9349,62 +9349,35 @@ UINT ServeDhcpDiscoverEx(VH *v, UCHAR *mac, UINT request_ip, bool is_static_ip)
// check whether it is a request from the same MAC address
if (Cmp(mac, d->MacAddress, 6) == 0)
{
// Examine whether the specified IP address is within the range of assignment
// Examine whether the specified IP address is within the range of static assignment
if (Endian32(v->DhcpIpStart) > Endian32(request_ip) ||
Endian32(request_ip) > Endian32(v->DhcpIpEnd))
{
// Accept if within the range
// Accept if within the range of static assignment
ret = request_ip;
}
}
else {
// Duplicated IPV4 address found. The DHCP server replies to DHCPREQUEST with DHCP NAK.
// Duplicated IPV4 address found. The specified IP address is not available for use
char ipstr[MAX_HOST_NAME_LEN + 1] = { 0 };
char macstr[128] = { 0 };
IPToStr32(ipstr, sizeof(ipstr), request_ip);
BinToStr(macstr, sizeof(macstr), d->MacAddress, 6);
Debug("Virtual DHC Server: Duplicated IP address detected. Static IP: %s, Used by MAC:%s\n", ipstr, macstr);
return ret;
MacToStr(macstr, sizeof(macstr), d->MacAddress);
Debug("Virtual DHC Server: Duplicated IP address detected. Static IP: %s, with the MAC: %s\n", ipstr, macstr);
}
}
else
{
// Examine whether the specified IP address is within the range of assignment
// Examine whether the specified IP address is within the range of static assignment
if (Endian32(v->DhcpIpStart) > Endian32(request_ip) ||
Endian32(request_ip) > Endian32(v->DhcpIpEnd))
{
// Accept if within the range
// Accept if within the range of static assignment
ret = request_ip;
}
else
{
// Propose an IP in the range since it's a Discover although It is out of range
}
}
if (ret == 0)
{
// If there is any entry with the same MAC address
// that are already registered, use it with priority
DHCP_LEASE *d = SearchDhcpLeaseByMac(v, mac);
if (d != NULL)
{
// Examine whether the found IP address is in the allocation region
if (Endian32(v->DhcpIpStart) > Endian32(d->IpAddress) ||
Endian32(d->IpAddress) > Endian32(v->DhcpIpEnd))
{
// Use the IP address if it's found within the range
ret = d->IpAddress;
}
}
}
if (ret == 0)
{
// For static IP, the requested IP address must NOT be within the range of the DHCP pool
if (Endian32(v->DhcpIpStart) > Endian32(request_ip) ||
Endian32(request_ip) > Endian32(v->DhcpIpEnd))
{
ret = request_ip;
// The specified IP address is not available for use
}
}
@ -9595,6 +9568,11 @@ void VirtualDhcpServer(VH *v, PKT *p)
{
ip = ServeDhcpRequestEx(v, p->MacAddressSrc, opt->RequestedIp, ip_static);
}
// If the IP address in user's note is changed, then reply to DHCP_REQUEST with DHCP_NAK
if (p->L3.IPv4Header->SrcIP && ip != p->L3.IPv4Header->SrcIP)
{
ip = 0;
}
}
if (ip != 0 || opt->Opcode == DHCP_INFORM)
@ -9607,6 +9585,14 @@ void VirtualDhcpServer(VH *v, PKT *p)
char client_mac[MAX_SIZE];
char client_ip[MAX_SIZE];
// If there is any entry with the same MAC address, then remove it
d = SearchDhcpLeaseByMac(v, p->MacAddressSrc);
if (d != NULL)
{
FreeDhcpLease(d);
Delete(v->DhcpLeaseList, d);
}
// Remove old records with the same IP address
d = SearchDhcpLeaseByIp(v, ip);
if (d != NULL)
@ -9765,7 +9751,7 @@ void VirtualDhcpServer(VH *v, PKT *p)
}
else
{
// Reply of DHCP_REQUEST must be either DHCP_ACK or DHCP_NAK.
// Reply of DHCP_REQUEST must be either DHCP_ACK or DHCP_NAK
if (opt->Opcode == DHCP_REQUEST)
{
// There is no IP address that can be provided

View File

@ -12288,6 +12288,11 @@ UINT SecureRecv(SOCK *sock, void *data, UINT size)
ret = SSL_peek(ssl, &c, sizeof(c));
}
Unlock(sock->ssl_lock);
#if OPENSSL_VERSION_NUMBER < 0x30000000L
// 2021/09/10: After OpenSSL 3.x.x, both 0 and negative values might mean retryable.
// See: https://github.com/openssl/openssl/blob/435981cbadad2c58c35bacd30ca5d8b4c9bea72f/doc/man3/SSL_read.pod
// > Old documentation indicated a difference between 0 and -1, and that -1 was retryable.
// > You should instead call SSL_get_error() to find out if it's retryable.
if (ret == 0)
{
// The communication have been disconnected
@ -12295,7 +12300,8 @@ UINT SecureRecv(SOCK *sock, void *data, UINT size)
Debug("%s %u SecureRecv() Disconnect\n", __FILE__, __LINE__);
return 0;
}
if (ret < 0)
#endif
if (ret <= 0)
{
// An error has occurred
e = SSL_get_error(ssl, ret);
@ -12310,7 +12316,9 @@ UINT SecureRecv(SOCK *sock, void *data, UINT size)
#endif
)
{
Debug("%s %u SSL Fatal Error on ASYNC socket !!!\n", __FILE__, __LINE__);
UINT ssl_err_no = ERR_get_error();
Debug("%s %u SSL_ERROR_SSL on ASYNC socket !!! ssl_err_no = %u: '%s'\n", __FILE__, __LINE__, ssl_err_no, ERR_error_string(ssl_err_no, NULL));
Disconnect(sock);
return 0;
}
@ -12337,14 +12345,14 @@ UINT SecureRecv(SOCK *sock, void *data, UINT size)
}
#endif // OS_UNIX
// Run the time-out thread for SOLARIS
// Run the time-out thread for SOLARIS
#ifdef UNIX_SOLARIS
ttparam = NewSocketTimeout(sock);
#endif // UNIX_SOLARIS
ret = SSL_read(ssl, data, size);
// Stop the timeout thread
// Stop the timeout thread
#ifdef UNIX_SOLARIS
FreeSocketTimeout(ttparam);
#endif // UNIX_SOLARIS
@ -12357,7 +12365,11 @@ UINT SecureRecv(SOCK *sock, void *data, UINT size)
}
#endif // OS_UNIX
if (ret < 0)
#if OPENSSL_VERSION_NUMBER < 0x30000000L
if (ret < 0) // OpenSSL version < 3.0.0
#else
if (ret <= 0) // OpenSSL version >= 3.0.0
#endif
{
e = SSL_get_error(ssl, ret);
}
@ -12380,6 +12392,12 @@ UINT SecureRecv(SOCK *sock, void *data, UINT size)
return (UINT)ret;
}
#if OPENSSL_VERSION_NUMBER < 0x30000000L
// 2021/09/10: After OpenSSL 3.x.x, both 0 and negative values might mean retryable.
// See: https://github.com/openssl/openssl/blob/435981cbadad2c58c35bacd30ca5d8b4c9bea72f/doc/man3/SSL_read.pod
// > Old documentation indicated a difference between 0 and -1, and that -1 was retryable.
// > You should instead call SSL_get_error() to find out if it's retryable.
if (ret == 0)
{
// Disconnect the communication
@ -12387,6 +12405,8 @@ UINT SecureRecv(SOCK *sock, void *data, UINT size)
//Debug("%s %u SecureRecv() Disconnect\n", __FILE__, __LINE__);
return 0;
}
#endif
if (sock->AsyncMode)
{
if (e == SSL_ERROR_WANT_READ || e == SSL_ERROR_WANT_WRITE || e == SSL_ERROR_SSL)
@ -12400,7 +12420,9 @@ UINT SecureRecv(SOCK *sock, void *data, UINT size)
#endif
)
{
Debug("%s %u SSL Fatal Error on ASYNC socket !!!\n", __FILE__, __LINE__);
UINT ssl_err_no = ERR_get_error();
Debug("%s %u SSL_ERROR_SSL on ASYNC socket !!! ssl_err_no = %u: '%s'\n", __FILE__, __LINE__, ssl_err_no, ERR_error_string(ssl_err_no, NULL));
Disconnect(sock);
return 0;
}
@ -12438,7 +12460,11 @@ UINT SecureSend(SOCK *sock, void *data, UINT size)
}
ret = SSL_write(ssl, data, size);
if (ret < 0)
#if OPENSSL_VERSION_NUMBER < 0x30000000L
if (ret < 0) // OpenSSL version < 3.0.0
#else
if (ret <= 0) // OpenSSL version >= 3.0.0
#endif
{
e = SSL_get_error(ssl, ret);
}
@ -12460,6 +12486,8 @@ UINT SecureSend(SOCK *sock, void *data, UINT size)
sock->WriteBlocked = false;
return (UINT)ret;
}
#if OPENSSL_VERSION_NUMBER < 0x30000000L
if (ret == 0)
{
// Disconnect
@ -12467,6 +12495,7 @@ UINT SecureSend(SOCK *sock, void *data, UINT size)
Disconnect(sock);
return 0;
}
#endif
if (sock->AsyncMode)
{

View File

@ -115,7 +115,7 @@ ERR_48 Не удалось подключиться к контроллер
ERR_49 Контроллеру кластера не удалось установить новую сессию в кластере.
ERR_50 Не удается управлять Virtual Hub-ом сервера-члена кластера.
ERR_51 Удаленное подключение запрещено, т.к. использован пустой пароль пользователя. Пустой пароль может быть разрешен только для соединений с локального хоста VPN-сервера (127.0.0.1).
ERR_52 Не достаточно прав.
ERR_52 Недостаточно прав.
ERR_53 Указанный порт прослушивания не найден.
ERR_54 Указанный порт прослушивания уже существует.
ERR_55 Этот сервер не член кластера.
@ -2421,8 +2421,8 @@ STATIC17 Другие конфигурации:
R_NO_ROUTING Не вносить изменения в таблицу маршрутизации
STATIC18 Если у вас нет опыта работы с сетью и безопасностью, то оставьте настройки в этом окне по умолчанию.
STATIC19 Функции VoIP/QoS обрабатывают пакеты (например VoIP) с высоким приоритетом для более быстрой передачи.
STATIC20 Source IP Address:
STATIC21 Source Port Number:
STATIC20 IP адрес источника:
STATIC21 Номер порта:
R_DISABLE_QOS Отключить функции VoIP / QoS
IDOK &OK
IDCANCEL Отмена
@ -2524,7 +2524,7 @@ STATIC2 Имя Virtual &Hub:
STATIC3 &Пользователь:
STATIC4 &Старый пароль:
STATIC5 &Новый пароль:
STATIC6 &Подтвердить новый пароль:
STATIC6 &Подтвердить пароль:
IDOK &OK
IDCANCEL Отмена
S_STATIC Примечание: Вы не сможете изменить пароль пользователя, если выбран тип авторизации "RADIUS или авторизация в домене".
@ -2533,7 +2533,7 @@ S_STATIC Примечание: Вы не сможете изменить па
PREFIX D_SM_MAIN
CAPTION SoftEther VPN-сервер менеджер Developer Edition
STATIC1 Настройки подключения для VPN-сервера:
STATIC2 Настройки подключения для VPN-сервера или VPN-моста. Чтобы подключиться к серверу дважды щелкните по его названию.\r\n Чтобы добавить новое подключение, нажмите "Новое подключение".
STATIC2 Настройки подключения для VPN-сервера или VPN-моста. Чтобы подключиться к серверу дважды щелкните по его названию.\r\nЧтобы добавить новое подключение, нажмите "Новое подключение".
B_NEW_SETTING &Создать
B_EDIT_SETTING &Изменить
B_DELETE &Удалить
@ -2558,9 +2558,9 @@ STATIC8 Прокси-сервер:
STATIC9 Вы можете подключиться к VPN-серверу через прокси-сервер.
STATIC10 Тип прокси:
R_DIRECT_TCP &Прямое TCP/IP соединение (без прокси)
R_HTTPS Подключиться через HTTP прокси-сервер
R_SOCKS Подключиться через SOCKS прокси-сервер
R_SOCKS5 Подключиться через SOCKS5 прокси-сервер
R_HTTPS Через HTTP прокси-сервер
R_SOCKS Через SOCKS прокси-сервер
R_SOCKS5 Через SOCKS5 прокси-сервер
B_PROXY_CONFIG Настройки прокси-сервера
STATIC11 Выберите режим администрирования и введите пароль
STATIC12 Вы можете подключиться к VPN-серверу, используя либо режим администратора сервера, либо режим Virtual Hub администратора. \r\n\r\nРежим администратора сервера позволяет вам управлять VPN-сервером и всеми Virtual Hub. \r\n\r\nРежим Virtual Hub администратора позволяет вам управлять только одним Virtual Hub, на который у вас есть права.