Skip to content

Commit

Permalink
v4.13-9522-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
dnobori committed Jan 30, 2015
1 parent 75f9836 commit 06a7204
Show file tree
Hide file tree
Showing 337 changed files with 1,402 additions and 484 deletions.
6 changes: 3 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ 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.

Copyright (c) 2012-2014 Daiyuu Nobori.
Copyright (c) 2012-2014 SoftEther Project at University of Tsukuba, Japan.
Copyright (c) 2012-2014 SoftEther Corporation.
Copyright (c) 2012-2015 Daiyuu Nobori.
Copyright (c) 2012-2015 SoftEther Project at University of Tsukuba, Japan.
Copyright (c) 2012-2015 SoftEther Corporation.
All Rights Reserved.
http://www.softether.org/

Expand Down
6 changes: 3 additions & 3 deletions LICENSE.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ 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.

Copyright (c) 2012-2014 Daiyuu Nobori.
Copyright (c) 2012-2014 SoftEther Project at University of Tsukuba, Japan.
Copyright (c) 2012-2014 SoftEther Corporation.
Copyright (c) 2012-2015 Daiyuu Nobori.
Copyright (c) 2012-2015 SoftEther Project at University of Tsukuba, Japan.
Copyright (c) 2012-2015 SoftEther Corporation.
All Rights Reserved.
http://www.softether.org/

Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ http://www.softether-download.com/
We accept your patches by the acceptance policy:
http://www.softether.org/5-download/src/9.patch

Copyright (c) 2012-2014 SoftEther Project at University of Tsukuba, Japan.
Copyright (c) 2012-2015 SoftEther Project at University of Tsukuba, Japan.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2
Expand Down
2 changes: 1 addition & 1 deletion README.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ http://www.softether-download.com/
We accept your patches by the acceptance policy:
http://www.softether.org/5-download/src/9.patch

Copyright (c) 2012-2014 SoftEther Project at University of Tsukuba, Japan.
Copyright (c) 2012-2015 SoftEther Project at University of Tsukuba, Japan.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2
Expand Down
42 changes: 42 additions & 0 deletions WARNING.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -521,3 +521,45 @@ parts of VPN Gate are not developed by SoftEther Corporation. The VPN Gate
Research Project is not a subject to be led, operated, promoted nor guaranteed
by SoftEther Corporation.

5.13. The P2P Relay Function in the VPN Gate Client to strengthen the
capability of circumvention of censorship firewalls
VPN Gate Clients, which are published since January 2015, include the P2P
Relay Function. The P2P Relay Function is implemented in order to strengthen
the capability of circumvention of censorship firewalls. If the P2P Relay
Function in your VPN Gate Client is enabled, then the P2P Relay Function will
accept the incoming VPN connections from the VPN Gate users, which are located
on mainly same regions around you, and will provide the relay function to the
external remote VPN Gate Servers, which are hosted by third parties in the
free Internet environment. This P2P Relay Function never provides the shared
NAT functions nor replaces the outgoing IP address of the VPN Gate users to
your IP addresses because this P2P Relay Function only provides the
"reflection service" (hair-pin relaying), relaying from incoming VPN Gate
users to an external VPN Gate Server. In this situation, VPN tunnels via your
P2P Relay Function will be finally terminated on the external VPN Gate Server,
not your VPN Gate Client. However, the VPN Gate Server as the final
destination will record your IP address as the source IP address of VPN
tunnels which will be initiated by your P2P Relay Function. Additionally, user
packets which are transmitted via your P2P Relay Function will be recorded on
your computer as packet logs as described on the section 5.8. After you
installed the VPN Gate Client, and if the P2P Relay Function will be enabled
automatically, then all matters on the 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 5.9,
5.10, 5.11 and 5.12 sections will be applied to you and your computer, as same
to the situation when you enabled the VPN Gate Service (the VPN Gate Server
function). If your P2P Function is enabled, then your computer's IP address
and the default operator's name which is described on the section 5.5 will be
listed on the VPN Gate Server List which is provided by the VPN Gate Project.
You can change these strings by editing the "vpn_gate_relay.config" file
manually. Note that you need to stop the VPN Client service before editing it.
The VPN Gate Client will automatically enable the P2P Relay Function on your
computer if the VPN Gate Client detects that your computer might be located in
regions where there are existing censorship firewalls. If you want to disable
the P2P Relay Function, you must set the "DisableRelayServer" flag to "true"
on the "vpn_client.config" file which is the configuration file of the VPN
Client. Note that you need to stop the VPN Client service before editing it.
The VPN Gate Client does not recognize the particular regulation of your
country or your region. The VPN Gate Client activates the P2P Relay Function
even if your country or your region has the law to restrict running P2P relay
functions. Therefore, in such a case, you must disable the P2P Relay Function
on the VPN Gate Client manually by setting the "DisableRelayServer" flag if
you reside in such a restricted area, in your own responsibility.

