mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2026-04-22 06:49:25 +03:00
Merge pull request #1 from SoftEtherVPN/master
update to latest version
This commit is contained in:
@@ -9,6 +9,7 @@ You need to install the following software to build SoftEther VPN for Windows.
|
||||
|
||||
- Microsoft Windows XP, Vista, 7, 8 or later.
|
||||
- Microsoft Visual Studio 2008 with the latest SP (SP1 9.0.30729.4462 QFE).
|
||||
Make sure that you installed the x64 compiler and build tools.
|
||||
|
||||
* Note:
|
||||
Visual Studio 2008 SP1 is required to build SoftEther VPN on Windows.
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -12,14 +12,14 @@ BEGIN
|
||||
BEGIN
|
||||
BLOCK "041104b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "SoftEther VPN Project at University of Tsukuba, Japan. (Open-source Customized Build)"
|
||||
VALUE "FileDescription", "$PRODUCTNAME$ (Open-source Customized Build)"
|
||||
VALUE "CompanyName", "SoftEther VPN Project at University of Tsukuba, Japan. (Developer Edition)"
|
||||
VALUE "FileDescription", "$PRODUCTNAME$ (Developer Edition)"
|
||||
VALUE "FileVersion", "$VER_MAJOR$, $VER_MINOR$, 0, $VER_BUILD$"
|
||||
VALUE "InternalName", "$INTERNALNAME$ (Open-source Customized Build)"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2012-$YEAR$ SoftEther VPN Project. All Rights Reserved. (Open-source Customized Build)"
|
||||
VALUE "InternalName", "$INTERNALNAME$ (Developer Edition)"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2012-$YEAR$ SoftEther VPN Project. All Rights Reserved. (Developer Edition)"
|
||||
VALUE "LegalTrademarks", "SoftEther(R) is a registered trademark of SoftEther Corporation in Japan, United Status and People's Republic of China. SoftEther Corporation is a company founded at University of Tsukuba, Japan."
|
||||
VALUE "OriginalFilename", "$FILENAME$"
|
||||
VALUE "ProductName", "$PRODUCTNAME$ (Open-source Customized Build)"
|
||||
VALUE "ProductName", "$PRODUCTNAME$ (Developer Edition)"
|
||||
VALUE "ProductVersion", "$VER_MAJOR$, $VER_MINOR$, 0, $VER_BUILD$"
|
||||
END
|
||||
END
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Build Utility
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -926,6 +926,19 @@ namespace BuildUtil
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Driver package build
|
||||
// Win32 build
|
||||
[ConsoleCommandMethod(
|
||||
"Builds the driver package.",
|
||||
"BuildDriverPackage",
|
||||
"Builds the driver package.")]
|
||||
static int BuildDriverPackage(ConsoleService c, string cmdName, string str)
|
||||
{
|
||||
Win32BuildUtil.MakeDriverPackage();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Win32 build
|
||||
[ConsoleCommandMethod(
|
||||
"Builds all executable files for win32 and HamCore for all OS.",
|
||||
@@ -1159,14 +1172,16 @@ namespace BuildUtil
|
||||
{
|
||||
new ConsoleParam("[targetFileName]", ConsoleService.Prompt, "Target Filename: ", ConsoleService.EvalNotEmpty, null),
|
||||
new ConsoleParam("OUT", ConsoleService.Prompt, "Dst Filename: ", ConsoleService.EvalNotEmpty, null),
|
||||
new ConsoleParam("PRODUCT"),
|
||||
new ConsoleParam("RC"),
|
||||
};
|
||||
ConsoleParamValueList vl = c.ParseCommandList(cmdName, str, args);
|
||||
|
||||
string targetFilename = vl.DefaultParam.StrValue;
|
||||
string outFilename = vl["OUT"].StrValue;
|
||||
string product_name = vl["PRODUCT"].StrValue;
|
||||
|
||||
Win32BuildUtil.GenerateVersionInfoResource(targetFilename, outFilename, vl["RC"].StrValue);
|
||||
Win32BuildUtil.GenerateVersionInfoResource(targetFilename, outFilename, vl["RC"].StrValue, product_name);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1307,6 +1322,8 @@ namespace BuildUtil
|
||||
new ConsoleParam("DEST"),
|
||||
new ConsoleParam("COMMENT", ConsoleService.Prompt, "Comment: ", ConsoleService.EvalNotEmpty, null),
|
||||
new ConsoleParam("KERNEL"),
|
||||
new ConsoleParam("CERTID"),
|
||||
new ConsoleParam("SHAMODE"),
|
||||
};
|
||||
ConsoleParamValueList vl = c.ParseCommandList(cmdName, str, args);
|
||||
|
||||
@@ -1319,14 +1336,13 @@ namespace BuildUtil
|
||||
string comment = vl["COMMENT"].StrValue;
|
||||
bool kernel = vl["KERNEL"].BoolValue;
|
||||
|
||||
CodeSign.SignFile(destFileName, srcFileName, comment, kernel);
|
||||
int certid = vl["CERTID"].IntValue;
|
||||
int shamode = vl["SHAMODE"].IntValue;
|
||||
|
||||
CodeSign.SignFile(destFileName, srcFileName, comment, kernel, certid, shamode);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Build Utility
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -217,7 +217,3 @@ namespace BuildUtil
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+24
-16
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Build Utility
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -153,9 +153,9 @@ namespace BuildUtil
|
||||
#endif
|
||||
|
||||
static object lockObj = new object();
|
||||
|
||||
|
||||
// Digital-sign the data on the memory
|
||||
public static byte[] SignMemory(byte[] srcData, string comment, bool kernelModeDriver, int cert_id)
|
||||
public static byte[] SignMemory(byte[] srcData, string comment, bool kernelModeDriver, int cert_id, int sha_mode)
|
||||
{
|
||||
#if !BU_OSS
|
||||
int i;
|
||||
@@ -176,10 +176,11 @@ namespace BuildUtil
|
||||
|
||||
try
|
||||
{
|
||||
out_filename = sign.ExecSign(Path.GetFileName(in_tmp_filename),
|
||||
out_filename = sign.ExecSignEx(Path.GetFileName(in_tmp_filename),
|
||||
kernelModeDriver,
|
||||
comment,
|
||||
cert_id);
|
||||
cert_id,
|
||||
sha_mode);
|
||||
break;
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -259,15 +260,26 @@ namespace BuildUtil
|
||||
{
|
||||
int cert_id = UsingCertId;
|
||||
|
||||
SignFile(destFileName, srcFileName, comment, kernelModeDriver, cert_id);
|
||||
SignFile(destFileName, srcFileName, comment, kernelModeDriver, cert_id, 0);
|
||||
}
|
||||
public static void SignFile(string destFileName, string srcFileName, string comment, bool kernelModeDriver, int cert_id)
|
||||
public static void SignFile(string destFileName, string srcFileName, string comment, bool kernelModeDriver, int cert_id, int sha_mode)
|
||||
{
|
||||
#if !BU_OSS
|
||||
if (cert_id == 0)
|
||||
{
|
||||
cert_id = UsingCertId;
|
||||
}
|
||||
|
||||
Con.WriteLine("Signing for '{0}'...", Path.GetFileName(destFileName));
|
||||
byte[] srcData = File.ReadAllBytes(srcFileName);
|
||||
|
||||
byte[] destData = SignMemory(srcData, comment, kernelModeDriver, cert_id);
|
||||
if (srcFileName.EndsWith(".msi", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
sha_mode = 1;
|
||||
// todo: Set 2 in future !!!
|
||||
}
|
||||
|
||||
byte[] destData = SignMemory(srcData, comment, kernelModeDriver, cert_id, sha_mode);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -287,7 +299,3 @@ namespace BuildUtil
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -212,7 +212,3 @@ namespace CoreUtil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -697,7 +697,3 @@ namespace CoreUtil
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -344,7 +344,3 @@ namespace CoreUtil
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -206,7 +206,3 @@ namespace CoreUtil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -2204,7 +2204,3 @@ namespace CoreUtil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -521,7 +521,3 @@ namespace CoreUtil
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -596,7 +596,3 @@ namespace CoreUtil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -1726,7 +1726,3 @@ namespace CoreUtil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -257,7 +257,3 @@ namespace CoreUtil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -194,7 +194,3 @@ namespace CoreUtil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -963,7 +963,3 @@ public class MultiLanguageFilterStream : Stream
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -226,7 +226,3 @@ namespace CoreUtil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -249,7 +249,3 @@ namespace CoreUtil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -330,7 +330,3 @@ namespace CoreUtil
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -561,7 +561,3 @@ namespace CoreUtil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -1053,7 +1053,3 @@ namespace CoreUtil
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -376,7 +376,3 @@ namespace CoreUtil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -4401,7 +4401,3 @@ namespace CoreUtil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -454,7 +454,3 @@ namespace CoreUtil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -566,7 +566,3 @@ namespace CoreUtil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -198,7 +198,3 @@ namespace CoreUtil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -1058,7 +1058,3 @@ namespace CoreUtil
|
||||
public string XsdFileName;
|
||||
}
|
||||
}
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -327,7 +327,3 @@ namespace CoreUtil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -506,7 +506,3 @@ namespace CoreUtil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Build Utility
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -255,7 +255,3 @@ namespace BuildUtil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
-4
@@ -1073,7 +1073,3 @@ namespace BuildUtil.Properties {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
-4
@@ -139,7 +139,3 @@ namespace BuildUtil.Properties {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+6
-16
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Build Utility
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -139,17 +139,7 @@ namespace BuildUtil
|
||||
{
|
||||
public static void Test()
|
||||
{
|
||||
Language[] langs = BuildHelper.GetLanguageList();
|
||||
|
||||
foreach (Language e in langs)
|
||||
{
|
||||
Con.WriteLine("{0} {1} {2} {3} {5} {4}",
|
||||
e.Number, e.Id, e.Title, e.TitleUnicode, e.UnixLocaleIds, e.WindowsLocaleIds);
|
||||
}
|
||||
Win32BuildUtil.MakeDriverPackage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Build Utility
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -690,7 +690,30 @@ namespace BuildUtil
|
||||
#else
|
||||
sr.WriteLine("\t@echo \"And please execute './vpncmd' to run the SoftEther VPN Command-Line Utility to configure {0}.\"", BuildHelper.GetSoftwareTitle(this.Software));
|
||||
#endif
|
||||
sr.WriteLine("\t@echo");
|
||||
#if !BU_SOFTETHER
|
||||
sr.WriteLine("\t@echo \"Of course, you can use the VPN Server Manager GUI Application for Windows on the other Windows PC in order to configure the {0} remotely.\"", BuildHelper.GetSoftwareTitle(this.Software));
|
||||
#else
|
||||
sr.WriteLine("\t@echo \"Of course, you can use the VPN Server Manager GUI Application for Windows / Mac OS X on the other Windows / Mac OS X computers in order to configure the {0} remotely.\"", BuildHelper.GetSoftwareTitle(this.Software));
|
||||
#endif
|
||||
|
||||
#if !BU_SOFTETHER
|
||||
#else
|
||||
sr.WriteLine("\t@echo");
|
||||
sr.WriteLine("\t@echo");
|
||||
sr.WriteLine("\t@echo \"*** For Windows users ***\"");
|
||||
sr.WriteLine("\t@echo \"You can download the SoftEther VPN Server Manager for Windows\"");
|
||||
sr.WriteLine("\t@echo \"from the http://www.softether-download.com/ web site.\"");
|
||||
sr.WriteLine("\t@echo \"This manager application helps you to completely and easily manage the VPN server services running in remote hosts.\"");
|
||||
sr.WriteLine("\t@echo");
|
||||
sr.WriteLine("\t@echo");
|
||||
sr.WriteLine("\t@echo \"*** For Mac OS X users ***\"");
|
||||
sr.WriteLine("\t@echo \"In April 2016 we released the SoftEther VPN Server Manager for Mac OS X.\"");
|
||||
sr.WriteLine("\t@echo \"You can download it from the http://www.softether-download.com/ web site.\"");
|
||||
sr.WriteLine("\t@echo \"VPN Server Manager for Mac OS X works perfectly as same as the traditional Windows versions. It helps you to completely and easily manage the VPN server services running in remote hosts.\"");
|
||||
sr.WriteLine("\t@echo");
|
||||
#endif
|
||||
|
||||
|
||||
sr.WriteLine("\t@echo \"--------------------------------------------------------------------\"");
|
||||
sr.WriteLine("\t@echo");
|
||||
@@ -1059,7 +1082,3 @@ namespace BuildUtil
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Build Utility
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -689,7 +689,3 @@ namespace BuildUtil
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Build Utility
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -138,7 +138,7 @@ namespace BuildUtil
|
||||
// Build settings
|
||||
public static class BuildConfig
|
||||
{
|
||||
public static readonly int NumMultipleCompileTasks = 4;
|
||||
public static readonly int NumMultipleCompileTasks = 1;
|
||||
}
|
||||
|
||||
// Software List
|
||||
@@ -430,7 +430,7 @@ namespace BuildUtil
|
||||
{
|
||||
// Windows
|
||||
public static readonly OS Windows = new OS("windows", "Windows",
|
||||
"Windows 98 / 98 SE / ME / NT 4.0 SP6a / 2000 SP4 / XP SP2, SP3 / Vista SP1, SP2 / 7 SP1 / 8 / 8.1 / Server 2003 SP2 / Server 2008 SP1, SP2 / Hyper-V Server 2008 / Server 2008 R2 SP1 / Hyper-V Server 2008 R2 / Server 2012 / Hyper-V Server 2012 / Server 2012 R2 / Hyper-V Server 2012 R2",
|
||||
"Windows 98 / 98 SE / ME / NT 4.0 SP6a / 2000 SP4 / XP SP2, SP3 / Vista SP1, SP2 / 7 SP1 / 8 / 8.1 / 10 / Server 2003 SP2 / Server 2008 SP1, SP2 / Hyper-V Server 2008 / Server 2008 R2 SP1 / Hyper-V Server 2008 R2 / Server 2012 / Hyper-V Server 2012 / Server 2012 R2 / Hyper-V Server 2012 R2 / Server 2016",
|
||||
new Cpu[]
|
||||
{
|
||||
CpuList.intel,
|
||||
@@ -438,7 +438,7 @@ namespace BuildUtil
|
||||
|
||||
// Linux
|
||||
public static readonly OS Linux = new OS("linux", "Linux",
|
||||
"Linux Kernel 2.4 / 2.6 / 3.x",
|
||||
"Linux Kernel 2.4 / 2.6 / 3.x / 4.x",
|
||||
new Cpu[]
|
||||
{
|
||||
CpuList.x86,
|
||||
@@ -564,7 +564,3 @@ namespace BuildUtil
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Build Utility
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -327,7 +327,3 @@ namespace BuildUtil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// このコードはツールによって生成されました。
|
||||
// ランタイム バージョン:2.0.50727.5466
|
||||
// ランタイム バージョン:2.0.50727.5485
|
||||
//
|
||||
// このファイルへの変更は、以下の状況下で不正な動作の原因になったり、
|
||||
// コードが再生成されるときに損失したりします。
|
||||
@@ -104,7 +104,7 @@
|
||||
|
||||
|
||||
//
|
||||
// このソース コードは Microsoft.VSDesigner、バージョン 2.0.50727.5466 によって自動生成されました。
|
||||
// このソース コードは Microsoft.VSDesigner、バージョン 2.0.50727.5485 によって自動生成されました。
|
||||
//
|
||||
#pragma warning disable 1591
|
||||
|
||||
@@ -118,7 +118,7 @@ namespace BuildUtil.HvSignService {
|
||||
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5420")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Web.Services.WebServiceBindingAttribute(Name="SignSoap", Namespace="http://hvsigncode/")]
|
||||
@@ -128,6 +128,8 @@ namespace BuildUtil.HvSignService {
|
||||
|
||||
private System.Threading.SendOrPostCallback ExecSignOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback ExecSignExOperationCompleted;
|
||||
|
||||
private bool useDefaultCredentialsSetExplicitly;
|
||||
|
||||
/// <remarks/>
|
||||
@@ -172,6 +174,9 @@ namespace BuildUtil.HvSignService {
|
||||
/// <remarks/>
|
||||
public event ExecSignCompletedEventHandler ExecSignCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event ExecSignExCompletedEventHandler ExecSignExCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://hvsigncode/HelloWorld", RequestNamespace="http://hvsigncode/", ResponseNamespace="http://hvsigncode/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public string HelloWorld() {
|
||||
@@ -234,6 +239,43 @@ namespace BuildUtil.HvSignService {
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://hvsigncode/ExecSignEx", RequestNamespace="http://hvsigncode/", ResponseNamespace="http://hvsigncode/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public string ExecSignEx(string src_filename, bool driver_mode, string description, int cert_id, int sha_mode) {
|
||||
object[] results = this.Invoke("ExecSignEx", new object[] {
|
||||
src_filename,
|
||||
driver_mode,
|
||||
description,
|
||||
cert_id,
|
||||
sha_mode});
|
||||
return ((string)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void ExecSignExAsync(string src_filename, bool driver_mode, string description, int cert_id, int sha_mode) {
|
||||
this.ExecSignExAsync(src_filename, driver_mode, description, cert_id, sha_mode, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void ExecSignExAsync(string src_filename, bool driver_mode, string description, int cert_id, int sha_mode, object userState) {
|
||||
if ((this.ExecSignExOperationCompleted == null)) {
|
||||
this.ExecSignExOperationCompleted = new System.Threading.SendOrPostCallback(this.OnExecSignExOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("ExecSignEx", new object[] {
|
||||
src_filename,
|
||||
driver_mode,
|
||||
description,
|
||||
cert_id,
|
||||
sha_mode}, this.ExecSignExOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnExecSignExOperationCompleted(object arg) {
|
||||
if ((this.ExecSignExCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.ExecSignExCompleted(this, new ExecSignExCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public new void CancelAsync(object userState) {
|
||||
base.CancelAsync(userState);
|
||||
@@ -254,11 +296,11 @@ namespace BuildUtil.HvSignService {
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5420")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
|
||||
public delegate void HelloWorldCompletedEventHandler(object sender, HelloWorldCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5420")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class HelloWorldCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
@@ -280,11 +322,11 @@ namespace BuildUtil.HvSignService {
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5420")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
|
||||
public delegate void ExecSignCompletedEventHandler(object sender, ExecSignCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5420")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class ExecSignCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
@@ -304,9 +346,32 @@ namespace BuildUtil.HvSignService {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
|
||||
public delegate void ExecSignExCompletedEventHandler(object sender, ExecSignExCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class ExecSignExCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal ExecSignExCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public string Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((string)(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning restore 1591
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
#pragma warning restore 1591
|
||||
@@ -29,6 +29,24 @@
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
<s:element name="ExecSignEx">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="src_filename" type="s:string" />
|
||||
<s:element minOccurs="1" maxOccurs="1" name="driver_mode" type="s:boolean" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="description" type="s:string" />
|
||||
<s:element minOccurs="1" maxOccurs="1" name="cert_id" type="s:int" />
|
||||
<s:element minOccurs="1" maxOccurs="1" name="sha_mode" type="s:int" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
<s:element name="ExecSignExResponse">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="ExecSignExResult" type="s:string" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
</s:schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="HelloWorldSoapIn">
|
||||
@@ -43,6 +61,12 @@
|
||||
<wsdl:message name="ExecSignSoapOut">
|
||||
<wsdl:part name="parameters" element="tns:ExecSignResponse" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="ExecSignExSoapIn">
|
||||
<wsdl:part name="parameters" element="tns:ExecSignEx" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="ExecSignExSoapOut">
|
||||
<wsdl:part name="parameters" element="tns:ExecSignExResponse" />
|
||||
</wsdl:message>
|
||||
<wsdl:portType name="SignSoap">
|
||||
<wsdl:operation name="HelloWorld">
|
||||
<wsdl:input message="tns:HelloWorldSoapIn" />
|
||||
@@ -52,6 +76,10 @@
|
||||
<wsdl:input message="tns:ExecSignSoapIn" />
|
||||
<wsdl:output message="tns:ExecSignSoapOut" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="ExecSignEx">
|
||||
<wsdl:input message="tns:ExecSignExSoapIn" />
|
||||
<wsdl:output message="tns:ExecSignExSoapOut" />
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
<wsdl:binding name="SignSoap" type="tns:SignSoap">
|
||||
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
@@ -73,6 +101,15 @@
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="ExecSignEx">
|
||||
<soap:operation soapAction="http://hvsigncode/ExecSignEx" style="document" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:binding name="SignSoap12" type="tns:SignSoap">
|
||||
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
@@ -94,6 +131,15 @@
|
||||
<soap12:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="ExecSignEx">
|
||||
<soap12:operation soapAction="http://hvsigncode/ExecSignEx" style="document" />
|
||||
<wsdl:input>
|
||||
<soap12:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap12:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="Sign">
|
||||
<wsdl:port name="SignSoap" binding="tns:SignSoap">
|
||||
|
||||
@@ -305,7 +305,4 @@ namespace BuildUtil.SignService {
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning restore 1591
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
#pragma warning restore 1591
|
||||
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Build Utility
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -184,7 +184,3 @@ namespace BuildUtil
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+369
-12
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Build Utility
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -181,7 +181,7 @@ namespace BuildUtil
|
||||
}
|
||||
|
||||
// Generate a version information resource
|
||||
public static void GenerateVersionInfoResource(string targetExeName, string outName, string rc_name)
|
||||
public static void GenerateVersionInfoResource(string targetExeName, string outName, string rc_name, string product_name)
|
||||
{
|
||||
int build, version;
|
||||
string name;
|
||||
@@ -199,11 +199,18 @@ namespace BuildUtil
|
||||
string exeFileName = Path.GetFileName(targetExeName);
|
||||
string internalName = Path.GetFileNameWithoutExtension(exeFileName);
|
||||
|
||||
if (Str.IsEmptyStr(product_name) == false)
|
||||
{
|
||||
body = Str.ReplaceStr(body, "$PRODUCTNAME$", product_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
#if !BU_SOFTETHER
|
||||
body = Str.ReplaceStr(body, "$PRODUCTNAME$", "PacketiX VPN");
|
||||
body = Str.ReplaceStr(body, "$PRODUCTNAME$", "PacketiX VPN");
|
||||
#else
|
||||
body = Str.ReplaceStr(body, "$PRODUCTNAME$", "SoftEther VPN");
|
||||
body = Str.ReplaceStr(body, "$PRODUCTNAME$", "SoftEther VPN");
|
||||
#endif
|
||||
}
|
||||
body = Str.ReplaceStr(body, "$INTERNALNAME$", internalName);
|
||||
body = Str.ReplaceStr(body, "$YEAR$", date.Year.ToString());
|
||||
body = Str.ReplaceStr(body, "$FILENAME$", exeFileName);
|
||||
@@ -818,6 +825,10 @@ namespace BuildUtil
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (Str.InStr(fileName, "DriverPackages", false))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (Str.InStr(fileName, "_nosign", false))
|
||||
{
|
||||
return false;
|
||||
@@ -908,14 +919,27 @@ namespace BuildUtil
|
||||
{
|
||||
|
||||
string cdfFileName = Path.Combine(dstDir, "inf.cdf");
|
||||
string cdfFileName2 = Path.Combine(dstDir, "inf2.cdf");
|
||||
string catFileName = Path.Combine(dstDir, "inf.cat");
|
||||
string catFileName2 = Path.Combine(dstDir, "inf2.cat");
|
||||
StringWriter sw = new StringWriter();
|
||||
StringWriter sw2 = new StringWriter();
|
||||
|
||||
string txt = File.ReadAllText(inf, Str.ShiftJisEncoding);
|
||||
|
||||
IO.DeleteFilesAndSubDirsInDir(dstDir);
|
||||
IO.MakeDirIfNotExists(dstDir);
|
||||
|
||||
string utility_dirname = Path.Combine(Paths.BaseDirName, @"BuildFiles\Utility");
|
||||
string makecat1 = Path.Combine(dstDir, "makecat.exe");
|
||||
string makecat2 = Path.Combine(dstDir, "makecat.exe.manifest");
|
||||
string makecat3 = Path.Combine(dstDir, "Microsoft.Windows.Build.Signing.wintrust.dll.manifest");
|
||||
string makecat4 = Path.Combine(dstDir, "wintrust.dll");
|
||||
File.Copy(Path.Combine(utility_dirname, "makecat.exe"), makecat1, true);
|
||||
File.Copy(Path.Combine(utility_dirname, "makecat.exe.manifest"), makecat2, true);
|
||||
File.Copy(Path.Combine(utility_dirname, "Microsoft.Windows.Build.Signing.wintrust.dll.manifest"), makecat3, true);
|
||||
File.Copy(Path.Combine(utility_dirname, "wintrust.dll"), makecat4, true);
|
||||
|
||||
string dst_sys_name = Path.Combine(dstDir, Path.GetFileName(sys));
|
||||
File.Copy(sys, dst_sys_name, true);
|
||||
|
||||
@@ -927,14 +951,28 @@ namespace BuildUtil
|
||||
}
|
||||
|
||||
sw.WriteLine("[CatalogHeader]");
|
||||
sw2.WriteLine("[CatalogHeader]");
|
||||
|
||||
sw.WriteLine("name=inf.cat");
|
||||
sw2.WriteLine("name=inf2.cat");
|
||||
|
||||
sw2.WriteLine("CatalogVersion=2");
|
||||
sw2.WriteLine("HashAlgorithms=SHA256");
|
||||
sw2.WriteLine("PageHashes=true");
|
||||
|
||||
sw.WriteLine();
|
||||
sw2.WriteLine();
|
||||
|
||||
sw.WriteLine("[CatalogFiles]");
|
||||
sw2.WriteLine("[CatalogFiles]");
|
||||
|
||||
sw.WriteLine("<hash>{0}={0}", Path.GetFileName(dst_sys_name));
|
||||
sw2.WriteLine("<hash>{0}={0}", Path.GetFileName(dst_sys_name));
|
||||
|
||||
if (sys6 != null)
|
||||
{
|
||||
sw.WriteLine("<hash>{0}={0}", Path.GetFileName(dst_sys6_name));
|
||||
sw2.WriteLine("<hash>{0}={0}", Path.GetFileName(dst_sys6_name));
|
||||
}
|
||||
|
||||
int i;
|
||||
@@ -982,6 +1020,7 @@ namespace BuildUtil
|
||||
File.WriteAllText(dst_inf_name, body, Str.ShiftJisEncoding);
|
||||
|
||||
sw.WriteLine("<hash>{0}={0}", Path.GetFileName(dst_inf_name));
|
||||
sw2.WriteLine("<hash>{0}={0}", Path.GetFileName(dst_inf_name));
|
||||
|
||||
if (selow)
|
||||
{
|
||||
@@ -989,28 +1028,350 @@ namespace BuildUtil
|
||||
}
|
||||
}
|
||||
sw.WriteLine();
|
||||
sw2.WriteLine();
|
||||
|
||||
File.WriteAllText(cdfFileName, sw.ToString());
|
||||
File.WriteAllText(cdfFileName2, sw2.ToString());
|
||||
|
||||
// generate catalog file
|
||||
Directory.SetCurrentDirectory(dstDir);
|
||||
ExecCommand(Paths.MakeCatFilename, string.Format("\"{0}\"", cdfFileName));
|
||||
ExecCommand(makecat1, string.Format("\"{0}\"", cdfFileName2));
|
||||
|
||||
// sign catalog file
|
||||
CodeSign.SignFile(catFileName, catFileName, "Catalog File", false);
|
||||
CodeSign.SignFile(catFileName2, catFileName2, "Catalog File", false);
|
||||
|
||||
// delete cdf file
|
||||
File.Delete(cdfFileName);
|
||||
File.Delete(cdfFileName2);
|
||||
|
||||
// delete sys file
|
||||
File.Delete(dst_sys_name);
|
||||
|
||||
File.Delete(makecat1);
|
||||
File.Delete(makecat2);
|
||||
File.Delete(makecat3);
|
||||
File.Delete(makecat4);
|
||||
|
||||
if (sys6 != null)
|
||||
{
|
||||
File.Delete(dst_sys6_name);
|
||||
}
|
||||
}
|
||||
|
||||
static string process_inf_file(string src_inf_txt, int build, int ver, DateTime date, string sys_name, string name, string catfile, bool replace_mac_address)
|
||||
{
|
||||
string body = src_inf_txt;
|
||||
|
||||
if (Str.IsEmptyStr(sys_name) == false)
|
||||
{
|
||||
body = Str.ReplaceStr(body, "$TAG_SYS_NAME$", sys_name);
|
||||
}
|
||||
if (Str.IsEmptyStr(name) == false)
|
||||
{
|
||||
body = Str.ReplaceStr(body, "$TAG_INSTANCE_NAME$", name);
|
||||
}
|
||||
if (replace_mac_address)
|
||||
{
|
||||
body = Str.ReplaceStr(body, "$TAG_MAC_ADDRESS$", "000001000001");
|
||||
}
|
||||
body = Str.ReplaceStr(body, "$YEAR$", date.Year.ToString("D4"));
|
||||
body = Str.ReplaceStr(body, "$MONTH$", date.Month.ToString("D2"));
|
||||
body = Str.ReplaceStr(body, "$DAY$", date.Day.ToString("D2"));
|
||||
body = Str.ReplaceStr(body, "$VER_MAJOR$", (ver / 100).ToString());
|
||||
body = Str.ReplaceStr(body, "$VER_MINOR$", (ver % 100).ToString());
|
||||
body = Str.ReplaceStr(body, "$VER_BUILD$", build.ToString());
|
||||
|
||||
if (Str.IsEmptyStr(catfile) == false)
|
||||
{
|
||||
body = Str.ReplaceStr(body, "$CATALOG_FILENAME$", catfile);
|
||||
body = Str.ReplaceStr(body, ";CatalogFile.NT", "CatalogFile.NT");
|
||||
}
|
||||
|
||||
body += "\r\n; Auto Generated " + Str.DateTimeToStrShortWithMilliSecs(DateTime.Now) + "\r\n\r\n";
|
||||
|
||||
return body;
|
||||
}
|
||||
|
||||
static void make_cat_file(string dir, string[] filename_list, string catname, bool win8, bool no_sign)
|
||||
{
|
||||
string utility_dirname = Path.Combine(Paths.BaseDirName, @"BuildFiles\Utility");
|
||||
string makecat1 = Path.Combine(dir, "makecat.exe");
|
||||
string makecat2 = Path.Combine(dir, "makecat.exe.manifest");
|
||||
string makecat3 = Path.Combine(dir, "Microsoft.Windows.Build.Signing.wintrust.dll.manifest");
|
||||
string makecat4 = Path.Combine(dir, "wintrust.dll");
|
||||
File.Copy(Path.Combine(utility_dirname, "makecat.exe"), makecat1, true);
|
||||
File.Copy(Path.Combine(utility_dirname, "makecat.exe.manifest"), makecat2, true);
|
||||
File.Copy(Path.Combine(utility_dirname, "Microsoft.Windows.Build.Signing.wintrust.dll.manifest"), makecat3, true);
|
||||
File.Copy(Path.Combine(utility_dirname, "wintrust.dll"), makecat4, true);
|
||||
|
||||
StringWriter sw2 = new StringWriter();
|
||||
sw2.WriteLine("[CatalogHeader]");
|
||||
sw2.WriteLine("name=" + catname);
|
||||
|
||||
if (win8)
|
||||
{
|
||||
sw2.WriteLine("CatalogVersion=2");
|
||||
sw2.WriteLine("HashAlgorithms=SHA256");
|
||||
sw2.WriteLine("PageHashes=true");
|
||||
}
|
||||
|
||||
sw2.WriteLine();
|
||||
|
||||
sw2.WriteLine("[CatalogFiles]");
|
||||
|
||||
foreach (string filename in filename_list)
|
||||
{
|
||||
sw2.WriteLine("<hash>{0}={0}", filename);
|
||||
}
|
||||
|
||||
sw2.WriteLine();
|
||||
|
||||
string cdf_file_name = catname + ".cdf";
|
||||
|
||||
Directory.SetCurrentDirectory(dir);
|
||||
|
||||
File.WriteAllText(cdf_file_name, sw2.ToString());
|
||||
ExecCommand(makecat1, string.Format("\"{0}\"", cdf_file_name));
|
||||
|
||||
if (no_sign == false)
|
||||
{
|
||||
CodeSign.SignFile(catname, catname, "Catalog File", false);
|
||||
}
|
||||
|
||||
File.Delete(cdf_file_name);
|
||||
|
||||
File.Delete(makecat1);
|
||||
File.Delete(makecat2);
|
||||
File.Delete(makecat3);
|
||||
File.Delete(makecat4);
|
||||
}
|
||||
|
||||
public static void MakeDriverPackage()
|
||||
{
|
||||
int build, version;
|
||||
string buildname;
|
||||
DateTime date;
|
||||
int i;
|
||||
|
||||
ReadBuildInfoFromTextFile(out build, out version, out buildname, out date);
|
||||
|
||||
date = date.AddDays(-1);
|
||||
|
||||
string dst_dir = Path.Combine(Paths.BaseDirName, @"tmp\MakeDriverPackage");
|
||||
string src_dir = Path.Combine(Paths.BaseDirName, @"BuiltDriverPackages");
|
||||
IO.DeleteFilesAndSubDirsInDir(dst_dir);
|
||||
IO.MakeDirIfNotExists(dst_dir);
|
||||
|
||||
// Neo9x x86
|
||||
IO.MakeDir(Path.Combine(dst_dir, @"Neo9x\x86"));
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Neo9x\x86\Neo9x_x86.inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo9x\x86\Neo9x_x86.inf")), build, version, date, null, null, null, false), Str.ShiftJisEncoding, false);
|
||||
IO.FileCopy(Path.Combine(src_dir, @"Neo9x\x86\Neo9x_x86.sys"), Path.Combine(dst_dir, @"Neo9x\x86\Neo9x_x86.sys"));
|
||||
|
||||
// Neo x86
|
||||
IO.MakeDir(Path.Combine(dst_dir, @"Neo\x86"));
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Neo\x86\Neo_x86.inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo\x86\Neo_x86.inf")), build, version, date, null, null, null, false), Str.ShiftJisEncoding, false);
|
||||
IO.FileCopy(Path.Combine(src_dir, @"Neo\x86\Neo_x86.sys"), Path.Combine(dst_dir, @"Neo\x86\Neo_x86.sys"));
|
||||
|
||||
// Neo x64
|
||||
IO.MakeDir(Path.Combine(dst_dir, @"Neo\x64"));
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Neo\x64\Neo_x64.inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo\x64\Neo_x64.inf")), build, version, date, null, null, null, false), Str.ShiftJisEncoding, false);
|
||||
IO.FileCopy(Path.Combine(src_dir, @"Neo\x64\Neo_x64.sys"), Path.Combine(dst_dir, @"Neo\x64\Neo_x64.sys"));
|
||||
|
||||
// Neo6 x86
|
||||
IO.MakeDir(Path.Combine(dst_dir, @"Neo6\x86"));
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Neo6\x86\Neo6_x86.inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo6\x86\Neo6_x86.inf")), build, version, date, null, null, null, false), Str.ShiftJisEncoding, false);
|
||||
IO.FileCopy(Path.Combine(src_dir, @"Neo6\x86\Neo6_x86.sys"), Path.Combine(dst_dir, @"Neo6\x86\Neo6_x86.sys"));
|
||||
|
||||
// Neo6 x64
|
||||
IO.MakeDir(Path.Combine(dst_dir, @"Neo6\x64"));
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Neo6\x64\Neo6_x64.inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo6\x64\Neo6_x64.inf")), build, version, date, null, null, null, false), Str.ShiftJisEncoding, false);
|
||||
IO.FileCopy(Path.Combine(src_dir, @"Neo6\x64\Neo6_x64.sys"), Path.Combine(dst_dir, @"Neo6\x64\Neo6_x64.sys"));
|
||||
|
||||
// Neo6 for Windows 8 x86
|
||||
IO.MakeDir(Path.Combine(dst_dir, @"Neo6_Win8\x86"));
|
||||
List<string> cat_src_filename = new List<string>();
|
||||
cat_src_filename.Add("Neo6_x86.sys");
|
||||
for (i = 1; i < 128; i++)
|
||||
{
|
||||
string name = "VPN";
|
||||
if (i >= 2)
|
||||
{
|
||||
name += i.ToString();
|
||||
}
|
||||
string sys_name = "Neo_" + name + ".sys";
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Neo6_Win8\x86\Neo6_x86_" + name + ".inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo6\x86\Neo6_x86.inf")), build, version, date, sys_name, name, string.Format("inf_{0}.cat", name), true), Str.ShiftJisEncoding, false);
|
||||
cat_src_filename.Add("Neo6_x86_" + name + ".inf");
|
||||
}
|
||||
IO.FileCopy(Path.Combine(src_dir, @"Neo6\x86\Neo6_x86.sys"), Path.Combine(dst_dir, @"Neo6_Win8\x86\Neo6_x86.sys"));
|
||||
make_cat_file(Path.Combine(dst_dir, @"Neo6_Win8\x86"), cat_src_filename.ToArray(), "inf.cat", false, false);
|
||||
make_cat_file(Path.Combine(dst_dir, @"Neo6_Win8\x86"), cat_src_filename.ToArray(), "inf2.cat", true, false);
|
||||
|
||||
// Neo6 for Windows 8 x64
|
||||
IO.MakeDir(Path.Combine(dst_dir, @"Neo6_Win8\x64"));
|
||||
cat_src_filename = new List<string>();
|
||||
cat_src_filename.Add("Neo6_x64.sys");
|
||||
for (i = 1; i < 128; i++)
|
||||
{
|
||||
string name = "VPN";
|
||||
if (i >= 2)
|
||||
{
|
||||
name += i.ToString();
|
||||
}
|
||||
string sys_name = "Neo_" + name + ".sys";
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Neo6_Win8\x64\Neo6_x64_" + name + ".inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo6\x64\Neo6_x64.inf")), build, version, date, sys_name, name, string.Format("inf_{0}.cat", name), true), Str.ShiftJisEncoding, false);
|
||||
cat_src_filename.Add("Neo6_x64_" + name + ".inf");
|
||||
}
|
||||
IO.FileCopy(Path.Combine(src_dir, @"Neo6\x64\Neo6_x64.sys"), Path.Combine(dst_dir, @"Neo6_Win8\x64\Neo6_x64.sys"));
|
||||
make_cat_file(Path.Combine(dst_dir, @"Neo6_Win8\x64"), cat_src_filename.ToArray(), "inf.cat", false, false);
|
||||
make_cat_file(Path.Combine(dst_dir, @"Neo6_Win8\x64"), cat_src_filename.ToArray(), "inf2.cat", true, false);
|
||||
|
||||
// Neo6 for Windows 10 x86
|
||||
IO.MakeDir(Path.Combine(dst_dir, @"Neo6_Win10\x86"));
|
||||
for (i = 1; i < 128; i++)
|
||||
{
|
||||
string name = "VPN";
|
||||
if (i >= 2)
|
||||
{
|
||||
name += i.ToString();
|
||||
}
|
||||
cat_src_filename = new List<string>();
|
||||
cat_src_filename.Add("Neo6_x86_" + name + ".sys");
|
||||
string sys_name = "Neo6_x86_" + name + ".sys";
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Neo6_Win10\x86\Neo6_x86_" + name + ".inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo6\x86\Neo6_x86.inf")), build, version, date, sys_name, name, string.Format("Neo6_x86_{0}.cat", name), true), Str.ShiftJisEncoding, false);
|
||||
cat_src_filename.Add("Neo6_x86_" + name + ".inf");
|
||||
IO.FileCopy(Path.Combine(src_dir, @"Neo6\x86\Neo6_x86_win10.sys"), Path.Combine(dst_dir, @"Neo6_Win10\x86\Neo6_x86_" + name + ".sys"));
|
||||
make_cat_file(Path.Combine(dst_dir, @"Neo6_Win10\x86"), cat_src_filename.ToArray(), "Neo6_x86_" + name + ".cat", true, true);
|
||||
}
|
||||
|
||||
// Neo6 for Windows 10 x64
|
||||
IO.MakeDir(Path.Combine(dst_dir, @"Neo6_Win10\x64"));
|
||||
for (i = 1; i < 128; i++)
|
||||
{
|
||||
string name = "VPN";
|
||||
if (i >= 2)
|
||||
{
|
||||
name += i.ToString();
|
||||
}
|
||||
cat_src_filename = new List<string>();
|
||||
cat_src_filename.Add("Neo6_x64_" + name + ".sys");
|
||||
string sys_name = "Neo6_x64_" + name + ".sys";
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Neo6_Win10\x64\Neo6_x64_" + name + ".inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo6\x64\Neo6_x64.inf")), build, version, date, sys_name, name, string.Format("Neo6_x64_{0}.cat", name), true), Str.ShiftJisEncoding, false);
|
||||
cat_src_filename.Add("Neo6_x64_" + name + ".inf");
|
||||
IO.FileCopy(Path.Combine(src_dir, @"Neo6\x64\Neo6_x64_win10.sys"), Path.Combine(dst_dir, @"Neo6_Win10\x64\Neo6_x64_" + name + ".sys"));
|
||||
make_cat_file(Path.Combine(dst_dir, @"Neo6_Win10\x64"), cat_src_filename.ToArray(), "Neo6_x64_" + name + ".cat", true, true);
|
||||
}
|
||||
|
||||
IO.CopyDir(Path.Combine(src_dir, "See"), Path.Combine(dst_dir, "See"), null, false, false);
|
||||
|
||||
// SeLow x86 for Windows 8.1
|
||||
IO.MakeDir(Path.Combine(dst_dir, @"SeLow_Win8\x86"));
|
||||
cat_src_filename = new List<string>();
|
||||
cat_src_filename.Add("SeLow_x86.sys");
|
||||
cat_src_filename.Add("SeLow_x86.inf");
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"SeLow_Win8\x86\SeLow_x86.inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"SeLow\x86\SeLow_x86.inf")), build, version, date, null, null, "SeLow_Win8_x86.cat", false), Str.ShiftJisEncoding, false);
|
||||
IO.FileCopy(Path.Combine(src_dir, @"SeLow\x86\SeLow_x86.sys"), Path.Combine(dst_dir, @"SeLow_Win8\x86\SeLow_x86.sys"));
|
||||
make_cat_file(Path.Combine(dst_dir, @"SeLow_Win8\x86"), cat_src_filename.ToArray(), "inf.cat", false, false);
|
||||
make_cat_file(Path.Combine(dst_dir, @"SeLow_Win8\x86"), cat_src_filename.ToArray(), "inf2.cat", true, false);
|
||||
|
||||
// SeLow x64 for Windows 8.1
|
||||
IO.MakeDir(Path.Combine(dst_dir, @"SeLow_Win8\x64"));
|
||||
cat_src_filename = new List<string>();
|
||||
cat_src_filename.Add("SeLow_x64.sys");
|
||||
cat_src_filename.Add("SeLow_x64.inf");
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"SeLow_Win8\x64\SeLow_x64.inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"SeLow\x64\SeLow_x64.inf")), build, version, date, null, null, "SeLow_Win8_x64.cat", false), Str.ShiftJisEncoding, false);
|
||||
IO.FileCopy(Path.Combine(src_dir, @"SeLow\x64\SeLow_x64.sys"), Path.Combine(dst_dir, @"SeLow_Win8\x64\SeLow_x64.sys"));
|
||||
make_cat_file(Path.Combine(dst_dir, @"SeLow_Win8\x64"), cat_src_filename.ToArray(), "inf.cat", false, false);
|
||||
make_cat_file(Path.Combine(dst_dir, @"SeLow_Win8\x64"), cat_src_filename.ToArray(), "inf2.cat", true, false);
|
||||
|
||||
// SeLow x86 for Windows 10
|
||||
IO.MakeDir(Path.Combine(dst_dir, @"SeLow_Win10\x86"));
|
||||
cat_src_filename = new List<string>();
|
||||
cat_src_filename.Add("SeLow_x86.sys");
|
||||
cat_src_filename.Add("SeLow_x86.inf");
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"SeLow_Win10\x86\SeLow_x86.inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"SeLow\x86\SeLow_x86.inf")), build, version, date, null, null, "SeLow_Win10_x86.cat", false), Str.ShiftJisEncoding, false);
|
||||
IO.FileCopy(Path.Combine(src_dir, @"SeLow\x86\SeLow_x86_win10.sys"), Path.Combine(dst_dir, @"SeLow_Win10\x86\SeLow_x86.sys"));
|
||||
make_cat_file(Path.Combine(dst_dir, @"SeLow_Win10\x86"), cat_src_filename.ToArray(), "SeLow_Win10_x86.cat", true, false);
|
||||
|
||||
// SeLow x64 for Windows 10
|
||||
IO.MakeDir(Path.Combine(dst_dir, @"SeLow_Win10\x64"));
|
||||
cat_src_filename = new List<string>();
|
||||
cat_src_filename.Add("SeLow_x64.sys");
|
||||
cat_src_filename.Add("SeLow_x64.inf");
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"SeLow_Win10\x64\SeLow_x64.inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"SeLow\x64\SeLow_x64.inf")), build, version, date, null, null, "SeLow_Win10_x64.cat", false), Str.ShiftJisEncoding, false);
|
||||
IO.FileCopy(Path.Combine(src_dir, @"SeLow\x64\SeLow_x64_win10.sys"), Path.Combine(dst_dir, @"SeLow_Win10\x64\SeLow_x64.sys"));
|
||||
make_cat_file(Path.Combine(dst_dir, @"SeLow_Win10\x64"), cat_src_filename.ToArray(), "SeLow_Win10_x64.cat", true, false);
|
||||
|
||||
// Wfp x86
|
||||
IO.MakeDir(Path.Combine(dst_dir, @"Wfp\x86"));
|
||||
cat_src_filename = new List<string>();
|
||||
cat_src_filename.Add("pxwfp_x86.sys");
|
||||
cat_src_filename.Add("pxwfp_x86.inf");
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Wfp\x86\pxwfp_x86.inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Wfp\x86\pxwfp_x86.inf")), build, version, date, null, null, "pxwfp_x86.cat", false), Str.ShiftJisEncoding, false);
|
||||
IO.FileCopy(Path.Combine(src_dir, @"Wfp\x86\pxwfp_x86.sys"), Path.Combine(dst_dir, @"Wfp\x86\pxwfp_x86.sys"));
|
||||
make_cat_file(Path.Combine(dst_dir, @"Wfp\x86"), cat_src_filename.ToArray(), "inf.cat", false, false);
|
||||
make_cat_file(Path.Combine(dst_dir, @"Wfp\x86"), cat_src_filename.ToArray(), "inf2.cat", true, false);
|
||||
|
||||
// Wfp x64
|
||||
IO.MakeDir(Path.Combine(dst_dir, @"Wfp\x64"));
|
||||
cat_src_filename = new List<string>();
|
||||
cat_src_filename.Add("pxwfp_x64.sys");
|
||||
cat_src_filename.Add("pxwfp_x64.inf");
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Wfp\x64\pxwfp_x64.inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Wfp\x64\pxwfp_x64.inf")), build, version, date, null, null, "pxwfp_x64.cat", false), Str.ShiftJisEncoding, false);
|
||||
IO.FileCopy(Path.Combine(src_dir, @"Wfp\x64\pxwfp_x64.sys"), Path.Combine(dst_dir, @"Wfp\x64\pxwfp_x64.sys"));
|
||||
make_cat_file(Path.Combine(dst_dir, @"Wfp\x64"), cat_src_filename.ToArray(), "inf.cat", false, false);
|
||||
make_cat_file(Path.Combine(dst_dir, @"Wfp\x64"), cat_src_filename.ToArray(), "inf2.cat", true, false);
|
||||
|
||||
// Wfp x86 for Windows 10
|
||||
IO.MakeDir(Path.Combine(dst_dir, @"Wfp_Win10\x86"));
|
||||
cat_src_filename = new List<string>();
|
||||
cat_src_filename.Add("pxwfp_x86.sys");
|
||||
cat_src_filename.Add("pxwfp_x86.inf");
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Wfp_Win10\x86\pxwfp_x86.inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Wfp\x86\pxwfp_x86.inf")), build, version, date, null, null, "pxwfp_Win10_x86.cat", false), Str.ShiftJisEncoding, false);
|
||||
IO.FileCopy(Path.Combine(src_dir, @"Wfp\x86\pxwfp_x86_win10.sys"), Path.Combine(dst_dir, @"Wfp_Win10\x86\pxwfp_x86.sys"));
|
||||
make_cat_file(Path.Combine(dst_dir, @"Wfp_Win10\x86"), cat_src_filename.ToArray(), "pxwfp_Win10_x86.cat", true, false);
|
||||
|
||||
// Wfp x64 for Windows 10
|
||||
IO.MakeDir(Path.Combine(dst_dir, @"Wfp_Win10\x64"));
|
||||
cat_src_filename = new List<string>();
|
||||
cat_src_filename.Add("pxwfp_x64.sys");
|
||||
cat_src_filename.Add("pxwfp_x64.inf");
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Wfp_Win10\x64\pxwfp_x64.inf"),
|
||||
process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Wfp\x64\pxwfp_x64.inf")), build, version, date, null, null, "pxwfp_Win10_x64.cat", false), Str.ShiftJisEncoding, false);
|
||||
IO.FileCopy(Path.Combine(src_dir, @"Wfp\x64\pxwfp_x64_win10.sys"), Path.Combine(dst_dir, @"Wfp_Win10\x64\pxwfp_x64.sys"));
|
||||
make_cat_file(Path.Combine(dst_dir, @"Wfp_Win10\x64"), cat_src_filename.ToArray(), "pxwfp_Win10_x64.cat", true, false);
|
||||
|
||||
string tmp_body = IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, "make_whql_submission.cm_"));
|
||||
tmp_body = Str.ReplaceStr(tmp_body, "test_tag", Str.DateTimeToStrShort(DateTime.Now) + "_Build_" + build.ToString());
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, "make_whql_submission.cmd"), tmp_body, Str.ShiftJisEncoding);
|
||||
|
||||
IO.FileCopy(Path.Combine(src_dir, "2_merge_whql_sign.cm_"), Path.Combine(dst_dir, "2_merge_whql_sign.cm_"));
|
||||
|
||||
tmp_body = IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, "Memo.txt"));
|
||||
tmp_body = Str.ReplaceStr(tmp_body, "tag_ver", (version / 100).ToString() + "." + (version % 100).ToString());
|
||||
tmp_body = Str.ReplaceStr(tmp_body, "tag_build", build.ToString());
|
||||
IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, "Memo.txt"), tmp_body, Str.ShiftJisEncoding);
|
||||
|
||||
Kernel.Run(Path.Combine(Env.WindowsDir, "explorer.exe"), "\"" + dst_dir + "\"");
|
||||
}
|
||||
|
||||
// Sign for all binary files (series mode)
|
||||
public static void SignAllBinaryFilesSerial()
|
||||
{
|
||||
@@ -1087,7 +1448,3 @@ namespace BuildUtil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+5
-9
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -1448,7 +1448,3 @@ int CompareUserName(void *p1, void *p2)
|
||||
return StrCmpi(u1->Name, u2->Name);
|
||||
}
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+5
-9
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -317,7 +317,3 @@ char *NormalizePolicyName(char *name);
|
||||
#endif // ACCOUNT_H
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+11
-15
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Contributors:
|
||||
// - ELIN (https://github.com/el1n)
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
@@ -1166,7 +1166,7 @@ UINT StMakeOpenVpnConfigFile(ADMIN *a, RPC_READ_LOG_FILE *t)
|
||||
|
||||
name = NewName(cn, cn, cn, L"US", NULL, NULL);
|
||||
|
||||
dummy_x = NewRootX(dummy_public_k, dummy_private_k, name, MAX(GetDaysUntil2038(), SERVER_DEFAULT_CERT_DAYS), NULL);
|
||||
dummy_x = NewRootX(dummy_public_k, dummy_private_k, name, GetDaysUntil2038Ex(), NULL);
|
||||
|
||||
FreeName(name);
|
||||
|
||||
@@ -6739,7 +6739,7 @@ UINT StAddCa(ADMIN *a, RPC_HUB_ADD_CA *t)
|
||||
|
||||
if (t->Cert == NULL)
|
||||
{
|
||||
ERR_INVALID_PARAMETER;
|
||||
return ERR_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if (t->Cert->is_compatible_bit == false)
|
||||
@@ -11840,12 +11840,12 @@ void InRpcHubEnumCa(RPC_HUB_ENUM_CA *t, PACK *p)
|
||||
void OutRpcHubEnumCa(PACK *p, RPC_HUB_ENUM_CA *t)
|
||||
{
|
||||
UINT i;
|
||||
PackAddStr(p, "HubName", t->HubName);
|
||||
// Validate arguments
|
||||
if (t == NULL || p == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
PackAddStr(p, "HubName", t->HubName);
|
||||
|
||||
for (i = 0;i < t->NumCa;i++)
|
||||
{
|
||||
@@ -12313,12 +12313,12 @@ void InRpcEnumAccessList(RPC_ENUM_ACCESS_LIST *a, PACK *p)
|
||||
void OutRpcEnumAccessList(PACK *p, RPC_ENUM_ACCESS_LIST *a)
|
||||
{
|
||||
UINT i;
|
||||
PackAddStr(p, "HubName", a->HubName);
|
||||
// Validate arguments
|
||||
if (a == NULL || p == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
PackAddStr(p, "HubName", a->HubName);
|
||||
|
||||
for (i = 0;i < a->NumAccess;i++)
|
||||
{
|
||||
@@ -12573,12 +12573,12 @@ void InRpcEnumUser(RPC_ENUM_USER *t, PACK *p)
|
||||
void OutRpcEnumUser(PACK *p, RPC_ENUM_USER *t)
|
||||
{
|
||||
UINT i;
|
||||
PackAddStr(p, "HubName", t->HubName);
|
||||
// Validate arguments
|
||||
if (t == NULL || p == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
PackAddStr(p, "HubName", t->HubName);
|
||||
|
||||
for (i = 0;i < t->NumUser;i++)
|
||||
{
|
||||
@@ -12787,12 +12787,12 @@ void InRpcEnumSession(RPC_ENUM_SESSION *t, PACK *p)
|
||||
void OutRpcEnumSession(PACK *p, RPC_ENUM_SESSION *t)
|
||||
{
|
||||
UINT i;
|
||||
PackAddStr(p, "HubName", t->HubName);
|
||||
// Validate arguments
|
||||
if (t == NULL || p == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
PackAddStr(p, "HubName", t->HubName);
|
||||
|
||||
for (i = 0;i < t->NumSession;i++)
|
||||
{
|
||||
@@ -13907,7 +13907,3 @@ bool SiIsEmptyPassword(void *hash_password)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+5
-9
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -1533,7 +1533,3 @@ void OutRpcInternetSetting(PACK *p, INTERNET_SETTING *t);
|
||||
#endif // ADMIN_H
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+7
-10
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -205,7 +205,8 @@ void AcWaitForRequest(AZURE_CLIENT *ac, SOCK *s, AZURE_PARAM *param)
|
||||
BinToStr(server_cert_hash_str, sizeof(server_cert_hash_str),
|
||||
server_cert_hash, SHA1_SIZE);
|
||||
|
||||
if (IsEmptyStr(ac->DDnsStatusCopy.AzureCertHash) || StrCmpi(server_cert_hash_str, ac->DDnsStatusCopy.AzureCertHash) == 0)
|
||||
if (IsEmptyStr(ac->DDnsStatusCopy.AzureCertHash) || StrCmpi(server_cert_hash_str, ac->DDnsStatusCopy.AzureCertHash) == 0
|
||||
|| StrCmpi(server_cert_hash_str, ac->DDnsStatus.AzureCertHash) == 0)
|
||||
{
|
||||
if (SendAll(ns, AZURE_PROTOCOL_DATA_SIANGTURE, 24, true))
|
||||
{
|
||||
@@ -682,7 +683,3 @@ AZURE_CLIENT *NewAzureClient(CEDAR *cedar, SERVER *server)
|
||||
return ac;
|
||||
}
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -173,7 +173,3 @@ void AcWaitForRequest(AZURE_CLIENT *ac, SOCK *s, AZURE_PARAM *param);
|
||||
#endif // AZURE_CLIENT_H
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -114,7 +114,3 @@
|
||||
#include "CedarPch.h"
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -118,7 +118,3 @@
|
||||
#endif // AZURE_SERVER_H
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+14
-8
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -556,7 +556,13 @@ BRIDGE *BrNewBridge(HUB *h, char *name, POLICY *p, bool local, bool monitor, boo
|
||||
return b;
|
||||
}
|
||||
|
||||
// Raw IP bridge is supported only on Linux
|
||||
bool IsRawIpBridgeSupported()
|
||||
{
|
||||
#ifdef UNIX_LINUX
|
||||
return true;
|
||||
#else // UNIX_LINUX
|
||||
return false;
|
||||
#endif // UNIX_LINUX
|
||||
}
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+9
-9
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -126,6 +126,9 @@
|
||||
|
||||
#endif // OS_WIN32
|
||||
|
||||
// Constants
|
||||
#define BRIDGE_SPECIAL_IPRAW_NAME "ipv4_rawsocket_virtual_router"
|
||||
|
||||
// Bridge
|
||||
struct BRIDGE
|
||||
{
|
||||
@@ -171,12 +174,9 @@ bool DeleteLocalBridge(CEDAR *c, char *hubname, char *devicename);
|
||||
bool IsBridgeSupported();
|
||||
bool IsNeedWinPcap();
|
||||
UINT GetEthDeviceHash();
|
||||
bool IsRawIpBridgeSupported();
|
||||
|
||||
#endif // BRIDGE_H
|
||||
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+796
-12
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -374,7 +374,7 @@ TOKEN_LIST *GetEthListSolaris()
|
||||
|
||||
#ifdef UNIX_LINUX
|
||||
// Get Ethernet device list on Linux
|
||||
TOKEN_LIST *GetEthListLinux()
|
||||
TOKEN_LIST *GetEthListLinux(bool enum_normal, bool enum_rawip)
|
||||
{
|
||||
struct ifreq ifr;
|
||||
TOKEN_LIST *t;
|
||||
@@ -383,6 +383,11 @@ TOKEN_LIST *GetEthListLinux()
|
||||
LIST *o;
|
||||
char name[MAX_SIZE];
|
||||
|
||||
if (enum_normal == false && enum_rawip)
|
||||
{
|
||||
return ParseToken(BRIDGE_SPECIAL_IPRAW_NAME, NULL);
|
||||
}
|
||||
|
||||
o = NewListFast(CompareStr);
|
||||
|
||||
s = UnixEthOpenRawSocket();
|
||||
@@ -431,7 +436,7 @@ TOKEN_LIST *GetEthListLinux()
|
||||
Sort(o);
|
||||
|
||||
t = ZeroMalloc(sizeof(TOKEN_LIST));
|
||||
t->NumTokens = LIST_NUM(o);
|
||||
t->NumTokens = LIST_NUM(o) + (enum_rawip ? 1 : 0);
|
||||
t->Token = ZeroMalloc(sizeof(char *) * t->NumTokens);
|
||||
|
||||
for (i = 0;i < LIST_NUM(o);i++)
|
||||
@@ -440,6 +445,11 @@ TOKEN_LIST *GetEthListLinux()
|
||||
t->Token[i] = name;
|
||||
}
|
||||
|
||||
if (enum_rawip)
|
||||
{
|
||||
t->Token[t->NumTokens - 1] = CopyStr(BRIDGE_SPECIAL_IPRAW_NAME);
|
||||
}
|
||||
|
||||
ReleaseList(o);
|
||||
|
||||
return t;
|
||||
@@ -542,11 +552,15 @@ TOKEN_LIST *GetEthListBpf()
|
||||
|
||||
// Enumerate Ethernet devices
|
||||
TOKEN_LIST *GetEthList()
|
||||
{
|
||||
return GetEthListEx(NULL, true, false);
|
||||
}
|
||||
TOKEN_LIST *GetEthListEx(UINT *total_num_including_hidden, bool enum_normal, bool enum_rawip)
|
||||
{
|
||||
TOKEN_LIST *t = NULL;
|
||||
|
||||
#if defined(UNIX_LINUX)
|
||||
t = GetEthListLinux();
|
||||
t = GetEthListLinux(enum_normal, enum_rawip);
|
||||
#elif defined(UNIX_SOLARIS)
|
||||
t = GetEthListSolaris();
|
||||
#elif defined(BRIDGE_PCAP)
|
||||
@@ -575,6 +589,11 @@ ETH *OpenEthLinux(char *name, bool local, bool tapmode, char *tapaddr)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (StrCmpi(name, BRIDGE_SPECIAL_IPRAW_NAME) == 0)
|
||||
{
|
||||
return OpenEthLinuxIpRaw();
|
||||
}
|
||||
|
||||
if (tapmode)
|
||||
{
|
||||
#ifndef NO_VLAN
|
||||
@@ -732,6 +751,10 @@ UINT EthGetMtu(ETH *e)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
if (e->IsRawIpMode)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (e->CurrentMtu != 0)
|
||||
{
|
||||
@@ -802,6 +825,10 @@ bool EthSetMtu(ETH *e, UINT mtu)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (e->IsRawIpMode)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mtu == 0)
|
||||
{
|
||||
@@ -865,6 +892,11 @@ bool EthIsChangeMtuSupported(ETH *e)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (e->IsRawIpMode)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
#else // defined(UNIX_LINUX) || defined(UNIX_BSD) || defined(UNIX_SOLARIS)
|
||||
return false;
|
||||
@@ -1526,6 +1558,13 @@ void CloseEth(ETH *e)
|
||||
return;
|
||||
}
|
||||
|
||||
if (e->IsRawIpMode)
|
||||
{
|
||||
CloseEthLinuxIpRaw(e);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (e->Tap != NULL)
|
||||
{
|
||||
#ifndef NO_VLAN
|
||||
@@ -1647,6 +1686,11 @@ UINT EthGetPacketLinux(ETH *e, void **data)
|
||||
return INFINITE;
|
||||
}
|
||||
|
||||
if (e->IsRawIpMode)
|
||||
{
|
||||
return EthGetPacketLinuxIpRaw(e, data);
|
||||
}
|
||||
|
||||
if (e->Tap != NULL)
|
||||
{
|
||||
#ifndef NO_VLAN
|
||||
@@ -1949,6 +1993,11 @@ void EthPutPacket(ETH *e, void *data, UINT size)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (e->IsRawIpMode)
|
||||
{
|
||||
EthPutPacketLinuxIpRaw(e, data, size);
|
||||
return;
|
||||
}
|
||||
if (size < 14 || size > MAX_PACKET_SIZE)
|
||||
{
|
||||
Free(data);
|
||||
@@ -2017,10 +2066,745 @@ void EthPutPacket(ETH *e, void *data, UINT size)
|
||||
Free(data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Open ETH by using IP raw packets
|
||||
ETH *OpenEthLinuxIpRaw()
|
||||
{
|
||||
ETH *e;
|
||||
|
||||
if (IsRawIpBridgeSupported() == false)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
e = ZeroMalloc(sizeof(ETH));
|
||||
|
||||
e->IsRawIpMode = true;
|
||||
|
||||
e->RawTcp = NewUDP4(MAKE_SPECIAL_PORT(IPPROTO_TCP), NULL);
|
||||
e->RawUdp = NewUDP4(MAKE_SPECIAL_PORT(IPPROTO_UDP), NULL);
|
||||
e->RawIcmp = NewUDP4(MAKE_SPECIAL_PORT(IPPROTO_ICMP), NULL);
|
||||
|
||||
if (e->RawTcp == NULL || e->RawUdp == NULL || e->RawIcmp == NULL)
|
||||
{
|
||||
ReleaseSock(e->RawTcp);
|
||||
ReleaseSock(e->RawUdp);
|
||||
ReleaseSock(e->RawIcmp);
|
||||
|
||||
Free(e);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ClearSockDfBit(e->RawTcp);
|
||||
ClearSockDfBit(e->RawUdp);
|
||||
ClearSockDfBit(e->RawIcmp);
|
||||
|
||||
SetRawSockHeaderIncludeOption(e->RawTcp, true);
|
||||
SetRawSockHeaderIncludeOption(e->RawUdp, true);
|
||||
SetRawSockHeaderIncludeOption(e->RawIcmp, true);
|
||||
|
||||
e->Name = CopyStr(BRIDGE_SPECIAL_IPRAW_NAME);
|
||||
e->Title = CopyStr(BRIDGE_SPECIAL_IPRAW_NAME);
|
||||
e->Cancel = NewCancel();
|
||||
|
||||
UnixDeletePipe(e->Cancel->pipe_read, e->Cancel->pipe_write);
|
||||
e->Cancel->pipe_read = e->Cancel->pipe_write = -1;
|
||||
|
||||
UnixSetSocketNonBlockingMode(e->RawTcp->socket, true);
|
||||
UnixSetSocketNonBlockingMode(e->RawUdp->socket, true);
|
||||
UnixSetSocketNonBlockingMode(e->RawIcmp->socket, true);
|
||||
|
||||
e->Cancel->SpecialFlag = true;
|
||||
e->Cancel->pipe_read = e->RawTcp->socket;
|
||||
e->Cancel->pipe_special_read2 = e->RawUdp->socket;
|
||||
e->Cancel->pipe_special_read3 = e->RawIcmp->socket;
|
||||
|
||||
e->RawIpMyMacAddr[2] = 0x01;
|
||||
e->RawIpMyMacAddr[5] = 0x01;
|
||||
|
||||
SetIP(&e->MyIP, 10, 171, 7, 253);
|
||||
SetIP(&e->YourIP, 10, 171, 7, 254);
|
||||
|
||||
e->RawIpSendQueue = NewQueueFast();
|
||||
|
||||
e->RawIP_TmpBufferSize = 67000;
|
||||
e->RawIP_TmpBuffer = Malloc(e->RawIP_TmpBufferSize);
|
||||
|
||||
return e;
|
||||
}
|
||||
|
||||
// Close ETH by using IP raw packets
|
||||
void CloseEthLinuxIpRaw(ETH *e)
|
||||
{
|
||||
if (e == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
while (true)
|
||||
{
|
||||
BUF *buf = GetNext(e->RawIpSendQueue);
|
||||
if (buf == NULL)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
FreeBuf(buf);
|
||||
}
|
||||
ReleaseQueue(e->RawIpSendQueue);
|
||||
|
||||
Free(e->Name);
|
||||
Free(e->Title);
|
||||
|
||||
ReleaseSock(e->RawTcp);
|
||||
ReleaseSock(e->RawUdp);
|
||||
ReleaseSock(e->RawIcmp);
|
||||
|
||||
ReleaseCancel(e->Cancel);
|
||||
|
||||
Free(e->RawIP_TmpBuffer);
|
||||
|
||||
Free(e);
|
||||
}
|
||||
|
||||
// Receive an IP raw packet
|
||||
UINT EthGetPacketLinuxIpRaw(ETH *e, void **data)
|
||||
{
|
||||
UINT r;
|
||||
BUF *b;
|
||||
// Validate arguments
|
||||
if (e == NULL || data == NULL)
|
||||
{
|
||||
return INFINITE;
|
||||
}
|
||||
if (e->RawIp_HasError)
|
||||
{
|
||||
return INFINITE;
|
||||
}
|
||||
|
||||
b = GetNext(e->RawIpSendQueue);
|
||||
if (b != NULL)
|
||||
{
|
||||
UINT size;
|
||||
|
||||
*data = b->Buf;
|
||||
size = b->Size;
|
||||
|
||||
Free(b);
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
r = EthGetPacketLinuxIpRawForSock(e, data, e->RawTcp, IP_PROTO_TCP);
|
||||
if (r == 0)
|
||||
{
|
||||
r = EthGetPacketLinuxIpRawForSock(e, data, e->RawUdp, IP_PROTO_UDP);
|
||||
if (r == 0)
|
||||
{
|
||||
r = EthGetPacketLinuxIpRawForSock(e, data, e->RawIcmp, IP_PROTO_ICMPV4);
|
||||
}
|
||||
}
|
||||
|
||||
if (r == INFINITE)
|
||||
{
|
||||
e->RawIp_HasError = true;
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
// Receive an IP raw packet for the specified socket
|
||||
UINT EthGetPacketLinuxIpRawForSock(ETH *e, void **data, SOCK *s, UINT proto)
|
||||
{
|
||||
UCHAR *tmp;
|
||||
UINT r;
|
||||
IP src_addr;
|
||||
UINT src_port;
|
||||
UINT ret = INFINITE;
|
||||
UCHAR *retbuf;
|
||||
PKT *p;
|
||||
bool ok = false;
|
||||
// Validate arguments
|
||||
if (e == NULL || data == NULL)
|
||||
{
|
||||
return INFINITE;
|
||||
}
|
||||
|
||||
tmp = e->RawIP_TmpBuffer;
|
||||
|
||||
LABEL_RETRY:
|
||||
*data = NULL;
|
||||
|
||||
r = RecvFrom(s, &src_addr, &src_port, tmp, e->RawIP_TmpBufferSize);
|
||||
if (r == SOCK_LATER)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (r == 0)
|
||||
{
|
||||
if (s->IgnoreRecvErr)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return INFINITE;
|
||||
}
|
||||
}
|
||||
|
||||
ret = 14 + r;
|
||||
retbuf = Malloc(ret);
|
||||
*data = retbuf;
|
||||
|
||||
Copy(retbuf, e->RawIpYourMacAddr, 6);
|
||||
Copy(retbuf + 6, e->RawIpMyMacAddr, 6);
|
||||
retbuf[12] = 0x08;
|
||||
retbuf[13] = 0x00;
|
||||
Copy(retbuf + 14, tmp, r);
|
||||
|
||||
// Mangle packet
|
||||
p = ParsePacket(retbuf, ret);
|
||||
if (p != NULL)
|
||||
{
|
||||
if (p->TypeL3 == L3_IPV4)
|
||||
{
|
||||
IPV4_HEADER *ip;
|
||||
IP original_dest_ip;
|
||||
|
||||
ip = p->L3.IPv4Header;
|
||||
|
||||
UINTToIP(&original_dest_ip, ip->DstIP);
|
||||
|
||||
if (IsZeroIP(&e->MyPhysicalIPForce) == false && CmpIpAddr(&e->MyPhysicalIPForce, &original_dest_ip) == 0 ||
|
||||
(IsIPMyHost(&original_dest_ip) && IsLocalHostIP(&original_dest_ip) == false && IsHostIPAddress4(&original_dest_ip)))
|
||||
{
|
||||
if (IsZeroIP(&e->MyPhysicalIPForce) && CmpIpAddr(&e->MyPhysicalIP, &original_dest_ip) != 0)
|
||||
{
|
||||
// Update MyPhysicalIP
|
||||
Copy(&e->MyPhysicalIP, &original_dest_ip, sizeof(IP));
|
||||
// Debug("e->MyPhysicalIP = %r\n", &e->MyPhysicalIP);
|
||||
}
|
||||
|
||||
if (IsZeroIP(&e->MyPhysicalIPForce) == false)
|
||||
{
|
||||
Copy(&e->MyPhysicalIP, &e->MyPhysicalIPForce, sizeof(IP));
|
||||
}
|
||||
|
||||
ip->DstIP = IPToUINT(&e->YourIP);
|
||||
ip->Checksum = 0;
|
||||
ip->Checksum = IpChecksum(ip, IPV4_GET_HEADER_LEN(ip) * 5);
|
||||
|
||||
if (p->TypeL4 == L4_TCP)
|
||||
{
|
||||
TCP_HEADER *tcp = p->L4.TCPHeader;
|
||||
/*
|
||||
if (Endian16(tcp->SrcPort) == 80)
|
||||
{
|
||||
IP a, b;
|
||||
UINTToIP(&a, ip->SrcIP);
|
||||
UINTToIP(&b, ip->DstIP);
|
||||
Debug("%r %r %u %u\n", &a, &b, Endian16(tcp->SrcPort), Endian16(tcp->DstPort));
|
||||
}*/
|
||||
|
||||
ok = true;
|
||||
}
|
||||
else if (p->TypeL4 == L4_UDP)
|
||||
{
|
||||
UDP_HEADER *udp = p->L4.UDPHeader;
|
||||
|
||||
udp->Checksum = 0;
|
||||
|
||||
ok = true;
|
||||
}
|
||||
else if (p->TypeL4 == L4_ICMPV4)
|
||||
{
|
||||
ICMP_HEADER *icmp = p->L4.ICMPHeader;
|
||||
|
||||
if (icmp->Type == ICMP_TYPE_DESTINATION_UNREACHABLE || icmp->Type == ICMP_TYPE_TIME_EXCEEDED)
|
||||
{
|
||||
// Rewrite the Src IP of the IPv4 header of the ICMP response packet
|
||||
UINT size = p->PacketSize - ((UCHAR *)icmp - (UCHAR *)p->PacketData);
|
||||
UCHAR *data = (UCHAR *)icmp;
|
||||
IPV4_HEADER *orig_ipv4 = (IPV4_HEADER *)(((UCHAR *)data) + sizeof(ICMP_HEADER) + sizeof(ICMP_ECHO));
|
||||
UINT orig_ipv4_size = size - (sizeof(ICMP_HEADER) + sizeof(ICMP_ECHO));
|
||||
|
||||
UINT orig_ipv4_header_size = GetIpHeaderSize((UCHAR *)orig_ipv4, orig_ipv4_size);
|
||||
|
||||
if (orig_ipv4_header_size >= sizeof(IPV4_HEADER) && orig_ipv4_size >= orig_ipv4_header_size)
|
||||
{
|
||||
if (orig_ipv4->Protocol == IP_PROTO_ICMPV4)
|
||||
{
|
||||
// Search the inner ICMP header
|
||||
UINT inner_icmp_size = orig_ipv4_size - orig_ipv4_header_size;
|
||||
|
||||
if (inner_icmp_size >= (sizeof(ICMP_HEADER) + sizeof(ICMP_ECHO)))
|
||||
{
|
||||
ICMP_HEADER *inner_icmp = (ICMP_HEADER *)(((UCHAR *)data) +
|
||||
sizeof(ICMP_HEADER) + sizeof(ICMP_ECHO) + orig_ipv4_header_size);
|
||||
|
||||
if (inner_icmp->Type == ICMP_TYPE_ECHO_REQUEST)
|
||||
{
|
||||
ICMP_ECHO *inner_echo = (ICMP_ECHO *)(((UCHAR *)inner_icmp) + sizeof(ICMP_HEADER));
|
||||
|
||||
inner_icmp->Checksum = 0;
|
||||
orig_ipv4->SrcIP = IPToUINT(&e->YourIP);
|
||||
orig_ipv4->Checksum = 0;
|
||||
orig_ipv4->Checksum = IpChecksum(orig_ipv4, orig_ipv4_header_size);
|
||||
|
||||
// Rewrite the outer ICMP header
|
||||
if (true)
|
||||
{
|
||||
UCHAR *payload;
|
||||
UINT payload_size;
|
||||
ICMP_ECHO *echo;
|
||||
|
||||
// Echo Response
|
||||
echo = (ICMP_ECHO *)(((UCHAR *)data) + sizeof(ICMP_HEADER));
|
||||
|
||||
if (size >= (sizeof(ICMP_HEADER) + sizeof(ICMP_ECHO)))
|
||||
{
|
||||
payload = ((UCHAR *)data) + sizeof(ICMP_HEADER) + sizeof(ICMP_ECHO);
|
||||
payload_size = size - (sizeof(ICMP_HEADER) + sizeof(ICMP_ECHO));
|
||||
|
||||
// Rewrite the header
|
||||
icmp->Checksum = 0;
|
||||
icmp->Checksum = IpChecksum(icmp, size);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
icmp->Checksum = 0;
|
||||
icmp->Checksum = IpChecksum(icmp, p->PayloadSize);
|
||||
|
||||
ok = true;
|
||||
}
|
||||
else if (p->TypeL4 == L4_FRAGMENT)
|
||||
{
|
||||
ok = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FreePacket(p);
|
||||
}
|
||||
|
||||
if (ok == false)
|
||||
{
|
||||
Free(*data);
|
||||
*data = NULL;
|
||||
|
||||
goto LABEL_RETRY;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
// Send internal IP packet (insert into the send queue)
|
||||
void EthSendIpPacketInnerIpRaw(ETH *e, void *data, UINT size, USHORT protocol)
|
||||
{
|
||||
BUF *b;
|
||||
if (e == NULL || data == NULL || size == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (e->RawIpSendQueue->num_item >= 1024)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
b = NewBuf();
|
||||
WriteBuf(b, e->RawIpYourMacAddr, 6);
|
||||
WriteBuf(b, e->RawIpMyMacAddr, 6);
|
||||
WriteBufShort(b, protocol);
|
||||
WriteBuf(b, data, size);
|
||||
SeekBufToBegin(b);
|
||||
|
||||
InsertQueue(e->RawIpSendQueue, b);
|
||||
}
|
||||
|
||||
// Process the packet internal if necessary
|
||||
bool EthProcessIpPacketInnerIpRaw(ETH *e, PKT *p)
|
||||
{
|
||||
bool ret = false;
|
||||
if (e == NULL || p == NULL)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (p->TypeL3 == L3_ARPV4)
|
||||
{
|
||||
// ARP processing
|
||||
ARPV4_HEADER *arp = p->L3.ARPv4Header;
|
||||
|
||||
if (Endian16(arp->HardwareType) == ARP_HARDWARE_TYPE_ETHERNET &&
|
||||
Endian16(arp->ProtocolType) == MAC_PROTO_IPV4 &&
|
||||
arp->HardwareSize == 6 && arp->ProtocolType == 4)
|
||||
{
|
||||
if (IPToUINT(&e->MyIP) == arp->TargetIP)
|
||||
{
|
||||
if (Endian16(arp->Operation) == ARP_OPERATION_REQUEST)
|
||||
{
|
||||
ARPV4_HEADER r;
|
||||
|
||||
Zero(&r, sizeof(r));
|
||||
r.HardwareType = Endian16(ARP_HARDWARE_TYPE_ETHERNET);
|
||||
r.ProtocolType = Endian16(MAC_PROTO_IPV4);
|
||||
r.HardwareSize = 6;
|
||||
r.ProtocolSize = 4;
|
||||
r.Operation = Endian16(ARP_OPERATION_RESPONSE);
|
||||
Copy(r.SrcAddress, e->RawIpMyMacAddr, 6);
|
||||
Copy(r.TargetAddress, arp->SrcAddress, 6);
|
||||
r.SrcIP = IPToUINT(&e->MyIP);
|
||||
r.TargetIP = arp->SrcIP;
|
||||
|
||||
EthSendIpPacketInnerIpRaw(e, &r, sizeof(ARPV4_HEADER), MAC_PROTO_ARPV4);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (p->TypeL3 == L3_IPV4 && p->TypeL4 == L4_UDP && p->TypeL7 == L7_DHCPV4)
|
||||
{
|
||||
// DHCP processing
|
||||
DHCPV4_HEADER *dhcp;
|
||||
UCHAR *data;
|
||||
UINT size;
|
||||
UINT dhcp_header_size;
|
||||
UINT dhcp_data_offset;
|
||||
UINT tran_id;
|
||||
UINT magic_cookie = Endian32(DHCP_MAGIC_COOKIE);
|
||||
bool ok;
|
||||
DHCP_OPTION_LIST *opt;
|
||||
|
||||
dhcp = p->L7.DHCPv4Header;
|
||||
tran_id = Endian32(dhcp->TransactionId);
|
||||
|
||||
// Get the DHCP data and size
|
||||
dhcp_header_size = sizeof(DHCPV4_HEADER);
|
||||
dhcp_data_offset = (UINT)(((UCHAR *)p->L7.DHCPv4Header) - ((UCHAR *)p->MacHeader) + dhcp_header_size);
|
||||
data = ((UCHAR *)dhcp) + dhcp_header_size;
|
||||
size = p->PacketSize - dhcp_data_offset;
|
||||
if (dhcp_header_size < 5)
|
||||
{
|
||||
// Data size is invalid
|
||||
return false;
|
||||
}
|
||||
|
||||
// Search for Magic Cookie
|
||||
ok = false;
|
||||
while (size >= 5)
|
||||
{
|
||||
if (Cmp(data, &magic_cookie, sizeof(magic_cookie)) == 0)
|
||||
{
|
||||
// Found
|
||||
data += 4;
|
||||
size -= 4;
|
||||
ok = true;
|
||||
break;
|
||||
}
|
||||
data++;
|
||||
size--;
|
||||
}
|
||||
|
||||
if (ok == false)
|
||||
{
|
||||
// The packet is invalid
|
||||
return false;
|
||||
}
|
||||
|
||||
// Parse DHCP options list
|
||||
opt = ParseDhcpOptionList(data, size);
|
||||
if (opt == NULL)
|
||||
{
|
||||
// The packet is invalid
|
||||
return false;
|
||||
}
|
||||
|
||||
if (dhcp->OpCode == 1 && (opt->Opcode == DHCP_DISCOVER || opt->Opcode == DHCP_REQUEST || opt->Opcode == DHCP_INFORM))
|
||||
{
|
||||
// Operate as the server
|
||||
UINT ip = IPToUINT(&e->YourIP);
|
||||
if (ip != 0 || opt->Opcode == DHCP_INFORM)
|
||||
{
|
||||
// Respond if there is providable IP address
|
||||
DHCP_OPTION_LIST ret;
|
||||
LIST *o;
|
||||
UINT hw_type;
|
||||
UINT hw_addr_size;
|
||||
UINT new_ip = ip;
|
||||
IP default_dns;
|
||||
|
||||
Zero(&default_dns, sizeof(default_dns));
|
||||
|
||||
Zero(&ret, sizeof(ret));
|
||||
|
||||
ret.Opcode = (opt->Opcode == DHCP_DISCOVER ? DHCP_OFFER : DHCP_ACK);
|
||||
ret.ServerAddress = IPToUINT(&e->MyIP);
|
||||
ret.LeaseTime = 3600;
|
||||
if (opt->Opcode == DHCP_INFORM)
|
||||
{
|
||||
ret.LeaseTime = 0;
|
||||
}
|
||||
|
||||
ret.SubnetMask = SetIP32(255, 255, 255, 252);
|
||||
|
||||
if (UnixGetDefaultDns(&default_dns) && IsZeroIp(&default_dns) == false)
|
||||
{
|
||||
ret.DnsServer = IPToUINT(&default_dns);
|
||||
ret.DnsServer2 = SetIP32(8, 8, 8, 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
ret.DnsServer = SetIP32(8, 8, 8, 8);
|
||||
ret.DnsServer2 = SetIP32(8, 8, 4, 4);
|
||||
}
|
||||
|
||||
ret.Gateway = IPToUINT(&e->MyIP);
|
||||
|
||||
if (opt->Opcode != DHCP_INFORM)
|
||||
{
|
||||
char client_mac[MAX_SIZE];
|
||||
char client_ip[64];
|
||||
IP ips;
|
||||
BinToStr(client_mac, sizeof(client_mac), p->MacAddressSrc, 6);
|
||||
UINTToIP(&ips, ip);
|
||||
IPToStr(client_ip, sizeof(client_ip), &ips);
|
||||
Debug("IP_RAW: DHCP %s : %s given %s\n",
|
||||
ret.Opcode == DHCP_OFFER ? "DHCP_OFFER" : "DHCP_ACK",
|
||||
client_mac, client_ip);
|
||||
}
|
||||
|
||||
// Build a DHCP option
|
||||
o = BuildDhcpOption(&ret);
|
||||
if (o != NULL)
|
||||
{
|
||||
BUF *b = BuildDhcpOptionsBuf(o);
|
||||
if (b != NULL)
|
||||
{
|
||||
UINT dest_ip = p->L3.IPv4Header->SrcIP;
|
||||
UINT blank_size = 128 + 64;
|
||||
UINT dhcp_packet_size;
|
||||
UINT magic = Endian32(DHCP_MAGIC_COOKIE);
|
||||
DHCPV4_HEADER *dhcp;
|
||||
void *magic_cookie_addr;
|
||||
void *buffer_addr;
|
||||
|
||||
if (dest_ip == 0)
|
||||
{
|
||||
dest_ip = 0xffffffff;
|
||||
}
|
||||
|
||||
// Calculate the DHCP packet size
|
||||
dhcp_packet_size = blank_size + sizeof(DHCPV4_HEADER) + sizeof(magic) + b->Size;
|
||||
|
||||
if (dhcp_packet_size < DHCP_MIN_SIZE)
|
||||
{
|
||||
// Padding
|
||||
dhcp_packet_size = DHCP_MIN_SIZE;
|
||||
}
|
||||
|
||||
// Create a header
|
||||
dhcp = ZeroMalloc(dhcp_packet_size);
|
||||
|
||||
dhcp->OpCode = 2;
|
||||
dhcp->HardwareType = hw_type;
|
||||
dhcp->HardwareAddressSize = hw_addr_size;
|
||||
dhcp->Hops = 0;
|
||||
dhcp->TransactionId = Endian32(tran_id);
|
||||
dhcp->Seconds = 0;
|
||||
dhcp->Flags = 0;
|
||||
dhcp->YourIP = new_ip;
|
||||
dhcp->ServerIP = IPToUINT(&e->MyIP);
|
||||
Copy(dhcp->ClientMacAddress, p->MacAddressSrc, 6);
|
||||
|
||||
// Calculate the address
|
||||
magic_cookie_addr = (((UCHAR *)dhcp) + sizeof(DHCPV4_HEADER) + blank_size);
|
||||
buffer_addr = ((UCHAR *)magic_cookie_addr) + sizeof(magic);
|
||||
|
||||
// Magic Cookie
|
||||
Copy(magic_cookie_addr, &magic, sizeof(magic));
|
||||
|
||||
// Buffer
|
||||
Copy(buffer_addr, b->Buf, b->Size);
|
||||
|
||||
if (true)
|
||||
{
|
||||
UCHAR *data = ZeroMalloc(sizeof(IPV4_HEADER) + sizeof(UDP_HEADER) + dhcp_packet_size);
|
||||
IPV4_HEADER *ipv4 = (IPV4_HEADER *)(data);
|
||||
UDP_HEADER *udp = (UDP_HEADER *)(data + sizeof(IPV4_HEADER));
|
||||
|
||||
Copy(data + sizeof(IPV4_HEADER) + sizeof(UDP_HEADER), dhcp, dhcp_packet_size);
|
||||
|
||||
IPV4_SET_VERSION(ipv4, 4);
|
||||
IPV4_SET_HEADER_LEN(ipv4, 5);
|
||||
ipv4->TotalLength = Endian16(sizeof(IPV4_HEADER) + sizeof(UDP_HEADER) + dhcp_packet_size);
|
||||
ipv4->TimeToLive = 63;
|
||||
ipv4->Protocol = IP_PROTO_UDP;
|
||||
ipv4->SrcIP = IPToUINT(&e->MyIP);
|
||||
ipv4->DstIP = dest_ip;
|
||||
ipv4->Checksum = IpChecksum(ipv4, sizeof(IPV4_HEADER));
|
||||
|
||||
udp->SrcPort = Endian16(NAT_DHCP_SERVER_PORT);
|
||||
udp->DstPort = Endian16(NAT_DHCP_CLIENT_PORT);
|
||||
udp->PacketLength = Endian16(sizeof(UDP_HEADER) + dhcp_packet_size);
|
||||
udp->Checksum = CalcChecksumForIPv4(ipv4->SrcIP, ipv4->DstIP, IP_PROTO_UDP,
|
||||
dhcp, dhcp_packet_size, 0);
|
||||
if (udp->Checksum == 0)
|
||||
{
|
||||
udp->Checksum = 0xffff;
|
||||
}
|
||||
|
||||
EthSendIpPacketInnerIpRaw(e, data, sizeof(IPV4_HEADER) + sizeof(UDP_HEADER) + dhcp_packet_size, MAC_PROTO_IPV4);
|
||||
|
||||
Free(data);
|
||||
}
|
||||
|
||||
// Release the memory
|
||||
Free(dhcp);
|
||||
FreeBuf(b);
|
||||
}
|
||||
FreeDhcpOptions(o);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Free(opt);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
// Send an IP raw packet
|
||||
void EthPutPacketLinuxIpRaw(ETH *e, void *data, UINT size)
|
||||
{
|
||||
PKT *p;
|
||||
// Validate arguments
|
||||
if (e == NULL || data == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (size < 14 || size > MAX_PACKET_SIZE || e->RawIp_HasError)
|
||||
{
|
||||
Free(data);
|
||||
return;
|
||||
}
|
||||
|
||||
p = ParsePacket(data, size);
|
||||
|
||||
if (p->BroadcastPacket || Cmp(p->MacAddressDest, e->RawIpMyMacAddr, 6) == 0)
|
||||
{
|
||||
if (IsValidUnicastMacAddress(p->MacAddressSrc))
|
||||
{
|
||||
Copy(e->RawIpYourMacAddr, p->MacAddressSrc, 6);
|
||||
}
|
||||
}
|
||||
|
||||
if (IsZero(e->RawIpYourMacAddr, 6) || IsValidUnicastMacAddress(p->MacAddressSrc) == false ||
|
||||
(p->BroadcastPacket == false && Cmp(p->MacAddressDest, e->RawIpMyMacAddr, 6) != 0))
|
||||
{
|
||||
Free(data);
|
||||
FreePacket(p);
|
||||
return;
|
||||
}
|
||||
|
||||
if (p != NULL)
|
||||
{
|
||||
SOCK *s = NULL;
|
||||
|
||||
if (p->TypeL3 == L3_IPV4)
|
||||
{
|
||||
if (p->TypeL4 == L4_TCP)
|
||||
{
|
||||
if (IsZeroIP(&e->MyPhysicalIP) == false)
|
||||
{
|
||||
s = e->RawTcp;
|
||||
}
|
||||
}
|
||||
else if (p->TypeL4 == L4_UDP)
|
||||
{
|
||||
if (EthProcessIpPacketInnerIpRaw(e, p) == false)
|
||||
{
|
||||
s = e->RawUdp;
|
||||
}
|
||||
}
|
||||
else if (p->TypeL4 == L4_ICMPV4)
|
||||
{
|
||||
if (IsZeroIP(&e->MyPhysicalIP) == false)
|
||||
{
|
||||
s = e->RawIcmp;
|
||||
}
|
||||
}
|
||||
else if (p->TypeL4 == L4_FRAGMENT)
|
||||
{
|
||||
if (IsZeroIP(&e->MyPhysicalIP) == false)
|
||||
{
|
||||
s = e->RawIcmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (p->TypeL3 == L3_ARPV4)
|
||||
{
|
||||
EthProcessIpPacketInnerIpRaw(e, p);
|
||||
}
|
||||
|
||||
if (s != NULL && p->L3.IPv4Header->DstIP != 0xffffffff && p->BroadcastPacket == false &&
|
||||
p->L3.IPv4Header->SrcIP == IPToUINT(&e->YourIP))
|
||||
{
|
||||
UCHAR *send_data = p->IPv4PayloadData;
|
||||
UCHAR *head = p->PacketData;
|
||||
UINT remove_header_size = (UINT)(send_data - head);
|
||||
|
||||
if (p->PacketSize > remove_header_size)
|
||||
{
|
||||
IP dest;
|
||||
UINT send_data_size = p->PacketSize - remove_header_size;
|
||||
|
||||
// checksum
|
||||
if (p->TypeL4 == L4_UDP)
|
||||
{
|
||||
p->L4.UDPHeader->Checksum = 0;
|
||||
}
|
||||
else if (p->TypeL4 == L4_TCP)
|
||||
{
|
||||
p->L4.TCPHeader->Checksum = 0;
|
||||
p->L4.TCPHeader->Checksum = CalcChecksumForIPv4(IPToUINT(&e->MyPhysicalIP),
|
||||
p->L3.IPv4Header->DstIP, IP_PROTO_TCP,
|
||||
p->L4.TCPHeader, p->IPv4PayloadSize, 0);
|
||||
}
|
||||
|
||||
UINTToIP(&dest, p->L3.IPv4Header->DstIP);
|
||||
|
||||
if (s->RawIP_HeaderIncludeFlag == false)
|
||||
{
|
||||
SendTo(s, &dest, 0, send_data, send_data_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
IPV4_HEADER *ip = p->L3.IPv4Header;
|
||||
|
||||
ip->SrcIP = IPToUINT(&e->MyPhysicalIP);
|
||||
ip->Checksum = 0;
|
||||
ip->Checksum = IpChecksum(ip, IPV4_GET_HEADER_LEN(ip) * 4);
|
||||
|
||||
SendTo(s, &dest, 0, ip, ((UCHAR *)p->PacketData - (UCHAR *)ip) + p->PacketSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FreePacket(p);
|
||||
}
|
||||
|
||||
Free(data);
|
||||
}
|
||||
|
||||
|
||||
#endif // BRIDGE_C
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+28
-10
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -162,6 +162,19 @@ struct ETH
|
||||
|
||||
VLAN *Tap; // tap
|
||||
bool Linux_IsAuxDataSupported; // Is PACKET_AUXDATA supported
|
||||
|
||||
bool IsRawIpMode; // RAW IP mode
|
||||
SOCK *RawTcp, *RawUdp, *RawIcmp; // RAW sockets
|
||||
bool RawIp_HasError;
|
||||
UCHAR RawIpMyMacAddr[6];
|
||||
UCHAR RawIpYourMacAddr[6];
|
||||
IP MyIP;
|
||||
IP YourIP;
|
||||
QUEUE *RawIpSendQueue;
|
||||
IP MyPhysicalIP;
|
||||
IP MyPhysicalIPForce;
|
||||
UCHAR *RawIP_TmpBuffer;
|
||||
UINT RawIP_TmpBufferSize;
|
||||
};
|
||||
|
||||
#if defined( BRIDGE_BPF ) || defined( BRIDGE_PCAP )
|
||||
@@ -180,7 +193,8 @@ bool IsEthSupportedLinux();
|
||||
bool IsEthSupportedSolaris();
|
||||
bool IsEthSupportedPcap();
|
||||
TOKEN_LIST *GetEthList();
|
||||
TOKEN_LIST *GetEthListLinux();
|
||||
TOKEN_LIST *GetEthListEx(UINT *total_num_including_hidden, bool enum_normal, bool enum_rawip);
|
||||
TOKEN_LIST *GetEthListLinux(bool enum_normal, bool enum_rawip);
|
||||
TOKEN_LIST *GetEthListSolaris();
|
||||
TOKEN_LIST *GetEthListPcap();
|
||||
ETH *OpenEth(char *name, bool local, bool tapmode, char *tapaddr);
|
||||
@@ -203,6 +217,14 @@ bool EthIsChangeMtuSupported(ETH *e);
|
||||
bool EthGetInterfaceDescriptionUnix(char *name, char *str, UINT size);
|
||||
bool EthIsInterfaceDescriptionSupportedUnix();
|
||||
|
||||
ETH *OpenEthLinuxIpRaw();
|
||||
void CloseEthLinuxIpRaw(ETH *e);
|
||||
UINT EthGetPacketLinuxIpRaw(ETH *e, void **data);
|
||||
UINT EthGetPacketLinuxIpRawForSock(ETH *e, void **data, SOCK *s, UINT proto);
|
||||
void EthPutPacketLinuxIpRaw(ETH *e, void *data, UINT size);
|
||||
bool EthProcessIpPacketInnerIpRaw(ETH *e, PKT *p);
|
||||
void EthSendIpPacketInnerIpRaw(ETH *e, void *data, UINT size, USHORT protocol);
|
||||
|
||||
#ifdef UNIX_SOLARIS
|
||||
// Function prototype for Solaris
|
||||
bool DlipAttatchRequest(int fd, UINT devid);
|
||||
@@ -216,7 +238,3 @@ int UnixEthOpenRawSocket();
|
||||
#endif // BRIDGEUNIX_H
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+19
-21
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -1356,9 +1356,9 @@ TOKEN_LIST *GetEthList()
|
||||
{
|
||||
UINT v;
|
||||
|
||||
return GetEthListEx(&v);
|
||||
return GetEthListEx(&v, true, false);
|
||||
}
|
||||
TOKEN_LIST *GetEthListEx(UINT *total_num_including_hidden)
|
||||
TOKEN_LIST *GetEthListEx(UINT *total_num_including_hidden, bool enum_normal, bool enum_rawip)
|
||||
{
|
||||
TOKEN_LIST *ret;
|
||||
UINT i;
|
||||
@@ -1371,6 +1371,11 @@ TOKEN_LIST *GetEthListEx(UINT *total_num_including_hidden)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (enum_normal == false)
|
||||
{
|
||||
return NullToken();
|
||||
}
|
||||
|
||||
if (total_num_including_hidden == NULL)
|
||||
{
|
||||
total_num_including_hidden = &dummy_int;
|
||||
@@ -1894,6 +1899,12 @@ bool IsPcdSupported()
|
||||
UINT type;
|
||||
OS_INFO *info = GetOsInfo();
|
||||
|
||||
if (MsIsWindows10())
|
||||
{
|
||||
// Windows 10 or later never supports PCD driver.
|
||||
return false;
|
||||
}
|
||||
|
||||
type = info->OsType;
|
||||
|
||||
if (OS_IS_WINDOWS_NT(type) == false)
|
||||
@@ -1972,11 +1983,6 @@ HINSTANCE InstallPcdDriverInternal()
|
||||
src_filename = BRIDGE_WIN32_PCD_SYS_X64;
|
||||
}
|
||||
|
||||
if (MsIsIA64())
|
||||
{
|
||||
src_filename = BRIDGE_WIN32_PCD_SYS_IA64;
|
||||
}
|
||||
|
||||
// Copy see.sys
|
||||
if (FileCopy(src_filename, tmp) == false)
|
||||
{
|
||||
@@ -1995,10 +2001,6 @@ HINSTANCE InstallPcdDriverInternal()
|
||||
{
|
||||
dll_filename = BRIDGE_WIN32_PCD_DLL_X64;
|
||||
}
|
||||
else if (MsIsIA64())
|
||||
{
|
||||
dll_filename = BRIDGE_WIN32_PCD_DLL_IA64;
|
||||
}
|
||||
}
|
||||
|
||||
// Try to load see.dll and initialize
|
||||
@@ -2142,7 +2144,7 @@ RELEASE:
|
||||
return false;
|
||||
}
|
||||
|
||||
o = GetEthListEx(&total_num);
|
||||
o = GetEthListEx(&total_num, true, false);
|
||||
if (o == NULL || total_num == 0)
|
||||
{
|
||||
FreeToken(o);
|
||||
@@ -2241,7 +2243,3 @@ void GetEthNetworkConnectionName(wchar_t *dst, UINT size, char *device_name)
|
||||
#endif // BRIDGE_C
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+14
-14
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -116,11 +116,9 @@
|
||||
|
||||
#define BRIDGE_WIN32_PACKET_DLL "Packet.dll"
|
||||
#define BRIDGE_WIN32_PCD_DLL "|see.dll"
|
||||
#define BRIDGE_WIN32_PCD_SYS "|see.sys"
|
||||
#define BRIDGE_WIN32_PCD_SYS "|DriverPackages\\See\\x86\\See_x86.sys"
|
||||
#define BRIDGE_WIN32_PCD_DLL_X64 "|see_x64.dll"
|
||||
#define BRIDGE_WIN32_PCD_SYS_X64 "|see_x64.sys"
|
||||
#define BRIDGE_WIN32_PCD_DLL_IA64 "|see_ia64.dll"
|
||||
#define BRIDGE_WIN32_PCD_SYS_IA64 "|see_ia64.sys"
|
||||
#define BRIDGE_WIN32_PCD_SYS_X64 "|DriverPackages\\See\\x64\\See_x64.sys"
|
||||
#define BRIDGE_WIN32_PCD_REGKEY "SYSTEM\\CurrentControlSet\\services\\SEE"
|
||||
#define BRIDGE_WIN32_PCD_BUILDVALUE "CurrentInstalledBuild"
|
||||
|
||||
@@ -215,6 +213,12 @@ struct ETH
|
||||
|
||||
SU *Su; // SeLow handle
|
||||
SU_ADAPTER *SuAdapter; // SeLow adapter handle
|
||||
|
||||
// Unused
|
||||
bool IsRawIpMode; // RAW IP mode
|
||||
UCHAR RawIpMyMacAddr[6];
|
||||
UCHAR RawIpYourMacAddr[6];
|
||||
IP MyPhysicalIPForce;
|
||||
};
|
||||
|
||||
// Function prototype
|
||||
@@ -223,7 +227,7 @@ void FreeEth();
|
||||
bool IsEthSupported();
|
||||
bool IsEthSupportedInner();
|
||||
TOKEN_LIST *GetEthList();
|
||||
TOKEN_LIST *GetEthListEx(UINT *total_num_including_hidden);
|
||||
TOKEN_LIST *GetEthListEx(UINT *total_num_including_hidden, bool enum_normal, bool enum_rawip);
|
||||
ETH *OpenEth(char *name, bool local, bool tapmode, char *tapaddr);
|
||||
ETH *OpenEthInternal(char *name, bool local, bool tapmode, char *tapaddr);
|
||||
void CloseEth(ETH *e);
|
||||
@@ -262,7 +266,3 @@ bool Win32GetEnableSeLow();
|
||||
#endif // BRIDGEWIN32_H
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+5
-9
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Contributors:
|
||||
// - ELIN (https://github.com/el1n)
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
@@ -12526,7 +12526,3 @@ void *CmUpdateJumpList(UINT start_id)
|
||||
#endif // WIN32
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+5
-9
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -156,7 +156,3 @@ UINT CmGetSecureBitmapId(char *dest_hostname);
|
||||
#endif // CM_H
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+5
-9
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Contributors:
|
||||
// - ELIN (https://github.com/el1n)
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
@@ -639,7 +639,3 @@ bool CmGetProxyServerNameAndPortFromIeProxyRegStr(char *name, UINT name_size, UI
|
||||
void *CmUpdateJumpList(UINT start_id);
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+51
-18
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -118,6 +118,34 @@ static UINT init_cedar_counter = 0;
|
||||
static REF *cedar_log_ref = NULL;
|
||||
static LOG *cedar_log;
|
||||
|
||||
// Check whether there is any EAP-enabled RADIUS configuration
|
||||
bool CedarIsThereAnyEapEnabledRadiusConfig(CEDAR *c)
|
||||
{
|
||||
bool ret = false;
|
||||
UINT i;
|
||||
if (c == NULL)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
LockHubList(c);
|
||||
{
|
||||
for (i = 0;i < LIST_NUM(c->HubList);i++)
|
||||
{
|
||||
HUB *hub = LIST_DATA(c->HubList, i);
|
||||
|
||||
if (hub->RadiusConvertAllMsChapv2AuthRequestToEap)
|
||||
{
|
||||
ret = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
UnlockHubList(c);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
// Get build date of current code
|
||||
UINT64 GetCurrentBuildDate()
|
||||
{
|
||||
@@ -235,18 +263,27 @@ bool IsSupportedWinVer(RPC_WINVER *v)
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
// Enable in future when supported
|
||||
if ((v->VerMajor == 6 && v->VerMinor == 4) ||(v->VerMajor == 10 && v->VerMinor == 0))
|
||||
if ((v->VerMajor == 6 && v->VerMinor == 4) || (v->VerMajor == 10 && v->VerMinor == 0))
|
||||
{
|
||||
// Windows 10, Server 10
|
||||
if (v->ServicePack <= 0)
|
||||
if (v->IsServer == false)
|
||||
{
|
||||
// SP0 only
|
||||
return true;
|
||||
// Windows 10 (not Windows Server 2016)
|
||||
if (v->ServicePack <= 0)
|
||||
{
|
||||
// SP0 only
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Windows Server 2016
|
||||
if (v->ServicePack <= 0)
|
||||
{
|
||||
// SP0 only
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -1722,7 +1759,7 @@ CEDAR *NewCedar(X *server_x, K *server_k)
|
||||
|
||||
c->TrafficDiffList = NewList(NULL);
|
||||
|
||||
SetCedarCipherList(c, "RC4-MD5");
|
||||
SetCedarCipherList(c, SERVER_DEFAULT_CIPHER_NAME);
|
||||
|
||||
c->ClientId = _II("CLIENT_ID");
|
||||
|
||||
@@ -1877,7 +1914,3 @@ void FreeCedar()
|
||||
FreeProtocol();
|
||||
}
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+18
-21
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -135,10 +135,10 @@
|
||||
|
||||
|
||||
// Version number
|
||||
#define CEDAR_VER 415
|
||||
#define CEDAR_VER 423
|
||||
|
||||
// Build Number
|
||||
#define CEDAR_BUILD 9546
|
||||
#define CEDAR_BUILD 9647
|
||||
|
||||
// Beta number
|
||||
//#define BETA_NUMBER 3
|
||||
@@ -153,16 +153,16 @@
|
||||
|
||||
// Specify the location to build
|
||||
#ifndef BUILD_PLACE
|
||||
#define BUILD_PLACE "pc30"
|
||||
#define BUILD_PLACE "pc37"
|
||||
#endif // BUILD_PLACE
|
||||
|
||||
// Specifies the build date
|
||||
#define BUILD_DATE_Y 2015
|
||||
#define BUILD_DATE_M 4
|
||||
#define BUILD_DATE_D 5
|
||||
#define BUILD_DATE_HO 2
|
||||
#define BUILD_DATE_MI 54
|
||||
#define BUILD_DATE_SE 8
|
||||
#define BUILD_DATE_Y 2017
|
||||
#define BUILD_DATE_M 10
|
||||
#define BUILD_DATE_D 19
|
||||
#define BUILD_DATE_HO 14
|
||||
#define BUILD_DATE_MI 28
|
||||
#define BUILD_DATE_SE 18
|
||||
|
||||
// Tolerable time difference
|
||||
#define ALLOW_TIMESTAMP_DIFF (UINT64)(3 * 24 * 60 * 60 * 1000)
|
||||
@@ -242,7 +242,7 @@
|
||||
#define FIFO_BUDGET VPN_GP(GP_FIFO_BUDGET, 1000000)
|
||||
#endif // USE_STRATEGY_LOW_MEMORY
|
||||
|
||||
#define MAX_PACKET_SIZE 1560 // Maximum packet size
|
||||
#define MAX_PACKET_SIZE 1600 // Maximum packet size
|
||||
#define UDP_BUF_SIZE (32 * 1024) // Aim of the UDP packet size
|
||||
|
||||
#ifndef USE_STRATEGY_LOW_MEMORY
|
||||
@@ -670,7 +670,7 @@
|
||||
|
||||
#define ARP_ENTRY_EXPIRES (30 * 1000) // ARP table expiration date
|
||||
#define ARP_ENTRY_POLLING_TIME (1 * 1000) // ARP table cleaning timer
|
||||
#define ARP_REQUEST_TIMEOUT (200) // ARP request time-out period
|
||||
#define ARP_REQUEST_TIMEOUT (1000) // ARP request time-out period
|
||||
#define ARP_REQUEST_GIVEUP (5 * 1000) // Time to give up sending the ARP request
|
||||
#define IP_WAIT_FOR_ARP_TIMEOUT (5 * 1000) // Total time that an IP packet waiting for ARP table
|
||||
#define IP_COMBINE_TIMEOUT (10 * 1000) // Time-out of IP packet combining
|
||||
@@ -1052,7 +1052,7 @@ typedef struct CEDAR
|
||||
UINT QueueBudget; // Queue budget
|
||||
LOCK *FifoBudgetLock; // Fifo budget lock
|
||||
UINT FifoBudget; // Fifo budget
|
||||
bool AcceptOnlyTls; // Accept only TLS (Disable SSL)
|
||||
SSL_ACCEPT_SETTINGS SslAcceptSettings; // SSL Accept Settings
|
||||
char OpenVPNDefaultClientOption[MAX_SIZE]; // OpenVPN Default Client Option String
|
||||
} CEDAR;
|
||||
|
||||
@@ -1259,12 +1259,9 @@ UINT CedarGetQueueBudgetConsuming(CEDAR *c);
|
||||
UINT CedarGetFifoBudgetConsuming(CEDAR *c);
|
||||
UINT CedarGetQueueBudgetBalance(CEDAR *c);
|
||||
UINT CedarGetFifoBudgetBalance(CEDAR *c);
|
||||
bool CedarIsThereAnyEapEnabledRadiusConfig(CEDAR *c);
|
||||
|
||||
|
||||
|
||||
#endif // CEDAR_H
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="$(SolutionDir)Mayaqua\win32_inc;.;$(SolutionDir);WinPcap"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
|
||||
MinimalRebuild="true"
|
||||
ExceptionHandling="0"
|
||||
BasicRuntimeChecks="3"
|
||||
@@ -188,7 +188,7 @@
|
||||
EnableIntrinsicFunctions="false"
|
||||
FavorSizeOrSpeed="0"
|
||||
AdditionalIncludeDirectories="$(SolutionDir)Mayaqua\win32_inc;.;$(SolutionDir);WinPcap"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;VPN_SPEED"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;VPN_SPEED"
|
||||
StringPooling="false"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="0"
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -113,7 +113,3 @@
|
||||
|
||||
#include "CedarPch.h"
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -124,7 +124,3 @@
|
||||
#include <Mayaqua/Mayaqua.h>
|
||||
#include <Cedar/Cedar.h>
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+19
-9
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -142,6 +142,16 @@ typedef struct AUTHNT AUTHNT;
|
||||
// ==============================================================
|
||||
|
||||
typedef struct RADIUS_LOGIN_OPTION RADIUS_LOGIN_OPTION;
|
||||
typedef struct RADIUS_PACKET RADIUS_PACKET;
|
||||
typedef struct RADIUS_AVP RADIUS_AVP;
|
||||
typedef struct EAP_CLIENT EAP_CLIENT;
|
||||
typedef struct EAP_MESSAGE EAP_MESSAGE;
|
||||
typedef struct EAP_MSCHAPV2_GENERAL EAP_MSCHAPV2_GENERAL;
|
||||
typedef struct EAP_MSCHAPV2_CHALLENGE EAP_MSCHAPV2_CHALLENGE;
|
||||
typedef struct EAP_MSCHAPV2_RESPONSE EAP_MSCHAPV2_RESPONSE;
|
||||
typedef struct EAP_MSCHAPV2_SUCCESS_SERVER EAP_MSCHAPV2_SUCCESS_SERVER;
|
||||
typedef struct EAP_MSCHAPV2_SUCCESS_CLIENT EAP_MSCHAPV2_SUCCESS_CLIENT;
|
||||
typedef struct EAP_PEAP EAP_PEAP;
|
||||
|
||||
|
||||
// ==============================================================
|
||||
@@ -528,6 +538,8 @@ typedef struct CTC CTC;
|
||||
typedef struct CTR CTR;
|
||||
typedef struct TTC TTC;
|
||||
typedef struct TTS TTS;
|
||||
typedef struct TTS_WORKER TTS_WORKER;
|
||||
typedef struct TTC_WORKER TTC_WORKER;
|
||||
typedef struct TT_RESULT TT_RESULT;
|
||||
typedef struct TTS_SOCK TTS_SOCK;
|
||||
typedef struct TTC_SOCK TTC_SOCK;
|
||||
@@ -738,6 +750,8 @@ typedef struct MIRROR_SERVER MIRROR_SERVER;
|
||||
// ==============================================================
|
||||
|
||||
typedef struct NATIVE_STACK NATIVE_STACK;
|
||||
typedef struct IPTABLES_STATE IPTABLES_STATE;
|
||||
typedef struct IPTABLES_ENTRY IPTABLES_ENTRY;
|
||||
|
||||
|
||||
// ==============================================================
|
||||
@@ -751,7 +765,3 @@ typedef struct SU_ADAPTER_LIST SU_ADAPTER_LIST;
|
||||
|
||||
|
||||
#endif // CEDARTYPE_H
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+12
-14
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Contributors:
|
||||
// - nattoheaven (https://github.com/nattoheaven)
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
@@ -2181,13 +2181,14 @@ BUF *CiAccountToCfg(RPC_CLIENT_CREATE_ACCOUNT *t)
|
||||
// RPC dispatch routine
|
||||
PACK *CiRpcDispatch(RPC *rpc, char *name, PACK *p)
|
||||
{
|
||||
CLIENT *c = rpc->Param;
|
||||
PACK *ret;
|
||||
CLIENT *c;
|
||||
// Validate arguments
|
||||
if (rpc == NULL || name == NULL || p == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
c = rpc->Param;
|
||||
|
||||
ret = NewPack();
|
||||
|
||||
@@ -6029,12 +6030,13 @@ L_TRY:
|
||||
ReleaseSock(s);
|
||||
|
||||
ret = ZeroMalloc(sizeof(REMOTE_CLIENT));
|
||||
ret->Rpc = rpc;
|
||||
rpc->Param = ret;
|
||||
|
||||
if (ret != NULL)
|
||||
{
|
||||
RPC_CLIENT_VERSION t;
|
||||
|
||||
ret->Rpc = rpc;
|
||||
Zero(&t, sizeof(t));
|
||||
CcGetClientVersion(ret, &t);
|
||||
ret->OsType = t.OsType;
|
||||
@@ -6487,7 +6489,7 @@ bool Win32CiSecureSign(SECURE_SIGN *sign)
|
||||
// Success
|
||||
ret = true;
|
||||
sign->ClientCert = batch[0].OutputX;
|
||||
Copy(sign->Signature, batch[1].OutputSign, 128);
|
||||
Copy(sign->Signature, batch[1].OutputSign, MIN(sizeof(sign->Signature),sizeof(batch[1].OutputSign)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6661,7 +6663,7 @@ bool CtConnect(CLIENT *c, RPC_CLIENT_CONNECT *connect)
|
||||
CiSetError(c, ERR_ACCOUNT_ACTIVE);
|
||||
}
|
||||
else if (r->ClientAuth->AuthType == CLIENT_AUTHTYPE_SECURE &&
|
||||
client->UseSecureDeviceId == 0)
|
||||
c->UseSecureDeviceId == 0)
|
||||
{
|
||||
// Secure device is not specified
|
||||
CiSetError(c, ERR_NO_SECURE_DEVICE_SPECIFIED);
|
||||
@@ -8450,7 +8452,7 @@ bool CtCreateVLan(CLIENT *c, RPC_CLIENT_CREATE_VLAN *create)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Regulation in Windows 8
|
||||
// Regulation in Windows 8 / 10
|
||||
if (MsIsInfCatalogRequired())
|
||||
{
|
||||
if (CiIsValidVLanRegulatedName(create->DeviceName) == false)
|
||||
@@ -11110,7 +11112,3 @@ void CiClientStatusPrinter(SESSION *s, wchar_t *status)
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+5
-9
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -878,7 +878,3 @@ void CiInitDriverVerStruct(MS_DRIVER_VER *ver);
|
||||
#endif // CLIENT_H
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+565
-322
File diff suppressed because it is too large
Load Diff
+35
-12
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -181,13 +181,30 @@ struct TTC
|
||||
THREAD *Thread; // Thread
|
||||
volatile bool Halt; // Halting flag
|
||||
bool *Cancel; // Halting flag 2
|
||||
SOCK_EVENT *SockEvent; // Socket event
|
||||
LIST *ItcSockList; // Client socket list
|
||||
TT_RESULT Result; // Result
|
||||
UINT ErrorCode; // Error code
|
||||
bool AbnormalTerminated; // Abnormal termination
|
||||
EVENT *StartEvent; // Start event
|
||||
EVENT *InitedEvent; // Initialize completion notification event
|
||||
LIST *WorkerThreadList; // List of worker threads
|
||||
|
||||
UINT flag1, flag2;
|
||||
|
||||
UINT64 session_id;
|
||||
UINT64 end_tick;
|
||||
UINT64 start_tick;
|
||||
};
|
||||
|
||||
// Traffic test worker thread
|
||||
struct TTC_WORKER
|
||||
{
|
||||
THREAD *WorkerThread;
|
||||
TTC *Ttc;
|
||||
LIST *SockList; // Client socket list
|
||||
SOCK_EVENT *SockEvent; // Socket event
|
||||
EVENT *StartEvent; // Start event
|
||||
bool Ok; // The result
|
||||
};
|
||||
|
||||
// Server side socket
|
||||
@@ -202,7 +219,10 @@ struct TTS_SOCK
|
||||
UINT64 SessionId; // Session ID
|
||||
bool NoMoreSendData; // Flag not to send more data
|
||||
UINT64 FirstRecvTick; // Time which the data has been received last
|
||||
UINT64 FirstSendTick; // Time which the data has been sent last
|
||||
UINT64 Span; // Period
|
||||
UINT64 GiveupSpan;
|
||||
UINT64 LastCommTime;
|
||||
};
|
||||
|
||||
// Traffic test server
|
||||
@@ -213,15 +233,22 @@ struct TTS
|
||||
volatile bool Halt; // Halting flag
|
||||
UINT Port; // Port number
|
||||
THREAD *Thread; // Thread
|
||||
THREAD *WorkThread; // Worker thread
|
||||
THREAD *IPv6AcceptThread; // IPv6 Accept thread
|
||||
SOCK *ListenSocket; // Socket to wait
|
||||
SOCK *ListenSocketV6; // Socket to wait (IPv6)
|
||||
UINT ErrorCode; // Error code
|
||||
UINT IdSeed; // ID value
|
||||
LIST *WorkerList; // Worker threads list
|
||||
};
|
||||
|
||||
// Traffic test worker thread
|
||||
struct TTS_WORKER
|
||||
{
|
||||
TTS *Tts; // TTS
|
||||
THREAD *WorkThread; // Worker thread
|
||||
SOCK_EVENT *SockEvent; // Socket event
|
||||
LIST *TtsSockList; // Server socket list
|
||||
bool NewSocketArrived; // New socket has arrived
|
||||
UINT IdSeed; // ID value
|
||||
};
|
||||
|
||||
// VPN Tools context
|
||||
@@ -673,7 +700,3 @@ UINT PsVpnAzureGetStatus(CONSOLE *c, char *cmd_name, wchar_t *str, void *param);
|
||||
#endif // COMMAND_H
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+8
-14
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -1030,7 +1030,7 @@ void ConnectionSend(CONNECTION *c, UINT64 now)
|
||||
UINT size;
|
||||
SESSION *s;
|
||||
HUB *hub = NULL;
|
||||
bool use_qos;
|
||||
bool use_qos = false;
|
||||
// Validate arguments
|
||||
if (c == NULL)
|
||||
{
|
||||
@@ -1038,11 +1038,11 @@ void ConnectionSend(CONNECTION *c, UINT64 now)
|
||||
}
|
||||
|
||||
s = c->Session;
|
||||
use_qos = s->QoS;
|
||||
|
||||
if (s != NULL)
|
||||
{
|
||||
hub = s->Hub;
|
||||
use_qos = s->QoS;
|
||||
}
|
||||
|
||||
// Protocol
|
||||
@@ -3137,10 +3137,7 @@ void ConnectionAccept(CONNECTION *c)
|
||||
|
||||
// Start the SSL communication
|
||||
Debug("StartSSL()\n");
|
||||
if (c->Cedar->AcceptOnlyTls)
|
||||
{
|
||||
s->AcceptOnlyTls = true;
|
||||
}
|
||||
Copy(&s->SslAcceptSettings, &c->Cedar->SslAcceptSettings, sizeof(SSL_ACCEPT_SETTINGS));
|
||||
if (StartSSL(s, x, k) == false)
|
||||
{
|
||||
// Failed
|
||||
@@ -3672,6 +3669,3 @@ CONNECTION *NewClientConnectionEx(SESSION *s, char *client_str, UINT client_ver,
|
||||
|
||||
return c;
|
||||
}
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+6
-10
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -144,7 +144,7 @@ struct SECURE_SIGN
|
||||
char SecurePrivateKeyName[MAX_SECURE_DEVICE_FILE_LEN + 1]; // Secure device secret key name
|
||||
X *ClientCert; // Client certificate
|
||||
UCHAR Random[SHA1_SIZE]; // Random value for signature
|
||||
UCHAR Signature[128]; // Signed data
|
||||
UCHAR Signature[4096 / 8]; // Signed data
|
||||
UINT UseSecureDeviceId;
|
||||
UINT BitmapId; // Bitmap ID
|
||||
};
|
||||
@@ -372,7 +372,3 @@ UINT GetMachineRand();
|
||||
|
||||
|
||||
#endif // CONNECTION_H
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+33
-10
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -769,6 +769,18 @@ bool DispatchNextCmdEx(CONSOLE *c, wchar_t *exec_command, char *prompt, CMD cmd[
|
||||
// Show the prompt
|
||||
RETRY:
|
||||
tmp = CopyStrToUni(prompt);
|
||||
|
||||
if (c->ProgrammingMode)
|
||||
{
|
||||
wchar_t tmp2[MAX_PATH];
|
||||
|
||||
UniFormat(tmp2, sizeof(tmp2), L"[PROMPT:%u:%s]\r\n", c->RetCode, tmp);
|
||||
|
||||
Free(tmp);
|
||||
|
||||
tmp = CopyUniStr(tmp2);
|
||||
}
|
||||
|
||||
str = c->ReadLine(c, tmp, false);
|
||||
Free(tmp);
|
||||
|
||||
@@ -1430,6 +1442,14 @@ EVAL_VALUE:
|
||||
Free(str);
|
||||
break;
|
||||
}
|
||||
else if (c->ProgrammingMode)
|
||||
{
|
||||
// In the programming mode, return the error immediately.
|
||||
ok = false;
|
||||
Free(name);
|
||||
Free(str);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Request to re-enter
|
||||
@@ -1458,7 +1478,11 @@ EVAL_VALUE:
|
||||
wchar_t *tmp;
|
||||
SHOW_PROMPT:
|
||||
// Prompt because it is a mandatory parameter
|
||||
tmp = p->PromptProc(c, p->PromptProcParam);
|
||||
tmp = NULL;
|
||||
if (c->ProgrammingMode == false)
|
||||
{
|
||||
tmp = p->PromptProc(c, p->PromptProcParam);
|
||||
}
|
||||
if (tmp == NULL)
|
||||
{
|
||||
// User canceled
|
||||
@@ -2213,6 +2237,7 @@ CONSOLE *NewLocalConsole(wchar_t *infile, wchar_t *outfile)
|
||||
c->ReadPassword = ConsoleLocalReadPassword;
|
||||
c->Write = ConsoleLocalWrite;
|
||||
c->GetWidth = ConsoleLocalGetWidth;
|
||||
c->OutputLock = NewLock();
|
||||
|
||||
if (UniIsEmptyStr(infile) == false)
|
||||
{
|
||||
@@ -2324,6 +2349,8 @@ void ConsoleLocalFree(CONSOLE *c)
|
||||
Free(p);
|
||||
}
|
||||
|
||||
DeleteLock(c->OutputLock);
|
||||
|
||||
// Memory release
|
||||
Free(c);
|
||||
}
|
||||
@@ -2534,7 +2561,3 @@ void ConsoleWriteOutFile(CONSOLE *c, wchar_t *str, bool add_last_crlf)
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+7
-9
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -160,6 +160,8 @@ struct CONSOLE
|
||||
char *(*ReadPassword)(CONSOLE *c, wchar_t *prompt); // Function to read the password
|
||||
bool (*Write)(CONSOLE *c, wchar_t *str); // Function to write a string
|
||||
UINT (*GetWidth)(CONSOLE *c); // Get the width of the screen
|
||||
bool ProgrammingMode; // Programming Mode
|
||||
LOCK *OutputLock; // Output Lock
|
||||
};
|
||||
|
||||
// Local console parameters
|
||||
@@ -246,7 +248,3 @@ UINT ConsoleLocalGetWidth(CONSOLE *c);
|
||||
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+18
-15
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -624,8 +624,9 @@ UINT DCRegister(DDNS_CLIENT *c, bool ipv6, DDNS_REGISTER_PARAM *p, char *replace
|
||||
PackAddInt(req, "lasterror_ipv4", c->Err_IPv4_GetMyIp);
|
||||
PackAddInt(req, "lasterror_ipv6", c->Err_IPv6_GetMyIp);
|
||||
PackAddBool(req, "use_azure", use_azure);
|
||||
PackAddStr(req, "product_str", CEDAR_PRODUCT_STR);
|
||||
PackAddStr(req, "product_str", "SoftEther OSS");
|
||||
PackAddInt(req, "ddns_protocol_version", DDNS_VERSION);
|
||||
PackAddInt(req, "ddns_oss", 1);
|
||||
|
||||
|
||||
if (use_azure)
|
||||
@@ -670,9 +671,12 @@ UINT DCRegister(DDNS_CLIENT *c, bool ipv6, DDNS_REGISTER_PARAM *p, char *replace
|
||||
if (ret == NULL)
|
||||
{
|
||||
Debug("WpcCall: %s\n", url3);
|
||||
ret = WpcCallEx(url3, &t, DDNS_CONNECT_TIMEOUT, DDNS_COMM_TIMEOUT, "register", req,
|
||||
NULL, NULL, ((cert_hash != NULL && cert_hash->Size == SHA1_SIZE) ? cert_hash->Buf : NULL), NULL, DDNS_RPC_MAX_RECV_SIZE,
|
||||
add_header_name, add_header_value);
|
||||
ret = WpcCallEx2(url3, &t, DDNS_CONNECT_TIMEOUT, DDNS_COMM_TIMEOUT, "register", req,
|
||||
NULL, NULL, ((cert_hash != NULL && ((cert_hash->Size % SHA1_SIZE) == 0)) ? cert_hash->Buf : NULL),
|
||||
(cert_hash != NULL ? cert_hash->Size / SHA1_SIZE : 0),
|
||||
NULL, DDNS_RPC_MAX_RECV_SIZE,
|
||||
add_header_name, add_header_value,
|
||||
DDNS_SNI_VER_STRING);
|
||||
Debug("WpcCall Ret: %u\n", ret);
|
||||
}
|
||||
|
||||
@@ -874,8 +878,11 @@ UINT DCGetMyIpMain(DDNS_CLIENT *c, bool ipv6, char *dst, UINT dst_size, bool use
|
||||
}
|
||||
|
||||
|
||||
recv = HttpRequest(&data, (ipv6 ? NULL : &c->InternetSetting), DDNS_CONNECT_TIMEOUT, DDNS_COMM_TIMEOUT, &ret, false, NULL, NULL,
|
||||
NULL, ((cert_hash != NULL && cert_hash->Size == SHA1_SIZE) ? cert_hash->Buf : NULL));
|
||||
StrCpy(data.SniString, sizeof(data.SniString), DDNS_SNI_VER_STRING);
|
||||
|
||||
recv = HttpRequestEx3(&data, (ipv6 ? NULL : &c->InternetSetting), DDNS_CONNECT_TIMEOUT, DDNS_COMM_TIMEOUT, &ret, false, NULL, NULL,
|
||||
NULL, ((cert_hash != NULL && (cert_hash->Size % SHA1_SIZE) == 0) ? cert_hash->Buf : NULL),
|
||||
(cert_hash != NULL ? cert_hash->Size / SHA1_SIZE : 0), NULL, 0, NULL, NULL);
|
||||
|
||||
FreeBuf(cert_hash);
|
||||
|
||||
@@ -1040,7 +1047,3 @@ void DCGenNewKey(UCHAR *key)
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+17
-14
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -115,11 +115,18 @@
|
||||
#define DDNS_H
|
||||
|
||||
// Certificate hash
|
||||
#define DDNS_CERT_HASH "EFAC5FA0CDD14E0F864EED58A73C35D7E33B62F3"
|
||||
#define DDNS_CERT_HASH "78BF0499A99396907C9F49DD13571C81FE26E6F5" \
|
||||
"439BAFA75A6EE5671FC9F9A02D34FF29881761A0" \
|
||||
"EFAC5FA0CDD14E0F864EED58A73C35D7E33B62F3" \
|
||||
"74DF99D4B1B5F0488A388B50D347D26013DC67A5" \
|
||||
"6EBB39AFCA8C900635CFC11218CF293A612457E4"
|
||||
|
||||
#define DDNS_SNI_VER_STRING "DDNS"
|
||||
|
||||
|
||||
// Destination URL
|
||||
#define DDNS_URL_V4_GLOBAL "https://x%c.x%c.servers.ddns.softether-network.net/ddns/ddns.aspx"
|
||||
#define DDNS_URL_V6_GLOBAL "https://x%c.x%c.servers-v6.ddns.softether-network.net/ddns/ddns.aspx"
|
||||
#define DDNS_URL_V4_GLOBAL "https://x%c.x%c.dev.servers.ddns.softether-network.net/ddns/ddns.aspx"
|
||||
#define DDNS_URL_V6_GLOBAL "https://x%c.x%c.dev.servers-v6.ddns.softether-network.net/ddns/ddns.aspx"
|
||||
#define DDNS_URL2_V4_GLOBAL "http://get-my-ip.ddns.softether-network.net/ddns/getmyip.ashx"
|
||||
#define DDNS_URL2_V6_GLOBAL "http://get-my-ip-v6.ddns.softether-network.net/ddns/getmyip.ashx"
|
||||
|
||||
@@ -132,8 +139,8 @@
|
||||
#define DDNS_REPLACE_URL2_FOR_WEST_NGN "http://senet.p-ns.flets-west.jp/ddns/getmyip.ashx"
|
||||
|
||||
// For China: Free version
|
||||
#define DDNS_URL_V4_ALT "https://x%c.x%c.servers.ddns.uxcom.jp/ddns/ddns.aspx"
|
||||
#define DDNS_URL_V6_ALT "https://x%c.x%c.servers-v6.ddns.uxcom.jp/ddns/ddns.aspx"
|
||||
#define DDNS_URL_V4_ALT "https://x%c.x%c.dev.servers.ddns.uxcom.jp/ddns/ddns.aspx"
|
||||
#define DDNS_URL_V6_ALT "https://x%c.x%c.dev.servers-v6.ddns.uxcom.jp/ddns/ddns.aspx"
|
||||
#define DDNS_URL2_V4_ALT "http://get-my-ip.ddns.uxcom.jp/ddns/getmyip.ashx"
|
||||
#define DDNS_URL2_V6_ALT "http://get-my-ip-v6.ddns.uxcom.jp/ddns/getmyip.ashx"
|
||||
|
||||
@@ -241,7 +248,3 @@ void DCGetInternetSetting(DDNS_CLIENT *c, INTERNET_SETTING *t);
|
||||
#endif // DDNS_H
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -263,7 +263,3 @@ bool LiIsLicenseKey(char *str)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -122,7 +122,3 @@ bool LiStrToKeyBit(UCHAR *keybit, char *keystr);
|
||||
#endif // DATABASE_H
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+5
-9
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -1500,7 +1500,3 @@ RETRY:
|
||||
}
|
||||
|
||||
#endif // WIN32
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+5
-9
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -120,7 +120,3 @@ void EMExec();
|
||||
#endif // EM_H
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+5
-8
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -147,6 +147,3 @@ void EmLicenseAddDlgUpdate(HWND hWnd, RPC *s);
|
||||
void EmLicenseAddDlgShiftTextItem(HWND hWnd, UINT id1, UINT id2, UINT *next_focus);
|
||||
void EmLicenseAddDlgGetText(HWND hWnd, char *str, UINT size);
|
||||
void EmLicenseAddDlgOnOk(HWND hWnd, RPC *s);
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -1380,7 +1380,3 @@ void ElFree()
|
||||
el_lock = NULL;
|
||||
}
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -279,7 +279,3 @@ void OutRpcElLicenseStatus(PACK *p, RPC_EL_LICENSE_STATUS *t);
|
||||
#endif // ETHERLOG_H
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+110
-15
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -166,6 +166,103 @@ ADMIN_OPTION admin_options[] =
|
||||
|
||||
UINT num_admin_options = sizeof(admin_options) / sizeof(ADMIN_OPTION);
|
||||
|
||||
|
||||
// Create an EAP client for the specified Virtual Hub
|
||||
EAP_CLIENT *HubNewEapClient(CEDAR *cedar, char *hubname, char *client_ip_str, char *username)
|
||||
{
|
||||
HUB *hub = NULL;
|
||||
EAP_CLIENT *ret = NULL;
|
||||
char radius_servers[MAX_PATH] = {0};
|
||||
UINT radius_port = 0;
|
||||
UINT radius_retry_interval = 0;
|
||||
char radius_secret[MAX_PATH] = {0};
|
||||
char radius_suffix_filter[MAX_PATH] = {0};
|
||||
if (cedar == NULL || hubname == NULL || client_ip_str == NULL || username == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Find the Virtual Hub
|
||||
LockHubList(cedar);
|
||||
{
|
||||
hub = GetHub(cedar, hubname);
|
||||
}
|
||||
UnlockHubList(cedar);
|
||||
|
||||
if (hub != NULL)
|
||||
{
|
||||
if (GetRadiusServerEx2(hub, radius_servers, sizeof(radius_servers), &radius_port, radius_secret,
|
||||
sizeof(radius_secret), &radius_retry_interval, radius_suffix_filter, sizeof(radius_suffix_filter)))
|
||||
{
|
||||
bool use_peap = hub->RadiusUsePeapInsteadOfEap;
|
||||
|
||||
if (IsEmptyStr(radius_suffix_filter) || EndWith(username, radius_suffix_filter))
|
||||
{
|
||||
TOKEN_LIST *radius_servers_list = ParseToken(radius_servers, " ,;\t");
|
||||
|
||||
if (radius_servers_list != NULL && radius_servers_list->NumTokens >= 1)
|
||||
{
|
||||
// Try for each of RADIUS servers
|
||||
UINT i;
|
||||
bool finish = false;
|
||||
|
||||
for (i = 0;i < radius_servers_list->NumTokens;i++)
|
||||
{
|
||||
EAP_CLIENT *eap;
|
||||
IP ip;
|
||||
|
||||
if (GetIP(&ip, radius_servers_list->Token[i]))
|
||||
{
|
||||
eap = NewEapClient(&ip, radius_port, radius_secret, radius_retry_interval,
|
||||
RADIUS_INITIAL_EAP_TIMEOUT, client_ip_str, username, hubname);
|
||||
|
||||
if (eap != NULL)
|
||||
{
|
||||
if (use_peap == false)
|
||||
{
|
||||
// EAP
|
||||
if (EapClientSendMsChapv2AuthRequest(eap))
|
||||
{
|
||||
eap->GiveupTimeout = RADIUS_RETRY_TIMEOUT;
|
||||
ret = eap;
|
||||
finish = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// PEAP
|
||||
if (PeapClientSendMsChapv2AuthRequest(eap))
|
||||
{
|
||||
eap->GiveupTimeout = RADIUS_RETRY_TIMEOUT;
|
||||
ret = eap;
|
||||
finish = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (finish == false)
|
||||
{
|
||||
ReleaseEapClient(eap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (finish)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FreeToken(radius_servers_list);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ReleaseHub(hub);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
// Create a user list
|
||||
LIST *NewUserList()
|
||||
{
|
||||
@@ -587,6 +684,7 @@ void DataToHubOptionStruct(HUB_OPTION *o, RPC_ADMIN_OPTION *ao)
|
||||
GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxIcmpSessionsPerIp", &o->SecureNAT_MaxIcmpSessionsPerIp);
|
||||
GetHubAdminOptionDataAndSet(ao, "AccessListIncludeFileCacheLifetime", &o->AccessListIncludeFileCacheLifetime);
|
||||
GetHubAdminOptionDataAndSet(ao, "DisableKernelModeSecureNAT", &o->DisableKernelModeSecureNAT);
|
||||
GetHubAdminOptionDataAndSet(ao, "DisableIpRawModeSecureNAT", &o->DisableIpRawModeSecureNAT);
|
||||
GetHubAdminOptionDataAndSet(ao, "DisableUserModeSecureNAT", &o->DisableUserModeSecureNAT);
|
||||
GetHubAdminOptionDataAndSet(ao, "DisableCheckMacOnLocalBridge", &o->DisableCheckMacOnLocalBridge);
|
||||
GetHubAdminOptionDataAndSet(ao, "DisableCorrectIpOffloadChecksum", &o->DisableCorrectIpOffloadChecksum);
|
||||
@@ -598,9 +696,12 @@ void DataToHubOptionStruct(HUB_OPTION *o, RPC_ADMIN_OPTION *ao)
|
||||
GetHubAdminOptionDataAndSet(ao, "SuppressClientUpdateNotification", &o->SuppressClientUpdateNotification);
|
||||
GetHubAdminOptionDataAndSet(ao, "FloodingSendQueueBufferQuota", &o->FloodingSendQueueBufferQuota);
|
||||
GetHubAdminOptionDataAndSet(ao, "AssignVLanIdByRadiusAttribute", &o->AssignVLanIdByRadiusAttribute);
|
||||
GetHubAdminOptionDataAndSet(ao, "DenyAllRadiusLoginWithNoVlanAssign", &o->DenyAllRadiusLoginWithNoVlanAssign);
|
||||
GetHubAdminOptionDataAndSet(ao, "SecureNAT_RandomizeAssignIp", &o->SecureNAT_RandomizeAssignIp);
|
||||
GetHubAdminOptionDataAndSet(ao, "DetectDormantSessionInterval", &o->DetectDormantSessionInterval);
|
||||
GetHubAdminOptionDataAndSet(ao, "NoPhysicalIPOnPacketLog", &o->NoPhysicalIPOnPacketLog);
|
||||
GetHubAdminOptionDataAndSet(ao, "UseHubNameAsDhcpUserClassOption", &o->UseHubNameAsDhcpUserClassOption);
|
||||
GetHubAdminOptionDataAndSet(ao, "UseHubNameAsRadiusNasId", &o->UseHubNameAsRadiusNasId);
|
||||
}
|
||||
|
||||
// Convert the contents of the HUB_OPTION to data
|
||||
@@ -656,6 +757,7 @@ void HubOptionStructToData(RPC_ADMIN_OPTION *ao, HUB_OPTION *o, char *hub_name)
|
||||
Add(aol, NewAdminOption("SecureNAT_MaxIcmpSessionsPerIp", o->SecureNAT_MaxIcmpSessionsPerIp));
|
||||
Add(aol, NewAdminOption("AccessListIncludeFileCacheLifetime", o->AccessListIncludeFileCacheLifetime));
|
||||
Add(aol, NewAdminOption("DisableKernelModeSecureNAT", o->DisableKernelModeSecureNAT));
|
||||
Add(aol, NewAdminOption("DisableIpRawModeSecureNAT", o->DisableIpRawModeSecureNAT));
|
||||
Add(aol, NewAdminOption("DisableUserModeSecureNAT", o->DisableUserModeSecureNAT));
|
||||
Add(aol, NewAdminOption("DisableCheckMacOnLocalBridge", o->DisableCheckMacOnLocalBridge));
|
||||
Add(aol, NewAdminOption("DisableCorrectIpOffloadChecksum", o->DisableCorrectIpOffloadChecksum));
|
||||
@@ -667,9 +769,12 @@ void HubOptionStructToData(RPC_ADMIN_OPTION *ao, HUB_OPTION *o, char *hub_name)
|
||||
Add(aol, NewAdminOption("SuppressClientUpdateNotification", o->SuppressClientUpdateNotification));
|
||||
Add(aol, NewAdminOption("FloodingSendQueueBufferQuota", o->FloodingSendQueueBufferQuota));
|
||||
Add(aol, NewAdminOption("AssignVLanIdByRadiusAttribute", o->AssignVLanIdByRadiusAttribute));
|
||||
Add(aol, NewAdminOption("DenyAllRadiusLoginWithNoVlanAssign", o->DenyAllRadiusLoginWithNoVlanAssign));
|
||||
Add(aol, NewAdminOption("SecureNAT_RandomizeAssignIp", o->SecureNAT_RandomizeAssignIp));
|
||||
Add(aol, NewAdminOption("DetectDormantSessionInterval", o->DetectDormantSessionInterval));
|
||||
Add(aol, NewAdminOption("NoPhysicalIPOnPacketLog", o->NoPhysicalIPOnPacketLog));
|
||||
Add(aol, NewAdminOption("UseHubNameAsDhcpUserClassOption", o->UseHubNameAsDhcpUserClassOption));
|
||||
Add(aol, NewAdminOption("UseHubNameAsRadiusNasId", o->UseHubNameAsRadiusNasId));
|
||||
|
||||
Zero(ao, sizeof(RPC_ADMIN_OPTION));
|
||||
|
||||
@@ -1122,12 +1227,6 @@ bool IsValidCertInHub(HUB *h, X *x)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (IsXRevoked(x))
|
||||
{
|
||||
// Disabled by the CRL stored in the file
|
||||
return false;
|
||||
}
|
||||
|
||||
LockList(h->HubDb->CrlList);
|
||||
{
|
||||
ret = IsCertMatchCrlList(x, h->HubDb->CrlList);
|
||||
@@ -7335,7 +7434,3 @@ HUBDB *NewHubDb()
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+12
-8
@@ -3,15 +3,15 @@
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -265,6 +265,7 @@ struct HUB_OPTION
|
||||
UINT SecureNAT_MaxIcmpSessionsPerIp; // Maximum number of ICMP sessions per IP address
|
||||
UINT AccessListIncludeFileCacheLifetime; // Expiration of the access list external file (in seconds)
|
||||
bool DisableKernelModeSecureNAT; // Disable the kernel mode NAT
|
||||
bool DisableIpRawModeSecureNAT; // Disable the IP Raw Mode NAT
|
||||
bool DisableUserModeSecureNAT; // Disable the user mode NAT
|
||||
bool DisableCheckMacOnLocalBridge; // Disable the MAC address verification in local bridge
|
||||
bool DisableCorrectIpOffloadChecksum; // Disable the correction of checksum that is IP-Offloaded
|
||||
@@ -276,9 +277,12 @@ struct HUB_OPTION
|
||||
bool SuppressClientUpdateNotification; // Suppress the update notification function on the VPN Client
|
||||
UINT FloodingSendQueueBufferQuota; // The global quota of send queues of flooding packets
|
||||
bool AssignVLanIdByRadiusAttribute; // Assign the VLAN ID for the VPN session, by the attribute value of RADIUS
|
||||
bool DenyAllRadiusLoginWithNoVlanAssign; // Deny all RADIUS login with no VLAN ID assigned
|
||||
bool SecureNAT_RandomizeAssignIp; // Randomize the assignment IP address for new DHCP client
|
||||
UINT DetectDormantSessionInterval; // Interval (seconds) threshold to detect a dormant VPN session
|
||||
bool NoPhysicalIPOnPacketLog; // Disable saving physical IP address on the packet log
|
||||
bool UseHubNameAsDhcpUserClassOption; // Add HubName to DHCP request as User-Class option
|
||||
bool UseHubNameAsRadiusNasId; // Add HubName to Radius request as NAS-Identifier attrioption
|
||||
};
|
||||
|
||||
// MAC table entry
|
||||
@@ -434,6 +438,9 @@ struct HUB
|
||||
UINT RadiusRetryInterval; // Radius retry interval
|
||||
BUF *RadiusSecret; // Radius shared key
|
||||
char RadiusSuffixFilter[MAX_SIZE]; // Radius suffix filter
|
||||
char RadiusRealm[MAX_SIZE]; // Radius realm (optional)
|
||||
bool RadiusConvertAllMsChapv2AuthRequestToEap; // Convert all MS-CHAPv2 auth request to EAP
|
||||
bool RadiusUsePeapInsteadOfEap; // Use PEAP instead of EAP
|
||||
volatile bool Halt; // Halting flag
|
||||
bool Offline; // Offline
|
||||
bool BeingOffline; // Be Doing Offline
|
||||
@@ -636,11 +643,8 @@ void CalcTrafficDiff(TRAFFIC *diff, TRAFFIC *old, TRAFFIC *current);
|
||||
bool CheckMaxLoggedPacketsPerMinute(SESSION *s, UINT max_packets, UINT64 now);
|
||||
void VgsSetUserAgentValue(char *str);
|
||||
void VgsSetEmbTag(bool b);
|
||||
EAP_CLIENT *HubNewEapClient(CEDAR *cedar, char *hubname, char *client_ip_str, char *username);
|
||||
|
||||
#endif // HUB_H
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+5
-9
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -793,7 +793,3 @@ IPSEC_SERVER *NewIPsecServer(CEDAR *cedar)
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+5
-9
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -203,7 +203,3 @@ void IPSecSetDisable(bool b);
|
||||
|
||||
#endif // IPSEC_H
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -170,7 +170,7 @@ void EtherIPIpcConnectThread(THREAD *t, void *p)
|
||||
&s->ClientIP, s->ClientPort,
|
||||
&s->ServerIP, s->ServerPort,
|
||||
tmp,
|
||||
s->CryptName, true, mss);
|
||||
s->CryptName, true, mss, NULL);
|
||||
|
||||
if (ipc != NULL)
|
||||
{
|
||||
@@ -563,7 +563,3 @@ UINT CalcEtherIPTcpMss(ETHERIP_SERVER *s)
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -174,7 +174,3 @@ UINT CalcEtherIPTcpMss(ETHERIP_SERVER *s);
|
||||
#endif // IPSEC_ETHERIP_H
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+22
-10
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -113,6 +113,7 @@
|
||||
|
||||
#include "CedarPch.h"
|
||||
|
||||
//#define RAW_DEBUG
|
||||
|
||||
// Processing of IKE received packet
|
||||
void ProcIKEPacketRecv(IKE_SERVER *ike, UDPPACKET *p)
|
||||
@@ -753,7 +754,7 @@ void ProcIPsecEspPacketRecv(IKE_SERVER *ike, UDPPACKET *p)
|
||||
// Transport mode
|
||||
if (next_header == IP_PROTO_UDP)
|
||||
{
|
||||
if (ike->IPsec->Services.L2TP_IPsec)
|
||||
if (ike->IPsec->Services.L2TP_IPsec || ike->IPsec->Services.EtherIP_IPsec)
|
||||
{
|
||||
// An UDP packet has been received
|
||||
ProcIPsecUdpPacketRecv(ike, c, dec_data, dec_size);
|
||||
@@ -791,6 +792,19 @@ void ProcIPsecEspPacketRecv(IKE_SERVER *ike, UDPPACKET *p)
|
||||
if (ipsec_sa->PairIPsecSa != NULL)
|
||||
{
|
||||
c->CurrentIpSecSaSend = ipsec_sa->PairIPsecSa;
|
||||
|
||||
if (p->DestPort == IPSEC_PORT_IPSEC_ESP_UDP)
|
||||
{
|
||||
IPSECSA *send_sa = c->CurrentIpSecSaSend;
|
||||
if (send_sa->TransformSetting.CapsuleMode == IKE_P2_CAPSULE_TUNNEL)
|
||||
{
|
||||
send_sa->TransformSetting.CapsuleMode = IKE_P2_CAPSULE_NAT_TUNNEL_1;
|
||||
}
|
||||
else if (send_sa->TransformSetting.CapsuleMode == IKE_P2_CAPSULE_TRANSPORT)
|
||||
{
|
||||
send_sa->TransformSetting.CapsuleMode = IKE_P2_CAPSULE_NAT_TRANSPORT_1;
|
||||
}
|
||||
}
|
||||
}
|
||||
c->LastCommTick = ike->Now;
|
||||
ipsec_sa->LastCommTick = ike->Now;
|
||||
@@ -4711,6 +4725,8 @@ bool GetBestTransformSettingForIPsecSa(IKE_SERVER *ike, IKE_PACKET *pr, IPSEC_SA
|
||||
IKE_PACKET_TRANSFORM_PAYLOAD *transform = &transform_payload->Payload.Transform;
|
||||
IPSEC_SA_TRANSFORM_SETTING set;
|
||||
|
||||
Zero(&set, sizeof(set));
|
||||
|
||||
if (TransformPayloadToTransformSettingForIPsecSa(ike, transform, &set, server_ip))
|
||||
{
|
||||
Copy(setting, &set, sizeof(IPSEC_SA_TRANSFORM_SETTING));
|
||||
@@ -5971,7 +5987,3 @@ IKE_SERVER *NewIKEServer(CEDAR *cedar, IPSEC_SERVER *ipsec)
|
||||
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -474,7 +474,3 @@ IKE_SA *SearchIkeSaByCookie(IKE_SERVER *ike, UINT64 init_cookie, UINT64 resp_coo
|
||||
|
||||
#endif // IPSEC_IKE_H
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+55
-15
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -133,20 +133,27 @@ bool ParseAndExtractMsChapV2InfoFromPassword(IPC_MSCHAP_V2_AUTHINFO *d, char *pa
|
||||
|
||||
t = ParseTokenWithNullStr(password, ":");
|
||||
|
||||
if (t->NumTokens == 5)
|
||||
if (t->NumTokens == 6)
|
||||
{
|
||||
BUF *b1, *b2, *b3;
|
||||
BUF *b1, *b2, *b3, *b4;
|
||||
|
||||
b1 = StrToBin(t->Token[2]);
|
||||
b2 = StrToBin(t->Token[3]);
|
||||
b3 = StrToBin(t->Token[4]);
|
||||
b4 = StrToBin(t->Token[5]);
|
||||
|
||||
if (IsEmptyStr(t->Token[1]) == false && b1->Size == 16 && b2->Size == 16 && b3->Size == 24)
|
||||
if (IsEmptyStr(t->Token[1]) == false && b1->Size == 16 && b2->Size == 16 && b3->Size == 24
|
||||
&& b4->Size == 8)
|
||||
{
|
||||
UINT64 eap_client_ptr = 0;
|
||||
|
||||
StrCpy(d->MsChapV2_PPPUsername, sizeof(d->MsChapV2_PPPUsername), t->Token[1]);
|
||||
Copy(d->MsChapV2_ServerChallenge, b1->Buf, 16);
|
||||
Copy(d->MsChapV2_ClientChallenge, b2->Buf, 16);
|
||||
Copy(d->MsChapV2_ClientResponse, b3->Buf, 24);
|
||||
Copy(&eap_client_ptr, b4->Buf, 8);
|
||||
|
||||
d->MsChapV2_EapClient = (EAP_CLIENT *)eap_client_ptr;
|
||||
|
||||
ret = true;
|
||||
}
|
||||
@@ -154,6 +161,7 @@ bool ParseAndExtractMsChapV2InfoFromPassword(IPC_MSCHAP_V2_AUTHINFO *d, char *pa
|
||||
FreeBuf(b1);
|
||||
FreeBuf(b2);
|
||||
FreeBuf(b3);
|
||||
FreeBuf(b4);
|
||||
}
|
||||
|
||||
FreeToken(t);
|
||||
@@ -315,7 +323,7 @@ IPC *NewIPCByParam(CEDAR *cedar, IPC_PARAM *param, UINT *error_code)
|
||||
param->UserName, param->Password, error_code, ¶m->ClientIp,
|
||||
param->ClientPort, ¶m->ServerIp, param->ServerPort,
|
||||
param->ClientHostname, param->CryptName,
|
||||
param->BridgeMode, param->Mss);
|
||||
param->BridgeMode, param->Mss, NULL);
|
||||
|
||||
return ipc;
|
||||
}
|
||||
@@ -324,7 +332,7 @@ IPC *NewIPCByParam(CEDAR *cedar, IPC_PARAM *param, UINT *error_code)
|
||||
IPC *NewIPC(CEDAR *cedar, char *client_name, char *postfix, char *hubname, char *username, char *password,
|
||||
UINT *error_code, IP *client_ip, UINT client_port, IP *server_ip, UINT server_port,
|
||||
char *client_hostname, char *crypt_name,
|
||||
bool bridge_mode, UINT mss)
|
||||
bool bridge_mode, UINT mss, EAP_CLIENT *eap_client)
|
||||
{
|
||||
IPC *ipc;
|
||||
UINT dummy_int = 0;
|
||||
@@ -418,7 +426,6 @@ IPC *NewIPC(CEDAR *cedar, char *client_name, char *postfix, char *hubname, char
|
||||
|
||||
// Upload the authentication data
|
||||
p = PackLoginWithPlainPassword(hubname, username, password);
|
||||
PackAddInt64(p, "timestamp", SystemTime64());
|
||||
PackAddStr(p, "hello", client_name);
|
||||
PackAddInt(p, "client_ver", cedar->Version);
|
||||
PackAddInt(p, "client_build", cedar->Build);
|
||||
@@ -431,6 +438,14 @@ IPC *NewIPC(CEDAR *cedar, char *client_name, char *postfix, char *hubname, char
|
||||
PackAddBool(p, "require_monitor_mode", false);
|
||||
PackAddBool(p, "qos", false);
|
||||
|
||||
if (eap_client != NULL)
|
||||
{
|
||||
UINT64 ptr = (UINT64)eap_client;
|
||||
PackAddInt64(p, "release_me_eap_client", ptr);
|
||||
|
||||
AddRef(eap_client->Ref);
|
||||
}
|
||||
|
||||
// Unique ID is determined by the sum of the connecting client IP address and the client_name
|
||||
b = NewBuf();
|
||||
WriteBuf(b, client_ip, sizeof(IP));
|
||||
@@ -663,6 +678,24 @@ void FreeIPC(IPC *ipc)
|
||||
Free(ipc);
|
||||
}
|
||||
|
||||
// Set User Class option if corresponding Virtual Hub optin is set
|
||||
void IPCDhcpSetConditionalUserClass(IPC *ipc, DHCP_OPTION_LIST *req)
|
||||
{
|
||||
HUB *hub;
|
||||
|
||||
hub = GetHub(ipc->Cedar, ipc->HubName);
|
||||
if (hub == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (hub->Option && hub->Option->UseHubNameAsDhcpUserClassOption)
|
||||
{
|
||||
StrCpy(req->UserClass, sizeof(req->UserClass), ipc->HubName);
|
||||
}
|
||||
ReleaseHub(hub);
|
||||
}
|
||||
|
||||
// Release the IP address from the DHCP server
|
||||
void IPCDhcpFreeIP(IPC *ipc, IP *dhcp_server)
|
||||
{
|
||||
@@ -677,6 +710,7 @@ void IPCDhcpFreeIP(IPC *ipc, IP *dhcp_server)
|
||||
Zero(&req, sizeof(req));
|
||||
req.Opcode = DHCP_RELEASE;
|
||||
req.ServerAddress = IPToUINT(dhcp_server);
|
||||
IPCDhcpSetConditionalUserClass(ipc, &req);
|
||||
|
||||
FreeDHCPv4Data(IPCSendDhcpRequest(ipc, NULL, tran_id, &req, 0, 0, NULL));
|
||||
}
|
||||
@@ -697,6 +731,7 @@ void IPCDhcpRenewIP(IPC *ipc, IP *dhcp_server)
|
||||
req.Opcode = DHCP_REQUEST;
|
||||
StrCpy(req.Hostname, sizeof(req.Hostname), ipc->ClientHostname);
|
||||
req.RequestedIp = IPToUINT(&ipc->ClientIPAddress);
|
||||
IPCDhcpSetConditionalUserClass(ipc, &req);
|
||||
|
||||
FreeDHCPv4Data(IPCSendDhcpRequest(ipc, dhcp_server, tran_id, &req, 0, 0, NULL));
|
||||
}
|
||||
@@ -719,6 +754,7 @@ bool IPCDhcpRequestInformIP(IPC *ipc, DHCP_OPTION_LIST *opt, TUBE *discon_poll_t
|
||||
req.Opcode = DHCP_INFORM;
|
||||
req.ClientAddress = IPToUINT(client_ip);
|
||||
StrCpy(req.Hostname, sizeof(req.Hostname), ipc->ClientHostname);
|
||||
IPCDhcpSetConditionalUserClass(ipc, &req);
|
||||
|
||||
d = IPCSendDhcpRequest(ipc, NULL, tran_id, &req, DHCP_ACK, IPC_DHCP_TIMEOUT, discon_poll_tube);
|
||||
if (d == NULL)
|
||||
@@ -783,6 +819,7 @@ LABEL_RETRY_FOR_OPENVPN:
|
||||
req.RequestedIp = request_ip;
|
||||
req.Opcode = DHCP_DISCOVER;
|
||||
StrCpy(req.Hostname, sizeof(req.Hostname), ipc->ClientHostname);
|
||||
IPCDhcpSetConditionalUserClass(ipc, &req);
|
||||
|
||||
d = IPCSendDhcpRequest(ipc, NULL, tran_id, &req, DHCP_OFFER, IPC_DHCP_TIMEOUT, discon_poll_tube);
|
||||
if (d == NULL)
|
||||
@@ -893,6 +930,7 @@ LABEL_RETRY_FOR_OPENVPN:
|
||||
StrCpy(req.Hostname, sizeof(req.Hostname), ipc->ClientHostname);
|
||||
req.ServerAddress = d->ParsedOptionList->ServerAddress;
|
||||
req.RequestedIp = d->ParsedOptionList->ClientAddress;
|
||||
IPCDhcpSetConditionalUserClass(ipc, &req);
|
||||
|
||||
d2 = IPCSendDhcpRequest(ipc, NULL, tran_id, &req, DHCP_ACK, IPC_DHCP_TIMEOUT, discon_poll_tube);
|
||||
if (d2 == NULL)
|
||||
@@ -1227,6 +1265,12 @@ BUF *IPCBuildDhcpRequestOptions(IPC *ipc, DHCP_OPTION_LIST *opt)
|
||||
Add(o, NewDhcpOption(DHCP_ID_HOST_NAME, opt->Hostname, StrLen(opt->Hostname)));
|
||||
}
|
||||
|
||||
// User Class
|
||||
if (IsEmptyStr(opt->UserClass) == false)
|
||||
{
|
||||
Add(o, NewDhcpOption(DHCP_ID_USER_CLASS, opt->UserClass, StrLen(opt->UserClass)));
|
||||
}
|
||||
|
||||
// Vendor
|
||||
Add(o, NewDhcpOption(DHCP_ID_VENDOR_ID, IPC_DHCP_VENDOR_ID, StrLen(IPC_DHCP_VENDOR_ID)));
|
||||
|
||||
@@ -2073,7 +2117,3 @@ BLOCK *IPCRecvL2(IPC *ipc)
|
||||
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
+7
-10
@@ -1,17 +1,17 @@
|
||||
// SoftEther VPN Source Code
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
//
|
||||
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
|
||||
//
|
||||
// Copyright (c) 2012-2014 Daiyuu Nobori.
|
||||
// Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) 2012-2014 SoftEther Corporation.
|
||||
// Copyright (c) Daiyuu Nobori.
|
||||
// Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.
|
||||
// Copyright (c) SoftEther Corporation.
|
||||
//
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// http://www.softether.org/
|
||||
//
|
||||
// Author: Daiyuu Nobori
|
||||
// Author: Daiyuu Nobori, Ph.D.
|
||||
// Comments: Tetsuo Sugiyama, Ph.D.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -218,12 +218,13 @@ struct IPC_MSCHAP_V2_AUTHINFO
|
||||
UCHAR MsChapV2_ServerChallenge[16]; // MS-CHAPv2 Server Challenge
|
||||
UCHAR MsChapV2_ClientChallenge[16]; // MS-CHAPv2 Client Challenge
|
||||
UCHAR MsChapV2_ClientResponse[24]; // MS-CHAPv2 Client Response
|
||||
EAP_CLIENT *MsChapV2_EapClient; // EAP client
|
||||
};
|
||||
|
||||
IPC *NewIPC(CEDAR *cedar, char *client_name, char *postfix, char *hubname, char *username, char *password,
|
||||
UINT *error_code, IP *client_ip, UINT client_port, IP *server_ip, UINT server_port,
|
||||
char *client_hostname, char *crypt_name,
|
||||
bool bridge_mode, UINT mss);
|
||||
bool bridge_mode, UINT mss, EAP_CLIENT *eap_client);
|
||||
IPC *NewIPCByParam(CEDAR *cedar, IPC_PARAM *param, UINT *error_code);
|
||||
IPC *NewIPCBySock(CEDAR *cedar, SOCK *s, void *mac_address);
|
||||
void FreeIPC(IPC *ipc);
|
||||
@@ -268,7 +269,3 @@ bool ParseAndExtractMsChapV2InfoFromPassword(IPC_MSCHAP_V2_AUTHINFO *d, char *pa
|
||||
|
||||
|
||||
|
||||
|
||||
// Developed by SoftEther VPN Project at University of Tsukuba in Japan.
|
||||
// Department of Computer Science has dozens of overly-enthusiastic geeks.
|
||||
// Join us: http://www.tsukuba.ac.jp/english/admission/
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user