mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-07-07 16:25:01 +03:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
039cd8edf0 | |||
e025762a52 | |||
a902d3eed9 | |||
44f731f781 | |||
14e9c7299d | |||
f20e99f8e4 | |||
b9109211d3 | |||
9073452b09 | |||
b6ef9f88c9 |
@ -1,7 +1,7 @@
|
|||||||
cmake_minimum_required(VERSION 3.7)
|
cmake_minimum_required(VERSION 3.7)
|
||||||
|
|
||||||
project("SoftEther VPN"
|
project("SoftEther VPN"
|
||||||
VERSION 5.01.9673
|
VERSION 5.01.9674
|
||||||
LANGUAGES C
|
LANGUAGES C
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -2460,6 +2460,17 @@ void OvsRecvPacket(OPENVPN_SERVER *s, LIST *recv_packet_list)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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.
|
||||||
|
StrCat(option_str, sizeof(option_str), ",block-outside-dns");
|
||||||
|
|
||||||
WriteFifo(c->SslPipe->SslInOut->SendFifo, option_str, StrSize(option_str));
|
WriteFifo(c->SslPipe->SslInOut->SendFifo, option_str, StrSize(option_str));
|
||||||
|
|
||||||
Debug("Push Str: %s\n", option_str);
|
Debug("Push Str: %s\n", option_str);
|
||||||
|
@ -1088,9 +1088,12 @@ bool PPPProcessLCPRequestPacket(PPP_SESSION *p, PPP_PACKET *pp)
|
|||||||
USHORT NegotiatedMRU = PPP_UNSPECIFIED;
|
USHORT NegotiatedMRU = PPP_UNSPECIFIED;
|
||||||
// MSCHAPv2 code
|
// MSCHAPv2 code
|
||||||
UCHAR ms_chap_v2_code[3];
|
UCHAR ms_chap_v2_code[3];
|
||||||
|
|
||||||
WRITE_USHORT(ms_chap_v2_code, PPP_LCP_AUTH_CHAP);
|
WRITE_USHORT(ms_chap_v2_code, PPP_LCP_AUTH_CHAP);
|
||||||
ms_chap_v2_code[2] = PPP_CHAP_ALG_MS_CHAP_V2;
|
ms_chap_v2_code[2] = PPP_CHAP_ALG_MS_CHAP_V2;
|
||||||
|
|
||||||
|
Debug("Got LCP packet request ID=%i OptionsListSize=%i\n", pp->Lcp->Id, LIST_NUM(pp->Lcp->OptionList));
|
||||||
|
|
||||||
for (i = 0; i < LIST_NUM(pp->Lcp->OptionList); i++)
|
for (i = 0; i < LIST_NUM(pp->Lcp->OptionList); i++)
|
||||||
{
|
{
|
||||||
PPP_OPTION *t = LIST_DATA(pp->Lcp->OptionList, i);
|
PPP_OPTION *t = LIST_DATA(pp->Lcp->OptionList, i);
|
||||||
@ -1359,6 +1362,8 @@ bool PPPProcessIPCPRequestPacket(PPP_SESSION *p, PPP_PACKET* pp)
|
|||||||
{
|
{
|
||||||
PPP_IPOPTION o;
|
PPP_IPOPTION o;
|
||||||
PPP_IPOPTION res;
|
PPP_IPOPTION res;
|
||||||
|
PPP_OPTION *dummyIpOption;
|
||||||
|
UINT dummyIp = 0;
|
||||||
DHCP_OPTION_LIST cao;
|
DHCP_OPTION_LIST cao;
|
||||||
IP client_ip;
|
IP client_ip;
|
||||||
IP subnet;
|
IP subnet;
|
||||||
@ -1366,21 +1371,27 @@ bool PPPProcessIPCPRequestPacket(PPP_SESSION *p, PPP_PACKET* pp)
|
|||||||
IP gw;
|
IP gw;
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
bool processed = false;
|
bool processed = false;
|
||||||
|
bool isEmptyIpAddress = false;
|
||||||
|
PPP_LCP* c;
|
||||||
|
|
||||||
if (p->IPv4_State == PPP_PROTO_STATUS_REJECTED)
|
if (p->IPv4_State == PPP_PROTO_STATUS_REJECTED)
|
||||||
{
|
{
|
||||||
Debug("We got an IPCP packet after we had it rejected");
|
Debug("We got an IPCP packet after we had it rejected\n");
|
||||||
return PPPRejectUnsupportedPacketEx(p, pp, true);
|
return PPPRejectUnsupportedPacketEx(p, pp, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!PPPGetIPOptionFromLCP(&o, pp->Lcp))
|
if (!PPPGetIPOptionFromLCP(&o, pp->Lcp))
|
||||||
{
|
{
|
||||||
Debug("Unsupported IPCP request!");
|
Debug("IPCP request without client IP address received! Treating as zeroed out client IP...\n");
|
||||||
ok = false;
|
isEmptyIpAddress = true;
|
||||||
|
dummyIpOption = NewPPPOption(PPP_IPCP_OPTION_IP, &dummyIp, sizeof(UINT));
|
||||||
|
dummyIpOption->IsSupported = true;
|
||||||
|
dummyIpOption->IsAccepted = false;
|
||||||
|
Add(pp->Lcp->OptionList, dummyIpOption);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process if not configured yet by server
|
// Process if not configured yet by server
|
||||||
if (IsZero(&p->ClientAddressOption, sizeof(DHCP_OPTION_LIST)) && ok)
|
if ((IsZero(&p->ClientAddressOption, sizeof(DHCP_OPTION_LIST)) || isEmptyIpAddress) && ok)
|
||||||
{
|
{
|
||||||
// Decide if we received a static IP from client and it is allowed
|
// Decide if we received a static IP from client and it is allowed
|
||||||
if (IsZeroIP(&o.IpAddress) == false)
|
if (IsZeroIP(&o.IpAddress) == false)
|
||||||
@ -1618,6 +1629,7 @@ bool PPPProcessIPCPRequestPacket(PPP_SESSION *p, PPP_PACKET* pp)
|
|||||||
Zero(&res, sizeof(res));
|
Zero(&res, sizeof(res));
|
||||||
// We will try to reconfigure if we receive another request by wiping all data
|
// We will try to reconfigure if we receive another request by wiping all data
|
||||||
Zero(&p->ClientAddressOption, sizeof(DHCP_OPTION_LIST));
|
Zero(&p->ClientAddressOption, sizeof(DHCP_OPTION_LIST));
|
||||||
|
p->UseStaticIPAddress = false;
|
||||||
|
|
||||||
PPPSetIPOptionToLCP(&res, pp->Lcp, true);
|
PPPSetIPOptionToLCP(&res, pp->Lcp, true);
|
||||||
}
|
}
|
||||||
@ -1792,6 +1804,12 @@ bool PPPAckLCPOptionsEx(PPP_SESSION *p, PPP_PACKET* pp, bool simulate)
|
|||||||
UINT i = 0;
|
UINT i = 0;
|
||||||
PPP_PACKET* ret;
|
PPP_PACKET* ret;
|
||||||
bool toBeACKed = false;
|
bool toBeACKed = false;
|
||||||
|
if (LIST_NUM(pp->Lcp->OptionList) == 0)
|
||||||
|
{
|
||||||
|
// We acknoweldge an empty option list
|
||||||
|
toBeACKed = true;
|
||||||
|
Debug("ACKing empty LCP options list, id=%i\n", pp->Lcp->Id);
|
||||||
|
}
|
||||||
for (i = 0; i < LIST_NUM(pp->Lcp->OptionList); i++)
|
for (i = 0; i < LIST_NUM(pp->Lcp->OptionList); i++)
|
||||||
{
|
{
|
||||||
PPP_OPTION *t = LIST_DATA(pp->Lcp->OptionList, i);
|
PPP_OPTION *t = LIST_DATA(pp->Lcp->OptionList, i);
|
||||||
@ -1826,7 +1844,7 @@ bool PPPAckLCPOptionsEx(PPP_SESSION *p, PPP_PACKET* pp, bool simulate)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LIST_NUM(ret->Lcp->OptionList) == 0 || simulate)
|
if (simulate)
|
||||||
{
|
{
|
||||||
FreePPPPacket(ret);
|
FreePPPPacket(ret);
|
||||||
return false;
|
return false;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
VERSION_MAJOR 5
|
VERSION_MAJOR 5
|
||||||
VERSION_MINOR 1
|
VERSION_MINOR 1
|
||||||
VERSION_BUILD 9673
|
VERSION_BUILD 9674
|
||||||
BUILD_NAME unstable
|
BUILD_NAME unstable
|
||||||
BUILD_DATE 20200418_000000
|
BUILD_DATE 20200430_000000
|
||||||
|
@ -2669,9 +2669,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"jquery": {
|
"jquery": {
|
||||||
"version": "3.4.1",
|
"version": "3.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.0.tgz",
|
||||||
"integrity": "sha512-36+AdBzCL+y6qjw5Tx7HgzeGCzC81MDDgaUP8ld2zhx58HdqXGoBd+tHdrBMiyjGQs0Hxs/MLZTu/eHNJJuWPw==",
|
"integrity": "sha512-Xb7SVYMvygPxbFMpTFQiHh1J7HClEaThguL15N/Gg37Lri/qKyhRGZYzHRyLH8Stq3Aow0LsHO2O2ci86fCrNQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"js-tokens": {
|
"js-tokens": {
|
||||||
|
Reference in New Issue
Block a user