4 changes: 2 additions & 2 deletions centos/SOURCES/linux_32bit.mak
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SoftEther VPN Source Code
#
# Copyright (c) 2012-2014 SoftEther VPN Project at University of Tsukuba, Japan.
# Copyright (c) 2012-2014 Daiyuu Nobori.
# Copyright (c) 2012-2015 SoftEther VPN Project at University of Tsukuba, Japan.
# Copyright (c) 2012-2015 Daiyuu Nobori.
# All Rights Reserved.
#
# http://www.softether.org/
Expand Down
4 changes: 2 additions & 2 deletions centos/SOURCES/linux_64bit.mak
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SoftEther VPN Source Code
#
# Copyright (c) 2012-2014 SoftEther VPN Project at University of Tsukuba, Japan.
# Copyright (c) 2012-2014 Daiyuu Nobori.
# Copyright (c) 2012-2015 SoftEther VPN Project at University of Tsukuba, Japan.
# Copyright (c) 2012-2015 Daiyuu Nobori.
# All Rights Reserved.
#
# http://www.softether.org/
Expand Down
41 changes: 41 additions & 0 deletions src/Cedar/Admin.c
Original file line number Diff line number Diff line change
Expand Up @@ -10400,6 +10400,8 @@ void SiEnumLocalLogFileList(SERVER *s, char *hubname, RPC_ENUM_LOG_FILE *t)
void SiEnumLocalSession(SERVER *s, char *hubname, RPC_ENUM_SESSION *t)
{
HUB *h;
UINT64 now = Tick64();
UINT64 dormant_interval = 0;
// Validate arguments
if (s == NULL || hubname == NULL || t == NULL)
{
Expand All @@ -10417,6 +10419,11 @@ void SiEnumLocalSession(SERVER *s, char *hubname, RPC_ENUM_SESSION *t)
return;
}

if (h->Option != NULL)
{
dormant_interval = h->Option->DetectDormantSessionInterval * (UINT64)1000;
}

LockList(h->SessionList);
{
UINT i;
Expand Down Expand Up @@ -10453,8 +10460,36 @@ void SiEnumLocalSession(SERVER *s, char *hubname, RPC_ENUM_SESSION *t)
e->Client_BridgeMode = s->IsBridgeMode;
e->Client_MonitorMode = s->IsMonitorMode;
Copy(e->UniqueId, s->NodeInfo.UniqueId, 16);

if (s->NormalClient)
{
e->IsDormantEnabled = (dormant_interval == 0 ? false : true);
if (e->IsDormantEnabled)
{
if (s->LastCommTimeForDormant == 0)
{
e->LastCommDormant = (UINT64)0x7FFFFFFF;
}
else
{
e->LastCommDormant = now - s->LastCommTimeForDormant;
}
if (s->LastCommTimeForDormant == 0)
{
e->IsDormant = true;
}
else
{
if ((s->LastCommTimeForDormant + dormant_interval) < now)
{
e->IsDormant = true;
}
}
}
}
}
Unlock(s->lock);

GetMachineName(e->RemoteHostname, sizeof(e->RemoteHostname));
}
}
Expand Down Expand Up @@ -12744,6 +12779,9 @@ void InRpcEnumSession(RPC_ENUM_SESSION *t, PACK *p)
PackGetStrEx(p, "RemoteHostname", e->RemoteHostname, sizeof(e->RemoteHostname), i);
e->VLanId = PackGetIntEx(p, "VLanId", i);
PackGetDataEx2(p, "UniqueId", e->UniqueId, sizeof(e->UniqueId), i);
e->IsDormantEnabled = PackGetBoolEx(p, "IsDormantEnabled", i);
e->IsDormant = PackGetBoolEx(p, "IsDormant", i);
e->LastCommDormant = PackGetInt64Ex(p, "LastCommDormant", i);
}
}
void OutRpcEnumSession(PACK *p, RPC_ENUM_SESSION *t)
Expand Down Expand Up @@ -12778,6 +12816,9 @@ void OutRpcEnumSession(PACK *p, RPC_ENUM_SESSION *t)
PackAddBoolEx(p, "Client_MonitorMode", e->Client_MonitorMode, i, t->NumSession);
PackAddIntEx(p, "VLanId", e->VLanId, i, t->NumSession);
PackAddDataEx(p, "UniqueId", e->UniqueId, sizeof(e->UniqueId), i, t->NumSession);
PackAddBoolEx(p, "IsDormantEnabled", e->IsDormantEnabled, i, t->NumSession);
PackAddBoolEx(p, "IsDormant", e->IsDormant, i, t->NumSession);
PackAddInt64Ex(p, "LastCommDormant", e->LastCommDormant, i, t->NumSession);
}
}
void FreeRpcEnumSession(RPC_ENUM_SESSION *t)
Expand Down
3 changes: 3 additions & 0 deletions src/Cedar/Admin.h
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,9 @@ struct RPC_ENUM_SESSION_ITEM
bool Client_MonitorMode; // Client is monitoring mode
UINT VLanId; // VLAN ID
UCHAR UniqueId[16]; // Unique ID
bool IsDormantEnabled; // Is the dormant state enabled
bool IsDormant; // Is in the dormant state
UINT64 LastCommDormant; // Last comm interval in the dormant state
};

// Disconnect the session
Expand Down
28 changes: 26 additions & 2 deletions src/Cedar/BridgeUnix.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,22 @@ struct my_tpacket_auxdata
#define MY_PACKET_AUXDATA 8
#endif // UNIX_LINUX

static LIST *eth_offload_list = NULL;

// Initialize
void InitEth()
{
eth_offload_list = NewList(NULL);
}

// Free
void FreeEth()
{
if (eth_offload_list != NULL)
{
FreeStrList(eth_offload_list);
eth_offload_list = NULL;
}
}

// Check whether interface description string of Ethernet device can be retrieved in this system
Expand Down Expand Up @@ -683,8 +691,24 @@ ETH *OpenEthLinux(char *name, bool local, bool tapmode, char *tapaddr)
{
if (GetGlobalServerFlag(GSF_LOCALBRIDGE_NO_DISABLE_OFFLOAD) == false)
{
// Disable hardware offloading
UnixDisableInterfaceOffload(name);
bool b = false;

LockList(eth_offload_list);
{
if (IsInListStr(eth_offload_list, name) == false)
{
b = true;

Add(eth_offload_list, CopyStr(name));
}
}
UnlockList(eth_offload_list);

if (b)
{
// Disable hardware offloading
UnixDisableInterfaceOffload(name);
}
}
}

Expand Down
4 changes: 3 additions & 1 deletion src/Cedar/Cedar.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ bool IsSupportedWinVer(RPC_WINVER *v)

#if 0
// Enable in future when supported
if (v->VerMajor == 6 && v->VerMinor == 4)
if ((v->VerMajor == 6 && v->VerMinor == 4) ||(v->VerMajor == 10 && v->VerMinor == 0))
{
// Windows 10, Server 10
if (v->ServicePack <= 0)
Expand Down Expand Up @@ -908,6 +908,8 @@ void AddConnection(CEDAR *cedar, CONNECTION *c)
// Determine the name of the connection
i = Inc(cedar->ConnectionIncrement);
Format(tmp, sizeof(tmp), "CID-%u", i);


Lock(c->lock);
{
Free(c->Name);
Expand Down
16 changes: 8 additions & 8 deletions src/Cedar/Cedar.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@


// Version number
#define CEDAR_VER 412
#define CEDAR_VER 413

// Build Number
#define CEDAR_BUILD 9514
#define CEDAR_BUILD 9522

// Beta number
//#define BETA_NUMBER 3
Expand All @@ -153,15 +153,15 @@

// Specify the location to build
#ifndef BUILD_PLACE
#define BUILD_PLACE "pc25"
#define BUILD_PLACE "pc30"
#endif // BUILD_PLACE

// Specifies the build date
#define BUILD_DATE_Y 2014
#define BUILD_DATE_M 11
#define BUILD_DATE_D 17
#define BUILD_DATE_HO 21
#define BUILD_DATE_MI 41
#define BUILD_DATE_Y 2015
#define BUILD_DATE_M 1
#define BUILD_DATE_D 30
#define BUILD_DATE_HO 19
#define BUILD_DATE_MI 27
#define BUILD_DATE_SE 16

// Tolerable time difference
Expand Down
4 changes: 2 additions & 2 deletions src/Cedar/Client.c
Original file line number Diff line number Diff line change
Expand Up @@ -10462,7 +10462,7 @@ void CiWriteSettingToCfg(CLIENT *c, FOLDER *root)
}

// Create the inner VPN Server
SERVER *CiNewInnerVPNServer(CLIENT *c)
SERVER *CiNewInnerVPNServer(CLIENT *c, bool relay_server)
{
SERVER *s = NULL;
// Validate arguments
Expand All @@ -10473,7 +10473,7 @@ SERVER *CiNewInnerVPNServer(CLIENT *c)

SetNatTLowPriority();

s = SiNewServerEx(false, true);
s = SiNewServerEx(false, true, relay_server);

return s;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Cedar/Client.h
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ bool CiEraseSensitiveInAccount(BUF *b);
bool CiHasAccountSensitiveInformation(BUF *b);
bool CiHasAccountSensitiveInformationFile(wchar_t *name);
void CiApplyInnerVPNServerConfig(CLIENT *c);
SERVER *CiNewInnerVPNServer(CLIENT *c);
SERVER *CiNewInnerVPNServer(CLIENT *c, bool relay_server);
void CiFreeInnerVPNServer(CLIENT *c, SERVER *s);
void CiIncrementNumActiveSessions();
void CiDecrementNumActiveSessions();
Expand Down
Loading

0 comments on commit 06a7204

Please sign in to comment.