dnobori 11 éve
szülő
commit
d1bc9c57c5
100 módosított fájl, 26167 hozzáadás és 8759 törlés
  1. 10 0
      ChangeLog
  2. 10 0
      ChangeLog.txt
  3. 9 2028
      LICENSE
  4. 9 2028
      LICENSE.TXT
  5. 5 2
      README
  6. 5 2
      README.TXT
  7. 757 0
      THIRD_PARTY.TXT
  8. 523 0
      WARNING.TXT
  9. 2 0
      configure
  10. 37 4
      src/BuildUtil/BuildUtil.csproj
  11. 1 1
      src/BuildUtil/BuildUtilMain.cs
  12. BIN
      src/BuildUtil/CoreUtil.dll
  13. 188 0
      src/BuildUtil/CoreUtil/Bmp.cs
  14. 673 0
      src/BuildUtil/CoreUtil/Buf.cs
  15. 320 0
      src/BuildUtil/CoreUtil/Cache.cs
  16. 182 0
      src/BuildUtil/CoreUtil/Compress.cs
  17. 2180 0
      src/BuildUtil/CoreUtil/Console.cs
  18. 497 0
      src/BuildUtil/CoreUtil/Csv.cs
  19. 572 0
      src/BuildUtil/CoreUtil/Env.cs
  20. 1702 0
      src/BuildUtil/CoreUtil/FileIO.cs
  21. 233 0
      src/BuildUtil/CoreUtil/GZip.cs
  22. 170 0
      src/BuildUtil/CoreUtil/Kernel.cs
  23. 939 0
      src/BuildUtil/CoreUtil/MultiLang.cs
  24. 202 0
      src/BuildUtil/CoreUtil/Packer.cs
  25. 225 0
      src/BuildUtil/CoreUtil/RC4.cs
  26. 306 0
      src/BuildUtil/CoreUtil/ReadIni.cs
  27. 537 0
      src/BuildUtil/CoreUtil/Reg.cs
  28. 1029 0
      src/BuildUtil/CoreUtil/Secure.cs
  29. 352 0
      src/BuildUtil/CoreUtil/Stb.cs
  30. 4377 0
      src/BuildUtil/CoreUtil/Str.cs
  31. 430 0
      src/BuildUtil/CoreUtil/Tar.cs
  32. 542 0
      src/BuildUtil/CoreUtil/Thread.cs
  33. 174 0
      src/BuildUtil/CoreUtil/Time.cs
  34. 1034 0
      src/BuildUtil/CoreUtil/Util.cs
  35. 303 0
      src/BuildUtil/CoreUtil/Win32.cs
  36. 3856 0
      src/BuildUtil/CoreUtil/ZLib.cs
  37. 482 0
      src/BuildUtil/CoreUtil/Zip.cs
  38. 1049 0
      src/BuildUtil/Properties/Resources.Designer.cs
  39. 431 0
      src/BuildUtil/Properties/Resources.resx
  40. 1 0
      src/BuildUtil/VpnBuilder.cs
  41. 5 5
      src/Cedar/Cedar.h
  42. 0 41
      src/Cedar/Protocol.c
  43. 0 4
      src/Cedar/WinUi.c
  44. 10 0
      src/ChangeLog.txt
  45. 2 2
      src/CurrentBuild.txt
  46. 0 2350
      src/LICENSE
  47. 9 2028
      src/LICENSE.TXT
  48. 219 35
      src/Mayaqua/FileIO.c
  49. 11 1
      src/Mayaqua/FileIO.h
  50. 1 0
      src/Mayaqua/MayaType.h
  51. BIN
      src/PenCore/Thumbs.db
  52. 0 189
      src/README
  53. 5 2
      src/README.TXT
  54. 757 0
      src/THIRD_PARTY.TXT
  55. 523 0
      src/WARNING.TXT
  56. BIN
      src/bin/BuiltHamcoreFiles/unix/hamcore.se2
  57. 117 0
      src/bin/SOURCES_OF_BINARY_FILES.TXT
  58. 117 0
      src/bin/hamcore/SOURCES_OF_BINARY_FILES.TXT
  59. BIN
      src/bin/hamcore/SeLow_x64.sys
  60. BIN
      src/bin/hamcore/SeLow_x86.sys
  61. BIN
      src/bin/hamcore/egg1.exe
  62. BIN
      src/bin/hamcore/egg2.exe
  63. BIN
      src/bin/hamcore/egg3.exe
  64. 2 2
      src/bin/hamcore/inf/selow_x64/SeLow_x64.inf
  65. BIN
      src/bin/hamcore/inf/selow_x64/inf.cat
  66. 2 2
      src/bin/hamcore/inf/selow_x86/SeLow_x86.inf
  67. BIN
      src/bin/hamcore/inf/selow_x86/inf.cat
  68. 1 1
      src/bin/hamcore/inf/x64/INF_VPN.inf
  69. 1 1
      src/bin/hamcore/inf/x64/INF_VPN10.inf
  70. 1 1
      src/bin/hamcore/inf/x64/INF_VPN100.inf
  71. 1 1
      src/bin/hamcore/inf/x64/INF_VPN101.inf
  72. 1 1
      src/bin/hamcore/inf/x64/INF_VPN102.inf
  73. 1 1
      src/bin/hamcore/inf/x64/INF_VPN103.inf
  74. 1 1
      src/bin/hamcore/inf/x64/INF_VPN104.inf
  75. 1 1
      src/bin/hamcore/inf/x64/INF_VPN105.inf
  76. 1 1
      src/bin/hamcore/inf/x64/INF_VPN106.inf
  77. 1 1
      src/bin/hamcore/inf/x64/INF_VPN107.inf
  78. 1 1
      src/bin/hamcore/inf/x64/INF_VPN108.inf
  79. 1 1
      src/bin/hamcore/inf/x64/INF_VPN109.inf
  80. 1 1
      src/bin/hamcore/inf/x64/INF_VPN11.inf
  81. 1 1
      src/bin/hamcore/inf/x64/INF_VPN110.inf
  82. 1 1
      src/bin/hamcore/inf/x64/INF_VPN111.inf
  83. 1 1
      src/bin/hamcore/inf/x64/INF_VPN112.inf
  84. 1 1
      src/bin/hamcore/inf/x64/INF_VPN113.inf
  85. 1 1
      src/bin/hamcore/inf/x64/INF_VPN114.inf
  86. 1 1
      src/bin/hamcore/inf/x64/INF_VPN115.inf
  87. 1 1
      src/bin/hamcore/inf/x64/INF_VPN116.inf
  88. 1 1
      src/bin/hamcore/inf/x64/INF_VPN117.inf
  89. 1 1
      src/bin/hamcore/inf/x64/INF_VPN118.inf
  90. 1 1
      src/bin/hamcore/inf/x64/INF_VPN119.inf
  91. 1 1
      src/bin/hamcore/inf/x64/INF_VPN12.inf
  92. 1 1
      src/bin/hamcore/inf/x64/INF_VPN120.inf
  93. 1 1
      src/bin/hamcore/inf/x64/INF_VPN121.inf
  94. 1 1
      src/bin/hamcore/inf/x64/INF_VPN122.inf
  95. 1 1
      src/bin/hamcore/inf/x64/INF_VPN123.inf
  96. 1 1
      src/bin/hamcore/inf/x64/INF_VPN124.inf
  97. 1 1
      src/bin/hamcore/inf/x64/INF_VPN125.inf
  98. 1 1
      src/bin/hamcore/inf/x64/INF_VPN126.inf
  99. 1 1
      src/bin/hamcore/inf/x64/INF_VPN127.inf
  100. 1 1
      src/bin/hamcore/inf/x64/INF_VPN13.inf

+ 10 - 0
ChangeLog

@@ -0,0 +1,10 @@
+ChangeLog of SoftEther VPN
+--------------------------
+
+The ChangeLog of SoftEther VPN is on our web site:
+http://www.softether.org/5-download/history
+
+(In Japanese: http://ja.softether.org/5-download/history)
+
+Enjoy it!
+

+ 10 - 0
ChangeLog.txt

@@ -0,0 +1,10 @@
+ChangeLog of SoftEther VPN
+--------------------------
+
+The ChangeLog of SoftEther VPN is on our web site:
+http://www.softether.org/5-download/history
+
+(In Japanese: http://ja.softether.org/5-download/history)
+
+Enjoy it!
+

+ 9 - 2028
LICENSE

@@ -56,13 +56,17 @@ COMMUNICATIONS. USING THIS SOFTWARE IN OTHER COUNTRIES MIGHT BE RESTRICTED.
 THE FOLLOWING GPLV2 CONDITIONS APPLY ON ALL SOFTETHER VPN PROGRAMS WHICH ARE
 DEVELOPED BY SOFTETHER VPN PROJECT.
 
+READ AND UNDERSTAND THE 'WARNING.TXT' FILE BEFORE USING THIS SOFTWARE.
+SOME SOFTWARE PROGRAMS FROM THIRD PARTIES ARE INCLUDED ON THIS SOFTWARE WITH
+LICENSE CONDITIONS WHICH ARE DESCRIBED ON THE 'THIRD_PARTY.TXT' FILE.
+
                     GNU GENERAL PUBLIC LICENSE
                        Version 2, June 1991
 
  Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
+ Everyone is permitted to copy and distribute verbatim copies of this license
+document, but changing it is not allowed.
 
                             Preamble
 
@@ -320,2031 +324,8 @@ DAMAGES.
 
                      END OF TERMS AND CONDITIONS
 
-Note that the above copyright notices and use conditions do not apply on the
-software components listed in below which are included in this Software. When
-you use or distribute Software with including these libraries, you have to
-follow the conditions of these libraries.
-
-These library's copyright notices and conditions are following;
-
--------------------
-
-BitVisor(R) VPN Client Module (IPsec Driver):
-Copyright (c) 2007, 2008 University of Tsukuba.
-Copyright (C) 2007, 2008 National Institute of Information and Communications
-Technology.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. Neither the name of the University of Tsukuba nor the names of its
-contributors may be used to endorse or promote products derived from this
-software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------
-
-Microsoft(R) C Runtime Library:
-(c) 2007 Microsoft Corporation. All Rights Reserved.
-
--------------------
-
-RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki):
-
-License to copy and use this software is granted provided that it is
-identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface
-(Cryptoki)" in all material mentioning or referencing this software.
-
-License is also granted to make and use derivative works provided that such
-works are identified as "derived from the RSA Security Inc. PKCS #11
-Cryptographic Token Interface (Cryptoki)" in all material mentioning or
-referencing the derived work.
-
-RSA Security Inc. makes no representations concerning either the
-merchantability of this software or the suitability of this software for any
-particular purpose. It is provided "as is" without express or implied warranty
-of any kind.
-
--------------------
-
-WinPcap:
-Copyright (c) 2001 - 2003 NetGroup, Politecnico di Torino (Italy)
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. Neither the name of the Politecnico di Torino nor the names of its
-contributors may be used to endorse or promote products derived from this
-software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------
-
-libedit:
-Copyright (c) 1992, 1993 The Regents of the University of California.  All
-rights reserved.
-
-This code is derived from software contributed to Berkeley by Christos Zoulas
-of Cornell University.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. Neither the name of the University nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------
-
-libiconv:
-
-          GNU LIBRARY GENERAL PUBLIC LICENSE
-               Version 2, June 1991
-
- Copyright (C) 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- Everyone is permitted to copy and distribute verbatim copies of this license
-document, but changing it is not allowed.
-
-[This is the first released version of the library GPL. It is
- numbered 2 because it goes with version 2 of the ordinary GPL.]
-
-                Preamble
-
-  The licenses for most software are designed to take away your freedom to
-share and change it. By contrast, the GNU General Public Licenses are intended
-to guarantee your freedom to share and change free software--to make sure the
-software is free for all its users.
-
-  This license, the Library General Public License, applies to some specially
-designated Free Software Foundation software, and to any other libraries whose
-authors decide to use it. You can use it for your libraries, too.
-
-  When we speak of free software, we are referring to freedom, not price. Our
-General Public Licenses are designed to make sure that you have the freedom to
-distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new free
-programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid anyone to
-deny you these rights or to ask you to surrender the rights. These
-restrictions translate to certain responsibilities for you if you distribute
-copies of the library, or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis or for
-a fee, you must give the recipients all the rights that we gave you. You must
-make sure that they, too, receive or can get the source
-code. If you link a program with the library, you must provide complete object
-files to the recipients so that they can relink them with the library, after
-making changes to the library and recompiling it. And you must show them these
-terms so they know their rights.
-
-  Our method of protecting your rights has two steps: (1) copyright the
-library, and (2) offer you this license which gives you legal permission to
-copy, distribute and/or modify the library.
-
-  Also, for each distributor's protection, we want to make certain that
-everyone understands that there is no warranty for this free library. If the
-library is modified by someone else and passed on, we want its recipients to
-know that what they have is not the original version, so that any problems
-introduced by others will not reflect on the original authors' reputations.
-
-  Finally, any free program is threatened constantly by software patents. We
-wish to avoid the danger that companies distributing free software will
-individually obtain patent licenses, thus in effect transforming the program
-into proprietary software. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  Most GNU software, including some libraries, is covered by the ordinary GNU
-General Public License, which was designed for utility programs. This license,
-the GNU Library General Public License, applies to certain designated
-libraries. This license is quite different from the ordinary one; be sure to
-read it in full, and don't assume that anything in it is the same as in the
-ordinary license.
-
-  The reason we have a separate public license for some libraries is that they
-blur the distinction we usually make between modifying or adding to a program
-and simply using it. Linking a program with a library, without changing the
-library, is in some sense simply using the library, and is analogous to
-running a utility program or application program. However, in a textual and
-legal sense, the linked executable is a combined work, a derivative of the
-original library, and the ordinary General Public License treats it as such.
-
-  Because of this blurred distinction, using the ordinary General Public
-License for libraries did not effectively promote software sharing, because
-most developers did not use the libraries. We concluded that weaker conditions
-might promote sharing better.
-
-  However, unrestricted linking of non-free programs would deprive the users
-of those programs of all benefit from the free status of the libraries
-themselves. This Library General Public License is intended to
-permit developers of non-free programs to use free libraries, while preserving
-your freedom as a user of such programs to change the free libraries that are
-incorporated in them. (We have not seen how to achieve this as regards changes
-in header files, but we have achieved it as regards changes in the actual
-functions of the Library.) The hope is that this will lead to faster
-development of free libraries.
-
-  The precise terms and conditions for copying, distribution and modification
-follow. Pay close attention to the difference between a "work based on the
-library" and a "work that uses the library". The former contains code derived
-from the library, while the latter only works together with the library.
-
-  Note that it is possible for a library to be covered by the ordinary General
-Public License rather than by this special one.
-
-          GNU LIBRARY GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library which contains a
-notice placed by the copyright holder or other authorized party saying it may
-be distributed under the terms of this Library
-General Public License (also called "this License"). Each licensee is
-addressed as "you".
-
-  A "library" means a collection of software functions and/or data prepared so
-as to be conveniently linked with application programs (which use some of
-those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work which has
-been distributed under these terms. A "work based on the Library" means either
-the Library or any derivative work under copyright law: that is to say, a work
-containing the Library or a portion of it, either verbatim or with
-modifications and/or translated straightforwardly into another language.
-(Hereinafter, translation is included without limitation in the term
-"modification".)
-
-  "Source code" for a work means the preferred form of the work for making
-modifications to it. For a library, complete source code means all the source
-code for all modules it contains, plus any associated interface definition
-files, plus the scripts used to control compilation and installation of the
-library.
-
-  Activities other than copying, distribution and modification are not covered
-by this License; they are outside its scope. The act of running a program
-using the Library is not restricted, and output from such a program is covered
-only if its contents constitute a work based on the Library (independent of
-the use of the Library in a tool for writing it). Whether that is true depends
-on what the Library does and what the program that uses the Library does.
-
-  1. You may copy and distribute verbatim copies of the Library's complete
-source code as you receive it, in any medium, provided that you conspicuously
-and appropriately publish on each copy an appropriate copyright notice and
-disclaimer of warranty; keep intact all the notices that refer to this License
-and to the absence of any warranty; and distribute a copy of this License
-along with the Library.
-
-  You may charge a fee for the physical act of transferring a copy, and you
-may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Library or any portion of it,
-thus forming a work based on the Library, and copy and distribute such
-modifications or work under the terms of Section 1 above, provided that you
-also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices stating
-that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no charge to all
-third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a table
-of data to be supplied by an application program that uses the facility, other
-than as an argument passed when the facility is invoked, then you must make a
-good faith effort to ensure that, in the event an application does not supply
-such function or table, the facility still operates, and performs whatever
-part of its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has a
-purpose that is entirely well-defined independent of the application.
-Therefore, Subsection 2d requires that any application-supplied function or
-table used by this function must be optional: if the application does not
-supply it, the square root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If identifiable
-sections of that work are not derived from the Library, and can be reasonably
-considered independent and separate works in themselves, then this License,
-and its terms, do not apply to those sections when you distribute them as
-separate works. But when you distribute the same sections as part of a whole
-which is a work based on the Library, the distribution of the whole must be on
-the terms of this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest your
-rights to work written entirely by you; rather, the intent is to exercise the
-right to control the distribution of derivative or collective works based on
-the Library.
-
-In addition, mere aggregation of another work not based on the Library with
-the Library (or with a work based on the Library) on a volume of a storage or
-distribution medium does not bring the other work under the scope of this
-License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do this,
-you must alter all the notices that refer to this License, so that they refer
-to the ordinary GNU General Public License, version 2, instead of to this
-License. (If a newer version than version 2 of the ordinary GNU General Public
-License has appeared, then you can specify that version instead if you wish.)
-Do not make any other change in these notices.
-
-  Once this change is made in a given copy, it is irreversible for that copy,
-so the ordinary GNU General Public License applies to all subsequent copies
-and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of the Library
-into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or derivative of
-it, under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you accompany it with the complete
-corresponding machine-readable source code, which must be distributed under
-the terms of Sections 1 and 2 above on a medium customarily used for software
-interchange.
-
-  If distribution of object code is made by offering access to copy from a
-designated place, then offering equivalent access to copy the source code from
-the same place satisfies the requirement to distribute the source code, even
-though third parties are not compelled to copy the source along with the
-object code.
-
-  5. A program that contains no derivative of any portion of the Library, but
-is designed to work with the Library by being compiled or linked with it, is
-called a "work that uses the Library". Such a work, in isolation, is not a
-derivative work of the Library, and therefore falls outside the scope of this
-License.
-
-  However, linking a "work that uses the Library" with the Library creates an
-executable that is a derivative of the Library (because it contains portions
-of the Library), rather than a "work that uses the library". The executable is
-therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file that is
-part of the Library, the object code for the work may be a derivative work of
-the Library even though the source code is not.
-Whether this is true is especially significant if the work can be linked
-without the Library, or if the work is itself a library. The threshold for
-this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data structure
-layouts and accessors, and small macros and small inline functions (ten lines
-or less in length), then the use of the object file is unrestricted,
-regardless of whether it is legally a derivative work. (Executables containing
-this object code plus portions of the Library will still fall under Section
-6.)
-
-  Otherwise, if the work is a derivative of the Library, you may distribute
-the object code for the work under the terms of Section 6. Any executables
-containing that work also fall under Section 6, whether or not they are linked
-directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also compile or link a
-"work that uses the Library" with the Library to produce a work containing
-portions of the Library, and distribute that work under terms of your choice,
-provided that the terms permit modification of the work for the customer's own
-use and reverse engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the Library
-is used in it and that the Library and its use are covered by this License.
-You must supply a copy of this License. If the work during execution displays
-copyright notices, you must include the copyright notice for the Library among
-them, as well as a reference directing the user to the copy of this License.
-Also, you must do one of these things:
-
-    a) Accompany the work with the complete corresponding machine-readable
-source code for the Library including whatever changes were used in the work
-(which must be distributed under Sections 1 and 2 above) ; and, if the work is
-an executable linked with the Library, with the complete machine-readable
-"work that uses the Library", as object code and/or source code, so that the
-user can modify the Library and then relink to produce a modified executable
-containing the modified Library. (It is understood that the user who changes
-the contents of definitions files in the Library will not necessarily be able
-to recompile the application to use the modified definitions.)
-
-    b) Accompany the work with a written offer, valid for at least three
-years, to give the same user the materials specified in Subsection 6a, above,
-for a charge no more than the cost of performing this distribution.
-
-    c) If distribution of the work is made by offering access to copy from a
-designated place, offer equivalent access to copy the above specified
-materials from the same place.
-
-    d) Verify that the user has already received a copy of these materials or
-that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the Library"
-must include any data and utility programs needed for reproducing the
-executable from it. However, as a special exception, the source code
-distributed need not include anything that is normally distributed (in either
-source or binary form) with the major components (compiler, kernel, and so on)
-of the operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-  It may happen that this requirement contradicts the license restrictions of
-other proprietary libraries that do not normally accompany the operating
-system. Such a contradiction means you cannot use both them and the Library
-together in an executable that you distribute.
-
-  7. You may place library facilities that are a work based on the Library
-side-by-side in a single library together with other library facilities not
-covered by this License, and distribute such a combined library, provided that
-the separate distribution of the work based on the Library and of the other
-library facilities is otherwise permitted, and provided that you do these two
-things:
-
-    a) Accompany the combined library with a copy of the same work based on
-the Library, uncombined with any other library facilities. This must be
-distributed under the terms of the Sections above.
-
-    b) Give prominent notice with the combined library of the fact that part
-of it is a work based on the Library, and explaining where to find the
-accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute the
-Library except as expressly provided under this License. Any attempt otherwise
-to copy, modify, sublicense, link with, or distribute the Library is void, and
-will automatically terminate your rights under this License. However, parties
-who have received copies, or rights, from you under this License will not have
-their licenses terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not signed
-it. However, nothing else grants you permission to modify or distribute the
-Library or its derivative works. These actions are prohibited by law if you do
-not accept this License. Therefore, by modifying or distributing the Library
-(or any work based on the Library), you indicate your acceptance of this
-License to do so, and all its terms and conditions for copying, distributing
-or modifying the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the original
-licensor to copy, distribute, link with or modify the Library subject to these
-terms and conditions. You may not impose any further restrictions on the
-recipients' exercise of the rights granted herein. You are not responsible for
-enforcing compliance by third parties to this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or otherwise)
-that contradict the conditions of this License, they do not excuse you from
-the conditions of this License. If you cannot distribute so as to satisfy
-simultaneously your obligations under this License and any other pertinent
-obligations, then as a consequence you may not distribute the Library at all.
-For example, if a patent license would not permit royalty-free redistribution
-of the Library by all those who receive copies directly or indirectly through
-you, then the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply, and
-the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any patents or
-other property right claims or to contest validity of any such claims; this
-section has the sole purpose of protecting the integrity of the free software
-distribution system which is implemented by public license practices. Many
-people have made generous contributions to the wide range of software
-distributed through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing to
-distribute software through any other system and a licensee cannot impose that
-choice.
-
-This section is intended to make thoroughly clear what is believed to be a
-consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in certain
-countries either by patents or by copyrighted interfaces, the original
-copyright holder who places the Library under this License may add an explicit
-geographical distribution limitation excluding those countries, so that
-distribution is permitted only in or among countries not thus excluded. In
-such case, this License incorporates the limitation as if written in the body
-of this License.
-
-  13. The Free Software Foundation may publish revised and/or new versions of
-the Library General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and "any later
-version", you have the option of following the terms and conditions either of
-that version or of any later version published by the Free Software
-Foundation. If the Library does not specify a license version number, you may
-choose any version ever published by the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free programs
-whose distribution conditions are incompatible with these, write to the author
-to ask for permission. For software which is copyrighted by the Free Software
-Foundation, write to the Free Software Foundation; we sometimes make
-exceptions for this. Our decision will be guided by the two goals of
-preserving the free status of all derivatives of our free software and of
-promoting the sharing and reuse of software generally.
-
-                NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
-THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
-STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
-LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
-PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE,
-YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO
-LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR
-THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-             END OF TERMS AND CONDITIONS
-
--------------------
-
-ncurses:
-Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, distribute with
-modifications, sublicense, and/or sell copies of the Software, and to permit
-persons to whom the Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name(s) of the above copyright holders
-shall not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization.
-
--------------------
-
-OpenSSL:
-OpenSSL License
-Copyright (c) 1998-2011 The OpenSSL Project.  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer. 
-
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-
-3. All advertising materials mentioning features or use of this software must
-display the following acknowledgment: "This product includes software
-developed by the OpenSSL Project for use in the OpenSSL Toolkit.
-(http://www.openssl.org/)"
-
-4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
-endorse or promote products derived from this software without prior written
-permission. For written permission, please contact [email protected].
-
-5. Products derived from this software may not be called "OpenSSL" nor may
-"OpenSSL" appear in their names without prior written permission of the
-OpenSSL Project.
-
-6. Redistributions of any form whatsoever must retain the following
-acknowledgment: "This product includes software developed by the OpenSSL
-Project for use in the OpenSSL Toolkit (http://www.openssl.org/)"
-
-THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY EXPRESSED
-OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
-EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-This product includes cryptographic software written by Eric Young
-([email protected]).  This product includes software written by Tim Hudson
-([email protected]).
-
-Original SSLeay License
-Copyright (C) 1995-1998 Eric Young ([email protected]) All rights reserved.
-
-This package is an SSL implementation written by Eric Young
-([email protected]). The implementation was written so as to conform with
-Netscapes SSL.
-
-This library is free for commercial and non-commercial use as long as the
-following conditions are aheared to.  The following conditions apply to all
-code found in this distribution, be it the RC4, RSA, lhash, DES, etc., code;
-not just the SSL code.  The SSL documentation included with this distribution
-is covered by the same copyright terms except that the holder is Tim Hudson
-([email protected]).
-
-Copyright remains Eric Young's, and as such any Copyright notices in the code
-are not to be removed. If this package is used in a product, Eric Young should
-be given attribution as the author of the parts of the library used. This can
-be in the form of a textual message at program startup or in documentation
-(online or textual) provided with the package.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-1. Redistributions of source code must retain the copyright notice, this list
-of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. All advertising materials mentioning features or use of this software must
-display the following acknowledgement: "This product includes cryptographic
-software written by Eric Young ([email protected])" The word 'cryptographic'
-can be left out if the rouines from the library being used are not
-cryptographic related :-).
-4. If you include any Windows specific code (or a derivative thereof) from the
-apps directory (application code) you must include an acknowledgement: "This
-product includes software written by Tim Hudson ([email protected])"
-
-THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
-EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-The licence and distribution terms for any publically available version or
-derivative of this code cannot be changed.  i.e. this code cannot simply be
-copied and put under another distribution licence [including the GNU Public
-Licence.]
-
--------------------
-
-zlib:
-Acknowledgments:
-  The deflate format used by zlib was defined by Phil Katz. The deflate and
-zlib specifications were written by L. Peter Deutsch. Thanks to all the people
-who reported problems and suggested various improvements in zlib; they are too
-numerous to cite here.
-
-Copyright notice:
- (C) 1995-2004 Jean-loup Gailly and Mark Adler
-
-  This software is provided 'as-is', without any express or implied warranty.
-In no event will the authors be held liable for any damages arising from the
-use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-including commercial applications, and to alter it and redistribute it freely,
-subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-claim that you wrote the original software. If you use this software in a
-product, an acknowledgment in the product documentation would be appreciated
-but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Jean-loup Gailly        Mark Adler
-  [email protected]          [email protected]
-
-If you use the zlib library in a product, we would appreciate *not* receiving
-lengthy legal documents to sign. The sources are provided for free but without
-warranty of any kind.  The library has been entirely written by Jean-loup
-Gailly and Mark Adler; it does not include third-party code.
-
-If you redistribute modified sources, we would appreciate that you include in
-the file ChangeLog history information documenting your changes. Please read
-the FAQ for more information on the distribution of modified source versions.
-
--------------------
-
-Intel AESNI Sample Library:
-
-Copyright (c) 2010, Intel Corporation
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors may
-be used to endorse or promote products derived from this software without
-specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Issue Date: Aug 6, 2010
-
--------------------
-
-NOTES
-
-SoftEther provides source codes of some GPL/LGPL/other libraries listed above
-on its web server. Anyone can download, use and re-distribute them under
-individual licenses which are contained on each archive file, available from
-the following URL:
-http://uploader.softether.co.jp/src/
-
-
-
-BitVisor(R) VPN Client Module (IPsec Driver):
-Copyright (c) 2007, 2008 University of Tsukuba.
-Copyright (C) 2007, 2008 National Institute of Information and Communications
-Technology.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. Neither the name of the University of Tsukuba nor the names of its
-contributors may be used to endorse or promote products derived from this
-software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------
-
-Microsoft(R) C Runtime Library:
-(c) 2007 Microsoft Corporation. All Rights Reserved.
-
--------------------
-
-RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki):
-
-License to copy and use this software is granted provided that it is
-identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface
-(Cryptoki)" in all material mentioning or referencing this software.
-
-License is also granted to make and use derivative works provided that such
-works are identified as "derived from the RSA Security Inc. PKCS #11
-Cryptographic Token Interface (Cryptoki)" in all material mentioning or
-referencing the derived work.
-
-RSA Security Inc. makes no representations concerning either the
-merchantability of this software or the suitability of this software for any
-particular purpose. It is provided "as is" without express or implied warranty
-of any kind.
-
--------------------
-
-WinPcap:
-Copyright (c) 2001 - 2003 NetGroup, Politecnico di Torino (Italy)
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. Neither the name of the Politecnico di Torino nor the names of its
-contributors may be used to endorse or promote products derived from this
-software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------
-
-libedit:
-Copyright (c) 1992, 1993 The Regents of the University of California.  All
-rights reserved.
-
-This code is derived from software contributed to Berkeley by Christos Zoulas
-of Cornell University.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. Neither the name of the University nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------
-
-libiconv:
-
-          GNU LIBRARY GENERAL PUBLIC LICENSE
-               Version 2, June 1991
-
- Copyright (C) 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- Everyone is permitted to copy and distribute verbatim copies of this license
-document, but changing it is not allowed.
-
-[This is the first released version of the library GPL. It is
- numbered 2 because it goes with version 2 of the ordinary GPL.]
-
-                Preamble
-
-  The licenses for most software are designed to take away your freedom to
-share and change it. By contrast, the GNU General Public Licenses are intended
-to guarantee your freedom to share and change free software--to make sure the
-software is free for all its users.
-
-  This license, the Library General Public License, applies to some specially
-designated Free Software Foundation software, and to any other libraries whose
-authors decide to use it. You can use it for your libraries, too.
-
-  When we speak of free software, we are referring to freedom, not price. Our
-General Public Licenses are designed to make sure that you have the freedom to
-distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new free
-programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid anyone to
-deny you these rights or to ask you to surrender the rights. These
-restrictions translate to certain responsibilities for you if you distribute
-copies of the library, or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis or for
-a fee, you must give the recipients all the rights that we gave you. You must
-make sure that they, too, receive or can get the source
-code. If you link a program with the library, you must provide complete object
-files to the recipients so that they can relink them with the library, after
-making changes to the library and recompiling it. And you must show them these
-terms so they know their rights.
-
-  Our method of protecting your rights has two steps: (1) copyright the
-library, and (2) offer you this license which gives you legal permission to
-copy, distribute and/or modify the library.
-
-  Also, for each distributor's protection, we want to make certain that
-everyone understands that there is no warranty for this free library. If the
-library is modified by someone else and passed on, we want its recipients to
-know that what they have is not the original version, so that any problems
-introduced by others will not reflect on the original authors' reputations.
-
-  Finally, any free program is threatened constantly by software patents. We
-wish to avoid the danger that companies distributing free software will
-individually obtain patent licenses, thus in effect transforming the program
-into proprietary software. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  Most GNU software, including some libraries, is covered by the ordinary GNU
-General Public License, which was designed for utility programs. This license,
-the GNU Library General Public License, applies to certain designated
-libraries. This license is quite different from the ordinary one; be sure to
-read it in full, and don't assume that anything in it is the same as in the
-ordinary license.
-
-  The reason we have a separate public license for some libraries is that they
-blur the distinction we usually make between modifying or adding to a program
-and simply using it. Linking a program with a library, without changing the
-library, is in some sense simply using the library, and is analogous to
-running a utility program or application program. However, in a textual and
-legal sense, the linked executable is a combined work, a derivative of the
-original library, and the ordinary General Public License treats it as such.
-
-  Because of this blurred distinction, using the ordinary General Public
-License for libraries did not effectively promote software sharing, because
-most developers did not use the libraries. We concluded that weaker conditions
-might promote sharing better.
-
-  However, unrestricted linking of non-free programs would deprive the users
-of those programs of all benefit from the free status of the libraries
-themselves. This Library General Public License is intended to
-permit developers of non-free programs to use free libraries, while preserving
-your freedom as a user of such programs to change the free libraries that are
-incorporated in them. (We have not seen how to achieve this as regards changes
-in header files, but we have achieved it as regards changes in the actual
-functions of the Library.) The hope is that this will lead to faster
-development of free libraries.
-
-  The precise terms and conditions for copying, distribution and modification
-follow. Pay close attention to the difference between a "work based on the
-library" and a "work that uses the library". The former contains code derived
-from the library, while the latter only works together with the library.
-
-  Note that it is possible for a library to be covered by the ordinary General
-Public License rather than by this special one.
-
-          GNU LIBRARY GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library which contains a
-notice placed by the copyright holder or other authorized party saying it may
-be distributed under the terms of this Library
-General Public License (also called "this License"). Each licensee is
-addressed as "you".
-
-  A "library" means a collection of software functions and/or data prepared so
-as to be conveniently linked with application programs (which use some of
-those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work which has
-been distributed under these terms. A "work based on the Library" means either
-the Library or any derivative work under copyright law: that is to say, a work
-containing the Library or a portion of it, either verbatim or with
-modifications and/or translated straightforwardly into another language.
-(Hereinafter, translation is included without limitation in the term
-"modification".)
-
-  "Source code" for a work means the preferred form of the work for making
-modifications to it. For a library, complete source code means all the source
-code for all modules it contains, plus any associated interface definition
-files, plus the scripts used to control compilation and installation of the
-library.
-
-  Activities other than copying, distribution and modification are not covered
-by this License; they are outside its scope. The act of running a program
-using the Library is not restricted, and output from such a program is covered
-only if its contents constitute a work based on the Library (independent of
-the use of the Library in a tool for writing it). Whether that is true depends
-on what the Library does and what the program that uses the Library does.
-
-  1. You may copy and distribute verbatim copies of the Library's complete
-source code as you receive it, in any medium, provided that you conspicuously
-and appropriately publish on each copy an appropriate copyright notice and
-disclaimer of warranty; keep intact all the notices that refer to this License
-and to the absence of any warranty; and distribute a copy of this License
-along with the Library.
-
-  You may charge a fee for the physical act of transferring a copy, and you
-may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Library or any portion of it,
-thus forming a work based on the Library, and copy and distribute such
-modifications or work under the terms of Section 1 above, provided that you
-also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices stating
-that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no charge to all
-third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a table
-of data to be supplied by an application program that uses the facility, other
-than as an argument passed when the facility is invoked, then you must make a
-good faith effort to ensure that, in the event an application does not supply
-such function or table, the facility still operates, and performs whatever
-part of its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has a
-purpose that is entirely well-defined independent of the application.
-Therefore, Subsection 2d requires that any application-supplied function or
-table used by this function must be optional: if the application does not
-supply it, the square root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If identifiable
-sections of that work are not derived from the Library, and can be reasonably
-considered independent and separate works in themselves, then this License,
-and its terms, do not apply to those sections when you distribute them as
-separate works. But when you distribute the same sections as part of a whole
-which is a work based on the Library, the distribution of the whole must be on
-the terms of this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest your
-rights to work written entirely by you; rather, the intent is to exercise the
-right to control the distribution of derivative or collective works based on
-the Library.
-
-In addition, mere aggregation of another work not based on the Library with
-the Library (or with a work based on the Library) on a volume of a storage or
-distribution medium does not bring the other work under the scope of this
-License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do this,
-you must alter all the notices that refer to this License, so that they refer
-to the ordinary GNU General Public License, version 2, instead of to this
-License. (If a newer version than version 2 of the ordinary GNU General Public
-License has appeared, then you can specify that version instead if you wish.)
-Do not make any other change in these notices.
-
-  Once this change is made in a given copy, it is irreversible for that copy,
-so the ordinary GNU General Public License applies to all subsequent copies
-and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of the Library
-into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or derivative of
-it, under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you accompany it with the complete
-corresponding machine-readable source code, which must be distributed under
-the terms of Sections 1 and 2 above on a medium customarily used for software
-interchange.
-
-  If distribution of object code is made by offering access to copy from a
-designated place, then offering equivalent access to copy the source code from
-the same place satisfies the requirement to distribute the source code, even
-though third parties are not compelled to copy the source along with the
-object code.
-
-  5. A program that contains no derivative of any portion of the Library, but
-is designed to work with the Library by being compiled or linked with it, is
-called a "work that uses the Library". Such a work, in isolation, is not a
-derivative work of the Library, and therefore falls outside the scope of this
-License.
-
-  However, linking a "work that uses the Library" with the Library creates an
-executable that is a derivative of the Library (because it contains portions
-of the Library), rather than a "work that uses the library". The executable is
-therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file that is
-part of the Library, the object code for the work may be a derivative work of
-the Library even though the source code is not.
-Whether this is true is especially significant if the work can be linked
-without the Library, or if the work is itself a library. The threshold for
-this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data structure
-layouts and accessors, and small macros and small inline functions (ten lines
-or less in length), then the use of the object file is unrestricted,
-regardless of whether it is legally a derivative work. (Executables containing
-this object code plus portions of the Library will still fall under Section
-6.)
-
-  Otherwise, if the work is a derivative of the Library, you may distribute
-the object code for the work under the terms of Section 6. Any executables
-containing that work also fall under Section 6, whether or not they are linked
-directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also compile or link a
-"work that uses the Library" with the Library to produce a work containing
-portions of the Library, and distribute that work under terms of your choice,
-provided that the terms permit modification of the work for the customer's own
-use and reverse engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the Library
-is used in it and that the Library and its use are covered by this License.
-You must supply a copy of this License. If the work during execution displays
-copyright notices, you must include the copyright notice for the Library among
-them, as well as a reference directing the user to the copy of this License.
-Also, you must do one of these things:
-
-    a) Accompany the work with the complete corresponding machine-readable
-source code for the Library including whatever changes were used in the work
-(which must be distributed under Sections 1 and 2 above) ; and, if the work is
-an executable linked with the Library, with the complete machine-readable
-"work that uses the Library", as object code and/or source code, so that the
-user can modify the Library and then relink to produce a modified executable
-containing the modified Library. (It is understood that the user who changes
-the contents of definitions files in the Library will not necessarily be able
-to recompile the application to use the modified definitions.)
-
-    b) Accompany the work with a written offer, valid for at least three
-years, to give the same user the materials specified in Subsection 6a, above,
-for a charge no more than the cost of performing this distribution.
-
-    c) If distribution of the work is made by offering access to copy from a
-designated place, offer equivalent access to copy the above specified
-materials from the same place.
-
-    d) Verify that the user has already received a copy of these materials or
-that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the Library"
-must include any data and utility programs needed for reproducing the
-executable from it. However, as a special exception, the source code
-distributed need not include anything that is normally distributed (in either
-source or binary form) with the major components (compiler, kernel, and so on)
-of the operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-  It may happen that this requirement contradicts the license restrictions of
-other proprietary libraries that do not normally accompany the operating
-system. Such a contradiction means you cannot use both them and the Library
-together in an executable that you distribute.
-
-  7. You may place library facilities that are a work based on the Library
-side-by-side in a single library together with other library facilities not
-covered by this License, and distribute such a combined library, provided that
-the separate distribution of the work based on the Library and of the other
-library facilities is otherwise permitted, and provided that you do these two
-things:
-
-    a) Accompany the combined library with a copy of the same work based on
-the Library, uncombined with any other library facilities. This must be
-distributed under the terms of the Sections above.
-
-    b) Give prominent notice with the combined library of the fact that part
-of it is a work based on the Library, and explaining where to find the
-accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute the
-Library except as expressly provided under this License. Any attempt otherwise
-to copy, modify, sublicense, link with, or distribute the Library is void, and
-will automatically terminate your rights under this License. However, parties
-who have received copies, or rights, from you under this License will not have
-their licenses terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not signed
-it. However, nothing else grants you permission to modify or distribute the
-Library or its derivative works. These actions are prohibited by law if you do
-not accept this License. Therefore, by modifying or distributing the Library
-(or any work based on the Library), you indicate your acceptance of this
-License to do so, and all its terms and conditions for copying, distributing
-or modifying the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the original
-licensor to copy, distribute, link with or modify the Library subject to these
-terms and conditions. You may not impose any further restrictions on the
-recipients' exercise of the rights granted herein. You are not responsible for
-enforcing compliance by third parties to this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or otherwise)
-that contradict the conditions of this License, they do not excuse you from
-the conditions of this License. If you cannot distribute so as to satisfy
-simultaneously your obligations under this License and any other pertinent
-obligations, then as a consequence you may not distribute the Library at all.
-For example, if a patent license would not permit royalty-free redistribution
-of the Library by all those who receive copies directly or indirectly through
-you, then the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply, and
-the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any patents or
-other property right claims or to contest validity of any such claims; this
-section has the sole purpose of protecting the integrity of the free software
-distribution system which is implemented by public license practices. Many
-people have made generous contributions to the wide range of software
-distributed through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing to
-distribute software through any other system and a licensee cannot impose that
-choice.
-
-This section is intended to make thoroughly clear what is believed to be a
-consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in certain
-countries either by patents or by copyrighted interfaces, the original
-copyright holder who places the Library under this License may add an explicit
-geographical distribution limitation excluding those countries, so that
-distribution is permitted only in or among countries not thus excluded. In
-such case, this License incorporates the limitation as if written in the body
-of this License.
-
-  13. The Free Software Foundation may publish revised and/or new versions of
-the Library General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and "any later
-version", you have the option of following the terms and conditions either of
-that version or of any later version published by the Free Software
-Foundation. If the Library does not specify a license version number, you may
-choose any version ever published by the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free programs
-whose distribution conditions are incompatible with these, write to the author
-to ask for permission. For software which is copyrighted by the Free Software
-Foundation, write to the Free Software Foundation; we sometimes make
-exceptions for this. Our decision will be guided by the two goals of
-preserving the free status of all derivatives of our free software and of
-promoting the sharing and reuse of software generally.
-
-                NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
-THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
-STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
-LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
-PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE,
-YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO
-LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR
-THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-             END OF TERMS AND CONDITIONS
-
--------------------
-
-ncurses:
-Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, distribute with
-modifications, sublicense, and/or sell copies of the Software, and to permit
-persons to whom the Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name(s) of the above copyright holders
-shall not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization.
-
--------------------
-
-OpenSSL:
-OpenSSL License
-Copyright (c) 1998-2011 The OpenSSL Project.  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer. 
-
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-
-3. All advertising materials mentioning features or use of this software must
-display the following acknowledgment: "This product includes software
-developed by the OpenSSL Project for use in the OpenSSL Toolkit.
-(http://www.openssl.org/)"
-
-4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
-endorse or promote products derived from this software without prior written
-permission. For written permission, please contact [email protected].
-
-5. Products derived from this software may not be called "OpenSSL" nor may
-"OpenSSL" appear in their names without prior written permission of the
-OpenSSL Project.
-
-6. Redistributions of any form whatsoever must retain the following
-acknowledgment: "This product includes software developed by the OpenSSL
-Project for use in the OpenSSL Toolkit (http://www.openssl.org/)"
-
-THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY EXPRESSED
-OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
-EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-This product includes cryptographic software written by Eric Young
-([email protected]).  This product includes software written by Tim Hudson
-([email protected]).
-
-Original SSLeay License
-Copyright (C) 1995-1998 Eric Young ([email protected]) All rights reserved.
-
-This package is an SSL implementation written by Eric Young
-([email protected]). The implementation was written so as to conform with
-Netscapes SSL.
-
-This library is free for commercial and non-commercial use as long as the
-following conditions are aheared to.  The following conditions apply to all
-code found in this distribution, be it the RC4, RSA, lhash, DES, etc., code;
-not just the SSL code.  The SSL documentation included with this distribution
-is covered by the same copyright terms except that the holder is Tim Hudson
-([email protected]).
-
-Copyright remains Eric Young's, and as such any Copyright notices in the code
-are not to be removed. If this package is used in a product, Eric Young should
-be given attribution as the author of the parts of the library used. This can
-be in the form of a textual message at program startup or in documentation
-(online or textual) provided with the package.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-1. Redistributions of source code must retain the copyright notice, this list
-of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. All advertising materials mentioning features or use of this software must
-display the following acknowledgement: "This product includes cryptographic
-software written by Eric Young ([email protected])" The word 'cryptographic'
-can be left out if the rouines from the library being used are not
-cryptographic related :-).
-4. If you include any Windows specific code (or a derivative thereof) from the
-apps directory (application code) you must include an acknowledgement: "This
-product includes software written by Tim Hudson ([email protected])"
-
-THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
-EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-The licence and distribution terms for any publically available version or
-derivative of this code cannot be changed.  i.e. this code cannot simply be
-copied and put under another distribution licence [including the GNU Public
-Licence.]
-
--------------------
-
-zlib:
-Acknowledgments:
-  The deflate format used by zlib was defined by Phil Katz. The deflate and
-zlib specifications were written by L. Peter Deutsch. Thanks to all the people
-who reported problems and suggested various improvements in zlib; they are too
-numerous to cite here.
-
-Copyright notice:
- (C) 1995-2004 Jean-loup Gailly and Mark Adler
-
-  This software is provided 'as-is', without any express or implied warranty.
-In no event will the authors be held liable for any damages arising from the
-use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-including commercial applications, and to alter it and redistribute it freely,
-subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-claim that you wrote the original software. If you use this software in a
-product, an acknowledgment in the product documentation would be appreciated
-but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Jean-loup Gailly        Mark Adler
-  [email protected]          [email protected]
-
-If you use the zlib library in a product, we would appreciate *not* receiving
-lengthy legal documents to sign. The sources are provided for free but without
-warranty of any kind.  The library has been entirely written by Jean-loup
-Gailly and Mark Adler; it does not include third-party code.
-
-If you redistribute modified sources, we would appreciate that you include in
-the file ChangeLog history information documenting your changes. Please read
-the FAQ for more information on the distribution of modified source versions.
-
--------------------
-
-Intel AESNI Sample Library:
-
-Copyright (c) 2010, Intel Corporation
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors may
-be used to endorse or promote products derived from this software without
-specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Issue Date: Aug 6, 2010
-
--------------------
-
-NOTES WRITTEN BY SOFTETHER CORPORATION
-
-Note for users of non-Windows version of PacketiX VPN: The enumerated bundle
-of License Agreements above are copies of original License Agreements of each
-library programs which PacketiX VPN uses. PacketiX VPN is not a delivered work
-from these libraries. PacketiX VPN is a separated work from the libraries, but
-it may call functions of the libraries (whether or not PacketiX VPN calls such
-functions are depended on the user's intention to link them or not on user's
-side computer). While some libraries indicate GPL or LGPL as a condition to
-re-distribute, PacketiX VPN is not license under GPL nor LGPL. Therefore, we
-took special care not to make PacketiX VPN become delivered works of any GPL
-or LGPL libraries. In order to achieve that, both PacketiX VPN and GPL/LGPL
-libraries are distributed with isolated forms (means that any program files of
-PacketiX VPN are not bound nor linked to any GPL/LGPL libraries). If a user of
-PacketiX VPN wants to link GPL/LGPL libraries by their own decisions,
-operations and responsibilities, he may do that on his computer. However, if a
-delivered work under copyright law is created as a result of such an
-operation, such a delivered work must not re-distributed to other people,
-because it may violate GPL/LGPL libraries' conditions.
-
-Note for users of Windows version of PacketiX VPN: For technical reason, the
-above texts are exactly same as a file which is also contained on the
-non-Windows version of PacketiX VPN. Actually, the Windows version of PacketiX
-VPN has no relations to any GPL/LGPL libraries enumerated above.
-
-SoftEther Corporation provides source codes of some GPL/LGPL/other libraries
-listed above on its web server. Anyone can download, use and re-distribute
-them under individual licenses which are contained on each archive file,
-available from the following URL:
-http://uploader.softether.co.jp/src/
-
-
-
-THE IMPORTANT NOTICES ABOUT SOFTETHER VPN
-
-FUNCTIONS OF VPN COMMUNICATIONS EMBEDDED ON THIS SOFTWARE ARE VERY POWERFUL
-THAN EVER. THIS STRONG VPN ABILITY WILL BRING YOU HUGE BENEFITS. HOWEVER, IF
-YOU MISUSE THIS SOFTWARE, IT MIGHT DAMAGES YOURSELF. IN ORDER TO AVOID SUCH
-RISKS, THIS DOCUMENT ACCOUNTS IMPORTANT NOTICES FOR CUSTOMERS WHO ARE WILLING
-TO USE THIS SOFTWARE. THE FOLLOWING INSTRUCTIONS ARE VERY IMPORTANT. READ AND
-UNDERSTAND IT CAREFULLY. ADDITIONALLY, IF YOU ARE PLANNING TO USE THE DYNAMIC
-DNS, THE NAT TRAVERSAL OR THE VPN AZURE FUNCTIONS, READ THE SECTION 3.5
-CAREFULLY. THESE FUNCTIONS ARE FREE SERVICES PROVIDED VIA THE INTERNET, ARE
-NOT GUARANTEED, AND ARE NOT INTENDED TO BE USED FOR BUSINESS OR COMMERCIAL
-USE. DO NOT USE THESE SERVICES FOR YOUR BUSINESS OR COMMERCIAL USE.
-
-
-1. VPN Communication Protocols
-1.1. SoftEther VPN Protocol
-SoftEther VPN can perform VPN communication. Unlike traditional VPN protocols,
-SoftEther VPN has an implementation of the newly-designed "SoftEther VPN
-Protocol (SE-VPN Protocol)" . SE-VPN protocol encapsulates any Ethernet
-packets into a HTTPS (HTTP over SSL) connection. Therefore SE-VPN protocol can
-communicate beyond firewalls even if the firewall is configured to block
-traditional VPN packets by network administrator. SE-VPN protocol is designed
-and implemented to comply TLS 1.0 (RFC 5246) and HTTPS (RFC 2818). However, it
-sometimes have different behavior to RFCs. If you are a network administrator
-and want to block SE-VPN protocols on the firewall, you can adopt a
-"white-list" policy on the firewall to filter any TCP or UDP packets on the
-border except explicitly allowed packets towards specific web sites and
-servers.
-
-1.2. NAT Traversal Function
-Generally, if you use traditional VPN systems you have to request a network
-administrator to make the NAT or firewall to "open" or "relay" specific TCP or
-UDP ports. However, there are demands somehow to eliminate such working costs
-on network administrators. In order to satisfy such demands, SoftEther VPN has
-the newly-implemented "NAT Traversal" function. NAT Traversal is enabled by
-default. A SoftEther VPN Server running on the computer behind NAT or firewall
-can accept VPN connections from the Internet, without any special
-configurations on firewalls or NATs. If you want to disable the NAT Traversal
-function, modify the "DisableNatTraversal" to "true" on the configuration file
-of SoftEther VPN Server. In order to disable it on the client-side, append
-"/tcp" suffix on the destination hostname.
-
-1.3. Dynamic DNS Function
-Traditional legacy VPN system requires a static global IP address on the VPN
-server. In consideration of shortage of global IP addresses, SoftEther
-Corporation implements the "Dynamic DNS Function" on SoftEther VPN Server.
-Dynamic DNS is enabled by default. Dynamic DNS function notify the current
-global IP address of the PC to the Dynamic DNS Servers which are operated by
-SoftEther Corporation. A globally-unique hostname (FQDN) such as
-"abc.softether.net" ( "abc" varies as unique per a user) will be assigned on
-the VPN Server. If you tell this unique hostname to a VPN user, the user can
-specify it as the destination VPN Sever hostname on the VPN Client and will be
-able to connect the VPN Server. No IP addresses are required to know
-beforehand. If the IP address of the VPN Server varies, the registered IP
-address related to the hostname of Dynamic DNS service will be changed
-automatically. By this mechanism, no longer need a static global IP address
-which costs monthly to ISPs. You can use consumer-level inexpensive Internet
-connection with dynamic IP address in order to operate an enterprise-level VPN
-system. If you want to disable Dynamic DNS, specify "true" on the "Disabled"
-items of the "DDnsClient" directive on the SoftEther VPN Server configuration
-file. * Note for residents in People's Republic of China: If your VPN Server
-is running on the People's Republic of China, the DNS suffix will be replaced
-to "sedns.cn" domain. The "sedns.cn" domain is the service possessed and
-operated by "Beijing Daiyuu SoftEther Technology Co., Ltd" which is a
-Chinese-local enterprise.
-
-1.4. VPN over ICMP / VPN over DNS functions
-If you want to make a VPN connection between SoftEther VPN Client / Bridge and
-SoftEther VPN Server, but if TCP and UDP packets are prohibited by the
-firewall, then you can encapsulates payloads into "ICMP" (as known as Ping) or
-"DNS" packets. This function can realize a VPN connection by using ICMP or DNS
-even if the firewall or router blocks every TCP or UDP connections. VPN over
-ICMP / VPN over DNS functions are designed to comply standard ICMP and DNS
-specifications as possible, however it sometimes has a behavior not to fully
-comply them. Therefore, few poor-quality routers may be caused a
-memory-overflow or something troubles when a lot of ICMP or DNS packets are
-passed, and such routers sometimes freezes or reboots. It might affects other
-users on the same network. To avoid such risks, append the suffix "/tcp" on
-the destination hostname which is specified on the VPN-client side to disable
-VPN over ICMP / DNS functions.
-
-1.5. VPN Azure Cloud Service
-If your SoftEther VPN Server is placed behind the NAT or firwall, and by some
-reason you cannot use NAT Traversal function, Dynamic DNS function or VPN over
-ICMP/DNS function, you can use VPN Azure Clouse Service. SoftEther Corporation
-operates VPN Azure Cloud on Internet. After the VPN Server makes a connection
-to the VPN Azure Cloud, the hostname "abc.vpnazure.net" ( "abc" is a unique
-hostname) can be specified to connect to the VPN Server via the VPN Azure
-Cloud. Practically, such a hostname is pointing a global IP address of one of
-cloud servers which are operated by SoftEther Corporation. If A VPN Client
-connects to such a VPN Azure host, then the VPN Azure host will relay all
-traffics between the VPN Client and the VPN Server. VPN Azure is disabled by
-default. You can activate it easily by using VPN Server Configuration Tool.
-
-1.6. UDP Acceleration
-SoftEther VPN has the UDP Acceleration Function. If a VPN consists of two
-sites detects that UDP channel can be established, UDP will be automatically
-used. By this function, throughput of UDP increases. If direct UDP channel can
-be established, direct UDP packets will be used. However, if there is
-something obstacles such as firewalls or NATs, the "UDP Hole Punching"
-technology will be used, instead. The "UDP Hole Punching" uses the cloud
-servers which SoftEther Corporation operates on Internet. UDP Acceleration can
-be disabled anytime by setting up so on the VPN-client side.
-
-
-2. VPN Software
-2.1. SoftEther VPN Client
-If you use SoftEther VPN Client on Windows, the Virtual Network Adapter device
-driver will be installed on Windows. The Virtual Network Adapter is
-implemented as a kernel-mode driver for Windows. The driver is
-digitally-signed by a certificate issued by VeriSign, Inc. and also sub-signed
-by Symantec Corporation. A message to ask you want to sure install the driver
-might be popped up on the screen. SoftEther VPN Client may response the
-message if possible. SoftEther VPN Client also optimizes the configuration of
-MMCSS (Multimedia Class Scheduler Service) on Windows. You can undo the
-optimizations of MMCSS afterwards.
-
-2.2. SoftEther VPN Server / Bridge
-If you use SoftEther VPN Server / Bridge on Windows with "Local Bridge"
-functions, you have to install the low-level Ethernet packet processing driver
-on the computer. The driver is digitally-signed by a certificate issued by
-VeriSign, Inc. and also sub-signed by Symantec Corporation. SoftEther VPN
-Server / Bridge may disable the TCP/IP offloading features on the physical
-network adapter for Local Bridge function. In Windows Vista / 2008 or greater
-version, VPN Server may inject a packet-filter driver which complies Windows
-Filter Platform (WPF) specification into the kernel in order to provide IPsec
-function. The packet-filter driver will be loaded available only if IPsec
-function is enabled. Once you enables IPsec function of SoftEther VPN Server,
-the built-in IPsec function of Windows will be disabled. After you disabled
-IPsec function of SoftEther VPN Server, then the built-in IPsec function of
-Windows will revive. In order to provide the Local Bridge function, SoftEther
-VPN Server / Bridge disables the TCP/IP offloading function on the operating
-system.
-
-2.3. User-mode Installation
-You can install SoftEther VPN Server and SoftEther VPN Bridge as "User-mode"
-on Windows. In other words, even if you don't have Windows system
-administrator's privileges, you can install SoftEther VPN as a normal user.
-User-mode install will disable a few functions, however other most functions
-work well. Therefore, for example, an employee can install SoftEther VPN
-Server on the computer in the office network, and he will be able to connect
-to the server from his home. In order to realize such a system by user-self,
-no system administrative privileges are required in the view-point of
-technical. However, breaking rules of the company to install software on the
-computer without authority might be regarded as an unfavorable behavior. If
-you are an employee and belong to the company, and the company-policy
-prohibits installing software or making communications towards Internet
-without permission, you have to obtain a permission from the network
-administrator or the executive officer of your company in advance to install
-SoftEther VPN. If you install VPN Server / Bridge as User-mode, an icon will
-be appeared on the Windows task-tray. If you feel that the icon disturbs you,
-you can hide it by your operation. However, you must not exploit this hiding
-function to install VPN Server on other person's computer as a spyware. Such
-behavior might be an offence against the criminal law.
-
-2.4. Keep Alive Function
-SoftEther VPN Server and SoftEther VPN Bridge has Keep Alive Function by
-default. The purpose of this function is to sustain the Internet line active.
-The function transmits UDP packets with a random-byte-array-payload
-periodically. This function is useful to avoid automatic disconnection on
-mobile or dial-up connections. You can disable Keep Alive Function anytime.
-
-2.5. Uninstallation
-The uninstallation process of SoftEther VPN software will delete all program
-files. However, non-program files (such as files and data which are generated
-by running of programs) ) will not be deleted. For technical reason, the exe
-and resource files of uninstaller might remain. Such remaining files never
-affects to use the computer, however you can delete it manually. Kernel-mode
-drivers might not be deleted, however such drivers will not be loaded after
-the next boot of Windows. You can use "sc" command of Windows to delete
-kernel-mode drivers manually.
-
-2.6. Security
-You should set the administrator's password on SoftEther VPN Server / Bridge
-after installation. If you neglect to do it, another person can access to
-SoftEther VPN Server / Bridge and can set the password without your
-permission. This caution might be also applied on SoftEther VPN Client for
-Linux.
-
-2.7. Automatic Update Notification
-SoftEther VPN software for Windows has an automatic update notification
-function. It accesses to the SoftEther Update server periodically to check
-whether or not the latest version of software is released. If the latest
-version is released, the notification message will be popped up on the screen.
-In order to achieve this purpose, the version, language settings, the unique
-identifier, the IP address of your computer and the hostname of VPN Server
-which is connected to will be sent to the SoftEther Update server. No personal
-information will be sent. Automatic Update Notification is enabled by default,
-however you can disable it on the configuration screen. The setting whether
-turned on or turned off will be saved individually corresponding to each
-destination VPN server, by VPN Server Manager.
-
-2.8. Virtual NAT Function
-A Virtual Hub on SoftEther VPN Server / Bridge has "Virtual NAT Function" .
-Virtual NAT Function can share a single IP address on the physical network by
-multiple private IP address of VPN Clients. There are two operation mode of
-Virtual NAT: User-mode and Kernel-mode. In the user-mode operation, Virtual
-NAT shares an IP address which is assigned on the host operating system.
-Unlike user-mode, the kernel-mode operation attempts to find DHCP servers on
-the physical network. If there are two or more physical networks, a DHCP
-server will be sought automatically for each segments serially. If a DHCP
-server found, and an IP address is acquired, the IP address will be used by
-the Virtual NAT. In this case, an IP entry as a DHCP client will be registered
-on the IP pool of the physical DHCP Server. The physical default gateway and
-the DNS server will be used by the Virtual NAT in order to communicate with
-hosts in Internet. In kernel-mode operation, a Virtual Hub has a virtual MAC
-address which is operating on the physical Ethernet segment. In order to check
-the connectivity to Internet, SoftEther VPN periodically sends DNS query
-packet to resolve the IP address of host "www.yahoo.com" or "www.baidu.com" ,
-and attempts to connect to the TCP port 80 of such a resulted IP address for
-connectivity check.
-
-2.9. Unattended Installation of Kernel-mode Components
-When SoftEther VPN will detect a necessity to install the kernel-mode
-components on Windows, a confirmation message will be appeared by Windows
-system. In this occasion, SoftEther VPN software will switch to the Unattended
-Installation mode in order to respond "Yes" to Windows. This is a solution to
-prevent dead-locks when a remote-administration is performed from remote
-place.
-
-2.10. Windows Firewall
-SoftEther VPN software will register itself as a safe-program. Such an entry
-will be remain after the uninstallation. You can remove it manually from the
-Control Panel of Windows.
-
-
-3. Internet Services
-3.1. Internet Services which are provided by SoftEther Corporation
-SoftEther Corporation provides Dynamic DNS, NAT Traversal and VPN Azure server
-services on the Internet. These services are free of charge. Customers can
-access to the services by using SoftEther VPN software, via Internet. These
-service will be planned to be available from Open-Source version of "SoftEther
-VPN" which will be released in the future.
-
-3.2. Sent Information and Privacy Protection
-SoftEther VPN software may send an IP address, hostname, the version of VPN
-software on the customer's computer to the cloud service operated by SoftEther
-Corporation, in order to use the above services. These sending of information
-are minimal necessary to use the services. No personal information will be
-sent. SoftEther Corporation records log files of the cloud service servers for
-90 days at least with the received information. Such logs will be used for
-troubleshooting and other legitimate activities. SoftEther Corporation may
-provide logs to a public servant of Japanese government who are belonging to
-courts, police stations and the prosecutor's office, in order to comply such
-authorities' order. (Every Japanese public servants are liable by law to keep
-the information close.) Moreover, the IP addresses or other information will
-be processed statistically and provided to the public, not to expose the each
-concrete IP address, in order to release the release of research activities.
-
-3.3. Communication Data via VPN Azure Service
-Regardless of the above 3.2 rule, if the customer sends or receives VPN
-packets using VPN Azure Cloud Service, the actual payloads will stored and
-forwarded via the volatile memory of the servers for very short period. Such a
-behavior is naturally needed to provide the "VPN relay service" . No payloads
-will be recorded on "fixed" storages such as hard-drives. However, the
-"Wiretapping for Criminals Procedures Act" (The 137th legislation ruled on
-August 18, 1999 in Japan) requires telecommunication companies to allow the
-Japanese government authority to conduct a wire-tapping on the line. VPN Azure
-Servers which are physically placed on Japan are subjects of this law.
-
-3.4. Comply to Japanese Telecommunication Laws
-SoftEther Corporation complies with Japanese Telecommunication Laws as
-necessary to provide online services via Internet.
-
-3.5. Free and Academic Experiment Services
-SoftEther provides Dynamic DNS, NAT Traversal and VPN Azure as academic
-experiment services. Therefore, there services can be used for free of charge.
-These services are not parts of "SoftEther VPN Software Products" . These
-services are provided without any warranty. The services may be suspended or
-discontinued by technical or operational matters. In such occasions, users
-will not be able to use the services. A user have to understand such risks,
-and to acknowledge that such risks are borne by a user-self. SoftEther will
-never be liable to results or damages of use or unable-to-use of the service.
-Even if the user has already paid the license-fee of the commercial version of
-SoftEther VPN, such paid fees don't include any fees of these services.
-Therefore, if the online services will stop or be discontinued, no refunds or
-recoveries of damages will be provided by SoftEther Corporation.
-
-3.6. DNS Proxy Cloud Servers
-In some regions, when a user uses Internet, a DNS query sometimes broken or
-lost when it is passing through the ISP line. If SoftEther VPN Server, Client
-or Bridge detects a possibility that the accessing to the actual VPN server
-might be unstable, then DNS queries will be also transferred to the DNS proxy
-cloud servers which are operated by SoftEther Corporation. A DNS proxy cloud
-server will respond DNS queries with answering correct a IP address.
-
-
-4. General Cautions
-4.1. Needs an Approval from Network Administrator
-SoftEther VPN has powerful functions which don't require special settings by
-network administrators. For example, you need not to ask the administrator to
-configure the existing firewall in order to "open" a TCP/UDP port. Such
-characteristic features are for the purpose to eliminate working times and
-costs of network administrators, and avoid misconfiguration-risks around the
-tasks to open specific exception ports on the firewall. However, any employees
-belong to the company have to obtain an approval from the network
-administrator before installs SoftEther VPN. If your network administrator
-neglects to provide such an approval, you can consider to take an approval
-from an upper authority. (For example, executive officer of the company.) If
-you use SoftEther VPN without any approvals from the authority of your
-company, you might have disadvantage. SoftEther Corporation will be never
-liable for results or damages of using SoftEther VPN.
-
-4.2. Observe Laws of Your Country
-If your country's law prohibits the use of encryption, you have to disable the
-encryption function of SoftEther VPN by yourself. Similarly, in some countries
-or regions, some functions of SoftEther VPN might be prohibited to use by
-laws. Other countries' laws are none of SoftEther Corporation's concern
-because SoftEther Corporation is an enterprise which is located and registered
-in Japan physically. For example, there might be a risk that a part of
-SoftEther VPN conflicts an existing patent which is valid only on the specific
-region. SoftEther Corporation has no interests in such specific region outside
-Japan's territory. Therefore, if you want to use SoftEther VPN in regions
-outside Japan, you have to be careful not to violate third-person's rights.
-You have to verify the legitimacy of the use of SoftEther VPN in the specific
-region before you actually use it in such region. By nature, there are almost
-200 countries in the World, and each country's law is different each other. It
-is practically impossible to verify every countries' laws and regulations and
-make the software comply with all countries' laws in advance to release the
-software. Therefore SoftEther Corporation has verified the legitimacy of
-SoftEther VPN against the laws and regulations of only Japan. If a user uses
-SoftEther VPN in a specific country, and damaged by public servants of the
-government authority, SoftEther Corporation will never be liable to recover or
-compensate such damages or criminal responsibilities.
-
-
-5. VPN Gate Academic Experiment Project
-(This chapter applies only on SoftEther VPN software package which contains
-the extension plug-in for VPN Gate Academic Experiment Project.)
-5.1. About VPN Gate Academic Experiment Project
-VPN Gate Academic Experiment Project is an online service operated for just
-the academic research purpose at the graduate school of University of Tsukuba,
-Japan. The purpose of this research is to expend our knowledge about the
-"Global Distributed Public VPN Relay Server" (GDPVRS) technology. For details,
-please visit http://www.vpngate.net/.
-
-5.2. About VPN Gate Service
-SoftEther VPN Server and SoftEther VPN Client may contain "VPN Gate Service"
-program. However, VPN Gate Service is disabled by default.
-VPN Gate Service should be activated and enabled by the voluntary intention of
-the owner of the computer which SoftEther VPN Server or SoftEther VPN Client
-is installed on. After you activate VPN Gate Service, the computer will be
-start to serve as a part of the Global Distributed Public VPN Relay Servers.
-The IP address, hostname and related information of the computer will be sent
-and registered to the directory server of VPN Gate Academic Experiment
-Project, and they will be published and disclosed to the public. This
-mechanism will allow any VPN Gate Client software's user to connect to the VPN
-Gate Service running on your computer. While the VPN session between a VPN
-Gate Client and your VPN Gate Service is established, the VPN Gate Client's
-user can send/receive any IP packets towards the Internet via the VPN Gate
-Service. The global IP address of the VPN Gate Service's hosing computer will
-be used as the source IP address of such communications which a VPN Gate
-Client initiates.
-VPN Gate Service will send some information to the VPN Gate Academic
-Experiment Service Directory Server. The information includes the operator's
-information which described in section 5.5, logging settings, uptime,
-operating system version, type of protocol, port numbers, quality information,
-statistical information, VPN Gate clients' log history data (includes dates,
-IP addresses, version numbers and IDs) and the version of the software. These
-information will be exposed on the directory. VPN Gate Service also receives a
-key for encoding which is described on the chapter 5.9 from the directory
-server.
-
-5.3. Details of VPN Gate Service's Behavior
-If you enable VPN Gate Service manually, which is disabled by default, the
-"VPNGATE" Virtual Hub will be created on the SoftEther VPN Server. If you are
-using SoftEther VPN Client and attempt to active VPN Gate Service on it, an
-equivalent program to SoftEther VPN Server will be invoked on the same process
-of SoftEther VPN Client, and the "VPNGATE" Virtual Hub will be created. The
-"VPNGATE" Virtual Hub contains a user named "VPN" by default which permits
-anyone on the Internet to make a VPN connection to the Virtual Hub. Once a VPN
-Client connects to the "VPNGATE" Virtual Hub, any communication between the
-user and the Internet will pass through the Virtual Hub, and
-transmitted/received using the physical network interface on the computer
-which SoftEther VPN Server (or SoftEther VPN Client) is running on. This will
-cause the result that a destination host specified by the VPN Client will
-identify that the source of the communication has initiated from the VPN Gate
-Service's hosting computer's IP address. However, for safety, any packets
-which destinations are within 192.168.0.0/255.255.0.0, 172.16.0.0/255.240.0.0
-or 10.0.0.0/255.0.0.0 will be blocked by the "VPNGATE" Virtual Hub in order to
-protect your local network. Therefore, if you run VPN Gate Service on your
-corporate network or private network, it is safe because anonymous VPN Client
-users will not be permitted to access such private networks. VPN Gate Service
-also serves as relay for accessing to the VPN Gate Directory Server.
-In order to make VPN Gate Service familiar with firewalls and NATs, it opens
-an UDP port by using the NAT Traversal function which is described on the
-section 1.2. It also opens and listens on some TCP ports, and some TCP and UDP
-ports will be specified as the target port of Universal Plug and Play (UPnP)
-Port Transfer entries which are requested to your local routers. UPnP request
-packets will be sent periodically. Some routers keep such an opened TCP/UDP
-port permanently on the device. If you wish to close them, do it manually.
-VPN Gate Service also provides the mirror-site function for www.vpngate.net.
-This is a mechanism that a copy of the latest contents from www.vpngate.net
-will be hosted by the mirror-site tiny HTTP server which is running on the VPN
-Gate Service program. It will register itself on the mirror-sites list in
-www.vpngate.net. However, it never relays any other communications which are
-not towards www.vpngate.net.
-
-5.4. Communication between Internet via VPN Gate Service
-VPN Gate Service provides a routing between users and the Internet, by using
-the Virtual NAT Function which is described on the section 2.8. VPN Gate
-Service sends polling Ping packets to the server which is located on
-University of Tsukuba, and the Google Public DNS Server which is identified as
-8.8.8.8, in order to check the latest quality of your Internet line. VPN Gate
-Service also sends and receives a lot of random packets to/from the Speed Test
-Server on University of Tsukuba. These quality data will be reported to VPN
-Gate Directory Server, automatically and periodically. The result will be
-saved and disclosed to the public. These periodical polling communication are
-adjusted not to occupy the Internet line, however in some circumstances they
-might occupy the line.
-
-5.5. Operator's Information of VPN Gate Service
-If you activate VPN Gate Service on your computer, the computer will be a part
-of the Global Distributed Public VPN Relay Servers. Therefore, the Operator's
-administrative information of your VPN Gate Service should be reported and
-registered on the VPN Gate Service Directory. Operator's information contains
-the name of the operator and the abuse-reporting contact e-mail address. These
-information can be inputted on the screen if the VPN Gate configuration.
-Inputted information will be transmitted to the VPN Gate Directory Server,
-stored and disclosed to the public. So you have to be careful to input
-information. By the way, until you specify something as the operator's
-information, the computer's hostname will be used automatically as the field
-of the name of the operator, by appending the "'s owner" string after the
-hostname.
-
-5.6. Observe Laws to Operate VPN Gate Service
-In some countries or regions, a user who is planning to activate and operate
-VPN Gate Service, he are mandated to obtain a license or register a service
-from/to the government. If your region has such a regulation, you must fulfill
-mandated process before activating VPN Gate Service in advance. Neither the
-developers nor operators of the VPN Gate Academic Experiment Project will be
-liable for legal/criminal responsibilities or damages which are occurred from
-failure to comply your local laws.
-
-5.7. Protect Privacy of Communication
-Most of countries have a law which requires communication service's operators,
-including VPN Gate Service operators, to protect the privacy of communication
-of third-persons. When you operate VPN Gate Service, you must always protect
-user's privacy.
-
-5.8. Packet Logs
-The packet logging function is implemented on VPN Gate Service. It records
-essential headers of major TCP/IP packets which are transmitted via the
-Virtual Hub. This function will be helpful to investigate the "original IP
-address" of the initiator of communication who was a connected user of your
-VPN Gate Service, by checking the packet logs and the connection logs. The
-packet logs are recorded only for such legitimate investigates purpose. Do not
-peek nor leak packet logs except the rightful purpose. Such act will be
-violate the section 5.7.
-
-5.9. Packet Logs Automatic Archiving and Encoding Function
-The VPN Gate Academic Experiment Service is operated and running under the
-Japanese constitution and laws. The Japanese constitution laws demand strictly
-protection over the privacy of communication. Because this service is under
-Japanese rules, the program of VPN Gate Service implements this "Automatic Log
-File Encoding" protection mechanism, and enabled by default.
-The VPN Gate Service is currently configured to encode packet log files which
-has passed two or more weeks automatically, by default. In order to protect
-privacy of communication, if a packet log file is once encoded, even the
-administrator of the local computer cannot censor the packet log file. This
-mechanism protects privacy of end-users of VPN Gate Service.
-You can change the VPN Gate Service setting to disable this automatic encoding
-function. Then packet log files will never be encoded even after two weeks
-passed. In such a configuration, all packet logs will remain as plain-text on
-the disk. Therefore you have to take care not to violate user's privacy.
-If you are liable to decode an encoded packet log files (for example: a VPN
-Gate Service's user illegally abused your VPN Gate Service and you have to
-decode the packet logs in order to comply the laws), contact the administrator
-of the VPN Gate Academic Experiment Service at Graduate School of University
-of Tsukuba, Japan. You can find the contact address at
-http://www.vpngate.net/. The administrator of VPN Gate Service will respond to
-decode the packet logs if there is an appropriate and legal request from court
-or other judicial authorities, according to laws.
-
-5.10. Caution if You Operate VPN Gate Service in the Japan's Territories
-When a user operates VPN Gate Service in the Japan's territories, such an act
-may be regulated under the Japanese Telecommunication Laws if the operation is
-a subject to the law. However, in such a circumstance, according to the
-"Japanese Telecommunication Business Compete Manual [supplemental version]" ,
-non- profitable operations of communications are not identified as a
-"telecommunication business" . So usual operators of VPN Gate Service are not
-subjects to "telecommunication business operators" , and not be mandated to
-register to the government. Even so, legalities to protect the privacy of
-communication still imposed. As a conclusion, if you operate VPN Gate Service
-in the Japan's Territories, you must not leak the secrets of communications
-which are transmitted via your operating VPN Gate Service.
-
-5.11. VPN Gate Client
-If SoftEther VPN Client contains the VPN Gate Client plug-in, you can use it
-to obtain the list of current operating VPN Gate Service servers in the
-Internet, and make a VPN connection to a specific server on the list.
-VPN Gate Client always keeps the latest list of the VPN Gate Services
-periodically. Be careful if you are using a pay-per-use Internet line.
-When you start the VPN Gate Client software, the screen which asks you
-activate or not VPN Gate Service will be appeared. For details of VPN Gate
-Service, read the above sections.
-
-5.12. Caution before Joining or Exploiting VPN Gate Academic Experiment
-Project
-The VPN Gate Academic Experiment Service is operated as a research project at
-the graduate school on University of Tsukuba, Japan. The service is governed
-under the Japanese laws. Other countries' laws are none of our concerns nor
-responsibilities.
-By nature, there are almost 200 countries in the World, with different laws.
-It is impossible to verify every countries' laws and regulations and make the
-software comply with all countries' laws in advance to release the software.
-If a user uses VPN Gate service in a specific country, and damaged by public
-servants of the authority, the developer of either the service or software
-will never be liable to recover or compensate such damages or criminal
-responsibilities.
-By using this software and service, the user must observe all concerned laws
-and rules with user's own responsibility. The user will be completely liable
-to any damages and responsibilities which are results of using this software
-and service, regardless of either inside or outside of Japan's territory.
-If you don't agree nor understand the above warnings, do not use any of VPN
-Gate Academic Experiment Service functions.
-VPN Gate is a research project for just academic purpose only. VPN Gate was
-developed as a plug-in for SoftEther VPN and UT-VPN. However, all parts of VPN
-Gate were developed on this research project at University of Tsukuba. Any
-parts of VPN Gate are not developed by SoftEther Corporation. The VPN Gate
-Research Project is not a subject to be led, operated, promoted nor guaranteed
-by SoftEther Corporation.
 
+READ AND UNDERSTAND THE 'WARNING.TXT' FILE BEFORE USING THIS SOFTWARE.
+SOME SOFTWARE PROGRAMS FROM THIRD PARTIES ARE INCLUDED ON THIS SOFTWARE WITH
+LICENSE CONDITIONS WHICH ARE DESCRIBED ON THE 'THIRD_PARTY.TXT' FILE.
 

+ 9 - 2028
LICENSE.TXT

@@ -56,13 +56,17 @@ COMMUNICATIONS. USING THIS SOFTWARE IN OTHER COUNTRIES MIGHT BE RESTRICTED.
 THE FOLLOWING GPLV2 CONDITIONS APPLY ON ALL SOFTETHER VPN PROGRAMS WHICH ARE
 DEVELOPED BY SOFTETHER VPN PROJECT.
 
+READ AND UNDERSTAND THE 'WARNING.TXT' FILE BEFORE USING THIS SOFTWARE.
+SOME SOFTWARE PROGRAMS FROM THIRD PARTIES ARE INCLUDED ON THIS SOFTWARE WITH
+LICENSE CONDITIONS WHICH ARE DESCRIBED ON THE 'THIRD_PARTY.TXT' FILE.
+
                     GNU GENERAL PUBLIC LICENSE
                        Version 2, June 1991
 
  Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
+ Everyone is permitted to copy and distribute verbatim copies of this license
+document, but changing it is not allowed.
 
                             Preamble
 
@@ -320,2031 +324,8 @@ DAMAGES.
 
                      END OF TERMS AND CONDITIONS
 
-Note that the above copyright notices and use conditions do not apply on the
-software components listed in below which are included in this Software. When
-you use or distribute Software with including these libraries, you have to
-follow the conditions of these libraries.
-
-These library's copyright notices and conditions are following;
-
--------------------
-
-BitVisor(R) VPN Client Module (IPsec Driver):
-Copyright (c) 2007, 2008 University of Tsukuba.
-Copyright (C) 2007, 2008 National Institute of Information and Communications
-Technology.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. Neither the name of the University of Tsukuba nor the names of its
-contributors may be used to endorse or promote products derived from this
-software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------
-
-Microsoft(R) C Runtime Library:
-(c) 2007 Microsoft Corporation. All Rights Reserved.
-
--------------------
-
-RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki):
-
-License to copy and use this software is granted provided that it is
-identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface
-(Cryptoki)" in all material mentioning or referencing this software.
-
-License is also granted to make and use derivative works provided that such
-works are identified as "derived from the RSA Security Inc. PKCS #11
-Cryptographic Token Interface (Cryptoki)" in all material mentioning or
-referencing the derived work.
-
-RSA Security Inc. makes no representations concerning either the
-merchantability of this software or the suitability of this software for any
-particular purpose. It is provided "as is" without express or implied warranty
-of any kind.
-
--------------------
-
-WinPcap:
-Copyright (c) 2001 - 2003 NetGroup, Politecnico di Torino (Italy)
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. Neither the name of the Politecnico di Torino nor the names of its
-contributors may be used to endorse or promote products derived from this
-software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------
-
-libedit:
-Copyright (c) 1992, 1993 The Regents of the University of California.  All
-rights reserved.
-
-This code is derived from software contributed to Berkeley by Christos Zoulas
-of Cornell University.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. Neither the name of the University nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------
-
-libiconv:
-
-          GNU LIBRARY GENERAL PUBLIC LICENSE
-               Version 2, June 1991
-
- Copyright (C) 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- Everyone is permitted to copy and distribute verbatim copies of this license
-document, but changing it is not allowed.
-
-[This is the first released version of the library GPL. It is
- numbered 2 because it goes with version 2 of the ordinary GPL.]
-
-                Preamble
-
-  The licenses for most software are designed to take away your freedom to
-share and change it. By contrast, the GNU General Public Licenses are intended
-to guarantee your freedom to share and change free software--to make sure the
-software is free for all its users.
-
-  This license, the Library General Public License, applies to some specially
-designated Free Software Foundation software, and to any other libraries whose
-authors decide to use it. You can use it for your libraries, too.
-
-  When we speak of free software, we are referring to freedom, not price. Our
-General Public Licenses are designed to make sure that you have the freedom to
-distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new free
-programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid anyone to
-deny you these rights or to ask you to surrender the rights. These
-restrictions translate to certain responsibilities for you if you distribute
-copies of the library, or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis or for
-a fee, you must give the recipients all the rights that we gave you. You must
-make sure that they, too, receive or can get the source
-code. If you link a program with the library, you must provide complete object
-files to the recipients so that they can relink them with the library, after
-making changes to the library and recompiling it. And you must show them these
-terms so they know their rights.
-
-  Our method of protecting your rights has two steps: (1) copyright the
-library, and (2) offer you this license which gives you legal permission to
-copy, distribute and/or modify the library.
-
-  Also, for each distributor's protection, we want to make certain that
-everyone understands that there is no warranty for this free library. If the
-library is modified by someone else and passed on, we want its recipients to
-know that what they have is not the original version, so that any problems
-introduced by others will not reflect on the original authors' reputations.
-
-  Finally, any free program is threatened constantly by software patents. We
-wish to avoid the danger that companies distributing free software will
-individually obtain patent licenses, thus in effect transforming the program
-into proprietary software. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  Most GNU software, including some libraries, is covered by the ordinary GNU
-General Public License, which was designed for utility programs. This license,
-the GNU Library General Public License, applies to certain designated
-libraries. This license is quite different from the ordinary one; be sure to
-read it in full, and don't assume that anything in it is the same as in the
-ordinary license.
-
-  The reason we have a separate public license for some libraries is that they
-blur the distinction we usually make between modifying or adding to a program
-and simply using it. Linking a program with a library, without changing the
-library, is in some sense simply using the library, and is analogous to
-running a utility program or application program. However, in a textual and
-legal sense, the linked executable is a combined work, a derivative of the
-original library, and the ordinary General Public License treats it as such.
-
-  Because of this blurred distinction, using the ordinary General Public
-License for libraries did not effectively promote software sharing, because
-most developers did not use the libraries. We concluded that weaker conditions
-might promote sharing better.
-
-  However, unrestricted linking of non-free programs would deprive the users
-of those programs of all benefit from the free status of the libraries
-themselves. This Library General Public License is intended to
-permit developers of non-free programs to use free libraries, while preserving
-your freedom as a user of such programs to change the free libraries that are
-incorporated in them. (We have not seen how to achieve this as regards changes
-in header files, but we have achieved it as regards changes in the actual
-functions of the Library.) The hope is that this will lead to faster
-development of free libraries.
-
-  The precise terms and conditions for copying, distribution and modification
-follow. Pay close attention to the difference between a "work based on the
-library" and a "work that uses the library". The former contains code derived
-from the library, while the latter only works together with the library.
-
-  Note that it is possible for a library to be covered by the ordinary General
-Public License rather than by this special one.
-
-          GNU LIBRARY GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library which contains a
-notice placed by the copyright holder or other authorized party saying it may
-be distributed under the terms of this Library
-General Public License (also called "this License"). Each licensee is
-addressed as "you".
-
-  A "library" means a collection of software functions and/or data prepared so
-as to be conveniently linked with application programs (which use some of
-those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work which has
-been distributed under these terms. A "work based on the Library" means either
-the Library or any derivative work under copyright law: that is to say, a work
-containing the Library or a portion of it, either verbatim or with
-modifications and/or translated straightforwardly into another language.
-(Hereinafter, translation is included without limitation in the term
-"modification".)
-
-  "Source code" for a work means the preferred form of the work for making
-modifications to it. For a library, complete source code means all the source
-code for all modules it contains, plus any associated interface definition
-files, plus the scripts used to control compilation and installation of the
-library.
-
-  Activities other than copying, distribution and modification are not covered
-by this License; they are outside its scope. The act of running a program
-using the Library is not restricted, and output from such a program is covered
-only if its contents constitute a work based on the Library (independent of
-the use of the Library in a tool for writing it). Whether that is true depends
-on what the Library does and what the program that uses the Library does.
-
-  1. You may copy and distribute verbatim copies of the Library's complete
-source code as you receive it, in any medium, provided that you conspicuously
-and appropriately publish on each copy an appropriate copyright notice and
-disclaimer of warranty; keep intact all the notices that refer to this License
-and to the absence of any warranty; and distribute a copy of this License
-along with the Library.
-
-  You may charge a fee for the physical act of transferring a copy, and you
-may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Library or any portion of it,
-thus forming a work based on the Library, and copy and distribute such
-modifications or work under the terms of Section 1 above, provided that you
-also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices stating
-that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no charge to all
-third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a table
-of data to be supplied by an application program that uses the facility, other
-than as an argument passed when the facility is invoked, then you must make a
-good faith effort to ensure that, in the event an application does not supply
-such function or table, the facility still operates, and performs whatever
-part of its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has a
-purpose that is entirely well-defined independent of the application.
-Therefore, Subsection 2d requires that any application-supplied function or
-table used by this function must be optional: if the application does not
-supply it, the square root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If identifiable
-sections of that work are not derived from the Library, and can be reasonably
-considered independent and separate works in themselves, then this License,
-and its terms, do not apply to those sections when you distribute them as
-separate works. But when you distribute the same sections as part of a whole
-which is a work based on the Library, the distribution of the whole must be on
-the terms of this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest your
-rights to work written entirely by you; rather, the intent is to exercise the
-right to control the distribution of derivative or collective works based on
-the Library.
-
-In addition, mere aggregation of another work not based on the Library with
-the Library (or with a work based on the Library) on a volume of a storage or
-distribution medium does not bring the other work under the scope of this
-License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do this,
-you must alter all the notices that refer to this License, so that they refer
-to the ordinary GNU General Public License, version 2, instead of to this
-License. (If a newer version than version 2 of the ordinary GNU General Public
-License has appeared, then you can specify that version instead if you wish.)
-Do not make any other change in these notices.
-
-  Once this change is made in a given copy, it is irreversible for that copy,
-so the ordinary GNU General Public License applies to all subsequent copies
-and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of the Library
-into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or derivative of
-it, under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you accompany it with the complete
-corresponding machine-readable source code, which must be distributed under
-the terms of Sections 1 and 2 above on a medium customarily used for software
-interchange.
-
-  If distribution of object code is made by offering access to copy from a
-designated place, then offering equivalent access to copy the source code from
-the same place satisfies the requirement to distribute the source code, even
-though third parties are not compelled to copy the source along with the
-object code.
-
-  5. A program that contains no derivative of any portion of the Library, but
-is designed to work with the Library by being compiled or linked with it, is
-called a "work that uses the Library". Such a work, in isolation, is not a
-derivative work of the Library, and therefore falls outside the scope of this
-License.
-
-  However, linking a "work that uses the Library" with the Library creates an
-executable that is a derivative of the Library (because it contains portions
-of the Library), rather than a "work that uses the library". The executable is
-therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file that is
-part of the Library, the object code for the work may be a derivative work of
-the Library even though the source code is not.
-Whether this is true is especially significant if the work can be linked
-without the Library, or if the work is itself a library. The threshold for
-this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data structure
-layouts and accessors, and small macros and small inline functions (ten lines
-or less in length), then the use of the object file is unrestricted,
-regardless of whether it is legally a derivative work. (Executables containing
-this object code plus portions of the Library will still fall under Section
-6.)
-
-  Otherwise, if the work is a derivative of the Library, you may distribute
-the object code for the work under the terms of Section 6. Any executables
-containing that work also fall under Section 6, whether or not they are linked
-directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also compile or link a
-"work that uses the Library" with the Library to produce a work containing
-portions of the Library, and distribute that work under terms of your choice,
-provided that the terms permit modification of the work for the customer's own
-use and reverse engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the Library
-is used in it and that the Library and its use are covered by this License.
-You must supply a copy of this License. If the work during execution displays
-copyright notices, you must include the copyright notice for the Library among
-them, as well as a reference directing the user to the copy of this License.
-Also, you must do one of these things:
-
-    a) Accompany the work with the complete corresponding machine-readable
-source code for the Library including whatever changes were used in the work
-(which must be distributed under Sections 1 and 2 above) ; and, if the work is
-an executable linked with the Library, with the complete machine-readable
-"work that uses the Library", as object code and/or source code, so that the
-user can modify the Library and then relink to produce a modified executable
-containing the modified Library. (It is understood that the user who changes
-the contents of definitions files in the Library will not necessarily be able
-to recompile the application to use the modified definitions.)
-
-    b) Accompany the work with a written offer, valid for at least three
-years, to give the same user the materials specified in Subsection 6a, above,
-for a charge no more than the cost of performing this distribution.
-
-    c) If distribution of the work is made by offering access to copy from a
-designated place, offer equivalent access to copy the above specified
-materials from the same place.
-
-    d) Verify that the user has already received a copy of these materials or
-that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the Library"
-must include any data and utility programs needed for reproducing the
-executable from it. However, as a special exception, the source code
-distributed need not include anything that is normally distributed (in either
-source or binary form) with the major components (compiler, kernel, and so on)
-of the operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-  It may happen that this requirement contradicts the license restrictions of
-other proprietary libraries that do not normally accompany the operating
-system. Such a contradiction means you cannot use both them and the Library
-together in an executable that you distribute.
-
-  7. You may place library facilities that are a work based on the Library
-side-by-side in a single library together with other library facilities not
-covered by this License, and distribute such a combined library, provided that
-the separate distribution of the work based on the Library and of the other
-library facilities is otherwise permitted, and provided that you do these two
-things:
-
-    a) Accompany the combined library with a copy of the same work based on
-the Library, uncombined with any other library facilities. This must be
-distributed under the terms of the Sections above.
-
-    b) Give prominent notice with the combined library of the fact that part
-of it is a work based on the Library, and explaining where to find the
-accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute the
-Library except as expressly provided under this License. Any attempt otherwise
-to copy, modify, sublicense, link with, or distribute the Library is void, and
-will automatically terminate your rights under this License. However, parties
-who have received copies, or rights, from you under this License will not have
-their licenses terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not signed
-it. However, nothing else grants you permission to modify or distribute the
-Library or its derivative works. These actions are prohibited by law if you do
-not accept this License. Therefore, by modifying or distributing the Library
-(or any work based on the Library), you indicate your acceptance of this
-License to do so, and all its terms and conditions for copying, distributing
-or modifying the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the original
-licensor to copy, distribute, link with or modify the Library subject to these
-terms and conditions. You may not impose any further restrictions on the
-recipients' exercise of the rights granted herein. You are not responsible for
-enforcing compliance by third parties to this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or otherwise)
-that contradict the conditions of this License, they do not excuse you from
-the conditions of this License. If you cannot distribute so as to satisfy
-simultaneously your obligations under this License and any other pertinent
-obligations, then as a consequence you may not distribute the Library at all.
-For example, if a patent license would not permit royalty-free redistribution
-of the Library by all those who receive copies directly or indirectly through
-you, then the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply, and
-the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any patents or
-other property right claims or to contest validity of any such claims; this
-section has the sole purpose of protecting the integrity of the free software
-distribution system which is implemented by public license practices. Many
-people have made generous contributions to the wide range of software
-distributed through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing to
-distribute software through any other system and a licensee cannot impose that
-choice.
-
-This section is intended to make thoroughly clear what is believed to be a
-consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in certain
-countries either by patents or by copyrighted interfaces, the original
-copyright holder who places the Library under this License may add an explicit
-geographical distribution limitation excluding those countries, so that
-distribution is permitted only in or among countries not thus excluded. In
-such case, this License incorporates the limitation as if written in the body
-of this License.
-
-  13. The Free Software Foundation may publish revised and/or new versions of
-the Library General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and "any later
-version", you have the option of following the terms and conditions either of
-that version or of any later version published by the Free Software
-Foundation. If the Library does not specify a license version number, you may
-choose any version ever published by the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free programs
-whose distribution conditions are incompatible with these, write to the author
-to ask for permission. For software which is copyrighted by the Free Software
-Foundation, write to the Free Software Foundation; we sometimes make
-exceptions for this. Our decision will be guided by the two goals of
-preserving the free status of all derivatives of our free software and of
-promoting the sharing and reuse of software generally.
-
-                NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
-THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
-STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
-LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
-PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE,
-YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO
-LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR
-THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-             END OF TERMS AND CONDITIONS
-
--------------------
-
-ncurses:
-Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, distribute with
-modifications, sublicense, and/or sell copies of the Software, and to permit
-persons to whom the Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name(s) of the above copyright holders
-shall not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization.
-
--------------------
-
-OpenSSL:
-OpenSSL License
-Copyright (c) 1998-2011 The OpenSSL Project.  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer. 
-
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-
-3. All advertising materials mentioning features or use of this software must
-display the following acknowledgment: "This product includes software
-developed by the OpenSSL Project for use in the OpenSSL Toolkit.
-(http://www.openssl.org/)"
-
-4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
-endorse or promote products derived from this software without prior written
-permission. For written permission, please contact [email protected].
-
-5. Products derived from this software may not be called "OpenSSL" nor may
-"OpenSSL" appear in their names without prior written permission of the
-OpenSSL Project.
-
-6. Redistributions of any form whatsoever must retain the following
-acknowledgment: "This product includes software developed by the OpenSSL
-Project for use in the OpenSSL Toolkit (http://www.openssl.org/)"
-
-THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY EXPRESSED
-OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
-EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-This product includes cryptographic software written by Eric Young
-([email protected]).  This product includes software written by Tim Hudson
-([email protected]).
-
-Original SSLeay License
-Copyright (C) 1995-1998 Eric Young ([email protected]) All rights reserved.
-
-This package is an SSL implementation written by Eric Young
-([email protected]). The implementation was written so as to conform with
-Netscapes SSL.
-
-This library is free for commercial and non-commercial use as long as the
-following conditions are aheared to.  The following conditions apply to all
-code found in this distribution, be it the RC4, RSA, lhash, DES, etc., code;
-not just the SSL code.  The SSL documentation included with this distribution
-is covered by the same copyright terms except that the holder is Tim Hudson
-([email protected]).
-
-Copyright remains Eric Young's, and as such any Copyright notices in the code
-are not to be removed. If this package is used in a product, Eric Young should
-be given attribution as the author of the parts of the library used. This can
-be in the form of a textual message at program startup or in documentation
-(online or textual) provided with the package.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-1. Redistributions of source code must retain the copyright notice, this list
-of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. All advertising materials mentioning features or use of this software must
-display the following acknowledgement: "This product includes cryptographic
-software written by Eric Young ([email protected])" The word 'cryptographic'
-can be left out if the rouines from the library being used are not
-cryptographic related :-).
-4. If you include any Windows specific code (or a derivative thereof) from the
-apps directory (application code) you must include an acknowledgement: "This
-product includes software written by Tim Hudson ([email protected])"
-
-THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
-EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-The licence and distribution terms for any publically available version or
-derivative of this code cannot be changed.  i.e. this code cannot simply be
-copied and put under another distribution licence [including the GNU Public
-Licence.]
-
--------------------
-
-zlib:
-Acknowledgments:
-  The deflate format used by zlib was defined by Phil Katz. The deflate and
-zlib specifications were written by L. Peter Deutsch. Thanks to all the people
-who reported problems and suggested various improvements in zlib; they are too
-numerous to cite here.
-
-Copyright notice:
- (C) 1995-2004 Jean-loup Gailly and Mark Adler
-
-  This software is provided 'as-is', without any express or implied warranty.
-In no event will the authors be held liable for any damages arising from the
-use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-including commercial applications, and to alter it and redistribute it freely,
-subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-claim that you wrote the original software. If you use this software in a
-product, an acknowledgment in the product documentation would be appreciated
-but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Jean-loup Gailly        Mark Adler
-  [email protected]          [email protected]
-
-If you use the zlib library in a product, we would appreciate *not* receiving
-lengthy legal documents to sign. The sources are provided for free but without
-warranty of any kind.  The library has been entirely written by Jean-loup
-Gailly and Mark Adler; it does not include third-party code.
-
-If you redistribute modified sources, we would appreciate that you include in
-the file ChangeLog history information documenting your changes. Please read
-the FAQ for more information on the distribution of modified source versions.
-
--------------------
-
-Intel AESNI Sample Library:
-
-Copyright (c) 2010, Intel Corporation
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors may
-be used to endorse or promote products derived from this software without
-specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Issue Date: Aug 6, 2010
-
--------------------
-
-NOTES
-
-SoftEther provides source codes of some GPL/LGPL/other libraries listed above
-on its web server. Anyone can download, use and re-distribute them under
-individual licenses which are contained on each archive file, available from
-the following URL:
-http://uploader.softether.co.jp/src/
-
-
-
-BitVisor(R) VPN Client Module (IPsec Driver):
-Copyright (c) 2007, 2008 University of Tsukuba.
-Copyright (C) 2007, 2008 National Institute of Information and Communications
-Technology.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. Neither the name of the University of Tsukuba nor the names of its
-contributors may be used to endorse or promote products derived from this
-software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------
-
-Microsoft(R) C Runtime Library:
-(c) 2007 Microsoft Corporation. All Rights Reserved.
-
--------------------
-
-RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki):
-
-License to copy and use this software is granted provided that it is
-identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface
-(Cryptoki)" in all material mentioning or referencing this software.
-
-License is also granted to make and use derivative works provided that such
-works are identified as "derived from the RSA Security Inc. PKCS #11
-Cryptographic Token Interface (Cryptoki)" in all material mentioning or
-referencing the derived work.
-
-RSA Security Inc. makes no representations concerning either the
-merchantability of this software or the suitability of this software for any
-particular purpose. It is provided "as is" without express or implied warranty
-of any kind.
-
--------------------
-
-WinPcap:
-Copyright (c) 2001 - 2003 NetGroup, Politecnico di Torino (Italy)
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. Neither the name of the Politecnico di Torino nor the names of its
-contributors may be used to endorse or promote products derived from this
-software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------
-
-libedit:
-Copyright (c) 1992, 1993 The Regents of the University of California.  All
-rights reserved.
-
-This code is derived from software contributed to Berkeley by Christos Zoulas
-of Cornell University.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. Neither the name of the University nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------
-
-libiconv:
-
-          GNU LIBRARY GENERAL PUBLIC LICENSE
-               Version 2, June 1991
-
- Copyright (C) 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- Everyone is permitted to copy and distribute verbatim copies of this license
-document, but changing it is not allowed.
-
-[This is the first released version of the library GPL. It is
- numbered 2 because it goes with version 2 of the ordinary GPL.]
-
-                Preamble
-
-  The licenses for most software are designed to take away your freedom to
-share and change it. By contrast, the GNU General Public Licenses are intended
-to guarantee your freedom to share and change free software--to make sure the
-software is free for all its users.
-
-  This license, the Library General Public License, applies to some specially
-designated Free Software Foundation software, and to any other libraries whose
-authors decide to use it. You can use it for your libraries, too.
-
-  When we speak of free software, we are referring to freedom, not price. Our
-General Public Licenses are designed to make sure that you have the freedom to
-distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new free
-programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid anyone to
-deny you these rights or to ask you to surrender the rights. These
-restrictions translate to certain responsibilities for you if you distribute
-copies of the library, or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis or for
-a fee, you must give the recipients all the rights that we gave you. You must
-make sure that they, too, receive or can get the source
-code. If you link a program with the library, you must provide complete object
-files to the recipients so that they can relink them with the library, after
-making changes to the library and recompiling it. And you must show them these
-terms so they know their rights.
-
-  Our method of protecting your rights has two steps: (1) copyright the
-library, and (2) offer you this license which gives you legal permission to
-copy, distribute and/or modify the library.
-
-  Also, for each distributor's protection, we want to make certain that
-everyone understands that there is no warranty for this free library. If the
-library is modified by someone else and passed on, we want its recipients to
-know that what they have is not the original version, so that any problems
-introduced by others will not reflect on the original authors' reputations.
-
-  Finally, any free program is threatened constantly by software patents. We
-wish to avoid the danger that companies distributing free software will
-individually obtain patent licenses, thus in effect transforming the program
-into proprietary software. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  Most GNU software, including some libraries, is covered by the ordinary GNU
-General Public License, which was designed for utility programs. This license,
-the GNU Library General Public License, applies to certain designated
-libraries. This license is quite different from the ordinary one; be sure to
-read it in full, and don't assume that anything in it is the same as in the
-ordinary license.
-
-  The reason we have a separate public license for some libraries is that they
-blur the distinction we usually make between modifying or adding to a program
-and simply using it. Linking a program with a library, without changing the
-library, is in some sense simply using the library, and is analogous to
-running a utility program or application program. However, in a textual and
-legal sense, the linked executable is a combined work, a derivative of the
-original library, and the ordinary General Public License treats it as such.
-
-  Because of this blurred distinction, using the ordinary General Public
-License for libraries did not effectively promote software sharing, because
-most developers did not use the libraries. We concluded that weaker conditions
-might promote sharing better.
-
-  However, unrestricted linking of non-free programs would deprive the users
-of those programs of all benefit from the free status of the libraries
-themselves. This Library General Public License is intended to
-permit developers of non-free programs to use free libraries, while preserving
-your freedom as a user of such programs to change the free libraries that are
-incorporated in them. (We have not seen how to achieve this as regards changes
-in header files, but we have achieved it as regards changes in the actual
-functions of the Library.) The hope is that this will lead to faster
-development of free libraries.
-
-  The precise terms and conditions for copying, distribution and modification
-follow. Pay close attention to the difference between a "work based on the
-library" and a "work that uses the library". The former contains code derived
-from the library, while the latter only works together with the library.
-
-  Note that it is possible for a library to be covered by the ordinary General
-Public License rather than by this special one.
-
-          GNU LIBRARY GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library which contains a
-notice placed by the copyright holder or other authorized party saying it may
-be distributed under the terms of this Library
-General Public License (also called "this License"). Each licensee is
-addressed as "you".
-
-  A "library" means a collection of software functions and/or data prepared so
-as to be conveniently linked with application programs (which use some of
-those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work which has
-been distributed under these terms. A "work based on the Library" means either
-the Library or any derivative work under copyright law: that is to say, a work
-containing the Library or a portion of it, either verbatim or with
-modifications and/or translated straightforwardly into another language.
-(Hereinafter, translation is included without limitation in the term
-"modification".)
-
-  "Source code" for a work means the preferred form of the work for making
-modifications to it. For a library, complete source code means all the source
-code for all modules it contains, plus any associated interface definition
-files, plus the scripts used to control compilation and installation of the
-library.
-
-  Activities other than copying, distribution and modification are not covered
-by this License; they are outside its scope. The act of running a program
-using the Library is not restricted, and output from such a program is covered
-only if its contents constitute a work based on the Library (independent of
-the use of the Library in a tool for writing it). Whether that is true depends
-on what the Library does and what the program that uses the Library does.
-
-  1. You may copy and distribute verbatim copies of the Library's complete
-source code as you receive it, in any medium, provided that you conspicuously
-and appropriately publish on each copy an appropriate copyright notice and
-disclaimer of warranty; keep intact all the notices that refer to this License
-and to the absence of any warranty; and distribute a copy of this License
-along with the Library.
-
-  You may charge a fee for the physical act of transferring a copy, and you
-may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Library or any portion of it,
-thus forming a work based on the Library, and copy and distribute such
-modifications or work under the terms of Section 1 above, provided that you
-also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices stating
-that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no charge to all
-third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a table
-of data to be supplied by an application program that uses the facility, other
-than as an argument passed when the facility is invoked, then you must make a
-good faith effort to ensure that, in the event an application does not supply
-such function or table, the facility still operates, and performs whatever
-part of its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has a
-purpose that is entirely well-defined independent of the application.
-Therefore, Subsection 2d requires that any application-supplied function or
-table used by this function must be optional: if the application does not
-supply it, the square root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If identifiable
-sections of that work are not derived from the Library, and can be reasonably
-considered independent and separate works in themselves, then this License,
-and its terms, do not apply to those sections when you distribute them as
-separate works. But when you distribute the same sections as part of a whole
-which is a work based on the Library, the distribution of the whole must be on
-the terms of this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest your
-rights to work written entirely by you; rather, the intent is to exercise the
-right to control the distribution of derivative or collective works based on
-the Library.
-
-In addition, mere aggregation of another work not based on the Library with
-the Library (or with a work based on the Library) on a volume of a storage or
-distribution medium does not bring the other work under the scope of this
-License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do this,
-you must alter all the notices that refer to this License, so that they refer
-to the ordinary GNU General Public License, version 2, instead of to this
-License. (If a newer version than version 2 of the ordinary GNU General Public
-License has appeared, then you can specify that version instead if you wish.)
-Do not make any other change in these notices.
-
-  Once this change is made in a given copy, it is irreversible for that copy,
-so the ordinary GNU General Public License applies to all subsequent copies
-and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of the Library
-into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or derivative of
-it, under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you accompany it with the complete
-corresponding machine-readable source code, which must be distributed under
-the terms of Sections 1 and 2 above on a medium customarily used for software
-interchange.
-
-  If distribution of object code is made by offering access to copy from a
-designated place, then offering equivalent access to copy the source code from
-the same place satisfies the requirement to distribute the source code, even
-though third parties are not compelled to copy the source along with the
-object code.
-
-  5. A program that contains no derivative of any portion of the Library, but
-is designed to work with the Library by being compiled or linked with it, is
-called a "work that uses the Library". Such a work, in isolation, is not a
-derivative work of the Library, and therefore falls outside the scope of this
-License.
-
-  However, linking a "work that uses the Library" with the Library creates an
-executable that is a derivative of the Library (because it contains portions
-of the Library), rather than a "work that uses the library". The executable is
-therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file that is
-part of the Library, the object code for the work may be a derivative work of
-the Library even though the source code is not.
-Whether this is true is especially significant if the work can be linked
-without the Library, or if the work is itself a library. The threshold for
-this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data structure
-layouts and accessors, and small macros and small inline functions (ten lines
-or less in length), then the use of the object file is unrestricted,
-regardless of whether it is legally a derivative work. (Executables containing
-this object code plus portions of the Library will still fall under Section
-6.)
-
-  Otherwise, if the work is a derivative of the Library, you may distribute
-the object code for the work under the terms of Section 6. Any executables
-containing that work also fall under Section 6, whether or not they are linked
-directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also compile or link a
-"work that uses the Library" with the Library to produce a work containing
-portions of the Library, and distribute that work under terms of your choice,
-provided that the terms permit modification of the work for the customer's own
-use and reverse engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the Library
-is used in it and that the Library and its use are covered by this License.
-You must supply a copy of this License. If the work during execution displays
-copyright notices, you must include the copyright notice for the Library among
-them, as well as a reference directing the user to the copy of this License.
-Also, you must do one of these things:
-
-    a) Accompany the work with the complete corresponding machine-readable
-source code for the Library including whatever changes were used in the work
-(which must be distributed under Sections 1 and 2 above) ; and, if the work is
-an executable linked with the Library, with the complete machine-readable
-"work that uses the Library", as object code and/or source code, so that the
-user can modify the Library and then relink to produce a modified executable
-containing the modified Library. (It is understood that the user who changes
-the contents of definitions files in the Library will not necessarily be able
-to recompile the application to use the modified definitions.)
-
-    b) Accompany the work with a written offer, valid for at least three
-years, to give the same user the materials specified in Subsection 6a, above,
-for a charge no more than the cost of performing this distribution.
-
-    c) If distribution of the work is made by offering access to copy from a
-designated place, offer equivalent access to copy the above specified
-materials from the same place.
-
-    d) Verify that the user has already received a copy of these materials or
-that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the Library"
-must include any data and utility programs needed for reproducing the
-executable from it. However, as a special exception, the source code
-distributed need not include anything that is normally distributed (in either
-source or binary form) with the major components (compiler, kernel, and so on)
-of the operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-  It may happen that this requirement contradicts the license restrictions of
-other proprietary libraries that do not normally accompany the operating
-system. Such a contradiction means you cannot use both them and the Library
-together in an executable that you distribute.
-
-  7. You may place library facilities that are a work based on the Library
-side-by-side in a single library together with other library facilities not
-covered by this License, and distribute such a combined library, provided that
-the separate distribution of the work based on the Library and of the other
-library facilities is otherwise permitted, and provided that you do these two
-things:
-
-    a) Accompany the combined library with a copy of the same work based on
-the Library, uncombined with any other library facilities. This must be
-distributed under the terms of the Sections above.
-
-    b) Give prominent notice with the combined library of the fact that part
-of it is a work based on the Library, and explaining where to find the
-accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute the
-Library except as expressly provided under this License. Any attempt otherwise
-to copy, modify, sublicense, link with, or distribute the Library is void, and
-will automatically terminate your rights under this License. However, parties
-who have received copies, or rights, from you under this License will not have
-their licenses terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not signed
-it. However, nothing else grants you permission to modify or distribute the
-Library or its derivative works. These actions are prohibited by law if you do
-not accept this License. Therefore, by modifying or distributing the Library
-(or any work based on the Library), you indicate your acceptance of this
-License to do so, and all its terms and conditions for copying, distributing
-or modifying the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the original
-licensor to copy, distribute, link with or modify the Library subject to these
-terms and conditions. You may not impose any further restrictions on the
-recipients' exercise of the rights granted herein. You are not responsible for
-enforcing compliance by third parties to this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or otherwise)
-that contradict the conditions of this License, they do not excuse you from
-the conditions of this License. If you cannot distribute so as to satisfy
-simultaneously your obligations under this License and any other pertinent
-obligations, then as a consequence you may not distribute the Library at all.
-For example, if a patent license would not permit royalty-free redistribution
-of the Library by all those who receive copies directly or indirectly through
-you, then the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply, and
-the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any patents or
-other property right claims or to contest validity of any such claims; this
-section has the sole purpose of protecting the integrity of the free software
-distribution system which is implemented by public license practices. Many
-people have made generous contributions to the wide range of software
-distributed through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing to
-distribute software through any other system and a licensee cannot impose that
-choice.
-
-This section is intended to make thoroughly clear what is believed to be a
-consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in certain
-countries either by patents or by copyrighted interfaces, the original
-copyright holder who places the Library under this License may add an explicit
-geographical distribution limitation excluding those countries, so that
-distribution is permitted only in or among countries not thus excluded. In
-such case, this License incorporates the limitation as if written in the body
-of this License.
-
-  13. The Free Software Foundation may publish revised and/or new versions of
-the Library General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and "any later
-version", you have the option of following the terms and conditions either of
-that version or of any later version published by the Free Software
-Foundation. If the Library does not specify a license version number, you may
-choose any version ever published by the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free programs
-whose distribution conditions are incompatible with these, write to the author
-to ask for permission. For software which is copyrighted by the Free Software
-Foundation, write to the Free Software Foundation; we sometimes make
-exceptions for this. Our decision will be guided by the two goals of
-preserving the free status of all derivatives of our free software and of
-promoting the sharing and reuse of software generally.
-
-                NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
-THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
-STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
-LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
-PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE,
-YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO
-LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR
-THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-             END OF TERMS AND CONDITIONS
-
--------------------
-
-ncurses:
-Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, distribute with
-modifications, sublicense, and/or sell copies of the Software, and to permit
-persons to whom the Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name(s) of the above copyright holders
-shall not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization.
-
--------------------
-
-OpenSSL:
-OpenSSL License
-Copyright (c) 1998-2011 The OpenSSL Project.  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer. 
-
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-
-3. All advertising materials mentioning features or use of this software must
-display the following acknowledgment: "This product includes software
-developed by the OpenSSL Project for use in the OpenSSL Toolkit.
-(http://www.openssl.org/)"
-
-4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
-endorse or promote products derived from this software without prior written
-permission. For written permission, please contact [email protected].
-
-5. Products derived from this software may not be called "OpenSSL" nor may
-"OpenSSL" appear in their names without prior written permission of the
-OpenSSL Project.
-
-6. Redistributions of any form whatsoever must retain the following
-acknowledgment: "This product includes software developed by the OpenSSL
-Project for use in the OpenSSL Toolkit (http://www.openssl.org/)"
-
-THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY EXPRESSED
-OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
-EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-This product includes cryptographic software written by Eric Young
-([email protected]).  This product includes software written by Tim Hudson
-([email protected]).
-
-Original SSLeay License
-Copyright (C) 1995-1998 Eric Young ([email protected]) All rights reserved.
-
-This package is an SSL implementation written by Eric Young
-([email protected]). The implementation was written so as to conform with
-Netscapes SSL.
-
-This library is free for commercial and non-commercial use as long as the
-following conditions are aheared to.  The following conditions apply to all
-code found in this distribution, be it the RC4, RSA, lhash, DES, etc., code;
-not just the SSL code.  The SSL documentation included with this distribution
-is covered by the same copyright terms except that the holder is Tim Hudson
-([email protected]).
-
-Copyright remains Eric Young's, and as such any Copyright notices in the code
-are not to be removed. If this package is used in a product, Eric Young should
-be given attribution as the author of the parts of the library used. This can
-be in the form of a textual message at program startup or in documentation
-(online or textual) provided with the package.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-1. Redistributions of source code must retain the copyright notice, this list
-of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. All advertising materials mentioning features or use of this software must
-display the following acknowledgement: "This product includes cryptographic
-software written by Eric Young ([email protected])" The word 'cryptographic'
-can be left out if the rouines from the library being used are not
-cryptographic related :-).
-4. If you include any Windows specific code (or a derivative thereof) from the
-apps directory (application code) you must include an acknowledgement: "This
-product includes software written by Tim Hudson ([email protected])"
-
-THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
-EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-The licence and distribution terms for any publically available version or
-derivative of this code cannot be changed.  i.e. this code cannot simply be
-copied and put under another distribution licence [including the GNU Public
-Licence.]
-
--------------------
-
-zlib:
-Acknowledgments:
-  The deflate format used by zlib was defined by Phil Katz. The deflate and
-zlib specifications were written by L. Peter Deutsch. Thanks to all the people
-who reported problems and suggested various improvements in zlib; they are too
-numerous to cite here.
-
-Copyright notice:
- (C) 1995-2004 Jean-loup Gailly and Mark Adler
-
-  This software is provided 'as-is', without any express or implied warranty.
-In no event will the authors be held liable for any damages arising from the
-use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-including commercial applications, and to alter it and redistribute it freely,
-subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-claim that you wrote the original software. If you use this software in a
-product, an acknowledgment in the product documentation would be appreciated
-but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Jean-loup Gailly        Mark Adler
-  [email protected]          [email protected]
-
-If you use the zlib library in a product, we would appreciate *not* receiving
-lengthy legal documents to sign. The sources are provided for free but without
-warranty of any kind.  The library has been entirely written by Jean-loup
-Gailly and Mark Adler; it does not include third-party code.
-
-If you redistribute modified sources, we would appreciate that you include in
-the file ChangeLog history information documenting your changes. Please read
-the FAQ for more information on the distribution of modified source versions.
-
--------------------
-
-Intel AESNI Sample Library:
-
-Copyright (c) 2010, Intel Corporation
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors may
-be used to endorse or promote products derived from this software without
-specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Issue Date: Aug 6, 2010
-
--------------------
-
-NOTES WRITTEN BY SOFTETHER CORPORATION
-
-Note for users of non-Windows version of PacketiX VPN: The enumerated bundle
-of License Agreements above are copies of original License Agreements of each
-library programs which PacketiX VPN uses. PacketiX VPN is not a delivered work
-from these libraries. PacketiX VPN is a separated work from the libraries, but
-it may call functions of the libraries (whether or not PacketiX VPN calls such
-functions are depended on the user's intention to link them or not on user's
-side computer). While some libraries indicate GPL or LGPL as a condition to
-re-distribute, PacketiX VPN is not license under GPL nor LGPL. Therefore, we
-took special care not to make PacketiX VPN become delivered works of any GPL
-or LGPL libraries. In order to achieve that, both PacketiX VPN and GPL/LGPL
-libraries are distributed with isolated forms (means that any program files of
-PacketiX VPN are not bound nor linked to any GPL/LGPL libraries). If a user of
-PacketiX VPN wants to link GPL/LGPL libraries by their own decisions,
-operations and responsibilities, he may do that on his computer. However, if a
-delivered work under copyright law is created as a result of such an
-operation, such a delivered work must not re-distributed to other people,
-because it may violate GPL/LGPL libraries' conditions.
-
-Note for users of Windows version of PacketiX VPN: For technical reason, the
-above texts are exactly same as a file which is also contained on the
-non-Windows version of PacketiX VPN. Actually, the Windows version of PacketiX
-VPN has no relations to any GPL/LGPL libraries enumerated above.
-
-SoftEther Corporation provides source codes of some GPL/LGPL/other libraries
-listed above on its web server. Anyone can download, use and re-distribute
-them under individual licenses which are contained on each archive file,
-available from the following URL:
-http://uploader.softether.co.jp/src/
-
-
-
-THE IMPORTANT NOTICES ABOUT SOFTETHER VPN
-
-FUNCTIONS OF VPN COMMUNICATIONS EMBEDDED ON THIS SOFTWARE ARE VERY POWERFUL
-THAN EVER. THIS STRONG VPN ABILITY WILL BRING YOU HUGE BENEFITS. HOWEVER, IF
-YOU MISUSE THIS SOFTWARE, IT MIGHT DAMAGES YOURSELF. IN ORDER TO AVOID SUCH
-RISKS, THIS DOCUMENT ACCOUNTS IMPORTANT NOTICES FOR CUSTOMERS WHO ARE WILLING
-TO USE THIS SOFTWARE. THE FOLLOWING INSTRUCTIONS ARE VERY IMPORTANT. READ AND
-UNDERSTAND IT CAREFULLY. ADDITIONALLY, IF YOU ARE PLANNING TO USE THE DYNAMIC
-DNS, THE NAT TRAVERSAL OR THE VPN AZURE FUNCTIONS, READ THE SECTION 3.5
-CAREFULLY. THESE FUNCTIONS ARE FREE SERVICES PROVIDED VIA THE INTERNET, ARE
-NOT GUARANTEED, AND ARE NOT INTENDED TO BE USED FOR BUSINESS OR COMMERCIAL
-USE. DO NOT USE THESE SERVICES FOR YOUR BUSINESS OR COMMERCIAL USE.
-
-
-1. VPN Communication Protocols
-1.1. SoftEther VPN Protocol
-SoftEther VPN can perform VPN communication. Unlike traditional VPN protocols,
-SoftEther VPN has an implementation of the newly-designed "SoftEther VPN
-Protocol (SE-VPN Protocol)" . SE-VPN protocol encapsulates any Ethernet
-packets into a HTTPS (HTTP over SSL) connection. Therefore SE-VPN protocol can
-communicate beyond firewalls even if the firewall is configured to block
-traditional VPN packets by network administrator. SE-VPN protocol is designed
-and implemented to comply TLS 1.0 (RFC 5246) and HTTPS (RFC 2818). However, it
-sometimes have different behavior to RFCs. If you are a network administrator
-and want to block SE-VPN protocols on the firewall, you can adopt a
-"white-list" policy on the firewall to filter any TCP or UDP packets on the
-border except explicitly allowed packets towards specific web sites and
-servers.
-
-1.2. NAT Traversal Function
-Generally, if you use traditional VPN systems you have to request a network
-administrator to make the NAT or firewall to "open" or "relay" specific TCP or
-UDP ports. However, there are demands somehow to eliminate such working costs
-on network administrators. In order to satisfy such demands, SoftEther VPN has
-the newly-implemented "NAT Traversal" function. NAT Traversal is enabled by
-default. A SoftEther VPN Server running on the computer behind NAT or firewall
-can accept VPN connections from the Internet, without any special
-configurations on firewalls or NATs. If you want to disable the NAT Traversal
-function, modify the "DisableNatTraversal" to "true" on the configuration file
-of SoftEther VPN Server. In order to disable it on the client-side, append
-"/tcp" suffix on the destination hostname.
-
-1.3. Dynamic DNS Function
-Traditional legacy VPN system requires a static global IP address on the VPN
-server. In consideration of shortage of global IP addresses, SoftEther
-Corporation implements the "Dynamic DNS Function" on SoftEther VPN Server.
-Dynamic DNS is enabled by default. Dynamic DNS function notify the current
-global IP address of the PC to the Dynamic DNS Servers which are operated by
-SoftEther Corporation. A globally-unique hostname (FQDN) such as
-"abc.softether.net" ( "abc" varies as unique per a user) will be assigned on
-the VPN Server. If you tell this unique hostname to a VPN user, the user can
-specify it as the destination VPN Sever hostname on the VPN Client and will be
-able to connect the VPN Server. No IP addresses are required to know
-beforehand. If the IP address of the VPN Server varies, the registered IP
-address related to the hostname of Dynamic DNS service will be changed
-automatically. By this mechanism, no longer need a static global IP address
-which costs monthly to ISPs. You can use consumer-level inexpensive Internet
-connection with dynamic IP address in order to operate an enterprise-level VPN
-system. If you want to disable Dynamic DNS, specify "true" on the "Disabled"
-items of the "DDnsClient" directive on the SoftEther VPN Server configuration
-file. * Note for residents in People's Republic of China: If your VPN Server
-is running on the People's Republic of China, the DNS suffix will be replaced
-to "sedns.cn" domain. The "sedns.cn" domain is the service possessed and
-operated by "Beijing Daiyuu SoftEther Technology Co., Ltd" which is a
-Chinese-local enterprise.
-
-1.4. VPN over ICMP / VPN over DNS functions
-If you want to make a VPN connection between SoftEther VPN Client / Bridge and
-SoftEther VPN Server, but if TCP and UDP packets are prohibited by the
-firewall, then you can encapsulates payloads into "ICMP" (as known as Ping) or
-"DNS" packets. This function can realize a VPN connection by using ICMP or DNS
-even if the firewall or router blocks every TCP or UDP connections. VPN over
-ICMP / VPN over DNS functions are designed to comply standard ICMP and DNS
-specifications as possible, however it sometimes has a behavior not to fully
-comply them. Therefore, few poor-quality routers may be caused a
-memory-overflow or something troubles when a lot of ICMP or DNS packets are
-passed, and such routers sometimes freezes or reboots. It might affects other
-users on the same network. To avoid such risks, append the suffix "/tcp" on
-the destination hostname which is specified on the VPN-client side to disable
-VPN over ICMP / DNS functions.
-
-1.5. VPN Azure Cloud Service
-If your SoftEther VPN Server is placed behind the NAT or firwall, and by some
-reason you cannot use NAT Traversal function, Dynamic DNS function or VPN over
-ICMP/DNS function, you can use VPN Azure Clouse Service. SoftEther Corporation
-operates VPN Azure Cloud on Internet. After the VPN Server makes a connection
-to the VPN Azure Cloud, the hostname "abc.vpnazure.net" ( "abc" is a unique
-hostname) can be specified to connect to the VPN Server via the VPN Azure
-Cloud. Practically, such a hostname is pointing a global IP address of one of
-cloud servers which are operated by SoftEther Corporation. If A VPN Client
-connects to such a VPN Azure host, then the VPN Azure host will relay all
-traffics between the VPN Client and the VPN Server. VPN Azure is disabled by
-default. You can activate it easily by using VPN Server Configuration Tool.
-
-1.6. UDP Acceleration
-SoftEther VPN has the UDP Acceleration Function. If a VPN consists of two
-sites detects that UDP channel can be established, UDP will be automatically
-used. By this function, throughput of UDP increases. If direct UDP channel can
-be established, direct UDP packets will be used. However, if there is
-something obstacles such as firewalls or NATs, the "UDP Hole Punching"
-technology will be used, instead. The "UDP Hole Punching" uses the cloud
-servers which SoftEther Corporation operates on Internet. UDP Acceleration can
-be disabled anytime by setting up so on the VPN-client side.
-
-
-2. VPN Software
-2.1. SoftEther VPN Client
-If you use SoftEther VPN Client on Windows, the Virtual Network Adapter device
-driver will be installed on Windows. The Virtual Network Adapter is
-implemented as a kernel-mode driver for Windows. The driver is
-digitally-signed by a certificate issued by VeriSign, Inc. and also sub-signed
-by Symantec Corporation. A message to ask you want to sure install the driver
-might be popped up on the screen. SoftEther VPN Client may response the
-message if possible. SoftEther VPN Client also optimizes the configuration of
-MMCSS (Multimedia Class Scheduler Service) on Windows. You can undo the
-optimizations of MMCSS afterwards.
-
-2.2. SoftEther VPN Server / Bridge
-If you use SoftEther VPN Server / Bridge on Windows with "Local Bridge"
-functions, you have to install the low-level Ethernet packet processing driver
-on the computer. The driver is digitally-signed by a certificate issued by
-VeriSign, Inc. and also sub-signed by Symantec Corporation. SoftEther VPN
-Server / Bridge may disable the TCP/IP offloading features on the physical
-network adapter for Local Bridge function. In Windows Vista / 2008 or greater
-version, VPN Server may inject a packet-filter driver which complies Windows
-Filter Platform (WPF) specification into the kernel in order to provide IPsec
-function. The packet-filter driver will be loaded available only if IPsec
-function is enabled. Once you enables IPsec function of SoftEther VPN Server,
-the built-in IPsec function of Windows will be disabled. After you disabled
-IPsec function of SoftEther VPN Server, then the built-in IPsec function of
-Windows will revive. In order to provide the Local Bridge function, SoftEther
-VPN Server / Bridge disables the TCP/IP offloading function on the operating
-system.
-
-2.3. User-mode Installation
-You can install SoftEther VPN Server and SoftEther VPN Bridge as "User-mode"
-on Windows. In other words, even if you don't have Windows system
-administrator's privileges, you can install SoftEther VPN as a normal user.
-User-mode install will disable a few functions, however other most functions
-work well. Therefore, for example, an employee can install SoftEther VPN
-Server on the computer in the office network, and he will be able to connect
-to the server from his home. In order to realize such a system by user-self,
-no system administrative privileges are required in the view-point of
-technical. However, breaking rules of the company to install software on the
-computer without authority might be regarded as an unfavorable behavior. If
-you are an employee and belong to the company, and the company-policy
-prohibits installing software or making communications towards Internet
-without permission, you have to obtain a permission from the network
-administrator or the executive officer of your company in advance to install
-SoftEther VPN. If you install VPN Server / Bridge as User-mode, an icon will
-be appeared on the Windows task-tray. If you feel that the icon disturbs you,
-you can hide it by your operation. However, you must not exploit this hiding
-function to install VPN Server on other person's computer as a spyware. Such
-behavior might be an offence against the criminal law.
-
-2.4. Keep Alive Function
-SoftEther VPN Server and SoftEther VPN Bridge has Keep Alive Function by
-default. The purpose of this function is to sustain the Internet line active.
-The function transmits UDP packets with a random-byte-array-payload
-periodically. This function is useful to avoid automatic disconnection on
-mobile or dial-up connections. You can disable Keep Alive Function anytime.
-
-2.5. Uninstallation
-The uninstallation process of SoftEther VPN software will delete all program
-files. However, non-program files (such as files and data which are generated
-by running of programs) ) will not be deleted. For technical reason, the exe
-and resource files of uninstaller might remain. Such remaining files never
-affects to use the computer, however you can delete it manually. Kernel-mode
-drivers might not be deleted, however such drivers will not be loaded after
-the next boot of Windows. You can use "sc" command of Windows to delete
-kernel-mode drivers manually.
-
-2.6. Security
-You should set the administrator's password on SoftEther VPN Server / Bridge
-after installation. If you neglect to do it, another person can access to
-SoftEther VPN Server / Bridge and can set the password without your
-permission. This caution might be also applied on SoftEther VPN Client for
-Linux.
-
-2.7. Automatic Update Notification
-SoftEther VPN software for Windows has an automatic update notification
-function. It accesses to the SoftEther Update server periodically to check
-whether or not the latest version of software is released. If the latest
-version is released, the notification message will be popped up on the screen.
-In order to achieve this purpose, the version, language settings, the unique
-identifier, the IP address of your computer and the hostname of VPN Server
-which is connected to will be sent to the SoftEther Update server. No personal
-information will be sent. Automatic Update Notification is enabled by default,
-however you can disable it on the configuration screen. The setting whether
-turned on or turned off will be saved individually corresponding to each
-destination VPN server, by VPN Server Manager.
-
-2.8. Virtual NAT Function
-A Virtual Hub on SoftEther VPN Server / Bridge has "Virtual NAT Function" .
-Virtual NAT Function can share a single IP address on the physical network by
-multiple private IP address of VPN Clients. There are two operation mode of
-Virtual NAT: User-mode and Kernel-mode. In the user-mode operation, Virtual
-NAT shares an IP address which is assigned on the host operating system.
-Unlike user-mode, the kernel-mode operation attempts to find DHCP servers on
-the physical network. If there are two or more physical networks, a DHCP
-server will be sought automatically for each segments serially. If a DHCP
-server found, and an IP address is acquired, the IP address will be used by
-the Virtual NAT. In this case, an IP entry as a DHCP client will be registered
-on the IP pool of the physical DHCP Server. The physical default gateway and
-the DNS server will be used by the Virtual NAT in order to communicate with
-hosts in Internet. In kernel-mode operation, a Virtual Hub has a virtual MAC
-address which is operating on the physical Ethernet segment. In order to check
-the connectivity to Internet, SoftEther VPN periodically sends DNS query
-packet to resolve the IP address of host "www.yahoo.com" or "www.baidu.com" ,
-and attempts to connect to the TCP port 80 of such a resulted IP address for
-connectivity check.
-
-2.9. Unattended Installation of Kernel-mode Components
-When SoftEther VPN will detect a necessity to install the kernel-mode
-components on Windows, a confirmation message will be appeared by Windows
-system. In this occasion, SoftEther VPN software will switch to the Unattended
-Installation mode in order to respond "Yes" to Windows. This is a solution to
-prevent dead-locks when a remote-administration is performed from remote
-place.
-
-2.10. Windows Firewall
-SoftEther VPN software will register itself as a safe-program. Such an entry
-will be remain after the uninstallation. You can remove it manually from the
-Control Panel of Windows.
-
-
-3. Internet Services
-3.1. Internet Services which are provided by SoftEther Corporation
-SoftEther Corporation provides Dynamic DNS, NAT Traversal and VPN Azure server
-services on the Internet. These services are free of charge. Customers can
-access to the services by using SoftEther VPN software, via Internet. These
-service will be planned to be available from Open-Source version of "SoftEther
-VPN" which will be released in the future.
-
-3.2. Sent Information and Privacy Protection
-SoftEther VPN software may send an IP address, hostname, the version of VPN
-software on the customer's computer to the cloud service operated by SoftEther
-Corporation, in order to use the above services. These sending of information
-are minimal necessary to use the services. No personal information will be
-sent. SoftEther Corporation records log files of the cloud service servers for
-90 days at least with the received information. Such logs will be used for
-troubleshooting and other legitimate activities. SoftEther Corporation may
-provide logs to a public servant of Japanese government who are belonging to
-courts, police stations and the prosecutor's office, in order to comply such
-authorities' order. (Every Japanese public servants are liable by law to keep
-the information close.) Moreover, the IP addresses or other information will
-be processed statistically and provided to the public, not to expose the each
-concrete IP address, in order to release the release of research activities.
-
-3.3. Communication Data via VPN Azure Service
-Regardless of the above 3.2 rule, if the customer sends or receives VPN
-packets using VPN Azure Cloud Service, the actual payloads will stored and
-forwarded via the volatile memory of the servers for very short period. Such a
-behavior is naturally needed to provide the "VPN relay service" . No payloads
-will be recorded on "fixed" storages such as hard-drives. However, the
-"Wiretapping for Criminals Procedures Act" (The 137th legislation ruled on
-August 18, 1999 in Japan) requires telecommunication companies to allow the
-Japanese government authority to conduct a wire-tapping on the line. VPN Azure
-Servers which are physically placed on Japan are subjects of this law.
-
-3.4. Comply to Japanese Telecommunication Laws
-SoftEther Corporation complies with Japanese Telecommunication Laws as
-necessary to provide online services via Internet.
-
-3.5. Free and Academic Experiment Services
-SoftEther provides Dynamic DNS, NAT Traversal and VPN Azure as academic
-experiment services. Therefore, there services can be used for free of charge.
-These services are not parts of "SoftEther VPN Software Products" . These
-services are provided without any warranty. The services may be suspended or
-discontinued by technical or operational matters. In such occasions, users
-will not be able to use the services. A user have to understand such risks,
-and to acknowledge that such risks are borne by a user-self. SoftEther will
-never be liable to results or damages of use or unable-to-use of the service.
-Even if the user has already paid the license-fee of the commercial version of
-SoftEther VPN, such paid fees don't include any fees of these services.
-Therefore, if the online services will stop or be discontinued, no refunds or
-recoveries of damages will be provided by SoftEther Corporation.
-
-3.6. DNS Proxy Cloud Servers
-In some regions, when a user uses Internet, a DNS query sometimes broken or
-lost when it is passing through the ISP line. If SoftEther VPN Server, Client
-or Bridge detects a possibility that the accessing to the actual VPN server
-might be unstable, then DNS queries will be also transferred to the DNS proxy
-cloud servers which are operated by SoftEther Corporation. A DNS proxy cloud
-server will respond DNS queries with answering correct a IP address.
-
-
-4. General Cautions
-4.1. Needs an Approval from Network Administrator
-SoftEther VPN has powerful functions which don't require special settings by
-network administrators. For example, you need not to ask the administrator to
-configure the existing firewall in order to "open" a TCP/UDP port. Such
-characteristic features are for the purpose to eliminate working times and
-costs of network administrators, and avoid misconfiguration-risks around the
-tasks to open specific exception ports on the firewall. However, any employees
-belong to the company have to obtain an approval from the network
-administrator before installs SoftEther VPN. If your network administrator
-neglects to provide such an approval, you can consider to take an approval
-from an upper authority. (For example, executive officer of the company.) If
-you use SoftEther VPN without any approvals from the authority of your
-company, you might have disadvantage. SoftEther Corporation will be never
-liable for results or damages of using SoftEther VPN.
-
-4.2. Observe Laws of Your Country
-If your country's law prohibits the use of encryption, you have to disable the
-encryption function of SoftEther VPN by yourself. Similarly, in some countries
-or regions, some functions of SoftEther VPN might be prohibited to use by
-laws. Other countries' laws are none of SoftEther Corporation's concern
-because SoftEther Corporation is an enterprise which is located and registered
-in Japan physically. For example, there might be a risk that a part of
-SoftEther VPN conflicts an existing patent which is valid only on the specific
-region. SoftEther Corporation has no interests in such specific region outside
-Japan's territory. Therefore, if you want to use SoftEther VPN in regions
-outside Japan, you have to be careful not to violate third-person's rights.
-You have to verify the legitimacy of the use of SoftEther VPN in the specific
-region before you actually use it in such region. By nature, there are almost
-200 countries in the World, and each country's law is different each other. It
-is practically impossible to verify every countries' laws and regulations and
-make the software comply with all countries' laws in advance to release the
-software. Therefore SoftEther Corporation has verified the legitimacy of
-SoftEther VPN against the laws and regulations of only Japan. If a user uses
-SoftEther VPN in a specific country, and damaged by public servants of the
-government authority, SoftEther Corporation will never be liable to recover or
-compensate such damages or criminal responsibilities.
-
-
-5. VPN Gate Academic Experiment Project
-(This chapter applies only on SoftEther VPN software package which contains
-the extension plug-in for VPN Gate Academic Experiment Project.)
-5.1. About VPN Gate Academic Experiment Project
-VPN Gate Academic Experiment Project is an online service operated for just
-the academic research purpose at the graduate school of University of Tsukuba,
-Japan. The purpose of this research is to expend our knowledge about the
-"Global Distributed Public VPN Relay Server" (GDPVRS) technology. For details,
-please visit http://www.vpngate.net/.
-
-5.2. About VPN Gate Service
-SoftEther VPN Server and SoftEther VPN Client may contain "VPN Gate Service"
-program. However, VPN Gate Service is disabled by default.
-VPN Gate Service should be activated and enabled by the voluntary intention of
-the owner of the computer which SoftEther VPN Server or SoftEther VPN Client
-is installed on. After you activate VPN Gate Service, the computer will be
-start to serve as a part of the Global Distributed Public VPN Relay Servers.
-The IP address, hostname and related information of the computer will be sent
-and registered to the directory server of VPN Gate Academic Experiment
-Project, and they will be published and disclosed to the public. This
-mechanism will allow any VPN Gate Client software's user to connect to the VPN
-Gate Service running on your computer. While the VPN session between a VPN
-Gate Client and your VPN Gate Service is established, the VPN Gate Client's
-user can send/receive any IP packets towards the Internet via the VPN Gate
-Service. The global IP address of the VPN Gate Service's hosing computer will
-be used as the source IP address of such communications which a VPN Gate
-Client initiates.
-VPN Gate Service will send some information to the VPN Gate Academic
-Experiment Service Directory Server. The information includes the operator's
-information which described in section 5.5, logging settings, uptime,
-operating system version, type of protocol, port numbers, quality information,
-statistical information, VPN Gate clients' log history data (includes dates,
-IP addresses, version numbers and IDs) and the version of the software. These
-information will be exposed on the directory. VPN Gate Service also receives a
-key for encoding which is described on the chapter 5.9 from the directory
-server.
-
-5.3. Details of VPN Gate Service's Behavior
-If you enable VPN Gate Service manually, which is disabled by default, the
-"VPNGATE" Virtual Hub will be created on the SoftEther VPN Server. If you are
-using SoftEther VPN Client and attempt to active VPN Gate Service on it, an
-equivalent program to SoftEther VPN Server will be invoked on the same process
-of SoftEther VPN Client, and the "VPNGATE" Virtual Hub will be created. The
-"VPNGATE" Virtual Hub contains a user named "VPN" by default which permits
-anyone on the Internet to make a VPN connection to the Virtual Hub. Once a VPN
-Client connects to the "VPNGATE" Virtual Hub, any communication between the
-user and the Internet will pass through the Virtual Hub, and
-transmitted/received using the physical network interface on the computer
-which SoftEther VPN Server (or SoftEther VPN Client) is running on. This will
-cause the result that a destination host specified by the VPN Client will
-identify that the source of the communication has initiated from the VPN Gate
-Service's hosting computer's IP address. However, for safety, any packets
-which destinations are within 192.168.0.0/255.255.0.0, 172.16.0.0/255.240.0.0
-or 10.0.0.0/255.0.0.0 will be blocked by the "VPNGATE" Virtual Hub in order to
-protect your local network. Therefore, if you run VPN Gate Service on your
-corporate network or private network, it is safe because anonymous VPN Client
-users will not be permitted to access such private networks. VPN Gate Service
-also serves as relay for accessing to the VPN Gate Directory Server.
-In order to make VPN Gate Service familiar with firewalls and NATs, it opens
-an UDP port by using the NAT Traversal function which is described on the
-section 1.2. It also opens and listens on some TCP ports, and some TCP and UDP
-ports will be specified as the target port of Universal Plug and Play (UPnP)
-Port Transfer entries which are requested to your local routers. UPnP request
-packets will be sent periodically. Some routers keep such an opened TCP/UDP
-port permanently on the device. If you wish to close them, do it manually.
-VPN Gate Service also provides the mirror-site function for www.vpngate.net.
-This is a mechanism that a copy of the latest contents from www.vpngate.net
-will be hosted by the mirror-site tiny HTTP server which is running on the VPN
-Gate Service program. It will register itself on the mirror-sites list in
-www.vpngate.net. However, it never relays any other communications which are
-not towards www.vpngate.net.
-
-5.4. Communication between Internet via VPN Gate Service
-VPN Gate Service provides a routing between users and the Internet, by using
-the Virtual NAT Function which is described on the section 2.8. VPN Gate
-Service sends polling Ping packets to the server which is located on
-University of Tsukuba, and the Google Public DNS Server which is identified as
-8.8.8.8, in order to check the latest quality of your Internet line. VPN Gate
-Service also sends and receives a lot of random packets to/from the Speed Test
-Server on University of Tsukuba. These quality data will be reported to VPN
-Gate Directory Server, automatically and periodically. The result will be
-saved and disclosed to the public. These periodical polling communication are
-adjusted not to occupy the Internet line, however in some circumstances they
-might occupy the line.
-
-5.5. Operator's Information of VPN Gate Service
-If you activate VPN Gate Service on your computer, the computer will be a part
-of the Global Distributed Public VPN Relay Servers. Therefore, the Operator's
-administrative information of your VPN Gate Service should be reported and
-registered on the VPN Gate Service Directory. Operator's information contains
-the name of the operator and the abuse-reporting contact e-mail address. These
-information can be inputted on the screen if the VPN Gate configuration.
-Inputted information will be transmitted to the VPN Gate Directory Server,
-stored and disclosed to the public. So you have to be careful to input
-information. By the way, until you specify something as the operator's
-information, the computer's hostname will be used automatically as the field
-of the name of the operator, by appending the "'s owner" string after the
-hostname.
-
-5.6. Observe Laws to Operate VPN Gate Service
-In some countries or regions, a user who is planning to activate and operate
-VPN Gate Service, he are mandated to obtain a license or register a service
-from/to the government. If your region has such a regulation, you must fulfill
-mandated process before activating VPN Gate Service in advance. Neither the
-developers nor operators of the VPN Gate Academic Experiment Project will be
-liable for legal/criminal responsibilities or damages which are occurred from
-failure to comply your local laws.
-
-5.7. Protect Privacy of Communication
-Most of countries have a law which requires communication service's operators,
-including VPN Gate Service operators, to protect the privacy of communication
-of third-persons. When you operate VPN Gate Service, you must always protect
-user's privacy.
-
-5.8. Packet Logs
-The packet logging function is implemented on VPN Gate Service. It records
-essential headers of major TCP/IP packets which are transmitted via the
-Virtual Hub. This function will be helpful to investigate the "original IP
-address" of the initiator of communication who was a connected user of your
-VPN Gate Service, by checking the packet logs and the connection logs. The
-packet logs are recorded only for such legitimate investigates purpose. Do not
-peek nor leak packet logs except the rightful purpose. Such act will be
-violate the section 5.7.
-
-5.9. Packet Logs Automatic Archiving and Encoding Function
-The VPN Gate Academic Experiment Service is operated and running under the
-Japanese constitution and laws. The Japanese constitution laws demand strictly
-protection over the privacy of communication. Because this service is under
-Japanese rules, the program of VPN Gate Service implements this "Automatic Log
-File Encoding" protection mechanism, and enabled by default.
-The VPN Gate Service is currently configured to encode packet log files which
-has passed two or more weeks automatically, by default. In order to protect
-privacy of communication, if a packet log file is once encoded, even the
-administrator of the local computer cannot censor the packet log file. This
-mechanism protects privacy of end-users of VPN Gate Service.
-You can change the VPN Gate Service setting to disable this automatic encoding
-function. Then packet log files will never be encoded even after two weeks
-passed. In such a configuration, all packet logs will remain as plain-text on
-the disk. Therefore you have to take care not to violate user's privacy.
-If you are liable to decode an encoded packet log files (for example: a VPN
-Gate Service's user illegally abused your VPN Gate Service and you have to
-decode the packet logs in order to comply the laws), contact the administrator
-of the VPN Gate Academic Experiment Service at Graduate School of University
-of Tsukuba, Japan. You can find the contact address at
-http://www.vpngate.net/. The administrator of VPN Gate Service will respond to
-decode the packet logs if there is an appropriate and legal request from court
-or other judicial authorities, according to laws.
-
-5.10. Caution if You Operate VPN Gate Service in the Japan's Territories
-When a user operates VPN Gate Service in the Japan's territories, such an act
-may be regulated under the Japanese Telecommunication Laws if the operation is
-a subject to the law. However, in such a circumstance, according to the
-"Japanese Telecommunication Business Compete Manual [supplemental version]" ,
-non- profitable operations of communications are not identified as a
-"telecommunication business" . So usual operators of VPN Gate Service are not
-subjects to "telecommunication business operators" , and not be mandated to
-register to the government. Even so, legalities to protect the privacy of
-communication still imposed. As a conclusion, if you operate VPN Gate Service
-in the Japan's Territories, you must not leak the secrets of communications
-which are transmitted via your operating VPN Gate Service.
-
-5.11. VPN Gate Client
-If SoftEther VPN Client contains the VPN Gate Client plug-in, you can use it
-to obtain the list of current operating VPN Gate Service servers in the
-Internet, and make a VPN connection to a specific server on the list.
-VPN Gate Client always keeps the latest list of the VPN Gate Services
-periodically. Be careful if you are using a pay-per-use Internet line.
-When you start the VPN Gate Client software, the screen which asks you
-activate or not VPN Gate Service will be appeared. For details of VPN Gate
-Service, read the above sections.
-
-5.12. Caution before Joining or Exploiting VPN Gate Academic Experiment
-Project
-The VPN Gate Academic Experiment Service is operated as a research project at
-the graduate school on University of Tsukuba, Japan. The service is governed
-under the Japanese laws. Other countries' laws are none of our concerns nor
-responsibilities.
-By nature, there are almost 200 countries in the World, with different laws.
-It is impossible to verify every countries' laws and regulations and make the
-software comply with all countries' laws in advance to release the software.
-If a user uses VPN Gate service in a specific country, and damaged by public
-servants of the authority, the developer of either the service or software
-will never be liable to recover or compensate such damages or criminal
-responsibilities.
-By using this software and service, the user must observe all concerned laws
-and rules with user's own responsibility. The user will be completely liable
-to any damages and responsibilities which are results of using this software
-and service, regardless of either inside or outside of Japan's territory.
-If you don't agree nor understand the above warnings, do not use any of VPN
-Gate Academic Experiment Service functions.
-VPN Gate is a research project for just academic purpose only. VPN Gate was
-developed as a plug-in for SoftEther VPN and UT-VPN. However, all parts of VPN
-Gate were developed on this research project at University of Tsukuba. Any
-parts of VPN Gate are not developed by SoftEther Corporation. The VPN Gate
-Research Project is not a subject to be led, operated, promoted nor guaranteed
-by SoftEther Corporation.
 
+READ AND UNDERSTAND THE 'WARNING.TXT' FILE BEFORE USING THIS SOFTWARE.
+SOME SOFTWARE PROGRAMS FROM THIRD PARTIES ARE INCLUDED ON THIS SOFTWARE WITH
+LICENSE CONDITIONS WHICH ARE DESCRIBED ON THE 'THIRD_PARTY.TXT' FILE.
 

+ 5 - 2
README

@@ -114,10 +114,10 @@ on all the following open-source repositories:
     https://github.com/SoftEtherVPN/SoftEtherVPN/
 
   - SourceForge
-    https://sourceforge.net/projects/softethervpn/
+    https://sourceforge.net/p/softethervpn/code/ci/master/tree/
 
   - Google Code
-    https://code.google.com/p/softether/
+    https://code.google.com/p/softether/source/browse/
 
 
 To fetch the source code from GitHub:
@@ -179,6 +179,9 @@ SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
 PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
 COUNTRIES MIGHT BE RESTRICTED.
 
+READ AND UNDERSTAND THE 'WARNING.TXT' FILE BEFORE USING THIS SOFTWARE.
+SOME SOFTWARE PROGRAMS FROM THIRD PARTIES ARE INCLUDED ON THIS SOFTWARE WITH LICENSE CONDITIONS WHICH ARE DESCRIBED ON THE 'THIRD_PARTY.TXT' FILE.
+
 
 ADVERTISEMENT
 -------------

+ 5 - 2
README.TXT

@@ -114,10 +114,10 @@ on all the following open-source repositories:
     https://github.com/SoftEtherVPN/SoftEtherVPN/
 
   - SourceForge
-    https://sourceforge.net/projects/softethervpn/
+    https://sourceforge.net/p/softethervpn/code/ci/master/tree/
 
   - Google Code
-    https://code.google.com/p/softether/
+    https://code.google.com/p/softether/source/browse/
 
 
 To fetch the source code from GitHub:
@@ -179,6 +179,9 @@ SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
 PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
 COUNTRIES MIGHT BE RESTRICTED.
 
+READ AND UNDERSTAND THE 'WARNING.TXT' FILE BEFORE USING THIS SOFTWARE.
+SOME SOFTWARE PROGRAMS FROM THIRD PARTIES ARE INCLUDED ON THIS SOFTWARE WITH LICENSE CONDITIONS WHICH ARE DESCRIBED ON THE 'THIRD_PARTY.TXT' FILE.
+
 
 ADVERTISEMENT
 -------------

+ 757 - 0
THIRD_PARTY.TXT

@@ -0,0 +1,757 @@
+BitVisor(R) VPN Client Module (IPsec Driver):
+Copyright (c) 2007, 2008 University of Tsukuba.
+Copyright (C) 2007, 2008 National Institute of Information and Communications
+Technology.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+3. Neither the name of the University of Tsukuba nor the names of its
+contributors may be used to endorse or promote products derived from this
+software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------
+
+Microsoft(R) C Runtime Library:
+(c) 2007 Microsoft Corporation. All Rights Reserved.
+
+-------------------
+
+RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki):
+
+License to copy and use this software is granted provided that it is
+identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface
+(Cryptoki)" in all material mentioning or referencing this software.
+
+License is also granted to make and use derivative works provided that such
+works are identified as "derived from the RSA Security Inc. PKCS #11
+Cryptographic Token Interface (Cryptoki)" in all material mentioning or
+referencing the derived work.
+
+RSA Security Inc. makes no representations concerning either the
+merchantability of this software or the suitability of this software for any
+particular purpose. It is provided "as is" without express or implied warranty
+of any kind.
+
+-------------------
+
+WinPcap:
+Copyright (c) 2001 - 2003 NetGroup, Politecnico di Torino (Italy)
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+3. Neither the name of the Politecnico di Torino nor the names of its
+contributors may be used to endorse or promote products derived from this
+software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------
+
+libedit:
+Copyright (c) 1992, 1993 The Regents of the University of California.  All
+rights reserved.
+
+This code is derived from software contributed to Berkeley by Christos Zoulas
+of Cornell University.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+1. Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors may be
+used to endorse or promote products derived from this software without
+specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------
+
+libiconv:
+
+          GNU LIBRARY GENERAL PUBLIC LICENSE
+               Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ Everyone is permitted to copy and distribute verbatim copies of this license
+document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+                Preamble
+
+  The licenses for most software are designed to take away your freedom to
+share and change it. By contrast, the GNU General Public Licenses are intended
+to guarantee your freedom to share and change free software--to make sure the
+software is free for all its users.
+
+  This license, the Library General Public License, applies to some specially
+designated Free Software Foundation software, and to any other libraries whose
+authors decide to use it. You can use it for your libraries, too.
+
+  When we speak of free software, we are referring to freedom, not price. Our
+General Public Licenses are designed to make sure that you have the freedom to
+distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new free
+programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid anyone to
+deny you these rights or to ask you to surrender the rights. These
+restrictions translate to certain responsibilities for you if you distribute
+copies of the library, or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis or for
+a fee, you must give the recipients all the rights that we gave you. You must
+make sure that they, too, receive or can get the source
+code. If you link a program with the library, you must provide complete object
+files to the recipients so that they can relink them with the library, after
+making changes to the library and recompiling it. And you must show them these
+terms so they know their rights.
+
+  Our method of protecting your rights has two steps: (1) copyright the
+library, and (2) offer you this license which gives you legal permission to
+copy, distribute and/or modify the library.
+
+  Also, for each distributor's protection, we want to make certain that
+everyone understands that there is no warranty for this free library. If the
+library is modified by someone else and passed on, we want its recipients to
+know that what they have is not the original version, so that any problems
+introduced by others will not reflect on the original authors' reputations.
+
+  Finally, any free program is threatened constantly by software patents. We
+wish to avoid the danger that companies distributing free software will
+individually obtain patent licenses, thus in effect transforming the program
+into proprietary software. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  Most GNU software, including some libraries, is covered by the ordinary GNU
+General Public License, which was designed for utility programs. This license,
+the GNU Library General Public License, applies to certain designated
+libraries. This license is quite different from the ordinary one; be sure to
+read it in full, and don't assume that anything in it is the same as in the
+ordinary license.
+
+  The reason we have a separate public license for some libraries is that they
+blur the distinction we usually make between modifying or adding to a program
+and simply using it. Linking a program with a library, without changing the
+library, is in some sense simply using the library, and is analogous to
+running a utility program or application program. However, in a textual and
+legal sense, the linked executable is a combined work, a derivative of the
+original library, and the ordinary General Public License treats it as such.
+
+  Because of this blurred distinction, using the ordinary General Public
+License for libraries did not effectively promote software sharing, because
+most developers did not use the libraries. We concluded that weaker conditions
+might promote sharing better.
+
+  However, unrestricted linking of non-free programs would deprive the users
+of those programs of all benefit from the free status of the libraries
+themselves. This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while preserving
+your freedom as a user of such programs to change the free libraries that are
+incorporated in them. (We have not seen how to achieve this as regards changes
+in header files, but we have achieved it as regards changes in the actual
+functions of the Library.) The hope is that this will lead to faster
+development of free libraries.
+
+  The precise terms and conditions for copying, distribution and modification
+follow. Pay close attention to the difference between a "work based on the
+library" and a "work that uses the library". The former contains code derived
+from the library, while the latter only works together with the library.
+
+  Note that it is possible for a library to be covered by the ordinary General
+Public License rather than by this special one.
+
+          GNU LIBRARY GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library which contains a
+notice placed by the copyright holder or other authorized party saying it may
+be distributed under the terms of this Library
+General Public License (also called "this License"). Each licensee is
+addressed as "you".
+
+  A "library" means a collection of software functions and/or data prepared so
+as to be conveniently linked with application programs (which use some of
+those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work which has
+been distributed under these terms. A "work based on the Library" means either
+the Library or any derivative work under copyright law: that is to say, a work
+containing the Library or a portion of it, either verbatim or with
+modifications and/or translated straightforwardly into another language.
+(Hereinafter, translation is included without limitation in the term
+"modification".)
+
+  "Source code" for a work means the preferred form of the work for making
+modifications to it. For a library, complete source code means all the source
+code for all modules it contains, plus any associated interface definition
+files, plus the scripts used to control compilation and installation of the
+library.
+
+  Activities other than copying, distribution and modification are not covered
+by this License; they are outside its scope. The act of running a program
+using the Library is not restricted, and output from such a program is covered
+only if its contents constitute a work based on the Library (independent of
+the use of the Library in a tool for writing it). Whether that is true depends
+on what the Library does and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's complete
+source code as you receive it, in any medium, provided that you conspicuously
+and appropriately publish on each copy an appropriate copyright notice and
+disclaimer of warranty; keep intact all the notices that refer to this License
+and to the absence of any warranty; and distribute a copy of this License
+along with the Library.
+
+  You may charge a fee for the physical act of transferring a copy, and you
+may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Library or any portion of it,
+thus forming a work based on the Library, and copy and distribute such
+modifications or work under the terms of Section 1 above, provided that you
+also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices stating
+that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no charge to all
+third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a table
+of data to be supplied by an application program that uses the facility, other
+than as an argument passed when the facility is invoked, then you must make a
+good faith effort to ensure that, in the event an application does not supply
+such function or table, the facility still operates, and performs whatever
+part of its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has a
+purpose that is entirely well-defined independent of the application.
+Therefore, Subsection 2d requires that any application-supplied function or
+table used by this function must be optional: if the application does not
+supply it, the square root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If identifiable
+sections of that work are not derived from the Library, and can be reasonably
+considered independent and separate works in themselves, then this License,
+and its terms, do not apply to those sections when you distribute them as
+separate works. But when you distribute the same sections as part of a whole
+which is a work based on the Library, the distribution of the whole must be on
+the terms of this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest your
+rights to work written entirely by you; rather, the intent is to exercise the
+right to control the distribution of derivative or collective works based on
+the Library.
+
+In addition, mere aggregation of another work not based on the Library with
+the Library (or with a work based on the Library) on a volume of a storage or
+distribution medium does not bring the other work under the scope of this
+License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do this,
+you must alter all the notices that refer to this License, so that they refer
+to the ordinary GNU General Public License, version 2, instead of to this
+License. (If a newer version than version 2 of the ordinary GNU General Public
+License has appeared, then you can specify that version instead if you wish.)
+Do not make any other change in these notices.
+
+  Once this change is made in a given copy, it is irreversible for that copy,
+so the ordinary GNU General Public License applies to all subsequent copies
+and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of the Library
+into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or derivative of
+it, under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you accompany it with the complete
+corresponding machine-readable source code, which must be distributed under
+the terms of Sections 1 and 2 above on a medium customarily used for software
+interchange.
+
+  If distribution of object code is made by offering access to copy from a
+designated place, then offering equivalent access to copy the source code from
+the same place satisfies the requirement to distribute the source code, even
+though third parties are not compelled to copy the source along with the
+object code.
+
+  5. A program that contains no derivative of any portion of the Library, but
+is designed to work with the Library by being compiled or linked with it, is
+called a "work that uses the Library". Such a work, in isolation, is not a
+derivative work of the Library, and therefore falls outside the scope of this
+License.
+
+  However, linking a "work that uses the Library" with the Library creates an
+executable that is a derivative of the Library (because it contains portions
+of the Library), rather than a "work that uses the library". The executable is
+therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file that is
+part of the Library, the object code for the work may be a derivative work of
+the Library even though the source code is not.
+Whether this is true is especially significant if the work can be linked
+without the Library, or if the work is itself a library. The threshold for
+this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data structure
+layouts and accessors, and small macros and small inline functions (ten lines
+or less in length), then the use of the object file is unrestricted,
+regardless of whether it is legally a derivative work. (Executables containing
+this object code plus portions of the Library will still fall under Section
+6.)
+
+  Otherwise, if the work is a derivative of the Library, you may distribute
+the object code for the work under the terms of Section 6. Any executables
+containing that work also fall under Section 6, whether or not they are linked
+directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also compile or link a
+"work that uses the Library" with the Library to produce a work containing
+portions of the Library, and distribute that work under terms of your choice,
+provided that the terms permit modification of the work for the customer's own
+use and reverse engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the Library
+is used in it and that the Library and its use are covered by this License.
+You must supply a copy of this License. If the work during execution displays
+copyright notices, you must include the copyright notice for the Library among
+them, as well as a reference directing the user to the copy of this License.
+Also, you must do one of these things:
+
+    a) Accompany the work with the complete corresponding machine-readable
+source code for the Library including whatever changes were used in the work
+(which must be distributed under Sections 1 and 2 above) ; and, if the work is
+an executable linked with the Library, with the complete machine-readable
+"work that uses the Library", as object code and/or source code, so that the
+user can modify the Library and then relink to produce a modified executable
+containing the modified Library. (It is understood that the user who changes
+the contents of definitions files in the Library will not necessarily be able
+to recompile the application to use the modified definitions.)
+
+    b) Accompany the work with a written offer, valid for at least three
+years, to give the same user the materials specified in Subsection 6a, above,
+for a charge no more than the cost of performing this distribution.
+
+    c) If distribution of the work is made by offering access to copy from a
+designated place, offer equivalent access to copy the above specified
+materials from the same place.
+
+    d) Verify that the user has already received a copy of these materials or
+that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the Library"
+must include any data and utility programs needed for reproducing the
+executable from it. However, as a special exception, the source code
+distributed need not include anything that is normally distributed (in either
+source or binary form) with the major components (compiler, kernel, and so on)
+of the operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+  It may happen that this requirement contradicts the license restrictions of
+other proprietary libraries that do not normally accompany the operating
+system. Such a contradiction means you cannot use both them and the Library
+together in an executable that you distribute.
+
+  7. You may place library facilities that are a work based on the Library
+side-by-side in a single library together with other library facilities not
+covered by this License, and distribute such a combined library, provided that
+the separate distribution of the work based on the Library and of the other
+library facilities is otherwise permitted, and provided that you do these two
+things:
+
+    a) Accompany the combined library with a copy of the same work based on
+the Library, uncombined with any other library facilities. This must be
+distributed under the terms of the Sections above.
+
+    b) Give prominent notice with the combined library of the fact that part
+of it is a work based on the Library, and explaining where to find the
+accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute the
+Library except as expressly provided under this License. Any attempt otherwise
+to copy, modify, sublicense, link with, or distribute the Library is void, and
+will automatically terminate your rights under this License. However, parties
+who have received copies, or rights, from you under this License will not have
+their licenses terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not signed
+it. However, nothing else grants you permission to modify or distribute the
+Library or its derivative works. These actions are prohibited by law if you do
+not accept this License. Therefore, by modifying or distributing the Library
+(or any work based on the Library), you indicate your acceptance of this
+License to do so, and all its terms and conditions for copying, distributing
+or modifying the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the original
+licensor to copy, distribute, link with or modify the Library subject to these
+terms and conditions. You may not impose any further restrictions on the
+recipients' exercise of the rights granted herein. You are not responsible for
+enforcing compliance by third parties to this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or otherwise)
+that contradict the conditions of this License, they do not excuse you from
+the conditions of this License. If you cannot distribute so as to satisfy
+simultaneously your obligations under this License and any other pertinent
+obligations, then as a consequence you may not distribute the Library at all.
+For example, if a patent license would not permit royalty-free redistribution
+of the Library by all those who receive copies directly or indirectly through
+you, then the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply, and
+the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any patents or
+other property right claims or to contest validity of any such claims; this
+section has the sole purpose of protecting the integrity of the free software
+distribution system which is implemented by public license practices. Many
+people have made generous contributions to the wide range of software
+distributed through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing to
+distribute software through any other system and a licensee cannot impose that
+choice.
+
+This section is intended to make thoroughly clear what is believed to be a
+consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in certain
+countries either by patents or by copyrighted interfaces, the original
+copyright holder who places the Library under this License may add an explicit
+geographical distribution limitation excluding those countries, so that
+distribution is permitted only in or among countries not thus excluded. In
+such case, this License incorporates the limitation as if written in the body
+of this License.
+
+  13. The Free Software Foundation may publish revised and/or new versions of
+the Library General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and "any later
+version", you have the option of following the terms and conditions either of
+that version or of any later version published by the Free Software
+Foundation. If the Library does not specify a license version number, you may
+choose any version ever published by the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free programs
+whose distribution conditions are incompatible with these, write to the author
+to ask for permission. For software which is copyrighted by the Free Software
+Foundation, write to the Free Software Foundation; we sometimes make
+exceptions for this. Our decision will be guided by the two goals of
+preserving the free status of all derivatives of our free software and of
+promoting the sharing and reuse of software generally.
+
+                NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
+THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
+STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
+LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
+PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE,
+YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO
+LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR
+THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+             END OF TERMS AND CONDITIONS
+
+-------------------
+
+ncurses:
+Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, distribute with
+modifications, sublicense, and/or sell copies of the Software, and to permit
+persons to whom the Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name(s) of the above copyright holders
+shall not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization.
+
+-------------------
+
+OpenSSL:
+OpenSSL License
+Copyright (c) 1998-2011 The OpenSSL Project.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer. 
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+3. All advertising materials mentioning features or use of this software must
+display the following acknowledgment: "This product includes software
+developed by the OpenSSL Project for use in the OpenSSL Toolkit.
+(http://www.openssl.org/)"
+
+4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+endorse or promote products derived from this software without prior written
+permission. For written permission, please contact [email protected].
+
+5. Products derived from this software may not be called "OpenSSL" nor may
+"OpenSSL" appear in their names without prior written permission of the
+OpenSSL Project.
+
+6. Redistributions of any form whatsoever must retain the following
+acknowledgment: "This product includes software developed by the OpenSSL
+Project for use in the OpenSSL Toolkit (http://www.openssl.org/)"
+
+THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY EXPRESSED
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
+EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+This product includes cryptographic software written by Eric Young
+([email protected]).  This product includes software written by Tim Hudson
+([email protected]).
+
+Original SSLeay License
+Copyright (C) 1995-1998 Eric Young ([email protected]) All rights reserved.
+
+This package is an SSL implementation written by Eric Young
+([email protected]). The implementation was written so as to conform with
+Netscapes SSL.
+
+This library is free for commercial and non-commercial use as long as the
+following conditions are aheared to.  The following conditions apply to all
+code found in this distribution, be it the RC4, RSA, lhash, DES, etc., code;
+not just the SSL code.  The SSL documentation included with this distribution
+is covered by the same copyright terms except that the holder is Tim Hudson
+([email protected]).
+
+Copyright remains Eric Young's, and as such any Copyright notices in the code
+are not to be removed. If this package is used in a product, Eric Young should
+be given attribution as the author of the parts of the library used. This can
+be in the form of a textual message at program startup or in documentation
+(online or textual) provided with the package.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+1. Redistributions of source code must retain the copyright notice, this list
+of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software must
+display the following acknowledgement: "This product includes cryptographic
+software written by Eric Young ([email protected])" The word 'cryptographic'
+can be left out if the rouines from the library being used are not
+cryptographic related :-).
+4. If you include any Windows specific code (or a derivative thereof) from the
+apps directory (application code) you must include an acknowledgement: "This
+product includes software written by Tim Hudson ([email protected])"
+
+THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
+EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+The licence and distribution terms for any publically available version or
+derivative of this code cannot be changed.  i.e. this code cannot simply be
+copied and put under another distribution licence [including the GNU Public
+Licence.]
+
+-------------------
+
+zlib:
+Acknowledgments:
+  The deflate format used by zlib was defined by Phil Katz. The deflate and
+zlib specifications were written by L. Peter Deutsch. Thanks to all the people
+who reported problems and suggested various improvements in zlib; they are too
+numerous to cite here.
+
+Copyright notice:
+ (C) 1995-2004 Jean-loup Gailly and Mark Adler
+
+  This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the
+use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+claim that you wrote the original software. If you use this software in a
+product, an acknowledgment in the product documentation would be appreciated
+but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+
+  Jean-loup Gailly        Mark Adler
+  [email protected]          [email protected]
+
+If you use the zlib library in a product, we would appreciate *not* receiving
+lengthy legal documents to sign. The sources are provided for free but without
+warranty of any kind.  The library has been entirely written by Jean-loup
+Gailly and Mark Adler; it does not include third-party code.
+
+If you redistribute modified sources, we would appreciate that you include in
+the file ChangeLog history information documenting your changes. Please read
+the FAQ for more information on the distribution of modified source versions.
+
+-------------------
+
+Intel AESNI Sample Library:
+
+Copyright (c) 2010, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors may
+be used to endorse or promote products derived from this software without
+specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Issue Date: Aug 6, 2010
+
+-------------------
+
+NOTES WRITTEN BY SOFTETHER CORPORATION
+
+Note for users of non-Windows version of PacketiX VPN: The enumerated bundle
+of License Agreements above are copies of original License Agreements of each
+library programs which PacketiX VPN uses. PacketiX VPN is not a delivered work
+from these libraries. PacketiX VPN is a separated work from the libraries, but
+it may call functions of the libraries (whether or not PacketiX VPN calls such
+functions are depended on the user's intention to link them or not on user's
+side computer). While some libraries indicate GPL or LGPL as a condition to
+re-distribute, PacketiX VPN is not license under GPL nor LGPL. Therefore, we
+took special care not to make PacketiX VPN become delivered works of any GPL
+or LGPL libraries. In order to achieve that, both PacketiX VPN and GPL/LGPL
+libraries are distributed with isolated forms (means that any program files of
+PacketiX VPN are not bound nor linked to any GPL/LGPL libraries). If a user of
+PacketiX VPN wants to link GPL/LGPL libraries by their own decisions,
+operations and responsibilities, he may do that on his computer. However, if a
+delivered work under copyright law is created as a result of such an
+operation, such a delivered work must not re-distributed to other people,
+because it may violate GPL/LGPL libraries' conditions.
+
+Note for users of Windows version of PacketiX VPN: For technical reason, the
+above texts are exactly same as a file which is also contained on the
+non-Windows version of PacketiX VPN. Actually, the Windows version of PacketiX
+VPN has no relations to any GPL/LGPL libraries enumerated above.
+
+SoftEther Corporation provides source codes of some GPL/LGPL/other libraries
+listed above on its web server. Anyone can download, use and re-distribute
+them under individual licenses which are contained on each archive file,
+available from the following URL:
+http://uploader.softether.co.jp/src/
+

+ 523 - 0
WARNING.TXT

@@ -0,0 +1,523 @@
+THE IMPORTANT NOTICES ABOUT SOFTETHER VPN
+
+FUNCTIONS OF VPN COMMUNICATIONS EMBEDDED ON THIS SOFTWARE ARE VERY POWERFUL
+THAN EVER. THIS STRONG VPN ABILITY WILL BRING YOU HUGE BENEFITS. HOWEVER, IF
+YOU MISUSE THIS SOFTWARE, IT MIGHT DAMAGES YOURSELF. IN ORDER TO AVOID SUCH
+RISKS, THIS DOCUMENT ACCOUNTS IMPORTANT NOTICES FOR CUSTOMERS WHO ARE WILLING
+TO USE THIS SOFTWARE. THE FOLLOWING INSTRUCTIONS ARE VERY IMPORTANT. READ AND
+UNDERSTAND IT CAREFULLY. ADDITIONALLY, IF YOU ARE PLANNING TO USE THE DYNAMIC
+DNS, THE NAT TRAVERSAL OR THE VPN AZURE FUNCTIONS, READ THE SECTION 3.5
+CAREFULLY. THESE FUNCTIONS ARE FREE SERVICES PROVIDED VIA THE INTERNET, ARE
+NOT GUARANTEED, AND ARE NOT INTENDED TO BE USED FOR BUSINESS OR COMMERCIAL
+USE. DO NOT USE THESE SERVICES FOR YOUR BUSINESS OR COMMERCIAL USE.
+
+
+1. VPN Communication Protocols
+1.1. SoftEther VPN Protocol
+SoftEther VPN can perform VPN communication. Unlike traditional VPN protocols,
+SoftEther VPN has an implementation of the newly-designed "SoftEther VPN
+Protocol (SE-VPN Protocol)" . SE-VPN protocol encapsulates any Ethernet
+packets into a HTTPS (HTTP over SSL) connection. Therefore SE-VPN protocol can
+communicate beyond firewalls even if the firewall is configured to block
+traditional VPN packets by network administrator. SE-VPN protocol is designed
+and implemented to comply TLS 1.0 (RFC 5246) and HTTPS (RFC 2818). However, it
+sometimes have different behavior to RFCs. If you are a network administrator
+and want to block SE-VPN protocols on the firewall, you can adopt a
+"white-list" policy on the firewall to filter any TCP or UDP packets on the
+border except explicitly allowed packets towards specific web sites and
+servers.
+
+1.2. NAT Traversal Function
+Generally, if you use traditional VPN systems you have to request a network
+administrator to make the NAT or firewall to "open" or "relay" specific TCP or
+UDP ports. However, there are demands somehow to eliminate such working costs
+on network administrators. In order to satisfy such demands, SoftEther VPN has
+the newly-implemented "NAT Traversal" function. NAT Traversal is enabled by
+default. A SoftEther VPN Server running on the computer behind NAT or firewall
+can accept VPN connections from the Internet, without any special
+configurations on firewalls or NATs. If you want to disable the NAT Traversal
+function, modify the "DisableNatTraversal" to "true" on the configuration file
+of SoftEther VPN Server. In order to disable it on the client-side, append
+"/tcp" suffix on the destination hostname.
+
+1.3. Dynamic DNS Function
+Traditional legacy VPN system requires a static global IP address on the VPN
+server. In consideration of shortage of global IP addresses, SoftEther
+Corporation implements the "Dynamic DNS Function" on SoftEther VPN Server.
+Dynamic DNS is enabled by default. Dynamic DNS function notify the current
+global IP address of the PC to the Dynamic DNS Servers which are operated by
+SoftEther Corporation. A globally-unique hostname (FQDN) such as
+"abc.softether.net" ( "abc" varies as unique per a user) will be assigned on
+the VPN Server. If you tell this unique hostname to a VPN user, the user can
+specify it as the destination VPN Sever hostname on the VPN Client and will be
+able to connect the VPN Server. No IP addresses are required to know
+beforehand. If the IP address of the VPN Server varies, the registered IP
+address related to the hostname of Dynamic DNS service will be changed
+automatically. By this mechanism, no longer need a static global IP address
+which costs monthly to ISPs. You can use consumer-level inexpensive Internet
+connection with dynamic IP address in order to operate an enterprise-level VPN
+system. If you want to disable Dynamic DNS, specify "true" on the "Disabled"
+items of the "DDnsClient" directive on the SoftEther VPN Server configuration
+file. * Note for residents in People's Republic of China: If your VPN Server
+is running on the People's Republic of China, the DNS suffix will be replaced
+to "sedns.cn" domain. The "sedns.cn" domain is the service possessed and
+operated by "Beijing Daiyuu SoftEther Technology Co., Ltd" which is a
+Chinese-local enterprise.
+
+1.4. VPN over ICMP / VPN over DNS functions
+If you want to make a VPN connection between SoftEther VPN Client / Bridge and
+SoftEther VPN Server, but if TCP and UDP packets are prohibited by the
+firewall, then you can encapsulates payloads into "ICMP" (as known as Ping) or
+"DNS" packets. This function can realize a VPN connection by using ICMP or DNS
+even if the firewall or router blocks every TCP or UDP connections. VPN over
+ICMP / VPN over DNS functions are designed to comply standard ICMP and DNS
+specifications as possible, however it sometimes has a behavior not to fully
+comply them. Therefore, few poor-quality routers may be caused a
+memory-overflow or something troubles when a lot of ICMP or DNS packets are
+passed, and such routers sometimes freezes or reboots. It might affects other
+users on the same network. To avoid such risks, append the suffix "/tcp" on
+the destination hostname which is specified on the VPN-client side to disable
+VPN over ICMP / DNS functions.
+
+1.5. VPN Azure Cloud Service
+If your SoftEther VPN Server is placed behind the NAT or firwall, and by some
+reason you cannot use NAT Traversal function, Dynamic DNS function or VPN over
+ICMP/DNS function, you can use VPN Azure Clouse Service. SoftEther Corporation
+operates VPN Azure Cloud on Internet. After the VPN Server makes a connection
+to the VPN Azure Cloud, the hostname "abc.vpnazure.net" ( "abc" is a unique
+hostname) can be specified to connect to the VPN Server via the VPN Azure
+Cloud. Practically, such a hostname is pointing a global IP address of one of
+cloud servers which are operated by SoftEther Corporation. If A VPN Client
+connects to such a VPN Azure host, then the VPN Azure host will relay all
+traffics between the VPN Client and the VPN Server. VPN Azure is disabled by
+default. You can activate it easily by using VPN Server Configuration Tool.
+
+1.6. UDP Acceleration
+SoftEther VPN has the UDP Acceleration Function. If a VPN consists of two
+sites detects that UDP channel can be established, UDP will be automatically
+used. By this function, throughput of UDP increases. If direct UDP channel can
+be established, direct UDP packets will be used. However, if there is
+something obstacles such as firewalls or NATs, the "UDP Hole Punching"
+technology will be used, instead. The "UDP Hole Punching" uses the cloud
+servers which SoftEther Corporation operates on Internet. UDP Acceleration can
+be disabled anytime by setting up so on the VPN-client side.
+
+
+2. VPN Software
+2.1. SoftEther VPN Client
+If you use SoftEther VPN Client on Windows, the Virtual Network Adapter device
+driver will be installed on Windows. The Virtual Network Adapter is
+implemented as a kernel-mode driver for Windows. The driver is
+digitally-signed by a certificate issued by VeriSign, Inc. and also sub-signed
+by Symantec Corporation. A message to ask you want to sure install the driver
+might be popped up on the screen. SoftEther VPN Client may response the
+message if possible. SoftEther VPN Client also optimizes the configuration of
+MMCSS (Multimedia Class Scheduler Service) on Windows. You can undo the
+optimizations of MMCSS afterwards.
+
+2.2. SoftEther VPN Server / Bridge
+If you use SoftEther VPN Server / Bridge on Windows with "Local Bridge"
+functions, you have to install the low-level Ethernet packet processing driver
+on the computer. The driver is digitally-signed by a certificate issued by
+VeriSign, Inc. and also sub-signed by Symantec Corporation. SoftEther VPN
+Server / Bridge may disable the TCP/IP offloading features on the physical
+network adapter for Local Bridge function. In Windows Vista / 2008 or greater
+version, VPN Server may inject a packet-filter driver which complies Windows
+Filter Platform (WPF) specification into the kernel in order to provide IPsec
+function. The packet-filter driver will be loaded available only if IPsec
+function is enabled. Once you enables IPsec function of SoftEther VPN Server,
+the built-in IPsec function of Windows will be disabled. After you disabled
+IPsec function of SoftEther VPN Server, then the built-in IPsec function of
+Windows will revive. In order to provide the Local Bridge function, SoftEther
+VPN Server / Bridge disables the TCP/IP offloading function on the operating
+system.
+
+2.3. User-mode Installation
+You can install SoftEther VPN Server and SoftEther VPN Bridge as "User-mode"
+on Windows. In other words, even if you don't have Windows system
+administrator's privileges, you can install SoftEther VPN as a normal user.
+User-mode install will disable a few functions, however other most functions
+work well. Therefore, for example, an employee can install SoftEther VPN
+Server on the computer in the office network, and he will be able to connect
+to the server from his home. In order to realize such a system by user-self,
+no system administrative privileges are required in the view-point of
+technical. However, breaking rules of the company to install software on the
+computer without authority might be regarded as an unfavorable behavior. If
+you are an employee and belong to the company, and the company-policy
+prohibits installing software or making communications towards Internet
+without permission, you have to obtain a permission from the network
+administrator or the executive officer of your company in advance to install
+SoftEther VPN. If you install VPN Server / Bridge as User-mode, an icon will
+be appeared on the Windows task-tray. If you feel that the icon disturbs you,
+you can hide it by your operation. However, you must not exploit this hiding
+function to install VPN Server on other person's computer as a spyware. Such
+behavior might be an offence against the criminal law.
+
+2.4. Keep Alive Function
+SoftEther VPN Server and SoftEther VPN Bridge has Keep Alive Function by
+default. The purpose of this function is to sustain the Internet line active.
+The function transmits UDP packets with a random-byte-array-payload
+periodically. This function is useful to avoid automatic disconnection on
+mobile or dial-up connections. You can disable Keep Alive Function anytime.
+
+2.5. Uninstallation
+The uninstallation process of SoftEther VPN software will delete all program
+files. However, non-program files (such as files and data which are generated
+by running of programs) ) will not be deleted. For technical reason, the exe
+and resource files of uninstaller might remain. Such remaining files never
+affects to use the computer, however you can delete it manually. Kernel-mode
+drivers might not be deleted, however such drivers will not be loaded after
+the next boot of Windows. You can use "sc" command of Windows to delete
+kernel-mode drivers manually.
+
+2.6. Security
+You should set the administrator's password on SoftEther VPN Server / Bridge
+after installation. If you neglect to do it, another person can access to
+SoftEther VPN Server / Bridge and can set the password without your
+permission. This caution might be also applied on SoftEther VPN Client for
+Linux.
+
+2.7. Automatic Update Notification
+SoftEther VPN software for Windows has an automatic update notification
+function. It accesses to the SoftEther Update server periodically to check
+whether or not the latest version of software is released. If the latest
+version is released, the notification message will be popped up on the screen.
+In order to achieve this purpose, the version, language settings, the unique
+identifier, the IP address of your computer and the hostname of VPN Server
+which is connected to will be sent to the SoftEther Update server. No personal
+information will be sent. Automatic Update Notification is enabled by default,
+however you can disable it on the configuration screen. The setting whether
+turned on or turned off will be saved individually corresponding to each
+destination VPN server, by VPN Server Manager.
+
+2.8. Virtual NAT Function
+A Virtual Hub on SoftEther VPN Server / Bridge has "Virtual NAT Function" .
+Virtual NAT Function can share a single IP address on the physical network by
+multiple private IP address of VPN Clients. There are two operation mode of
+Virtual NAT: User-mode and Kernel-mode. In the user-mode operation, Virtual
+NAT shares an IP address which is assigned on the host operating system.
+Unlike user-mode, the kernel-mode operation attempts to find DHCP servers on
+the physical network. If there are two or more physical networks, a DHCP
+server will be sought automatically for each segments serially. If a DHCP
+server found, and an IP address is acquired, the IP address will be used by
+the Virtual NAT. In this case, an IP entry as a DHCP client will be registered
+on the IP pool of the physical DHCP Server. The physical default gateway and
+the DNS server will be used by the Virtual NAT in order to communicate with
+hosts in Internet. In kernel-mode operation, a Virtual Hub has a virtual MAC
+address which is operating on the physical Ethernet segment. In order to check
+the connectivity to Internet, SoftEther VPN periodically sends DNS query
+packet to resolve the IP address of host "www.yahoo.com" or "www.baidu.com" ,
+and attempts to connect to the TCP port 80 of such a resulted IP address for
+connectivity check.
+
+2.9. Unattended Installation of Kernel-mode Components
+When SoftEther VPN will detect a necessity to install the kernel-mode
+components on Windows, a confirmation message will be appeared by Windows
+system. In this occasion, SoftEther VPN software will switch to the Unattended
+Installation mode in order to respond "Yes" to Windows. This is a solution to
+prevent dead-locks when a remote-administration is performed from remote
+place.
+
+2.10. Windows Firewall
+SoftEther VPN software will register itself as a safe-program. Such an entry
+will be remain after the uninstallation. You can remove it manually from the
+Control Panel of Windows.
+
+
+3. Internet Services
+3.1. Internet Services which are provided by SoftEther Corporation
+SoftEther Corporation provides Dynamic DNS, NAT Traversal and VPN Azure server
+services on the Internet. These services are free of charge. Customers can
+access to the services by using SoftEther VPN software, via Internet. These
+service will be planned to be available from Open-Source version of "SoftEther
+VPN" which will be released in the future.
+
+3.2. Sent Information and Privacy Protection
+SoftEther VPN software may send an IP address, hostname, the version of VPN
+software on the customer's computer to the cloud service operated by SoftEther
+Corporation, in order to use the above services. These sending of information
+are minimal necessary to use the services. No personal information will be
+sent. SoftEther Corporation records log files of the cloud service servers for
+90 days at least with the received information. Such logs will be used for
+troubleshooting and other legitimate activities. SoftEther Corporation may
+provide logs to a public servant of Japanese government who are belonging to
+courts, police stations and the prosecutor's office, in order to comply such
+authorities' order. (Every Japanese public servants are liable by law to keep
+the information close.) Moreover, the IP addresses or other information will
+be processed statistically and provided to the public, not to expose the each
+concrete IP address, in order to release the release of research activities.
+
+3.3. Communication Data via VPN Azure Service
+Regardless of the above 3.2 rule, if the customer sends or receives VPN
+packets using VPN Azure Cloud Service, the actual payloads will stored and
+forwarded via the volatile memory of the servers for very short period. Such a
+behavior is naturally needed to provide the "VPN relay service" . No payloads
+will be recorded on "fixed" storages such as hard-drives. However, the
+"Wiretapping for Criminals Procedures Act" (The 137th legislation ruled on
+August 18, 1999 in Japan) requires telecommunication companies to allow the
+Japanese government authority to conduct a wire-tapping on the line. VPN Azure
+Servers which are physically placed on Japan are subjects of this law.
+
+3.4. Comply to Japanese Telecommunication Laws
+SoftEther Corporation complies with Japanese Telecommunication Laws as
+necessary to provide online services via Internet.
+
+3.5. Free and Academic Experiment Services
+SoftEther provides Dynamic DNS, NAT Traversal and VPN Azure as academic
+experiment services. Therefore, there services can be used for free of charge.
+These services are not parts of "SoftEther VPN Software Products" . These
+services are provided without any warranty. The services may be suspended or
+discontinued by technical or operational matters. In such occasions, users
+will not be able to use the services. A user have to understand such risks,
+and to acknowledge that such risks are borne by a user-self. SoftEther will
+never be liable to results or damages of use or unable-to-use of the service.
+Even if the user has already paid the license-fee of the commercial version of
+SoftEther VPN, such paid fees don't include any fees of these services.
+Therefore, if the online services will stop or be discontinued, no refunds or
+recoveries of damages will be provided by SoftEther Corporation.
+
+3.6. DNS Proxy Cloud Servers
+In some regions, when a user uses Internet, a DNS query sometimes broken or
+lost when it is passing through the ISP line. If SoftEther VPN Server, Client
+or Bridge detects a possibility that the accessing to the actual VPN server
+might be unstable, then DNS queries will be also transferred to the DNS proxy
+cloud servers which are operated by SoftEther Corporation. A DNS proxy cloud
+server will respond DNS queries with answering correct a IP address.
+
+
+4. General Cautions
+4.1. Needs an Approval from Network Administrator
+SoftEther VPN has powerful functions which don't require special settings by
+network administrators. For example, you need not to ask the administrator to
+configure the existing firewall in order to "open" a TCP/UDP port. Such
+characteristic features are for the purpose to eliminate working times and
+costs of network administrators, and avoid misconfiguration-risks around the
+tasks to open specific exception ports on the firewall. However, any employees
+belong to the company have to obtain an approval from the network
+administrator before installs SoftEther VPN. If your network administrator
+neglects to provide such an approval, you can consider to take an approval
+from an upper authority. (For example, executive officer of the company.) If
+you use SoftEther VPN without any approvals from the authority of your
+company, you might have disadvantage. SoftEther Corporation will be never
+liable for results or damages of using SoftEther VPN.
+
+4.2. Observe Laws of Your Country
+If your country's law prohibits the use of encryption, you have to disable the
+encryption function of SoftEther VPN by yourself. Similarly, in some countries
+or regions, some functions of SoftEther VPN might be prohibited to use by
+laws. Other countries' laws are none of SoftEther Corporation's concern
+because SoftEther Corporation is an enterprise which is located and registered
+in Japan physically. For example, there might be a risk that a part of
+SoftEther VPN conflicts an existing patent which is valid only on the specific
+region. SoftEther Corporation has no interests in such specific region outside
+Japan's territory. Therefore, if you want to use SoftEther VPN in regions
+outside Japan, you have to be careful not to violate third-person's rights.
+You have to verify the legitimacy of the use of SoftEther VPN in the specific
+region before you actually use it in such region. By nature, there are almost
+200 countries in the World, and each country's law is different each other. It
+is practically impossible to verify every countries' laws and regulations and
+make the software comply with all countries' laws in advance to release the
+software. Therefore SoftEther Corporation has verified the legitimacy of
+SoftEther VPN against the laws and regulations of only Japan. If a user uses
+SoftEther VPN in a specific country, and damaged by public servants of the
+government authority, SoftEther Corporation will never be liable to recover or
+compensate such damages or criminal responsibilities.
+
+
+5. VPN Gate Academic Experiment Project
+(This chapter applies only on SoftEther VPN software package which contains
+the extension plug-in for VPN Gate Academic Experiment Project.)
+5.1. About VPN Gate Academic Experiment Project
+VPN Gate Academic Experiment Project is an online service operated for just
+the academic research purpose at the graduate school of University of Tsukuba,
+Japan. The purpose of this research is to expend our knowledge about the
+"Global Distributed Public VPN Relay Server" (GDPVRS) technology. For details,
+please visit http://www.vpngate.net/.
+
+5.2. About VPN Gate Service
+SoftEther VPN Server and SoftEther VPN Client may contain "VPN Gate Service"
+program. However, VPN Gate Service is disabled by default.
+VPN Gate Service should be activated and enabled by the voluntary intention of
+the owner of the computer which SoftEther VPN Server or SoftEther VPN Client
+is installed on. After you activate VPN Gate Service, the computer will be
+start to serve as a part of the Global Distributed Public VPN Relay Servers.
+The IP address, hostname and related information of the computer will be sent
+and registered to the directory server of VPN Gate Academic Experiment
+Project, and they will be published and disclosed to the public. This
+mechanism will allow any VPN Gate Client software's user to connect to the VPN
+Gate Service running on your computer. While the VPN session between a VPN
+Gate Client and your VPN Gate Service is established, the VPN Gate Client's
+user can send/receive any IP packets towards the Internet via the VPN Gate
+Service. The global IP address of the VPN Gate Service's hosing computer will
+be used as the source IP address of such communications which a VPN Gate
+Client initiates.
+VPN Gate Service will send some information to the VPN Gate Academic
+Experiment Service Directory Server. The information includes the operator's
+information which described in section 5.5, logging settings, uptime,
+operating system version, type of protocol, port numbers, quality information,
+statistical information, VPN Gate clients' log history data (includes dates,
+IP addresses, version numbers and IDs) and the version of the software. These
+information will be exposed on the directory. VPN Gate Service also receives a
+key for encoding which is described on the chapter 5.9 from the directory
+server.
+
+5.3. Details of VPN Gate Service's Behavior
+If you enable VPN Gate Service manually, which is disabled by default, the
+"VPNGATE" Virtual Hub will be created on the SoftEther VPN Server. If you are
+using SoftEther VPN Client and attempt to active VPN Gate Service on it, an
+equivalent program to SoftEther VPN Server will be invoked on the same process
+of SoftEther VPN Client, and the "VPNGATE" Virtual Hub will be created. The
+"VPNGATE" Virtual Hub contains a user named "VPN" by default which permits
+anyone on the Internet to make a VPN connection to the Virtual Hub. Once a VPN
+Client connects to the "VPNGATE" Virtual Hub, any communication between the
+user and the Internet will pass through the Virtual Hub, and
+transmitted/received using the physical network interface on the computer
+which SoftEther VPN Server (or SoftEther VPN Client) is running on. This will
+cause the result that a destination host specified by the VPN Client will
+identify that the source of the communication has initiated from the VPN Gate
+Service's hosting computer's IP address. However, for safety, any packets
+which destinations are within 192.168.0.0/255.255.0.0, 172.16.0.0/255.240.0.0
+or 10.0.0.0/255.0.0.0 will be blocked by the "VPNGATE" Virtual Hub in order to
+protect your local network. Therefore, if you run VPN Gate Service on your
+corporate network or private network, it is safe because anonymous VPN Client
+users will not be permitted to access such private networks. VPN Gate Service
+also serves as relay for accessing to the VPN Gate Directory Server.
+In order to make VPN Gate Service familiar with firewalls and NATs, it opens
+an UDP port by using the NAT Traversal function which is described on the
+section 1.2. It also opens and listens on some TCP ports, and some TCP and UDP
+ports will be specified as the target port of Universal Plug and Play (UPnP)
+Port Transfer entries which are requested to your local routers. UPnP request
+packets will be sent periodically. Some routers keep such an opened TCP/UDP
+port permanently on the device. If you wish to close them, do it manually.
+VPN Gate Service also provides the mirror-site function for www.vpngate.net.
+This is a mechanism that a copy of the latest contents from www.vpngate.net
+will be hosted by the mirror-site tiny HTTP server which is running on the VPN
+Gate Service program. It will register itself on the mirror-sites list in
+www.vpngate.net. However, it never relays any other communications which are
+not towards www.vpngate.net.
+
+5.4. Communication between Internet via VPN Gate Service
+VPN Gate Service provides a routing between users and the Internet, by using
+the Virtual NAT Function which is described on the section 2.8. VPN Gate
+Service sends polling Ping packets to the server which is located on
+University of Tsukuba, and the Google Public DNS Server which is identified as
+8.8.8.8, in order to check the latest quality of your Internet line. VPN Gate
+Service also sends and receives a lot of random packets to/from the Speed Test
+Server on University of Tsukuba. These quality data will be reported to VPN
+Gate Directory Server, automatically and periodically. The result will be
+saved and disclosed to the public. These periodical polling communication are
+adjusted not to occupy the Internet line, however in some circumstances they
+might occupy the line.
+
+5.5. Operator's Information of VPN Gate Service
+If you activate VPN Gate Service on your computer, the computer will be a part
+of the Global Distributed Public VPN Relay Servers. Therefore, the Operator's
+administrative information of your VPN Gate Service should be reported and
+registered on the VPN Gate Service Directory. Operator's information contains
+the name of the operator and the abuse-reporting contact e-mail address. These
+information can be inputted on the screen if the VPN Gate configuration.
+Inputted information will be transmitted to the VPN Gate Directory Server,
+stored and disclosed to the public. So you have to be careful to input
+information. By the way, until you specify something as the operator's
+information, the computer's hostname will be used automatically as the field
+of the name of the operator, by appending the "'s owner" string after the
+hostname.
+
+5.6. Observe Laws to Operate VPN Gate Service
+In some countries or regions, a user who is planning to activate and operate
+VPN Gate Service, he are mandated to obtain a license or register a service
+from/to the government. If your region has such a regulation, you must fulfill
+mandated process before activating VPN Gate Service in advance. Neither the
+developers nor operators of the VPN Gate Academic Experiment Project will be
+liable for legal/criminal responsibilities or damages which are occurred from
+failure to comply your local laws.
+
+5.7. Protect Privacy of Communication
+Most of countries have a law which requires communication service's operators,
+including VPN Gate Service operators, to protect the privacy of communication
+of third-persons. When you operate VPN Gate Service, you must always protect
+user's privacy.
+
+5.8. Packet Logs
+The packet logging function is implemented on VPN Gate Service. It records
+essential headers of major TCP/IP packets which are transmitted via the
+Virtual Hub. This function will be helpful to investigate the "original IP
+address" of the initiator of communication who was a connected user of your
+VPN Gate Service, by checking the packet logs and the connection logs. The
+packet logs are recorded only for such legitimate investigates purpose. Do not
+peek nor leak packet logs except the rightful purpose. Such act will be
+violate the section 5.7.
+
+5.9. Packet Logs Automatic Archiving and Encoding Function
+The VPN Gate Academic Experiment Service is operated and running under the
+Japanese constitution and laws. The Japanese constitution laws demand strictly
+protection over the privacy of communication. Because this service is under
+Japanese rules, the program of VPN Gate Service implements this "Automatic Log
+File Encoding" protection mechanism, and enabled by default.
+The VPN Gate Service is currently configured to encode packet log files which
+has passed two or more weeks automatically, by default. In order to protect
+privacy of communication, if a packet log file is once encoded, even the
+administrator of the local computer cannot censor the packet log file. This
+mechanism protects privacy of end-users of VPN Gate Service.
+You can change the VPN Gate Service setting to disable this automatic encoding
+function. Then packet log files will never be encoded even after two weeks
+passed. In such a configuration, all packet logs will remain as plain-text on
+the disk. Therefore you have to take care not to violate user's privacy.
+If you are liable to decode an encoded packet log files (for example: a VPN
+Gate Service's user illegally abused your VPN Gate Service and you have to
+decode the packet logs in order to comply the laws), contact the administrator
+of the VPN Gate Academic Experiment Service at Graduate School of University
+of Tsukuba, Japan. You can find the contact address at
+http://www.vpngate.net/. The administrator of VPN Gate Service will respond to
+decode the packet logs if there is an appropriate and legal request from court
+or other judicial authorities, according to laws.
+
+5.10. Caution if You Operate VPN Gate Service in the Japan's Territories
+When a user operates VPN Gate Service in the Japan's territories, such an act
+may be regulated under the Japanese Telecommunication Laws if the operation is
+a subject to the law. However, in such a circumstance, according to the
+"Japanese Telecommunication Business Compete Manual [supplemental version]" ,
+non- profitable operations of communications are not identified as a
+"telecommunication business" . So usual operators of VPN Gate Service are not
+subjects to "telecommunication business operators" , and not be mandated to
+register to the government. Even so, legalities to protect the privacy of
+communication still imposed. As a conclusion, if you operate VPN Gate Service
+in the Japan's Territories, you must not leak the secrets of communications
+which are transmitted via your operating VPN Gate Service.
+
+5.11. VPN Gate Client
+If SoftEther VPN Client contains the VPN Gate Client plug-in, you can use it
+to obtain the list of current operating VPN Gate Service servers in the
+Internet, and make a VPN connection to a specific server on the list.
+VPN Gate Client always keeps the latest list of the VPN Gate Services
+periodically. Be careful if you are using a pay-per-use Internet line.
+When you start the VPN Gate Client software, the screen which asks you
+activate or not VPN Gate Service will be appeared. For details of VPN Gate
+Service, read the above sections.
+
+5.12. Caution before Joining or Exploiting VPN Gate Academic Experiment
+Project
+The VPN Gate Academic Experiment Service is operated as a research project at
+the graduate school on University of Tsukuba, Japan. The service is governed
+under the Japanese laws. Other countries' laws are none of our concerns nor
+responsibilities.
+By nature, there are almost 200 countries in the World, with different laws.
+It is impossible to verify every countries' laws and regulations and make the
+software comply with all countries' laws in advance to release the software.
+If a user uses VPN Gate service in a specific country, and damaged by public
+servants of the authority, the developer of either the service or software
+will never be liable to recover or compensate such damages or criminal
+responsibilities.
+By using this software and service, the user must observe all concerned laws
+and rules with user's own responsibility. The user will be completely liable
+to any damages and responsibilities which are results of using this software
+and service, regardless of either inside or outside of Japan's territory.
+If you don't agree nor understand the above warnings, do not use any of VPN
+Gate Academic Experiment Service functions.
+VPN Gate is a research project for just academic purpose only. VPN Gate was
+developed as a plug-in for SoftEther VPN and UT-VPN. However, all parts of VPN
+Gate were developed on this research project at University of Tsukuba. Any
+parts of VPN Gate are not developed by SoftEther Corporation. The VPN Gate
+Research Project is not a subject to be led, operated, promoted nor guaranteed
+by SoftEther Corporation.
+

+ 2 - 0
configure

@@ -9,6 +9,8 @@ echo
 echo 'This program is free software; you can redistribute it and/or'
 echo 'modify it under the terms of the GNU General Public License'
 echo 'version 2 as published by the Free Software Foundation.'
+echo
+echo 'Read and understand README.TXT, LICENSE.TXT and WARNING.TXT before use.'
 echo '---------------------------------------------------------------------'
 echo
 

+ 37 - 4
src/BuildUtil/BuildUtil.csproj

@@ -45,13 +45,10 @@
     <UseVSHostingProcess>false</UseVSHostingProcess>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="CoreUtil, Version=1.1.4781.28908, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>.\CoreUtil.dll</HintPath>
-    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Configuration" />
     <Reference Include="System.Data" />
+    <Reference Include="System.DirectoryServices" />
     <Reference Include="System.Drawing" />
     <Reference Include="System.EnterpriseServices" />
     <Reference Include="System.Runtime.Serialization.Formatters.Soap" />
@@ -65,9 +62,39 @@
     <Compile Include="BuildUtilCommands.cs" />
     <Compile Include="BuildUtilMain.cs" />
     <Compile Include="CodeSign.cs" />
+    <Compile Include="CoreUtil\Bmp.cs" />
+    <Compile Include="CoreUtil\Buf.cs" />
+    <Compile Include="CoreUtil\Cache.cs" />
+    <Compile Include="CoreUtil\Compress.cs" />
+    <Compile Include="CoreUtil\Console.cs" />
+    <Compile Include="CoreUtil\Csv.cs" />
+    <Compile Include="CoreUtil\Env.cs" />
+    <Compile Include="CoreUtil\FileIO.cs" />
+    <Compile Include="CoreUtil\GZip.cs" />
+    <Compile Include="CoreUtil\Kernel.cs" />
+    <Compile Include="CoreUtil\MultiLang.cs" />
+    <Compile Include="CoreUtil\Packer.cs" />
+    <Compile Include="CoreUtil\RC4.cs" />
+    <Compile Include="CoreUtil\ReadIni.cs" />
+    <Compile Include="CoreUtil\Reg.cs" />
+    <Compile Include="CoreUtil\Secure.cs" />
+    <Compile Include="CoreUtil\Stb.cs" />
+    <Compile Include="CoreUtil\Str.cs" />
+    <Compile Include="CoreUtil\Tar.cs" />
+    <Compile Include="CoreUtil\Thread.cs" />
+    <Compile Include="CoreUtil\Time.cs" />
+    <Compile Include="CoreUtil\Util.cs" />
+    <Compile Include="CoreUtil\Win32.cs" />
+    <Compile Include="CoreUtil\Zip.cs" />
+    <Compile Include="CoreUtil\ZLib.cs" />
     
     <Compile Include="PEUtil.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
     <Compile Include="Properties\Settings.Designer.cs">
       <AutoGen>True</AutoGen>
       <DesignTimeSharedInput>True</DesignTimeSharedInput>
@@ -167,6 +194,12 @@
       <Install>false</Install>
     </BootstrapperPackage>
   </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+    </EmbeddedResource>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.

+ 1 - 1
src/BuildUtil/BuildUtilMain.cs

@@ -147,7 +147,7 @@ namespace BuildUtil
 		public static int BuildUtil(ConsoleService c, string cmdName, string str)
 		{
 			Con.WriteLine("");
-			Con.WriteLine("Copyright (c) SoftEther Corporation. All Rights Reserved.");
+			Con.WriteLine("Copyright (c) SoftEther VPN Project. All Rights Reserved.");
 			Con.WriteLine("");
 
 			ConsoleParam[] args =

BIN
src/BuildUtil/CoreUtil.dll


+ 188 - 0
src/BuildUtil/CoreUtil/Bmp.cs

@@ -0,0 +1,188 @@
+// CoreUtil
+// 
+// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved.
+// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved.
+// Comments: Tetsuo Sugiyama, Ph.D.
+// 
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// version 2 as published by the Free Software Foundation.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License version 2
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// 
+// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE
+// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE.
+// 
+// 
+// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN,
+// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY,
+// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS
+// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS
+// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER
+// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL
+// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING,
+// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR
+// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
+// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO
+// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO,
+// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION
+// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN
+// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE.
+// 
+// USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS
+// SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
+// PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
+// COUNTRIES MIGHT BE RESTRICTED.
+// 
+// 
+// DEAR SECURITY EXPERTS
+// ---------------------
+// 
+// If you find a bug or a security vulnerability please kindly inform us
+// about the problem immediately so that we can fix the security problem
+// to protect a lot of users around the world as soon as possible.
+// 
+// Our e-mail address for security reports is:
+// softether-vpn-security [at] softether.org
+// 
+// Please note that the above e-mail address is not a technical support
+// inquiry address. If you need technical assistance, please visit
+// http://www.softether.org/ and ask your question on the users forum.
+// 
+// Thank you for your cooperation.
+
+
+using System;
+using System.Threading;
+using System.Data;
+using System.Data.Sql;
+using System.Data.SqlClient;
+using System.Data.SqlTypes;
+using System.Text;
+using System.Configuration;
+using System.Collections;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using System.IO;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Drawing.Drawing2D;
+using System.Diagnostics;
+using System.Web.Mail;
+using System.Net;
+using System.Net.Sockets;
+using System.Net.NetworkInformation;
+using System.Runtime.InteropServices;
+
+namespace CoreUtil
+{
+	public static class Bmp
+	{
+		public static Bitmap Load(string filename)
+		{
+			return Load(IO.ReadFile(filename));
+		}
+		public static Bitmap Load(byte[] data)
+		{
+			MemoryStream ms = new MemoryStream();
+			ms.Write(data, 0, data.Length);
+			ms.Seek(0, SeekOrigin.Begin);
+
+			return new Bitmap(ms);
+		}
+
+		public static void SaveAsBitmap(Bitmap bmp, string filename)
+		{
+			IO.SaveFile(filename, SaveAsBitmap(bmp));
+		}
+		public static byte[] SaveAsBitmap(Bitmap bmp)
+		{
+			MemoryStream ms = new MemoryStream();
+
+			bmp.Save(ms, ImageFormat.Bmp);
+
+			return ms.ToArray();
+		}
+
+		public static void SaveAsJpeg(Bitmap bmp, string filename)
+		{
+			IO.SaveFile(filename, SaveAsJpeg(bmp));
+		}
+		public static byte[] SaveAsJpeg(Bitmap bmp)
+		{
+			return SaveAsJpeg(bmp, 100);
+		}
+		public static void SaveAsJpeg(Bitmap bmp, string filename, int quality)
+		{
+			IO.SaveFile(filename, SaveAsJpeg(bmp, quality));
+		}
+		public static byte[] SaveAsJpeg(Bitmap bmp, int quality)
+		{
+			EncoderParameters eps = new EncoderParameters(1);
+			EncoderParameter ep = new EncoderParameter(System.Drawing.Imaging.Encoder.Quality, quality);
+			eps.Param[0] = ep;
+
+			ImageCodecInfo info = getEncoderInfo("image/jpeg");
+
+			MemoryStream ms = new MemoryStream();
+			bmp.Save(ms, info, eps);
+
+			return ms.ToArray();
+		}
+
+		static ImageCodecInfo getEncoderInfo(string type)
+		{
+			ImageCodecInfo[] encs = ImageCodecInfo.GetImageEncoders();
+
+			foreach (ImageCodecInfo enc in encs)
+			{
+				if (Str.StrCmpi(enc.MimeType, type))
+				{
+					return enc;
+				}
+			}
+
+			return null;
+		}
+
+		public static Bitmap ResizeBitmap(Bitmap bmp, int width, int height)
+		{
+			Bitmap dst = new Bitmap(width, height, PixelFormat.Format24bppRgb);
+			Graphics g = Graphics.FromImage(dst);
+			g.SmoothingMode = SmoothingMode.HighQuality;
+			g.InterpolationMode = InterpolationMode.HighQualityBicubic;
+
+			Rectangle r = new Rectangle(0, 0, width, height);
+
+			g.DrawImage(bmp, r);
+
+			return dst;
+		}
+	}
+}
+
+// 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/

+ 673 - 0
src/BuildUtil/CoreUtil/Buf.cs

@@ -0,0 +1,673 @@
+// CoreUtil
+// 
+// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved.
+// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved.
+// Comments: Tetsuo Sugiyama, Ph.D.
+// 
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// version 2 as published by the Free Software Foundation.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License version 2
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// 
+// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE
+// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE.
+// 
+// 
+// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN,
+// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY,
+// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS
+// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS
+// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER
+// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL
+// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING,
+// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR
+// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
+// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO
+// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO,
+// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION
+// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN
+// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE.
+// 
+// USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS
+// SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
+// PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
+// COUNTRIES MIGHT BE RESTRICTED.
+// 
+// 
+// DEAR SECURITY EXPERTS
+// ---------------------
+// 
+// If you find a bug or a security vulnerability please kindly inform us
+// about the problem immediately so that we can fix the security problem
+// to protect a lot of users around the world as soon as possible.
+// 
+// Our e-mail address for security reports is:
+// softether-vpn-security [at] softether.org
+// 
+// Please note that the above e-mail address is not a technical support
+// inquiry address. If you need technical assistance, please visit
+// http://www.softether.org/ and ask your question on the users forum.
+// 
+// Thank you for your cooperation.
+
+
+using System;
+using System.Threading;
+using System.Data;
+using System.Data.Sql;
+using System.Data.SqlClient;
+using System.Data.SqlTypes;
+using System.Text;
+using System.Configuration;
+using System.Collections;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using System.IO;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Drawing.Drawing2D;
+using System.Web.Mail;
+
+namespace CoreUtil
+{
+	// FIFO
+	public class Fifo
+	{
+		byte[] p;
+		int pos, size;
+		public int Size
+		{
+			get { return size; }
+		}
+		public byte[] Data
+		{
+			get
+			{
+				return this.p;
+			}
+		}
+		public int DataOffset
+		{
+			get
+			{
+				return this.pos;
+			}
+		}
+		public int PhysicalSize
+		{
+			get
+			{
+				return p.Length;
+			}
+		}
+
+		int reallocMemSize;
+		public const int FifoInitMemSize = 4096;
+		public const int FifoReallocMemSize = 65536;
+		public const int FifoReallocMemSizeSmall = 65536;
+
+		long totalWriteSize = 0, totalReadSize = 0;
+
+		public long TotalReadSize
+		{
+			get { return totalReadSize; }
+		}
+		public long TotalWriteSize
+		{
+			get { return totalWriteSize; }
+		}
+
+		public Fifo()
+		{
+			init(0);
+		}
+		public Fifo(int reallocMemSize)
+		{
+			init(reallocMemSize);
+		}
+
+		void init(int reallocMemSize)
+		{
+			if (reallocMemSize == 0)
+			{
+				reallocMemSize = FifoReallocMemSize;
+			}
+
+			this.size = this.pos = 0;
+			this.reallocMemSize = reallocMemSize;
+
+			this.p = new byte[FifoInitMemSize];
+		}
+
+		public void Write(Buf buf)
+		{
+			Write(buf.ByteData);
+		}
+		public void Write(byte[] src)
+		{
+			Write(src, src.Length);
+		}
+		public void SkipWrite(int size)
+		{
+			Write(null, size);
+		}
+		public void Write(byte[] src, int size)
+		{
+			Write(src, 0, size);
+		}
+		public void Write(byte[] src, int offset, int size)
+		{
+			int i, need_size;
+			bool realloc_flag;
+
+			i = this.size;
+			this.size += size;
+			need_size = this.pos + this.size;
+			realloc_flag = false;
+
+			int memsize = p.Length;
+			while (need_size > memsize)
+			{
+				memsize = Math.Max(memsize, FifoInitMemSize) * 3;
+				realloc_flag = true;
+			}
+
+			if (realloc_flag)
+			{
+				byte[] new_p = new byte[memsize];
+				Util.CopyByte(new_p, 0, this.p, 0, this.p.Length);
+				this.p = new_p;
+			}
+
+			if (src != null)
+			{
+				Util.CopyByte(this.p, this.pos + i, src, offset, size);
+			}
+
+			totalWriteSize += size;
+		}
+
+		public byte[] Read()
+		{
+			return Read(this.Size);
+		}
+		public void ReadToBuf(Buf buf, int size)
+		{
+			byte[] data = Read(size);
+
+			buf.Write(data);
+		}
+		public Buf ReadToBuf(int size)
+		{
+			byte[] data = Read(size);
+
+			return new Buf(data);
+		}
+		public byte[] Read(int size)
+		{
+			byte[] ret = new byte[size];
+			int read_size = Read(ret);
+			Array.Resize<byte>(ref ret, read_size);
+
+			return ret;
+		}
+		public int Read(byte[] dst)
+		{
+			return Read(dst, dst.Length);
+		}
+		public int SkipRead(int size)
+		{
+			return Read(null, size);
+		}
+		public int Read(byte[] dst, int size)
+		{
+			return Read(dst, 0, size);
+		}
+		public int Read(byte[] dst, int offset, int size)
+		{
+			int read_size;
+
+			read_size = Math.Min(size, this.size);
+			if (read_size == 0)
+			{
+				return 0;
+			}
+			if (dst != null)
+			{
+				Util.CopyByte(dst, offset, this.p, this.pos, size);
+			}
+			this.pos += read_size;
+			this.size -= read_size;
+
+			if (this.size == 0)
+			{
+				this.pos = 0;
+			}
+
+			if (this.pos >= FifoInitMemSize &&
+				this.p.Length >= this.reallocMemSize &&
+				(this.p.Length / 2) > this.size)
+			{
+				byte[] new_p;
+				int new_size;
+
+				new_size = Math.Max(this.p.Length / 2, FifoInitMemSize);
+				new_p = new byte[new_size];
+				Util.CopyByte(new_p, 0, this.p, this.pos, this.size);
+
+				this.p = new_p;
+
+				this.pos = 0;
+			}
+
+			totalReadSize += read_size;
+
+			return read_size;
+		}
+	}
+
+	public class Buf
+	{
+		MemoryStream buf;
+
+		public Buf()
+		{
+			init(new byte[0]);
+		}
+		public Buf(byte[] data)
+		{
+			init(data);
+		}
+		void init(byte[] data)
+		{
+			buf = new MemoryStream();
+			Write(data);
+			SeekToBegin();
+		}
+
+		public void Clear()
+		{
+			buf.SetLength(0);
+		}
+
+		public void WriteByte(byte data)
+		{
+			byte[] a = new byte[1] { data };
+
+			Write(a);
+		}
+		public void Write(byte[] data)
+		{
+			buf.Write(data, 0, data.Length);
+		}
+		public void Write(byte[] data, int pos, int len)
+		{
+			buf.Write(data, pos, len);
+		}
+
+		public uint Size
+		{
+			get
+			{
+				return (uint)buf.Length;
+			}
+		}
+
+		public uint Pos
+		{
+			get
+			{
+				return (uint)buf.Position;
+			}
+		}
+
+		public byte[] ByteData
+		{
+			get
+			{
+				return buf.ToArray();
+			}
+		}
+
+		public byte this[uint i]
+		{
+			get
+			{
+				return buf.GetBuffer()[i];
+			}
+
+			set
+			{
+				buf.GetBuffer()[i] = value;
+			}
+		}
+
+		public byte[] Read()
+		{
+			return Read(this.Size);
+		}
+		public byte[] Read(uint size)
+		{
+			byte[] tmp = new byte[size];
+			int i = buf.Read(tmp, 0, (int)size);
+
+			byte[] ret = new byte[i];
+			Array.Copy(tmp, 0, ret, 0, i);
+
+			return ret;
+		}
+		public byte ReadByte()
+		{
+			byte[] a = Read(1);
+
+			return a[0];
+		}
+
+		public void SeekToBegin()
+		{
+			Seek(0);
+		}
+		public void SeekToEnd()
+		{
+			Seek(0, SeekOrigin.End);
+		}
+		public void Seek(uint offset)
+		{
+			Seek(offset, SeekOrigin.Begin);
+		}
+		public void Seek(uint offset, SeekOrigin mode)
+		{
+			buf.Seek(offset, mode);
+		}
+
+		public ushort ReadShort()
+		{
+			byte[] data = Read(2);
+			if (data.Length != 2)
+			{
+				return 0;
+			}
+			if (Env.IsLittleEndian)
+			{
+				Array.Reverse(data);
+			}
+			return BitConverter.ToUInt16(data, 0);
+		}
+		public ushort RawReadShort()
+		{
+			byte[] data = Read(2);
+			if (data.Length != 2)
+			{
+				return 0;
+			}
+			return BitConverter.ToUInt16(data, 0);
+		}
+
+		public uint ReadInt()
+		{
+			byte[] data = Read(4);
+			if (data.Length != 4)
+			{
+				return 0;
+			}
+			if (Env.IsLittleEndian)
+			{
+				Array.Reverse(data);
+			}
+			return BitConverter.ToUInt32(data, 0);
+		}
+		public uint RawReadInt()
+		{
+			byte[] data = Read(4);
+			if (data.Length != 4)
+			{
+				return 0;
+			}
+			return BitConverter.ToUInt32(data, 0);
+		}
+
+		public ulong ReadInt64()
+		{
+			byte[] data = Read(8);
+			if (data.Length != 8)
+			{
+				return 0;
+			}
+			if (Env.IsLittleEndian)
+			{
+				Array.Reverse(data);
+			}
+			return BitConverter.ToUInt64(data, 0);
+		}
+		public ulong RawReadInt64()
+		{
+			byte[] data = Read(8);
+			if (data.Length != 8)
+			{
+				return 0;
+			}
+			return BitConverter.ToUInt64(data, 0);
+		}
+
+		public string ReadStr()
+		{
+			return ReadStr(false);
+		}
+		public string ReadStr(bool include_null)
+		{
+			uint len = ReadInt();
+			byte[] data = Read(len - (uint)(include_null ? 1 : 0));
+			return Str.ShiftJisEncoding.GetString(data);
+		}
+
+		public string ReadUniStr()
+		{
+			return ReadUniStr(false);
+		}
+		public string ReadUniStr(bool include_null)
+		{
+			uint len = ReadInt();
+			if (len == 0)
+			{
+				return null;
+			}
+			byte[] data = Read(len - (uint)(include_null ? 2 : 0));
+			return Str.Utf8Encoding.GetString(data);
+		}
+		public void WriteShort(ushort shortValue)
+		{
+			byte[] data = BitConverter.GetBytes(shortValue);
+			if (Env.IsLittleEndian)
+			{
+				Array.Reverse(data);
+			}
+			Write(data);
+		}
+		public void RawWriteShort(ushort shortValue)
+		{
+			byte[] data = BitConverter.GetBytes(shortValue);
+			Write(data);
+		}
+
+		public void WriteInt(uint intValue)
+		{
+			byte[] data = BitConverter.GetBytes(intValue);
+			if (Env.IsLittleEndian)
+			{
+				Array.Reverse(data);
+			}
+			Write(data);
+		}
+		public void RawWriteInt(uint intValue)
+		{
+			byte[] data = BitConverter.GetBytes(intValue);
+			Write(data);
+		}
+
+		public void WriteInt64(ulong int64Value)
+		{
+			byte[] data = BitConverter.GetBytes(int64Value);
+			if (Env.IsLittleEndian)
+			{
+				Array.Reverse(data);
+			}
+			Write(data);
+		}
+		public void RawWriteInt64(ulong int64Value)
+		{
+			byte[] data = BitConverter.GetBytes(int64Value);
+			Write(data);
+		}
+
+		public string ReadNextLineAsString()
+		{
+			return ReadNextLineAsString(Str.Utf8Encoding);
+		}
+		public string ReadNextLineAsString(Encoding encoding)
+		{
+			byte[] ret = ReadNextLineAsData();
+			if (ret == null)
+			{
+				return null;
+			}
+
+			return encoding.GetString(ret);
+		}
+
+		public byte[] ReadNextLineAsData()
+		{
+			if (this.Size <= this.Pos)
+			{
+				return null;
+			}
+
+			long pos = buf.Position;
+
+			long i;
+			byte[] tmp = new byte[1];
+			for (i = pos; i < buf.Length; i++)
+			{
+				buf.Read(tmp, 0, 1);
+
+				if (tmp[0] == 13 || tmp[0] == 10)
+				{
+					if (tmp[0] == 13)
+					{
+						if ((i + 2) < buf.Length)
+						{
+							i++;
+						}
+					}
+
+					break;
+				}
+			}
+
+			long len = i - pos;
+
+			buf.Position = pos;
+
+			byte[] ret = Read((uint)((int)len));
+
+			try
+			{
+				Seek(1, SeekOrigin.Current);
+			}
+			catch
+			{
+			}
+
+			if (ret.Length >= 1 && ret[ret.Length - 1] == 13)
+			{
+				Array.Resize<byte>(ref ret, ret.Length - 1);
+			}
+
+			return ret;
+		}
+
+		public void WriteStr(string strValue)
+		{
+			WriteStr(strValue, false);
+		}
+		public void WriteStr(string strValue, bool include_null)
+		{
+			byte[] data = Str.ShiftJisEncoding.GetBytes(strValue);
+			WriteInt((uint)data.Length + (uint)(include_null ? 1 : 0));
+			Write(data);
+		}
+
+		public void WriteUniStr(string strValue)
+		{
+			WriteUniStr(strValue, false);
+		}
+		public void WriteUniStr(string strValue, bool include_null)
+		{
+			byte[] data = Str.Utf8Encoding.GetBytes(strValue);
+			WriteInt((uint)data.Length + (uint)(include_null ? 2 : 0));
+			Write(data);
+		}
+
+		public static Buf ReadFromFile(string filename)
+		{
+			return new Buf(IO.ReadFile(filename));
+		}
+
+		public void WriteToFile(string filename)
+		{
+			IO.SaveFile(filename, this.ByteData);
+		}
+
+		public static Buf ReadFromStream(Stream st)
+		{
+			Buf ret = new Buf();
+			int size = 32767;
+
+			while (true)
+			{
+				byte[] tmp = new byte[size];
+				int i = st.Read(tmp, 0, tmp.Length);
+
+				if (i <= 0)
+				{
+					break;
+				}
+
+				Array.Resize<byte>(ref tmp, i);
+
+				ret.Write(tmp);
+			}
+
+			ret.SeekToBegin();
+
+			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/

+ 320 - 0
src/BuildUtil/CoreUtil/Cache.cs

@@ -0,0 +1,320 @@
+// CoreUtil
+// 
+// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved.
+// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved.
+// Comments: Tetsuo Sugiyama, Ph.D.
+// 
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// version 2 as published by the Free Software Foundation.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License version 2
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// 
+// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE
+// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE.
+// 
+// 
+// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN,
+// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY,
+// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS
+// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS
+// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER
+// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL
+// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING,
+// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR
+// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
+// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO
+// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO,
+// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION
+// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN
+// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE.
+// 
+// USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS
+// SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
+// PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
+// COUNTRIES MIGHT BE RESTRICTED.
+// 
+// 
+// DEAR SECURITY EXPERTS
+// ---------------------
+// 
+// If you find a bug or a security vulnerability please kindly inform us
+// about the problem immediately so that we can fix the security problem
+// to protect a lot of users around the world as soon as possible.
+// 
+// Our e-mail address for security reports is:
+// softether-vpn-security [at] softether.org
+// 
+// Please note that the above e-mail address is not a technical support
+// inquiry address. If you need technical assistance, please visit
+// http://www.softether.org/ and ask your question on the users forum.
+// 
+// Thank you for your cooperation.
+
+
+using System;
+using System.Threading;
+using System.Data;
+using System.Data.Sql;
+using System.Data.SqlClient;
+using System.Data.SqlTypes;
+using System.Text;
+using System.Configuration;
+using System.Collections;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using System.IO;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Drawing.Drawing2D;
+using System.Diagnostics;
+using System.Web.Mail;
+using System.Net;
+using System.Net.Sockets;
+using System.Net.NetworkInformation;
+
+namespace CoreUtil
+{
+	public enum CacheType
+	{
+		UpdateExpiresWhenAccess = 0,
+		DoNotUpdateExpiresWhenAccess = 1,
+	}
+
+	public class Cache<TKey, TValue>
+	{
+		class Entry
+		{
+			DateTime createdDateTime;
+			public DateTime CreatedDateTime
+			{
+				get { return createdDateTime; }
+			}
+			DateTime updatedDateTime;
+			public DateTime UpdatedDateTime
+			{
+				get { return updatedDateTime; }
+			}
+			DateTime lastAccessedDateTime;
+			public DateTime LastAccessedDateTime
+			{
+				get { return lastAccessedDateTime; }
+			}
+
+			TKey key;
+			public TKey Key
+			{
+				get
+				{
+					return key;
+				}
+			}
+
+			TValue value;
+			public TValue Value
+			{
+				get
+				{
+					lastAccessedDateTime = Time.NowDateTime;
+					return this.value;
+				}
+				set
+				{
+					this.value = value;
+					updatedDateTime = Time.NowDateTime;
+					lastAccessedDateTime = Time.NowDateTime;
+				}
+			}
+
+			public Entry(TKey key, TValue value)
+			{
+				this.key = key;
+				this.value = value;
+				lastAccessedDateTime = updatedDateTime = createdDateTime = Time.NowDateTime;
+			}
+
+			public override int GetHashCode()
+			{
+				return key.GetHashCode();
+			}
+
+			public override string ToString()
+			{
+				return key.ToString() + "," + value.ToString();
+			}
+		}
+
+		public static readonly TimeSpan DefaultExpireSpan = new TimeSpan(0, 5, 0);
+		public const CacheType DefaultCacheType = CacheType.UpdateExpiresWhenAccess;
+
+		TimeSpan expireSpan;
+		public TimeSpan ExpireSpan
+		{
+			get { return expireSpan; }
+		}
+		CacheType type;
+		public CacheType Type
+		{
+			get { return type; }
+		}
+		Dictionary<TKey, Entry> list;
+		object lockObj;
+
+		public Cache()
+		{
+			init(DefaultExpireSpan, DefaultCacheType);
+		}
+		public Cache(CacheType type)
+		{
+			init(DefaultExpireSpan, type);
+		}
+		public Cache(TimeSpan expireSpan)
+		{
+			init(expireSpan, DefaultCacheType);
+		}
+		public Cache(TimeSpan expireSpan, CacheType type)
+		{
+			init(expireSpan, type);
+		}
+		void init(TimeSpan expireSpan, CacheType type)
+		{
+			this.expireSpan = expireSpan;
+			this.type = type;
+
+			list = new Dictionary<TKey, Entry>();
+			lockObj = new object();
+		}
+
+		public void Add(TKey key, TValue value)
+		{
+			lock (lockObj)
+			{
+				Entry e;
+
+				deleteExpired();
+
+				if (list.ContainsKey(key) == false)
+				{
+					e = new Entry(key, value);
+
+					list.Add(e.Key, e);
+
+					deleteExpired();
+				}
+				else
+				{
+					e = list[key];
+					e.Value = value;
+				}
+			}
+		}
+
+		public void Delete(TKey key)
+		{
+			lock (lockObj)
+			{
+				if (list.ContainsKey(key))
+				{
+					list.Remove(key);
+				}
+			}
+		}
+
+		public TValue this[TKey key]
+		{
+			get
+			{
+				lock (lockObj)
+				{
+					deleteExpired();
+
+					if (list.ContainsKey(key) == false)
+					{
+						return default(TValue);
+					}
+
+					return list[key].Value;
+				}
+			}
+		}
+
+		static long last_deleted = 0;
+
+		void deleteExpired()
+		{
+			bool do_delete = false;
+			long now = Tick64.Value;
+			long delete_inveral = expireSpan.Milliseconds / 10;
+
+			lock (lockObj)
+			{
+				if (last_deleted == 0 || now > (last_deleted + delete_inveral))
+				{
+					last_deleted = now;
+					do_delete = true;
+				}
+			}
+
+			if (do_delete == false)
+			{
+				return;
+			}
+
+			lock (lockObj)
+			{
+				List<Entry> o = new List<Entry>();
+				DateTime expire = Time.NowDateTime - this.expireSpan;
+
+				foreach (Entry e in list.Values)
+				{
+					if (this.type == CacheType.UpdateExpiresWhenAccess)
+					{
+						if (e.LastAccessedDateTime < expire)
+						{
+							o.Add(e);
+						}
+					}
+					else
+					{
+						if (e.UpdatedDateTime < expire)
+						{
+							o.Add(e);
+						}
+					}
+				}
+
+				foreach (Entry e in o)
+				{
+					list.Remove(e.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/

+ 182 - 0
src/BuildUtil/CoreUtil/Compress.cs

@@ -0,0 +1,182 @@
+// CoreUtil
+// 
+// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved.
+// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved.
+// Comments: Tetsuo Sugiyama, Ph.D.
+// 
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// version 2 as published by the Free Software Foundation.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License version 2
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// 
+// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE
+// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE.
+// 
+// 
+// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN,
+// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY,
+// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS
+// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS
+// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER
+// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL
+// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING,
+// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR
+// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
+// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO
+// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO,
+// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION
+// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN
+// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE.
+// 
+// USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS
+// SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
+// PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
+// COUNTRIES MIGHT BE RESTRICTED.
+// 
+// 
+// DEAR SECURITY EXPERTS
+// ---------------------
+// 
+// If you find a bug or a security vulnerability please kindly inform us
+// about the problem immediately so that we can fix the security problem
+// to protect a lot of users around the world as soon as possible.
+// 
+// Our e-mail address for security reports is:
+// softether-vpn-security [at] softether.org
+// 
+// Please note that the above e-mail address is not a technical support
+// inquiry address. If you need technical assistance, please visit
+// http://www.softether.org/ and ask your question on the users forum.
+// 
+// Thank you for your cooperation.
+
+
+using System;
+using System.Threading;
+using System.Data;
+using System.Data.Sql;
+using System.Data.SqlClient;
+using System.Data.SqlTypes;
+using System.Text;
+using System.Configuration;
+using System.Collections;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using System.IO;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Drawing.Drawing2D;
+using System.Web.Mail;
+using CoreUtil.Internal;
+
+namespace CoreUtil
+{
+	public static class ZLib
+	{
+		public static byte[] Compress(byte[] src)
+		{
+			return Compress(src, zlibConst.Z_DEFAULT_COMPRESSION);
+		}
+		public static byte[] Compress(byte[] src, int level)
+		{
+			return Compress(src, level, false);
+		}
+		public static byte[] Compress(byte[] src, int level, bool noHeader)
+		{
+			int dstSize = src.Length * 2 + 100;
+			byte[] dst = new byte[dstSize];
+
+			compress2(ref dst, src, level, noHeader);
+
+			return dst;
+		}
+
+		public static byte[] Uncompress(byte[] src, int originalSize)
+		{
+			byte[] dst = new byte[originalSize];
+
+			uncompress(ref dst, src);
+
+			return dst;
+		}
+
+		static void compress2(ref byte[] dest, byte[] src, int level, bool noHeader)
+		{
+			ZStream stream = new ZStream();
+
+			stream.next_in = src;
+			stream.avail_in = src.Length;
+
+			stream.next_out = dest;
+			stream.avail_out = dest.Length;
+
+			if (noHeader == false)
+			{
+				stream.deflateInit(level);
+			}
+			else
+			{
+				stream.deflateInit(level, -15);
+			}
+
+			stream.deflate(zlibConst.Z_FINISH);
+
+			Array.Resize<byte>(ref dest, (int)stream.total_out);
+		}
+
+		static void uncompress(ref byte[] dest, byte[] src)
+		{
+			ZStream stream = new ZStream();
+
+			stream.next_in = src;
+			stream.avail_in = src.Length;
+
+			stream.next_out = dest;
+			stream.avail_out = dest.Length;
+
+			stream.inflateInit();
+
+			int err = stream.inflate(zlibConst.Z_FINISH);
+			if (err != zlibConst.Z_STREAM_END)
+			{
+				stream.inflateEnd();
+				throw new ApplicationException();
+			}
+
+			Array.Resize<byte>(ref dest, (int)stream.total_out);
+
+			err = stream.inflateEnd();
+			if (err != zlibConst.Z_OK)
+			{
+				throw new ApplicationException();
+			}
+		}
+	}
+}
+
+// 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/

+ 2180 - 0
src/BuildUtil/CoreUtil/Console.cs

@@ -0,0 +1,2180 @@
+// CoreUtil
+// 
+// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved.
+// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved.
+// Comments: Tetsuo Sugiyama, Ph.D.
+// 
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// version 2 as published by the Free Software Foundation.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License version 2
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// 
+// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE
+// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE.
+// 
+// 
+// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN,
+// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY,
+// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS
+// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS
+// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER
+// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL
+// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING,
+// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR
+// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
+// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO
+// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO,
+// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION
+// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN
+// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE.
+// 
+// USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS
+// SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
+// PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
+// COUNTRIES MIGHT BE RESTRICTED.
+// 
+// 
+// DEAR SECURITY EXPERTS
+// ---------------------
+// 
+// If you find a bug or a security vulnerability please kindly inform us
+// about the problem immediately so that we can fix the security problem
+// to protect a lot of users around the world as soon as possible.
+// 
+// Our e-mail address for security reports is:
+// softether-vpn-security [at] softether.org
+// 
+// Please note that the above e-mail address is not a technical support
+// inquiry address. If you need technical assistance, please visit
+// http://www.softether.org/ and ask your question on the users forum.
+// 
+// Thank you for your cooperation.
+
+
+using System;
+using System.Threading;
+using System.Data;
+using System.Data.Sql;
+using System.Data.SqlClient;
+using System.Data.SqlTypes;
+using System.Text;
+using System.Configuration;
+using System.Collections;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using System.IO;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Drawing.Drawing2D;
+using System.Web.Mail;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+#if ASPNET
+using Resources.BuildUtil.Properties;
+#else
+using BuildUtil.Properties;
+#endif
+
+namespace CoreUtil
+{
+	public static class Con
+	{
+		static ConsoleService cs = null;
+
+		public static ConsoleService ConsoleService
+		{
+			get { return Con.cs; }
+		}
+
+		public static void SetConsoleService(ConsoleService svc)
+		{
+			cs = svc;
+		}
+
+		public static void UnsetConsoleService()
+		{
+			cs = null;
+		}
+
+		public static string ReadLine()
+		{
+			return ReadLine("");
+		}
+		public static string ReadLine(string prompt)
+		{
+			return ReadLine(prompt, false);
+		}
+		public static string ReadLine(string prompt, bool noFile)
+		{
+			if (cs != null)
+			{
+				return cs.ReadLine(prompt, noFile);
+			}
+			else
+			{
+				Console.Write(prompt);
+				return Console.ReadLine();
+			}
+		}
+
+		public static void WriteLine()
+		{
+			WriteLine("");
+		}
+
+		public static void WriteLine(object arg)
+		{
+			if (cs != null)
+			{
+				cs.WriteLine(arg);
+			}
+			else
+			{
+				Console.WriteLine(arg);
+			}
+		}
+
+		public static void WriteLine(string str)
+		{
+			if (cs != null)
+			{
+				cs.WriteLine(str);
+			}
+			else
+			{
+				Console.WriteLine(str);
+			}
+		}
+
+		public static void WriteLine(string str, object arg)
+		{
+			if (cs != null)
+			{
+				cs.WriteLine(str, arg);
+			}
+			else
+			{
+				Console.WriteLine(str, arg);
+			}
+		}
+
+		public static void WriteLine(string str, params object[] args)
+		{
+			if (cs != null)
+			{
+				cs.WriteLine(str, args);
+			}
+			else
+			{
+				Console.WriteLine(str, args);
+			}
+		}
+	}
+
+	public class ConsoleUserCancelException : Exception
+	{
+		public ConsoleUserCancelException(string msg)
+			: base(msg)
+		{
+		}
+	}
+
+	public class ConsoleEvalMinMaxParam
+	{
+		public readonly string ErrorMessageString;
+		public readonly int MinValue, MaxValue;
+
+		public ConsoleEvalMinMaxParam(string errorMessageString, int minValue, int maxValue)
+		{
+			this.ErrorMessageString = errorMessageString;
+			this.MinValue = minValue;
+			this.MaxValue = maxValue;
+		}
+	}
+
+	public enum ConsoleType
+	{
+		Local,
+		Csv,
+	}
+
+	public class ConsoleParam
+	{
+		public readonly string Name;
+		public readonly ConsolePromptProcDelegate PromptProc;
+		public readonly object PromptProcParam;	
+		public readonly ConsoleEvalProcDelegate EvalProc;	
+		public readonly object EvalProcParam;	
+		internal string Tmp = null;			
+		public ConsoleParam(string name)
+			: this(name, null, null)
+		{
+		}
+		public ConsoleParam(string name,
+			ConsolePromptProcDelegate promptProc,
+			object promptProcParam)
+			: this(name, promptProc, promptProcParam, null, null)
+		{
+		}
+		public ConsoleParam(string name,
+			ConsolePromptProcDelegate promptProc,
+			object promptProcParam,
+			ConsoleEvalProcDelegate evalProc,
+			object evalProcParam)
+		{
+			this.Name = name;
+			this.PromptProc = promptProc;
+			this.PromptProcParam = promptProcParam;
+			this.EvalProc = evalProc;
+			this.EvalProcParam = evalProcParam;
+		}
+	}
+
+	public delegate string ConsolePromptProcDelegate(ConsoleService c, object param);
+	public delegate bool ConsoleEvalProcDelegate(ConsoleService c, string str, object param);
+
+	delegate void ConsoleFreeDelegate();
+	delegate string ConsoleReadLineDelegate(string prompt, bool nofile);
+	delegate string ConsoleReadPasswordDelegate(string prompt);
+	delegate bool ConsoleWriteDelegate(string str);
+	delegate int ConsoleGetWidthDelegate();
+
+	public class ConsoleParamValueList
+	{
+		List<ConsoleParamValue> o;
+
+		public ConsoleParamValueList()
+		{
+			o = new List<ConsoleParamValue>();
+		}
+
+		public IEnumerable<ConsoleParamValue> Values
+		{
+			get
+			{
+				int i;
+				for (i = 0; i < o.Count; i++)
+				{
+					yield return o[i];
+				}
+			}
+		}
+
+		public void Add(ConsoleParamValue v)
+		{
+			if (o.Contains(v) == false)
+			{
+				o.Add(v);
+			}
+		}
+
+		public ConsoleParamValue this[string name]
+		{
+			get
+			{
+				ConsoleParamValue v = new ConsoleParamValue(name, "", 0);
+
+				int i = o.IndexOf(v);
+				if (i == -1)
+				{
+					return new ConsoleParamValue(name, "", 0);
+				}
+
+				return o[i];
+			}
+		}
+
+		public ConsoleParamValue DefaultParam
+		{
+			get
+			{
+				foreach (ConsoleParamValue c in o)
+				{
+					if (c.IsDefaultParam)
+					{
+						return c;
+					}
+				}
+
+				return new ConsoleParamValue("", "", 0, true);
+			}
+		}
+
+		public string GetStr(string name)
+		{
+			ConsoleParamValue v = this[name];
+			if (v == null)
+			{
+				return null;
+			}
+
+			return v.StrValue;
+		}
+
+		public int GetInt(string name)
+		{
+			ConsoleParamValue v = this[name];
+			if (v == null)
+			{
+				return 0;
+			}
+
+			return v.IntValue;
+		}
+
+		public bool GetYes(string name)
+		{
+			return Str.StrToBool(name);
+		}
+	}
+
+	public class ConsoleParamValue : IComparable<ConsoleParamValue>, IEquatable<ConsoleParamValue>
+	{
+		public readonly string Name;			
+		public readonly string StrValue;	
+		public readonly int IntValue;			
+		public readonly bool BoolValue;			
+		public readonly bool IsEmpty;			
+		public readonly bool IsDefaultParam;	
+
+		public ConsoleParamValue(string name, string strValue, int intValue)
+			: this(name, strValue, intValue, false)
+		{
+		}
+		public ConsoleParamValue(string name, string strValue, int intValue, bool isDefaultParam)
+		{
+			this.Name = name;
+			this.IntValue = intValue;
+			this.StrValue = strValue;
+			this.BoolValue = Str.StrToBool(strValue);
+			this.IsDefaultParam = isDefaultParam;
+
+			this.IsEmpty = Str.IsEmptyStr(strValue);
+		}
+
+		public int CompareTo(ConsoleParamValue other)
+		{
+			return Str.StrCmpiRetInt(this.Name, other.Name);
+		}
+
+		public bool Equals(ConsoleParamValue other)
+		{
+			return Str.StrCmpi(this.Name, other.Name);
+		}
+	}
+
+	public class ConsoleCommandParam : Attribute
+	{
+	}
+
+	public class ConsoleCommandMethod : Attribute
+	{
+		public readonly string Description;
+		public readonly string ArgsHelp;
+		public readonly string BodyHelp;
+		public readonly SortedList<string, string> ParamHelp;
+
+		internal BindingFlags bindingFlag;
+		internal MemberInfo memberInfo;
+		internal MethodInfo methodInfo;
+		internal string name;
+
+		public ConsoleCommandMethod(string description, string argsHelp, string bodyHelp, params string[] paramHelp)
+		{
+			this.Description = description;
+			this.ArgsHelp = argsHelp;
+			this.BodyHelp = bodyHelp;
+			this.ParamHelp = new SortedList<string, string>(new StrComparer(false));
+
+			foreach (string s in paramHelp)
+			{
+				int i = s.IndexOf(":");
+				if (i == -1)
+				{
+					throw new ArgumentException(s);
+				}
+
+				this.ParamHelp.Add(s.Substring(0, i), s.Substring(i + 1));
+			}
+		}
+	}
+
+	public static class ConsoleErrorCode
+	{
+		public const int ERR_BAD_COMMAND_OR_PARAM = -100001;
+		public const int ERR_INNER_EXCEPTION = -100002;
+		public const int ERR_USER_CANCELED = -100003;
+
+		public static string ErrorCodeToString(int code)
+		{
+			bool b;
+
+			return ErrorCodeToString(code, out b);
+		}
+		public static string ErrorCodeToString(int code, out bool unknownError)
+		{
+			unknownError = false;
+
+			switch (code)
+			{
+				case ERR_BAD_COMMAND_OR_PARAM:
+					return "Bad command or parameters.";
+
+				case ERR_USER_CANCELED:
+					return "User canceled.";
+
+				case ERR_INNER_EXCEPTION:
+				default:
+					unknownError = true;
+					return string.Format("Unknown Error {0}", code);
+			}
+		}
+	}
+
+	public class ConsoleService
+	{
+		IO inFile;			
+		Buf inBuf;					
+		IO outFile;						
+		int win32_OldConsoleWidth;		
+
+		public const int MaxPromptStrSize = 65536;
+		public const int Win32DefaultConsoleWidth = 100;
+
+		ConsoleType consoleType;
+		public ConsoleType ConsoleType
+		{
+			get { return consoleType; }
+		}
+
+		int retCode;
+		public int RetCode
+		{
+			get { return retCode; }
+		}
+
+		string retErrorMessage;
+		public string RetErrorMessage
+		{
+			get
+			{
+				bool b;
+				string s = ConsoleErrorCode.ErrorCodeToString(this.RetCode, out b);
+
+				if (b)
+				{
+					s = this.retErrorMessage;
+				}
+
+				Str.NormalizeString(ref s);
+
+				return s;
+			}
+		}
+
+		ConsoleFreeDelegate free;
+
+		ConsoleReadLineDelegate readLine;
+
+		ConsoleReadPasswordDelegate readPassword;
+
+		ConsoleWriteDelegate write;
+
+		ConsoleGetWidthDelegate getWidth;
+
+		SortedList<string, ConsoleCommandMethod> currentCmdList = null;
+
+
+		private ConsoleService()
+		{
+		}
+
+		public static int EntryPoint(string cmdLine, string programName, Type commandClass)
+		{
+			string s;
+			return EntryPoint(cmdLine, programName, commandClass, out s);
+		}
+		public static int EntryPoint(string cmdLine, string programName, Type commandClass, out string lastErrorMessage)
+		{
+			int ret = 0;
+			string infile, outfile;
+			string csvmode;
+			ConsoleService c;
+
+			lastErrorMessage = "";
+
+			infile = ParseCommand(cmdLine, "in");
+			outfile = ParseCommand(cmdLine, "out");
+			if (Str.IsEmptyStr(infile))
+			{
+				infile = null;
+			}
+			if (Str.IsEmptyStr(outfile))
+			{
+				outfile = null;
+			}
+			c = ConsoleService.NewLocalConsoleService(infile, outfile);
+
+			csvmode = ParseCommand(cmdLine, "csv");
+			if (csvmode != null)
+			{
+				c.consoleType = ConsoleType.Csv;
+			}
+
+			if (c.DispatchCommand(cmdLine, ">", commandClass) == false)
+			{
+				ret = ConsoleErrorCode.ERR_BAD_COMMAND_OR_PARAM;
+			}
+			else
+			{
+				ret = c.retCode;
+			}
+
+			lastErrorMessage = c.RetErrorMessage;
+
+			return ret;
+		}
+
+		public bool WriteLine(object value)
+		{
+			return WriteLine(value.ToString());
+		}
+		public bool WriteLine(string str)
+		{
+			return localWrite(str);
+		}
+		public bool WriteLine(string format, object arg0)
+		{
+			return WriteLine(string.Format(format, arg0));
+		}
+		public bool WriteLine(string format, params object[] arg)
+		{
+			return WriteLine(string.Format(format, arg));
+		}
+
+		public string ReadLine(string prompt)
+		{
+			return ReadLine(prompt, false);
+		}
+		public string ReadLine(string prompt, bool noFile)
+		{
+			return localReadLine(prompt, noFile);
+		}
+
+		public string ReadPassword(string prompt)
+		{
+			return localReadPassword(prompt);
+		}
+
+		public static ConsolePromptProcDelegate Prompt
+		{
+			get { return new ConsolePromptProcDelegate(prompt); }
+		}
+		static string prompt(ConsoleService c, object param)
+		{
+			string p = (param == null) ? Resources.CMD_PROMPT : (string)param;
+
+			return c.readLine(p, true);
+		}
+
+		public static ConsoleEvalProcDelegate EvalIsFile
+		{
+			get { return new ConsoleEvalProcDelegate(evalIsFile); }
+		}
+		static bool evalIsFile(ConsoleService c, string str, object param)
+		{
+			string tmp;
+			if (c == null || str == null)
+			{
+				return false;
+			}
+
+			tmp = str;
+
+			if (Str.IsEmptyStr(tmp))
+			{
+				c.write(Resources.CMD_FILE_NAME_EMPTY);
+				return false;
+			}
+
+			if (IO.IsFileExists(tmp) == false)
+			{
+				c.write(Str.FormatC(Resources.CMD_FILE_NOT_FOUND, tmp));
+
+				return false;
+			}
+
+			return true;
+		}
+
+		public static ConsoleEvalProcDelegate EvalInt1
+		{
+			get { return new ConsoleEvalProcDelegate(evalInt1); }
+		}
+		static bool evalInt1(ConsoleService c, string str, object param)
+		{
+			string p = (param == null) ? Resources.CMD_EVAL_INT : (string)param;
+
+			if (Str.StrToInt(str) == 0)
+			{
+				c.write(p);
+
+				return false;
+			}
+
+			return true;
+		}
+
+		public static ConsoleEvalProcDelegate EvalNotEmpty
+		{
+			get { return new ConsoleEvalProcDelegate(evalNotEmpty); }
+		}
+		static bool evalNotEmpty(ConsoleService c, string str, object param)
+		{
+			string p = (param == null) ? Resources.CMD_EVAL_NOT_EMPTY : (string)param;
+
+			if (Str.IsEmptyStr(str) == false)
+			{
+				return true;
+			}
+
+			c.write(p);
+
+			return false;
+		}
+
+		public static ConsoleEvalProcDelegate EvalMinMax
+		{
+			get { return new ConsoleEvalProcDelegate(evalMinMax); }
+		}
+		static bool evalMinMax(ConsoleService c, string str, object param)
+		{
+			string tag;
+			int v;
+			if (param == null)
+			{
+				return false;
+			}
+
+			ConsoleEvalMinMaxParam e = (ConsoleEvalMinMaxParam)param;
+
+			if (Str.IsEmptyStr(e.ErrorMessageString))
+			{
+				tag = Resources.CMD_EVAL_MIN_MAX;
+			}
+			else
+			{
+				tag = e.ErrorMessageString;
+			}
+
+			v = Str.StrToInt(str);
+
+			if (v >= e.MinValue && v <= e.MaxValue)
+			{
+				return true;
+			}
+			else
+			{
+				c.write(Str.FormatC(tag, e.MinValue, e.MaxValue));
+
+				return false;
+			}
+		}
+
+		public void PrintCmdHelp(string cmdName, List<string> paramList)
+		{
+			string tmp;
+			string buf;
+			string description, args, help;
+			List<string> t;
+			int width;
+			int i;
+			string space;
+			if (cmdName == null || paramList == null)
+			{
+				return;
+			}
+
+			width = GetConsoleWidth() - 2;
+
+			description = this.currentCmdList[cmdName].Description;
+			args = this.currentCmdList[cmdName].ArgsHelp;
+			help = this.currentCmdList[cmdName].BodyHelp;
+
+			space = Str.MakeCharArray(' ', 2);
+
+			tmp = Str.FormatC(Resources.CMD_HELP_TITLE, cmdName);
+			this.write(tmp);
+			this.write("");
+
+			this.write(Resources.CMD_HELP_DESCRIPTION);
+			t = Str.StrArrayToList(SeparateStringByWidth(description, width - 2));
+			for (i = 0; i < t.Count; i++)
+			{
+				buf = Str.FormatC("%S%s", space, t[i]);
+				this.write(buf);
+			}
+			this.write("");
+
+			this.write(Resources.CMD_HELP_HELP);
+			t = Str.StrArrayToList(SeparateStringByWidth(help, width - 2));
+			for (i = 0; i < t.Count; i++)
+			{
+				buf = Str.FormatC("%S%s", space, t[i]);
+				this.write(buf);
+			}
+			this.write("");
+
+			this.write(Resources.CMD_HELP_USAGE);
+			t = Str.StrArrayToList(SeparateStringByWidth(args, width - 2));
+			for (i = 0; i < t.Count; i++)
+			{
+				buf = Str.FormatC("%S%s", space, t[i]);
+				this.write(buf);
+			}
+
+			if (paramList.Count >= 1)
+			{
+				this.write("");
+				this.write(Resources.CMD_HELP_ARGS);
+				PrintCandidateHelp(cmdName, paramList.ToArray(), 2, this.currentCmdList);
+			}
+		}
+
+		public void PrintCandidateHelp(string cmdName, string[] candidateList, int leftSpace, SortedList<string, ConsoleCommandMethod> ccList)
+		{
+			int console_width;
+			int max_keyword_width;
+			List<string> o;
+			int i;
+			string tmpbuf;
+			string left_space_array;
+			string max_space_array;
+			if (candidateList == null)
+			{
+				return;
+			}
+
+			console_width = GetConsoleWidth() - 1;
+
+			left_space_array = Str.MakeCharArray(' ', leftSpace);
+
+			o = new List<string>();
+
+			max_keyword_width = 0;
+
+			for (i = 0; i < candidateList.Length; i++)
+			{
+				int keyword_width;
+
+				o.Add(candidateList[i]);
+
+				keyword_width = Str.GetStrWidth(candidateList[i]);
+				if (cmdName != null)
+				{
+					if (candidateList[i].StartsWith("[", StringComparison.InvariantCultureIgnoreCase) == false)
+					{
+						keyword_width += 1;
+					}
+					else
+					{
+						keyword_width -= 2;
+					}
+				}
+
+				max_keyword_width = Math.Max(max_keyword_width, keyword_width);
+			}
+
+			max_space_array = Str.MakeCharArray(' ', max_keyword_width);
+
+			for (i = 0; i < o.Count; i++)
+			{
+				string tmp;
+				string name = o[i];
+				List<string> t;
+				string help;
+				int j;
+				int keyword_start_width = leftSpace;
+				int descript_start_width = leftSpace + max_keyword_width + 1;
+				int descript_width;
+				string space;
+
+				if (console_width >= (descript_start_width + 5))
+				{
+					descript_width = console_width - descript_start_width - 3;
+				}
+				else
+				{
+					descript_width = 2;
+				}
+
+				if (cmdName != null && name.StartsWith("[", StringComparison.InvariantCultureIgnoreCase) == false)
+				{
+					tmp = Str.FormatC("/%s", name);
+				}
+				else
+				{
+					if (cmdName == null)
+					{
+						tmp = name;
+					}
+					else
+					{
+						if (name.Length >= 1)
+						{
+							tmp = name.Substring(1);
+						}
+						else
+						{
+							tmp = "";
+						}
+
+						if (tmp.Length >= 1)
+						{
+							tmp = tmp.Substring(0, tmp.Length - 1);
+						}
+					}
+				}
+
+				if (cmdName == null)
+				{
+					help = ccList[name].Description;
+				}
+				else
+				{
+					if (ccList[cmdName].ParamHelp.ContainsKey(name))
+					{
+						help = ccList[cmdName].ParamHelp[name];
+					}
+					else
+					{
+						help = Resources.CMD_UNKNOWN_PARAM;
+					}
+				}
+
+				space = Str.MakeCharArray(' ', max_keyword_width - Str.GetStrWidth(name) -
+					(cmdName == null ? 0 : (name.StartsWith("[", StringComparison.InvariantCultureIgnoreCase) == false ? 1 : -2)));
+
+				t = Str.StrArrayToList(SeparateStringByWidth(help, descript_width));
+
+				for (j = 0; j < t.Count; j++)
+				{
+					if (j == 0)
+					{
+						tmpbuf = Str.FormatC("%S%S%S - %s",
+							left_space_array, tmp, space, t[j]);
+					}
+					else
+					{
+						tmpbuf = Str.FormatC("%S%S   %s",
+							left_space_array, max_space_array, t[j]);
+					}
+
+					this.write(tmpbuf);
+				}
+			}
+		}
+
+		public static string[] SeparateStringByWidth(string str, int width)
+		{
+			if (str == null)
+			{
+				return new string[0];
+			}
+			if (width <= 0)
+			{
+				width = 1;
+			}
+
+			StringBuilder tmp = new StringBuilder();
+			int len, i;
+			List<string> o = new List<string>();
+
+			str += (char)0;
+			len = str.Length;
+
+			for (i = 0; i < len; i++)
+			{
+				char c = str[i];
+
+				switch (c)
+				{
+					case (char)0:
+					case '\r':
+					case '\n':
+						if (c == '\r')
+						{
+							if (str[i + 1] == '\n')
+							{
+								i++;
+							}
+						}
+
+						o.Add(tmp.ToString());
+						tmp = new StringBuilder();
+						break;
+
+					default:
+						tmp.Append(c);
+						if (Str.GetStrWidth(tmp.ToString()) >= width)
+						{
+							o.Add(tmp.ToString());
+							tmp = new StringBuilder();
+						}
+						break;
+				}
+			}
+
+			if (o.Count == 0)
+			{
+				o.Add("");
+			}
+
+			return o.ToArray();
+		}
+
+		public static bool IsHelpStr(string str)
+		{
+			if (str == null)
+			{
+				return false;
+			}
+
+			if (Str.IsStrInList(str, true,
+				"help", "?", "man", "/man", "-man", "--man",
+				"/help", "/?", "-help", "-?",
+				"/h", "--help", "--?"))
+			{
+				return true;
+			}
+
+			return false;
+		}
+
+		public bool DispatchCommand(string execCommandOrNull, string prompt, Type commandClass)
+		{
+			return DispatchCommand(execCommandOrNull, prompt, commandClass, null);
+		}
+		public bool DispatchCommand(string execCommandOrNull, string prompt, Type commandClass, object invokerInstance)
+		{
+			SortedList<string, ConsoleCommandMethod> cmdList = GetCommandList(commandClass);
+
+			currentCmdList = cmdList;
+			try
+			{
+				string str, tmp, cmd_name;
+				bool b_exit = false;
+				string cmd_param;
+				int ret = 0;
+				List<string> t, candidate;
+				int i;
+
+				if (Str.IsEmptyStr(execCommandOrNull))
+				{
+				RETRY:
+					tmp = prompt;
+					str = this.readLine(tmp, false);
+
+					if (str != null && Str.IsEmptyStr(str))
+					{
+						goto RETRY;
+					}
+				}
+				else
+				{
+					if (prompt != null)
+					{
+						if (this.consoleType != ConsoleType.Csv)
+						{
+						}
+					}
+					str = execCommandOrNull;
+				}
+
+				if (str == null)
+				{
+					return false;
+				}
+
+				str = Str.TrimCrlf(str).Trim();
+
+				if (Str.IsEmptyStr(str))
+				{
+					return true;
+				}
+
+				if (SeparateCommandAndParam(str, out cmd_name, out cmd_param) == false)
+				{
+					return true;
+				}
+
+				if (cmd_name.Length >= 2 && cmd_name[0] == '?' && cmd_name[1] != '?')
+				{
+					cmd_name = cmd_name.Substring(1);
+					cmd_param = "/?";
+				}
+
+				if (cmd_name.Length >= 2 && cmd_name.EndsWith("?") && cmd_name[cmd_name.Length - 2] != '?')
+				{
+					cmd_name = cmd_name.Substring(0, cmd_name.Length - 1);
+					cmd_param = "/?";
+				}
+
+				t = new List<string>();
+				for (i = 0; i < cmdList.Count; i++)
+				{
+					t.Add(cmdList.Keys[i]);
+				}
+
+				if (IsHelpStr(cmd_name))
+				{
+					if (Str.IsEmptyStr(cmd_param))
+					{
+						this.write(Str.FormatC(Resources.CMD_HELP_1, t.Count));
+
+						string[] candidateList = t.ToArray();
+
+						PrintCandidateHelp(null, candidateList, 1, cmdList);
+
+						this.write("");
+						this.write(Resources.CMD_HELP_2);
+					}
+					else
+					{
+						string tmp2, tmp3;
+						if (SeparateCommandAndParam(cmd_param, out tmp2, out tmp3))
+						{
+							bool b = true;
+
+							if (IsHelpStr(tmp2))
+							{
+								b = false;
+							}
+
+							if (b)
+							{
+								DispatchCommand(Str.FormatC("%S /help", tmp2), null, commandClass, invokerInstance);
+							}
+						}
+					}
+				}
+				else if (Str.StrCmpi(cmd_name, "exit") ||
+					Str.StrCmpi(cmd_name, "quit"))
+				{
+					b_exit = true;
+				}
+				else
+				{
+					candidate = Str.StrArrayToList(GetRealnameCandidate(cmd_name, t.ToArray()));
+
+					if (candidate == null || candidate.Count == 0)
+					{
+						this.write(Str.FormatC(Resources.CON_UNKNOWN_CMD, cmd_name));
+
+						this.retCode = ConsoleErrorCode.ERR_BAD_COMMAND_OR_PARAM;
+					}
+					else if (candidate.Count >= 2)
+					{
+						this.write(Str.FormatC(Resources.CON_AMBIGIOUS_CMD, cmd_name));
+						this.write(Resources.CON_AMBIGIOUS_CMD_1);
+						string[] candidateArray = candidate.ToArray();
+
+						PrintCandidateHelp(null, candidateArray, 1, cmdList);
+						this.write(Resources.CON_AMBIGIOUS_CMD_2);
+
+						this.retCode = ConsoleErrorCode.ERR_BAD_COMMAND_OR_PARAM;
+					}
+					else
+					{
+						string real_cmd_name;
+						int j;
+
+						real_cmd_name = candidate[0];
+
+						for (j = 0; j < cmdList.Count; j++)
+						{
+							if (Str.Equals(cmdList.Values[j].name, real_cmd_name))
+							{
+								if (this.consoleType != ConsoleType.Csv)
+								{
+									this.write(Str.FormatC(Resources.CMD_EXEC_MSG_NAME,
+										cmdList.Values[j].name,
+										cmdList.Values[j].Description));
+								}
+
+								object srcObject = null;
+								if (cmdList.Values[j].methodInfo.IsStatic == false)
+								{
+									srcObject = invokerInstance;
+								}
+								object[] paramList =
+								{
+									this,
+									real_cmd_name,
+									cmd_param,
+								};
+
+								try
+								{
+									ret = (int)cmdList.Values[j].methodInfo.Invoke(srcObject, paramList);
+								}
+								catch (TargetInvocationException ex)
+								{
+									Exception ex2 = ex.GetBaseException();
+
+									if (ex2 is ConsoleUserCancelException)
+									{
+										this.write(Resources.CON_USER_CANCELED);
+										this.write("");
+										this.retCode = ConsoleErrorCode.ERR_USER_CANCELED;
+									}
+									else
+									{
+										this.write(ex2.ToString());
+										this.write("");
+
+										this.retCode = ConsoleErrorCode.ERR_INNER_EXCEPTION;
+										this.retErrorMessage = ex2.Message;
+									}
+
+									return true;
+								}
+
+								if (ret == -1)
+								{
+									b_exit = true;
+								}
+								else
+								{
+									this.retCode = ret;
+								}
+							}
+						}
+					}
+				}
+
+				if (b_exit)
+				{
+					return false;
+				}
+
+				return true;
+			}
+			finally
+			{
+				currentCmdList = null;
+			}
+		}
+
+		public static SortedList<string, ConsoleCommandMethod> GetCommandList(Type commandClass)
+		{
+			SortedList<string, ConsoleCommandMethod> cmdList = new SortedList<string, ConsoleCommandMethod>(new StrComparer(false));
+
+			BindingFlags[] searchFlags =
+			{
+				BindingFlags.Static | BindingFlags.NonPublic,
+				BindingFlags.Static | BindingFlags.Public,
+				BindingFlags.Instance | BindingFlags.NonPublic,
+				BindingFlags.Instance | BindingFlags.Public,
+			};
+
+			foreach (BindingFlags bFlag in searchFlags)
+			{
+				MemberInfo[] members = commandClass.GetMembers(bFlag);
+
+				foreach (MemberInfo info in members)
+				{
+					if ((info.MemberType & MemberTypes.Method) != 0)
+					{
+						MethodInfo mInfo = commandClass.GetMethod(info.Name, bFlag);
+
+						object[] customAtts = mInfo.GetCustomAttributes(true);
+
+						foreach (object att in customAtts)
+						{
+							if (att is ConsoleCommandMethod)
+							{
+								ConsoleCommandMethod cc = (ConsoleCommandMethod)att;
+								cc.bindingFlag = bFlag;
+								cc.memberInfo = info;
+								cc.methodInfo = mInfo;
+								cc.name = info.Name;
+
+								cmdList.Add(info.Name, cc);
+
+								break;
+							}
+						}
+					}
+				}
+			}
+
+			return cmdList;
+		}
+
+		public int GetConsoleWidth()
+		{
+			int size = this.getWidth();
+
+			if (size == 0)
+			{
+				size = 80;
+			}
+
+			if (size < 32)
+			{
+				size = 32;
+			}
+
+			if (size > 65535)
+			{
+				size = 65535;
+			}
+
+			return size;
+		}
+
+		public static bool SeparateCommandAndParam(string src, out string cmd, out string param)
+		{
+			int i, len;
+			StringBuilder tmp;
+			string src_tmp;
+			cmd = param = null;
+			if (src == null)
+			{
+				return false;
+			}
+
+			src_tmp = Str.TrimCrlf(src).Trim();
+
+			len = src_tmp.Length;
+			tmp = new StringBuilder();
+
+			for (i = 0; i < (len + 1); i++)
+			{
+				char c;
+
+				if (i != len)
+				{
+					c = src_tmp[i];
+				}
+				else
+				{
+					c = (char)0;
+				}
+
+				switch (c)
+				{
+					case (char)0:
+					case ' ':
+					case '\t':
+						if (Str.IsEmptyStr(tmp.ToString()))
+						{
+							return false;
+						}
+						cmd = tmp.ToString().Trim();
+						goto ESCAPE;
+
+					default:
+						tmp.Append(c);
+						break;
+				}
+			}
+
+		ESCAPE:
+			param = src_tmp.Substring(tmp.Length).Trim();
+
+			return true;
+		}
+
+		public static string[] GetRealnameCandidate(string inputName, string[] realNameList)
+		{
+			List<string> o = new List<string>();
+			if (inputName == null || realNameList == null)
+			{
+				return new string[0];
+			}
+
+			int i;
+			bool ok = false;
+			for (i = 0; i < realNameList.Length; i++)
+			{
+				string name = realNameList[i];
+
+				if (Str.StrCmpi(name, inputName))
+				{
+					o.Add(name);
+					ok = true;
+					break;
+				}
+			}
+
+			if (ok == false)
+			{
+				for (i = 0; i < realNameList.Length; i++)
+				{
+					string name = realNameList[i];
+
+					if (IsOmissionName(inputName, name) ||
+						IsNameInRealName(inputName, name))
+					{
+						o.Add(name);
+						ok = true;
+					}
+				}
+			}
+
+			if (ok)
+			{
+				return o.ToArray();
+			}
+			else
+			{
+				return new string[0];
+			}
+		}
+
+		public static bool IsOmissionName(string inputName, string realName)
+		{
+			string oname;
+			if (inputName == null || realName == null)
+			{
+				return false;
+			}
+
+			if (Str.IsAllUpperStr(realName))
+			{
+				return false;
+			}
+
+			oname = GetOmissionName(realName);
+
+			if (Str.IsEmptyStr(oname))
+			{
+				return false;
+			}
+
+			if (oname.StartsWith(inputName, StringComparison.InvariantCultureIgnoreCase))
+			{
+				return true;
+			}
+
+			if (inputName.StartsWith(oname, StringComparison.InvariantCultureIgnoreCase))
+			{
+				if (realName.EndsWith(inputName.Substring(oname.Length), StringComparison.InvariantCultureIgnoreCase))
+				{
+					return true;
+				}
+			}
+
+			return false;
+		}
+
+		public static string GetOmissionName(string src)
+		{
+			int i, len;
+			if (src == null)
+			{
+				return null;
+			}
+
+			string dst = "";
+			len = src.Length;
+
+			for (i = 0; i < len; i++)
+			{
+				char c = src[i];
+
+				if ((c >= '0' && c <= '9') ||
+					(c >= 'A' && c <= 'Z'))
+				{
+					dst += c;
+				}
+			}
+
+			return dst;
+		}
+
+		public static bool IsNameInRealName(string inputName, string realName)
+		{
+			if (inputName == null || realName == null)
+			{
+				return false;
+			}
+
+			if (realName.StartsWith(inputName, StringComparison.InvariantCultureIgnoreCase))
+			{
+				return true;
+			}
+
+			return false;
+		}
+
+		public ConsoleParamValueList ParseCommandList(string cmdName, string command, ConsoleParam[] param)
+		{
+			ConsoleParamValueList ret = parseCommandLineMain(cmdName, command, param);
+
+			if (ret == null)
+			{
+				throw new ConsoleUserCancelException("");
+			}
+
+			return ret;
+		}
+		private ConsoleParamValueList parseCommandLineMain(string cmdName, string command, ConsoleParam[] param)
+		{
+			int i;
+			ConsoleParamValueList o;
+			List<string> param_list;
+			List<string> real_name_list;
+			bool help_mode = false;
+			string tmp;
+			bool ok = true;
+			if (command == null || cmdName == null)
+			{
+				return null;
+			}
+
+			for (i = 0; i < param.Length; i++)
+			{
+				if (Str.IsEmptyStr(param[i].Name) == false)
+				{
+					if (param[i].Name.StartsWith("["))
+					{
+						param[i].Tmp = "";
+					}
+					else
+					{
+						param[i].Tmp = null;
+					}
+				}
+				else
+				{
+					param[i].Tmp = "";
+				}
+			}
+
+			param_list = Str.StrArrayToList(GetCommandNameList(command));
+
+			real_name_list = new List<string>();
+
+			for (i = 0; i < param.Length; i++)
+			{
+				real_name_list.Add(param[i].Name);
+			}
+
+			for (i = 0; i < param_list.Count; i++)
+			{
+				string s = param_list[i];
+
+				if (Str.StrCmpi(s, "help") ||
+					Str.StrCmpi(s, "?"))
+				{
+					help_mode = true;
+					break;
+				}
+			}
+
+			tmp = ParseCommand(command, "");
+			if (tmp != null)
+			{
+				if (Str.StrCmpi(tmp, "?"))
+				{
+					help_mode = true;
+				}
+			}
+
+			if (help_mode)
+			{
+				PrintCmdHelp(cmdName, real_name_list);
+				return null;
+			}
+
+			for (i = 0; i < param_list.Count; i++)
+			{
+				string[] candidate = GetRealnameCandidate(param_list[i], real_name_list.ToArray());
+
+				if (candidate != null && candidate.Length >= 1)
+				{
+					if (candidate.Length >= 2)
+					{
+						this.write(Str.FormatC(Resources.CON_AMBIGIOUS_PARAM,
+							param_list[i]));
+
+						this.write(Str.FormatC(Resources.CON_AMBIGIOUS_PARAM_1,
+							cmdName));
+
+						PrintCandidateHelp(cmdName, candidate, 1, this.currentCmdList);
+						this.write(Resources.CON_AMBIGIOUS_PARAM_2);
+
+						ok = false;
+					}
+					else
+					{
+						int j;
+						string real_name = candidate[0];
+
+						for (j = 0; j < param.Length; j++)
+						{
+							if (Str.StrCmpi(param[j].Name, real_name))
+							{
+								param[j].Tmp = param_list[i];
+							}
+						}
+					}
+				}
+				else
+				{
+					this.write(Str.FormatC(Resources.CON_INVALID_PARAM,
+						param_list[i],
+						cmdName,
+						cmdName));
+
+					ok = false;
+				}
+			}
+
+			if (ok == false)
+			{
+				return null;
+			}
+
+			o = new ConsoleParamValueList();
+
+			for (i = 0; i < param.Length; i++)
+			{
+				ConsoleParam p = param[i];
+				bool is_default_value = false;
+
+				if (p.Tmp == "")
+				{
+					is_default_value = true;
+				}
+
+				if (p.Tmp != null || p.PromptProc != null)
+				{
+					string name = p.Name;
+					string tmp2, str;
+
+					if (p.Tmp != null)
+					{
+						tmp2 = p.Tmp;
+					}
+					else
+					{
+						tmp2 = p.Name;
+					}
+
+					str = ParseCommand(command, tmp2);
+
+					if (str != null)
+					{
+						string unistr;
+						bool ret;
+					EVAL_VALUE:
+						unistr = str;
+
+						if (p.EvalProc != null)
+						{
+							ret = p.EvalProc(this, unistr, p.EvalProcParam);
+						}
+						else
+						{
+							ret = true;
+						}
+
+						if (ret == false)
+						{
+							string tmp3;
+							if (p.PromptProc == null)
+							{
+								ok = false;
+								break;
+							}
+							else
+							{
+								str = null;
+								tmp3 = p.PromptProc(this, p.PromptProcParam);
+								if (tmp3 == null)
+								{
+									ok = false;
+									break;
+								}
+								else
+								{
+									this.write("");
+									str = tmp3;
+									goto EVAL_VALUE;
+								}
+							}
+						}
+						else
+						{
+							o.Add(new ConsoleParamValue(p.Name, str, Str.StrToInt(str), is_default_value));
+						}
+					}
+					else
+					{
+						if (p.PromptProc != null)
+						{
+							string tmp4;
+							tmp4 = p.PromptProc(this, p.PromptProcParam);
+							if (tmp4 == null)
+							{
+								ok = false;
+								break;
+							}
+							else
+							{
+								this.write("");
+								str = tmp4;
+								if (true)
+								{
+									string unistr;
+									bool ret;
+								EVAL_VALUE:
+									unistr = str;
+
+									if (p.EvalProc != null)
+									{
+										ret = p.EvalProc(this, unistr, p.EvalProcParam);
+									}
+									else
+									{
+										ret = true;
+									}
+
+									if (ret == false)
+									{
+										if (p.PromptProc == null)
+										{
+											ok = false;
+											break;
+										}
+										else
+										{
+											str = null;
+											tmp4 = p.PromptProc(this, p.PromptProcParam);
+											if (tmp4 == null)
+											{
+												ok = false;
+												break;
+											}
+											else
+											{
+												this.write("");
+												str = tmp4;
+												goto EVAL_VALUE;
+											}
+										}
+									}
+									else
+									{
+										o.Add(new ConsoleParamValue(p.Name, str, Str.StrToInt(str), is_default_value));
+									}
+								}
+							}
+						}
+					}
+				}
+			}
+
+			if (ok)
+			{
+				return o;
+			}
+			else
+			{
+				return null;
+			}
+		}
+
+		public static string[] GetCommandNameList(string str)
+		{
+			if (str == null)
+			{
+				return new string[0];
+			}
+
+			string[] pl;
+			ParseCommand(str, "dummy_str", out pl);
+
+			return pl;
+		}
+
+		public static string ParseCommand(string str, string name)
+		{
+			string[] pl;
+			return ParseCommand(str, name, out pl);
+		}
+		public static string ParseCommand(string str, string name, out string[] paramList)
+		{
+			int i;
+			string tmp, ret = null;
+			SortedList<string, int> o;
+			paramList = null;
+			if (str == null)
+			{
+				return null;
+			}
+			if (Str.IsEmptyStr(name))
+			{
+				name = null;
+			}
+
+			o = new SortedList<string, int>(new StrComparer(false));
+
+			tmp = str.Trim();
+
+			i = Str.SearchStr(tmp, "/CMD", 0, false);
+
+			if (i >= 1 && tmp[i - 1] == '/')
+			{
+				i = -1;
+			}
+			if (i == -1)
+			{
+				i = Str.SearchStr(tmp, "/CMD\t", 0, false);
+				if (i >= 1 && tmp[i - 1] == '/')
+				{
+					i = -1;
+				}
+			}
+			if (i == -1)
+			{
+				i = Str.SearchStr(tmp, "/CMD:", 0, false);
+				if (i >= 1 && tmp[i - 1] == '/')
+				{
+					i = -1;
+				}
+			}
+			if (i == -1)
+			{
+				i = Str.SearchStr(tmp, "/CMD=", 0, false);
+				if (i >= 1 && tmp[i - 1] == '/')
+				{
+					i = -1;
+				}
+			}
+			if (i == -1)
+			{
+				i = Str.SearchStr(tmp, "-CMD ", 0, false);
+				if (i >= 1 && tmp[i - 1] == '-')
+				{
+					i = -1;
+				}
+			}
+			if (i == -1)
+			{
+				i = Str.SearchStr(tmp, "-CMD\t", 0, false);
+				if (i >= 1 && tmp[i - 1] == '-')
+				{
+					i = -1;
+				}
+			}
+			if (i == -1)
+			{
+				i = Str.SearchStr(tmp, "-CMD:", 0, false);
+				if (i >= 1 && tmp[i - 1] == '-')
+				{
+					i = -1;
+				}
+			}
+			if (i == -1)
+			{
+				i = Str.SearchStr(tmp, "-CMD=", 0, false);
+				if (i >= 1 && tmp[i - 1] == '-')
+				{
+					i = -1;
+				}
+			}
+
+			if (i != -1)
+			{
+				string s = "CMD";
+				if (o != null)
+				{
+					if (o.ContainsKey(s) == false)
+					{
+						o.Add(s, 0);
+					}
+				}
+				if (Str.StrCmpi(name, "CMD"))
+				{
+					ret = str.Substring(i + 5).Trim();
+				}
+				else
+				{
+					tmp = tmp.Substring(0, i);
+				}
+			}
+
+			if (ret == null)
+			{
+				string[] t = Str.ParseCmdLine(tmp);
+
+				if (t != null)
+				{
+					for (i = 0; i < t.Length; i++)
+					{
+						string token = t[i];
+
+						if ((token[0] == '-' && token[1] != '-') ||
+							(Str.StrCmpi(token, "--help")) ||
+							(token[0] == '/' && token[1] != '/'))
+						{
+							int j;
+							if (Str.StrCmpi(token, "--help"))
+							{
+								token = token.Substring(1);
+							}
+
+							j = Str.SearchStr(token, ":", 0, false);
+							if (j == -1)
+							{
+								j = Str.SearchStr(token, "=", 0, false);
+							}
+							if (j != -1)
+							{
+								string tmp2;
+								string a;
+
+								tmp2 = token;
+								if (tmp2.Length >= j)
+								{
+									tmp2 = tmp2.Substring(0, j);
+								}
+
+								a = tmp2.Substring(1);
+								if (o != null)
+								{
+									if (o.ContainsKey(a) == false)
+									{
+										o.Add(a, 0);
+									}
+								}
+
+								if (tmp2.Length >= 1 && Str.StrCmpi(name, tmp2.Substring(1)))
+								{
+									if (ret == null)
+									{
+										ret = token.Substring(j + 1);
+									}
+								}
+							}
+							else
+							{
+								string a = token.Substring(1);
+
+								if (o != null)
+								{
+									if (o.ContainsKey(a) == false)
+									{
+										o.Add(a, 0);
+									}
+
+									if (Str.StrCmpi(name, token.Substring(1)))
+									{
+										if (ret == null)
+										{
+											ret = "";
+										}
+									}
+								}
+							}
+						}
+						else
+						{
+							if (name == null)
+							{
+								if (ret == null)
+								{
+									if (token.StartsWith("--"))
+									{
+										ret = token.Substring(1);
+									}
+									else if (token.StartsWith("//"))
+									{
+										ret = token.Substring(1);
+									}
+									else
+									{
+										ret = token;
+									}
+								}
+							}
+						}
+					}
+				}
+			}
+
+			if (o != null)
+			{
+				List<string> t = new List<string>();
+
+				int j;
+				for (j = 0; j < o.Count; j++)
+				{
+					t.Add(o.Keys[j]);
+				}
+
+				paramList = t.ToArray();
+			}
+
+			if (ret != null)
+			{
+				if (Str.StrCmpi(ret, "none") || Str.StrCmpi(ret, "null"))
+				{
+					ret = "";
+				}
+			}
+
+			return ret;
+		}
+
+		public static ConsoleService NewLocalConsoleService()
+		{
+			return NewLocalConsoleService(null, null);
+		}
+		public static ConsoleService NewLocalConsoleService(string outFileName)
+		{
+			return NewLocalConsoleService(null, outFileName);
+		}
+		public static ConsoleService NewLocalConsoleService(string inFileName, string outFileName)
+		{
+			IO in_io = null, out_io = null;
+
+			ConsoleService c = new ConsoleService();
+			int old_size = 0;
+
+			c.consoleType = ConsoleType.Local;
+			c.free = new ConsoleFreeDelegate(c.localFree);
+			c.readLine = new ConsoleReadLineDelegate(c.localReadLine);
+			c.readPassword = new ConsoleReadPasswordDelegate(c.localReadPassword);
+			c.write = new ConsoleWriteDelegate(c.localWrite);
+			c.getWidth = new ConsoleGetWidthDelegate(c.localGetWidth);
+
+			if (Str.IsEmptyStr(inFileName) == false)
+			{
+				try
+				{
+					in_io = IO.FileOpen(inFileName, false);
+				}
+				catch
+				{
+					c.write(Str.FormatC(Resources.CON_INFILE_ERROR, inFileName));
+					return null;
+				}
+				c.write(Str.FormatC(Resources.CON_INFILE_START, inFileName));
+			}
+
+			if (Str.IsEmptyStr(outFileName) == false)
+			{
+				try
+				{
+					out_io = IO.FileCreate(outFileName);
+				}
+				catch
+				{
+					c.write(Str.FormatC(Resources.CON_OUTFILE_ERROR, outFileName));
+					if (in_io != null)
+					{
+						in_io.Close();
+					}
+
+					return null;
+				}
+				c.write(Str.FormatC(Resources.CON_OUTFILE_START, outFileName));
+			}
+
+			c.inFile = in_io;
+			c.outFile = out_io;
+			c.win32_OldConsoleWidth = old_size;
+
+			if (in_io != null)
+			{
+				byte[] data = in_io.ReadAll();
+
+				c.inBuf = new Buf(data);
+			}
+
+			Con.SetConsoleService(c);
+
+			return c;
+		}
+
+		void localFree()
+		{
+			if (inFile != null)
+			{
+				inFile.Close();
+				inFile = null;
+			}
+
+			if (outFile != null)
+			{
+				outFile.Close();
+				outFile = null;
+			}
+		}
+
+		int localGetWidth()
+		{
+			int ret = Console.WindowWidth;
+
+			if (ret <= 0)
+			{
+				ret = 1;
+			}
+
+			return ret;
+		}
+
+		string localReadLine(string prompt, bool noFile)
+		{
+			string ret;
+			if (prompt == null)
+			{
+				prompt = ">";
+			}
+
+			writeOutFile(prompt, false);
+
+			if (noFile == false && inBuf != null)
+			{
+				ret = readNextFromInFile();
+
+				if (ret != null)
+				{
+					Console.Write(prompt);
+
+					Console.WriteLine(ret);
+				}
+			}
+			else
+			{
+				Console.Write(prompt);
+				ret = Console.ReadLine();
+
+				if (ret != null)
+				{
+					if (ret.IndexOf((char)0x04) != -1 || ret.IndexOf((char)0x1a) != -1)
+					{
+						ret = null;
+					}
+				}
+			}
+
+			if (ret != null)
+			{
+				writeOutFile(ret, true);
+			}
+			else
+			{
+				writeOutFile("[EOF]", true);
+			}
+
+			return ret;
+		}
+
+		string localReadPassword(string prompt)
+		{
+			if (prompt == null)
+			{
+				prompt = "Password>";
+			}
+
+			Console.Write(prompt);
+			writeOutFile(prompt, false);
+
+			string tmp = Str.PasswordPrompt();
+			if (tmp != null)
+			{
+				writeOutFile("********", true);
+				return tmp;
+			}
+
+			return null;
+		}
+
+		bool localWrite(string str)
+		{
+			Console.Write("{0}{1}",
+				str,
+				(str.EndsWith("\n") ? "" : "\n"));
+
+			writeOutFile(str, true);
+
+			return true;
+		}
+
+		string readNextFromInFile()
+		{
+			if (inBuf == null)
+			{
+				return null;
+			}
+
+			while (true)
+			{
+				string str = inBuf.ReadNextLineAsString();
+				if (str == null)
+				{
+					return null;
+				}
+
+				str = str.Trim();
+
+				if (Str.IsEmptyStr(str) == false)
+				{
+					return str;
+				}
+			}
+		}
+
+		void writeOutFile(string str, bool addLastCrlf)
+		{
+			if (outFile != null)
+			{
+				string tmp = Str.NormalizeCrlf(str);
+
+				outFile.Write(Str.Utf8Encoding.GetBytes(str));
+
+				if (str.EndsWith("\n") == false && addLastCrlf)
+				{
+					outFile.Write(Str.Utf8Encoding.GetBytes(Env.NewLine));
+				}
+
+				outFile.Flush();
+			}
+		}
+	}
+}
+
+// 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/

+ 497 - 0
src/BuildUtil/CoreUtil/Csv.cs

@@ -0,0 +1,497 @@
+// CoreUtil
+// 
+// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved.
+// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved.
+// Comments: Tetsuo Sugiyama, Ph.D.
+// 
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// version 2 as published by the Free Software Foundation.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License version 2
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// 
+// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE
+// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE.
+// 
+// 
+// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN,
+// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY,
+// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS
+// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS
+// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER
+// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL
+// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING,
+// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR
+// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
+// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO
+// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO,
+// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION
+// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN
+// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE.
+// 
+// USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS
+// SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
+// PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
+// COUNTRIES MIGHT BE RESTRICTED.
+// 
+// 
+// DEAR SECURITY EXPERTS
+// ---------------------
+// 
+// If you find a bug or a security vulnerability please kindly inform us
+// about the problem immediately so that we can fix the security problem
+// to protect a lot of users around the world as soon as possible.
+// 
+// Our e-mail address for security reports is:
+// softether-vpn-security [at] softether.org
+// 
+// Please note that the above e-mail address is not a technical support
+// inquiry address. If you need technical assistance, please visit
+// http://www.softether.org/ and ask your question on the users forum.
+// 
+// Thank you for your cooperation.
+
+
+using System;
+using System.Threading;
+using System.Data;
+using System.Data.Sql;
+using System.Data.SqlClient;
+using System.Data.SqlTypes;
+using System.Text;
+using System.Configuration;
+using System.Collections;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using System.IO;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Drawing.Drawing2D;
+using System.Web.Mail;
+
+
+namespace CoreUtil
+{
+	class CsvTimeSpan
+	{
+		public DateTime StartDateTime;
+		public DateTime EndDateTime;
+		public int StartIndex;
+		public int NumIndex;
+
+		public CsvTimeSpan(DateTime startDateTime, DateTime endDateTime, int startIndex, int numIndex)
+		{
+			StartDateTime = startDateTime;
+			EndDateTime = endDateTime;
+			StartIndex = startIndex;
+			NumIndex = numIndex;
+		}
+	}
+
+	public class Csv
+	{
+		List<CsvEntry> entryList;
+		Encoding encoding;
+		static Encoding defaultEncoding = Str.ShiftJisEncoding;
+
+		public Encoding Encoding
+		{
+			get
+			{
+				return encoding;
+			}
+			set
+			{
+				this.encoding = value;
+			}
+		}
+
+		public CsvEntry First
+		{
+			get
+			{
+				return entryList[0];
+			}
+		}
+
+		public CsvEntry Last
+		{
+			get
+			{
+				return entryList[entryList.Count - 1];
+			}
+		}
+
+		public Csv()
+			: this(defaultEncoding)
+		{
+		}
+		public Csv(Encoding encoding)
+		{
+			init(null, encoding);
+		}
+
+		public Csv(string filename)
+			: this(filename, defaultEncoding)
+		{
+		}
+		public Csv(string filename, Encoding encoding)
+		{
+			init(Buf.ReadFromFile(filename), encoding);
+		}
+
+		public Csv(Buf data)
+		{
+			byte[] src = data.ByteData;
+			int bomSize;
+
+			Encoding enc = Str.CheckBOM(src, out bomSize);
+
+			if (bomSize >= 1)
+			{
+				src = Util.RemoveStartByteArray(src, bomSize);
+			}
+
+			init(new Buf(src), enc);
+		}
+		public Csv(Buf data, Encoding encoding)
+		{
+			init(data, encoding);
+		}
+
+		void init(Buf data, Encoding encoding)
+		{
+			if (encoding == null)
+			{
+				encoding = defaultEncoding;
+			}
+
+			int bomSize = 0;
+			Encoding enc2 = null;
+			if (data != null)
+			{
+				enc2 = Str.CheckBOM(data.ByteData, out bomSize);
+			}
+			if (bomSize >= 1)
+			{
+				data = new Buf(Util.RemoveStartByteArray(data.ByteData, bomSize));
+			}
+			if (enc2 != null)
+			{
+				encoding = enc2;
+			}
+			this.encoding = encoding;
+
+			entryList = new List<CsvEntry>();
+
+			if (data != null)
+			{
+				MemoryStream ms = new MemoryStream(data.ByteData);
+				StreamReader sr = new StreamReader(ms, this.encoding);
+
+				while (true)
+				{
+					string s = sr.ReadLine();
+
+					if (s == null)
+					{
+						break;
+					}
+
+					char[] sep = { ',' };
+					string[] strings = s.Trim().Split(sep, StringSplitOptions.None);
+
+					CsvEntry e = new CsvEntry(strings);
+					Add(e);
+				}
+			}
+		}
+
+		public override string ToString()
+		{
+			StringBuilder b = new StringBuilder();
+
+			foreach (CsvEntry e in entryList)
+			{
+				b.AppendLine(e.ToString());
+			}
+
+			return b.ToString();
+		}
+
+		public Buf ToBuf()
+		{
+			string s = ToString();
+
+			Buf b = new Buf();
+
+			byte[] bom = Str.GetBOM(this.Encoding);
+
+			if (bom != null)
+			{
+				b.Write(bom);
+			}
+
+			b.Write(encoding.GetBytes(s));
+
+			b.SeekToBegin();
+
+			return b;
+		}
+
+		public void SaveToFile(string filename)
+		{
+			File.WriteAllBytes(filename, ToBuf().ByteData);
+		}
+
+		public void Add(CsvEntry e)
+		{
+			entryList.Add(e);
+		}
+
+		public int Count
+		{
+			get
+			{
+				return entryList.Count;
+			}
+		}
+
+		public CsvEntry this[int index]
+		{
+			get
+			{
+				return entryList[index];
+			}
+		}
+
+		public IEnumerable Items
+		{
+			get
+			{
+				int i;
+				for (i = 0; i < entryList.Count; i++)
+				{
+					yield return entryList[i];
+				}
+			}
+		}
+
+		CsvCompare csvCompareMethod;
+		int csvCompareIndex;
+		Type csvCompareType;
+		bool csvCompareReverse;
+
+		int sortInternal(CsvEntry e1, CsvEntry e2)
+		{
+			if (csvCompareMethod != null)
+			{
+				object o1 = e1.Convert(csvCompareType, csvCompareIndex);
+				object o2 = e2.Convert(csvCompareType, csvCompareIndex);
+
+				return csvCompareMethod(o1, o2) * (csvCompareReverse ? -1 : 1);
+			}
+			else
+			{
+				IComparable o1 = (IComparable)e1.Convert(csvCompareType, csvCompareIndex);
+				IComparable o2 = (IComparable)e2.Convert(csvCompareType, csvCompareIndex);
+
+				return o1.CompareTo(o2) * (csvCompareReverse ? -1 : 1);
+			}
+		}
+
+		public void Sort(Type type)
+		{
+			Sort(null, type);
+		}
+		public void Sort(CsvCompare cmp, Type type)
+		{
+			Sort(cmp, type, false);
+		}
+		public void Sort(Type type, bool reverse)
+		{
+			Sort(null, type, reverse);
+		}
+		public void Sort(CsvCompare cmp, Type type, bool reverse)
+		{
+			Sort(cmp, 0, type, reverse);
+		}
+		public void Sort(int index, Type type)
+		{
+			Sort(null, index, type);
+		}
+		public void Sort(CsvCompare cmp, int index, Type type)
+		{
+			Sort(cmp, 0, type, false);
+		}
+		public void Sort(int index, Type type, bool reverse)
+		{
+			Sort(null, index, type, reverse);
+		}
+		public void Sort(CsvCompare cmp, int index, Type type, bool reverse)
+		{
+			csvCompareMethod = cmp;
+			csvCompareIndex = index;
+			csvCompareType = type;
+			csvCompareReverse = reverse;
+
+			entryList.Sort(new Comparison<CsvEntry>(sortInternal));
+		}
+
+		public static int CompareString(object o1, object o2)
+		{
+			string s1 = (string)o1;
+			string s2 = (string)o2;
+			return s1.CompareTo(s2);
+		}
+
+		public static int CompareDatetime(object o1, object o2)
+		{
+			DateTime d1 = (DateTime)o1;
+			DateTime d2 = (DateTime)o2;
+
+			return d1.CompareTo(d2);
+		}
+
+		public void SetEncoding(Encoding e)
+		{
+			this.encoding = e;
+		}
+
+		public Csv Clone()
+		{
+			Csv csv = new Csv(this.encoding);
+
+			foreach (CsvEntry e in entryList)
+			{
+				csv.Add(e.Clone());
+			}
+
+			return csv;
+		}
+	}
+
+	public delegate int CsvCompare(object o1, object o2);
+
+	public class CsvEntry
+	{
+		List<string> strings;
+
+		public CsvEntry Clone()
+		{
+			string[] array = (string[])strings.ToArray().Clone();
+
+			CsvEntry e = new CsvEntry(array);
+
+			return e;
+		}
+
+		public CsvEntry(params string[] elements)
+		{
+			strings = new List<string>();
+			foreach (string s in elements)
+			{
+				string str = s;
+
+				if (str.StartsWith("\"") && str.EndsWith("\"") && str.Length >= 2)
+				{
+					str = str.Substring(1, str.Length - 2);
+				}
+
+				strings.Add(str);
+			}
+		}
+
+		public string this[int index]
+		{
+			get
+			{
+				return strings[index];
+			}
+		}
+
+		public int Count
+		{
+			get
+			{
+				return strings.Count;
+			}
+		}
+
+		public override string ToString()
+		{
+			int i, num;
+			string ret = "";
+
+			num = strings.Count;
+			for (i = 0; i < num; i++)
+			{
+				string s = strings[i];
+
+				s = Str.ReplaceStr(s, ",", ".", false);
+				s = Str.ReplaceStr(s, "\r\n", " ", false);
+				s = Str.ReplaceStr(s, "\r", " ", false);
+				s = Str.ReplaceStr(s, "\n", " ", false);
+
+				ret += s;
+
+				if ((i + 1) < num)
+				{
+					ret += ",";
+				}
+			}
+
+			return ret;
+		}
+
+		Type lastType = null;
+		object lastObject = null;
+		int lastIndex = -1;
+
+		public object Convert(Type type, int index)
+		{
+			if (lastType == type && lastIndex == index)
+			{
+				return lastObject;
+			}
+
+			lastType = type;
+			lastIndex = index;
+			lastObject = System.Convert.ChangeType(strings[index], type);
+
+			return lastObject;
+		}
+
+		public DateTime ToDateTime(int index)
+		{
+			return (DateTime)Convert(typeof(DateTime), index);
+		}
+	}
+}
+
+
+// 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/

+ 572 - 0
src/BuildUtil/CoreUtil/Env.cs

@@ -0,0 +1,572 @@
+// CoreUtil
+// 
+// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved.
+// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved.
+// Comments: Tetsuo Sugiyama, Ph.D.
+// 
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// version 2 as published by the Free Software Foundation.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License version 2
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// 
+// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE
+// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE.
+// 
+// 
+// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN,
+// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY,
+// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS
+// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS
+// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER
+// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL
+// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING,
+// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR
+// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
+// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO
+// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO,
+// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION
+// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN
+// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE.
+// 
+// USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS
+// SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
+// PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
+// COUNTRIES MIGHT BE RESTRICTED.
+// 
+// 
+// DEAR SECURITY EXPERTS
+// ---------------------
+// 
+// If you find a bug or a security vulnerability please kindly inform us
+// about the problem immediately so that we can fix the security problem
+// to protect a lot of users around the world as soon as possible.
+// 
+// Our e-mail address for security reports is:
+// softether-vpn-security [at] softether.org
+// 
+// Please note that the above e-mail address is not a technical support
+// inquiry address. If you need technical assistance, please visit
+// http://www.softether.org/ and ask your question on the users forum.
+// 
+// Thank you for your cooperation.
+
+
+using System;
+using System.Threading;
+using System.Data;
+using System.Data.Sql;
+using System.Data.SqlClient;
+using System.Data.SqlTypes;
+using System.Text;
+using System.Configuration;
+using System.Collections;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using System.IO;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Drawing.Drawing2D;
+using System.Diagnostics;
+using System.Web.Mail;
+using System.Net;
+using System.Net.Sockets;
+using System.Net.NetworkInformation;
+using System.Net.Mail;
+using System.Net.Mime;
+using System.Reflection;
+using CoreUtil;
+
+namespace CoreUtil
+{
+	public static class Env
+	{
+		static object lockObj = new object();
+		static bool inited = false;
+
+		static Env()
+		{
+			initCache();
+		}
+
+		static void initCache()
+		{
+			lock (lockObj)
+			{
+				if (inited == false)
+				{
+					initValues();
+					inited = true;
+				}
+			}
+		}
+
+		static string homeDir;
+		static public string HomeDir
+		{
+			get { return homeDir; }
+		}
+		static string exeFileName;
+		static public string ExeFileName
+		{
+			get { return exeFileName; }
+		}
+		static string exeFileDir;
+		static public string ExeFileDir
+		{
+			get { return exeFileDir; }
+		}
+		static string windowsDir;
+		static public string WindowsDir
+		{
+			get { return windowsDir; }
+		}
+		static string systemDir;
+		static public string SystemDir
+		{
+			get { return systemDir; }
+		}
+		static string tempDir;
+		static public string TempDir
+		{
+			get { return tempDir; }
+		}
+		static string winTempDir;
+		static public string WinTempDir
+		{
+			get { return winTempDir; }
+		}
+		static string windowsDrive;
+		static public string WindowsDrive
+		{
+			get { return windowsDrive; }
+		}
+		static string programFilesDir;
+		static public string ProgramFilesDir
+		{
+			get { return programFilesDir; }
+		}
+		static string personalStartMenuDir;
+		static public string PersonalStartMenuDir
+		{
+			get { return personalStartMenuDir; }
+		}
+		static string personalProgramsDir;
+		static public string PersonalProgramsDir
+		{
+			get { return personalProgramsDir; }
+		}
+		static string personalStartupDir;
+		static public string PersonalStartupDir
+		{
+			get { return personalStartupDir; }
+		}
+		static string personalAppDataDir;
+		static public string PersonalAppDataDir
+		{
+			get { return personalAppDataDir; }
+		}
+		static string personalDesktopDir;
+		static public string PersonalDesktopDir
+		{
+			get { return personalDesktopDir; }
+		}
+		static string myDocumentsDir;
+		static public string MyDocumentsDir
+		{
+			get { return myDocumentsDir; }
+		}
+		static string localAppDataDir;
+		static public string LocalAppDataDir
+		{
+			get { return localAppDataDir; }
+		}
+		static string userName;
+		static public string UserName
+		{
+			get { return userName; }
+		}
+		static string userNameEx;
+		static public string UserNameEx
+		{
+			get { return userNameEx; }
+		}
+		static string machineName;
+		static public string MachineName
+		{
+			get { return machineName; }
+		}
+		static string commandLine;
+		public static string CommandLine
+		{
+			get { return commandLine; }
+		}
+		public static StrToken CommandLineList
+		{
+			get
+			{
+				return new StrToken(CommandLine);
+			}
+		}
+		static OperatingSystem osInfo;
+		public static OperatingSystem OsInfo
+		{
+			get { return osInfo; }
+		}
+		static bool isNt;
+		public static bool IsNt
+		{
+			get { return isNt; }
+		}
+		static bool is9x;
+		public static bool Is9x
+		{
+			get { return is9x; }
+		}
+		static bool isCe;
+		public static bool IsCe
+		{
+			get { return isCe; }
+		}
+		static bool isLittleEndian;
+		public static bool IsLittleEndian
+		{
+			get { return Env.isLittleEndian; }
+		}
+		public static bool IsBigEndian
+		{
+			get { return !IsLittleEndian; }
+		}
+		static bool isAdmin;
+		public static bool IsAdmin
+		{
+			get { return Env.isAdmin; }
+		}
+		static int processId;
+		public static int ProcessId
+		{
+			get { return Env.processId; }
+		}
+		static string myTempDir;
+		public static string MyTempDir
+		{
+			get { return myTempDir; }
+		}
+		static IO lockFile;
+
+		public static bool Is64BitProcess
+		{
+			get
+			{
+				return (IntPtr.Size == 8);
+			}
+		}
+
+		public static bool Is64BitWindows
+		{
+			get
+			{
+				return Is64BitProcess || Kernel.InternalCheckIsWow64();
+			}
+		}
+
+		public static bool IsWow64
+		{
+			get
+			{
+				return Kernel.InternalCheckIsWow64();
+			}
+		}
+
+		static void initValues()
+		{
+			exeFileName = IO.RemoteLastEnMark(getMyExeFileName());
+			if (Str.IsEmptyStr(exeFileName) == false)
+			{
+				exeFileDir = IO.RemoteLastEnMark(Path.GetDirectoryName(exeFileName));
+			}
+			else
+			{
+				exeFileDir = "";
+			}
+			homeDir = IO.RemoteLastEnMark(Kernel.GetEnvStr("HOME"));
+			if (Str.IsEmptyStr(homeDir))
+			{
+				homeDir = IO.RemoteLastEnMark(Kernel.GetEnvStr("HOMEDRIVE") + Kernel.GetEnvStr("HOMEPATH"));
+			}
+			if (Str.IsEmptyStr(homeDir))
+			{
+				homeDir = CurrentDir;
+			}
+			systemDir = IO.RemoteLastEnMark(Environment.GetFolderPath(Environment.SpecialFolder.System));
+			windowsDir = IO.RemoteLastEnMark(Path.GetDirectoryName(systemDir));
+			tempDir = IO.RemoteLastEnMark(Path.GetTempPath());
+			winTempDir = IO.RemoteLastEnMark(Path.Combine(windowsDir, "Temp"));
+			IO.MakeDir(winTempDir);
+			if (windowsDir.Length >= 2 && windowsDir[1] == ':')
+			{
+				windowsDrive = windowsDir.Substring(0, 2).ToUpper();
+			}
+			else
+			{
+				windowsDrive = "C:";
+			}
+			programFilesDir = IO.RemoteLastEnMark(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles));
+			personalStartMenuDir = IO.RemoteLastEnMark(Environment.GetFolderPath(Environment.SpecialFolder.StartMenu));
+			personalProgramsDir = IO.RemoteLastEnMark(Environment.GetFolderPath(Environment.SpecialFolder.Programs));
+			personalStartupDir = IO.RemoteLastEnMark(Environment.GetFolderPath(Environment.SpecialFolder.Startup));
+			personalAppDataDir = IO.RemoteLastEnMark(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData));
+			personalDesktopDir = IO.RemoteLastEnMark(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory));
+			myDocumentsDir = IO.RemoteLastEnMark(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments));
+			localAppDataDir = IO.RemoteLastEnMark(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData));
+			userName = Environment.UserName;
+			try
+			{
+				userNameEx = Environment.UserDomainName + "\\" + userName;
+			}
+			catch
+			{
+				userNameEx = userName;
+			}
+			machineName = Environment.MachineName;
+			commandLine = initCommandLine(Environment.CommandLine);
+			osInfo = Environment.OSVersion;
+			isNt = (osInfo.Platform == PlatformID.Win32NT);
+			isCe = (osInfo.Platform == PlatformID.WinCE);
+			is9x = !(isNt || isCe);
+			isLittleEndian = BitConverter.IsLittleEndian;
+			processId = System.Diagnostics.Process.GetCurrentProcess().Id;
+			isAdmin = checkIsAdmin();
+			initMyTempDir();
+		}
+
+		static void deleteUnusedTempDir()
+		{
+			DirEntry[] files;
+
+			files = IO.EnumDir(Env.tempDir);
+
+			foreach (DirEntry e in files)
+			{
+				if (e.IsFolder)
+				{
+					if (e.FileName.StartsWith("NET_", StringComparison.CurrentCultureIgnoreCase) && e.FileName.Length == 8)
+					{
+						string dirFullName = Path.Combine(Env.tempDir, e.fileName);
+						string lockFileName = Path.Combine(dirFullName, "LockFile.dat");
+						bool deleteNow = false;
+
+						try
+						{
+							IO io = IO.FileOpen(lockFileName);
+							io.Close();
+
+							try
+							{
+								io = IO.FileOpen(lockFileName, true);
+								deleteNow = true;
+								io.Close();
+							}
+							catch
+							{
+							}
+						}
+						catch
+						{
+							DirEntry[] files2;
+
+							deleteNow = true;
+
+							try
+							{
+								files2 = IO.EnumDir(dirFullName);
+
+								foreach (DirEntry e2 in files2)
+								{
+									if (e2.IsFolder == false)
+									{
+										string fullPath = Path.Combine(dirFullName, e2.fileName);
+
+										try
+										{
+											IO io2 = IO.FileOpen(fullPath, true);
+											io2.Close();
+										}
+										catch
+										{
+											deleteNow = false;
+										}
+									}
+								}
+							}
+							catch
+							{
+								deleteNow = false;
+							}
+						}
+
+						if (deleteNow)
+						{
+							IO.DeleteDir(dirFullName, true);
+						}
+					}
+				}
+			}
+		}
+
+		static void initMyTempDir()
+		{
+			try
+			{
+				deleteUnusedTempDir();
+			}
+			catch
+			{
+			}
+
+			int num = 0;
+
+			while (true)
+			{
+				byte[] rand = Secure.Rand(2);
+				string tmp2 = Str.ByteToStr(rand);
+
+				string tmp = Path.Combine(Env.tempDir, "NET_" + tmp2);
+
+				if (IO.IsDirExists(tmp) == false && IO.MakeDir(tmp))
+				{
+					Env.myTempDir = tmp;
+
+					break;
+				}
+
+				if ((num++) >= 100)
+				{
+					throw new SystemException();
+				}
+			}
+
+			string lockFileName = Path.Combine(Env.myTempDir, "LockFile.dat");
+			lockFile = IO.FileCreate(lockFileName);
+		}
+
+		static bool checkIsAdmin()
+		{
+			try
+			{
+				string name = "Vpn_Check_Admin_Key_NET_" + processId.ToString();
+				string teststr = Str.GenRandStr();
+
+				if (Reg.WriteStr(RegRoot.LocalMachine, "", name, teststr) == false)
+				{
+					return false;
+				}
+
+				try
+				{
+
+					string ret = Reg.ReadStr(RegRoot.LocalMachine, "", name);
+
+					if (ret == teststr)
+					{
+						return true;
+					}
+
+					return false;
+				}
+				finally
+				{
+					Reg.DeleteValue(RegRoot.LocalMachine, "", name);
+				}
+			}
+			catch
+			{
+				return false;
+			}
+		}
+
+		static string initCommandLine(string src)
+		{
+			try
+			{
+				int i;
+				if (src.Length >= 1 && src[0] == '\"')
+				{
+					i = src.IndexOf('\"', 1);
+				}
+				else
+				{
+					i = src.IndexOf(' ');
+				}
+
+				if (i == -1)
+				{
+					return "";
+				}
+				else
+				{
+					return src.Substring(i + 1).TrimStart(' ');
+				}
+			}
+			catch
+			{
+				return "";
+			}
+		}
+
+		static string getMyExeFileName()
+		{
+			try
+			{
+				Assembly mainAssembly = Assembly.GetEntryAssembly();
+				Module[] modules = mainAssembly.GetModules();
+				return modules[0].FullyQualifiedName;
+			}
+			catch
+			{
+				return "";
+			}
+		}
+
+		static public string CurrentDir
+		{
+			get
+			{
+				return IO.RemoteLastEnMark(Environment.CurrentDirectory);
+			}
+		}
+		static public string NewLine
+		{
+			get
+			{
+				return Environment.NewLine;
+			}
+		}
+	}
+}
+
+// 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/

+ 1702 - 0
src/BuildUtil/CoreUtil/FileIO.cs

@@ -0,0 +1,1702 @@
+// CoreUtil
+// 
+// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved.
+// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved.
+// Comments: Tetsuo Sugiyama, Ph.D.
+// 
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// version 2 as published by the Free Software Foundation.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License version 2
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// 
+// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE
+// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE.
+// 
+// 
+// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN,
+// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY,
+// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS
+// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS
+// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER
+// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL
+// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING,
+// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR
+// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
+// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO
+// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO,
+// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION
+// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN
+// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE.
+// 
+// USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS
+// SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
+// PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
+// COUNTRIES MIGHT BE RESTRICTED.
+// 
+// 
+// DEAR SECURITY EXPERTS
+// ---------------------
+// 
+// If you find a bug or a security vulnerability please kindly inform us
+// about the problem immediately so that we can fix the security problem
+// to protect a lot of users around the world as soon as possible.
+// 
+// Our e-mail address for security reports is:
+// softether-vpn-security [at] softether.org
+// 
+// Please note that the above e-mail address is not a technical support
+// inquiry address. If you need technical assistance, please visit
+// http://www.softether.org/ and ask your question on the users forum.
+// 
+// Thank you for your cooperation.
+
+
+using System;
+using System.Threading;
+using System.Data;
+using System.Data.Sql;
+using System.Data.SqlClient;
+using System.Data.SqlTypes;
+using System.Text;
+using System.Configuration;
+using System.Collections;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using System.IO;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Drawing.Drawing2D;
+using System.Web.Mail;
+
+namespace CoreUtil
+{
+	internal class HamCoreEntry : IComparable
+	{
+		public string FileName = "";
+		public uint Size = 0;
+		public uint SizeCompressed = 0;
+		public uint Offset = 0;
+		public byte[] Buffer = null;
+		public long LastAccess = 0;
+
+		public int CompareTo(object obj)
+		{
+			HamCoreEntry hc1, hc2;
+			hc1 = this;
+			hc2 = (HamCoreEntry)obj;
+
+			return Str.StrCmpiRetInt(hc1.FileName, hc2.FileName);
+		}
+	}
+
+	public class HamCoreBuilderFileEntry : IComparable<HamCoreBuilderFileEntry>
+	{
+		public string Name;
+		public Buf RawData;
+		public Buf CompressedData;
+		public int Offset = 0;
+
+		int IComparable<HamCoreBuilderFileEntry>.CompareTo(HamCoreBuilderFileEntry other)
+		{
+			return this.Name.CompareTo(other.Name);
+		}
+	}
+
+	public class HamCoreBuilder
+	{
+		List<HamCoreBuilderFileEntry> fileList;
+		public List<HamCoreBuilderFileEntry> FileList
+		{
+			get { return fileList; }
+		}
+
+		public bool IsFile(string name)
+		{
+			foreach (HamCoreBuilderFileEntry f in fileList)
+			{
+				if (f.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase))
+				{
+					return true;
+				}
+			}
+
+			return false;
+		}
+
+		public bool DeleteFile(string name)
+		{
+			foreach (HamCoreBuilderFileEntry f in fileList)
+			{
+				if (f.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase))
+				{
+					fileList.Remove(f);
+					return true;
+				}
+			}
+
+			return false;
+		}
+
+		public HamCoreBuilder()
+		{
+			fileList = new List<HamCoreBuilderFileEntry>();
+		}
+
+		public void AddDir(string dirName)
+		{
+			dirName = IO.RemoteLastEnMark(dirName);
+
+			DirEntry[] ee = IO.EnumDirEx(dirName);
+
+			foreach (DirEntry e in ee)
+			{
+				if (e.IsFolder == false)
+				{
+					AddFile(e.FullPath, dirName);
+				}
+			}
+		}
+
+		public void AddFile(string fileName, string baseDirFileName)
+		{
+			string name = IO.GetRelativeFileName(fileName, baseDirFileName);
+
+			AddFile(name, File.ReadAllBytes(fileName));
+		}
+
+		public void AddFile(string name, byte[] data)
+		{
+			if (IsFile(name))
+			{
+				throw new InvalidOperationException("fileName");
+			}
+
+			HamCoreBuilderFileEntry f = new HamCoreBuilderFileEntry();
+
+			Console.Write("{0}: ", name);
+
+			f.Name = name;
+			f.RawData = new Buf(Util.CloneByteArray(data));
+			Console.Write("{0} -> ", f.RawData.Size);
+			f.CompressedData = new Buf(ZLib.Compress(f.RawData.ByteData));
+			Console.WriteLine("{0}", f.CompressedData.Size);
+
+			this.fileList.Add(f);
+		}
+
+		public void Build(string dstFileName)
+		{
+			Buf b = Build();
+
+			IO.SaveFile(dstFileName, b.ByteData);
+		}
+
+		public Buf Build()
+		{
+			int z;
+			Buf b;
+
+			this.fileList.Sort();
+
+			z = 0;
+
+			z += HamCore.HamcoreHeaderSize;
+
+			z += sizeof(int);
+
+			foreach (HamCoreBuilderFileEntry f in this.fileList)
+			{
+				z += Str.ShiftJisEncoding.GetByteCount(f.Name) + sizeof(int);
+				z += sizeof(int);
+				z += sizeof(int);
+				z += sizeof(int);
+			}
+			foreach (HamCoreBuilderFileEntry f in this.fileList)
+			{
+				f.Offset = z;
+				z += (int)f.CompressedData.Size;
+			}
+
+			b = new Buf();
+			b.Write(Str.ShiftJisEncoding.GetBytes(HamCore.HamcoreHeaderData));
+			b.WriteInt((uint)this.fileList.Count);
+			foreach (HamCoreBuilderFileEntry f in this.fileList)
+			{
+				b.WriteStr(f.Name, true);
+				b.WriteInt(f.RawData.Size);
+				b.WriteInt(f.CompressedData.Size);
+				b.WriteInt((uint)f.Offset);
+			}
+			foreach (HamCoreBuilderFileEntry f in this.fileList)
+			{
+				b.Write(f.CompressedData.ByteData);
+			}
+
+			b.SeekToBegin();
+
+			return b;
+		}
+	}
+
+	public class HamCore
+	{
+		public const string HamcoreDirName = "@hamcore";
+		public const string HamcoreHeaderData = "HamCore";
+		public const int HamcoreHeaderSize = 7;
+		public const long HamcoreCacheExpires = 5 * 60 * 1000;
+		bool disableReadRawFile = false;
+		public bool DisableReadRawFile
+		{
+			get { return disableReadRawFile; }
+			set { disableReadRawFile = value; }
+		}
+
+		Dictionary<string, HamCoreEntry> list;
+
+		IO hamcore_io;
+
+		public HamCore(string filename)
+		{
+			init(filename);
+		}
+
+		public string[] GetFileNames()
+		{
+			List<string> ret = new List<string>();
+
+			foreach (HamCoreEntry e in list.Values)
+			{
+				ret.Add(e.FileName);
+			}
+
+			return ret.ToArray();
+		}
+
+		void init(string filename)
+		{
+			filename = IO.InnerFilePath(filename);
+			string filenameOnly = Path.GetFileName(filename);
+			string filenameAlt = Path.Combine(Path.GetDirectoryName(filename), "_" + filenameOnly);
+
+			try
+			{
+				IO.FileReplaceRename(filenameAlt, filename);
+			}
+			catch
+			{
+			}
+
+			list = new Dictionary<string, HamCoreEntry>();
+
+			try
+			{
+				hamcore_io = IO.FileOpen(filename);
+			}
+			catch
+			{
+				return;
+			}
+
+			try
+			{
+				byte[] header = hamcore_io.Read(HamcoreHeaderSize);
+				byte[] header2 = Str.AsciiEncoding.GetBytes(HamcoreHeaderData);
+				if (header == null || Util.CompareByte(header, header2) == false)
+				{
+					throw new SystemException();
+				}
+
+				uint num = 0;
+				byte[] buf = hamcore_io.Read(Util.SizeOfInt32);
+				num = Util.ByteToUInt(buf);
+				uint i;
+				for (i = 0; i < num; i++)
+				{
+					uint str_size;
+
+					buf = hamcore_io.Read(Util.SizeOfInt32);
+					str_size = Util.ByteToUInt(buf);
+					if (str_size >= 1)
+					{
+						str_size--;
+					}
+
+					byte[] str_data = hamcore_io.Read((int)str_size);
+					string tmp = Str.ShiftJisEncoding.GetString(str_data);
+
+					HamCoreEntry c = new HamCoreEntry();
+					c.FileName = tmp;
+
+					buf = hamcore_io.Read(Util.SizeOfInt32);
+					c.Size = Util.ByteToUInt(buf);
+
+					buf = hamcore_io.Read(Util.SizeOfInt32);
+					c.SizeCompressed = Util.ByteToUInt(buf);
+
+					buf = hamcore_io.Read(Util.SizeOfInt32);
+					c.Offset = Util.ByteToUInt(buf);
+
+					list.Add(c.FileName.ToUpper(), c);
+				}
+			}
+			catch
+			{
+				hamcore_io.Close();
+			}
+		}
+
+		public Buf ReadHamcore(string name)
+		{
+			if (name[0] == '|')
+			{
+				name = name.Substring(1);
+			}
+			if (name[0] == '/' || name[0] == '\\')
+			{
+				name = name.Substring(1);
+			}
+
+			string filename = name;
+
+			filename = filename.Replace("/", "\\");
+
+			Buf b;
+
+			if (this.disableReadRawFile == false)
+			{
+				try
+				{
+					b = Buf.ReadFromFile(HamcoreDirName + "\\" + filename);
+
+					return b;
+				}
+				catch
+				{
+				}
+			}
+
+			lock (list)
+			{
+				HamCoreEntry c;
+				string key = filename.ToUpper();
+
+				b = null;
+
+				if (list.ContainsKey(key))
+				{
+					c = list[key];
+
+					if (c.Buffer != null)
+					{
+						b = new Buf(c.Buffer);
+						b.SeekToBegin();
+						c.LastAccess = Time.Tick64;
+					}
+					else
+					{
+						if (hamcore_io.Seek(SeekOrigin.Begin, (int)c.Offset))
+						{
+							byte[] data = hamcore_io.Read((int)c.SizeCompressed);
+
+							int dstSize = (int)c.Size;
+							byte[] buffer = ZLib.Uncompress(data, dstSize);
+
+							c.Buffer = buffer;
+							b = new Buf(buffer);
+							b.SeekToBegin();
+							c.LastAccess = Time.Tick64;
+						}
+					}
+				}
+
+				long now = Time.Tick64;
+				foreach (HamCoreEntry cc in list.Values)
+				{
+					if (cc.Buffer != null)
+					{
+						if (((cc.LastAccess + HamcoreCacheExpires) < now) ||
+							cc.FileName.StartsWith("Li", StringComparison.CurrentCultureIgnoreCase))
+						{
+							cc.Buffer = null;
+						}
+					}
+				}
+			}
+
+			return b;
+		}
+	}
+
+	public class DirEntry : IComparable<DirEntry>
+	{
+		internal bool folder;
+		public bool IsFolder
+		{
+			get { return folder; }
+		}
+		internal string fileName;
+		public string FileName
+		{
+			get { return fileName; }
+		}
+		internal string fullPath;
+		public string FullPath
+		{
+			get { return fullPath; }
+		}
+		internal string relativePath;
+		public string RelativePath
+		{
+			get { return relativePath; }
+		}
+		internal long fileSize;
+		public long FileSize
+		{
+			get { return fileSize; }
+		}
+		internal DateTime createDate;
+		public DateTime CreateDate
+		{
+			get { return createDate; }
+		}
+		internal DateTime updateDate;
+		public DateTime UpdateDate
+		{
+			get { return updateDate; }
+		}
+
+		public int CompareTo(DirEntry other)
+		{
+			int i;
+			i = Str.StrCmpiRetInt(this.fileName, other.fileName);
+			if (i == 0)
+			{
+				i = Str.StrCmpRetInt(this.fileName, other.fileName);
+			}
+
+			return i;
+		}
+
+		public override string ToString()
+		{
+			return FileName;
+		}
+	};
+
+	public class IO
+	{
+		public delegate bool CopyDirPreCopyDelegate(FileInfo srcFileInfo);
+		public static void CopyDir(string srcDirName, string destDirName, CopyDirPreCopyDelegate preCopy, bool ignoreError, bool printStatus)
+		{
+			CopyDir(srcDirName, destDirName, preCopy, ignoreError, printStatus, false, false, false);
+		}
+		public static void CopyDir(string srcDirName, string destDirName, CopyDirPreCopyDelegate preCopy, bool ignoreError, bool printStatus,
+			bool skipIfNoChange, bool deleteBom)
+		{
+			CopyDir(srcDirName, destDirName, preCopy, ignoreError, printStatus, skipIfNoChange, deleteBom, false);
+		}
+		public static void CopyDir(string srcDirName, string destDirName, CopyDirPreCopyDelegate preCopy, bool ignoreError, bool printStatus,
+			bool skipIfNoChange, bool deleteBom, bool useTimeStampToCheckNoChange)
+		{
+			string[] files = Directory.GetFiles(srcDirName, "*", SearchOption.AllDirectories);
+
+			foreach (string srcFile in files)
+			{
+				FileInfo info = new FileInfo(srcFile);
+
+				string relativeFileName = IO.GetRelativeFileName(srcFile, srcDirName);
+				string destFileName = Path.Combine(destDirName, relativeFileName);
+				string destFileDirName = Path.GetDirectoryName(destFileName);
+
+				if (preCopy != null)
+				{
+					if (preCopy(info) == false)
+					{
+						continue;
+					}
+				}
+
+				try
+				{
+					if (Directory.Exists(destFileDirName) == false)
+					{
+						Directory.CreateDirectory(destFileDirName);
+					}
+
+					FileCopy(srcFile, destFileName, skipIfNoChange, deleteBom, useTimeStampToCheckNoChange);
+				}
+				catch
+				{
+					if (ignoreError == false)
+					{
+						throw;
+					}
+				}
+
+				if (printStatus)
+				{
+					Con.WriteLine(relativeFileName);
+				}
+			}
+		}
+
+		public const string DefaultHamcoreFileName = "@hamcore.se2";
+
+		static string hamcoreFileName = DefaultHamcoreFileName;
+		public static string HamcoreFileName
+		{
+			get { return IO.hamcoreFileName; }
+			set
+			{
+				lock (hamLockObj)
+				{
+					if (hamCore != null)
+					{
+						throw new ApplicationException();
+					}
+
+					IO.hamcoreFileName = value;
+					tryToUseHamcore = false;
+				}
+			}
+		}
+
+		static bool tryToUseHamcore = true;
+		static HamCore hamCore = null;
+		static object hamLockObj = new object();
+		public static HamCore HamCore
+		{
+			get
+			{
+				HamCore ret = null;
+
+				lock (hamLockObj)
+				{
+					if (hamCore == null)
+					{
+						if (tryToUseHamcore)
+						{
+							if (hamCore == null)
+							{
+								try
+								{
+									ret = hamCore = new HamCore(hamcoreFileName);
+								}
+								catch
+								{
+									tryToUseHamcore = false;
+								}
+							}
+						}
+					}
+				}
+
+				return ret;
+			}
+		}
+
+		string name;
+		public string Name
+		{
+			get { return name; }
+		}
+		FileStream p;
+		public FileStream InnerFileStream
+		{
+			get { return p; }
+		}
+		bool writeMode;
+		public bool WriteMode
+		{
+			get { return writeMode; }
+		}
+		bool hamMode;
+		public bool HamMode
+		{
+			get { return hamMode; }
+		}
+		Buf hamBuf;
+
+		object lockObj;
+
+		private IO()
+		{
+			name = "";
+			p = null;
+			writeMode = hamMode = false;
+			lockObj = new object();
+			hamBuf = null;
+		}
+
+		~IO()
+		{
+			Close();
+		}
+
+		public static void WriteAllTextWithEncoding(string fileName, string str, Encoding encoding)
+		{
+			WriteAllTextWithEncoding(fileName, str, encoding, false);
+		}
+		public static void WriteAllTextWithEncoding(string fileName, string str, Encoding encoding, bool appendBom)
+		{
+			fileName = InnerFilePath(fileName);
+
+			byte[] data = encoding.GetBytes(str);
+			byte[] bom = null;
+			if (appendBom)
+			{
+				bom = Str.GetBOM(encoding);
+			}
+
+			data = Util.CombineByteArray(bom, data);
+
+			File.WriteAllBytes(fileName, data);
+		}
+
+		public static string ReadAllTextWithAutoGetEncoding(string fileName)
+		{
+			fileName = InnerFilePath(fileName);
+
+			byte[] data = File.ReadAllBytes(fileName);
+
+			int bomSize;
+			Encoding enc = Str.GetEncoding(data, out bomSize);
+			if (enc == null)
+			{
+				enc = Encoding.Default;
+			}
+
+			data = Util.RemoveStartByteArray(data, bomSize);
+
+			return enc.GetString(data);
+		}
+
+		public static IO CreateTempFileByExt(string ext)
+		{
+			return IO.FileCreate(CreateTempFileNameByExt(ext));
+		}
+
+		public static string CreateTempFileNameByExt(string ext)
+		{
+			if (Str.IsEmptyStr(ext))
+			{
+				ext = "tmp";
+			}
+			if (ext[0] == '.')
+			{
+				ext = ext.Substring(1);
+			}
+
+			while (true)
+			{
+				string newFilename;
+				string fullPath;
+				string randStr;
+
+				randStr = Str.GenRandStr();
+				newFilename = "__" + randStr + "." + ext;
+
+				fullPath = CreateTempFileName(newFilename);
+
+				if (IO.IsFileExists(fullPath) == false)
+				{
+					return fullPath;
+				}
+			}
+		}
+
+		public static IO CreateTempFile(string name)
+		{
+			return IO.FileCreate(CreateTempFileName(name));
+		}
+
+		public static string CreateTempFileName(string name)
+		{
+			return Path.Combine(Env.MyTempDir, name);
+		}
+
+		public static DirEntry[] EnumDirEx(string dirName)
+		{
+			List<DirEntry> list = new List<DirEntry>();
+
+			enumDirEx(dirName, dirName, list);
+
+			return list.ToArray();
+		}
+		static void enumDirEx(string dirName, string baseDirName, List<DirEntry> list)
+		{
+			string tmp = IO.InnerFilePath(dirName);
+
+			string[] dirs = Directory.GetDirectories(tmp);
+			foreach (string name in dirs)
+			{
+				string fullPath = name;
+				DirectoryInfo info = new DirectoryInfo(fullPath);
+
+				DirEntry e = new DirEntry();
+
+				e.fileName = Path.GetFileName(name);
+				e.fileSize = 0;
+				e.createDate = info.CreationTimeUtc;
+				e.folder = true;
+				e.updateDate = info.LastWriteTimeUtc;
+				e.fullPath = fullPath;
+				e.relativePath = GetRelativeFileName(fullPath, baseDirName);
+
+				list.Add(e);
+
+				enumDirEx(fullPath, baseDirName, list);
+			}
+
+			string[] files = Directory.GetFiles(tmp);
+			foreach (string name in files)
+			{
+				string fullPath = name;
+				FileInfo info = new FileInfo(fullPath);
+
+				DirEntry e = new DirEntry();
+
+				e.fileName = Path.GetFileName(name);
+				e.fileSize = info.Length;
+				e.createDate = info.CreationTimeUtc;
+				e.folder = false;
+				e.updateDate = info.LastWriteTimeUtc;
+				e.fullPath = fullPath;
+				e.relativePath = GetRelativeFileName(fullPath, baseDirName);
+
+				list.Add(e);
+			}
+		}
+
+		public static DirEntry[] EnumDir(string dirName)
+		{
+			List<DirEntry> list = new List<DirEntry>();
+			string tmp = IO.InnerFilePath(dirName);
+
+			string[] dirs = Directory.GetDirectories(tmp);
+			foreach (string name in dirs)
+			{
+				string fullPath = name;
+				DirectoryInfo info = new DirectoryInfo(fullPath);
+
+				DirEntry e = new DirEntry();
+
+				e.fileName = Path.GetFileName(name);
+				e.fileSize = 0;
+				e.createDate = info.CreationTimeUtc;
+				e.folder = true;
+				e.updateDate = info.LastWriteTimeUtc;
+				e.fullPath = fullPath;
+				e.relativePath = GetRelativeFileName(fullPath, dirName);
+
+				list.Add(e);
+			}
+
+			string[] files = Directory.GetFiles(tmp);
+			foreach (string name in files)
+			{
+				string fullPath = name;
+				FileInfo info = new FileInfo(fullPath);
+
+				DirEntry e = new DirEntry();
+
+				e.fileName = Path.GetFileName(name);
+				e.fileSize = info.Length;
+				e.createDate = info.CreationTimeUtc;
+				e.folder = false;
+				e.updateDate = info.LastWriteTimeUtc;
+				e.fullPath = fullPath;
+				e.relativePath = GetRelativeFileName(fullPath, dirName);
+
+				list.Add(e);
+			}
+
+			list.Sort();
+
+			return list.ToArray();
+		}
+
+		public static void FileReplaceRename(string oldName, string newName)
+		{
+			try
+			{
+				FileCopy(oldName, newName);
+				FileDelete(oldName);
+			}
+			catch (Exception e)
+			{
+				throw e;
+			}
+		}
+
+		public static void FileCopy(string oldName, string newName)
+		{
+			FileCopy(oldName, newName, false, false);
+		}
+		public static void FileCopy(string oldName, string newName, bool skipIfNoChange, bool deleteBom)
+		{
+			FileCopy(oldName, newName, skipIfNoChange, deleteBom, false);
+		}
+		public static void FileCopy(string oldName, string newName, bool skipIfNoChange, bool deleteBom, bool useTimeStampToCheckNoChange)
+		{
+			string tmp1 = InnerFilePath(oldName);
+			string tmp2 = InnerFilePath(newName);
+
+			if (useTimeStampToCheckNoChange && skipIfNoChange)
+			{
+				DateTime dt1, dt2;
+
+				try
+				{
+					dt1 = Directory.GetLastWriteTimeUtc(tmp1);
+					dt2 = Directory.GetLastWriteTimeUtc(tmp2);
+
+					TimeSpan ts = dt2 - dt1;
+					if (ts.TotalSeconds >= -5.0)
+					{
+						return;
+					}
+				}
+				catch
+				{
+				}
+			}
+
+			if (skipIfNoChange || deleteBom)
+			{
+				byte[] srcData = File.ReadAllBytes(tmp1);
+				byte[] destData = new byte[0];
+				bool changed = true;
+				int bomSize;
+
+				Str.GetEncoding(srcData, out bomSize);
+				if (bomSize >= 1)
+				{
+					srcData = Util.ExtractByteArray(srcData, bomSize, srcData.Length - bomSize);
+				}
+
+				if (skipIfNoChange)
+				{
+					try
+					{
+						FileStream fs = File.OpenRead(tmp2);
+						long size = 0xffffffff;
+						try
+						{
+							size = fs.Length;
+						}
+						finally
+						{
+							fs.Close();
+						}
+
+						if (size == srcData.Length || srcData.Length == 0)
+						{
+							destData = File.ReadAllBytes(tmp2);
+						}
+					}
+					catch
+					{
+					}
+
+					if (Util.CompareByte(srcData, destData))
+					{
+						changed = false;
+					}
+				}
+
+				if (changed)
+				{
+					File.WriteAllBytes(tmp2, srcData);
+					CopyFileTimestamp(tmp2, tmp1);
+				}
+			}
+			else
+			{
+				File.Copy(tmp1, tmp2, true);
+			}
+		}
+
+		public static void CopyFileTimestamp(string dstFileName, string srcFileName)
+		{
+			DateTime dt1 = File.GetCreationTimeUtc(srcFileName);
+			DateTime dt2 = File.GetLastAccessTimeUtc(srcFileName);
+			DateTime dt3 = File.GetLastWriteTimeUtc(srcFileName);
+
+			File.SetCreationTimeUtc(dstFileName, dt1);
+			File.SetLastAccessTimeUtc(dstFileName, dt2);
+			File.SetLastWriteTimeUtc(dstFileName, dt3);
+		}
+
+		public static void SetFileTimestamp(string dstFileName, FileInfo fi)
+		{
+			File.SetCreationTimeUtc(dstFileName, fi.CreationTimeUtc);
+			File.SetLastAccessTimeUtc(dstFileName, fi.LastAccessTimeUtc);
+			File.SetLastWriteTimeUtc(dstFileName, fi.LastWriteTimeUtc);
+		}
+
+		static public byte[] ReadFile(string name)
+		{
+			IO io = FileOpen(name);
+			try
+			{
+				int size = io.FileSize;
+				byte[] ret = io.Read(size);
+				return ret;
+			}
+			finally
+			{
+				io.Close();
+			}
+		}
+
+		static public void SaveFile(string name, byte[] data)
+		{
+			SaveFile(name, data, 0, data.Length);
+		}
+		static public void SaveFile(string name, byte[] data, int offset, int size)
+		{
+			IO io = FileCreate(name);
+			try
+			{
+				io.Write(data, offset, size);
+			}
+			finally
+			{
+				io.Close();
+			}
+		}
+
+		static public string MakeSafeFileName(string src)
+		{
+			return src
+				.Replace("..", "__")
+				.Replace("/", "_")
+				.Replace("\\", "_")
+				.Replace("@", "_")
+				.Replace("|", "_");
+		}
+
+		public static bool IsDirExists(string name)
+		{
+			string tmp = InnerFilePath(name);
+
+			return Directory.Exists(tmp);
+		}
+
+		public static bool IsFileExists(string name)
+		{
+			string tmp = InnerFilePath(name);
+
+			return File.Exists(tmp);
+		}
+
+		static void fileDeleteInner(string name)
+		{
+			string name2 = ConvertPath(name);
+
+			File.Delete(name2);
+		}
+		public static void FileDelete(string name)
+		{
+			string tmp = InnerFilePath(name);
+
+			fileDeleteInner(tmp);
+		}
+
+		public bool Seek(SeekOrigin mode, int offset)
+		{
+			lock (lockObj)
+			{
+				if (p != null)
+				{
+					try
+					{
+						p.Seek(offset, mode);
+
+						return true;
+					}
+					catch
+					{
+						return false;
+					}
+				}
+				else
+				{
+					return false;
+				}
+			}
+		}
+
+		public long FileSize64
+		{
+			get
+			{
+				lock (lockObj)
+				{
+					if (p != null)
+					{
+						return p.Length;
+					}
+					else
+					{
+						if (hamMode)
+						{
+							return (long)hamBuf.Size;
+						}
+					}
+
+					return 0;
+				}
+			}
+		}
+		public int FileSize
+		{
+			get
+			{
+				long size64 = this.FileSize64;
+
+				if (size64 >= 2147483647)
+				{
+					size64 = 2147483647;
+				}
+
+				return (int)size64;
+			}
+		}
+		public static int GetFileSize(string name)
+		{
+			IO io = IO.FileOpen(name, false);
+			try
+			{
+				return io.FileSize;
+			}
+			finally
+			{
+				io.Close();
+			}
+		}
+
+		public byte[] ReadAll()
+		{
+			this.Seek(SeekOrigin.Begin, 0);
+			int size = this.FileSize;
+
+			byte[] data = new byte[size];
+			this.Read(data, 0, size);
+
+			this.Seek(SeekOrigin.Begin, 0);
+
+			return data;
+		}
+
+		public byte[] Read(int size)
+		{
+			byte[] buf = new byte[size];
+			bool ret = Read(buf, size);
+			if (ret == false)
+			{
+				return null;
+			}
+			return buf;
+		}
+		public bool Read(byte[] buf, int size)
+		{
+			return Read(buf, 0, size);
+		}
+		public bool Read(byte[] buf, int offset, int size)
+		{
+			if (size == 0)
+			{
+				return true;
+			}
+
+			lock (lockObj)
+			{
+				if (this.HamMode)
+				{
+					byte[] ret = hamBuf.Read((uint)size);
+
+					if (ret.Length != size)
+					{
+						return false;
+					}
+
+					Util.CopyByte(buf, offset, ret, 0, size);
+
+					return true;
+				}
+
+				if (p != null)
+				{
+					try
+					{
+						int ret = p.Read(buf, offset, size);
+						if (ret == size)
+						{
+							return true;
+						}
+						else
+						{
+							return false;
+						}
+					}
+					catch
+					{
+						return false;
+					}
+				}
+				else
+				{
+					return false;
+				}
+			}
+		}
+
+		public bool Write(byte[] buf)
+		{
+			return Write(buf, 0, buf.Length);
+		}
+		public bool Write(byte[] buf, int size)
+		{
+			return Write(buf, 0, size);
+		}
+		public bool Write(byte[] buf, int offset, int size)
+		{
+			if (writeMode == false)
+			{
+				return false;
+			}
+			if (size == 0)
+			{
+				return true;
+			}
+
+			lock (lockObj)
+			{
+				if (p != null)
+				{
+					try
+					{
+						p.Write(buf, offset, size);
+
+						return true;
+					}
+					catch
+					{
+						return false;
+					}
+				}
+				else
+				{
+					return false;
+				}
+			}
+		}
+
+		public bool CloseAndDelete()
+		{
+			string name = this.Name;
+
+			Close();
+
+			try
+			{
+				FileDelete(name);
+				return true;
+			}
+			catch
+			{
+				return false;
+			}
+		}
+
+		public void Close()
+		{
+			Close(false);
+		}
+		public void Close(bool noFlush)
+		{
+			lock (this.lockObj)
+			{
+				if (this.hamMode == false)
+				{
+					if (this.p != null)
+					{
+						if (this.writeMode && noFlush == false)
+						{
+							Flush();
+						}
+
+						this.p.Close();
+					}
+
+					this.p = null;
+				}
+			}
+		}
+
+		public void Flush()
+		{
+			try
+			{
+				lock (this.lockObj)
+				{
+					if (this.p != null)
+					{
+						this.p.Flush();
+					}
+				}
+			}
+			catch
+			{
+			}
+		}
+
+		static IO fileCreateInner(string name)
+		{
+			IO o = new IO();
+
+			string name2 = ConvertPath(name);
+
+			lock (o.lockObj)
+			{
+				o.p = File.Open(name2, FileMode.Create, FileAccess.ReadWrite, FileShare.Read);
+				o.name = name2;
+				o.writeMode = true;
+			}
+
+			return o;
+		}
+
+		public static IO FileCreate(string name)
+		{
+			name = InnerFilePath(name);
+
+			return fileCreateInner(name);
+		}
+
+		static IO fileOpenInner(string name, bool writeMode, bool readLock)
+		{
+			IO o = new IO();
+
+			string name2 = ConvertPath(name);
+
+			lock (o.lockObj)
+			{
+				o.p = File.Open(name2, FileMode.Open, (writeMode ? FileAccess.ReadWrite : FileAccess.Read),
+					(readLock ? FileShare.None : FileShare.Read));
+
+				o.name = name2;
+				o.writeMode = writeMode;
+			}
+
+			return o;
+		}
+
+		public static IO FileOpen(string name)
+		{
+			return FileOpen(name, false);
+		}
+		public static IO FileOpen(string name, bool writeMode)
+		{
+			return FileOpen(name, writeMode, false);
+		}
+		public static IO FileOpen(string name, bool writeMode, bool readLock)
+		{
+			name = InnerFilePath(name);
+
+			if (name[0] == '|')
+			{
+				HamCore hc = IO.HamCore;
+
+				Buf b = hc.ReadHamcore(name);
+				if (b == null)
+				{
+					throw new FileNotFoundException();
+				}
+
+				IO o = new IO();
+				o.name = name.Substring(1);
+				o.hamMode = true;
+				o.hamBuf = b;
+
+				return o;
+			}
+			else
+			{
+				return fileOpenInner(name, writeMode, readLock);
+			}
+		}
+
+		public static IO FileCreateOrAppendOpen(string name)
+		{
+			if (IsFileExists(name))
+			{
+				IO io = FileOpen(name, true);
+				io.Seek(SeekOrigin.End, 0);
+				return io;
+			}
+			else
+			{
+				return FileCreate(name);
+			}
+		}
+
+		public static string GetRelativeFileName(string fileName, string baseDirName)
+		{
+			baseDirName = RemoteLastEnMark(baseDirName).Trim() + "\\";
+			fileName = fileName.Trim();
+
+			if (fileName.Length <= baseDirName.Length)
+			{
+				throw new ArgumentException("fileName, baseDirName");
+			}
+
+			if (fileName.StartsWith(baseDirName, StringComparison.InvariantCultureIgnoreCase) == false)
+			{
+				throw new ArgumentException("fileName, baseDirName");
+			}
+
+			return fileName.Substring(baseDirName.Length);
+		}
+
+		public static string RemoteLastEnMark(string path)
+		{
+			if (path == null)
+			{
+				path = "";
+			}
+			if (path.EndsWith("\\"))
+			{
+				path = path.Substring(0, path.Length - 1);
+			}
+			return path;
+		}
+
+		public static void FileRename(string oldName, string newName)
+		{
+			string tmp1 = InnerFilePath(oldName);
+			string tmp2 = InnerFilePath(newName);
+
+			File.Move(tmp1, tmp2);
+		}
+
+		public static void DeleteFilesAndSubDirsInDir(string dirName)
+		{
+			dirName = InnerFilePath(dirName);
+
+			if (Directory.Exists(dirName) == false)
+			{
+				Directory.CreateDirectory(dirName);
+				return;
+			}
+
+			string[] files = Directory.GetFiles(dirName);
+			string[] dirs = Directory.GetDirectories(dirName);
+
+			foreach (string file in files)
+			{
+				File.SetAttributes(file, FileAttributes.Normal);
+				File.Delete(file);
+			}
+
+			foreach (string dir in dirs)
+			{
+				Directory.Delete(dir, true);
+			}
+		}
+
+		public static bool DeleteDir(string dirName)
+		{
+			return DeleteDir(dirName, false);
+		}
+		public static bool DeleteDir(string dirName, bool deleteSubDirs)
+		{
+			try
+			{
+				Directory.Delete(InnerFilePath(dirName), deleteSubDirs);
+				return true;
+			}
+			catch
+			{
+				return false;
+			}
+		}
+
+		public static bool MakeDir(string dirName)
+		{
+			try
+			{
+				Directory.CreateDirectory(InnerFilePath(dirName));
+				return true;
+			}
+			catch
+			{
+				return false;
+			}
+		}
+		public static bool MakeDirIfNotExists(string dirName)
+		{
+			string path = InnerFilePath(dirName);
+
+			if (Directory.Exists(path) == false)
+			{
+				Directory.CreateDirectory(path);
+
+				return true;
+			}
+
+			return false;
+		}
+
+		public static string NormalizePath(string src)
+		{
+			bool first_double_slash = false;
+			bool first_single_slash = false;
+			string win32_drive_char = "";
+			int i;
+			string tmp;
+
+			tmp = ConvertPath(src).Trim();
+
+			if (tmp.StartsWith(".\\") || tmp.StartsWith("..\\") || tmp.StartsWith(".") || tmp.StartsWith(".."))
+			{
+				if (tmp.StartsWith(".."))
+				{
+					tmp = Env.CurrentDir + "/../" + tmp.Substring(2);
+				}
+				else
+				{
+					tmp = Env.CurrentDir + "/" + tmp;
+				}
+			}
+
+			if (tmp.StartsWith("~/") || tmp.StartsWith("~\\"))
+			{
+				tmp = Env.HomeDir + "/" + tmp.Substring(2);
+			}
+
+			if (tmp.StartsWith("//") || tmp.StartsWith("\\\\"))
+			{
+				first_double_slash = true;
+			}
+			else
+			{
+				if (tmp.StartsWith("/") || tmp.StartsWith("\\"))
+				{
+					first_single_slash = true;
+				}
+			}
+
+			if (tmp.Length >= 2)
+			{
+				if (tmp[1] == ':')
+				{
+					win32_drive_char = "" + tmp[0];
+					tmp = tmp.Substring(2);
+				}
+			}
+
+			if (tmp == "/" || tmp == "\\")
+			{
+				tmp = "";
+			}
+
+			char[] splitChars = { '/', '\\' };
+			string[] t = tmp.Split(splitChars, StringSplitOptions.RemoveEmptyEntries);
+
+			Stack<string> sk = new Stack<string>();
+
+			for (i = 0; i < t.Length; i++)
+			{
+				string s = t[i];
+
+				if (Str.StrCmpi(s, "."))
+				{
+					continue;
+				}
+				else if (Str.StrCmpi(s, ".."))
+				{
+					if (sk.Count >= 1 && (first_double_slash == false || sk.Count >= 2))
+					{
+						sk.Pop();
+					}
+				}
+				else
+				{
+					sk.Push(s);
+				}
+			}
+
+			tmp = "";
+
+			if (first_double_slash)
+			{
+				tmp += "//";
+			}
+			else if (first_single_slash)
+			{
+				tmp += "/";
+			}
+
+			if (Str.IsEmptyStr(win32_drive_char) == false)
+			{
+				tmp = win32_drive_char + ":/" + tmp;
+			}
+
+			string[] sks = sk.ToArray();
+			Array.Reverse(sks);
+			for (i = 0; i < sks.Length; i++)
+			{
+				tmp += sks[i];
+				if (i != (sks.Length - 1))
+				{
+					tmp += "/";
+				}
+			}
+
+			tmp = ConvertPath(tmp);
+
+			return tmp;
+		}
+
+		public static string ConvertPath(string path)
+		{
+			return path.Replace('/', '\\');
+		}
+
+		public static string ConbinePath(string dirname, string filename)
+		{
+			return CombinePath(dirname, filename);
+		}
+		public static string CombinePath(string dirname, string filename)
+		{
+			bool is_full_path;
+			string filename_ident = NormalizePath(filename);
+
+			is_full_path = false;
+
+			if (filename_ident.StartsWith("\\") || filename_ident.StartsWith("/"))
+			{
+				is_full_path = true;
+			}
+
+			filename = filename_ident;
+
+			if (filename.Length >= 2)
+			{
+				char c = filename[0];
+				if (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z'))
+				{
+					if (filename[1] == ':')
+					{
+						is_full_path = true;
+					}
+				}
+			}
+
+			string tmp;
+
+			if (is_full_path == false)
+			{
+				tmp = dirname;
+				if (tmp.EndsWith("/") == false && tmp.EndsWith("\\") == false)
+				{
+					tmp += "/";
+				}
+
+				tmp += filename;
+			}
+			else
+			{
+				tmp = filename;
+			}
+
+			return NormalizePath(tmp);
+		}
+
+		public static string InnerFilePath(string src)
+		{
+			if (src[0] != '@')
+			{
+				return NormalizePath(src);
+			}
+			else
+			{
+				return CombinePath(Env.ExeFileDir, src.Substring(1));
+			}
+		}
+
+		public static DateTime GetCreationTimeUtc(string filename)
+		{
+			return File.GetCreationTimeUtc(InnerFilePath(filename));
+		}
+		public static DateTime GetCreationTimeLocal(string filename)
+		{
+			return File.GetCreationTime(InnerFilePath(filename));
+		}
+
+		public static DateTime GetLastWriteTimeUtc(string filename)
+		{
+			return File.GetLastWriteTimeUtc(InnerFilePath(filename));
+		}
+		public static DateTime GetLastWriteTimeLocal(string filename)
+		{
+			return File.GetLastWriteTime(InnerFilePath(filename));
+		}
+
+		public static DateTime GetLastAccessTimeUtc(string filename)
+		{
+			return File.GetLastAccessTimeUtc(InnerFilePath(filename));
+		}
+		public static DateTime GetLastAccessTimeLocal(string filename)
+		{
+			return File.GetLastAccessTime(InnerFilePath(filename));
+		}
+
+		public static byte[] ReadFileData(string filename)
+		{
+			FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
+			try
+			{
+				long size = fs.Length;
+				int size2 = (int)Math.Min(size, int.MaxValue);
+				byte[] ret = new byte[size2];
+				fs.Read(ret, 0, size2);
+				return ret;
+			}
+			finally
+			{
+				fs.Close();
+			}
+		}
+	}
+}
+
+// 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/

+ 233 - 0
src/BuildUtil/CoreUtil/GZip.cs

@@ -0,0 +1,233 @@
+// CoreUtil
+// 
+// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved.
+// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved.
+// Comments: Tetsuo Sugiyama, Ph.D.
+// 
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// version 2 as published by the Free Software Foundation.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License version 2
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// 
+// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE
+// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE.
+// 
+// 
+// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN,
+// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY,
+// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS
+// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS
+// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER
+// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL
+// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING,
+// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR
+// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
+// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO
+// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO,
+// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION
+// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN
+// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE.
+// 
+// USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS
+// SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
+// PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
+// COUNTRIES MIGHT BE RESTRICTED.
+// 
+// 
+// DEAR SECURITY EXPERTS
+// ---------------------
+// 
+// If you find a bug or a security vulnerability please kindly inform us
+// about the problem immediately so that we can fix the security problem
+// to protect a lot of users around the world as soon as possible.
+// 
+// Our e-mail address for security reports is:
+// softether-vpn-security [at] softether.org
+// 
+// Please note that the above e-mail address is not a technical support
+// inquiry address. If you need technical assistance, please visit
+// http://www.softether.org/ and ask your question on the users forum.
+// 
+// Thank you for your cooperation.
+
+
+using System;
+using System.Threading;
+using System.Data;
+using System.Data.Sql;
+using System.Data.SqlClient;
+using System.Data.SqlTypes;
+using System.Text;
+using System.Configuration;
+using System.Collections;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using System.IO;
+using System.IO.Compression;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Drawing.Drawing2D;
+using System.Runtime.InteropServices;
+using CoreUtil.Internal;
+
+namespace CoreUtil
+{
+	[StructLayout(LayoutKind.Sequential, Pack = 1)]
+	public struct GZipHeader
+	{
+		public byte ID1, ID2, CM, FLG;
+		public uint MTIME;
+		public byte XFL, OS;
+	}
+
+	[StructLayout(LayoutKind.Sequential, Pack = 1)]
+	public struct GZipFooter
+	{
+		public uint CRC32;
+		public uint ISIZE;
+	}
+
+	public static class GZipUtil
+	{
+		public static byte[] Decompress(byte[] gzip)
+		{
+			using (GZipStream stream = new GZipStream(new MemoryStream(gzip), CompressionMode.Decompress))
+			{
+				const int size = 4096;
+				byte[] buffer = new byte[size];
+				using (MemoryStream memory = new MemoryStream())
+				{
+					int count = 0;
+					do
+					{
+						count = stream.Read(buffer, 0, size);
+						if (count > 0)
+						{
+							memory.Write(buffer, 0, count);
+						}
+					}
+					while (count > 0);
+					return memory.ToArray();
+				}
+			}
+		}
+	}
+
+	public class GZipPacker
+	{
+		Fifo fifo;
+		ZStream zs;
+		long currentSize;
+		uint crc32;
+		bool finished;
+
+		public bool Finished
+		{
+			get { return finished; }
+		}
+
+		public Fifo GeneratedData
+		{
+			get
+			{
+				return this.fifo;
+			}
+		}
+
+		public GZipPacker()
+		{
+			fifo = new Fifo();
+
+			zs = new ZStream();
+			zs.deflateInit(-1, -15);
+
+			this.currentSize = 0;
+			this.crc32 = 0xffffffff;
+			this.finished = false;
+
+			GZipHeader h = new GZipHeader();
+			h.ID1 = 0x1f;
+			h.ID2 = 0x8b;
+			h.FLG = 0;
+			h.MTIME = Util.DateTimeToUnixTime(DateTime.Now.ToUniversalTime());
+			h.XFL = 0;
+			h.OS = 3;
+			h.CM = 8;
+
+			fifo.Write(Util.StructToByte(h));
+		}
+
+		public void Write(byte[] data, int pos, int len, bool finish)
+		{
+			byte[] srcData = Util.ExtractByteArray(data, pos, len);
+			byte[] dstData = new byte[srcData.Length * 2 + 100];
+
+			if (this.finished)
+			{
+				throw new ApplicationException("already finished");
+			}
+
+			zs.next_in = srcData;
+			zs.avail_in = srcData.Length;
+			zs.next_in_index = 0;
+
+			zs.next_out = dstData;
+			zs.avail_out = dstData.Length;
+			zs.next_out_index = 0;
+
+			if (finish)
+			{
+				zs.deflate(zlibConst.Z_FINISH);
+			}
+			else
+			{
+				zs.deflate(zlibConst.Z_SYNC_FLUSH);
+			}
+
+			fifo.Write(dstData, 0, dstData.Length - zs.avail_out);
+
+			currentSize += len;
+
+			this.crc32 = ZipUtil.Crc32Next(data, pos, len, this.crc32);
+
+			if (finish)
+			{
+				this.finished = true;
+				this.crc32 = ~this.crc32;
+
+				GZipFooter f = new GZipFooter();
+				f.CRC32 = this.crc32;
+				f.ISIZE = (uint)(this.currentSize % 0x100000000);
+
+				fifo.Write(Util.StructToByte(f));
+			}
+		}
+	}
+}
+
+// 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/

+ 170 - 0
src/BuildUtil/CoreUtil/Kernel.cs

@@ -0,0 +1,170 @@
+// CoreUtil
+// 
+// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved.
+// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved.
+// Comments: Tetsuo Sugiyama, Ph.D.
+// 
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// version 2 as published by the Free Software Foundation.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License version 2
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// 
+// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE
+// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE.
+// 
+// 
+// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN,
+// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY,
+// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS
+// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS
+// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER
+// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL
+// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING,
+// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR
+// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
+// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO
+// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO,
+// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION
+// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN
+// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE.
+// 
+// USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS
+// SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
+// PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
+// COUNTRIES MIGHT BE RESTRICTED.
+// 
+// 
+// DEAR SECURITY EXPERTS
+// ---------------------
+// 
+// If you find a bug or a security vulnerability please kindly inform us
+// about the problem immediately so that we can fix the security problem
+// to protect a lot of users around the world as soon as possible.
+// 
+// Our e-mail address for security reports is:
+// softether-vpn-security [at] softether.org
+// 
+// Please note that the above e-mail address is not a technical support
+// inquiry address. If you need technical assistance, please visit
+// http://www.softether.org/ and ask your question on the users forum.
+// 
+// Thank you for your cooperation.
+
+
+using System;
+using System.Threading;
+using System.Data;
+using System.Data.Sql;
+using System.Data.SqlClient;
+using System.Data.SqlTypes;
+using System.Text;
+using System.Configuration;
+using System.Collections;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using System.IO;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Drawing.Drawing2D;
+using System.Diagnostics;
+using System.Web.Mail;
+using System.Net;
+using System.Net.Sockets;
+using System.Net.NetworkInformation;
+using System.Net.Mail;
+using System.Net.Mime;
+using System.Runtime.InteropServices;
+
+namespace CoreUtil
+{
+	public static class Kernel
+	{
+		[DllImport("kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)]
+		[return: MarshalAs(UnmanagedType.Bool)]
+		private static extern bool IsWow64Process(
+			[In] IntPtr hProcess,
+			[Out] out bool wow64Process
+		);
+
+		public static bool InternalCheckIsWow64()
+		{
+			if ((Environment.OSVersion.Version.Major == 5 && Environment.OSVersion.Version.Minor >= 1) ||
+				Environment.OSVersion.Version.Major >= 6)
+			{
+				using (Process p = Process.GetCurrentProcess())
+				{
+					bool retVal;
+					if (!IsWow64Process(p.Handle, out retVal))
+					{
+						return false;
+					}
+					return retVal;
+				}
+			}
+			else
+			{
+				return false;
+			}
+		} 
+
+		public static void SleepThread(int millisec)
+		{
+			ThreadObj.Sleep(millisec);
+		}
+
+		public static string GetEnvStr(string name)
+		{
+			string ret = Environment.GetEnvironmentVariable(name);
+
+			if (ret == null)
+			{
+				ret = "";
+			}
+
+			return ret;
+		}
+
+		static public void SelfKill()
+		{
+			System.Diagnostics.Process.GetCurrentProcess().Kill();
+		}
+
+		public static Process Run(string exeName, string args)
+		{
+			Process p = new Process();
+			p.StartInfo.FileName = IO.InnerFilePath(exeName);
+			p.StartInfo.Arguments = args;
+
+			p.Start();
+
+			return p;
+		}
+	}
+}
+
+// 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/

+ 939 - 0
src/BuildUtil/CoreUtil/MultiLang.cs

@@ -0,0 +1,939 @@
+// CoreUtil
+// 
+// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved.
+// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved.
+// Comments: Tetsuo Sugiyama, Ph.D.
+// 
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// version 2 as published by the Free Software Foundation.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License version 2
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// 
+// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE
+// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE.
+// 
+// 
+// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN,
+// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY,
+// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS
+// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS
+// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER
+// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL
+// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING,
+// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR
+// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
+// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO
+// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO,
+// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION
+// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN
+// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE.
+// 
+// USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS
+// SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
+// PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
+// COUNTRIES MIGHT BE RESTRICTED.
+// 
+// 
+// DEAR SECURITY EXPERTS
+// ---------------------
+// 
+// If you find a bug or a security vulnerability please kindly inform us
+// about the problem immediately so that we can fix the security problem
+// to protect a lot of users around the world as soon as possible.
+// 
+// Our e-mail address for security reports is:
+// softether-vpn-security [at] softether.org
+// 
+// Please note that the above e-mail address is not a technical support
+// inquiry address. If you need technical assistance, please visit
+// http://www.softether.org/ and ask your question on the users forum.
+// 
+// Thank you for your cooperation.
+
+
+using System;
+using System.Data;
+using System.Data.Sql;
+using System.Data.SqlClient;
+using System.Data.SqlTypes;
+using System.Text;
+using System.Configuration;
+using System.Collections;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using System.IO;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Drawing.Drawing2D;
+using System.Web.Mail;
+using System.Threading;
+using System.Xml;
+using System.Xml.Schema;
+using System.Xml.Serialization;
+using CoreUtil;
+
+public static class AspUtil
+{
+	public static void Redirect(Page page, string url)
+	{
+		Redirect(page, url, true);
+	}
+	public static void Redirect(Page page, string url, bool endSession)
+	{
+		MultiLang ml = new MultiLang(page, true);
+
+		ml.Redirect(url, true);
+	}
+
+	public static string GetCurrentRequestUrl(Page page)
+	{
+		string s = (string)page.Request.Headers["SEISAPI_PHYSICAL_URL"];
+		if (Str.IsEmptyStr(s) == false)
+		{
+			string[] tokens = s.Split('?');
+			return tokens[0];
+		}
+		return page.Request.Path;
+	}
+
+	public static string GetCurrentPhysicalFilePathForUser(Page page)
+	{
+		string s = (string)page.Request.Headers["SEISAPI_ORIGINAL_FILEPATH"];
+		if (Str.IsEmptyStr(s) == false)
+		{
+			return s;
+		}
+		return page.Request.PhysicalPath;
+	}
+
+	public static string RemoveDefaultHtml(string url)
+	{
+		string tmp = url.ToLower();
+		if (tmp.EndsWith("/default.asp") || tmp.EndsWith("/default.aspx") || tmp.EndsWith("/default.htm") || tmp.EndsWith("/default.html"))
+		{
+			return GetUrlDirNameFromPath(url);
+		}
+		else
+		{
+			return url;
+		}
+	}
+
+	public static string GetUrlDirNameFromPath(string url)
+	{
+		string ret = "";
+		string[] strs = url.Split('/');
+		int i;
+		if (strs.Length >= 1)
+		{
+			for (i = 0; i < strs.Length - 1; i++)
+			{
+				ret += strs[i] + "/";
+			}
+		}
+		return ret;
+	}
+
+	public static string WebPathToFilePath(System.Web.UI.Page page, string path)
+	{
+		string appRootFilePath = page.Request.PhysicalApplicationPath;
+		string appRootVirtualPath = page.Request.ApplicationPath;
+		string ret;
+
+		path = RemoveDefaultHtml(path);
+		if (path.ToUpper().StartsWith(appRootVirtualPath.ToUpper()) == false)
+		{
+			return null;
+		}
+
+		path = path.Substring(appRootVirtualPath.Length).Replace("/", "\\");
+
+		if (path.StartsWith("\\"))
+		{
+			path = path.Substring(1);
+		}
+
+		ret = appRootFilePath + path;
+
+		if (ret.IndexOf("..") != -1)
+		{
+			return null;
+		}
+
+		if (ret.EndsWith("\\"))
+		{
+			ret = GetDefaultDocumentIfExists(ret);
+		}
+
+		return ret;
+	}
+
+	public static string GetDefaultDocumentIfExists(string dir)
+	{
+		string[] targets =
+			{
+				"default.aspx",
+				"default.asp",
+				"default.html",
+				"default.htm",
+				"index.html",
+				"index.htm",
+			};
+
+		foreach (string s in targets)
+		{
+			string name = dir + s;
+
+			if (IsFileExists(name))
+			{
+				return name;
+			}
+		}
+
+		return null;
+	}
+
+	public static bool IsFileExists(string name)
+	{
+		return File.Exists(name);
+	}
+}
+
+public class MultiLang
+{
+	public readonly Page Page;
+	public readonly HttpRequest Request;
+	public readonly HttpResponse Response;
+	public readonly bool IsUrlModefied;
+	public readonly string OriginalUrl;
+	public readonly string PhysicalUrl;
+	public readonly bool IsFilenameModified;
+	public readonly string OriginalFileName;
+	public readonly string OriginalFilePath;
+	public readonly string Args;
+	public readonly CoreLanguageClass CurrentLanguage;
+	public readonly CoreLanguageClass ContentsPrintLanguage;
+	public readonly string CurrentLanguageCode;
+	public readonly bool IsCurrentLanguageSupported;
+	public readonly string GoogleTranslateUrl;
+	public readonly string OriginalFullUrl;
+	public readonly bool IsSSL;
+	public readonly string Host;
+	public readonly string BasicHostName;
+	MultiLanguageFilterStream mfs;
+	public readonly List<KeyValuePair<string, string>> ReplaceList;
+
+	public bool DisableFilter
+	{
+		get
+		{
+			return mfs.DisableFilter;
+		}
+		set
+		{
+			mfs.DisableFilter = value;
+		}
+	}
+
+	public readonly string HtmlBody = "";
+	public readonly string HtmlFileName = "";
+
+	static MultiLang()
+	{
+		CoreLanguageList.RegardsJapanAsJP = true;
+	}
+
+	public bool IsJapanese
+	{
+		get
+		{
+			if (this.CurrentLanguage == CoreLanguageList.Japanese)
+			{
+				return true;
+			}
+			return false;
+		}
+	}
+
+	public bool IsJapanesePrinting
+	{
+		get
+		{
+			if (this.ContentsPrintLanguage == CoreLanguageList.Japanese)
+			{
+				return true;
+			}
+			return false;
+		}
+	}
+
+	public void Redirect(string url, bool endSession)
+	{
+		url = ConvertPath(url);
+		if (url.StartsWith("http://") || url.StartsWith("https://") || url.StartsWith("ftp://") ||
+			url.StartsWith("/"))
+		{
+		}
+		else
+		{
+			string originalUrl = OriginalUrl;
+			if (originalUrl.EndsWith("/"))
+			{
+			}
+			else
+			{
+				int i;
+				for (i = originalUrl.Length - 1; i >= 0; i--)
+				{
+					if (originalUrl[i] == '/' || originalUrl[i] == '\\')
+					{
+						originalUrl = originalUrl.Substring(0, i + 1);
+						break;
+					}
+				}
+			}
+			url = originalUrl + url;
+		}
+		Response.Redirect(url, endSession);
+	}
+
+	public MultiLang(Page currentPage)
+		: this(currentPage, false)
+	{
+	}
+	public MultiLang(Page currentPage, bool fast) : this(currentPage, fast, null)
+	{
+	}
+	public MultiLang(Page currentPage, bool fast, string basicHostName)
+		: this(currentPage, fast, basicHostName, new List<KeyValuePair<string, string>>())
+	{
+	}
+	public MultiLang(Page currentPage, bool fast, string basicHostName, List<KeyValuePair<string, string>> replaceList)
+	{
+		this.Page = currentPage;
+
+		this.Request = Page.Request;
+		this.Response = Page.Response;
+		this.BasicHostName = basicHostName;
+		string tmp = Page.Request.ServerVariables["HTTPS"];
+		string hostRaw = Page.Request.Headers["Host"];
+		this.ReplaceList = replaceList;
+		bool isSsl = false;
+		string[] tokens;
+		string host = "";
+
+		tokens = hostRaw.Split(':');
+		if (tokens.Length >= 1)
+		{
+			host = tokens[0];
+		}
+
+		host = host.ToLower();
+
+		if (tmp != null)
+		{
+			if (tmp.Equals("on", StringComparison.InvariantCultureIgnoreCase))
+			{
+				isSsl = true;
+			}
+		}
+
+		this.IsSSL = isSsl;
+		this.Host = host;
+
+		this.IsUrlModefied = Str.StrToBool((string)Request.Headers["SEISAPI_MODIFIED_URL"]);
+		this.OriginalUrl = (string)Request.Headers["SEISAPI_ORIGINAL_URL"];
+
+		int i;
+		i = this.OriginalUrl.IndexOf("?");
+		if (i != -1)
+		{
+			this.OriginalUrl = this.OriginalUrl.Substring(0, i);
+		}
+
+		if (Str.IsEmptyStr(this.OriginalUrl) || this.IsUrlModefied == false)
+		{
+			this.OriginalUrl = AspUtil.RemoveDefaultHtml(AspUtil.GetCurrentRequestUrl(Page));
+		}
+
+		string s = (string)Request.Headers["SEISAPI_ORIGINAL_FILENAME"];
+		if (Str.IsEmptyStr(s) == false)
+		{
+			this.IsFilenameModified = true;
+			this.OriginalFileName = s;
+			this.OriginalFilePath = (string)Request.Headers["SEISAPI_ORIGINAL_FILEPATH"];
+		}
+
+		string langCode = GetCurrentLangCodeFromPath(this.OriginalUrl);
+
+		this.CurrentLanguage = CoreLanguageList.GetLanguageClassByName(langCode);
+		this.CurrentLanguageCode = CurrentLanguage.Name;
+
+		try
+		{
+			HtmlFileName = AspUtil.WebPathToFilePath(currentPage, AspUtil.GetCurrentRequestUrl(currentPage));
+		}
+		catch
+		{
+		}
+
+		if (this.IsFilenameModified)
+		{
+			HtmlFileName = Path.Combine(Path.GetDirectoryName(HtmlFileName), Path.GetFileName(OriginalFilePath));
+		}
+
+		try
+		{
+			if (fast == false)
+			{
+				HtmlBody = File.ReadAllText(HtmlFileName, Str.Utf8Encoding);
+			}
+		}
+		catch
+		{
+		}
+
+		PhysicalUrl = AspUtil.RemoveDefaultHtml(AspUtil.GetCurrentRequestUrl((currentPage)));
+
+		Args = currentPage.Request.ServerVariables["QUERY_STRING"];
+
+		if (CurrentLanguage == CoreLanguageList.Japanese)
+		{
+			IsCurrentLanguageSupported = true;
+		}
+		else
+		{
+			IsCurrentLanguageSupported = Str.SearchStr(HtmlBody, string.Format("<!-- ml:{0} -->", CurrentLanguage.Name), 0, false) != -1;
+		}
+
+		GoogleTranslateUrl = string.Format("http://translate.google.com/translate?js=n&prev=_t&hl=en&ie=UTF-8&layout=2&eotf=1&sl=ja&tl={1}&u={0}",
+			HttpUtility.UrlEncode((isSsl ? "https://" : "http://") + host + this.OriginalUrl, Str.Utf8Encoding),
+			this.CurrentLanguageCode);
+
+		OriginalFullUrl = (isSsl ? "https://" : "http://") + host + this.OriginalUrl;
+
+		ContentsPrintLanguage = this.CurrentLanguage;
+		if (IsCurrentLanguageSupported == false)
+		{
+			ContentsPrintLanguage = CoreLanguageList.Japanese;
+		}
+
+		if (fast == false)
+		{
+			mfs = new MultiLanguageFilterStream(Response.Filter, ContentsPrintLanguage, this.CurrentLanguage, this.BasicHostName, this.ReplaceList);
+			mfs.Page = Page;
+			Response.Filter = mfs;
+		}
+	}
+
+	public string ConvertPath(string url)
+	{
+		return ConvertPath(url, this.CurrentLanguage);
+	}
+	public string ConvertPath(string url, CoreLanguageClass lang)
+	{
+		string ja = CoreLanguageList.Japanese.Name;
+
+		if (url.StartsWith("/" + ja, StringComparison.InvariantCultureIgnoreCase))
+		{
+			url = "/" + lang.Name + url.Substring(ja.Length + 1);
+		}
+
+		return url;
+	}
+
+	public string GetPathForLanguage(CoreLanguageClass lang)
+	{
+		string url = PhysicalUrl;
+
+		return ConvertPath(url, lang);
+	}
+
+	public string GetFullUrlForLanguage(CoreLanguageClass lang)
+	{
+		string url = (IsSSL ? "https://" : "http://") + Host + GetPathForLanguage(lang);
+
+		if (Str.IsEmptyStr(Args) == false)
+		{
+			url += "?" + Args;
+		}
+
+		return url;
+	}
+
+	public string ProcStr(string str)
+	{
+		return ProcStr(str, ContentsPrintLanguage);
+	}
+
+	public static string ProcStrDefault(string str)
+	{
+		return ProcStr(str, CoreLanguageClass.CurrentThreadLanguageClass);
+	}
+
+	public static string ProcStr(string str, CoreLanguageClass lang)
+	{
+		return ProcStr(str, lang, lang);
+	}
+
+	public static string ProcStr(string str, CoreLanguageClass lang, CoreLanguageClass langPure)
+	{
+		MultiLanguageFilterStream st = new MultiLanguageFilterStream(null, lang, langPure, null, null);
+
+		return st.FilterString(str);
+	}
+
+	public static string GetCurrentLangCodeFromPath(string str)
+	{
+		char[] sps =
+		{
+			'/', '?',
+		};
+		string[] tokens = str.Split(sps, StringSplitOptions.RemoveEmptyEntries);
+
+		if (tokens.Length >= 1)
+		{
+			return tokens[0].ToLower();
+		}
+
+		return CoreLanguageList.Japanese.Name;
+	}
+}
+
+public static class MultiString
+{
+	public const string ChangeLanguage = "[j]Select Language[e]Select Language[/]";
+	public const string LanguageNotSupported = "[j]申し訳ございませんが、以下のコンテンツは現在日本語で公開されていません。[e]Unfortunately, following contents are not published in English yet. [/]";
+	public const string ThisIsTranslatedByMachine = "Following contents are translated automatically by Google Translate.";
+	public const string GoogleTranslate = "[j]Google で翻訳[e]Click here to translate the contents into English by Google Now[/]";
+	public const string ShowSrc = "Show the original page";
+
+	public static string GetStr(string srcStr, CoreLanguageClass lang)
+	{
+		return MultiLang.ProcStr(srcStr, lang);
+	}
+}
+
+public class MultiLanguageFilterStream : Stream
+{
+	public static readonly List<KeyValuePair<string, CoreLanguageClass>> langKeys = new List<KeyValuePair<string, CoreLanguageClass>>();
+	public readonly List<KeyValuePair<string, string>> ReplaceList = null;
+	public const string TagPure = "<!-- ml:pure -->";
+	public const string TagEndPure = "<!-- ml:endpure -->";
+	public bool DisableFilter = false;
+	public Page Page;
+
+	static MultiLanguageFilterStream()
+	{
+		langKeys.Add(new KeyValuePair<string, CoreLanguageClass>("[j]", CoreLanguageList.Japanese));
+		langKeys.Add(new KeyValuePair<string, CoreLanguageClass>("[e]", CoreLanguageList.English));
+		langKeys.Add(new KeyValuePair<string, CoreLanguageClass>("[/]", null));
+	}
+
+	Stack<CoreLanguageClass> stack = new Stack<CoreLanguageClass>();
+	CoreLanguageClass currentBodyLanguage
+	{
+		get
+		{
+			if (stack.Count == 0)
+			{
+				return null;
+			}
+			else
+			{
+				return stack.ToArray()[0];
+			}
+		}
+	}
+	bool isLang(CoreLanguageClass lang)
+	{
+		CoreLanguageClass[] langList = stack.ToArray();
+
+		foreach (CoreLanguageClass c in langList)
+		{
+			if (c != lang)
+			{
+				return false;
+			}
+		}
+
+		return true;
+	}
+	CoreLanguageClass lastBodyLanguage
+	{
+		get
+		{
+			if (stack.Count == 0)
+			{
+				return null;
+			}
+			else
+			{
+				return stack.Peek();
+			}
+		}
+	}
+
+	public string FilterString(string src)
+	{
+		string[] strList = Str.DivideStringMulti(src, true,
+			TagPure, TagEndPure);
+
+		bool b = false;
+
+		StringBuilder ret = new StringBuilder();
+
+		foreach (string str in strList)
+		{
+			if (str == TagPure)
+			{
+				b = true;
+			}
+			else if (str == TagEndPure)
+			{
+				b = false;
+			}
+
+			ret.Append(filterStringInner(str, b ? this.currentLanguagePure : this.currentLanguage, this.currentLanguagePure));
+		}
+
+		return ret.ToString();
+	}
+
+	string filterStringInner(string src, CoreLanguageClass useLang, CoreLanguageClass useLangPure)
+	{
+		int i;
+		string ret = src;
+
+		if (Str.IsEmptyStr(basicHostName) == false)
+		{
+			ret = Str.ReplaceStr(ret, "=\"/\"", "=\"http://" + basicHostName + "/\"", false);
+			ret = Str.ReplaceStr(ret, "=\'/\'", "=\'http://" + basicHostName + "/\'", false);
+
+			ret = Str.ReplaceStr(ret, "=\"/" + CoreLanguageList.Japanese.Name + "/\"", "=\"http://" + basicHostName + "/" + useLangPure.Name + "/\"", false);
+			ret = Str.ReplaceStr(ret, "=\'/" + CoreLanguageList.Japanese.Name + "/\'", "=\'http://" + basicHostName + "/" + useLangPure.Name + "/\'", false);
+		}
+
+		ret = Str.ReplaceStr(ret, "=\"/" + CoreLanguageList.Japanese.Name + "/", "=\"/" + useLangPure.Name + "/", false);
+		ret = Str.ReplaceStr(ret, "=\'/" + CoreLanguageList.Japanese.Name + "/", "=\'/" + useLangPure.Name + "/", false);
+
+		ret = Str.ReplaceStr(ret, "_lm_" + CoreLanguageList.Japanese.Name, "_lm_" + useLang.Name, false);
+
+		if (this.ReplaceList != null)
+		{
+			foreach (KeyValuePair<string, string> p in this.ReplaceList)
+			{
+				ret = Str.ReplaceStr(ret, p.Key, p.Value, false);
+			}
+		}
+
+		StringBuilder ret2 = new StringBuilder();
+
+		int next = 0;
+		while (true)
+		{
+			int min = int.MaxValue;
+			int j = -1;
+			for (i = 0; i < langKeys.Count; i++)
+			{
+				int r = Str.SearchStr(ret, langKeys[i].Key, next, false);
+				if (r != -1)
+				{
+					if (r < min)
+					{
+						j  = i;
+						min = r;
+					}
+				}
+			}
+
+			if (j != -1)
+			{
+				KeyValuePair<string, CoreLanguageClass> v = langKeys[j];
+
+				if (currentBodyLanguage == null || isLang(useLang))
+				{
+					ret2.Append(ret.Substring(next, min - next));
+				}
+
+				if (v.Value != null)
+				{
+					if (lastBodyLanguage == null || v.Value.Id <= lastBodyLanguage.Id)
+					{
+						stack.Push(v.Value);
+					}
+					else
+					{
+						stack.Pop();
+						stack.Push(v.Value);
+					}
+				}
+				else
+				{
+					stack.Pop();
+				}
+
+				next = min + v.Key.Length;
+			}
+			else
+			{
+				if (currentBodyLanguage == null || isLang(useLang))
+				{
+					ret2.Append(ret.Substring(next, ret.Length - next));
+				}
+				break;
+			}
+		}
+
+		ret = ret2.ToString();
+
+		string lang = useLangPure != CoreLanguageList.Japanese ? useLangPure.Name : "ja";
+
+		if (useLangPure != CoreLanguageList.Japanese)
+		{
+			ret = Str.ReplaceStr(ret, "<meta http-equiv=\"Content-Language\" content=\"ja\" />",
+				string.Format("<meta http-equiv=\"Content-Language\" content=\"{0}\" />", lang), false);
+		}
+
+		ret = Str.ReplaceStr(ret, "<html>", string.Format("<html lang=\"{0}\">", lang), false);
+
+		next = 0;
+		while (true)
+		{
+			i = Str.SearchStr(ret, "<link rel=\"stylesheet\" href=\"", next, false);
+			if (i == -1)
+			{
+				break;
+			}
+			next = i + 1;
+			int j = Str.SearchStr(ret, "/>", next, false);
+			if (j == -1)
+			{
+				break;
+			}
+			string linkStr = ret.Substring(i, j - i + 2 - 1);
+			int k = Str.SearchStr(linkStr, "href=\"", 0, false);
+			if (k != -1)
+			{
+				int m = Str.SearchStr(linkStr, "\"", k + 6, false);
+				if (m != -1)
+				{
+					string fileName = linkStr.Substring(k + 6, m - k - 6);
+					fileName = Str.ReplaceStr(fileName, ".css", "_" + lang + ".css", false);
+					string linkStr2 = string.Format("<link rel=\"stylesheet\" href=\"{0}\" type=\"text/css\" />", fileName);
+
+					ret = ret.Substring(0, j + 2) + linkStr2 + ret.Substring(j + 2);
+					next = j + 2 + linkStr2.Length;
+				}
+			}
+		}
+
+		return ret;
+	}
+
+	Stream baseStream;
+	long position;
+	CoreLanguageClass currentLanguage;
+	CoreLanguageClass currentLanguagePure;
+	string basicHostName;
+
+	public override bool CanRead
+	{
+		get { return true; }
+	}
+
+	public override bool CanSeek
+	{
+		get { return true; }
+	}
+
+	public override bool CanWrite
+	{
+		get { return true; }
+	}
+
+	public override void Flush()
+	{
+		baseStream.Flush();
+	}
+
+	public override long Length
+	{
+		get { return 0; }
+	}
+
+	public override long Position
+	{
+		get
+		{
+			return position;
+		}
+		set
+		{
+			position = value;
+		}
+	}
+
+	public override long Seek(long offset, SeekOrigin origin)
+	{
+		return baseStream.Seek(offset, origin);
+	}
+
+	public override void SetLength(long value)
+	{
+		baseStream.SetLength(value);
+	}
+
+	public MultiLanguageFilterStream(Stream baseStream, CoreLanguageClass currentLanguage, CoreLanguageClass currentLanguagePure, string basicHostName, List<KeyValuePair<string, string>> replaceList)
+	{
+		this.baseStream = baseStream;
+		this.currentLanguage = currentLanguage;
+		this.currentLanguagePure = currentLanguagePure;
+		this.basicHostName = basicHostName;
+		this.ReplaceList = replaceList;
+	}
+
+	public override int Read(byte[] buffer, int offset, int count)
+	{
+		return baseStream.Read(buffer, offset, count);
+	}
+
+	string savedString = "";
+
+	public override void Write(byte[] buffer, int offset, int count)
+	{
+		if (DisableFilter)
+		{
+			baseStream.Write(buffer, offset, count);
+			return;
+		}
+		byte[] data = new byte[count];
+		Buffer.BlockCopy(buffer, offset, data, 0, count);
+
+		string inSrc = savedString + ByteDataToString(data);// Str.Utf8Encoding.GetString(data);
+
+		savedString = "";
+
+		if (inSrc.Length >= 2)
+		{
+			int len = inSrc.Length;
+			string last2 = inSrc.Substring(len - 2, 2);
+			string last1 = inSrc.Substring(len - 1, 1);
+
+			if (last1 == "[")
+			{
+				inSrc = inSrc.Substring(0, len - 1);
+
+				savedString = last1;
+			}
+			else if (Str.InStr(last2, "["))
+			{
+				inSrc = inSrc.Substring(0, len - 2);
+
+				savedString = last2;
+			}
+		}
+
+		string inStr = FilterString(inSrc);
+
+		data = StringToByteData(inStr);// Str.Utf8Encoding.GetBytes(inStr);
+
+		if (data.Length >= 1)
+		{
+			baseStream.Write(data, 0, data.Length);
+			//byte[] t = Str.Utf8Encoding.GetBytes("" + count.ToString() + "");
+			//baseStream.Write(t, 0, t.Length);
+		}
+	}
+
+	public static string ByteDataToString(byte[] data)
+	{
+		StringBuilder sb = new StringBuilder();
+
+		foreach (byte b in data)
+		{
+			if (b <= 0x7f && b != (byte)('\\'))
+			{
+				sb.Append((char)b);
+			}
+			else
+			{
+				sb.Append("\\" + ((uint)b).ToString("X2"));
+			}
+		}
+
+		return sb.ToString();
+	}
+
+	public byte[] StringToByteData(string str)
+	{
+		int i, len;
+
+		len = str.Length;
+		Buf b = new Buf();
+
+		for (i = 0; i < len; i++)
+		{
+			char c = str[i];
+			if (c == '\\')
+			{
+				string tmp = "";
+
+				//try
+				{
+					tmp = "" + str[i + 1] + str[i + 2];
+				}
+				/*catch (Exception ex)
+				{
+					tmp += "|err=" + ex.Message + ",len=" + len + ",i=" + i + "|src=" + str + "|";
+					byte[] aa = Str.Utf8Encoding.GetBytes(tmp);
+					b.Write(aa);
+				}*/
+
+				i += 2;
+
+				//try
+				{
+					b.WriteByte(byte.Parse(tmp, System.Globalization.NumberStyles.HexNumber));
+				}
+				//catch
+				{
+				}
+			}
+			else
+			{
+				b.WriteByte((byte)c);
+			}
+		}
+
+		return b.ByteData;
+	}
+}
+
+
+// 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/

+ 202 - 0
src/BuildUtil/CoreUtil/Packer.cs

@@ -0,0 +1,202 @@
+// CoreUtil
+// 
+// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved.
+// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved.
+// Comments: Tetsuo Sugiyama, Ph.D.
+// 
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// version 2 as published by the Free Software Foundation.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License version 2
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// 
+// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE
+// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE.
+// 
+// 
+// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN,
+// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY,
+// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS
+// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS
+// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER
+// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL
+// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING,
+// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR
+// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
+// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO
+// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO,
+// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION
+// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN
+// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE.
+// 
+// USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS
+// SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
+// PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
+// COUNTRIES MIGHT BE RESTRICTED.
+// 
+// 
+// DEAR SECURITY EXPERTS
+// ---------------------
+// 
+// If you find a bug or a security vulnerability please kindly inform us
+// about the problem immediately so that we can fix the security problem
+// to protect a lot of users around the world as soon as possible.
+// 
+// Our e-mail address for security reports is:
+// softether-vpn-security [at] softether.org
+// 
+// Please note that the above e-mail address is not a technical support
+// inquiry address. If you need technical assistance, please visit
+// http://www.softether.org/ and ask your question on the users forum.
+// 
+// Thank you for your cooperation.
+
+
+using System;
+using System.Threading;
+using System.Data;
+using System.Data.Sql;
+using System.Data.SqlClient;
+using System.Data.SqlTypes;
+using System.Text;
+using System.Configuration;
+using System.Collections;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using System.IO;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Drawing.Drawing2D;
+using System.Runtime.InteropServices;
+
+namespace CoreUtil
+{
+	public enum PackerFileFormat
+	{
+		ZipRaw,
+		ZipCompressed,
+		Tar,
+		TarGZip,
+	}
+
+	public delegate bool ProgressDelegate(string fileNameFullPath, string fileNameRelative, int currentFileNum, int totalFileNum);
+
+	public static class Packer
+	{
+		public static byte[] PackDir(PackerFileFormat format, string rootDirPath, string appendPrefixDirName)
+		{
+			return PackDir(format, rootDirPath, appendPrefixDirName, null);
+		}
+		public static byte[] PackDir(PackerFileFormat format, string topDirPath, string appendPrefixDirName, ProgressDelegate proc)
+		{
+			string[] fileList = Directory.GetFiles(topDirPath, "*", SearchOption.AllDirectories);
+			List<string> relativeFileList = new List<string>();
+
+			foreach (string fileName in fileList)
+			{
+				string relativePath = IO.GetRelativeFileName(fileName, topDirPath);
+
+				if (Str.IsEmptyStr(appendPrefixDirName) == false)
+				{
+					relativePath = IO.RemoteLastEnMark(appendPrefixDirName) + "\\" + relativePath;
+				}
+
+				relativeFileList.Add(relativePath);
+			}
+
+			return PackFiles(format, fileList, relativeFileList.ToArray(), proc);
+		}
+
+		public static byte[] PackFiles(PackerFileFormat format, string[] srcFileNameList, string[] relativeNameList)
+		{
+			return PackFiles(format, srcFileNameList, relativeNameList, null);
+		}
+		public static byte[] PackFiles(PackerFileFormat format, string[] srcFileNameList, string[] relativeNameList, ProgressDelegate proc)
+		{
+			if (srcFileNameList.Length != relativeNameList.Length)
+			{
+				throw new ApplicationException("srcFileNameList.Length != relativeNameList.Length");
+			}
+
+			int num = srcFileNameList.Length;
+			int i;
+
+			ZipPacker zip = new ZipPacker();
+			TarPacker tar = new TarPacker();
+
+			for (i = 0; i < num; i++)
+			{
+				if (proc != null)
+				{
+					bool ret = proc(srcFileNameList[i], relativeNameList[i], i, num);
+
+					if (ret == false)
+					{
+						continue;
+					}
+				}
+
+				byte[] srcData = File.ReadAllBytes(srcFileNameList[i]);
+				DateTime date = File.GetLastWriteTime(srcFileNameList[i]);
+
+				switch (format)
+				{
+					case PackerFileFormat.Tar:
+					case PackerFileFormat.TarGZip:
+						tar.AddFileSimple(relativeNameList[i], srcData, 0, srcData.Length, date);
+						break;
+
+					case PackerFileFormat.ZipRaw:
+					case PackerFileFormat.ZipCompressed:
+						zip.AddFileSimple(relativeNameList[i], date, FileAttributes.Normal, srcData, (format == PackerFileFormat.ZipCompressed));
+						break;
+				}
+			}
+
+			switch (format)
+			{
+				case PackerFileFormat.Tar:
+					tar.Finish();
+					return tar.GeneratedData.Read();
+
+				case PackerFileFormat.TarGZip:
+					tar.Finish();
+					return tar.CompressToGZip();
+
+				case PackerFileFormat.ZipCompressed:
+				case PackerFileFormat.ZipRaw:
+					zip.Finish();
+					return zip.GeneratedData.Read();
+
+				default:
+					throw new ApplicationException("format");
+			}
+		}
+	}
+}
+
+// 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/

+ 225 - 0
src/BuildUtil/CoreUtil/RC4.cs

@@ -0,0 +1,225 @@
+// CoreUtil
+// 
+// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved.
+// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved.
+// Comments: Tetsuo Sugiyama, Ph.D.
+// 
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// version 2 as published by the Free Software Foundation.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License version 2
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// 
+// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE
+// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE.
+// 
+// 
+// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN,
+// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY,
+// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS
+// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS
+// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER
+// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL
+// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING,
+// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR
+// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
+// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO
+// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO,
+// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION
+// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN
+// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE.
+// 
+// USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS
+// SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
+// PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
+// COUNTRIES MIGHT BE RESTRICTED.
+// 
+// 
+// DEAR SECURITY EXPERTS
+// ---------------------
+// 
+// If you find a bug or a security vulnerability please kindly inform us
+// about the problem immediately so that we can fix the security problem
+// to protect a lot of users around the world as soon as possible.
+// 
+// Our e-mail address for security reports is:
+// softether-vpn-security [at] softether.org
+// 
+// Please note that the above e-mail address is not a technical support
+// inquiry address. If you need technical assistance, please visit
+// http://www.softether.org/ and ask your question on the users forum.
+// 
+// Thank you for your cooperation.
+
+
+using System;
+using System.Threading;
+using System.Data;
+using System.Data.Sql;
+using System.Data.SqlClient;
+using System.Data.SqlTypes;
+using System.Text;
+using System.Configuration;
+using System.Collections;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using System.IO;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Drawing.Drawing2D;
+using System.Diagnostics;
+using System.Web.Mail;
+using System.Net;
+using System.Net.Sockets;
+using System.Net.NetworkInformation;
+
+namespace CoreUtil
+{
+	public class RC4 : ICloneable
+	{
+		uint x, y;
+		uint[] state;
+
+		public RC4(byte[] key)
+		{
+			state = new uint[256];
+
+			uint i, t, u, ki, si;
+
+			x = 0;
+			y = 0;
+
+			for (i = 0; i < 256; i++)
+			{
+				state[i] = i;
+			}
+
+			ki = si = 0;
+			for (i = 0; i < 256; i++)
+			{
+				t = state[i];
+
+				si = (si + key[ki] + t) & 0xff;
+				u = state[si];
+				state[si] = t;
+				state[i] = u;
+				if (++ki >= key.Length)
+				{
+					ki = 0;
+				}
+			}
+		}
+
+		private RC4()
+		{
+		}
+
+		public object Clone()
+		{
+			RC4 rc4 = new RC4();
+
+			rc4.x = this.x;
+			rc4.y = this.y;
+			rc4.state = (uint[])this.state.Clone();
+
+			return rc4;
+		}
+
+		public byte[] Encrypt(byte[] src)
+		{
+			return Encrypt(src, src.Length);
+		}
+		public byte[] Encrypt(byte[] src, int len)
+		{
+			return Encrypt(src, 0, len);
+		}
+		public byte[] Encrypt(byte[] src, int offset, int len)
+		{
+			byte[] dst = new byte[len];
+
+			uint x, y, sx, sy;
+			x = this.x;
+			y = this.y;
+
+			int src_i = 0, dst_i = 0, end_src_i;
+
+			for (end_src_i = src_i + len; src_i != end_src_i; src_i++, dst_i++)
+			{
+				x = (x + 1) & 0xff;
+				sx = state[x];
+				y = (sx + y) & 0xff;
+				state[x] = sy = state[y];
+				state[y] = sx;
+				dst[dst_i] = (byte)(src[src_i + offset] ^ state[(sx + sy) & 0xff]);
+			}
+
+			this.x = x;
+			this.y = y;
+
+			return dst;
+		}
+		public void SkipDecrypt(int len)
+		{
+			SkipEncrypt(len);
+		}
+		public void SkipEncrypt(int len)
+		{
+			uint x, y, sx, sy;
+			x = this.x;
+			y = this.y;
+
+			int src_i = 0, dst_i = 0, end_src_i;
+
+			for (end_src_i = src_i + len; src_i != end_src_i; src_i++, dst_i++)
+			{
+				x = (x + 1) & 0xff;
+				sx = state[x];
+				y = (sx + y) & 0xff;
+				state[x] = sy = state[y];
+				state[y] = sx;
+			}
+
+			this.x = x;
+			this.y = y;
+		}
+
+		public byte[] Decrypt(byte[] src)
+		{
+			return Decrypt(src, src.Length);
+		}
+		public byte[] Decrypt(byte[] src, int len)
+		{
+			return Decrypt(src, 0, len);
+		}
+		public byte[] Decrypt(byte[] src, int offset, int len)
+		{
+			return Encrypt(src, offset, len);
+		}
+	}
+}
+
+// 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/

+ 306 - 0
src/BuildUtil/CoreUtil/ReadIni.cs

@@ -0,0 +1,306 @@
+// CoreUtil
+// 
+// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved.
+// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved.
+// Comments: Tetsuo Sugiyama, Ph.D.
+// 
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// version 2 as published by the Free Software Foundation.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License version 2
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// 
+// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE
+// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE.
+// 
+// 
+// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN,
+// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY,
+// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS
+// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS
+// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER
+// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL
+// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING,
+// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR
+// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
+// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO
+// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO,
+// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION
+// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN
+// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE.
+// 
+// USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS
+// SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
+// PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
+// COUNTRIES MIGHT BE RESTRICTED.
+// 
+// 
+// DEAR SECURITY EXPERTS
+// ---------------------
+// 
+// If you find a bug or a security vulnerability please kindly inform us
+// about the problem immediately so that we can fix the security problem
+// to protect a lot of users around the world as soon as possible.
+// 
+// Our e-mail address for security reports is:
+// softether-vpn-security [at] softether.org
+// 
+// Please note that the above e-mail address is not a technical support
+// inquiry address. If you need technical assistance, please visit
+// http://www.softether.org/ and ask your question on the users forum.
+// 
+// Thank you for your cooperation.
+
+
+using System;
+using System.Threading;
+using System.Data;
+using System.Data.Sql;
+using System.Data.SqlClient;
+using System.Data.SqlTypes;
+using System.Text;
+using System.Configuration;
+using System.Collections;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using System.Security.Cryptography.X509Certificates;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using System.IO;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Drawing.Drawing2D;
+using System.Web.Mail;
+
+namespace CoreUtil
+{
+	class IniCache
+	{
+		static Dictionary<string, IniCacheEntry> caches = new Dictionary<string, IniCacheEntry>();
+
+		class IniCacheEntry
+		{
+			DateTime lastUpdate;
+			public DateTime LastUpdate
+			{
+				get { return lastUpdate; }
+			}
+
+			Dictionary<string, string> datas;
+			public Dictionary<string, string> Datas
+			{
+				get { return datas; }
+			}
+
+			public IniCacheEntry(DateTime lastUpdate, Dictionary<string, string> datas)
+			{
+				this.lastUpdate = lastUpdate;
+				this.datas = datas;
+			}
+		}
+
+		public static Dictionary<string, string> GetCache(string filename, DateTime lastUpdate)
+		{
+			lock (caches)
+			{
+				try
+				{
+					IniCacheEntry e = caches[filename];
+					if (e.LastUpdate == lastUpdate || lastUpdate.Ticks == 0)
+					{
+						return e.Datas;
+					}
+					else
+					{
+						return null;
+					}
+				}
+				catch
+				{
+					return null;
+				}
+			}
+		}
+
+		public static void AddCache(string filename, DateTime lastUpdate, Dictionary<string, string> datas)
+		{
+			lock (caches)
+			{
+				if (caches.ContainsKey(filename))
+				{
+					caches.Remove(filename);
+				}
+
+				caches.Add(filename, new IniCacheEntry(lastUpdate, datas));
+			}
+		}
+	}
+
+	public class ReadIni
+	{
+		Dictionary<string, string> datas;
+		bool updated;
+
+		public bool Updated
+		{
+			get
+			{
+				return updated;
+			}
+		}
+
+		public StrData this[string key]
+		{
+			get
+			{
+				string s;
+				try
+				{
+					s = datas[key.ToUpper()];
+				}
+				catch
+				{
+					s = null;
+				}
+
+				return new StrData(s);
+			}
+		}
+
+		public string[] GetKeys()
+		{
+			List<string> ret = new List<string>();
+
+			foreach (string s in datas.Keys)
+			{
+				ret.Add(s);
+			}
+
+			return ret.ToArray();
+		}
+
+		public ReadIni(string filename)
+		{
+			init(null, filename);
+		}
+
+		void init(byte[] data)
+		{
+			init(data, null);
+		}
+		void init(byte[] data, string filename)
+		{
+			updated = false;
+
+			lock (typeof(ReadIni))
+			{
+				string[] lines;
+				string srcstr;
+				DateTime lastUpdate = new DateTime(0);
+
+				if (filename != null)
+				{
+					lastUpdate = IO.GetLastWriteTimeUtc(filename);
+
+					datas = IniCache.GetCache(filename, lastUpdate);
+				}
+
+				if (datas == null)
+				{
+					if (data == null)
+					{
+						try
+						{
+							data = Buf.ReadFromFile(filename).ByteData;
+						}
+						catch
+						{
+							data = new byte[0];
+							datas = IniCache.GetCache(filename, new DateTime());
+						}
+					}
+
+					if (datas == null)
+					{
+						datas = new Dictionary<string, string>();
+						Encoding currentEncoding = Str.Utf8Encoding;
+						srcstr = currentEncoding.GetString(data);
+
+						lines = Str.GetLines(srcstr);
+
+						foreach (string s in lines)
+						{
+							string line = s.Trim();
+
+							if (Str.IsEmptyStr(line) == false)
+							{
+								if (line.StartsWith("#") == false &&
+									line.StartsWith("//") == false &&
+									line.StartsWith(";") == false)
+								{
+									string key, value;
+
+									if (Str.GetKeyAndValue(line, out key, out value))
+									{
+										key = key.ToUpper();
+
+										if (datas.ContainsKey(key) == false)
+										{
+											datas.Add(key, value);
+										}
+										else
+										{
+											int i;
+											for (i = 1; ; i++)
+											{
+												string key2 = string.Format("{0}({1})", key, i).ToUpper();
+
+												if (datas.ContainsKey(key2) == false)
+												{
+													datas.Add(key2, value);
+													break;
+												}
+											}
+										}
+									}
+								}
+							}
+						}
+
+						if (filename != null)
+						{
+							IniCache.AddCache(filename, lastUpdate, datas);
+						}
+
+						updated = 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/

+ 537 - 0
src/BuildUtil/CoreUtil/Reg.cs

@@ -0,0 +1,537 @@
+// CoreUtil
+// 
+// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved.
+// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved.
+// Comments: Tetsuo Sugiyama, Ph.D.
+// 
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// version 2 as published by the Free Software Foundation.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License version 2
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// 
+// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE
+// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE.
+// 
+// 
+// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN,
+// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY,
+// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS
+// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS
+// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER
+// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL
+// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING,
+// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR
+// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
+// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO
+// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO,
+// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION
+// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN
+// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE.
+// 
+// USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS
+// SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
+// PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
+// COUNTRIES MIGHT BE RESTRICTED.
+// 
+// 
+// DEAR SECURITY EXPERTS
+// ---------------------
+// 
+// If you find a bug or a security vulnerability please kindly inform us
+// about the problem immediately so that we can fix the security problem
+// to protect a lot of users around the world as soon as possible.
+// 
+// Our e-mail address for security reports is:
+// softether-vpn-security [at] softether.org
+// 
+// Please note that the above e-mail address is not a technical support
+// inquiry address. If you need technical assistance, please visit
+// http://www.softether.org/ and ask your question on the users forum.
+// 
+// Thank you for your cooperation.
+
+
+using System;
+using System.Threading;
+using System.Data;
+using System.Data.Sql;
+using System.Data.SqlClient;
+using System.Data.SqlTypes;
+using System.Text;
+using System.Configuration;
+using System.Collections;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using System.IO;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Drawing.Drawing2D;
+using System.Diagnostics;
+using System.Web.Mail;
+using System.Net;
+using System.Net.Sockets;
+using System.Net.NetworkInformation;
+using Microsoft.Win32;
+
+namespace CoreUtil
+{
+	public class AppReg
+	{
+		string appSubKey;
+		public string AppSubKey
+		{
+			get { return appSubKey; }
+		}
+		RegRoot rootKey;
+		public RegRoot RootKey
+		{
+			get { return rootKey; }
+		}
+
+		public AppReg(RegRoot root, string subkey)
+		{
+			subkey = subkey.TrimEnd('\\');
+			this.rootKey = root;
+			this.appSubKey = subkey;
+		}
+
+		public AppReg GetSubReg(string subKeyName)
+		{
+			return new AppReg(rootKey, appSubKey + "\\" + subKeyName);
+		}
+
+		public bool WriteStr(string name, string value)
+		{
+			return Reg.WriteStr(rootKey, appSubKey, name, value);
+		}
+
+		public bool WriteInt(string name, int value)
+		{
+			return Reg.WriteInt(rootKey, appSubKey, name, value);
+		}
+
+		public bool WriteStrList(string name, string[] values)
+		{
+			return Reg.WriteStrList(rootKey, appSubKey, name, values);
+		}
+
+		public bool WriteByte(string name, byte[] data)
+		{
+			return Reg.WriteByte(rootKey, appSubKey, name, data);
+		}
+
+		public bool DeleteValue(string name)
+		{
+			return Reg.DeleteValue(rootKey, appSubKey, name);
+		}
+
+		public string ReadStr(string name)
+		{
+			return Reg.ReadStr(rootKey, appSubKey, name);
+		}
+
+		public int ReadInt(string name)
+		{
+			return Reg.ReadInt(rootKey, appSubKey, name);
+		}
+
+		public string[] ReadStrList(string name)
+		{
+			return Reg.ReadStrList(rootKey, appSubKey, name);
+		}
+
+		public byte[] ReadByte(string name)
+		{
+			return Reg.ReadByte(rootKey, appSubKey, name);
+		}
+	}
+
+	public enum RegRoot
+	{
+		LocalMachine = 0,
+		CurrentUser = 1,
+		Users = 2,
+	}
+
+	public static class Reg
+	{
+		static RegistryKey rootKey(RegRoot r)
+		{
+			switch (r)
+			{
+				case RegRoot.LocalMachine:
+					return Registry.LocalMachine;
+
+				case RegRoot.CurrentUser:
+					return Registry.CurrentUser;
+
+				case RegRoot.Users:
+					return Registry.Users;
+			}
+
+			throw new ArgumentException();
+		}
+
+		public static string[] EnumValue(RegRoot root, string keyname)
+		{
+			try
+			{
+				RegistryKey key = rootKey(root).OpenSubKey(keyname);
+
+				if (key == null)
+				{
+					return new string[0];
+				}
+
+				try
+				{
+					return key.GetValueNames();
+				}
+				finally
+				{
+					key.Close();
+				}
+			}
+			catch
+			{
+				return new string[0];
+			}
+		}
+
+		public static string[] EnumKey(RegRoot root, string keyname)
+		{
+			try
+			{
+				RegistryKey key = rootKey(root).OpenSubKey(keyname);
+
+				if (key == null)
+				{
+					return new string[0];
+				}
+
+				try
+				{
+					return key.GetSubKeyNames();
+				}
+				finally
+				{
+					key.Close();
+				}
+			}
+			catch
+			{
+				return new string[0];
+			}
+		}
+
+		public static bool WriteByte(RegRoot root, string keyname, string valuename, byte[] data)
+		{
+			return WriteValue(root, keyname, valuename, data);
+		}
+
+		public static byte[] ReadByte(RegRoot root, string keyname, string valuename)
+		{
+			object o = ReadValue(root, keyname, valuename);
+			if (o == null)
+			{
+				return new byte[0];
+			}
+
+			try
+			{
+				return (byte[])o;
+			}
+			catch
+			{
+				return new byte[0];
+			}
+		}
+
+		public static bool WriteInt(RegRoot root, string keyname, string valuename, int value)
+		{
+			return WriteValue(root, keyname, valuename, value);
+		}
+
+		public static int ReadInt(RegRoot root, string keyname, string valuename)
+		{
+			object o = ReadValue(root, keyname, valuename);
+			if (o == null)
+			{
+				return 0;
+			}
+
+			try
+			{
+				return (int)o;
+			}
+			catch
+			{
+				return 0;
+			}
+		}
+
+		public static bool WriteStrList(RegRoot root, string keyname, string valuename, string[] value)
+		{
+			return WriteValue(root, keyname, valuename, value);
+		}
+
+		public static string[] ReadStrList(RegRoot root, string keyname, string valuename)
+		{
+			object o = ReadValue(root, keyname, valuename);
+			if (o == null)
+			{
+				return new string[0];
+			}
+
+			try
+			{
+				return (string[])o;
+			}
+			catch
+			{
+				return new string[0];
+			}
+		}
+
+		public static bool WriteStr(RegRoot root, string keyname, string valuename, string value)
+		{
+			return WriteValue(root, keyname, valuename, value);
+		}
+
+		public static string ReadStr(RegRoot root, string keyname, string valuename)
+		{
+			object o = ReadValue(root, keyname, valuename);
+			if (o == null)
+			{
+				return "";
+			}
+
+			try
+			{
+				return (string)o;
+			}
+			catch
+			{
+				return "";
+			}
+		}
+
+		public static bool WriteValue(RegRoot root, string keyname, string valuename, object o)
+		{
+			try
+			{
+				RegistryKey key = rootKey(root).OpenSubKey(keyname, true);
+
+				if (key == null)
+				{
+					key = rootKey(root).CreateSubKey(keyname);
+
+					if (key == null)
+					{
+						return false;
+					}
+				}
+
+				try
+				{
+					key.SetValue(valuename, o);
+
+					return true;
+				}
+				catch
+				{
+					return false;
+				}
+				finally
+				{
+					key.Close();
+				}
+			}
+			catch
+			{
+				return false;
+			}
+		}
+
+		public static object ReadValue(RegRoot root, string keyname, string valuename)
+		{
+			try
+			{
+				RegistryKey key = rootKey(root).OpenSubKey(keyname);
+
+				if (key == null)
+				{
+					return null;
+				}
+
+				try
+				{
+					return key.GetValue(valuename);
+				}
+				finally
+				{
+					key.Close();
+				}
+			}
+			catch
+			{
+				return null;
+			}
+		}
+
+		public static bool IsValue(RegRoot root, string keyname, string valuename)
+		{
+			try
+			{
+				RegistryKey key = rootKey(root).OpenSubKey(keyname);
+
+				try
+				{
+					object o = key.GetValue(valuename);
+
+					if (o == null)
+					{
+						return false;
+					}
+				}
+				finally
+				{
+					key.Close();
+				}
+
+				return true;
+			}
+			catch
+			{
+				return false;
+			}
+		}
+
+		public static bool DeleteValue(RegRoot root, string keyname, string valuename)
+		{
+			try
+			{
+				RegistryKey key = rootKey(root).OpenSubKey(keyname, true);
+
+				if (key == null)
+				{
+					return false;
+				}
+
+				try
+				{
+					key.DeleteValue(valuename);
+
+					return true;
+				}
+				finally
+				{
+					key.Close();
+				}
+			}
+			catch
+			{
+				return false;
+			}
+		}
+
+		public static bool DeleteKey(RegRoot root, string keyname)
+		{
+			return DeleteKey(root, keyname, false);
+		}
+		public static bool DeleteKey(RegRoot root, string keyname, bool deleteAll)
+		{
+			try
+			{
+				if (deleteAll == false)
+				{
+					rootKey(root).DeleteSubKey(keyname);
+				}
+				else
+				{
+					rootKey(root).DeleteSubKeyTree(keyname);
+				}
+
+				return true;
+			}
+			catch
+			{
+				return false;
+			}
+		}
+
+		public static bool NewKey(RegRoot root, string keyname)
+		{
+			if (IsKey(root, keyname))
+			{
+				return true;
+			}
+
+			try
+			{
+				RegistryKey key = rootKey(root).CreateSubKey(keyname);
+
+				if (key == null)
+				{
+					return false;
+				}
+
+				key.Close();
+
+				return true;
+			}
+			catch
+			{
+				return false;
+			}
+		}
+
+		public static bool IsKey(RegRoot root, string name)
+		{
+			try
+			{
+				RegistryKey key = rootKey(root).OpenSubKey(name);
+
+				if (key == null)
+				{
+					return false;
+				}
+
+				key.Close();
+
+				return true;
+			}
+			catch
+			{
+				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/

+ 1029 - 0
src/BuildUtil/CoreUtil/Secure.cs

@@ -0,0 +1,1029 @@
+// CoreUtil
+// 
+// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved.
+// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved.
+// Comments: Tetsuo Sugiyama, Ph.D.
+// 
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// version 2 as published by the Free Software Foundation.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License version 2
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// 
+// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE
+// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE.
+// 
+// 
+// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN,
+// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY,
+// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS
+// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS
+// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER
+// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL
+// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING,
+// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR
+// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
+// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO
+// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO,
+// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION
+// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN
+// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE.
+// 
+// USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS
+// SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
+// PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
+// COUNTRIES MIGHT BE RESTRICTED.
+// 
+// 
+// DEAR SECURITY EXPERTS
+// ---------------------
+// 
+// If you find a bug or a security vulnerability please kindly inform us
+// about the problem immediately so that we can fix the security problem
+// to protect a lot of users around the world as soon as possible.
+// 
+// Our e-mail address for security reports is:
+// softether-vpn-security [at] softether.org
+// 
+// Please note that the above e-mail address is not a technical support
+// inquiry address. If you need technical assistance, please visit
+// http://www.softether.org/ and ask your question on the users forum.
+// 
+// Thank you for your cooperation.
+
+
+using System;
+using System.Threading;
+using System.Data;
+using System.Data.Sql;
+using System.Data.SqlClient;
+using System.Data.SqlTypes;
+using System.Text;
+using System.Configuration;
+using System.Collections;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using System.Security.Cryptography.X509Certificates;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using System.IO;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Drawing.Drawing2D;
+using System.Web.Mail;
+using System.Runtime.InteropServices;
+
+namespace CoreUtil
+{
+	public class CommonSign
+	{
+		byte[] keyData;
+		static uint init_dummy = CryptoConfigHelper.Init();
+
+		public CommonSign(byte[] key)
+		{
+			init(key);
+		}
+		public CommonSign(Buf buf)
+		{
+			init(buf.ByteData);
+		}
+		public CommonSign(string filename)
+		{
+			init(Buf.ReadFromFile(filename).ByteData);
+		}
+		void init(byte[] key)
+		{
+			keyData = (byte[])key.Clone();
+		}
+
+		public byte[] Sign(byte[] data)
+		{
+			Buf b = new Buf(data);
+			b.SeekToEnd();
+			b.Write(keyData);
+
+			return Secure.HashSHA1(b.ByteData);
+		}
+		public bool Verify(byte[] data, byte[] sign)
+		{
+			byte[] sign2 = Sign(data);
+
+			return Util.CompareByte(sign, sign2);
+		}
+	}
+
+	public class Rsa
+	{
+		byte[] data;
+		Cert cert;
+		static uint init_dummy = CryptoConfigHelper.Init();
+		static object lockObj = new object();
+
+		public Rsa(byte[] data)
+		{
+			init(data);
+		}
+		public Rsa(string filename)
+		{
+			Buf b = Buf.ReadFromFile(filename);
+			init(b.ByteData);
+		}
+		public Rsa(Buf b)
+		{
+			init(b.ByteData);
+		}
+		void init(byte[] data)
+		{
+			this.data = (byte[])data.Clone();
+			this.cert = null;
+
+			Cert.deleteOldTempFiles();
+		}
+
+		public Rsa(Cert cert)
+		{
+			init(cert);
+		}
+		void init(Cert cert)
+		{
+			this.cert = (Cert)cert.Clone();
+			this.data = null;
+
+			Cert.deleteOldTempFiles();
+		}
+
+		public byte[] SignData(byte[] data)
+		{
+			lock (lockObj)
+			{
+				byte[] ret;
+				using (RsaInner rsa = new RsaInner(this.data, this.cert))
+				{
+					ret = rsa.SignData(data);
+				}
+				return ret;
+			}
+		}
+
+		public byte[] SignHash(byte[] hash)
+		{
+			lock (lockObj)
+			{
+				byte[] ret;
+				using (RsaInner rsa = new RsaInner(this.data, this.cert))
+				{
+					ret = rsa.SignHash(hash);
+				}
+				return ret;
+			}
+		}
+
+		public bool VerifyData(byte[] data, byte[] sign)
+		{
+			lock (lockObj)
+			{
+				bool ret;
+				using (RsaInner rsa = new RsaInner(this.data, this.cert))
+				{
+					ret = rsa.VerifyData(data, sign);
+				}
+				return ret;
+			}
+		}
+
+		public bool VerifyHash(byte[] hash, byte[] sign)
+		{
+			lock (lockObj)
+			{
+				bool ret;
+				using (RsaInner rsa = new RsaInner(this.data, this.cert))
+				{
+					ret = rsa.VerifyHash(hash, sign);
+				}
+				return ret;
+			}
+		}
+
+		public byte[] Encrypt(byte[] data)
+		{
+			lock (lockObj)
+			{
+				using (RsaInner rsa = new RsaInner(this.data, this.cert))
+				{
+					return rsa.Encrypt(data);
+				}
+			}
+		}
+
+		public byte[] Decrypt(byte[] data)
+		{
+			lock (lockObj)
+			{
+				using (RsaInner rsa = new RsaInner(this.data, this.cert))
+				{
+					return rsa.Decrypt(data);
+				}
+			}
+		}
+
+		public int KeySizeBit
+		{
+			get
+			{
+				lock (lockObj)
+				{
+					using (RsaInner rsa = new RsaInner(this.data, this.cert))
+					{
+						return rsa.KeySizeBit;
+					}
+				}
+			}
+		}
+	}
+
+	class RsaInner : IDisposable
+	{
+		static string sha1rsa = CryptoConfig.MapNameToOID("SHA1");
+		RSACryptoServiceProvider rsa;
+		static object lockObj = new Object();
+		static LocalDataStoreSlot slot = Thread.AllocateDataSlot();
+		static LocalDataStoreSlot slot2 = Thread.AllocateDataSlot();
+		static uint init_dummy = CryptoConfigHelper.Init();
+
+		public static void Lock()
+		{
+		}
+
+		public static void Unlock()
+		{
+		}
+
+		public RsaInner(byte[] data, Cert cert)
+		{
+			if (data != null)
+			{
+				init(data);
+			}
+			else
+			{
+				init(cert);
+			}
+		}
+		public RsaInner(byte[] data)
+		{
+			init(data);
+		}
+		public RsaInner(string filename)
+		{
+			Buf b = Buf.ReadFromFile(filename);
+			init(b.ByteData);
+		}
+		public RsaInner(Buf b)
+		{
+			init(b.ByteData);
+		}
+		void init(byte[] data)
+		{
+			Lock();
+			rsa = readRsaPrivate(data);
+		}
+
+		public RsaInner(Cert cert)
+		{
+			init(cert);
+		}
+		void init(Cert cert)
+		{
+			Lock();
+			string text1 = cert.X509Cert.GetKeyAlgorithm();
+			byte[] buffer1 = cert.X509Cert.GetKeyAlgorithmParameters();
+			byte[] buffer2 = cert.X509Cert.GetPublicKey();
+			Oid oid1 = new Oid("1.2.840.113549.1.1.1", "RSA");
+
+			rsa = (RSACryptoServiceProvider)(new PublicKey(oid1, new AsnEncodedData(oid1, buffer1), new AsnEncodedData(oid1, buffer2))).Key;
+		}
+
+		public byte[] SignData(byte[] data)
+		{
+			byte[] hash = Secure.HashSHA1(data);
+			return SignHash(hash);
+		}
+
+		public byte[] SignHash(byte[] hash)
+		{
+			byte[] ret = null;
+			ret = rsa.SignHash(hash, sha1rsa);
+
+			return ret;
+		}
+
+		public bool VerifyData(byte[] data, byte[] sign)
+		{
+			byte[] hash = Secure.HashSHA1(data);
+			return VerifyHash(hash, sign);
+		}
+
+		public bool VerifyHash(byte[] hash, byte[] sign)
+		{
+			return rsa.VerifyHash(hash, sha1rsa, sign);
+		}
+
+		public byte[] Encrypt(byte[] data)
+		{
+			return rsa.Encrypt(data, false);
+		}
+
+		public byte[] Decrypt(byte[] data)
+		{
+			return rsa.Decrypt(data, false);
+		}
+
+		static RSACryptoServiceProvider readRsaPrivate(byte[] data)
+		{
+			// From http://forums.l-space-design.com/blogs/day_of_the_developer/archive/2006/06/08/216.aspx
+			string t = Str.AsciiEncoding.GetString(data);
+			if (!t.StartsWith("-----BEGIN RSA PRIVATE KEY-----"))
+			{
+				throw new ArgumentException("Not an RSA Private Key");
+			}
+			t = t.Substring("-----BEGIN RSA PRIVATE KEY-----".Length);
+			t = t.Substring(0, t.IndexOf("----"));
+			t = t.Replace("\r", "").Replace("\n", "");
+			byte[] byteArray = System.Convert.FromBase64String(t);
+			System.IO.MemoryStream s = new MemoryStream(byteArray);
+			BinaryReader binr = new BinaryReader(s, Str.AsciiEncoding);
+			byte[] MODULUS, E, D, P, Q, DP, DQ, IQ;
+			// --------- Set up stream to decode the asn.1 encoded RSA private key ------
+			byte bt = 0;
+			ushort twobytes = 0;
+			int elems = 0;
+			RSAParameters result = new RSAParameters();
+			try
+			{
+				twobytes = binr.ReadUInt16();
+				if (twobytes == 0x8130) //data read as little endian order (actual data order for Sequence is 30 81)
+					binr.ReadByte(); //advance 1 byte
+				else if (twobytes == 0x8230)
+					binr.ReadInt16(); //advance 2 bytes
+				else
+					return null;
+				twobytes = binr.ReadUInt16();
+				if (twobytes != 0x0102) //version number
+					return null;
+				bt = binr.ReadByte();
+				if (bt != 0x00)
+					return null;
+				//------ all private key components are Integer sequences ----
+				elems = getIntegerSize(binr);
+				MODULUS = binr.ReadBytes(elems);
+				elems = getIntegerSize(binr);
+				E = binr.ReadBytes(elems);
+				elems = getIntegerSize(binr);
+				D = binr.ReadBytes(elems);
+				elems = getIntegerSize(binr);
+				P = binr.ReadBytes(elems);
+				elems = getIntegerSize(binr);
+				Q = binr.ReadBytes(elems);
+				elems = getIntegerSize(binr);
+				DP = binr.ReadBytes(elems);
+				elems = getIntegerSize(binr);
+				DQ = binr.ReadBytes(elems);
+				elems = getIntegerSize(binr);
+				IQ = binr.ReadBytes(elems);
+				result.Modulus = MODULUS;
+				result.Exponent = E;
+				result.D = D;
+				result.P = P;
+				result.Q = Q;
+				result.DP = DP;
+				result.DQ = DQ;
+				result.InverseQ = IQ;
+			}
+			catch (Exception)
+			{
+				return null;
+			}
+			finally
+			{
+				binr.Close();
+			}
+			CspParameters cp = new CspParameters();
+			cp.Flags = CspProviderFlags.UseMachineKeyStore;
+			RSACryptoServiceProvider RSA = new RSACryptoServiceProvider(cp);
+			RSA.PersistKeyInCsp = false;
+			RSA.ImportParameters(result);
+			return RSA;
+		}
+
+		static int getIntegerSize(BinaryReader binr)
+		{
+			byte bt = 0;
+			byte lowbyte = 0x00;
+			byte highbyte = 0x00;
+			int count = 0;
+			bt = binr.ReadByte();
+			if (bt != 0x02) //expect integer
+				return 0;
+			bt = binr.ReadByte();
+			if (bt == 0x81)
+				count = binr.ReadByte(); // data size in next byte
+			else
+				if (bt == 0x82)
+				{
+					highbyte = binr.ReadByte(); // data size in next 2 bytes
+					lowbyte = binr.ReadByte();
+					byte[] modint = { lowbyte, highbyte, 0x00, 0x00 };
+					count = BitConverter.ToInt32(modint, 0);
+				}
+				else
+				{
+					count = bt; // we already have the data size
+				}
+			while (binr.PeekChar() == 0x00)
+			{ //remove high order zeros in data
+				binr.ReadByte();
+				count -= 1;
+			}
+			return count;
+		}
+
+		public void Dispose()
+		{
+			rsa.Clear();
+			rsa = null;
+			Unlock();
+		}
+
+		public int KeySizeBit
+		{
+			get
+			{
+				return rsa.KeySize;
+			}
+		}
+	}
+
+	public class Cert
+	{
+		X509Certificate2 x509;
+		static TimeSpan deleteOldCertSpan = new TimeSpan(0, 0, 30);
+		static object lockObj = new Object();
+		static RSACryptoServiceProvider rsaDummy = null;
+		static uint init_dummy = CryptoConfigHelper.Init();
+
+		public int KeySizeBit
+		{
+			get
+			{
+				Rsa r = new Rsa(this);
+
+				return r.KeySizeBit;
+			}
+		}
+
+		public X509Certificate2 X509Cert
+		{
+			get { return x509; }
+		}
+
+		public Rsa RsaPublicKey
+		{
+			get
+			{
+				return new Rsa(this);
+			}
+		}
+
+		public Cert(byte[] data)
+		{
+			init(data);
+		}
+		public Cert(string filename)
+		{
+			init(IO.ReadFile(filename));
+		}
+		public Cert(Buf buf)
+		{
+			init(buf.ByteData);
+		}
+		void init(byte[] data)
+		{
+			deleteOldTempFiles();
+			x509 = new X509Certificate2(data);
+
+			if (rsaDummy == null)
+			{
+				rsaDummy = (RSACryptoServiceProvider)(new X509Certificate2(data).PublicKey.Key);
+			}
+		}
+
+		public byte[] Hash
+		{
+			get
+			{
+				return x509.GetCertHash();
+			}
+		}
+
+		public byte[] PublicKey
+		{
+			get
+			{
+				return x509.GetPublicKey();
+			}
+		}
+
+		public byte[] ByteData
+		{
+			get
+			{
+				return x509.Export(X509ContentType.Cert);
+			}
+		}
+		public Buf ToBuf()
+		{
+			return new Buf(ByteData);
+		}
+		public void ToFile(string filename)
+		{
+			ToBuf().WriteToFile(filename);
+		}
+
+		public Cert Clone()
+		{
+			return new Cert(this.ByteData);
+		}
+
+		static DateTime lastDeletedDateTime = new DateTime();
+		static readonly TimeSpan deleteTimeSpan = new TimeSpan(0, 1, 0);
+		internal static void deleteOldTempFiles()
+		{
+			lock (lockObj)
+			{
+				DateTime now = Time.NowDateTime;
+
+				if (lastDeletedDateTime.Ticks == 0 ||
+					now >= (lastDeletedDateTime + deleteTimeSpan))
+				{
+					lastDeletedDateTime = now;
+
+					string tempDir = Path.GetTempPath();
+					string[] files = Directory.GetFiles(tempDir);
+
+					if (files != null)
+					{
+						foreach (string name in files)
+						{
+							try
+							{
+								if (Str.StrCmpi(Path.GetExtension(name), ".tmp") && Path.GetFileName(name).StartsWith("tmp", StringComparison.CurrentCultureIgnoreCase))
+								{
+									DateTime dt = File.GetLastWriteTimeUtc(name);
+									if ((DateTime.UtcNow - dt) >= deleteOldCertSpan)
+									{
+										FileInfo info = new FileInfo(name);
+
+										if (info.Length == 0)
+										{
+											try
+											{
+												File.Delete(name);
+											}
+											catch
+											{
+											}
+										}
+									}
+								}
+							}
+							catch
+							{
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+
+	public class Secure
+	{
+		static RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();
+		static MD5 md5 = new MD5CryptoServiceProvider();
+		static uint init_dummy = CryptoConfigHelper.Init();
+		public const uint SHA1Size = 20;
+		public const uint MD5Size = 16;
+		static object rand_lock = new object();
+
+		public static byte[] Rand(uint size)
+		{
+			lock (rand_lock)
+			{
+				byte[] ret = new byte[size];
+				rng.GetBytes(ret);
+				return ret;
+			}
+		}
+		public static uint Rand32()
+		{
+			return BitConverter.ToUInt32(Rand(4), 0);
+		}
+		public static ulong Rand64()
+		{
+			return BitConverter.ToUInt64(Rand(8), 0);
+		}
+		public static ushort Rand16()
+		{
+			return BitConverter.ToUInt16(Rand(2), 0);
+		}
+		public static int Rand32i()
+		{
+			return BitConverter.ToInt32(Rand(4), 0);
+		}
+		public static long Rand64i()
+		{
+			return BitConverter.ToInt64(Rand(8), 0);
+		}
+		public static short Rand16i()
+		{
+			return BitConverter.ToInt16(Rand(2), 0);
+		}
+		public static int Rand31i()
+		{
+			while (true)
+			{
+				int i = Rand32i();
+				if (i >= 0)
+				{
+					return i;
+				}
+			}
+		}
+		public static long Rand63i()
+		{
+			while (true)
+			{
+				long i = Rand64i();
+				if (i >= 0)
+				{
+					return i;
+				}
+			}
+		}
+		public static short Rand15i()
+		{
+			while (true)
+			{
+				short i = Rand16i();
+				if (i >= 0)
+				{
+					return i;
+				}
+			}
+		}
+		public static byte Rand8()
+		{
+			return Rand(1)[0];
+		}
+		public static bool Rand1()
+		{
+			return (Rand32() % 2) == 0;
+		}
+
+		// MD5
+		public static byte[] HashMD5(byte[] data)
+		{
+			byte[] ret;
+
+			RsaInner.Lock();
+			try
+			{
+				ret = md5.ComputeHash(data);
+			}
+			finally
+			{
+				RsaInner.Unlock();
+			}
+
+			return ret;
+		}
+
+		// SHA1
+		public static byte[] HashSHA1(byte[] data)
+		{
+			SHA1 sha1 = new SHA1Managed();
+
+			return sha1.ComputeHash(data);
+		}
+
+		// SHA256
+		public static byte[] HashSHA256(byte[] data)
+		{
+			SHA256 sha256 = new SHA256Managed();
+
+			return sha256.ComputeHash(data);
+		}
+
+		public static byte[] PkcsPadding(byte[] srcData, int destSize)
+		{
+			int srcSize = srcData.Length;
+
+			if ((srcSize + 11) > destSize)
+			{
+				throw new OverflowException();
+			}
+
+			int randSize = destSize - srcSize - 3;
+			byte[] rand = Secure.Rand((uint)randSize);
+
+			Buf b = new Buf();
+			b.WriteByte(0x00);
+			b.WriteByte(0x02);
+			b.Write(rand);
+			b.WriteByte(0x00);
+			b.Write(srcData);
+
+			return b.ByteData;
+		}
+	}
+
+	public class CryptoConfigHelper
+	{
+		static object objLock = new Object();
+		static bool flag = false;
+
+		public static uint Init()
+		{
+			try
+			{
+				lock (objLock)
+				{
+					if (flag == false)
+					{
+						flag = true;
+						Type t = typeof(CryptoConfig);
+						Hashtable ht = (Hashtable)t.InvokeMember("DefaultOidHT", System.Reflection.BindingFlags.GetProperty | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static,
+							null, null, null);
+						List<string> values = new List<string>();
+
+						foreach (string key in ht.Keys)
+						{
+							string value = (string)ht[key];
+
+							values.Add(value);
+						}
+
+						foreach (string s in values)
+						{
+							ht.Add(s, s);
+						}
+					}
+				}
+			}
+			catch
+			{
+			}
+
+			return 0;
+		}
+	}
+
+	public static class ExeSignChecker
+	{
+		public static bool IsKernelModeSignedFile(string fileName)
+		{
+			return IsKernelModeSignedFile(File.ReadAllBytes(fileName));
+		}
+
+		public static bool IsKernelModeSignedFile(byte[] data)
+		{
+			string str = Str.AsciiEncoding.GetString(data);
+
+			if (str.IndexOf("Microsoft Code Verification Root") != -1 &&
+				str.IndexOf("http://crl.microsoft.com/pki/crl/products/MicrosoftCodeVerifRoot.crl") != -1)
+			{
+				return true;
+			}
+
+			return false;
+		}
+
+		enum SignChecker_MemoryAllocator { HGlobal, CoTaskMem };
+		enum SignChecker_UiChoice { All = 1, NoUI, NoBad, NoGood };
+		enum SignChecker_StateAction { Ignore = 0, Verify, Close, AutoCache, AutoCacheFlush };
+		enum SignChecker_UnionChoice { File = 1, Catalog, Blob, Signer, Cert };
+		enum SignChecker_RevocationCheckFlags { None = 0, WholeChain };
+		enum SignChecker_TrustProviderFlags
+		{
+			UseIE4Trust = 1,
+			NoIE4Chain = 2,
+			NoPolicyUsage = 4,
+			RevocationCheckNone = 16,
+			RevocationCheckEndCert = 32,
+			RevocationCheckChain = 64,
+			RecovationCheckChainExcludeRoot = 128,
+			Safer = 256,
+			HashOnly = 512,
+			UseDefaultOSVerCheck = 1024,
+			LifetimeSigning = 2048
+		};
+		enum SignChecker_UIContext { Execute = 0, Install };
+
+		[DllImport("Wintrust.dll", PreserveSig = true, SetLastError = false)]
+		static extern uint WinVerifyTrust(IntPtr hWnd, IntPtr pgActionID, IntPtr pWinTrustData);
+
+		sealed class SignCheckerUnmanagedPointer : IDisposable
+		{
+			private IntPtr m_ptr;
+			private SignChecker_MemoryAllocator m_meth;
+			public SignCheckerUnmanagedPointer(IntPtr ptr, SignChecker_MemoryAllocator method)
+			{
+				m_meth = method;
+				m_ptr = ptr;
+			}
+
+			~SignCheckerUnmanagedPointer()
+			{
+				Dispose(false);
+			}
+
+			void Dispose(bool disposing)
+			{
+				if (m_ptr != IntPtr.Zero)
+				{
+					if (m_meth == SignChecker_MemoryAllocator.HGlobal)
+					{
+						Marshal.FreeHGlobal(m_ptr);
+					}
+					else if (m_meth == SignChecker_MemoryAllocator.CoTaskMem)
+					{
+						Marshal.FreeCoTaskMem(m_ptr);
+					}
+					m_ptr = IntPtr.Zero;
+				}
+
+				if (disposing)
+				{
+					GC.SuppressFinalize(this);
+				}
+			}
+
+			public void Dispose()
+			{
+				Dispose(true);
+			}
+
+			public static implicit operator IntPtr(SignCheckerUnmanagedPointer ptr)
+			{
+				return ptr.m_ptr;
+			}
+		}
+
+		struct WINTRUST_FILE_INFO : IDisposable
+		{
+			public WINTRUST_FILE_INFO(string fileName, Guid subject)
+			{
+				cbStruct = (uint)Marshal.SizeOf(typeof(WINTRUST_FILE_INFO));
+				pcwszFilePath = fileName;
+
+				if (subject != Guid.Empty)
+				{
+					tmp = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(Guid)));
+					Marshal.StructureToPtr(subject, tmp, false);
+				}
+				else
+				{
+					tmp = IntPtr.Zero;
+				}
+				hFile = IntPtr.Zero;
+			}
+			public uint cbStruct;
+			[MarshalAs(UnmanagedType.LPTStr)]
+			public string pcwszFilePath;
+			public IntPtr hFile;
+			public IntPtr tmp;
+
+			public void Dispose()
+			{
+				Dispose(true);
+			}
+
+			private void Dispose(bool disposing)
+			{
+				if (tmp != IntPtr.Zero)
+				{
+					Marshal.DestroyStructure(this.tmp, typeof(Guid));
+					Marshal.FreeHGlobal(this.tmp);
+				}
+			}
+		}
+
+		[StructLayout(LayoutKind.Sequential)]
+		struct WINTRUST_DATA : IDisposable
+		{
+			public WINTRUST_DATA(WINTRUST_FILE_INFO fileInfo)
+			{
+				this.cbStruct = (uint)Marshal.SizeOf(typeof(WINTRUST_DATA));
+				pInfoStruct = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(WINTRUST_FILE_INFO)));
+				Marshal.StructureToPtr(fileInfo, pInfoStruct, false);
+				dwUnionChoice = SignChecker_UnionChoice.File;
+				pPolicyCallbackData = IntPtr.Zero;
+				pSIPCallbackData = IntPtr.Zero;
+				dwUIChoice = SignChecker_UiChoice.NoUI;
+				fdwRevocationChecks = SignChecker_RevocationCheckFlags.WholeChain;
+				dwStateAction = SignChecker_StateAction.Ignore;
+				hWVTStateData = IntPtr.Zero;
+				pwszURLReference = IntPtr.Zero;
+				dwProvFlags = SignChecker_TrustProviderFlags.RevocationCheckChain;
+
+				dwUIContext = SignChecker_UIContext.Execute;
+			}
+
+			public uint cbStruct;
+			public IntPtr pPolicyCallbackData;
+			public IntPtr pSIPCallbackData;
+			public SignChecker_UiChoice dwUIChoice;
+			public SignChecker_RevocationCheckFlags fdwRevocationChecks;
+			public SignChecker_UnionChoice dwUnionChoice;
+			public IntPtr pInfoStruct;
+			public SignChecker_StateAction dwStateAction;
+			public IntPtr hWVTStateData;
+			private IntPtr pwszURLReference;
+			public SignChecker_TrustProviderFlags dwProvFlags;
+			public SignChecker_UIContext dwUIContext;
+
+			public void Dispose()
+			{
+				Dispose(true);
+			}
+
+			private void Dispose(bool disposing)
+			{
+				if (dwUnionChoice == SignChecker_UnionChoice.File)
+				{
+					WINTRUST_FILE_INFO info = new WINTRUST_FILE_INFO();
+					Marshal.PtrToStructure(pInfoStruct, info);
+					info.Dispose();
+					Marshal.DestroyStructure(pInfoStruct, typeof(WINTRUST_FILE_INFO));
+				}
+
+				Marshal.FreeHGlobal(pInfoStruct);
+			}
+		}
+
+		public static bool CheckFileDigitalSignature(string fileName)
+		{
+			Guid wintrust_action_generic_verify_v2 = new Guid("{00AAC56B-CD44-11d0-8CC2-00C04FC295EE}");
+			WINTRUST_FILE_INFO fileInfo = new WINTRUST_FILE_INFO(fileName, Guid.Empty);
+			WINTRUST_DATA data = new WINTRUST_DATA(fileInfo);
+
+			uint ret = 0;
+
+			using (SignCheckerUnmanagedPointer guidPtr = new SignCheckerUnmanagedPointer(Marshal.AllocHGlobal(Marshal.SizeOf(typeof(Guid))), SignChecker_MemoryAllocator.HGlobal))
+			using (SignCheckerUnmanagedPointer wvtDataPtr = new SignCheckerUnmanagedPointer(Marshal.AllocHGlobal(Marshal.SizeOf(typeof(WINTRUST_DATA))), SignChecker_MemoryAllocator.HGlobal))
+			{
+				IntPtr pGuid = guidPtr;
+				IntPtr pData = wvtDataPtr;
+
+				Marshal.StructureToPtr(wintrust_action_generic_verify_v2, pGuid, false);
+				Marshal.StructureToPtr(data, pData, false);
+
+				ret = WinVerifyTrust(IntPtr.Zero, pGuid, pData);
+			}
+
+			if (ret != 0)
+			{
+				return false;
+			}
+
+			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/

+ 352 - 0
src/BuildUtil/CoreUtil/Stb.cs

@@ -0,0 +1,352 @@
+// CoreUtil
+// 
+// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved.
+// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved.
+// Comments: Tetsuo Sugiyama, Ph.D.
+// 
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// version 2 as published by the Free Software Foundation.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License version 2
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// 
+// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE
+// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE.
+// 
+// 
+// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN,
+// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY,
+// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS
+// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS
+// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER
+// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL
+// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING,
+// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR
+// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
+// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO
+// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO,
+// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION
+// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN
+// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE.
+// 
+// USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS
+// SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
+// PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
+// COUNTRIES MIGHT BE RESTRICTED.
+// 
+// 
+// DEAR SECURITY EXPERTS
+// ---------------------
+// 
+// If you find a bug or a security vulnerability please kindly inform us
+// about the problem immediately so that we can fix the security problem
+// to protect a lot of users around the world as soon as possible.
+// 
+// Our e-mail address for security reports is:
+// softether-vpn-security [at] softether.org
+// 
+// Please note that the above e-mail address is not a technical support
+// inquiry address. If you need technical assistance, please visit
+// http://www.softether.org/ and ask your question on the users forum.
+// 
+// Thank you for your cooperation.
+
+
+using System;
+using System.Threading;
+using System.Data;
+using System.Data.Sql;
+using System.Data.SqlClient;
+using System.Data.SqlTypes;
+using System.Text;
+using System.Configuration;
+using System.Collections;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using System.IO;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Drawing.Drawing2D;
+using System.Diagnostics;
+using System.Web.Mail;
+using System.Net;
+using System.Net.Sockets;
+using System.Net.NetworkInformation;
+using System.Net.Mail;
+using System.Net.Mime;
+using System.Reflection;
+using CoreUtil;
+
+namespace CoreUtil
+{
+	public class Stb
+	{
+		Dictionary<string, StbEntry> entryList;
+
+		public string this[string name]
+		{
+			get
+			{
+				if (entryList.ContainsKey(name.ToUpper()))
+				{
+					return entryList[name.ToUpper()].String;
+				}
+				else
+				{
+					return "";
+				}
+			}
+		}
+
+		public Stb(string filename)
+		{
+			init(IO.ReadFile(filename));
+		}
+
+		public Stb(byte[] data)
+		{
+			init(data);
+		}
+
+		void init(byte[] data)
+		{
+			entryList = new Dictionary<string, StbEntry>();
+			MemoryStream ms = new MemoryStream(data);
+			StreamReader sr = new StreamReader(ms);
+			string prefix = "";
+
+			while (true)
+			{
+				string tmp = sr.ReadLine();
+				if (tmp == null)
+				{
+					break;
+				}
+
+				StbEntry t = StbEntry.ParseTableLine(tmp, ref prefix);
+				if (t != null)
+				{
+					if (entryList.ContainsKey(t.Name.ToUpper()) == false)
+					{
+						entryList.Add(t.Name.ToUpper(), t);
+					}
+				}
+			}
+		}
+
+		const string standardStbFileName = "|strtable.stb";
+		static string defaultStbFileName = standardStbFileName;
+		static object lockObj = new object();
+		static Stb defaultStb = null;
+		public static string DefaultStbFileName
+		{
+			set
+			{
+				defaultStbFileName = value;
+			}
+
+			get
+			{
+				return defaultStbFileName;
+			}
+		}
+		public static Stb DefaultStb
+		{
+			get
+			{
+				lock (lockObj)
+				{
+					if (defaultStb == null)
+					{
+						defaultStb = new Stb(Stb.DefaultStbFileName);
+					}
+
+					return defaultStb;
+				}
+			}
+		}
+		public static string SS(string name)
+		{
+			return DefaultStb[name];
+		}
+		public static uint II(string name)
+		{
+			return Str.StrToUInt(SS(name));
+		}
+	}
+
+	public class StbEntry
+	{
+		string name;
+		public string Name
+		{
+			get { return name; }
+		}
+
+		string str;
+		public string String
+		{
+			get { return str; }
+		}
+
+		public StbEntry(string name, string str)
+		{
+			this.name = name;
+			this.str = str;
+		}
+		public static StbEntry ParseTableLine(string line, ref string prefix)
+		{
+			int i, len;
+			int string_start;
+			int len_name;
+			string name, name2;
+
+			line = line.TrimStart(' ', '\t');
+			len = line.Length;
+			if (len == 0)
+			{
+				return null;
+			}
+
+			if (line[0] == '#' || (line[0] == '/' && line[1] == '/'))
+			{
+				return null;
+			}
+
+			bool b = false;
+			len_name = 0;
+			for (i = 0; i < line.Length; i++)
+			{
+				if (line[i] == ' ' || line[i] == '\t')
+				{
+					b = true;
+					break;
+				}
+				len_name++;
+			}
+
+			if (b == false)
+			{
+				return null;
+			}
+
+			name = line.Substring(0, len_name);
+
+			string_start = len_name;
+			for (i = len_name; i < len; i++)
+			{
+				if (line[i] != ' ' && line[i] != '\t')
+				{
+					break;
+				}
+				string_start++;
+			}
+			if (i == len)
+			{
+				return null;
+			}
+
+			string str = line.Substring(string_start);
+
+			str = UnescapeStr(str);
+
+			if (Str.StrCmpi(name, "PREFIX"))
+			{
+				prefix = str;
+				prefix = prefix.TrimStart();
+
+				if (Str.StrCmpi(prefix, "$") || Str.StrCmpi(prefix, "NULL"))
+				{
+					prefix = "";
+				}
+
+				return null;
+			}
+
+			name2 = "";
+
+			if (prefix != "")
+			{
+				name2 += prefix + "@";
+			}
+
+			name2 += name;
+
+			return new StbEntry(name2, str);
+		}
+
+		public static string UnescapeStr(string str)
+		{
+			int i, len;
+			string tmp;
+
+			len = str.Length;
+			tmp = "";
+
+			for (i = 0; i < len; i++)
+			{
+				if (str[i] == '\\')
+				{
+					i++;
+					switch (str[i])
+					{
+						case '\\':
+							tmp += '\\';
+							break;
+
+						case ' ':
+							tmp += ' ';
+							break;
+
+						case 'n':
+						case 'N':
+							tmp += '\n';
+							break;
+
+						case 'r':
+						case 'R':
+							tmp += '\r';
+							break;
+
+						case 't':
+						case 'T':
+							tmp += '\t';
+							break;
+					}
+				}
+				else
+				{
+					tmp += str[i];
+				}
+			}
+
+			return tmp;
+		}
+	}
+}
+
+// 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/

+ 4377 - 0
src/BuildUtil/CoreUtil/Str.cs

@@ -0,0 +1,4377 @@
+// CoreUtil
+// 
+// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved.
+// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved.
+// Comments: Tetsuo Sugiyama, Ph.D.
+// 
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// version 2 as published by the Free Software Foundation.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License version 2
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// 
+// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE
+// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE.
+// 
+// 
+// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN,
+// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY,
+// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS
+// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS
+// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER
+// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL
+// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING,
+// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR
+// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
+// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO
+// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO,
+// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION
+// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN
+// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE.
+// 
+// USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS
+// SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
+// PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
+// COUNTRIES MIGHT BE RESTRICTED.
+// 
+// 
+// DEAR SECURITY EXPERTS
+// ---------------------
+// 
+// If you find a bug or a security vulnerability please kindly inform us
+// about the problem immediately so that we can fix the security problem
+// to protect a lot of users around the world as soon as possible.
+// 
+// Our e-mail address for security reports is:
+// softether-vpn-security [at] softether.org
+// 
+// Please note that the above e-mail address is not a technical support
+// inquiry address. If you need technical assistance, please visit
+// http://www.softether.org/ and ask your question on the users forum.
+// 
+// Thank you for your cooperation.
+
+
+using System;
+using System.Threading;
+using System.Data;
+using System.Data.Sql;
+using System.Data.SqlClient;
+using System.Data.SqlTypes;
+using System.Text;
+using System.Configuration;
+using System.Collections;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using System.IO;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Drawing.Drawing2D;
+using System.Runtime.Serialization.Formatters.Soap;
+using System.Runtime.Serialization.Formatters.Binary;
+using System.Xml;
+using System.Xml.Serialization;
+using System.Web.Mail;
+using System.Runtime.InteropServices;
+
+namespace CoreUtil
+{
+	[FlagsAttribute]
+	public enum PrintFFLags
+	{
+		Minus = 1,
+		Plus = 2,
+		Zero = 4,
+		Blank = 8,
+		Sharp = 16,
+	}
+
+	public class PrintFParsedParam
+	{
+		public bool Ok = false;
+		public readonly PrintFFLags Flags = 0;
+		public readonly int Width = 0;
+		public readonly int Precision = 0;
+		public readonly bool NoPrecision = true;
+		public readonly string Type = "";
+
+		static PrintFFLags charToFlag(char c)
+		{
+			switch (c)
+			{
+				case '-':
+					return PrintFFLags.Minus;
+
+				case '+':
+					return PrintFFLags.Plus;
+
+				case '0':
+					return PrintFFLags.Zero;
+
+				case ' ':
+					return PrintFFLags.Blank;
+
+				case '#':
+					return PrintFFLags.Sharp;
+			}
+
+			return 0;
+		}
+
+		public string GetString(object param)
+		{
+			int i;
+			StringBuilder sb;
+			string tmp = "(error)";
+			double f;
+			bool signed = false;
+
+			switch (this.Type)
+			{
+				case "c":
+				case "C":
+					if (param is char)
+					{
+						tmp += (char)param;
+					}
+					else if (param is string)
+					{
+						string s = (string)param;
+						if (s.Length >= 1)
+						{
+							tmp += s[0];
+						}
+					}
+					break;
+
+				case "d":
+				case "i":
+					sb = new StringBuilder();
+					int count = this.Width;
+					if (this.Precision != 0)
+					{
+						count = this.Precision;
+					}
+					for (i = 1; i < this.Precision; i++)
+					{
+						sb.Append("#");
+					}
+					sb.Append("0");
+
+					if (param is int)
+					{
+						tmp = ((int)param).ToString(sb.ToString());
+					}
+					else if (param is long)
+					{
+						tmp = ((long)param).ToString(sb.ToString());
+					}
+					else if (param is uint)
+					{
+						tmp = ((int)((uint)param)).ToString(sb.ToString());
+					}
+					else if (param is ulong)
+					{
+						tmp = ((long)((ulong)param)).ToString(sb.ToString());
+					}
+					else if (param is decimal)
+					{
+						tmp = ((decimal)param).ToString(sb.ToString());
+					}
+					signed = true;
+
+					break;
+
+				case "u":
+					sb = new StringBuilder();
+					for (i = 1; i < this.Precision; i++)
+					{
+						sb.Append("#");
+					}
+					sb.Append("0");
+
+					if (param is int)
+					{
+						tmp = ((uint)((int)param)).ToString(sb.ToString());
+					}
+					else if (param is long)
+					{
+						tmp = ((ulong)((long)param)).ToString(sb.ToString());
+					}
+					else if (param is uint)
+					{
+						tmp = ((uint)param).ToString(sb.ToString());
+					}
+					else if (param is ulong)
+					{
+						tmp = ((ulong)param).ToString(sb.ToString());
+					}
+					else if (param is decimal)
+					{
+						tmp = ((decimal)param).ToString(sb.ToString());
+					}
+
+					break;
+
+				case "x":
+				case "X":
+					sb = new StringBuilder();
+					sb.Append(this.Type);
+					sb.Append(this.Precision.ToString());
+
+					if (param is int)
+					{
+						tmp = ((uint)((int)param)).ToString(sb.ToString());
+					}
+					else if (param is long)
+					{
+						tmp = ((ulong)((long)param)).ToString(sb.ToString());
+					}
+					else if (param is uint)
+					{
+						tmp = ((uint)param).ToString(sb.ToString());
+					}
+					else if (param is ulong)
+					{
+						tmp = ((ulong)param).ToString(sb.ToString());
+					}
+
+					break;
+
+				case "e":
+				case "E":
+				case "f":
+					f = 0;
+
+					if (param is int)
+					{
+						f = (double)((int)param);
+					}
+					else if (param is long)
+					{
+						f = (double)((long)param);
+					}
+					else if (param is uint)
+					{
+						f = (double)((uint)param);
+					}
+					else if (param is ulong)
+					{
+						f = (double)((ulong)param);
+					}
+					else if (param is decimal)
+					{
+						f = (double)((long)param);
+					}
+					else if (param is float)
+					{
+						f = (double)((float)param);
+					}
+					else if (param is double)
+					{
+						f = (double)param;
+					}
+					else
+					{
+						break;
+					}
+
+					int prectmp = Precision;
+					if (prectmp == 0 && NoPrecision)
+					{
+						prectmp = 6;
+					}
+
+					tmp = f.ToString(string.Format("{0}{1}", Type, prectmp));
+
+					break;
+
+				case "s":
+				case "S":
+					if (param == null)
+					{
+						tmp = "(null)";
+					}
+					else
+					{
+						tmp = param.ToString();
+					}
+					break;
+			}
+
+			int normalWidth = Str.GetStrWidth(tmp);
+			int targetWidth = Math.Max(this.Width, normalWidth);
+
+			if ((this.Flags & PrintFFLags.Plus) != 0)
+			{
+				if (signed)
+				{
+					if (tmp.StartsWith("-") == false)
+					{
+						tmp = "+" + tmp;
+					}
+				}
+			}
+			else
+			{
+				if ((this.Flags & PrintFFLags.Blank) != 0)
+				{
+					if (signed)
+					{
+						if (tmp.StartsWith("-") == false)
+						{
+							tmp = " " + tmp;
+						}
+					}
+				}
+			}
+
+			if ((this.Flags & PrintFFLags.Minus) != 0)
+			{
+				int w = targetWidth - Str.GetStrWidth(tmp);
+				if (w < 0)
+				{
+					w = 0;
+				}
+
+				tmp += Str.MakeCharArray(' ', w);
+			}
+			else if ((this.Flags & PrintFFLags.Zero) != 0)
+			{
+				int w = targetWidth - Str.GetStrWidth(tmp);
+				if (w < 0)
+				{
+					w = 0;
+				}
+
+				tmp = Str.MakeCharArray('0', w) + tmp;
+			}
+			else
+			{
+				int w = targetWidth - Str.GetStrWidth(tmp);
+				if (w < 0)
+				{
+					w = 0;
+				}
+
+				tmp = Str.MakeCharArray(' ', w) + tmp;
+			}
+
+			if ((this.Flags & PrintFFLags.Sharp) != 0)
+			{
+				if (Type == "x" || Type == "X")
+				{
+					tmp = "0x" + tmp;
+				}
+			}
+
+			return tmp;
+		}
+
+		public PrintFParsedParam(string str)
+		{
+			Str.NormalizeString(ref str);
+
+			if (str.StartsWith("%") == false)
+			{
+				return;
+			}
+
+			str = str.Substring(1);
+
+			Queue<char> q = new Queue<char>();
+			foreach (char c in str)
+			{
+				q.Enqueue(c);
+			}
+
+			while (q.Count >= 1)
+			{
+				char c = q.Peek();
+				PrintFFLags f = charToFlag(c);
+
+				if (f == 0)
+				{
+					break;
+				}
+
+				this.Flags |= f;
+				q.Dequeue();
+			}
+
+			Queue<char> q2 = new Queue<char>();
+
+			while (q.Count >= 1)
+			{
+				bool bf = false;
+				char c = q.Peek();
+
+				switch (c)
+				{
+					case 'h':
+					case 'l':
+					case 'I':
+					case 'c':
+					case 'C':
+					case 'd':
+					case 'i':
+					case 'o':
+					case 'u':
+					case 'x':
+					case 'X':
+					case 'e':
+					case 'E':
+					case 'f':
+					case 'g':
+					case 'G':
+					case 'n':
+					case 'p':
+					case 's':
+					case 'S':
+						bf = true;
+						break;
+
+					default:
+						q2.Enqueue(c);
+						break;
+				}
+
+				if (bf)
+				{
+					break;
+				}
+
+				q.Dequeue();
+			}
+
+			string[] widthAndPrec = (new string(q2.ToArray())).Split('.');
+
+			if (widthAndPrec.Length == 1)
+			{
+				this.Width = Str.StrToInt(widthAndPrec[0]);
+			}
+			else if (widthAndPrec.Length == 2)
+			{
+				this.Width = Str.StrToInt(widthAndPrec[0]);
+				this.Precision = Str.StrToInt(widthAndPrec[1]);
+				this.NoPrecision = false;
+			}
+
+			this.Width = Math.Max(this.Width, 0);
+			this.Precision = Math.Max(this.Precision, 0);
+
+
+			while (q.Count >= 1)
+			{
+				char c = q.Peek();
+				bool bf = false;
+
+				switch (c)
+				{
+					case 'c':
+					case 'C':
+					case 'd':
+					case 'i':
+					case 'o':
+					case 'u':
+					case 'x':
+					case 'X':
+					case 'e':
+					case 'E':
+					case 'f':
+					case 'g':
+					case 'G':
+					case 'a':
+					case 'A':
+					case 'n':
+					case 'p':
+					case 's':
+					case 'S':
+						bf = true;
+						break;
+
+					default:
+						break;
+				}
+
+				if (bf)
+				{
+					break;
+				}
+
+				q.Dequeue();
+			}
+
+			this.Type = new string(q.ToArray());
+			if (this.Type.Length >= 1)
+			{
+				this.Type = this.Type.Substring(0, 1);
+			}
+
+			this.Ok = (Str.IsEmptyStr(this.Type) == false);
+		}
+	}
+
+	public class StrEqualityComparer : IEqualityComparer<string>
+	{
+		bool caseSensitive;
+
+		public StrEqualityComparer()
+		{
+			this.caseSensitive = false;
+		}
+
+		public StrEqualityComparer(bool caseSensitive)
+		{
+			this.caseSensitive = caseSensitive;
+		}
+
+		public bool Equals(string x, string y)
+		{
+			return x.Equals(y, caseSensitive ? StringComparison.InvariantCulture : StringComparison.InvariantCultureIgnoreCase);
+		}
+
+		public int GetHashCode(string obj)
+		{
+			return obj.GetHashCode();
+		}
+	}
+
+
+	public class StrComparer : IComparer<string>
+	{
+		bool caseSensitive;
+
+		public StrComparer()
+		{
+			this.caseSensitive = false;
+		}
+
+		public StrComparer(bool caseSensitive)
+		{
+			this.caseSensitive = caseSensitive;
+		}
+
+		public int Compare(string x, string y)
+		{
+			return string.Compare(x, y, !caseSensitive);
+		}
+	}
+
+	public delegate bool RemoveStringFunction(string str);
+
+	public static class Str
+	{
+		public static string NormalizeStrSoftEther(string str)
+		{
+			return NormalizeStrSoftEther(str, false);
+		}
+		public static string NormalizeStrSoftEther(string str, bool trim)
+		{
+			bool b = false;
+			StringReader sr = new StringReader(str);
+			StringWriter sw = new StringWriter();
+			while (true)
+			{
+				string line = sr.ReadLine();
+				if (line == null)
+				{
+					break;
+				}
+				if (b)
+				{
+					sw.WriteLine();
+				}
+				b = true;
+				line = normalizeStrSoftEtherInternal(line);
+				sw.Write(line);
+			}
+
+			int len = str.Length;
+
+			try
+			{
+				if (str[len - 1] == '\n' || str[len - 1] == '\r')
+				{
+					sw.WriteLine();
+				}
+			}
+			catch
+			{
+			}
+
+			str = sw.ToString();
+
+			if (trim)
+			{
+				str = str.Trim();
+			}
+
+			return str;
+		}
+		static string normalizeStrSoftEtherInternal(string str)
+		{
+			if (str.Trim().Length == 0)
+			{
+				return "";
+			}
+
+			int i;
+			StringBuilder sb1 = new StringBuilder();
+			for (i = 0; i < str.Length; i++)
+			{
+				char c = str[i];
+
+				if (c == ' ' || c == ' ' || c == '\t')
+				{
+					sb1.Append(c);
+				}
+				else
+				{
+					break;
+				}
+			}
+			string str2 = str.Substring(i).Trim();
+
+			string str1 = sb1.ToString();
+
+			str1 = ReplaceStr(str1, " ", "  ");
+			str1 = ReplaceStr(str1, "\t", "    ");
+
+			return str1 + normalizeStrSoftEtherInternal2(str2);
+		}
+		static string normalizeStrSoftEtherInternal2(string str)
+		{
+			NormalizeString(ref str, true, true, false, true);
+			char[] chars = str.ToCharArray();
+			StringBuilder sb = new StringBuilder();
+
+			int i;
+			for (i = 0; i < chars.Length; i++)
+			{
+				char c = chars[i];
+				bool insert_space = false;
+				bool insert_space2 = false;
+
+				char c1 = (char)0;
+				if (i >= 1)
+				{
+					c1 = chars[i - 1];
+				}
+
+				char c2 = (char)0;
+				if (i < (chars.Length - 1))
+				{
+					c2 = chars[i + 1];
+				}
+
+				if (c == '\'' || c1 == '\'' || c2 == '\'' || c == '\"' || c1 == '\"' || c2 == '\"' || c == '>' || c1 == '>' || c2 == '>' || c == '<' || c1 == '<' || c2 == '<')
+				{
+				}
+				else if (c == '(' || c == '[' || c == '{' || c == '<')
+				{
+					if (c1 != '「' && c1 != '『' && c1 != '。' && c1 != '、' && c1 != '・')
+					{
+						insert_space = true;
+					}
+				}
+				else if (c == ')' || c == ']' || c == '}' || c == '>')
+				{
+					if (c2 != '.' && c2 != ',' && c2 != '。' && c2 != '、')
+					{
+						insert_space2 = true;
+					}
+				}
+				else if (c == '~')
+				{
+					if (c1 != '~')
+					{
+						insert_space = true;
+					}
+
+					if (c2 != '~')
+					{
+						insert_space2 = true;
+					}
+				}
+				else if (IsZenkaku(c) == false)
+				{
+					if (IsZenkaku(c1))
+					{
+						if (c != '.' && c != ',' && c != ';' && c != ':' && c1 != '※' && c1 != '〒' && c1 != '℡' && c1 != '「' && c1 != '『' && c1 != '。' && c1 != '、' && c1 != '・')
+						{
+							insert_space = true;
+						}
+					}
+				}
+				else
+				{
+					if (IsZenkaku(c1) == false)
+					{
+						if (c != '。' && c != '、' && c != '」' && c != '』' && c != '・' && c1 != '(' && c1 != '[' && c1 != '{' && c1 != '<' && c1 != ';' && c1 != ':')
+						{
+							insert_space = true;
+						}
+					}
+				}
+
+				if (insert_space)
+				{
+					sb.Append(' ');
+				}
+
+				sb.Append(c);
+
+				if (insert_space2)
+				{
+					sb.Append(' ');
+				}
+			}
+
+			str = sb.ToString();
+
+			NormalizeString(ref str, true, true, false, true);
+
+			return str;
+		}
+
+		public static bool IsZenkaku(char c)
+		{
+			return !((c >= (char)0) && (c <= (char)256));
+		}
+
+		public static string[] DivideStringMulti(string str, bool caseSensitive, params string[] keywords)
+		{
+			List<string> ret = new List<string>();
+			int next = 0;
+
+			while (true)
+			{
+				int foundIndex;
+				string foundKeyword;
+				int r = Str.SearchStrMulti(str, next, caseSensitive, out foundIndex, out foundKeyword, keywords);
+				if (r == -1)
+				{
+					ret.Add(str.Substring(next));
+					break;
+				}
+				else
+				{
+					ret.Add(str.Substring(next, r - next));
+					ret.Add(foundKeyword);
+					next = r + foundKeyword.Length;
+				}
+			}
+
+			return ret.ToArray();
+		}
+
+		public static bool IsSuitableEncodingForString(string str, Encoding enc)
+		{
+			try
+			{
+				str = Str.NormalizeCrlf(str);
+
+				byte[] utf1 = Str.Utf8Encoding.GetBytes(str);
+
+				byte[] b = enc.GetBytes(str);
+				string str2 = enc.GetString(b);
+
+				byte[] utf2 = Str.Utf8Encoding.GetBytes(str2);
+
+				return Util.CompareByte(utf1, utf2);
+			}
+			catch
+			{
+				return false;
+			}
+		}
+
+		public static bool IsCharNumOrAlpha(char c)
+		{
+			if (c >= 'a' && c <= 'z')
+			{
+				return true;
+			}
+			if (c >= 'A' && c <= 'Z')
+			{
+				return true;
+			}
+			if (c >= '0' && c <= '9')
+			{
+				return true;
+			}
+			return false;
+		}
+		public static bool IsStringNumOrAlpha(string s)
+		{
+			foreach (char c in s)
+			{
+				if (IsCharNumOrAlpha(c) == false)
+				{
+					return false;
+				}
+			}
+			return true;
+		}
+
+		public static string[] StrToStrLineBySplitting(string str)
+		{
+			StringReader r = new StringReader(str);
+			List<string> ret = new List<string>();
+
+			while (true)
+			{
+				string line = r.ReadLine();
+				if (line == null)
+				{
+					break;
+				}
+
+				if (IsEmptyStr(line) == false)
+				{
+					ret.Add(line.Trim());
+				}
+			}
+
+			return ret.ToArray();
+		}
+
+		public static string GetLeft(string str, int len)
+		{
+			if (str == null)
+			{
+				return null;
+			}
+			if (str.Length > len)
+			{
+				return str.Substring(0, len);
+			}
+			else
+			{
+				return str;
+			}
+		}
+
+		public static string[] SplitStringForSearch(string str)
+		{
+			bool b = false;
+			int i, len;
+			len = str.Length;
+			List<string> ret = new List<string>();
+			string currentStr = "";
+
+			for (i = 0; i < len; i++)
+			{
+				char c = str[i];
+
+				if (c == '\"')
+				{
+					b = !b;
+					if (b == false)
+					{
+						currentStr = currentStr.Trim();
+						if (Str.IsEmptyStr(currentStr) == false)
+						{
+							ret.Add(currentStr);
+							currentStr = "";
+						}
+					}
+				}
+				else
+				{
+					if (b == false && (c == ' ' || c == ' ' || c == '\t'))
+					{
+						currentStr = currentStr.Trim();
+						if (Str.IsEmptyStr(currentStr) == false)
+						{
+							ret.Add(currentStr);
+							currentStr = "";
+						}
+					}
+					else
+					{
+						currentStr += c;
+					}
+				}
+			}
+
+			currentStr = currentStr.Trim();
+			if (Str.IsEmptyStr(currentStr) == false)
+			{
+				ret.Add(currentStr);
+			}
+
+			return ret.ToArray();
+		}
+
+		public static string AppendZeroToNumString(string str, int numKeta)
+		{
+			int n = numKeta - str.Length;
+
+			if (n >= 1)
+			{
+				return MakeCharArray('0', n) + str;
+			}
+			else
+			{
+				return str;
+			}
+		}
+
+		public static Encoding CheckBOM(byte[] data)
+		{
+			int i;
+			return CheckBOM(data, out i);
+		}
+		public static Encoding CheckBOM(byte[] data, out int bomNumBytes)
+		{
+			bomNumBytes = 0;
+			try
+			{
+				if (data[0] == 0x00 && data[1] == 0x00 && data[2] == 0xfe && data[3] == 0xff)
+				{
+					bomNumBytes = 3;
+					return Encoding.GetEncoding("utf-32BE");
+				}
+				else if (data[0] == 0xff && data[1] == 0xfe && data[2] == 0x00 && data[3] == 0x00)
+				{
+					bomNumBytes = 4;
+					return Encoding.GetEncoding("utf-32");
+				}
+				else if (data[0] == 0xff && data[1] == 0xfe)
+				{
+					bomNumBytes = 2;
+					return Encoding.GetEncoding("utf-16");
+				}
+				else if (data[0] == 0xfe && data[1] == 0xff)
+				{
+					bomNumBytes = 2;
+					return Encoding.GetEncoding("unicodeFFFE");
+				}
+				else if (data[0] == 0xef && data[1] == 0xbb && data[2] == 0xbf)
+				{
+					bomNumBytes = 3;
+					return Encoding.GetEncoding("utf-8");
+				}
+				else
+				{
+					return null;
+				}
+			}
+			catch
+			{
+				return null;
+			}
+		}
+
+		public static byte[] GetBOM(Encoding encoding)
+		{
+			if (Str.StrCmpi(encoding.BodyName, "utf-32BE"))
+			{
+				return new byte[] { 0x00, 0x00, 0xfe, 0xff };
+			}
+			else if (Str.StrCmpi(encoding.BodyName, "utf-32"))
+			{
+				return new byte[] {0xff, 0xfe, 0x00, 0x00 };
+			}
+			else if (Str.StrCmpi(encoding.BodyName, "utf-16"))
+			{
+				return new byte[] { 0xff, 0xfe };
+			}
+			else if (Str.StrCmpi(encoding.BodyName, "unicodeFFFE"))
+			{
+				return new byte[] { 0xfe, 0xff };
+			}
+			else if (Str.StrCmpi(encoding.BodyName, "utf-8"))
+			{
+				return new byte[] { 0xef, 0xbb, 0xbf };
+			}
+			else
+			{
+				return null;
+			}
+		}
+
+		public static byte[] ConvertEncoding(byte[] srcData, Encoding destEncoding)
+		{
+			return ConvertEncoding(srcData, destEncoding, false);
+		}
+		public static byte[] ConvertEncoding(byte[] srcData, Encoding destEncoding, bool appendBom)
+		{
+			Encoding srcEncoding = GetEncoding(srcData);
+			if (srcEncoding == null)
+			{
+				srcEncoding = Str.ShiftJisEncoding;
+			}
+
+			int nb;
+			if (CheckBOM(srcData, out nb) != null)
+			{
+				srcData = Util.RemoveStartByteArray(srcData, nb);
+			}
+
+			string str = srcEncoding.GetString(srcData);
+
+			byte[] b1 = null;
+			if (appendBom)
+			{
+				b1 = GetBOM(destEncoding);
+			}
+			byte[] b2 = destEncoding.GetBytes(str);
+
+			return Util.CombineByteArray(b1, b2);
+		}
+
+		public static string ReadTextFile(string filename)
+		{
+			byte[] data = IO.ReadFileData(filename);
+			int bomSize = 0;
+
+			Encoding enc = GetEncoding(data, out bomSize);
+			if (enc == null)
+			{
+				enc = Str.Utf8Encoding;
+			}
+			if (bomSize >= 1)
+			{
+				data = Util.CopyByte(data, bomSize);
+			}
+
+			return enc.GetString(data);
+		}
+
+		public static void WriteTextFile(string filename, Encoding enc, bool writeBom)
+		{
+			Buf buf = new Buf();
+			byte[] bom = GetBOM(enc);
+			if (writeBom && bom != null && bom.Length >= 1)
+			{
+				buf.Write(bom);
+			}
+			buf.Write(enc.GetBytes(filename));
+
+			buf.SeekToBegin();
+
+			File.WriteAllBytes(filename, buf.Read());
+		}
+
+		public static Encoding GetEncoding(byte[] data)
+		{
+			int i;
+			return GetEncoding(data, out i);
+		}
+		public static Encoding GetEncoding(byte[] data, out int bomSize)
+		{
+			const byte bESC = 0x1B;
+			const byte bAT = 0x40;
+			const byte bDollar = 0x24;
+			const byte bAnd = 0x26;
+			const byte bOP = 0x28;
+			const byte bB = 0x42;
+			const byte bD = 0x44;
+			const byte bJ = 0x4A;
+			const byte bI = 0x49;
+			bomSize = 0;
+
+			int len = data.Length;
+			int binary = 0;
+			int ucs2 = 0;
+			int sjis = 0;
+			int euc = 0;
+			int utf8 = 0;
+			byte b1, b2;
+
+			Encoding bomEncoding = CheckBOM(data, out bomSize);
+			if (bomEncoding != null)
+			{
+				return bomEncoding;
+			}
+
+			for (int i = 0; i < len; i++)
+			{
+				if (data[i] <= 0x06 || data[i] == 0x7F || data[i] == 0xFF)
+				{
+					//'binary'
+					binary++;
+					if (len - 1 > i && data[i] == 0x00
+						&& i > 0 && data[i - 1] <= 0x7F)
+					{
+						//smells like raw unicode
+						ucs2++;
+					}
+				}
+			}
+
+
+			if (binary > 0)
+			{
+				if (ucs2 > 0)
+				{
+					//JIS
+					//ucs2(Unicode)
+
+					int n1 = 0, n2 = 0;
+					for (int i = 0; i < (len / 2); i++)
+					{
+						byte e1 = data[i * 2];
+						byte e2 = data[i * 2 + 1];
+
+						if (e1 == 0 && e2 != 0)
+						{
+							n1++;
+						}
+						else if (e1 != 0 && e2 == 0)
+						{
+							n2++;
+						}
+					}
+
+					if (n1 > n2)
+					{
+						return Encoding.GetEncoding("unicodeFFFE");
+					}
+					else
+					{
+						return System.Text.Encoding.Unicode;
+					}
+				}
+				else
+				{
+					//binary
+					return null;
+				}
+			}
+
+			for (int i = 0; i < len - 1; i++)
+			{
+				b1 = data[i];
+				b2 = data[i + 1];
+
+				if (b1 == bESC)
+				{
+					if (b2 >= 0x80)
+						//not Japanese
+						//ASCII
+						return System.Text.Encoding.ASCII;
+					else if (len - 2 > i &&
+						b2 == bDollar && data[i + 2] == bAT)
+						//JIS_0208 1978
+						//JIS
+						return System.Text.Encoding.GetEncoding(50220);
+					else if (len - 2 > i &&
+						b2 == bDollar && data[i + 2] == bB)
+						//JIS_0208 1983
+						//JIS
+						return System.Text.Encoding.GetEncoding(50220);
+					else if (len - 5 > i &&
+						b2 == bAnd && data[i + 2] == bAT && data[i + 3] == bESC &&
+						data[i + 4] == bDollar && data[i + 5] == bB)
+						//JIS_0208 1990
+						//JIS
+						return System.Text.Encoding.GetEncoding(50220);
+					else if (len - 3 > i &&
+						b2 == bDollar && data[i + 2] == bOP && data[i + 3] == bD)
+						//JIS_0212
+						//JIS
+						return System.Text.Encoding.GetEncoding(50220);
+					else if (len - 2 > i &&
+						b2 == bOP && (data[i + 2] == bB || data[i + 2] == bJ))
+						//JIS_ASC
+						//JIS
+						return System.Text.Encoding.GetEncoding(50220);
+					else if (len - 2 > i &&
+						b2 == bOP && data[i + 2] == bI)
+						//JIS_KANA
+						//JIS
+						return System.Text.Encoding.GetEncoding(50220);
+				}
+			}
+
+			for (int i = 0; i < len - 1; i++)
+			{
+				b1 = data[i];
+				b2 = data[i + 1];
+				if (((b1 >= 0x81 && b1 <= 0x9F) || (b1 >= 0xE0 && b1 <= 0xFC)) &&
+					((b2 >= 0x40 && b2 <= 0x7E) || (b2 >= 0x80 && b2 <= 0xFC)))
+				{
+					sjis += 2;
+					i++;
+				}
+			}
+			for (int i = 0; i < len - 1; i++)
+			{
+				b1 = data[i];
+				b2 = data[i + 1];
+				if (((b1 >= 0xA1 && b1 <= 0xFE) && (b2 >= 0xA1 && b2 <= 0xFE)) ||
+					(b1 == 0x8E && (b2 >= 0xA1 && b2 <= 0xDF)))
+				{
+					euc += 2;
+					i++;
+				}
+				else if (len - 2 > i &&
+					b1 == 0x8F && (b2 >= 0xA1 && b2 <= 0xFE) &&
+					(data[i + 2] >= 0xA1 && data[i + 2] <= 0xFE))
+				{
+					euc += 3;
+					i += 2;
+				}
+			}
+			for (int i = 0; i < len - 1; i++)
+			{
+				b1 = data[i];
+				b2 = data[i + 1];
+				if ((b1 >= 0xC0 && b1 <= 0xDF) && (b2 >= 0x80 && b2 <= 0xBF))
+				{
+					utf8 += 2;
+					i++;
+				}
+				else if (len - 2 > i &&
+					(b1 >= 0xE0 && b1 <= 0xEF) && (b2 >= 0x80 && b2 <= 0xBF) &&
+					(data[i + 2] >= 0x80 && data[i + 2] <= 0xBF))
+				{
+					utf8 += 3;
+					i += 2;
+				}
+			}
+
+			if (euc > sjis && euc > utf8)
+				//EUC
+				return System.Text.Encoding.GetEncoding(51932);
+			else if (sjis > euc && sjis > utf8)
+				//SJIS
+				return System.Text.Encoding.GetEncoding(932);
+			else if (utf8 > euc && utf8 > sjis)
+				//UTF8
+				return System.Text.Encoding.UTF8;
+
+			return null;
+		}
+
+		public static bool StartsWithMulti(string str, StringComparison comp, params string[] keys)
+		{
+			NormalizeString(ref str);
+
+			foreach (string key in keys)
+			{
+				if (str.StartsWith(key, comp))
+				{
+					return true;
+				}
+			}
+
+			return false;
+		}
+
+		public static bool IsCharForMail(char c)
+		{
+			switch (c)
+			{
+				case '<':
+				case '>':
+				case ' ':
+				case ';':
+				case ':':
+				case '/':
+				case '(':
+				case ')':
+				case '&':
+				case ',':
+				case '%':
+				case '$':
+				case '#':
+				case '\"':
+				case '\'':
+				case '!':
+				case '=':
+				case '\\':
+					return false;
+			}
+
+			if (c >= 0x80)
+			{
+				return false;
+			}
+
+			if (IsAscii(c) == false)
+			{
+				return false;
+			}
+
+			return true;
+		}
+
+		public static string LinkMailtoOnText(string text)
+		{
+			NormalizeString(ref text);
+
+			StringBuilder sb = new StringBuilder();
+
+			string tmp = "";
+
+			int i;
+			for (i = 0; i < text.Length; i++)
+			{
+				char c = text[i];
+
+				if (IsCharForMail(c) == false)
+				{
+					if (Str.CheckMailAddress(tmp) == false)
+					{
+						tmp += c;
+						sb.Append(tmp);
+						tmp = "";
+					}
+					else
+					{
+						sb.AppendFormat("<a href=\"mailto:{0}\">{0}</a>", tmp);
+						sb.Append(c);
+						tmp = "";
+					}
+				}
+				else
+				{
+					tmp += c;
+				}
+			}
+			if (Str.CheckMailAddress(tmp) == false)
+			{
+				sb.Append(tmp);
+				tmp = "";
+			}
+			else
+			{
+				sb.AppendFormat("<a href=\"mailto:{0}\">{0}</a>", tmp);
+				tmp = "";
+			}
+
+			return sb.ToString();
+		}
+
+		public static string LinkUrlOnText(string text, string target)
+		{
+			int findStart = 0;
+
+			NormalizeString(ref text);
+			NormalizeString(ref target);
+
+			StringBuilder sb = new StringBuilder();
+
+			while (true)
+			{
+				int foundStrIndex;
+				int foundIndex = FindStrings(text, findStart, StringComparison.InvariantCultureIgnoreCase, out foundStrIndex,
+					"http://", "https://", "ftp://", "telnet://", "mailto://", "news://");
+
+				if (foundIndex != -1)
+				{
+					int i;
+					int endOfUrl = -1;
+					for (i = foundIndex; i < text.Length; i++)
+					{
+						char c = text[i];
+
+						if (IsValidForUrl(c) == false)
+						{
+							endOfUrl = i;
+							break;
+						}
+
+						if (c == '<' || c == '&')
+						{
+							if (StartsWithMulti(text.Substring(i), StringComparison.InvariantCultureIgnoreCase,
+								HtmlSpacing, HtmlCrlf, HtmlBr, HtmlLt, HtmlGt))
+							{
+								endOfUrl = i;
+								break;
+							}
+						}
+					}
+
+					if (endOfUrl == -1)
+					{
+						endOfUrl = text.Length;
+					}
+
+					string url = text.Substring(foundIndex, endOfUrl - foundIndex);
+					string beforeUrl = text.Substring(findStart, foundIndex - findStart);
+
+					sb.Append(beforeUrl);
+
+					if (Str.IsEmptyStr(target) == false)
+					{
+						sb.AppendFormat("<a href=\"{0}\" target=\"{2}\">{1}</a>", url, url, target);
+					}
+					else
+					{
+						sb.AppendFormat("<a href=\"{0}\">{1}</a>", url, url);
+					}
+
+					findStart = endOfUrl;
+				}
+				else
+				{
+					sb.Append(text.Substring(findStart));
+
+					break;
+				}
+			}
+
+			return LinkMailtoOnText(sb.ToString());
+		}
+
+		public static int FindStrings(string str, int findStartIndex, StringComparison comp, out int foundKeyIndex, params string[] keys)
+		{
+			int ret = -1;
+			foundKeyIndex = -1;
+			int n = 0;
+
+			foreach (string key in keys)
+			{
+				int i = str.IndexOf(key, findStartIndex, comp);
+
+				if (i != -1)
+				{
+					if (ret == -1)
+					{
+						ret = i;
+						foundKeyIndex = n;
+					}
+					else
+					{
+						if (ret > i)
+						{
+							ret = i;
+							foundKeyIndex = n;
+						}
+					}
+				}
+
+				n++;
+			}
+
+			return ret;
+		}
+
+		public static bool IsValidForUrl(char c)
+		{
+			if (c >= '0' && c <= '9')
+			{
+				return true;
+			}
+			if (c >= 'a' && c <= 'z')
+			{
+				return true;
+			}
+			if (c >= 'A' && c <= 'Z')
+			{
+				return true;
+			}
+			switch (c)
+			{
+				case '_':
+				case '-':
+				case '?':
+				case '!':
+				case '\"':
+				case ',':
+				case '\'':
+				case '/':
+				case '\\':
+				case '&':
+				case ';':
+				case '%':
+				case '#':
+				case '@':
+				case '~':
+				case ':':
+				case '=':
+				case '+':
+				case '*':
+				case '$':
+				case '.':
+					return true;
+			}
+
+			return false;
+		}
+
+		public static List<string> RemoteStringFromList(List<string> str, RemoveStringFunction func)
+		{
+			List<string> ret = new List<string>();
+
+			foreach (string s in str)
+			{
+				if (func(s) == false)
+				{
+					ret.Add(s);
+				}
+			}
+
+			return ret;
+		}
+
+		public const string ConstZenkaku = "`{}0123456789/*-+!”#$%&’()= ̄|¥[]@;:<>?_^ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ‘";
+		public const string ConstHankaku = "`{}0123456789/*-+!\"#$%&'()=~|\\[]@;:<>?_^ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'";
+		public const string ConstKanaZenkaku = "ー「」アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲンァゥェォャュョッィ゛゜";
+		public const string ConstKanaHankaku = "ー「」アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲンァゥェォャュョッィ゙゚";
+
+		public static void RemoveSpace(ref string str)
+		{
+			NormalizeString(ref str);
+
+			str = str.Replace(" ", "").Replace(" ", "").Replace("\t", "");
+		}
+
+		public static void TrimStartWith(ref string str, string key, StringComparison sc)
+		{
+			if (str.StartsWith(key, sc))
+			{
+				str = str.Substring(key.Length);
+			}
+		}
+
+		public static void TrimEndsWith(ref string str, string key, StringComparison sc)
+		{
+			if (str.EndsWith(key, sc))
+			{
+				str = str.Substring(0, str.Length - key.Length);
+			}
+		}
+
+		public static void RemoveSpaceChar(ref string str)
+		{
+			if (Str.IsEmptyStr(str))
+			{
+				return;
+			}
+
+			StringBuilder sb = new StringBuilder();
+
+			foreach (char c in str)
+			{
+				if (c == ' ' || c == '\t' || c == ' ')
+				{
+				}
+				else
+				{
+					sb.Append(c);
+				}
+			}
+
+			str = sb.ToString();
+		}
+
+		public static void NormalizeStringStandard(ref string str)
+		{
+			NormalizeString(ref str, true, true, false, true);
+		}
+		public static void NormalizeString(ref string str, bool space, bool toHankaku, bool toZenkaku, bool toZenkakuKana)
+		{
+			NormalizeString(ref str);
+
+			if (space)
+			{
+				str = NormalizeSpace(str);
+			}
+
+			if (toHankaku)
+			{
+				str = ZenkakuToHankaku(str);
+			}
+
+			if (toZenkaku)
+			{
+				str = HankakuToZenkaku(str);
+			}
+
+			if (toZenkakuKana)
+			{
+				str = KanaHankakuToZenkaku(str);
+			}
+		}
+
+		public static string NormalizeSpace(string str)
+		{
+			NormalizeString(ref str);
+			char[] sps =
+			{
+				' ', ' ', '\t',
+			};
+
+			string[] tokens = str.Split(sps, StringSplitOptions.RemoveEmptyEntries);
+
+			return Str.CombineStringArray(tokens, " ");
+		}
+
+		public static string KanaHankakuToZenkaku(string str)
+		{
+			NormalizeString(ref str);
+
+			str = str.Replace("ガ", "ガ");
+			str = str.Replace("ギ", "ギ");
+			str = str.Replace("グ", "グ");
+			str = str.Replace("ゲ", "ゲ");
+			str = str.Replace("ゴ", "ゴ");
+			str = str.Replace("ザ", "ザ");
+			str = str.Replace("ジ", "ジ");
+			str = str.Replace("ズ", "ズ");
+			str = str.Replace("ゼ", "ゼ");
+			str = str.Replace("ゾ", "ゾ");
+			str = str.Replace("ダ", "ダ");
+			str = str.Replace("ヂ", "ヂ");
+			str = str.Replace("ヅ", "ヅ");
+			str = str.Replace("デ", "デ");
+			str = str.Replace("ド", "ド");
+			str = str.Replace("バ", "バ");
+			str = str.Replace("ビ", "ビ");
+			str = str.Replace("ブ", "ブ");
+			str = str.Replace("ベ", "ベ");
+			str = str.Replace("ボ", "ボ");
+
+			char[] a = str.ToCharArray();
+			int i;
+			for (i = 0; i < a.Length; i++)
+			{
+				int j = ConstKanaHankaku.IndexOf(a[i]);
+
+				if (j != -1)
+				{
+					a[i] = ConstKanaZenkaku[j];
+				}
+			}
+
+			return new string(a);
+		}
+
+		public static string ZenkakuToHankaku(string str)
+		{
+			NormalizeString(ref str);
+
+			str = ReplaceStr(str, "“", " \"");
+			str = ReplaceStr(str, "”", "\" ");
+			str = ReplaceStr(str, "‘", "'");
+			str = ReplaceStr(str, "’", "'");
+
+			char[] a = str.ToCharArray();
+			int i;
+			for (i = 0; i < a.Length; i++)
+			{
+				int j = ConstZenkaku.IndexOf(a[i]);
+
+				if (j != -1)
+				{
+					a[i] = ConstHankaku[j];
+				}
+			}
+
+			return new string(a);
+		}
+
+		public static string HankakuToZenkaku(string str)
+		{
+			NormalizeString(ref str);
+
+			str = KanaHankakuToZenkaku(str);
+
+			char[] a = str.ToCharArray();
+			int i;
+			for (i = 0; i < a.Length; i++)
+			{
+				int j = ConstHankaku.IndexOf(a[i]);
+
+				if (j != -1)
+				{
+					a[i] = ConstZenkaku[j];
+				}
+			}
+
+			return new string(a);
+		}
+
+		public const string HtmlSpacing = "&nbsp;";
+		public const string HtmlCrlf = "<BR>";
+		public const string HtmlBr = "<BR>";
+		public const string HtmlLt = "&lt;";
+		public const string HtmlGt = "&gt;";
+		public const string HtmlAmp = "&amp;";
+		public const int HtmlNumTabChar = 8;
+		public static string HtmlTab
+		{
+			get
+			{
+				int i;
+				StringBuilder sb = new StringBuilder();
+				for (i = 0; i < HtmlNumTabChar; i++)
+				{
+					sb.Append(HtmlSpacing);
+				}
+				return sb.ToString();
+			}
+		}
+
+		public static string ToUrl(string str, Encoding e)
+		{
+			Str.NormalizeString(ref str);
+			return HttpUtility.UrlEncode(str, e);
+		}
+
+		public static string FromUrl(string str, Encoding e)
+		{
+			Str.NormalizeString(ref str);
+			return HttpUtility.UrlDecode(str, e);
+		}
+
+		public static string FromHtml(string str)
+		{
+			str = Str.ReplaceStr(str, HtmlCrlf, "\r\n", false);
+
+			str = str.Replace(HtmlSpacing, " ");
+
+			str = str.Replace(HtmlLt, "<").Replace(HtmlGt, ">").Replace(HtmlAmp, "&");
+
+			str = NormalizeCrlf(str);
+
+			return str;
+		}
+
+		public static string ToHtml(string str)
+		{
+			return ToHtml(str, false);
+		}
+		public static string ToHtml(string str, bool forceAllSpaceToTag)
+		{
+			str = NormalizeCrlf(str);
+
+			str = str.Replace("&", HtmlAmp);
+
+			str = str.Replace("<", HtmlLt).Replace(">", HtmlGt);
+
+			if (str.IndexOf(' ') != -1)
+			{
+				if (forceAllSpaceToTag)
+				{
+					str = str.Replace(" ", HtmlSpacing);
+				}
+				else
+				{
+					int i;
+					StringBuilder sb = new StringBuilder();
+					bool flag = false;
+
+					for (i = 0; i < str.Length; i++)
+					{
+						char c = str[i];
+
+						if (c == ' ')
+						{
+							if (flag == false)
+							{
+								flag = true;
+								sb.Append(' ');
+							}
+							else
+							{
+								sb.Append(HtmlSpacing);
+							}
+						}
+						else
+						{
+							flag = false;
+							sb.Append(c);
+						}
+					}
+
+					str = sb.ToString();
+				}
+			}
+
+			str = str.Replace("\t", HtmlTab);
+
+			str = str.Replace("\r\n", HtmlCrlf);
+
+			return str;
+		}
+
+		public static bool IsPrintable(char c)
+		{
+			if (c >= 256)
+			{
+				return true;
+			}
+
+			if (c >= 32 && c <= 126)
+			{
+				return true;
+			}
+
+			return false;
+		}
+		public static bool IsPrintable(string str)
+		{
+			foreach (char c in str)
+			{
+				if (IsPrintable(c) == false)
+				{
+					return false;
+				}
+			}
+
+			return true;
+		}
+
+		public static string Unescape(string str)
+		{
+			StringBuilder sb = new StringBuilder();
+
+			int i;
+			for (i = 0; i < str.Length; i++)
+			{
+				char c = str[i];
+
+				if (IsPrintable(c) && c != '\\')
+				{
+					sb.Append(c);
+				}
+				else
+				{
+					string s = "" + c;
+					switch (c)
+					{
+						case '\r':
+							s = "\\r";
+							break;
+
+						case '\n':
+							s = "\\n";
+							break;
+
+						case '\0':
+							s = "\\0";
+							break;
+
+						case '\t':
+							s = "\\t";
+							break;
+
+						case '\\':
+							s = "\\\\";
+							break;
+
+						default:
+							s = "0x" + Convert.ToString((int)c, 16);
+							break;
+					}
+					sb.Append(s);
+				}
+			}
+
+			return sb.ToString();
+		}
+
+		public static string Escape(string str)
+		{
+			StringBuilder sb = new StringBuilder();
+
+			int i, j, hex;
+			string padding = "00000000";
+			str = str + padding;
+			StringBuilder sb2;
+
+			for (i = 0; i < str.Length - padding.Length; i++)
+			{
+				char c = str[i];
+				char d = c;
+
+				if (c == '\\')
+				{
+					char c1 = str[i + 1];
+
+					switch (c1)
+					{
+						case '\'':
+							d = '\'';
+							i++;
+							break;
+
+						case '?':
+							d = '?';
+							i++;
+							break;
+
+						case '\\':
+							d = '\\';
+							i++;
+							break;
+
+						case 't':
+							d = '\t';
+							i++;
+							break;
+
+						case 'r':
+							d = '\r';
+							i++;
+							break;
+
+						case 'n':
+							d = '\n';
+							i++;
+							break;
+
+						case ' ':
+							d = ' ';
+							i++;
+							break;
+
+						case ' ':
+							d = ' ';
+							i++;
+							break;
+
+						case '\t':
+							d = '\t';
+							i++;
+							break;
+
+						case '0':
+							d = '\0';
+							i++;
+							break;
+
+						case 'x':
+							i++;
+							sb2 = new StringBuilder();
+							for (j = 0; j < 4; j++)
+							{
+								char c2 = str[++i];
+
+								if ((c2 >= '0' && c2 <= '9') || (c2 >= 'a' && c2 <= 'f') || (c2 >= 'A' && c2 <= 'F'))
+								{
+									sb2.Append(c2);
+								}
+								else
+								{
+									i--;
+									break;
+								}
+							}
+							hex = Convert.ToInt32(sb2.ToString(), 16);
+							d = (char)hex;
+							break;
+
+						default:
+							if (c1 >= '0' && c1 <= '7')
+							{
+								sb2 = new StringBuilder();
+								for (j = 0; j < 3; j++)
+								{
+									char c2 = str[++i];
+
+									if (c2 >= '0' && c2 <= '7')
+									{
+										sb2.Append(c2);
+									}
+									else
+									{
+										i--;
+										break;
+									}
+								}
+								hex = Convert.ToInt32(sb2.ToString(), 8);
+								d = (char)hex;
+							}
+							else
+							{
+								d = '\\';
+								i++;
+							}
+							break;
+					}
+				}
+
+				if (d != '\0')
+				{
+					sb.Append(d);
+				}
+				else
+				{
+					break;
+				}
+			}
+
+			return sb.ToString();
+		}
+
+		public static int GetStrWidth(string str)
+		{
+			int ret = 0;
+			foreach (char c in str)
+			{
+				if (c <= 255)
+				{
+					ret++;
+				}
+				else
+				{
+					ret += 2;
+				}
+			}
+			return ret;
+		}
+
+		public static string TrimCrlf(string str)
+		{
+			int len;
+			if (str == null)
+			{
+				return "";
+			}
+			len = str.Length;
+			if (len == 0)
+			{
+				return "";
+			}
+
+			if (str[len - 1] == '\n')
+			{
+				if (len >= 2 && str[len - 2] == '\r')
+				{
+					str = str.Substring(0, len - 2);
+				}
+
+				str = str.Substring(0, len - 1);
+			}
+			else if (str[len - 1] == '\r')
+			{
+				str = str.Substring(0, len - 1);
+			}
+
+			return str;
+		}
+
+		public static bool IsAllUpperStr(string str)
+		{
+			int i, len;
+			if (str == null)
+			{
+				return false;
+			}
+
+			len = str.Length;
+
+			for (i = 0; i < len; i++)
+			{
+				char c = str[i];
+
+				if ((c >= '0' && c <= '9') ||
+					(c >= 'A' && c <= 'Z'))
+				{
+				}
+				else
+				{
+					return false;
+				}
+			}
+
+			return true;
+		}
+
+		public static List<string> StrArrayToList(string[] strArray)
+		{
+			List<string> ret = new List<string>();
+
+			foreach (string s in strArray)
+			{
+				ret.Add(s);
+			}
+
+			return ret;
+		}
+
+		private static string[] __new_ParseCmdLine(string str)
+		{
+			List<string> o;
+			int i, len, mode;
+			char c;
+			StringBuilder tmp;
+			bool ignore_space = false;
+			if (str == null)
+			{
+				return new string[0];
+			}
+
+			o = new List<string>();
+			tmp = new StringBuilder();
+
+			mode = 0;
+			len = str.Length;
+			for (i = 0; i < len; i++)
+			{
+				c = str[i];
+
+				switch (mode)
+				{
+					case 0:
+						if (c == ' ' || c == '\t')
+						{
+						}
+						else
+						{
+							if (c == '\"')
+							{
+								if (str[i + 1] == '\"')
+								{
+									tmp.Append("\"");
+									i++;
+								}
+								else
+								{
+									ignore_space = true;
+								}
+							}
+							else
+							{
+								tmp.Append(c);
+							}
+						}
+
+						mode = 1;
+						break;
+
+					case 1:
+						if (ignore_space == false && (c == ' ' || c == '\t'))
+						{
+							o.Add(tmp.ToString());
+
+							tmp = new StringBuilder();
+							mode = 0;
+						}
+						else
+						{
+							if (c == '\"')
+							{
+								if (str[i + 1] == '\"')
+								{
+									tmp.Append("\"");
+									i++;
+								}
+								else
+								{
+									if (ignore_space == false)
+									{
+										ignore_space = true;
+									}
+									else
+									{
+										ignore_space = false;
+									}
+								}
+							}
+							else
+							{
+								tmp.Append(c);
+							}
+						}
+						break;
+
+				}
+			}
+
+			if (tmp.Length >= 1)
+			{
+				o.Add(tmp.ToString());
+			}
+
+			List<string> ret = new List<string>();
+			foreach (string s in o)
+			{
+				ret.Add(s);
+			}
+
+			return ret.ToArray();
+		}
+
+		public static int CompareString(string s1, string s2)
+		{
+			try
+			{
+				return string.Compare(s1, s2, true);
+			}
+			catch
+			{
+				return 0;
+			}
+		}
+		public static int CompareStringCaseSensitive(string s1, string s2)
+		{
+			try
+			{
+				return string.Compare(s1, s2, false);
+			}
+			catch
+			{
+				return 0;
+			}
+		}
+
+		public static string ReplaceStr(string str, string oldKeyword, string newKeyword)
+		{
+			return ReplaceStr(str, oldKeyword, newKeyword, false);
+		}
+		public static string ReplaceStr(string str, string oldKeyword, string newKeyword, bool caseSensitive)
+		{
+			int len_string, len_old, len_new;
+			if (str == null || oldKeyword == null || newKeyword == null)
+			{
+				return null;
+			}
+
+			if (caseSensitive == false)
+			{
+				return str.Replace(oldKeyword, newKeyword);
+			}
+
+			int i, j, num;
+			StringBuilder sb = new StringBuilder();
+
+			len_string = str.Length;
+			len_old = oldKeyword.Length;
+			len_new = newKeyword.Length;
+
+			i = j = num = 0;
+
+			while (true)
+			{
+				i = SearchStr(str, oldKeyword, i, caseSensitive);
+				if (i == -1)
+				{
+					sb.Append(str.Substring(j, len_string - j));
+					break;
+				}
+
+				num++;
+
+				sb.Append(str.Substring(j, i - j));
+				sb.Append(newKeyword);
+
+				i += len_old;
+				j = i;
+			}
+
+			return sb.ToString();
+		}
+
+		public static int SearchStrMulti(string str, int start, bool caseSensitive, out int foundIndex, out string foundKeyword, params string[] keywords)
+		{
+			int i;
+			foundIndex = -1;
+			foundKeyword = "";
+			int ret = -1;
+			int min = int.MaxValue;
+			for (i = 0; i < keywords.Length; i++)
+			{
+				string keyword = keywords[i];
+				int r = Str.SearchStr(str, keyword, start, caseSensitive);
+				if (r != -1)
+				{
+					if (min > r)
+					{
+						min = r;
+						foundKeyword = str.Substring(r, keyword.Length);
+						foundIndex = i;
+					}
+				}
+			}
+
+			if (foundIndex != -1)
+			{
+				ret = min;
+			}
+
+			return ret;
+		}
+
+		public static int SearchStr(string str, string keyword, int start)
+		{
+			return SearchStr(str, keyword, start, false);
+		}
+		public static int SearchStr(string str, string keyword, int start, bool caseSensitive)
+		{
+			if (str == null || keyword == null)
+			{
+				return -1;
+			}
+
+			try
+			{
+				return str.IndexOf(keyword, start, (caseSensitive ? StringComparison.InvariantCulture : StringComparison.InvariantCultureIgnoreCase));
+			}
+			catch
+			{
+				return -1;
+			}
+		}
+
+		public static void Printf(string fmt, params object[] args)
+		{
+			if (args.Length == 0)
+			{
+				Console.Write(fmt);
+			}
+			else
+			{
+				Console.Write(FormatC(fmt, args));
+			}
+		}
+
+		public static string FormatC(string fmt)
+		{
+			return FormatC(fmt, new object[0]);
+		}
+		public static string FormatC(string fmt, params object[] args)
+		{
+			int i, len;
+			StringBuilder tmp;
+			List<string> o;
+			int mode = 0;
+			int pos = 0;
+			if (fmt == null)
+			{
+				return null;
+			}
+
+			len = fmt.Length;
+			tmp = new StringBuilder();
+			o = new List<string>();
+
+			mode = 0;
+
+			for (i = 0; i < len; i++)
+			{
+				char c = fmt[i];
+
+				if (mode == 0)
+				{
+					switch (c)
+					{
+						case '%':
+							if (fmt[i + 1] == '%')
+							{
+								i++;
+								tmp.Append("%");
+							}
+							else
+							{
+								mode = 1;
+								o.Add(tmp.ToString());
+								tmp = new StringBuilder();
+
+								tmp.Append(c);
+							}
+							break;
+
+						default:
+							tmp.Append(c);
+							break;
+					}
+				}
+				else
+				{
+					switch (c)
+					{
+						case 'c':
+						case 'C':
+						case 'd':
+						case 'i':
+						case 'o':
+						case 'u':
+						case 'x':
+						case 'X':
+						case 'e':
+						case 'E':
+						case 'f':
+						case 'g':
+						case 'G':
+						case 'a':
+						case 'A':
+						case 'n':
+						case 'p':
+						case 's':
+						case 'S':
+							tmp.Append(c);
+
+							PrintFParsedParam pp = new PrintFParsedParam(tmp.ToString());
+							string s;
+							if (pp.Ok)
+							{
+								s = pp.GetString(args[pos++]);
+							}
+							else
+							{
+								s = "(parse_error)";
+							}
+
+							o.Add(s);
+
+							tmp = new StringBuilder();
+							mode = 0;
+							break;
+
+						default:
+							tmp.Append(c);
+							break;
+					}
+				}
+			}
+
+			if (tmp.Length >= 1)
+			{
+				o.Add(tmp.ToString());
+			}
+
+			StringBuilder retstr = new StringBuilder();
+			foreach (string stmp in o)
+			{
+				retstr.Append(stmp);
+			}
+
+			return retstr.ToString();
+		}
+
+		static Encoding asciiEncoding = Encoding.ASCII;
+		public static Encoding AsciiEncoding
+		{
+			get { return asciiEncoding; }
+		}
+
+		static Encoding shiftJisEncoding = Encoding.GetEncoding("shift_jis");
+		public static Encoding ShiftJisEncoding
+		{
+			get { return shiftJisEncoding; }
+		}
+
+		static Encoding iso2022JpEncoding = Encoding.GetEncoding("ISO-2022-JP");
+		public static Encoding ISO2022JPEncoding
+		{
+			get { return iso2022JpEncoding; }
+		}
+
+		static Encoding eucJpEncoding = Encoding.GetEncoding("euc-jp");
+		public static Encoding EucJpEncoding
+		{
+			get { return eucJpEncoding; }
+		}
+
+		static Encoding iso88591Encoding = Encoding.GetEncoding("iso-8859-1");
+		public static Encoding ISO88591Encoding
+		{
+			get { return iso88591Encoding; }
+		}
+
+		static Encoding gb2312Encoding = Encoding.GetEncoding("gb2312");
+		public static Encoding GB2312Encoding
+		{
+			get { return gb2312Encoding; }
+		}
+
+		static Encoding utf8Encoding = Encoding.UTF8;
+		public static Encoding Utf8Encoding
+		{
+			get { return utf8Encoding; }
+		}
+
+		static Encoding uniEncoding = Encoding.Unicode;
+		public static Encoding UniEncoding
+		{
+			get { return uniEncoding; }
+		}
+
+		public static void NormalizeString(ref string str)
+		{
+			if (str == null)
+			{
+				str = "";
+			}
+
+			str = str.Trim();
+		}
+
+		public static string PasswordPrompt()
+		{
+			Queue<char> ret = new Queue<char>();
+			bool escape = false;
+
+			while (true)
+			{
+				ConsoleKeyInfo ki = Console.ReadKey(true);
+				char c = ki.KeyChar;
+
+				if (c >= 0x20 && c <= 0x7e)
+				{
+					ret.Enqueue(c);
+					Console.Write("*");
+				}
+				else if (c == 0x04 || c == 0x1a || c == 0x0d || c == 0x0a)
+				{
+					if (c == 0x04 || c == 0x1a)
+					{
+						escape = true;
+					}
+					break;
+				}
+				else if (c == 0x08)
+				{
+					Console.Write(c);
+					Console.Write(" ");
+					Console.Write(c);
+
+					if (ret.Count >= 1)
+					{
+						ret.Dequeue();
+					}
+				}
+			}
+
+			Console.WriteLine();
+
+			if (escape)
+			{
+				return null;
+			}
+
+			return new string(ret.ToArray());
+		}
+
+		public static bool CheckStrLen(string str, int maxLen)
+		{
+			if (str == null)
+			{
+				return false;
+			}
+
+			if (str.Length > maxLen)
+			{
+				return false;
+			}
+
+			return true;
+		}
+
+		public static bool IsSafe(string s)
+		{
+			foreach (char c in s)
+			{
+				if (IsSafe(c) == false)
+				{
+					return false;
+				}
+			}
+
+			return true;
+		}
+
+		public static bool IsSafe(char c)
+		{
+			char[] b = Path.GetInvalidFileNameChars();
+
+			foreach (char bb in b)
+			{
+				if (bb == c)
+				{
+					return false;
+				}
+			}
+
+			if (c == '\\' || c == '/')
+			{
+				return false;
+			}
+
+			return true;
+		}
+
+		public static string MakeSafePathName(string name)
+		{
+			char[] a = name.ToCharArray();
+			char[] b = Path.GetInvalidFileNameChars();
+			StringBuilder sb = new StringBuilder();
+
+			int i;
+			for (i = 0; i < a.Length; i++)
+			{
+				int j;
+				bool ok = true;
+
+				for (j = 0; j < b.Length; j++)
+				{
+					if (b[j] == a[i])
+					{
+						ok = false;
+						break;
+					}
+				}
+
+				if (a[i] == '\\' || a[i] == '/')
+				{
+					ok = true;
+					a[i] = '\\';
+				}
+
+				string s;
+
+				if (ok == false)
+				{
+					s = "_" + ((int)a[i]).ToString() + "_";
+				}
+				else
+				{
+					s = "" + a[i];
+				}
+
+				sb.Append(s);
+			}
+
+			return sb.ToString();
+		}
+
+		public static string MakeSafeFileName(string name)
+		{
+			char[] a = name.ToCharArray();
+			char[] b = Path.GetInvalidFileNameChars();
+			StringBuilder sb = new StringBuilder();
+
+			int i;
+			for (i = 0; i < a.Length; i++)
+			{
+				int j;
+				bool ok = true;
+
+				for (j = 0; j < b.Length; j++)
+				{
+					if (b[j] == a[i])
+					{
+						ok = false;
+						break;
+					}
+				}
+
+				string s;
+
+				if (ok == false)
+				{
+					s = "_" + ((int)a[i]).ToString() + "_";
+				}
+				else
+				{
+					s = "" + a[i];
+				}
+
+				sb.Append(s);
+			}
+
+			return sb.ToString();
+		}
+
+		public static object CloneObject(object o)
+		{
+			return BinaryToObject(ObjectToBinary(o));
+		}
+
+		public static object AnyToObject(byte[] data)
+		{
+			if (data.Length >= 5)
+			{
+				if (Str.StrCmpi(Encoding.ASCII.GetString(data, 0, 5), "<SOAP"))
+				{
+					return XMLDataToObject(data);
+				}
+			}
+
+			return BinaryToObject(data);
+		}
+
+		public static byte[] ObjectToBinary(object o)
+		{
+			BinaryFormatter f = new BinaryFormatter();
+			MemoryStream ms = new MemoryStream();
+			f.Serialize(ms, o);
+
+			return ms.ToArray();
+		}
+
+		public static object BinaryToObject(byte[] data)
+		{
+			BinaryFormatter f = new BinaryFormatter();
+			MemoryStream ms = new MemoryStream();
+			ms.Write(data, 0, data.Length);
+			ms.Position = 0;
+
+			return f.Deserialize(ms);
+		}
+
+		public static string ObjectToXMLString(object o)
+		{
+			SoapFormatter f = new SoapFormatter();
+			MemoryStream ms = new MemoryStream();
+			f.Serialize(ms, o);
+			ms.Position = 0;
+
+			StreamReader r = new StreamReader(ms);
+
+			return r.ReadToEnd();
+		}
+		public static byte[] ObjectToXMLData(object o)
+		{
+			SoapFormatter f = new SoapFormatter();
+			MemoryStream ms = new MemoryStream();
+			f.Serialize(ms, o);
+			ms.Position = 0;
+
+			return ms.ToArray();
+		}
+
+		public static object XMLStringToObject(string data)
+		{
+			SoapFormatter f = new SoapFormatter();
+			MemoryStream ms = new MemoryStream();
+			StreamWriter w = new StreamWriter(ms);
+			w.Write(data);
+			w.Flush();
+
+			ms.Position = 0;
+
+			return f.Deserialize(ms);
+		}
+		public static object XMLDataToObject(byte[] data)
+		{
+			SoapFormatter f = new SoapFormatter();
+			MemoryStream ms = new MemoryStream();
+			ms.Write(data, 0, data.Length);
+
+			ms.Position = 0;
+
+			return f.Deserialize(ms);
+		}
+
+		public static string CombineStringArray(string[] str)
+		{
+			return CombineStringArray(str, "");
+		}
+		public static string CombineStringArray(string[] str, string sepstr)
+		{
+			int i;
+			StringBuilder b = new StringBuilder();
+
+			for (i = 0; i < str.Length; i++)
+			{
+				string s = str[i];
+
+				b.Append(s);
+
+				if ((str.Length - 1) != i)
+				{
+					b.Append(sepstr);
+				}
+			}
+
+			return b.ToString();
+		}
+
+		public static string TruncStr(string str, int len)
+		{
+			if (str == null)
+			{
+				return "";
+			}
+			if (str.Length <= len)
+			{
+				return str;
+			}
+			else
+			{
+				return str.Substring(0, len);
+			}
+		}
+
+		public static string GenRandStr()
+		{
+			return ByteToStr(Secure.HashSHA1(Guid.NewGuid().ToByteArray()));
+		}
+
+		public static byte[] HashStr(string str)
+		{
+			return Secure.HashSHA1(Encoding.UTF8.GetBytes(str));
+		}
+		public static ulong HashStrToLong(string str)
+		{
+			Buf b = new Buf();
+			b.Write(HashStr(str));
+			b.SeekToBegin();
+			return b.ReadInt64();
+		}
+
+		public static string ByteToStr(byte[] data)
+		{
+			return ByteToStr(data, "");
+		}
+		public static string ByteToStr(byte[] data, string paddingStr)
+		{
+			StringBuilder sb = new StringBuilder();
+
+			int i;
+			for (i = 0; i < data.Length; i++)
+			{
+				byte b = data[i];
+				sb.Append(b.ToString("X2"));
+
+				if (i != (data.Length - 1))
+				{
+					sb.Append(paddingStr);
+				}
+			}
+
+			return sb.ToString();
+		}
+
+		public static string RandToStr6(string rand)
+		{
+			byte[] hash = HashStr(rand + "coreutil");
+			return ByteToStr(hash).Substring(0, 6);
+		}
+
+		public static bool IsAscii(char c)
+		{
+			if (c >= '0' && c <= '9')
+			{
+				return true;
+			}
+			if (c >= 'A' && c <= 'Z')
+			{
+				return true;
+			}
+			if (c >= 'a' && c <= 'z')
+			{
+				return true;
+			}
+			if (c == '!' || c == '\"' || c == '#' || c == '$' || c == '%' || c == '&' || c == '\'' ||
+				c == '(' || c == ')' || c == '-' || c == ' ' || c == '=' || c == '~' || c == '^' || c == '_' ||
+				c == '\\' || c == '|' || c == '{' || c == '}' || c == '[' || c == ']' || c == '@' ||
+				c == '*' || c == '+' || c == '.' || c == '<' || c == '>' ||
+				c == ',' || c == '?' || c == '/' || c == ' ' || c == '^' || c == '\'')
+			{
+				return true;
+			}
+			return false;
+		}
+		public static bool IsAscii(string str)
+		{
+			foreach (char c in str)
+			{
+				if (IsAscii(c) == false)
+				{
+					return false;
+				}
+			}
+			return true;
+		}
+
+		public static string GetBpsStr(int size)
+		{
+			return GetBpsStr(size);
+		}
+		public static string GetBpsStr(long size)
+		{
+			if (size >= 1000000000000L)
+			{
+				return ((double)(size) / 1000.0f / 1000.0f / 1000.0f / 1000.0f).ToString(".00") + " Tbps";
+			}
+			if (size >= 1000 * 1000 * 1000)
+			{
+				return ((double)(size) / 1000.0f / 1000.0f / 1000.0f).ToString(".00") + " Gbps";
+			}
+			if (size >= 1000 * 1000)
+			{
+				return ((double)(size) / 1000.0f / 1000.0f).ToString(".00") + " Mbps";
+			}
+			if (size >= 1000)
+			{
+				return ((double)(size) / 1000.0f).ToString(".00") + " Kbps";
+			}
+			return ((double)(size)).ToString() + " bps";
+		}
+
+		public static string GetFileSizeStr(int size)
+		{
+			return GetFileSizeStr(size);
+		}
+		public static string GetFileSizeStr(long size)
+		{
+			if (size >= 1099511627776L)
+			{
+				return ((double)(size) / 1024.0f / 1024.0f / 1024.0f / 1024.0f).ToString(".00") + " TB";
+			}
+			if (size >= 1024 * 1024 * 1024)
+			{
+				return ((double)(size) / 1024.0f / 1024.0f / 1024.0f).ToString(".00") + " GB";
+			}
+			if (size >= 1024 * 1024)
+			{
+				return ((double)(size) / 1024.0f / 1024.0f).ToString(".00") + " MB";
+			}
+			if (size >= 1024)
+			{
+				return ((double)(size) / 1024.0f).ToString(".00") + " KB";
+			}
+			return ((double)(size)).ToString() + " Bytes";
+		}
+
+		public static string IntToStr(int i)
+		{
+			return i.ToString();
+		}
+		public static string IntToStr(uint i)
+		{
+			return i.ToString();
+		}
+
+		public static string LongToStr(long i)
+		{
+			return i.ToString();
+		}
+		public static string LongToStr(ulong i)
+		{
+			return i.ToString();
+		}
+
+		public static bool StrToBool(string s)
+		{
+			if (s == null)
+			{
+				return false;
+			}
+
+			Str.NormalizeString(ref s, true, true, false, false);
+
+			if (s.StartsWith("y", StringComparison.InvariantCultureIgnoreCase))
+			{
+				return true;
+			}
+
+			if (s.StartsWith("t", StringComparison.InvariantCultureIgnoreCase))
+			{
+				return true;
+			}
+
+			if (Str.StrToInt(s) != 0)
+			{
+				return true;
+			}
+
+			return false;
+		}
+
+		public static int StrToInt(string str)
+		{
+			try
+			{
+				Str.RemoveSpaceChar(ref str);
+				Str.NormalizeString(ref str, true, true, false, false);
+				str = str.Replace(",", "");
+				return int.Parse(str);
+			}
+			catch
+			{
+				return 0;
+			}
+		}
+		public static uint StrToUInt(string str)
+		{
+			try
+			{
+				Str.RemoveSpaceChar(ref str);
+				Str.NormalizeString(ref str, true, true, false, false);
+				str = str.Replace(",", "");
+				return uint.Parse(str);
+			}
+			catch
+			{
+				return 0;
+			}
+		}
+
+		public static long StrToLong(string str)
+		{
+			try
+			{
+				Str.RemoveSpaceChar(ref str);
+				Str.NormalizeString(ref str, true, true, false, false);
+				str = str.Replace(",", "");
+				return long.Parse(str);
+			}
+			catch
+			{
+				return 0;
+			}
+		}
+		public static ulong StrToULong(string str)
+		{
+			try
+			{
+				Str.RemoveSpaceChar(ref str);
+				Str.NormalizeString(ref str, true, true, false, false);
+				str = str.Replace(",", "");
+				return ulong.Parse(str);
+			}
+			catch
+			{
+				return 0;
+			}
+		}
+
+		public static bool IsStrDateTime(string str)
+		{
+			try
+			{
+				Str.NormalizeString(ref str, true, true, false, false);
+				StrToDateTime(str);
+				return true;
+			}
+			catch
+			{
+				return false;
+			}
+		}
+		public static DateTime StrToDateTime(string str, bool toUtc)
+		{
+			return StrToDateTime(str).ToUniversalTime();
+		}
+		public static DateTime StrToDateTime(string str)
+		{
+			Str.NormalizeString(ref str, true, true, false, false);
+			str = str.Trim();
+			string[] sps =
+				{
+					" ",
+					"_",
+					" ",
+					"\t",
+				};
+
+			string[] tokens = str.Split(sps, StringSplitOptions.RemoveEmptyEntries);
+
+			if (tokens.Length != 2)
+			{
+				int r1 = str.IndexOf("年", StringComparison.InvariantCultureIgnoreCase);
+				int r2 = str.IndexOf("月", StringComparison.InvariantCultureIgnoreCase);
+				int r3 = str.IndexOf("日", StringComparison.InvariantCultureIgnoreCase);
+
+				if (r1 != -1 && r2 != -1 && r3 != -1)
+				{
+					tokens = new string[2];
+
+					tokens[0] = str.Substring(0, r3 + 1);
+					tokens[1] = str.Substring(r3 + 1);
+				}
+			}
+
+			if (tokens.Length == 2)
+			{
+				DateTime dt1 = StrToDate(tokens[0]);
+				DateTime dt2 = StrToTime(tokens[1]);
+
+				return dt1.Date + dt2.TimeOfDay;
+			}
+			else if (tokens.Length == 1)
+			{
+				if (tokens[0].Length == 14)
+				{
+					// yyyymmddhhmmss
+					DateTime dt1 = StrToDate(tokens[0].Substring(0, 8));
+					DateTime dt2 = StrToTime(tokens[0].Substring(8));
+
+					return dt1.Date + dt2.TimeOfDay;
+				}
+				else if (tokens[0].Length == 12)
+				{
+					// yymmddhhmmss
+					DateTime dt1 = StrToDate(tokens[0].Substring(0, 6));
+					DateTime dt2 = StrToTime(tokens[0].Substring(6));
+
+					return dt1.Date + dt2.TimeOfDay;
+				}
+				else
+				{
+					DateTime dt1 = StrToDate(tokens[0]);
+
+					return dt1.Date;
+				}
+			}
+
+			throw new ArgumentException();
+		}
+
+		public static bool IsStrTime(string str)
+		{
+			try
+			{
+				Str.NormalizeString(ref str, true, true, false, false);
+				StrToTime(str);
+				return true;
+			}
+			catch
+			{
+				return false;
+			}
+		}
+		public static DateTime StrToTime(string str, bool toUtc)
+		{
+			return StrToTime(str).ToUniversalTime();
+		}
+		public static DateTime StrToTime(string str)
+		{
+			string[] sps = 
+				{
+					"/",
+					"-",
+					":",
+					"時",
+					"分",
+					"秒",
+				};
+			Str.NormalizeString(ref str, true, true, false, false);
+			str = str.Trim();
+
+			string[] tokens;
+
+			tokens = str.Split(sps, StringSplitOptions.RemoveEmptyEntries);
+			if (tokens.Length == 3)
+			{
+				// hh:mm:ss
+				string hourStr = tokens[0];
+				string minuteStr = tokens[1];
+				string secondStr = tokens[2];
+				int hour = -1;
+				int minute = -1;
+				int second = -1;
+
+				if ((hourStr.Length == 1 || hourStr.Length == 2) && IsNumber(hourStr))
+				{
+					hour = StrToInt(hourStr);
+				}
+				if ((minuteStr.Length == 1 || minuteStr.Length == 2) && IsNumber(minuteStr))
+				{
+					minute = StrToInt(minuteStr);
+				}
+				if ((secondStr.Length == 1 || secondStr.Length == 2) && IsNumber(secondStr))
+				{
+					second = StrToInt(secondStr);
+				}
+
+				if (hour < 0 || hour >= 25 || minute < 0 || minute >= 60 || second < 0 || second >= 60)
+				{
+					throw new ArgumentException();
+				}
+
+				return new DateTime(2000, 1, 1, hour, minute, second);
+			}
+			else if (tokens.Length == 2)
+			{
+				// hh:mm
+				string hourStr = tokens[0];
+				string minuteStr = tokens[1];
+				int hour = -1;
+				int minute = -1;
+				int second = 0;
+
+				if ((hourStr.Length == 1 || hourStr.Length == 2) && IsNumber(hourStr))
+				{
+					hour = StrToInt(hourStr);
+				}
+				if ((minuteStr.Length == 1 || minuteStr.Length == 2) && IsNumber(minuteStr))
+				{
+					minute = StrToInt(minuteStr);
+				}
+
+				if (hour < 0 || hour >= 25 || minute < 0 || minute >= 60 || second < 0 || second >= 60)
+				{
+					throw new ArgumentException();
+				}
+
+				return new DateTime(2000, 1, 1, hour, minute, second);
+			}
+			else if (tokens.Length == 1)
+			{
+				string hourStr = tokens[0];
+				int hour = -1;
+				int minute = 0;
+				int second = 0;
+
+				if ((hourStr.Length == 1 || hourStr.Length == 2) && IsNumber(hourStr))
+				{
+					// hh
+					hour = StrToInt(hourStr);
+				}
+				else
+				{
+					if ((hourStr.Length == 4) && IsNumber(hourStr))
+					{
+						// hhmm
+						int i = StrToInt(hourStr);
+						hour = i / 100;
+						minute = i % 100;
+					}
+					else if ((hourStr.Length == 6) && IsNumber(hourStr))
+					{
+						// hhmmss
+						int i = StrToInt(hourStr);
+						hour = i / 10000;
+						minute = ((i % 10000) / 100);
+						second = i % 100;
+					}
+				}
+
+				if (hour < 0 || hour >= 25 || minute < 0 || minute >= 60 || second < 0 || second >= 60)
+				{
+					throw new ArgumentException();
+				}
+
+				return new DateTime(2000, 1, 1, hour, minute, second);
+			}
+
+			throw new ArgumentException();
+		}
+
+		public static bool IsStrDate(string str)
+		{
+			try
+			{
+				Str.NormalizeString(ref str, true, true, false, false);
+				StrToDate(str);
+				return true;
+			}
+			catch
+			{
+				return false;
+			}
+		}
+		public static DateTime StrToDate(string str, bool toUtc)
+		{
+			return StrToDate(str).ToUniversalTime();
+		}
+		public static DateTime StrToDate(string str)
+		{
+			string[] sps = 
+				{
+					"/",
+					"/",
+					"-",
+					":",
+					"年",
+					"月",
+					"日",
+				};
+			str = str.Trim();
+			Str.NormalizeString(ref str, true, true, false, false);
+
+			string[] youbi =
+			{
+				"月", "火", "水", "木", "金", "土", "日",
+			};
+
+			foreach (string ys in youbi)
+			{
+				string ys2 = string.Format("({0})", ys);
+
+				str = str.Replace(ys2, "");
+			}
+
+			string[] tokens;
+
+			tokens = str.Split(sps, StringSplitOptions.RemoveEmptyEntries);
+			if (tokens.Length == 3)
+			{
+				// yyyy/mm/dd
+				string yearStr = tokens[0];
+				string monthStr = tokens[1];
+				string dayStr = tokens[2];
+				int year = 0;
+				int month = 0;
+				int day = 0;
+
+				if ((yearStr.Length == 1 || yearStr.Length == 2) && IsNumber(yearStr))
+				{
+					year = 2000 + StrToInt(yearStr);
+				}
+				else if (yearStr.Length == 4 && IsNumber(yearStr))
+				{
+					year = StrToInt(yearStr);
+				}
+
+				if ((monthStr.Length == 1 || monthStr.Length == 2) && IsNumber(monthStr))
+				{
+					month = StrToInt(monthStr);
+				}
+				if ((dayStr.Length == 1 || dayStr.Length == 2) && IsNumber(dayStr))
+				{
+					day = StrToInt(dayStr);
+				}
+
+				if (year < 1800 || year >= 2100 || month <= 0 || month >= 13 || day <= 0 || day >= 32)
+				{
+					throw new ArgumentException();
+				}
+
+				return new DateTime(year, month, day);
+			}
+			else if (tokens.Length == 1)
+			{
+				if (str.Length == 8)
+				{
+					// yyyymmdd
+					string yearStr = str.Substring(0, 4);
+					string monthStr = str.Substring(4, 2);
+					string dayStr = str.Substring(6, 2);
+					int year = int.Parse(yearStr);
+					int month = int.Parse(monthStr);
+					int day = int.Parse(dayStr);
+
+					if (year < 1800 || year >= 2100 || month <= 0 || month >= 13 || day <= 0 || day >= 32)
+					{
+						throw new ArgumentException();
+					}
+
+					return new DateTime(year, month, day);
+				}
+				else if (str.Length == 6)
+				{
+					// yymmdd
+					string yearStr = str.Substring(0, 2);
+					string monthStr = str.Substring(2, 2);
+					string dayStr = str.Substring(4, 2);
+					int year = int.Parse(yearStr) + 2000;
+					int month = int.Parse(monthStr);
+					int day = int.Parse(dayStr);
+
+					if (year < 1800 || year >= 2100 || month <= 0 || month >= 13 || day <= 0 || day >= 32)
+					{
+						throw new ArgumentException();
+					}
+
+					return new DateTime(year, month, day);
+				}
+			}
+
+			throw new ArgumentException();
+		}
+
+		public static string TimeToStr(DateTime dt)
+		{
+			return TimeToStr(dt, false);
+		}
+		public static string TimeToStr(DateTime dt, CoreLanguage lang)
+		{
+			return TimeToStr(dt, false, lang);
+		}
+		public static string TimeToStr(DateTime dt, bool toLocalTime)
+		{
+			return TimeToStr(dt, toLocalTime, CoreLanguageClass.CurrentThreadLanguage);
+		}
+		public static string TimeToStr(DateTime dt, bool toLocalTime, CoreLanguage lang)
+		{
+			string s = DateTimeToStr(dt, toLocalTime, lang);
+
+			string[] tokens = s.Split(' ');
+
+			return tokens[1];
+		}
+		public static string TimeToStrShort(DateTime dt)
+		{
+			return TimeToStrShort(dt, false);
+		}
+		public static string TimeToStrShort(DateTime dt, bool toLocalTime)
+		{
+			string s = DateTimeToStrShort(dt, toLocalTime);
+
+			string[] tokens = s.Split('_');
+
+			return tokens[1];
+		}
+
+		public static string DateToStr(DateTime dt)
+		{
+			return DateToStr(dt, false);
+		}
+		public static string DateToStr(DateTime dt, CoreLanguage lang)
+		{
+			return DateToStr(dt, false, lang);
+		}
+		public static string DateToStr(DateTime dt, bool toLocalTime)
+		{
+			return DateToStr(dt, toLocalTime, false);
+		}
+		public static string DateToStr(DateTime dt, bool toLocalTime, CoreLanguage lang)
+		{
+			return DateToStr(dt, toLocalTime, false, lang);
+		}
+		public static string DateToStr(DateTime dt, bool toLocalTime, bool noDayOfWeek)
+		{
+			return DateToStr(dt, toLocalTime, noDayOfWeek, CoreLanguageClass.CurrentThreadLanguage);
+		}
+		public static string DateToStr(DateTime dt, bool toLocalTime, bool noDayOfWeek, CoreLanguage lang)
+		{
+			string s = DateTimeToStr(dt, toLocalTime, lang);
+
+			string[] tokens = s.Split(' ');
+
+			string ret = tokens[0];
+
+			if (noDayOfWeek)
+			{
+				string[] tokens2 = s.Split('(');
+
+				ret = tokens2[0];
+			}
+
+			return ret;
+		}
+		public static string DateToStrShort(DateTime dt)
+		{
+			return DateToStrShort(dt, false);
+		}
+		public static string DateToStrShort(DateTime dt, bool toLocalTime)
+		{
+			string s = DateTimeToStrShort(dt, toLocalTime);
+
+			string[] tokens = s.Split('_');
+
+			return tokens[0];
+		}
+
+		public static string DayOfWeekToStr(CoreLanguage lang, int d)
+		{
+			if (lang == CoreLanguage.Japanese)
+			{
+				string[] youbi =
+				{
+					"日", "月", "火", "水", "木", "金", "土", 
+				};
+
+				return youbi[d];
+			}
+			else
+			{
+				string[] youbi =
+				{
+					"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", 
+				};
+
+				return youbi[d];
+			}
+		}
+
+		public static string DateTimeToStr(DateTime dt)
+		{
+			return DateTimeToStr(dt, false);
+		}
+		public static string DateTimeToStr(DateTime dt, CoreLanguage lang)
+		{
+			return DateTimeToStr(dt, false, lang);
+		}
+		public static string DateTimeToStr(DateTime dt, bool toLocalTime)
+		{
+			return DateTimeToStr(dt, toLocalTime, CoreLanguageClass.CurrentThreadLanguage);
+		}
+		public static string DateTimeToStr(DateTime dt, bool toLocalTime, CoreLanguage lang)
+		{
+			if (toLocalTime)
+			{
+				dt = dt.ToLocalTime();
+			}
+
+			if (lang == CoreLanguage.Japanese)
+			{
+				return dt.ToString("yyyy年M月d日") + "(" + DayOfWeekToStr(lang, (int)dt.DayOfWeek) + ")" + dt.ToString(" H時m分s秒");
+			}
+			else
+			{
+				return dt.ToString("yyyy-MM-dd(") + DayOfWeekToStr(lang, (int)dt.DayOfWeek) + dt.ToString(") H:mm:ss");
+			}
+		}
+		public static string DateTimeToStrShort(DateTime dt)
+		{
+			return DateTimeToStrShort(dt, false);
+		}
+		public static string DateTimeToStrShort(DateTime dt, bool toLocalTime)
+		{
+			if (toLocalTime)
+			{
+				dt = dt.ToLocalTime();
+			}
+
+			return dt.ToString("yyyyMMdd_HHmmss");
+		}
+		public static string DateTimeToStrShortWithMilliSecs(DateTime dt)
+		{
+			return DateTimeToStrShortWithMilliSecs(dt, false);
+		}
+		public static string DateTimeToStrShortWithMilliSecs(DateTime dt, bool toLocalTime)
+		{
+			if (toLocalTime)
+			{
+				dt = dt.ToLocalTime();
+			}
+
+			long ticks = dt.Ticks % 10000000;
+			if (ticks >= 9990000)
+			{
+				ticks = 9990000;
+			}
+
+			string msecStr = ((decimal)ticks / (decimal)10000000).ToString(".000");
+
+			return dt.ToString("yyyyMMdd_HHmmss") + "." + msecStr.Split('.')[1];
+		}
+
+		public static string Base64ToSafe64(string str)
+		{
+			return str.Replace('=', '(').Replace('+', ')').Replace('/', '_');
+		}
+		public static string Safe64ToBase64(string str)
+		{
+			return str.Replace('(', '=').Replace(')', '+').Replace('_', '/');
+		}
+
+		public static string Base64Encode(byte[] data)
+		{
+			try
+			{
+				return Convert.ToBase64String(data);
+			}
+			catch
+			{
+				return "";
+			}
+		}
+
+		public static byte[] Base64Decode(string str)
+		{
+			try
+			{
+				return Convert.FromBase64String(str);
+			}
+			catch
+			{
+				return new byte[0];
+			}
+		}
+
+		public static byte[] StrToByte(string str)
+		{
+			Str.NormalizeString(ref str, true, true, false, false);
+			return Base64Decode(Safe64ToBase64(str));
+		}
+
+		public static string Encode64(string str)
+		{
+			return Convert.ToBase64String(Encoding.UTF8.GetBytes(str)).Replace("/", "(").Replace("+", ")");
+		}
+
+		public static string Decode64(string str)
+		{
+			return Encoding.UTF8.GetString(Convert.FromBase64String(str.Replace(")", "+").Replace("(", "/")));
+		}
+
+
+		public static bool CheckMailAddress(string str)
+		{
+			str = str.Trim();
+			if (str.Length == 0)
+			{
+				return false;
+			}
+
+			string[] tokens = str.Split('@');
+
+			if (tokens.Length != 2)
+			{
+				return false;
+			}
+
+			string a = tokens[0];
+			string b = tokens[1];
+
+			if (a.Length == 0 || b.Length == 0)
+			{
+				return false;
+			}
+
+			if (b.IndexOf(".") == -1)
+			{
+				return false;
+			}
+
+			return IsAscii(str);
+		}
+
+		public static bool StrCmpi(string s1, string s2)
+		{
+			try
+			{
+				if (s1.Equals(s2, StringComparison.InvariantCultureIgnoreCase))
+				{
+					return true;
+				}
+
+				return false;
+			}
+			catch
+			{
+				return false;
+			}
+		}
+
+		public static bool StrCmp(string s1, string s2)
+		{
+			try
+			{
+				if (s1 == s2)
+				{
+					return true;
+				}
+
+				return false;
+			}
+			catch
+			{
+				return false;
+			}
+		}
+		public static string ByteToHex(byte[] data)
+		{
+			return ByteToHex(data, "");
+		}
+		public static string ByteToHex(byte[] data, string paddingStr)
+		{
+			StringBuilder ret = new StringBuilder();
+			foreach (byte b in data)
+			{
+				string s = b.ToString("X");
+				if (s.Length == 1)
+				{
+					s = "0" + s;
+				}
+
+				ret.Append(s);
+
+				if (paddingStr != null)
+				{
+					ret.Append(paddingStr);
+				}
+			}
+
+			return ret.ToString().Trim();
+		}
+
+		public static byte[] HexToByte(string str)
+		{
+			try
+			{
+				List<byte> o = new List<byte>();
+				string tmp = "";
+				int i, len;
+
+				str = str.ToUpper().Trim();
+				len = str.Length;
+
+				for (i = 0; i < len; i++)
+				{
+					char c = str[i];
+					if (('0' <= c && c <= '9') || ('A' <= c && c <= 'F'))
+					{
+						tmp += c;
+						if (tmp.Length == 2)
+						{
+							byte b = Convert.ToByte(tmp, 16);
+							o.Add(b);
+							tmp = "";
+						}
+					}
+					else if (c == ' ' || c == ',' || c == '-' || c == ';')
+					{
+					}
+					else
+					{
+						break;
+					}
+				}
+
+				return o.ToArray();
+			}
+			catch
+			{
+				return new byte[0];
+			}
+		}
+
+		public static string[] GetLines(string str)
+		{
+			List<string> a = new List<string>();
+			StringReader sr = new StringReader(str);
+			while (true)
+			{
+				string s = sr.ReadLine();
+				if (s == null)
+				{
+					break;
+				}
+				a.Add(s);
+			}
+			return a.ToArray();
+		}
+
+		public static string LinesToStr(string[] lines)
+		{
+			StringWriter sw = new StringWriter();
+			foreach (string s in lines)
+			{
+				sw.WriteLine(s);
+			}
+			return sw.ToString();
+		}
+
+		public static bool IsEmptyStr(string str)
+		{
+			if (str == null || str.Trim().Length == 0)
+			{
+				return true;
+			}
+			else
+			{
+				return false;
+			}
+		}
+		public static bool IsSolidStr(string str)
+		{
+			return !IsEmptyStr(str);
+		}
+
+		public static bool IsSplitChar(char c, string splitStr)
+		{
+			if (splitStr == null)
+			{
+				splitStr = StrToken.DefaultSplitStr;
+			}
+
+			foreach (char t in splitStr)
+			{
+				string a = "" + t;
+				string b = "" + c;
+				if (Str.StrCmpi(a, b))
+				{
+					return true;
+				}
+			}
+
+			return false;
+		}
+
+		public static bool GetKeyAndValue(string str, out string key, out string value)
+		{
+			return GetKeyAndValue(str, out key, out value, null);
+		}
+		public static bool GetKeyAndValue(string str, out string key, out string value, string splitStr)
+		{
+			uint mode = 0;
+			string keystr = "", valuestr = "";
+			if (splitStr == null)
+			{
+				splitStr = StrToken.DefaultSplitStr;
+			}
+
+			foreach (char c in str)
+			{
+				switch (mode)
+				{
+					case 0:
+						if (IsSplitChar(c, splitStr) == false)
+						{
+							mode = 1;
+							keystr += c;
+						}
+						break;
+
+					case 1:
+						if (IsSplitChar(c, splitStr) == false)
+						{
+							keystr += c;
+						}
+						else
+						{
+							mode = 2;
+						}
+						break;
+
+					case 2:
+						if (IsSplitChar(c, splitStr) == false)
+						{
+							mode = 3;
+							valuestr += c;
+						}
+						break;
+
+					case 3:
+						valuestr += c;
+						break;
+				}
+			}
+
+			if (mode == 0)
+			{
+				value = "";
+				key = "";
+				return false;
+			}
+			else
+			{
+				value = valuestr;
+				key = keystr;
+				return true;
+			}
+		}
+
+		public static int StrCmpRetInt(string s1, string s2)
+		{
+			return string.Compare(s1, s2, false);
+		}
+		public static int StrCmpiRetInt(string s1, string s2)
+		{
+			return string.Compare(s1, s2, true);
+		}
+
+		public static bool IsStrInList(string str, params string[] args)
+		{
+			return IsStrInList(str, true, args);
+		}
+		public static bool IsStrInList(string str, bool ignoreCase, params string[] args)
+		{
+			foreach (string s in args)
+			{
+				if (ignoreCase)
+				{
+					if (StrCmpi(str, s))
+					{
+						return true;
+					}
+				}
+				else
+				{
+					if (StrCmp(str, s))
+					{
+						return true;
+					}
+				}
+			}
+
+			return false;
+		}
+
+		public static bool IsDouble(string str)
+		{
+			double v;
+			Str.NormalizeString(ref str, true, true, false, false);
+			str = str.Replace(",", "");
+			return double.TryParse(str, out v);
+		}
+
+		public static bool IsLong(string str)
+		{
+			long v;
+			Str.RemoveSpaceChar(ref str);
+			Str.NormalizeString(ref str, true, true, false, false);
+			str = str.Replace(",", "");
+			return long.TryParse(str, out v);
+		}
+
+		public static bool IsInt(string str)
+		{
+			int v;
+			Str.RemoveSpaceChar(ref str);
+			Str.NormalizeString(ref str, true, true, false, false);
+			str = str.Replace(",", "");
+			return int.TryParse(str, out v);
+		}
+
+		public static bool IsNumber(string str)
+		{
+			str = str.Trim();
+			Str.RemoveSpaceChar(ref str);
+			Str.NormalizeString(ref str, true, true, false, false);
+			str = str.Replace(",", "");
+
+			foreach (char c in str)
+			{
+				if (IsNumber(c) == false)
+				{
+					return false;
+				}
+			}
+
+			return true;
+		}
+		public static bool IsNumber(char c)
+		{
+			if (c >= '0' && c <= '9')
+			{
+			}
+			else if (c == '-')
+			{
+			}
+			else
+			{
+				return false;
+			}
+
+			return true;
+		}
+
+		public static bool InStr(string str, string keyword)
+		{
+			return InStr(str, keyword, false);
+		}
+		public static bool InStr(string str, string keyword, bool caseSensitive)
+		{
+			if (str.IndexOf(keyword, (caseSensitive ? StringComparison.InvariantCulture : StringComparison.InvariantCultureIgnoreCase)) == -1)
+			{
+				return false;
+			}
+
+			return true;
+		}
+
+		public static string MakeCharArray(char c, int len)
+		{
+			return new string(c, len);
+		}
+
+		public static string NormalizeCrlf(string str)
+		{
+			return NormalizeCrlf(str, new byte[] { 13, 10 });
+		}
+		public static string NormalizeCrlf(string str, byte[] crlfData)
+		{
+			byte[] srcData = Str.Utf8Encoding.GetBytes(str);
+			byte[] destData = NormalizeCrlf(srcData, crlfData);
+			return Str.Utf8Encoding.GetString(destData);
+		}
+		public static byte[] NormalizeCrlf(byte[] srcData)
+		{
+			return NormalizeCrlf(srcData, new byte[] { 13, 10 });
+		}
+		public static byte[] NormalizeCrlf(byte[] srcData, byte[] crlfData)
+		{
+			Buf ret = new Buf();
+
+			int i;
+			Buf b = new Buf();
+			for (i = 0; i < srcData.Length; i++)
+			{
+				bool isNewLine = false;
+				if (srcData[i] == 13)
+				{
+					if (i < (srcData.Length - 1) && srcData[i + 1] == 10)
+					{
+						i++;
+					}
+					isNewLine = true;
+				}
+				else if (srcData[i] == 10)
+				{
+					isNewLine = true;
+				}
+
+				if (isNewLine)
+				{
+					ret.Write(b.ByteData);
+					ret.Write(crlfData);
+
+					b.Clear();
+				}
+				else
+				{
+					b.WriteByte(srcData[i]);
+				}
+			}
+			ret.Write(b.ByteData);
+
+			return ret.ByteData;
+		}
+
+		public static string[] UniqueToken(string[] t)
+		{
+			Dictionary<string, object> o = new Dictionary<string, object>();
+			List<string> ret = new List<string>();
+
+			foreach (string s in t)
+			{
+				string key = s.ToUpper();
+
+				if (o.ContainsKey(key) == false)
+				{
+					o.Add(key, new Object());
+
+					ret.Add(s);
+				}
+			}
+
+			return ret.ToArray();
+		}
+
+		public static string ToStr3(long v)
+		{
+			bool neg = false;
+
+			if (v < 0)
+			{
+				neg = true;
+				v = v * (long)-1;
+			}
+
+			string tmp, tmp2;
+			int i;
+
+			tmp = Str.LongToStr(v);
+
+			tmp2 = "";
+			for (i = tmp.Length - 1; i >= 0; i--)
+			{
+				tmp2 += tmp[i];
+			}
+
+			int len = tmp.Length;
+
+			tmp = "";
+			for (i = 0; i < len; i++)
+			{
+				if (i != 0 && (i % 3) == 0)
+				{
+					tmp += ",";
+				}
+
+				tmp += tmp2[i];
+			}
+
+			char[] array = tmp.ToCharArray();
+			Array.Reverse(array);
+
+			string str = new string(array);
+
+			if (neg)
+			{
+				str = "-" + str;
+			}
+
+			return str;
+		}
+
+		public static string[] ParseCmdLine(string str)
+		{
+			List<string> o;
+			int i, len, mode;
+			string tmp;
+			bool ignoreSpace = false;
+
+			o = new List<string>();
+			mode = 0;
+			len = str.Length;
+
+			tmp = "";
+
+			for (i = 0; i < len; i++)
+			{
+				char c = str[i];
+
+				switch (mode)
+				{
+					case 0:
+						if (c == ' ' || c == '\t')
+						{
+						}
+						else
+						{
+							if (c == '\"')
+							{
+								if ((i != (len - 1)) && str[i + 1] == '\"')
+								{
+									tmp += '\"';
+									i++;
+								}
+								else
+								{
+									ignoreSpace = true;
+								}
+							}
+							else
+							{
+								tmp += c;
+							}
+
+							mode = 1;
+						}
+						break;
+
+					case 1:
+						if (ignoreSpace == false && (c == ' ' || c == '\t'))
+						{
+							o.Add(tmp);
+							tmp = "";
+							mode = 0;
+						}
+						else
+						{
+							if (c == '\"')
+							{
+								if ((i != (len - 1)) && str[i + 1] == '\"')
+								{
+									tmp += '\"';
+									i++;
+								}
+								else
+								{
+									if (ignoreSpace == false)
+									{
+										ignoreSpace = true;
+									}
+									else
+									{
+										ignoreSpace = false;
+									}
+								}
+							}
+							else
+							{
+								tmp += c;
+							}
+						}
+						break;
+				}
+			}
+
+			if (tmp.Length != 0)
+			{
+				o.Add(tmp);
+				tmp = "";
+			}
+
+			return o.ToArray();
+		}
+
+		public static string ObjectToXMLSimple(object o)
+		{
+			return ObjectToXMLSimple(o, o.GetType());
+		}
+		public static string ObjectToXMLSimple(object o, Type t)
+		{
+			XmlSerializer xs = new XmlSerializer(t);
+
+			MemoryStream ms = new MemoryStream();
+			xs.Serialize(ms, o);
+
+			return Str.Utf8Encoding.GetString(ms.ToArray());
+		}
+
+		public static object XMLToObjectSimple(string str, Type t)
+		{
+			XmlSerializer xs = new XmlSerializer(t);
+
+			MemoryStream ms = new MemoryStream();
+			byte[] data = Str.Utf8Encoding.GetBytes(str);
+			ms.Write(data, 0, data.Length);
+			ms.Position = 0;
+
+			return xs.Deserialize(ms);
+		}
+
+		public static bool IsStrOkForXML(string str)
+		{
+			try
+			{
+				XmlCheckObjectInternal o = new XmlCheckObjectInternal();
+				o.Str = str;
+
+				string xmlstr = ObjectToXMLSimple(o);
+
+				XMLToObjectSimple(xmlstr, typeof(XmlCheckObjectInternal));
+
+				return true;
+			}
+			catch
+			{
+				return false;
+			}
+		}
+	}
+
+	public class XmlCheckObjectInternal
+	{
+		public string Str;
+	}
+
+	public class StrToken
+	{
+		string[] tokens;
+
+		public string[] Tokens
+		{
+			get { return tokens; }
+		}
+
+		public string this[uint index]
+		{
+			get { return tokens[index]; }
+		}
+
+		public uint NumTokens
+		{
+			get
+			{
+				return (uint)Tokens.Length;
+			}
+		}
+
+		const string defaultSplitStr = " ,\t\r\n";
+
+		public static string DefaultSplitStr
+		{
+			get { return defaultSplitStr; }
+		}
+
+		public StrToken(string[] tokens)
+		{
+			List<string> a = new List<string>();
+			foreach (string s in tokens)
+			{
+				a.Add(s);
+			}
+
+			this.tokens = a.ToArray();
+		}
+
+		public StrToken(string str)
+			: this(str, null)
+		{
+		}
+		public StrToken(string str, string splitStr)
+		{
+			if (splitStr == null)
+			{
+				splitStr = defaultSplitStr;
+			}
+			int i, len;
+			len = splitStr.Length;
+			char[] chars = new char[len];
+			for (i = 0; i < len; i++)
+			{
+				chars[i] = splitStr[i];
+			}
+			tokens = str.Split(chars, StringSplitOptions.RemoveEmptyEntries);
+		}
+	}
+
+	public class StrData
+	{
+		string strValue;
+
+		public string StrValue
+		{
+			get { return strValue; }
+		}
+
+		public uint IntValue
+		{
+			get
+			{
+				return Str.StrToUInt(strValue);
+			}
+		}
+
+		public ulong Int64Value
+		{
+			get
+			{
+				return Str.StrToULong(strValue);
+			}
+		}
+
+		public bool BoolValue
+		{
+			get
+			{
+				string s = strValue.Trim();
+
+				if (Str.IsEmptyStr(s))
+				{
+					return false;
+				}
+				if (s.StartsWith("true", StringComparison.CurrentCultureIgnoreCase))
+				{
+					return true;
+				}
+				if ("true".StartsWith(s, StringComparison.CurrentCultureIgnoreCase))
+				{
+					return true;
+				}
+				if (s.StartsWith("yes", StringComparison.CurrentCultureIgnoreCase))
+				{
+					return true;
+				}
+				if ("yes".StartsWith(s, StringComparison.CurrentCultureIgnoreCase))
+				{
+					return true;
+				}
+
+				if (Str.StrToUInt(s) != 0)
+				{
+					return true;
+				}
+
+				return false;
+			}
+		}
+
+		public StrData(string str)
+		{
+			if (str == null)
+			{
+				str = "";
+			}
+			strValue = str;
+		}
+	}
+}
+
+// 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/

+ 430 - 0
src/BuildUtil/CoreUtil/Tar.cs

@@ -0,0 +1,430 @@
+// CoreUtil
+// 
+// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved.
+// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved.
+// Comments: Tetsuo Sugiyama, Ph.D.
+// 
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// version 2 as published by the Free Software Foundation.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License version 2
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// 
+// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE
+// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE.
+// 
+// 
+// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN,
+// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY,
+// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS
+// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS
+// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER
+// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL
+// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING,
+// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR
+// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
+// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO
+// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO,
+// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION
+// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN
+// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE.
+// 
+// USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS
+// SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
+// PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
+// COUNTRIES MIGHT BE RESTRICTED.
+// 
+// 
+// DEAR SECURITY EXPERTS
+// ---------------------
+// 
+// If you find a bug or a security vulnerability please kindly inform us
+// about the problem immediately so that we can fix the security problem
+// to protect a lot of users around the world as soon as possible.
+// 
+// Our e-mail address for security reports is:
+// softether-vpn-security [at] softether.org
+// 
+// Please note that the above e-mail address is not a technical support
+// inquiry address. If you need technical assistance, please visit
+// http://www.softether.org/ and ask your question on the users forum.
+// 
+// Thank you for your cooperation.
+
+
+using System;
+using System.Threading;
+using System.Data;
+using System.Data.Sql;
+using System.Data.SqlClient;
+using System.Data.SqlTypes;
+using System.Text;
+using System.Configuration;
+using System.Collections;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using System.IO;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Drawing.Drawing2D;
+using System.Runtime.InteropServices;
+
+namespace CoreUtil
+{
+	[StructLayout(LayoutKind.Sequential, Pack = 1)]
+	public struct TarHeader
+	{
+		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 100)]
+		public byte[] Name;
+
+		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
+		public byte[] Mode;
+
+		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
+		public byte[] UID;
+
+		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
+		public byte[] GID;
+
+		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)]
+		public byte[] Size;
+
+		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)]
+		public byte[] MTime;
+
+		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
+		public byte[] CheckSum;
+
+		public byte TypeFlag;
+
+		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 100)]
+		public byte[] LinkName;
+
+		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
+		public byte[] Magic;
+
+		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
+		public byte[] Version;
+
+		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
+		public byte[] UName;
+
+		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
+		public byte[] GName;
+
+		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
+		public byte[] DevMajor;
+
+		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
+		public byte[] DevMinor;
+
+		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 155)]
+		public byte[] Prefix;
+
+		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)]
+		public byte[] Padding;
+
+		public TarHeader(bool dummy)
+		{
+			this.Name = new byte[100];
+			this.Mode = new byte[8];
+			this.UID = new byte[8];
+			this.GID = new byte[8];
+			this.Size = new byte[12];
+			this.MTime = new byte[12];
+			this.CheckSum = new byte[8];
+			this.LinkName = new byte[100];
+			this.Magic = new byte[6];
+			this.Version = new byte[2];
+			this.UName = new byte[32];
+			this.GName = new byte[32];
+			this.DevMajor = new byte[8];
+			this.DevMinor = new byte[8];
+			this.Prefix = new byte[155];
+			this.Padding = new byte[12];
+			this.TypeFlag = 0;
+
+			this.Version[0] = 0x20;
+			this.Version[1] = 0x00;
+
+			byte[] data = Str.ShiftJisEncoding.GetBytes("ustar ");
+			Util.CopyByte(this.Magic, 0, data, 0, 6);
+		}
+
+		public void SetName(string name, Encoding encoding)
+		{
+			byte[] data = encoding.GetBytes(name);
+			if (data.Length <= 100)
+			{
+				Util.CopyByte(this.Name, 0, data, 0, data.Length);
+			}
+			else
+			{
+				Util.CopyByte(this.Name, 0, data, 0, 100);
+				Util.CopyByte(this.Prefix, 0, data, 100, data.Length - 100);
+			}
+		}
+
+		public void SetMode(string str)
+		{
+			StrToByteArray(this.Mode, str);
+		}
+
+		public void SetUID(string str)
+		{
+			StrToByteArray(this.UID, str);
+		}
+
+		public void SetGID(string str)
+		{
+			StrToByteArray(this.GID, str);
+		}
+
+		public void SetSize(long size)
+		{
+			if (size >= 0x1FFFFFFFF || size < 0)
+			{
+				throw new InvalidDataException("size");
+			}
+			StrToByteArray(this.Size, Str.AppendZeroToNumString(Convert.ToString(size, 8), 11));
+		}
+
+		public void SetMTime(DateTime dt)
+		{
+			uint t = Util.DateTimeToUnixTime(dt.ToUniversalTime());
+
+			StrToByteArray(this.MTime, Str.AppendZeroToNumString(Convert.ToString(t, 8), 11));
+		}
+
+		public void CalcChecksum()
+		{
+			TarHeader h2 = this;
+			Array.Clear(h2.CheckSum, 0, h2.CheckSum.Length);
+			byte[] data = Util.StructToByte(h2);
+			SetChecksum(data);
+		}
+
+		public void SetChecksum(byte[] data)
+		{
+			ulong sum = 0;
+			int i;
+			for (i = 0; i < data.Length; i++)
+			{
+				sum += (ulong)data[i];
+			}
+
+			sum += 0x100;
+
+			StrToByteArray(this.CheckSum, Str.AppendZeroToNumString(Convert.ToString((long)sum, 8), 6));
+			this.CheckSum[7] = 0x20;
+		}
+
+		public void SetTypeFlag(int flag)
+		{
+			this.TypeFlag = (byte)flag.ToString()[0];
+		}
+
+		public void SetUName(string str)
+		{
+			StrToByteArray(this.UName, str);
+		}
+
+		public void SetGName(string str)
+		{
+			StrToByteArray(this.GName, str);
+		}
+
+		public static void StrToByteArray(byte[] dst, string str)
+		{
+			Encoding e = Str.ShiftJisEncoding;
+
+			byte[] d = e.GetBytes(str);
+
+			Array.Clear(dst, 0, dst.Length);
+			Util.CopyByte(dst, 0, d, 0, Math.Min(d.Length, dst.Length - 1));
+		}
+	}
+
+	public static class TarUtil
+	{
+        public static TarHeader CreateTarHeader(string name, Encoding encoding, int type, long size, DateTime dt)
+        {
+            return CreateTarHeader(name, encoding, type, size, dt, "0000777");
+        }
+
+		public static TarHeader CreateTarHeader(string name, Encoding encoding, int type, long size, DateTime dt, string mode)
+		{
+			TarHeader h = new TarHeader(false);
+
+			h.SetName(name, encoding);
+
+			h.SetMode(mode);
+			h.SetMTime(dt);
+			h.SetName(name, encoding);
+			h.SetSize(size);
+			h.SetTypeFlag(type);
+			h.SetGID("0000000");
+			h.SetUID("0000000");
+
+			h.CalcChecksum();
+
+			return h;
+		}
+	}
+
+	public class TarPacker
+	{
+		Fifo fifo;
+		Dictionary<string, int> dirList;
+		Encoding encoding;
+
+		public TarPacker()
+			: this(Str.ShiftJisEncoding)
+		{
+		}
+		public TarPacker(Encoding encoding)
+		{
+			fifo = new Fifo();
+			dirList = new Dictionary<string, int>(new StrEqualityComparer(true));
+			this.encoding = encoding;
+		}
+
+        public void AddDirectory(string name, DateTime dt, string mode)
+        {
+            name = name.Replace('\\', '/');
+            if (name.EndsWith("/") == false)
+            {
+                name = name + "/";
+            }
+
+            if (dirList.ContainsKey(name) == false)
+            {
+                TarHeader h = TarUtil.CreateTarHeader(name, encoding, 5, 0, dt, mode);
+                fifo.Write(Util.StructToByte(h));
+
+                dirList.Add(name, 0);
+            }
+        }
+
+		public void AddDirectory(string name, DateTime dt)
+		{
+            AddDirectory(name, dt, "0000777");
+		}
+
+		long currentFileSize = 0;
+		long currentPos = 0;
+
+        public void AddFileSimple(string name, byte[] data, int pos, int len, DateTime dt)
+        {
+            AddFileSimple(name, data, pos, len, dt, "0000777", "0000777");
+        }
+
+		public void AddFileSimple(string name, byte[] data, int pos, int len, DateTime dt, string directory_mode, string mode)
+		{
+			AddFileStart(name, len, dt, directory_mode, mode);
+			AddFileData(data, pos, len);
+		}
+
+        public void AddFileStart(string name, long size, DateTime dt)
+        {
+            AddFileStart(name, size, dt, "0000777", "0000777");
+        }
+
+		public void AddFileStart(string name, long size, DateTime dt, string directory_mode, string mode)
+		{
+			if (currentFileSize != 0 || currentPos != 0)
+			{
+				throw new ApplicationException("last file not completed.");
+			}
+
+			name = name.Replace('\\', '/');
+			if (Str.InStr(name, "/", true))
+			{
+                AddDirectory(Path.GetDirectoryName(name), dt, directory_mode);
+			}
+
+			TarHeader h = TarUtil.CreateTarHeader(name, encoding, 0, size, dt, mode);
+			fifo.Write(Util.StructToByte(h));
+
+			currentFileSize = size;
+			currentPos = 0;
+		}
+
+		public void AddFileData(byte[] data, int pos, int len)
+		{
+			long totalSize = currentPos + len;
+
+			if (totalSize > currentFileSize)
+			{
+				throw new ApplicationException("totalSize > currentFileSize");
+			}
+
+			fifo.Write(data, pos, len);
+
+			currentPos += len;
+			if (currentPos >= currentFileSize)
+			{
+				long padding = ((currentFileSize + 511) / 512) * 512 - currentFileSize;
+
+				byte[] pad = new byte[padding];
+				Array.Clear(pad, 0, pad.Length);
+				fifo.Write(pad, 0, pad.Length);
+
+				currentFileSize = 0;
+				currentPos = 0;
+			}
+		}
+
+		public Fifo GeneratedData
+		{
+			get
+			{
+				return this.fifo;
+			}
+		}
+
+		public void Finish()
+		{
+			byte[] data = new byte[1024];
+			Array.Clear(data, 0, data.Length);
+
+			fifo.Write(data);
+		}
+
+		public byte[] CompressToGZip()
+		{
+			GZipPacker g = new GZipPacker();
+			byte[] data = this.fifo.Read();
+
+			g.Write(data, 0, data.Length, true);
+
+			return g.GeneratedData.Read();
+		}
+	}
+}
+
+// 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/

+ 542 - 0
src/BuildUtil/CoreUtil/Thread.cs

@@ -0,0 +1,542 @@
+// CoreUtil
+// 
+// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved.
+// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved.
+// Comments: Tetsuo Sugiyama, Ph.D.
+// 
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// version 2 as published by the Free Software Foundation.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License version 2
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// 
+// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE
+// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE.
+// 
+// 
+// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN,
+// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY,
+// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS
+// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS
+// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER
+// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL
+// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING,
+// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR
+// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
+// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO
+// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO,
+// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION
+// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN
+// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE.
+// 
+// USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS
+// SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
+// PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
+// COUNTRIES MIGHT BE RESTRICTED.
+// 
+// 
+// DEAR SECURITY EXPERTS
+// ---------------------
+// 
+// If you find a bug or a security vulnerability please kindly inform us
+// about the problem immediately so that we can fix the security problem
+// to protect a lot of users around the world as soon as possible.
+// 
+// Our e-mail address for security reports is:
+// softether-vpn-security [at] softether.org
+// 
+// Please note that the above e-mail address is not a technical support
+// inquiry address. If you need technical assistance, please visit
+// http://www.softether.org/ and ask your question on the users forum.
+// 
+// Thank you for your cooperation.
+
+
+using System;
+using System.Threading;
+using System.Data;
+using System.Data.Sql;
+using System.Data.SqlClient;
+using System.Data.SqlTypes;
+using System.Text;
+using System.Configuration;
+using System.Collections;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using System.IO;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Drawing.Drawing2D;
+using System.Diagnostics;
+using System.Web.Mail;
+using System.Net;
+using System.Net.Sockets;
+using System.Net.NetworkInformation;
+using System.Net.Mail;
+using System.Net.Mime;
+using CoreUtil;
+
+#pragma warning disable 0618
+
+namespace CoreUtil
+{
+	class WorkerQueuePrivate
+	{
+		object lockObj = new object();
+
+		List<ThreadObj> thread_list;
+		ThreadProc thread_proc;
+		int num_worker_threads;
+		Queue<object> taskQueue = new Queue<object>();
+		Exception raised_exception = null;
+
+		void worker_thread(object param)
+		{
+			while (true)
+			{
+				object task = null;
+
+				lock (lockObj)
+				{
+					if (taskQueue.Count == 0)
+					{
+						return;
+					}
+					task = taskQueue.Dequeue();
+				}
+
+				try
+				{
+					this.thread_proc(task);
+				}
+				catch (Exception ex)
+				{
+					if (raised_exception == null)
+					{
+						raised_exception = ex;
+					}
+
+					Console.WriteLine(ex.Message);
+				}
+			}
+		}
+
+		public WorkerQueuePrivate(ThreadProc thread_proc, int num_worker_threads, object[] tasks)
+		{
+			thread_list = new List<ThreadObj>();
+			int i;
+
+			this.thread_proc = thread_proc;
+			this.num_worker_threads = num_worker_threads;
+
+			foreach (object task in tasks)
+			{
+				taskQueue.Enqueue(task);
+			}
+
+			raised_exception = null;
+
+			for (i = 0; i < num_worker_threads; i++)
+			{
+				ThreadObj t = new ThreadObj(worker_thread);
+
+				thread_list.Add(t);
+			}
+
+			foreach (ThreadObj t in thread_list)
+			{
+				t.WaitForEnd();
+			}
+
+			if (raised_exception != null)
+			{
+				throw raised_exception;
+			}
+		}
+	}
+
+	public static class Tick64
+	{
+		static object lock_obj = new object();
+		static uint last_value = 0;
+		static bool is_first = true;
+		static uint num_round = 0;
+
+		public static long Value
+		{
+			get
+			{
+				unchecked
+				{
+					lock (lock_obj)
+					{
+						uint current_value = (uint)(System.Environment.TickCount + 3864700935);
+
+						if (is_first)
+						{
+							last_value = current_value;
+							is_first = false;
+						}
+
+						if (last_value > current_value)
+						{
+							num_round++;
+						}
+
+						last_value = current_value;
+
+						ulong ret = 4294967296UL * (ulong)num_round + current_value;
+
+						return (long)ret;
+					}
+				}
+			}
+		}
+
+		public static uint ValueUInt32
+		{
+			get
+			{
+				unchecked
+				{
+					return (uint)((ulong)Value);
+				}
+			}
+		}
+	}
+
+	public class Event
+	{
+		EventWaitHandle h;
+		public const int Infinite = Timeout.Infinite;
+
+		public Event()
+		{
+			init(false);
+		}
+
+		public Event(bool manualReset)
+		{
+			init(manualReset);
+		}
+
+		void init(bool manualReset)
+		{
+			h = new EventWaitHandle(false, (manualReset ? EventResetMode.ManualReset : EventResetMode.AutoReset));
+		}
+
+		public void Set()
+		{
+			h.Set();
+		}
+
+		public bool Wait()
+		{
+			return Wait(Infinite);
+		}
+		public bool Wait(int millisecs)
+		{
+			return h.WaitOne(millisecs, false);
+		}
+
+		static EventWaitHandle[] toArray(Event[] events)
+		{
+			List<EventWaitHandle> list = new List<EventWaitHandle>();
+
+			foreach (Event e in events)
+			{
+				list.Add(e.h);
+			}
+
+			return list.ToArray();
+		}
+
+		public static bool WaitAll(Event[] events)
+		{
+			return WaitAll(events, Infinite);
+		}
+		public static bool WaitAll(Event[] events, int millisecs)
+		{
+			if (events.Length <= 64)
+			{
+				return waitAllInner(events, millisecs);
+			}
+			else
+			{
+				return waitAllMulti(events, millisecs);
+			}
+		}
+
+		static bool waitAllMulti(Event[] events, int millisecs)
+		{
+			int numBlocks = (events.Length + 63) / 64;
+			List<Event>[] list = new List<Event>[numBlocks];
+			int i;
+			for (i = 0; i < numBlocks; i++)
+			{
+				list[i] = new List<Event>();
+			}
+			for (i = 0; i < events.Length; i++)
+			{
+				list[i / 64].Add(events[i]);
+			}
+
+			double start = Time.NowDouble;
+			double giveup = start + (double)millisecs / 1000.0;
+			foreach (List<Event> o in list)
+			{
+				double now = Time.NowDouble;
+				if (now <= giveup || millisecs < 0)
+				{
+					int waitmsecs;
+					if (millisecs >= 0)
+					{
+						waitmsecs = (int)((giveup - now) * 1000.0);
+					}
+					else
+					{
+						waitmsecs = Timeout.Infinite;
+					}
+
+					bool ret = waitAllInner(o.ToArray(), waitmsecs);
+					if (ret == false)
+					{
+						return false;
+					}
+				}
+				else
+				{
+					return false;
+				}
+			}
+
+			return true;
+		}
+
+		static bool waitAllInner(Event[] events, int millisecs)
+		{
+			if (events.Length == 1)
+			{
+				return events[0].Wait(millisecs);
+			}
+			return EventWaitHandle.WaitAll(toArray(events), millisecs, false);
+		}
+
+		public static bool WaitAny(Event[] events)
+		{
+			return WaitAny(events, Infinite);
+		}
+		public static bool WaitAny(Event[] events, int millisecs)
+		{
+			if (events.Length == 1)
+			{
+				return events[0].Wait(millisecs);
+			}
+			return ((WaitHandle.WaitTimeout == EventWaitHandle.WaitAny(toArray(events), millisecs, false)) ? false : true);
+		}
+
+		public IntPtr Handle
+		{
+			get
+			{
+				return h.Handle;
+			}
+		}
+	}
+
+	public class ThreadData
+	{
+		static LocalDataStoreSlot slot = Thread.AllocateDataSlot();
+
+		public readonly SortedDictionary<string, object> DataList = new SortedDictionary<string, object>();
+
+		public static ThreadData CurrentThreadData
+		{
+			get
+			{
+				return GetCurrentThreadData();
+			}
+		}
+
+		public static ThreadData GetCurrentThreadData()
+		{
+			ThreadData t;
+
+			try
+			{
+				t = (ThreadData)Thread.GetData(slot);
+			}
+			catch
+			{
+				t = null;
+			}
+
+			if (t == null)
+			{
+				t = new ThreadData();
+
+				Thread.SetData(slot, t);
+			}
+
+			return t;
+		}
+	}
+
+	public delegate void ThreadProc(object userObject);
+
+	public class ThreadObj
+	{
+		static int defaultStackSize = 100000;
+
+		static LocalDataStoreSlot currentObjSlot = Thread.AllocateDataSlot();
+
+		public const int Infinite = Timeout.Infinite;
+
+		ThreadProc proc;
+		Thread thread;
+		EventWaitHandle waitInit;
+		EventWaitHandle waitEnd;
+		EventWaitHandle waitInitForUser;
+		public Thread Thread
+		{
+			get { return thread; }
+		}
+		object userObject;
+
+		public ThreadObj(ThreadProc threadProc)
+		{
+			init(threadProc, null, 0);
+		}
+
+		public ThreadObj(ThreadProc threadProc, int stacksize)
+		{
+			init(threadProc, null, stacksize);
+		}
+
+		public ThreadObj(ThreadProc threadProc, object userObject)
+		{
+			init(threadProc, userObject, 0);
+		}
+
+		public ThreadObj(ThreadProc threadProc, object userObject, int stacksize)
+		{
+			init(threadProc, userObject, stacksize);
+		}
+
+		void init(ThreadProc threadProc, object userObject, int stacksize)
+		{
+			if (stacksize == 0)
+			{
+				stacksize = defaultStackSize;
+			}
+
+			this.proc = threadProc;
+			this.userObject = userObject;
+			waitInit = new EventWaitHandle(false, EventResetMode.AutoReset);
+			waitEnd = new EventWaitHandle(false, EventResetMode.ManualReset);
+			waitInitForUser = new EventWaitHandle(false, EventResetMode.ManualReset);
+			this.thread = new Thread(new ParameterizedThreadStart(commonThreadProc), stacksize);
+			this.thread.Start(this);
+			waitInit.WaitOne();
+		}
+
+		public static int DefaultStackSize
+		{
+			get
+			{
+				return defaultStackSize;
+			}
+
+			set
+			{
+				defaultStackSize = value;
+			}
+		}
+
+		void commonThreadProc(object obj)
+		{
+			Thread.SetData(currentObjSlot, this);
+
+			waitInit.Set();
+
+			try
+			{
+				this.proc(this.userObject);
+			}
+			finally
+			{
+				waitEnd.Set();
+			}
+		}
+
+		public static ThreadObj GetCurrentThreadObj()
+		{
+			return (ThreadObj)Thread.GetData(currentObjSlot);
+		}
+
+		public static void NoticeInited()
+		{
+			GetCurrentThreadObj().waitInitForUser.Set();
+		}
+
+		public void WaitForInit()
+		{
+			waitInitForUser.WaitOne();
+		}
+
+		public void WaitForEnd(int timeout)
+		{
+			waitEnd.WaitOne(timeout, false);
+		}
+		public void WaitForEnd()
+		{
+			waitEnd.WaitOne();
+		}
+
+		public static void Sleep(int millisec)
+		{
+			if (millisec == 0x7fffffff)
+			{
+				millisec = ThreadObj.Infinite;
+			}
+
+			Thread.Sleep(millisec);
+		}
+
+		public static void Yield()
+		{
+			Thread.Sleep(0);
+		}
+
+		public static void ProcessWorkQueue(ThreadProc thread_proc, int num_worker_threads, object[] tasks)
+		{
+			WorkerQueuePrivate q = new WorkerQueuePrivate(thread_proc, num_worker_threads, tasks);
+		}
+	}
+}
+
+// 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/

+ 174 - 0
src/BuildUtil/CoreUtil/Time.cs

@@ -0,0 +1,174 @@
+// CoreUtil
+// 
+// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved.
+// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved.
+// Comments: Tetsuo Sugiyama, Ph.D.
+// 
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// version 2 as published by the Free Software Foundation.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License version 2
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// 
+// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE
+// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE.
+// 
+// 
+// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN,
+// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY,
+// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS
+// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS
+// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER
+// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL
+// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING,
+// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR
+// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
+// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO
+// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO,
+// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION
+// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN
+// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE.
+// 
+// USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS
+// SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
+// PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
+// COUNTRIES MIGHT BE RESTRICTED.
+// 
+// 
+// DEAR SECURITY EXPERTS
+// ---------------------
+// 
+// If you find a bug or a security vulnerability please kindly inform us
+// about the problem immediately so that we can fix the security problem
+// to protect a lot of users around the world as soon as possible.
+// 
+// Our e-mail address for security reports is:
+// softether-vpn-security [at] softether.org
+// 
+// Please note that the above e-mail address is not a technical support
+// inquiry address. If you need technical assistance, please visit
+// http://www.softether.org/ and ask your question on the users forum.
+// 
+// Thank you for your cooperation.
+
+
+using System;
+using System.Threading;
+using System.Data;
+using System.Data.Sql;
+using System.Data.SqlClient;
+using System.Data.SqlTypes;
+using System.Text;
+using System.Configuration;
+using System.Collections;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using System.IO;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Drawing.Drawing2D;
+using System.Diagnostics;
+using System.Web.Mail;
+
+namespace CoreUtil
+{
+	class TimeHelper
+	{
+		internal Stopwatch Sw;
+		internal long Freq;
+		internal DateTime FirstDateTime;
+
+		public TimeHelper()
+		{
+			FirstDateTime = DateTime.Now;
+			Sw = new Stopwatch();
+			Sw.Start();
+			Freq = Stopwatch.Frequency;
+		}
+
+		public DateTime GetDateTime()
+		{
+			return FirstDateTime + this.Sw.Elapsed;
+		}
+	}
+
+	public static class Time
+	{
+		static TimeHelper h = new TimeHelper();
+		static TimeSpan baseTimeSpan = new TimeSpan(0, 0, 1);
+
+		static public TimeSpan NowTimeSpan
+		{
+			get
+			{
+				return h.Sw.Elapsed.Add(baseTimeSpan);
+			}
+		}
+
+		static public long NowLong100Usecs
+		{
+			get
+			{
+				return NowTimeSpan.Ticks;
+			}
+		}
+
+		static public long NowLongMillisecs
+		{
+			get
+			{
+				return NowLong100Usecs / 10000;
+			}
+		}
+
+		static public long Tick64
+		{
+			get
+			{
+				return NowLongMillisecs;
+			}
+		}
+
+		static public double NowDouble
+		{
+			get
+			{
+				return (double)NowLong100Usecs / (double)10000000.0;
+			}
+		}
+
+		static public DateTime NowDateTime
+		{
+			get
+			{
+				return h.GetDateTime();
+			}
+		}
+	}
+}
+
+// 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/

+ 1034 - 0
src/BuildUtil/CoreUtil/Util.cs

@@ -0,0 +1,1034 @@
+// CoreUtil
+// 
+// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved.
+// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved.
+// Comments: Tetsuo Sugiyama, Ph.D.
+// 
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// version 2 as published by the Free Software Foundation.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License version 2
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// 
+// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE
+// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE.
+// 
+// 
+// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN,
+// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY,
+// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS
+// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS
+// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER
+// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL
+// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING,
+// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR
+// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
+// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO
+// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO,
+// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION
+// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN
+// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE.
+// 
+// USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS
+// SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
+// PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
+// COUNTRIES MIGHT BE RESTRICTED.
+// 
+// 
+// DEAR SECURITY EXPERTS
+// ---------------------
+// 
+// If you find a bug or a security vulnerability please kindly inform us
+// about the problem immediately so that we can fix the security problem
+// to protect a lot of users around the world as soon as possible.
+// 
+// Our e-mail address for security reports is:
+// softether-vpn-security [at] softether.org
+// 
+// Please note that the above e-mail address is not a technical support
+// inquiry address. If you need technical assistance, please visit
+// http://www.softether.org/ and ask your question on the users forum.
+// 
+// Thank you for your cooperation.
+
+
+using System;
+using System.Threading;
+using System.Data;
+using System.Data.Sql;
+using System.Data.SqlClient;
+using System.Data.SqlTypes;
+using System.Text;
+using System.Configuration;
+using System.Collections;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using System.IO;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Drawing.Drawing2D;
+using System.Web.Mail;
+using System.Xml;
+using System.Xml.Schema;
+using System.Xml.Serialization;
+using System.ComponentModel;
+using System.Runtime.InteropServices;
+
+namespace CoreUtil
+{
+	public enum CoreLanguage
+	{
+		Japanese = 0,
+		English = 1,
+	}
+
+	public class CoreLanguageClass
+	{
+		public readonly CoreLanguage Language;
+		public readonly int Id;
+		readonly string name;
+		public string Name
+		{
+			get
+			{
+				if (name == "ja")
+				{
+					if (CoreLanguageList.RegardsJapanAsJP)
+					{
+						return "jp";
+					}
+				}
+
+				return name;
+			}
+		}
+		public readonly string TitleInEnglish;
+		public readonly string TitleInNative;
+
+		public CoreLanguageClass(CoreLanguage lang, int id, string name,
+			string titleInEnglish, string titleInNative)
+		{
+			this.Language = lang;
+			this.Id = id;
+			this.name = name;
+			this.TitleInEnglish = titleInEnglish;
+			this.TitleInNative = titleInNative;
+		}
+
+		public static void SetCurrentThreadLanguageClass(CoreLanguageClass lang)
+		{
+			ThreadData.CurrentThreadData.DataList["current_thread_language"] = lang;
+		}
+
+		public static CoreLanguageClass CurrentThreadLanguageClass
+		{
+			get
+			{
+				return GetCurrentThreadLanguageClass();
+			}
+
+			set
+			{
+				SetCurrentThreadLanguageClass(value);
+			}
+		}
+
+		public static CoreLanguage CurrentThreadLanguage
+		{
+			get
+			{
+				return CurrentThreadLanguageClass.Language;
+			}
+		}
+
+		public static CoreLanguageClass GetCurrentThreadLanguageClass()
+		{
+			CoreLanguageClass lang = null;
+
+			try
+			{
+				lang = (CoreLanguageClass)ThreadData.CurrentThreadData.DataList["current_thread_language"];
+			}
+			catch
+			{
+			}
+
+			if (lang == null)
+			{
+				lang = CoreLanguageList.DefaultLanguage;
+
+				SetCurrentThreadLanguageClass(lang);
+			}
+
+			return lang;
+		}
+	}
+
+	public static class CoreLanguageList
+	{
+		public static readonly CoreLanguageClass DefaultLanguage;
+		public static readonly CoreLanguageClass Japanese;
+		public static readonly CoreLanguageClass English;
+		public static bool RegardsJapanAsJP = false;
+
+		public static readonly List<CoreLanguageClass> LanguageList = new List<CoreLanguageClass>();
+
+		static CoreLanguageList()
+		{
+			CoreLanguageList.LanguageList = new List<CoreLanguageClass>();
+
+			CoreLanguageList.Japanese = new CoreLanguageClass(CoreLanguage.Japanese,
+				0, "ja", "Japanese", "日本語");
+			CoreLanguageList.English = new CoreLanguageClass(CoreLanguage.English,
+				1, "en", "English", "English");
+
+			CoreLanguageList.DefaultLanguage = CoreLanguageList.Japanese;
+
+			CoreLanguageList.LanguageList.Add(CoreLanguageList.Japanese);
+			CoreLanguageList.LanguageList.Add(CoreLanguageList.English);
+		}
+
+		public static CoreLanguageClass GetLanguageClassByName(string name)
+		{
+			Str.NormalizeStringStandard(ref name);
+
+			foreach (CoreLanguageClass c in LanguageList)
+			{
+				if (Str.StrCmpi(c.Name, name))
+				{
+					return c;
+				}
+			}
+
+			return DefaultLanguage;
+		}
+
+		public static CoreLanguageClass GetLangugageClassByEnum(CoreLanguage lang)
+		{
+			foreach (CoreLanguageClass c in LanguageList)
+			{
+				if (c.Language == lang)
+				{
+					return c;
+				}
+			}
+
+			return DefaultLanguage;
+		}
+	}
+
+	public static class Util
+	{
+		public const int SizeOfInt32 = 4;
+		public const int SizeOfInt16 = 2;
+		public const int SizeOfInt64 = 8;
+		public const int SizeOfInt8 = 1;
+
+		public static byte[] ToByte(ushort i)
+		{
+			byte[] ret = BitConverter.GetBytes(i);
+			Endian(ret);
+			return ret;
+		}
+		public static byte[] ToByte(short i)
+		{
+			byte[] ret = BitConverter.GetBytes(i);
+			Endian(ret);
+			return ret;
+		}
+		public static byte[] ToByte(uint i)
+		{
+			byte[] ret = BitConverter.GetBytes(i);
+			Endian(ret);
+			return ret;
+		}
+		public static byte[] ToByte(int i)
+		{
+			byte[] ret = BitConverter.GetBytes(i);
+			Endian(ret);
+			return ret;
+		}
+		public static byte[] ToByte(ulong i)
+		{
+			byte[] ret = BitConverter.GetBytes(i);
+			Endian(ret);
+			return ret;
+		}
+		public static byte[] ToByte(long i)
+		{
+			byte[] ret = BitConverter.GetBytes(i);
+			Endian(ret);
+			return ret;
+		}
+		public static ushort ByteToUShort(byte[] b)
+		{
+			byte[] c = CloneByteArray(b);
+			Endian(c);
+			return BitConverter.ToUInt16(c, 0);
+		}
+		public static short ByteToShort(byte[] b)
+		{
+			byte[] c = CloneByteArray(b);
+			Endian(c);
+			return BitConverter.ToInt16(c, 0);
+		}
+		public static uint ByteToUInt(byte[] b)
+		{
+			byte[] c = CloneByteArray(b);
+			Endian(c);
+			return BitConverter.ToUInt32(c, 0);
+		}
+		public static int ByteToInt(byte[] b)
+		{
+			byte[] c = CloneByteArray(b);
+			Endian(c);
+			return BitConverter.ToInt32(c, 0);
+		}
+		public static ulong ByteToULong(byte[] b)
+		{
+			byte[] c = CloneByteArray(b);
+			Endian(c);
+			return BitConverter.ToUInt64(c, 0);
+		}
+		public static long ByteToLong(byte[] b)
+		{
+			byte[] c = CloneByteArray(b);
+			Endian(c);
+			return BitConverter.ToInt64(c, 0);
+		}
+
+		public static byte[] ReadAllFromStream(Stream st)
+		{
+			byte[] tmp = new byte[32 * 1024];
+			Buf b = new Buf();
+
+			while (true)
+			{
+				int r = st.Read(tmp, 0, tmp.Length);
+
+				if (r == 0)
+				{
+					break;
+				}
+
+				b.Write(tmp, 0, r);
+			}
+
+			return b.ByteData;
+		}
+
+		public static List<T> CloneList<T>(List<T> src)
+		{
+			List<T> ret = new List<T>();
+			foreach (T t in src)
+			{
+				ret.Add(t);
+			}
+			return ret;
+		}
+
+		public static byte[] ExtractByteArray(byte[] data, int pos, int len)
+		{
+			byte[] ret = new byte[len];
+
+			Util.CopyByte(ret, 0, data, pos, len);
+
+			return ret;
+		}
+
+		public static T[] CombineArray<T>(params T[][] arrays)
+		{
+			List<T> o = new List<T>();
+			foreach (T[] array in arrays)
+			{
+				foreach (T element in array)
+				{
+					o.Add(element);
+				}
+			}
+			return o.ToArray();
+		}
+
+		public static byte[] CombineByteArray(byte[] b1, byte[] b2)
+		{
+			Buf b = new Buf();
+
+			if (b1 != null)
+			{
+				b.Write(b1);
+			}
+
+			if (b2 != null)
+			{
+				b.Write(b2);
+			}
+
+			return b.ByteData;
+		}
+
+		public static byte[] RemoveStartByteArray(byte[] src, int numBytes)
+		{
+			if (numBytes == 0)
+			{
+				return src;
+			}
+			int num = src.Length - numBytes;
+			byte[] ret = new byte[num];
+			Util.CopyByte(ret, 0, src, numBytes, num);
+			return ret;
+		}
+
+		public static DateTime[] GetYearNendoList(DateTime startYear, DateTime endYear)
+		{
+			startYear = GetStartOfNendo(startYear);
+			endYear = GetEndOfNendo(endYear);
+
+			if (startYear > endYear)
+			{
+				throw new ArgumentException();
+			}
+
+			List<DateTime> ret = new List<DateTime>();
+
+			DateTime dt;
+			for (dt = startYear; dt <= endYear; dt = GetStartOfNendo(dt.AddYears(1)))
+			{
+				ret.Add(dt);
+			}
+
+			return ret.ToArray();
+		}
+
+		public static DateTime[] GetYearList(DateTime startYear, DateTime endYear)
+		{
+			startYear = GetStartOfYear(startYear);
+			endYear = GetEndOfYear(endYear);
+
+			if (startYear > endYear)
+			{
+				throw new ArgumentException();
+			}
+
+			List<DateTime> ret = new List<DateTime>();
+
+			DateTime dt;
+			for (dt = startYear; dt <= endYear; dt = GetStartOfYear(dt.AddYears(1)))
+			{
+				ret.Add(dt);
+			}
+
+			return ret.ToArray();
+		}
+
+		public static DateTime[] GetMonthList(DateTime startMonth, DateTime endMonth)
+		{
+			startMonth = GetStartOfMonth(startMonth);
+			endMonth = GetEndOfMonth(endMonth);
+
+			if (startMonth > endMonth)
+			{
+				throw new ArgumentException();
+			}
+
+			List<DateTime> ret = new List<DateTime>();
+
+			DateTime dt;
+			for (dt = startMonth; dt <= endMonth; dt = GetStartOfMonth(dt.AddMonths(1)))
+			{
+				ret.Add(dt);
+			}
+
+			return ret.ToArray();
+		}
+
+		public static int GetAge(DateTime birthDay, DateTime now)
+		{
+			birthDay = birthDay.Date;
+			now = now.Date;
+
+			DateTime dayBirthDay = new DateTime(2000, birthDay.Month, birthDay.Day);
+			DateTime dayNow = new DateTime(2000, now.Month, now.Day);
+
+			int ret = now.Year - birthDay.Year;
+
+			if (dayBirthDay > dayNow)
+			{
+				ret -= 1;
+			}
+
+			return Math.Max(ret, 0);
+		}
+
+		public static int GetNumOfDaysInMonth(DateTime dt)
+		{
+			DateTime dt1 = new DateTime(dt.Year, dt.Month, dt.Day);
+			DateTime dt2 = dt1.AddMonths(1);
+			TimeSpan span = dt2 - dt1;
+
+			return span.Days;
+		}
+
+		public static int GetNumMonthSpan(DateTime dt1, DateTime dt2, bool kiriage)
+		{
+			if (dt1 > dt2)
+			{
+				DateTime dtt = dt2;
+				dt2 = dt1;
+				dt1 = dtt;
+			}
+
+			int i;
+			DateTime dt = dt1;
+			for (i = 0; ; i++)
+			{
+				if (kiriage)
+				{
+					if (dt >= dt2)
+					{
+						return i;
+					}
+				}
+				else
+				{
+					if (dt >= dt2.AddMonths(1).AddTicks(-1))
+					{
+						return i;
+					}
+				}
+
+				dt = dt.AddMonths(1);
+			}
+		}
+
+		public static DateTime GetStartOfMonth(DateTime dt)
+		{
+			return new DateTime(dt.Year, dt.Month, 1);
+		}
+
+		public static DateTime GetEndOfMonth(DateTime dt)
+		{
+			return new DateTime(dt.Year, dt.Month, 1).AddMonths(1).AddSeconds(-1).Date;
+		}
+
+		public static DateTime GetStartOfYear(DateTime dt)
+		{
+			return new DateTime(dt.Year, 1, 1, 0, 0, 0);
+		}
+
+		public static DateTime GetEndOfYear(DateTime dt)
+		{
+			return GetStartOfYear(dt).AddYears(1).AddSeconds(-1).Date;
+		}
+
+		public static DateTime GetEndOfMonthForSettle(DateTime dt)
+		{
+			dt = new DateTime(dt.Year, dt.Month, 1).AddMonths(1).AddSeconds(-1).Date;
+			if (dt.Month == 4 && (new DateTime(dt.Year, 4, 29).DayOfWeek == DayOfWeek.Sunday))
+			{
+				dt = dt.AddDays(1);
+			}
+			while ((dt.DayOfWeek == DayOfWeek.Sunday || dt.DayOfWeek == DayOfWeek.Saturday) ||
+				(dt.Month == 12 && dt.Day >= 29) ||
+				(dt.Month == 1 && dt.Day <= 3))
+			{
+				dt = dt.AddDays(1);
+			}
+			return dt;
+		}
+
+		public static DateTime GetStartOfDay(DateTime dt)
+		{
+			return dt.Date;
+		}
+
+		public static DateTime GetEndOfDate(DateTime dt)
+		{
+			return GetStartOfDay(dt).AddDays(1).AddTicks(-1);
+		}
+
+		public static int GetNendo(DateTime dt)
+		{
+			if (dt.Month >= 4)
+			{
+				return dt.Year;
+			}
+			else
+			{
+				return dt.Year - 1;
+			}
+		}
+
+		public static DateTime GetStartOfNendo(DateTime dt)
+		{
+			return GetStartOfNendo(GetNendo(dt));
+		}
+		public static DateTime GetStartOfNendo(int nendo)
+		{
+			return new DateTime(nendo, 4, 1, 0, 0, 0).Date;
+		}
+
+		public static DateTime GetEndOfNendo(DateTime dt)
+		{
+			return GetEndOfNendo(GetNendo(dt));
+		}
+		public static DateTime GetEndOfNendo(int nendo)
+		{
+			return new DateTime(nendo + 1, 3, 31, 0, 0, 0).Date;
+		}
+
+		public static void Endian(byte[] b)
+		{
+			if (Env.IsLittleEndian)
+			{
+				Array.Reverse(b);
+			}
+		}
+		public static byte[] EndianRetByte(byte[] b)
+		{
+			b = Util.CloneByteArray(b);
+
+			Endian(b);
+
+			return b;
+		}
+		public static UInt16 Endian(UInt16 v)
+		{
+			return Util.ByteToUShort(Util.EndianRetByte(Util.ToByte(v)));
+		}
+		public static UInt32 Endian(UInt32 v)
+		{
+			return Util.ByteToUInt(Util.EndianRetByte(Util.ToByte(v)));
+		}
+		public static UInt64 Endian(UInt64 v)
+		{
+			return Util.ByteToULong(Util.EndianRetByte(Util.ToByte(v)));
+		}
+
+		public static string SafeDomainStr(string str)
+		{
+			string ret = str.Replace("(", "").Replace(")", "").Replace(" ", "").Replace("-", "").Replace("#", "")
+				.Replace("%", "").Replace("%", "").Replace("&", "").Replace(".", "");
+			if (ret == "")
+			{
+				ret = "host";
+			}
+
+			return ret;
+		}
+
+		public static byte[] CopyByte(byte[] src)
+		{
+			return (byte[])src.Clone();
+		}
+		public static byte[] CopyByte(byte[] src, int srcOffset)
+		{
+			return CopyByte(src, srcOffset, src.Length - srcOffset);
+		}
+		public static byte[] CopyByte(byte[] src, int srcOffset, int size)
+		{
+			byte[] ret = new byte[size];
+			CopyByte(ret, 0, src, srcOffset, size);
+			return ret;
+		}
+		public static void CopyByte(byte[] dst, byte[] src, int srcOffset, int size)
+		{
+			CopyByte(dst, 0, src, srcOffset, size);
+		}
+		public static void CopyByte(byte[] dst, int dstOffset, byte[] src)
+		{
+			CopyByte(dst, dstOffset, src, 0, src.Length);
+		}
+		public static void CopyByte(byte[] dst, int dstOffset, byte[] src, int srcOffset, int size)
+		{
+			Array.Copy(src, srcOffset, dst, dstOffset, size);
+		}
+
+		public static bool IsZero(byte[] data)
+		{
+			return IsZero(data, 0, data.Length);
+		}
+		public static bool IsZero(byte[] data, int offset, int size)
+		{
+			int i;
+			for (i = offset; i < offset + size; i++)
+			{
+				if (data[i] != 0)
+				{
+					return false;
+				}
+			}
+			return true;
+		}
+
+		public static bool CompareByte(byte[] b1, byte[] b2)
+		{
+			if (b1.Length != b2.Length)
+			{
+				return false;
+			}
+			int i, len;
+			len = b1.Length;
+			for (i = 0; i < len; i++)
+			{
+				if (b1[i] != b2[i])
+				{
+					return false;
+				}
+			}
+			return true;
+		}
+
+		public static int CompareByteRetInt(byte[] b1, byte[] b2)
+		{
+			int i;
+			for (i = 0; ; i++)
+			{
+				int a1 = -1, a2 = -1;
+				if (b1.Length < i)
+				{
+					a1 = (int)b1[i];
+				}
+				if (b2.Length < i)
+				{
+					a2 = (int)b2[i];
+				}
+
+				if (a1 > a2)
+				{
+					return 1;
+				}
+				else if (a1 < a2)
+				{
+					return -1;
+				}
+				if (a1 == -1 && a2 == -1)
+				{
+					return 0;
+				}
+			}
+		}
+
+		public static byte[] CloneByteArray(byte[] src)
+		{
+			byte[] ret = new byte[src.Length];
+
+			Util.CopyByte(ret, src, 0, src.Length);
+
+			return ret;
+		}
+
+		public static DateTime UnixTimeToDateTime(uint t)
+		{
+			return new DateTime(1970, 1, 1).AddSeconds(t);
+		}
+
+		public static uint DateTimeToUnixTime(DateTime dt)
+		{
+			TimeSpan ts = dt - new DateTime(1970, 1, 1);
+			if (ts.Ticks < 0)
+			{
+				throw new InvalidDataException("dt");
+			}
+
+			return (uint)ts.TotalSeconds;
+		}
+
+		public static DateTime ConvertDateTime(ulong time64)
+		{
+			if (time64 == 0)
+			{
+				return new DateTime(0);
+			}
+			return new DateTime(((long)time64 + 62135629200000) * 10000);
+		}
+
+		public static ulong ConvertDateTime(DateTime dt)
+		{
+			if (dt.Ticks == 0)
+			{
+				return 0;
+			}
+			return (ulong)dt.Ticks / 10000 - 62135629200000;
+		}
+
+		public static TimeSpan ConvertTimeSpan(ulong tick)
+		{
+			return new TimeSpan((long)tick * 10000);
+		}
+
+		public static ulong ConvertTimeSpan(TimeSpan span)
+		{
+			return (ulong)span.Ticks / 10000;
+		}
+
+		public static ushort DateTimeToDosDate(DateTime dt)
+		{
+			return (ushort)(
+				((uint)(dt.Year - 1980) << 9) |
+				((uint)dt.Month << 5) |
+				(uint)dt.Day);
+		}
+
+		public static ushort DateTimeToDosTime(DateTime dt)
+		{
+			return (ushort)(
+				((uint)dt.Hour << 11) |
+				((uint)dt.Minute << 5) |
+				((uint)dt.Second >> 1));
+		}
+
+		public static bool IsNullOrEmpty(object o)
+		{
+			if (o == null)
+			{
+				return true;
+			}
+
+			if (o is string)
+			{
+				string s = (string)o;
+
+				return Str.IsEmptyStr(s);
+			}
+
+			if (o is Array)
+			{
+				Array a = (Array)o;
+				if (a.Length == 0)
+				{
+					return true;
+				}
+			}
+
+			return false;
+		}
+
+		public static byte[] GetXmlSchemaFromType(Type type)
+		{
+			XmlSchemas sms = new XmlSchemas();
+			XmlSchemaExporter ex = new XmlSchemaExporter(sms);
+			XmlReflectionImporter im = new XmlReflectionImporter();
+			XmlTypeMapping map = im.ImportTypeMapping(type);
+			ex.ExportTypeMapping(map);
+			sms.Compile(null, false);
+
+			MemoryStream ms = new MemoryStream();
+			StreamWriter sw = new StreamWriter(ms);
+			foreach (System.Xml.Schema.XmlSchema sm in sms)
+			{
+				sm.Write(sw);
+			}
+			sw.Close();
+			ms.Flush();
+
+			byte[] data = ms.ToArray();
+			return data;
+		}
+		public static string GetXmlSchemaFromTypeString(Type type)
+		{
+			byte[] data = GetXmlSchemaFromType(type);
+
+			return Str.Utf8Encoding.GetString(data);
+		}
+
+		public static string ObjectToXmlString(object o)
+		{
+			byte[] data = ObjectToXml(o);
+
+			return Str.Utf8Encoding.GetString(data);
+		}
+		public static byte[] ObjectToXml(object o)
+		{
+			if (o == null)
+			{
+				return null;
+			}
+			Type t = o.GetType();
+
+			return ObjectToXml(o, t);
+		}
+		public static string ObjectToXmlString(object o, Type t)
+		{
+			byte[] data = ObjectToXml(o, t);
+
+			return Str.Utf8Encoding.GetString(data);
+		}
+		public static byte[] ObjectToXml(object o, Type t)
+		{
+			if (o == null)
+			{
+				return null;
+			}
+
+			MemoryStream ms = new MemoryStream();
+			XmlSerializer x = new XmlSerializer(t);
+
+			x.Serialize(ms, o);
+
+			return ms.ToArray();
+		}
+
+		public static object XmlToObject(string str, Type t)
+		{
+			if (Str.IsEmptyStr(str))
+			{
+				return null;
+			}
+
+			byte[] data = Str.Utf8Encoding.GetBytes(str);
+
+			return XmlToObject(data, t);
+		}
+		public static object XmlToObject(byte[] data, Type t)
+		{
+			if (data == null || data.Length == 0)
+			{
+				return null;
+			}
+
+			MemoryStream ms = new MemoryStream();
+			ms.Write(data, 0, data.Length);
+			ms.Position = 0;
+
+			XmlSerializer x = new XmlSerializer(t);
+
+			return x.Deserialize(ms);
+		}
+
+		public static void NoOP(object o)
+		{
+		}
+		public static void NoOP()
+		{
+		}
+
+		public static bool False
+		{
+			get
+			{
+				return false;
+			}
+		}
+
+		public static bool True
+		{
+			get
+			{
+				return true;
+			}
+		}
+
+		public static int Zero
+		{
+			get
+			{
+				return 0;
+			}
+		}
+
+		public static object ByteToStruct(byte[] src, Type type)
+		{
+			int size = src.Length;
+			if (size != SizeOfStruct(type))
+			{
+				throw new SystemException("size error");
+			}
+
+			IntPtr p = Marshal.AllocHGlobal(size);
+
+			try
+			{
+				Marshal.Copy(src, 0, p, size);
+
+				return Marshal.PtrToStructure(p, type);
+			}
+			finally
+			{
+				Marshal.FreeHGlobal(p);
+			}
+		}
+
+		public static byte[] StructToByte(object obj)
+		{
+			int size = SizeOfStruct(obj);
+			IntPtr p = Marshal.AllocHGlobal(size);
+			try
+			{
+				Marshal.StructureToPtr(obj, p, false);
+
+				byte[] ret = new byte[size];
+
+				Marshal.Copy(p, ret, 0, size);
+
+				return ret;
+			}
+			finally
+			{
+				Marshal.FreeHGlobal(p);
+			}
+		}
+
+		public static int SizeOfStruct(object obj)
+		{
+			return Marshal.SizeOf(obj);
+		}
+		public static int SizeOfStruct(Type type)
+		{
+			return Marshal.SizeOf(type);
+		}
+
+		public static XmlAndXsd GenerateXmlAndXsd(object obj)
+		{
+			XmlAndXsd ret = new XmlAndXsd();
+			Type type = obj.GetType();
+
+			ret.XsdFileName = Str.MakeSafeFileName(type.Name + ".xsd");
+			ret.XsdData = GetXmlSchemaFromType(type);
+
+			ret.XmlFileName = Str.MakeSafeFileName(type.Name + ".xml");
+			string str = Util.ObjectToXmlString(obj);
+			str = str.Replace(
+				"xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"",
+				"xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xsi:noNamespaceSchemaLocation=\""
+				+ ret.XsdFileName
+				+ "\"");
+			ret.XmlData = Str.Utf8Encoding.GetBytes(str);
+
+			return ret;
+		}
+	}
+
+	public class XmlAndXsd
+	{
+		public byte[] XmlData;
+		public byte[] XsdData;
+		public string XmlFileName;
+		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/

+ 303 - 0
src/BuildUtil/CoreUtil/Win32.cs

@@ -0,0 +1,303 @@
+// CoreUtil
+// 
+// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved.
+// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved.
+// Comments: Tetsuo Sugiyama, Ph.D.
+// 
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// version 2 as published by the Free Software Foundation.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License version 2
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// 
+// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE
+// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE.
+// 
+// 
+// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN,
+// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY,
+// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS
+// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS
+// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER
+// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL
+// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING,
+// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR
+// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
+// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO
+// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO,
+// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION
+// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN
+// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE.
+// 
+// USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS
+// SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
+// PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
+// COUNTRIES MIGHT BE RESTRICTED.
+// 
+// 
+// DEAR SECURITY EXPERTS
+// ---------------------
+// 
+// If you find a bug or a security vulnerability please kindly inform us
+// about the problem immediately so that we can fix the security problem
+// to protect a lot of users around the world as soon as possible.
+// 
+// Our e-mail address for security reports is:
+// softether-vpn-security [at] softether.org
+// 
+// Please note that the above e-mail address is not a technical support
+// inquiry address. If you need technical assistance, please visit
+// http://www.softether.org/ and ask your question on the users forum.
+// 
+// Thank you for your cooperation.
+
+
+using System;
+using System.Threading;
+using System.Data;
+using System.Data.Sql;
+using System.Data.SqlClient;
+using System.Data.SqlTypes;
+using System.Text;
+using System.Configuration;
+using System.Collections;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using System.IO;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Drawing.Drawing2D;
+using System.Web.Mail;
+using System.Reflection;
+using System.Runtime.InteropServices;
+using System.Xml.Serialization;
+using System.DirectoryServices;
+using CoreUtil;
+using CoreUtil.Internal;
+
+namespace CoreUtil
+{
+	public static class Win32
+	{
+		static Win32()
+		{
+		}
+
+		public static void CreateUser(string machineName, string userName, string password, string description)
+		{
+			Str.NormalizeString(ref userName);
+			Str.NormalizeString(ref password);
+			Str.NormalizeString(ref description);
+
+			using (DirectoryEntry sam = OpenSam(machineName))
+			{
+				using (DirectoryEntry newUser = sam.Children.Add(userName, "user"))
+				{
+					newUser.Invoke("SetPassword", new object[] { password });
+					newUser.Invoke("Put", new object[] { "Description", description });
+					newUser.CommitChanges();
+					Console.WriteLine(newUser.Path);
+				}
+			}
+
+			try
+			{
+				AddUserToGroup(machineName, userName, "Users");
+			}
+			catch
+			{
+			}
+		}
+
+		public static void ChangeUserPassword(string machineName, string userName, string oldPassword, string newPassword)
+		{
+			Str.NormalizeString(ref userName);
+			Str.NormalizeString(ref oldPassword);
+			Str.NormalizeString(ref newPassword);
+
+			using (DirectoryEntry sam = OpenSam(machineName))
+			{
+				using (DirectoryEntry user = sam.Children.Find(userName, "user"))
+				{
+					user.Invoke("ChangePassword", oldPassword, newPassword);
+				}
+			}
+		}
+
+		public static void SetUserPassword(string machineName, string userName, string password)
+		{
+			Str.NormalizeString(ref userName);
+			Str.NormalizeString(ref password);
+
+			using (DirectoryEntry sam = OpenSam(machineName))
+			{
+				using (DirectoryEntry user = sam.Children.Find(userName, "user"))
+				{
+					user.Invoke("SetPassword", password);
+				}
+			}
+		}
+
+		public static string[] GetMembersOfGroup(string machineName, string groupName)
+		{
+			List<string> ret = new List<string>();
+
+			Str.NormalizeString(ref groupName);
+
+			using (DirectoryEntry sam = OpenSam(machineName))
+			{
+				using (DirectoryEntry g = sam.Children.Find(groupName, "group"))
+				{
+					object members = g.Invoke("Members", null);
+
+					foreach (object member in (IEnumerable)members)
+					{
+						using (DirectoryEntry e = new DirectoryEntry(member))
+						{
+							ret.Add(e.Name);
+						}
+					}
+
+					return ret.ToArray();
+				}
+			}
+		}
+
+		public static bool IsUserMemberOfGroup(string machineName, string userName, string groupName)
+		{
+			Str.NormalizeString(ref userName);
+			Str.NormalizeString(ref groupName);
+
+			using (DirectoryEntry sam = OpenSam(machineName))
+			{
+				using (DirectoryEntry g = sam.Children.Find(groupName, "group"))
+				{
+					using (DirectoryEntry u = sam.Children.Find(userName, "user"))
+					{
+						return (bool)g.Invoke("IsMember", u.Path);
+					}
+				}
+			}
+		}
+
+		public static void DeleteUserFromGroup(string machineName, string userName, string groupName)
+		{
+			Str.NormalizeString(ref userName);
+			Str.NormalizeString(ref groupName);
+
+			using (DirectoryEntry sam = OpenSam(machineName))
+			{
+				using (DirectoryEntry g = sam.Children.Find(groupName, "group"))
+				{
+					using (DirectoryEntry u = sam.Children.Find(userName, "user"))
+					{
+						g.Invoke("Remove", u.Path);
+					}
+				}
+			}
+		}
+
+		public static void AddUserToGroup(string machineName, string userName, string groupName)
+		{
+			Str.NormalizeString(ref userName);
+			Str.NormalizeString(ref groupName);
+
+			using (DirectoryEntry sam = OpenSam(machineName))
+			{
+				using (DirectoryEntry g = sam.Children.Find(groupName, "group"))
+				{
+					using (DirectoryEntry u = sam.Children.Find(userName, "user"))
+					{
+						g.Invoke("Add", u.Path);
+					}
+				}
+			}
+		}
+
+		public static void DeleteUser(string machineName, string userName)
+		{
+			Str.NormalizeString(ref userName);
+
+			using (DirectoryEntry sam = OpenSam(machineName))
+			{
+				using (DirectoryEntry u = sam.Children.Find(userName, "user"))
+				{
+					sam.Children.Remove(u);
+				}
+			}
+		}
+
+		public static bool IsUserExists(string machineName, string userName)
+		{
+			Str.NormalizeString(ref userName);
+
+			using (DirectoryEntry sam = OpenSam(machineName))
+			{
+				try
+				{
+					using (DirectoryEntry user = sam.Children.Find(userName, "user"))
+					{
+						if (user == null)
+						{
+							return false;
+						}
+
+						return true;
+					}
+				}
+				catch (COMException ce)
+				{
+					if ((uint)ce.ErrorCode == 0x800708AD)
+					{
+						return false;
+					}
+					else
+					{
+						throw;
+					}
+				}
+			}
+		}
+
+		public static DirectoryEntry OpenSam()
+		{
+			return OpenSam(null);
+		}
+		public static DirectoryEntry OpenSam(string machineName)
+		{
+			if (Str.IsEmptyStr(machineName))
+			{
+				machineName = Env.MachineName;
+			}
+
+			return new DirectoryEntry(string.Format("WinNT://{0},computer",
+				machineName));
+		}
+	}
+}
+
+// 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/

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 3856 - 0
src/BuildUtil/CoreUtil/ZLib.cs


+ 482 - 0
src/BuildUtil/CoreUtil/Zip.cs

@@ -0,0 +1,482 @@
+// CoreUtil
+// 
+// Copyright (C) 2012-2014 Daiyuu Nobori. All Rights Reserved.
+// Copyright (C) 2012-2014 SoftEther VPN Project at University of Tsukuba. All Rights Reserved.
+// Comments: Tetsuo Sugiyama, Ph.D.
+// 
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// version 2 as published by the Free Software Foundation.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License version 2
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// 
+// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE
+// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE.
+// 
+// 
+// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN,
+// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY,
+// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS
+// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS
+// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER
+// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL
+// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING,
+// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR
+// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
+// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO
+// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO,
+// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION
+// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN
+// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE.
+// 
+// USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS
+// SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
+// PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
+// COUNTRIES MIGHT BE RESTRICTED.
+// 
+// 
+// DEAR SECURITY EXPERTS
+// ---------------------
+// 
+// If you find a bug or a security vulnerability please kindly inform us
+// about the problem immediately so that we can fix the security problem
+// to protect a lot of users around the world as soon as possible.
+// 
+// Our e-mail address for security reports is:
+// softether-vpn-security [at] softether.org
+// 
+// Please note that the above e-mail address is not a technical support
+// inquiry address. If you need technical assistance, please visit
+// http://www.softether.org/ and ask your question on the users forum.
+// 
+// Thank you for your cooperation.
+
+
+using System;
+using System.Threading;
+using System.Data;
+using System.Data.Sql;
+using System.Data.SqlClient;
+using System.Data.SqlTypes;
+using System.Text;
+using System.Configuration;
+using System.Collections;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using System.IO;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Drawing.Drawing2D;
+using System.Runtime.InteropServices;
+
+namespace CoreUtil
+{
+	[StructLayout(LayoutKind.Sequential, Pack = 1)]
+	public struct ZipDataHeader
+	{
+		public uint Signature;
+		public ushort NeedVer;
+		public ushort Option;
+		public ushort CompType;
+		public ushort FileTime;
+		public ushort FileDate;
+		public uint Crc32;
+		public uint CompSize;
+		public uint UncompSize;
+		public ushort FileNameLen;
+		public ushort ExtraLen;
+	}
+
+	[StructLayout(LayoutKind.Sequential, Pack = 1)]
+	public struct ZipDataFooter
+	{
+		public uint Signature;
+		public uint Crc32;
+		public uint CompSize;
+		public uint UncompSize;
+	}
+
+	[StructLayout(LayoutKind.Sequential, Pack = 1)]
+	public struct ZipDirHeader
+	{
+		public uint Signature;
+		public ushort MadeVer;
+		public ushort NeedVer;
+		public ushort Option;
+		public ushort CompType;
+		public ushort FileTime;
+		public ushort FileDate;
+		public uint Crc32;
+		public uint CompSize;
+		public uint UncompSize;
+		public ushort FileNameLen;
+		public ushort ExtraLen;
+		public ushort CommentLen;
+		public ushort DiskNum;
+		public ushort InAttr;
+		public uint OutAttr;
+		public uint HeaderPos;
+	}
+
+	[StructLayout(LayoutKind.Sequential, Pack = 1)]
+	public struct ZipEndHeader
+	{
+		public uint Signature;
+		public ushort DiskNum;
+		public ushort StartDiskNum;
+		public ushort DiskDirEntry;
+		public ushort DirEntry;
+		public uint DirSize;
+		public uint StartPos;
+		public ushort CommentLen;
+	}
+
+	public static class ZipUtil
+	{
+		static ZipUtil()
+		{
+			initCrc32();
+		}
+
+		static uint[] table;
+		const int crcTableSize = 256;
+
+		static void initCrc32()
+		{
+			table = new uint[crcTableSize];
+
+			uint poly = 0xEDB88320;
+			uint u, i, j;
+
+			for (i = 0; i < 256; i++)
+			{
+				u = i;
+
+				for (j = 0; j < 8; j++)
+				{
+					if ((u & 0x1) != 0)
+					{
+						u = (u >> 1) ^ poly;
+					}
+					else
+					{
+						u >>= 1;
+					}
+				}
+
+				table[i] = u;
+			}
+		}
+
+		public static uint Crc32(byte[] buf)
+		{
+			return Crc32(buf, 0, buf.Length);
+		}
+		public static uint Crc32(byte[] buf, int pos, int len)
+		{
+			return Crc32Finish(Crc32First(buf, pos, len));
+		}
+		public static uint Crc32First(byte[] buf, int pos, int len)
+		{
+			return Crc32Next(buf, pos, len, 0xffffffff);
+		}
+		public static uint Crc32Next(byte[] buf, int pos, int len, uint lastCrc32)
+		{
+			uint ret = lastCrc32;
+			for (uint i = 0; i < len; i++)
+			{
+				ret = (ret >> 8) ^ table[buf[pos + i] ^ (ret & 0xff)];
+			}
+			return ret;
+		}
+		public static uint Crc32Finish(uint lastCrc32)
+		{
+			return ~lastCrc32;
+		}
+	}
+
+	public class ZipPacker
+	{
+		public const uint Signature = 0x04034B50;
+		public const uint SignatureEnd = 0x06054B50;
+		public const ushort Version = 10;
+		public const ushort VersionWithCompress = 20;
+		public Encoding Encoding = Str.ShiftJisEncoding;
+
+		class File
+		{
+			public string Name;
+			public long Size;
+			public DateTime DateTime;
+			public FileAttributes Attributes;
+			public long CurrentSize;
+			public long CompressSize;
+			public uint Crc32;
+			public uint HeaderPos;
+			public Encoding Encoding;
+			public bool Compress;
+			public CoreUtil.Internal.ZStream ZStream;
+
+			public void WriteZipDataHeader(ref ZipDataHeader h, bool writeSizes)
+			{
+				h.Signature = Signature;
+				h.NeedVer = Version;
+				h.CompType = 0;
+				h.FileTime = Util.DateTimeToDosTime(this.DateTime);
+				h.FileDate = Util.DateTimeToDosDate(this.DateTime);
+				h.Option = 8;
+
+				if (writeSizes == false)
+				{
+					h.CompSize = h.UncompSize = 0;
+					h.Crc32 = 0;
+
+					if (this.Compress)
+					{
+						h.NeedVer = VersionWithCompress;
+						h.CompType = 8;
+					}
+				}
+				else
+				{
+					h.CompSize = h.UncompSize = (uint)this.Size;
+					if (this.Compress)
+					{
+						h.CompSize = (uint)this.CompressSize;
+                        h.CompType = 8;
+                    }
+					h.Crc32 = this.Crc32;
+				}
+
+				h.FileNameLen = (ushort)this.Encoding.GetByteCount(this.Name);
+				h.ExtraLen = 0;
+			}
+
+			public void WriteZipDataFooter(ref ZipDataFooter h)
+			{
+				h.Signature = 0x08074B50;
+
+				if (this.Compress == false)
+				{
+					h.CompSize = h.UncompSize = (uint)this.Size;
+				}
+				else
+				{
+					h.CompSize = (uint)this.CompressSize;
+					h.UncompSize = (uint)this.Size;
+				}
+				h.Crc32 = this.Crc32;
+			}
+		}
+
+		Fifo fifo;
+		List<File> fileList;
+
+		public Fifo GeneratedData
+		{
+			get
+			{
+				return this.fifo;
+			}
+		}
+
+		public ZipPacker()
+		{
+			fifo = new Fifo();
+			fileList = new List<File>();
+		}
+
+		File currentFile = null;
+
+		public void AddFileSimple(string name, DateTime dt, FileAttributes attribute, byte[] data)
+		{
+			AddFileSimple(name, dt, attribute, data, false);
+		}
+		public void AddFileSimple(string name, DateTime dt, FileAttributes attribute, byte[] data, bool compress)
+		{
+			AddFileStart(name, data.Length, dt, attribute, compress);
+			AddFileData(data, 0, data.Length);
+		}
+
+		public void AddFileStart(string name, long size, DateTime dt, FileAttributes attribute)
+		{
+			AddFileStart(name, size, dt, attribute, false);
+		}
+		public void AddFileStart(string name, long size, DateTime dt, FileAttributes attribute, bool compress)
+		{
+			if (currentFile != null)
+			{
+				throw new ApplicationException("currentFile != null");
+			}
+
+			name = name.Replace("/", "\\");
+
+			File f = new File();
+
+			f.Encoding = this.Encoding;
+			f.Name = name;
+			f.Size = size;
+			f.DateTime = dt;
+			f.Attributes = attribute;
+			f.Compress = compress;
+
+			this.fileList.Add(f);
+
+			ZipDataHeader h = new ZipDataHeader();
+			f.HeaderPos = (uint)fifo.TotalWriteSize;
+			f.WriteZipDataHeader(ref h, false);
+			fifo.Write(Util.StructToByte(h));
+			fifo.Write(this.Encoding.GetBytes(f.Name));
+			f.Crc32 = 0xffffffff;
+
+			if (compress)
+			{
+				f.ZStream = new CoreUtil.Internal.ZStream();
+				f.ZStream.deflateInit(-1, -15);
+			}
+
+			currentFile = f;
+		}
+
+		public long AddFileData(byte[] data, int pos, int len)
+		{
+			long totalSize = currentFile.CurrentSize + len;
+
+			if (totalSize > currentFile.Size)
+			{
+				throw new ApplicationException("totalSize > currentFile.Size");
+			}
+
+			if (currentFile.Compress == false)
+			{
+				fifo.Write(data, pos, len);
+			}
+			else
+			{
+				CoreUtil.Internal.ZStream zs = currentFile.ZStream;
+
+				byte[] srcData = Util.ExtractByteArray(data, pos, len);
+				byte[] dstData = new byte[srcData.Length * 2 + 100];
+
+				zs.next_in = srcData;
+				zs.avail_in = srcData.Length;
+				zs.next_in_index = 0;
+
+				zs.next_out = dstData;
+				zs.avail_out = dstData.Length;
+				zs.next_out_index = 0;
+
+				if (currentFile.Size == (currentFile.CurrentSize + len))
+				{
+					zs.deflate(CoreUtil.Internal.zlibConst.Z_FINISH);
+				}
+				else
+				{
+					zs.deflate(CoreUtil.Internal.zlibConst.Z_SYNC_FLUSH);
+				}
+
+				fifo.Write(dstData, 0, dstData.Length - zs.avail_out);
+
+				currentFile.CompressSize += dstData.Length - zs.avail_out;
+
+				Util.NoOP();
+			}
+
+			currentFile.CurrentSize += len;
+
+			currentFile.Crc32 = ZipUtil.Crc32Next(data, pos, len, currentFile.Crc32);
+
+			long ret = currentFile.Size - currentFile.CurrentSize;
+
+			if (ret == 0)
+			{
+				currentFile.Crc32 = ~currentFile.Crc32;
+				addFileFooter();
+
+				currentFile = null;
+			}
+
+			return ret;
+		}
+
+		void addFileFooter()
+		{
+			ZipDataFooter f = new ZipDataFooter();
+			currentFile.WriteZipDataFooter(ref f);
+			fifo.Write(Util.StructToByte(f));
+		}
+
+		public void Finish()
+		{
+			long posStart = fifo.TotalWriteSize;
+			foreach (File f in this.fileList)
+			{
+				ZipDirHeader d = new ZipDirHeader();
+				d.Signature = 0x02014B50;// ZipPacker.Signature;
+				d.MadeVer = Version;
+				ZipDataHeader dh = new ZipDataHeader();
+				f.WriteZipDataHeader(ref dh, true);
+				if (f.Compress)
+				{
+					dh.CompType = 8;
+					dh.CompSize = (uint)f.CompressSize;
+					dh.NeedVer = ZipPacker.VersionWithCompress;
+				}
+				d.NeedVer = dh.NeedVer;
+				d.Option = dh.Option;
+				d.CompType = dh.CompType;
+				d.FileTime = dh.FileTime;
+				d.FileDate = dh.FileDate;
+				d.Crc32 = dh.Crc32;
+				d.CompSize = dh.CompSize;
+				d.UncompSize = dh.UncompSize;
+				d.FileNameLen = dh.FileNameLen;
+				d.ExtraLen = dh.ExtraLen;
+				d.CommentLen = 0;
+				d.DiskNum = 0;
+				d.InAttr = 0;
+				d.OutAttr = (ushort)f.Attributes;
+				d.HeaderPos = f.HeaderPos;
+
+				fifo.Write(Util.StructToByte(d));
+				fifo.Write(this.Encoding.GetBytes(f.Name));
+			}
+			long posEnd = fifo.TotalWriteSize;
+
+			ZipEndHeader e = new ZipEndHeader();
+			e.Signature = ZipPacker.SignatureEnd;
+			e.DiskNum = e.StartDiskNum = 0;
+			e.DiskDirEntry = e.DirEntry = (ushort)this.fileList.Count;
+			e.DirSize = (uint)(posEnd - posStart);
+			e.StartPos = (uint)posStart;
+			e.CommentLen = 0;
+			fifo.Write(Util.StructToByte(e));
+		}
+	}
+}
+
+// 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/

+ 1049 - 0
src/BuildUtil/Properties/Resources.Designer.cs

@@ -0,0 +1,1049 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     このコードはツールによって生成されました。
+//     ランタイム バージョン:2.0.50727.5472
+//
+//     このファイルへの変更は、以下の状況下で不正な動作の原因になったり、
+//     コードが再生成されるときに損失したりします。
+// </auto-generated>
+//------------------------------------------------------------------------------
+// Comments: Tetsuo Sugiyama, Ph.D.
+// 
+// 
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// version 2 as published by the Free Software Foundation.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License version 2
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// 
+// THE LICENSE AGREEMENT IS ATTACHED ON THE SOURCE-CODE PACKAGE
+// AS "LICENSE.TXT" FILE. READ THE TEXT FILE IN ADVANCE TO USE THE SOFTWARE.
+// 
+// 
+// THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN,
+// UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY,
+// MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS
+// SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS
+// SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER
+// CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL
+// DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING,
+// MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR
+// SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
+// CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO
+// EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO,
+// JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION
+// AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN
+// THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE.
+// 
+// USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS
+// SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
+// PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
+// COUNTRIES MIGHT BE RESTRICTED.
+// 
+// 
+// DEAR SECURITY EXPERTS
+// ---------------------
+// 
+// If you find a bug or a security vulnerability please kindly inform us
+// about the problem immediately so that we can fix the security problem
+// to protect a lot of users around the world as soon as possible.
+// 
+// Our e-mail address for security reports is:
+// softether-vpn-security [at] softether.org
+// 
+// Please note that the above e-mail address is not a technical support
+// inquiry address. If you need technical assistance, please visit
+// http://www.softether.org/ and ask your question on the users forum.
+// 
+// Thank you for your cooperation.
+
+
+namespace BuildUtil.Properties {
+    using System;
+    
+    
+    /// <summary>
+    ///   ローカライズされた文字列などを検索するための、厳密に型指定されたリソース クラスです。
+    /// </summary>
+    // このクラスは StronglyTypedResourceBuilder クラスが ResGen
+    // または Visual Studio のようなツールを使用して自動生成されました。
+    // メンバを追加または削除するには、.ResX ファイルを編集して、/str オプションと共に
+    // ResGen を実行し直すか、または VS プロジェクトをビルドし直します。
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources() {
+        }
+        
+        /// <summary>
+        ///   このクラスで使用されているキャッシュされた ResourceManager インスタンスを返します。
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("BuildUtil.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   厳密に型指定されたこのリソース クラスを使用して、すべての検索リソースに対し、
+        ///   現在のスレッドの CurrentUICulture プロパティをオーバーライドします。
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+        
+        /// <summary>
+        ///   [j]追加[e]Add[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_BUTTON_ADD {
+            get {
+                return ResourceManager.GetString("CDF_BUTTON_ADD", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///     [j]キャンセル[e]Cancel[/]   に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_BUTTON_CANCEL {
+            get {
+                return ResourceManager.GetString("CDF_BUTTON_CANCEL", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///      [j]完  了[e]Complete[/]    に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_BUTTON_COMPLETE {
+            get {
+                return ResourceManager.GetString("CDF_BUTTON_COMPLETE", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]削除[e]Delete[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_BUTTON_DELETE {
+            get {
+                return ResourceManager.GetString("CDF_BUTTON_DELETE", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]編集[e]Edit[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_BUTTON_EDIT {
+            get {
+                return ResourceManager.GetString("CDF_BUTTON_EDIT", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///     [j]修正する[e]Modify[/]   に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_BUTTON_MODIFY {
+            get {
+                return ResourceManager.GetString("CDF_BUTTON_MODIFY", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///      O  K    に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_BUTTON_OK {
+            get {
+                return ResourceManager.GetString("CDF_BUTTON_OK", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///     [j]処理中[e]Wait[/]... に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_BUTTON_SENDING {
+            get {
+                return ResourceManager.GetString("CDF_BUTTON_SENDING", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///    [j]最近の候補[e]Recent Candidates[/]:  に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_CANDIDATES {
+            get {
+                return ResourceManager.GetString("CDF_CANDIDATES", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]日付が入力されていません。[e]Date field is empty.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_DATE_EMPTY {
+            get {
+                return ResourceManager.GetString("CDF_DATE_EMPTY", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]{0} 以前の日付を指定してください。[e]Please specify a date before {0}.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_DATE_MAX {
+            get {
+                return ResourceManager.GetString("CDF_DATE_MAX", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]{0} 以降の日付を指定してください。[e]Please specift a date since {0}.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_DATE_MIN {
+            get {
+                return ResourceManager.GetString("CDF_DATE_MIN", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]日付として認識できない文字列が入力されています。[e]Can&apos;t recognize as a valid date.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_DATE_NOTDATE {
+            get {
+                return ResourceManager.GetString("CDF_DATE_NOTDATE", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]全件表示 ({0} 件)[e]Total ({0} entities)[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_DL_ALL {
+            get {
+                return ResourceManager.GetString("CDF_DL_ALL", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]ダウンロード[e]Download[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_DOWNLOAD {
+            get {
+                return ResourceManager.GetString("CDF_DOWNLOAD", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]日時が入力されていません。[e]Date and Time are empty.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_DT_EMPTY {
+            get {
+                return ResourceManager.GetString("CDF_DT_EMPTY", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]{0} 以前の日時を指定してください。[e]Please specify a date and a time before {0}.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_DT_MAX {
+            get {
+                return ResourceManager.GetString("CDF_DT_MAX", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]{0} 以降の日時を指定してください。[e]Please specify a date and a time since {0}.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_DT_MIN {
+            get {
+                return ResourceManager.GetString("CDF_DT_MIN", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]日時として認識できない文字列が入力されています。[e]Can&apos;t recognize as a valid date and a time.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_DT_NOTDT {
+            get {
+                return ResourceManager.GetString("CDF_DT_NOTDT", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]記入例[e]Example[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_EXAMPLE {
+            get {
+                return ResourceManager.GetString("CDF_EXAMPLE", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]MS ゴシック[e]MS Gothic[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_GOTHIC {
+            get {
+                return ResourceManager.GetString("CDF_GOTHIC", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]データ構造のフィールド数が 1 でありません。[e]The number of fields of data structures is not one.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_GRID_ERROR_1 {
+            get {
+                return ResourceManager.GetString("CDF_GRID_ERROR_1", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]データ構造がリストでありません。[e]The data structure is not a list.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_GRID_ERROR_2 {
+            get {
+                return ResourceManager.GetString("CDF_GRID_ERROR_2", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]数値は {0} 以下を指定してください。[e]The value must be {0} or less.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_INT_MAX {
+            get {
+                return ResourceManager.GetString("CDF_INT_MAX", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]数値は {0} 以上を指定してください。[e]The value must be {0} or more.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_INT_MIN {
+            get {
+                return ResourceManager.GetString("CDF_INT_MIN", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]整数以外の文字が入力されています。[e]The value can&apos;t be recognized as an integer.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_INT_NOT_NUMBER_CHAR {
+            get {
+                return ResourceManager.GetString("CDF_INT_NOT_NUMBER_CHAR", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]数値が正しく入力されていません。[e]The value can&apos;t be recognized as a formal figure.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_INT_NOTINTEGER {
+            get {
+                return ResourceManager.GetString("CDF_INT_NOTINTEGER", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]データ &quot;{0}&quot; はこのリストでは不正です。[e]The data &quot;{0}&quot; is invalid at this list.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_INVALID {
+            get {
+                return ResourceManager.GetString("CDF_INVALID", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]メールアドレスが不正です。[e]The mail address is invalid.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_INVALID_EMAIL {
+            get {
+                return ResourceManager.GetString("CDF_INVALID_EMAIL", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]【 {0} 個目の項目 (合計 {1} 個中) - {2} 】[e]Item of piece {0} (Total: {1} entities) - {2}[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_LIST_FORMAT {
+            get {
+                return ResourceManager.GetString("CDF_LIST_FORMAT", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   CdfClass 属性が正しく指定されていないクラス %s が指定されました。 に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_NO_CDFCLASS {
+            get {
+                return ResourceManager.GetString("CDF_NO_CDFCLASS", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   %s 項目に %s 属性が 1 つ指定されていません。 に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_NO_SINGLE_ATT {
+            get {
+                return ResourceManager.GetString("CDF_NO_SINGLE_ATT", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   %s 項目のジェネリック型が 1 つ指定されていません。 に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_NO_SINGLE_GENERIC_TYPE {
+            get {
+                return ResourceManager.GetString("CDF_NO_SINGLE_GENERIC_TYPE", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]項目なし[e]No Entities[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_NOITEM {
+            get {
+                return ResourceManager.GetString("CDF_NOITEM", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]項目が選択されていません。[e]You have to select an entity.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_NOT_SELECTED {
+            get {
+                return ResourceManager.GetString("CDF_NOT_SELECTED", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]正しく選択されていません。[e]You have to select correctly.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_NOT_SELECTED_2 {
+            get {
+                return ResourceManager.GetString("CDF_NOT_SELECTED_2", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]ページ {0}[e]Page {0}[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_PAGING_FORMAT_1 {
+            get {
+                return ResourceManager.GetString("CDF_PAGING_FORMAT_1", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]最新 {0} 件[e]Latest: {0} entities[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_PAGING_FORMAT_2 {
+            get {
+                return ResourceManager.GetString("CDF_PAGING_FORMAT_2", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j] ({2}: {0} ~ {1})[e] ({2}: {0} - {1})[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_PAGING_HELPSTR_FORMAT {
+            get {
+                return ResourceManager.GetString("CDF_PAGING_HELPSTR_FORMAT", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]▼選択してください▼[e]- Please Select Here -[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_PLEASE_SELECT {
+            get {
+                return ResourceManager.GetString("CDF_PLEASE_SELECT", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]削除[e]Delete[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_REMOVE {
+            get {
+                return ResourceManager.GetString("CDF_REMOVE", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]この項目を削除します。よろしいですか?[e]Do you want to delete this entity?[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_REMOVEMSG {
+            get {
+                return ResourceManager.GetString("CDF_REMOVEMSG", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]項目が 1 件も見つかりませんでした。[e]No entity is found.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_ROW_EMPTY {
+            get {
+                return ResourceManager.GetString("CDF_ROW_EMPTY", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]▽選択可能[e]- Selectable -[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_SELECTABLE {
+            get {
+                return ResourceManager.GetString("CDF_SELECTABLE", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]▲「{0}」でソート[e]Sort by &quot;{0}&quot; Ascending[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_SORT_1 {
+            get {
+                return ResourceManager.GetString("CDF_SORT_1", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]▼「{0}」で逆ソート[e]Sort by &quot;{0}&quot; Descending[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_SORT_2 {
+            get {
+                return ResourceManager.GetString("CDF_SORT_2", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]▲標準のソート[e]Standard Ascending Sort[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_SORT_DEF1 {
+            get {
+                return ResourceManager.GetString("CDF_SORT_DEF1", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]▼標準の逆ソート[e]Standard Descending Sort[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_SORT_DEF2 {
+            get {
+                return ResourceManager.GetString("CDF_SORT_DEF2", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]使用できない文字が含まれています。[e]There are some invalid characters which can&apos;t be used.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_STRING_INVALIDCHAR {
+            get {
+                return ResourceManager.GetString("CDF_STRING_INVALIDCHAR", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]文字数は {0} 以下にする必要があります。[e]The number of characters must be {0} or less.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_STRING_MAX {
+            get {
+                return ResourceManager.GetString("CDF_STRING_MAX", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]文字を {0} 文字以上入力する必要があります。[e]The number of characters must be {0} or more.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_STRING_MIN {
+            get {
+                return ResourceManager.GetString("CDF_STRING_MIN", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]改行文字を含めることはできません。[e]There must not be any New-Line characters in the string.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_STRING_NOLINE {
+            get {
+                return ResourceManager.GetString("CDF_STRING_NOLINE", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]表示不可能な文字コードが含まれています。[e]There must not be any Non-Printable characters in the string.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_STRING_NONPRINTABLE {
+            get {
+                return ResourceManager.GetString("CDF_STRING_NONPRINTABLE", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]入力いただいた内容を確認のため表示しています。内容をよくご確認ください。&lt;BR&gt;この内容で確定する場合は [OK] ボタンを、修正する場合は [修正する] ボタンをクリックしてください。[e]Please confirm the printed data which you input. Please read it carefully.&lt;BR&gt;If you want to commit with this data, click the &quot;OK&quot; button. Otherwise, click the &quot;Modify&quot; button.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_TEXT_CONFIRM {
+            get {
+                return ResourceManager.GetString("CDF_TEXT_CONFIRM", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]エラーが発生しました。内容を見直してください。修正する場合は [修正する] ボタンをクリックしてください。[e]An error has been occurred. Please confirm the fields. To modify it, click the &quot;Modify&quot; button.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_TEXT_CONFIRM_ERROR {
+            get {
+                return ResourceManager.GetString("CDF_TEXT_CONFIRM_ERROR", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]入力が完了したら [OK] ボタンを、入力をキャンセルするには [キャンセル] ボタンをクリックしてください。[e]Please click the &quot;OK&quot; button after you complete filling all nessesary fields. To cancel inputting, click the &quot;Cancel&quot; button.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_TEXT_OK {
+            get {
+                return ResourceManager.GetString("CDF_TEXT_OK", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]時刻が入力されていません。[e]Time is empty.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_TIME_EMPTY {
+            get {
+                return ResourceManager.GetString("CDF_TIME_EMPTY", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]{0} 以前の時刻を指定してください。[e]Please specify a time before {0}.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_TIME_MAX {
+            get {
+                return ResourceManager.GetString("CDF_TIME_MAX", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]{0} 以降の時刻を指定してください。[e]Please specify a time after {0}.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_TIME_MIN {
+            get {
+                return ResourceManager.GetString("CDF_TIME_MIN", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]時刻として認識できない文字列が入力されています。[e]Can&apos;t recognize as a valid time.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_TIME_NOTTIME {
+            get {
+                return ResourceManager.GetString("CDF_TIME_NOTTIME", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [j]フィールド %s の型 %s がサポートされていません。[e]In the field &quot;%s&quot;, the type &quot;%s&quot; is not supported.[/] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CDF_UNSUPPORTED {
+            get {
+                return ResourceManager.GetString("CDF_UNSUPPORTED", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Item に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CMD_CT_STD_COLUMN_1 {
+            get {
+                return ResourceManager.GetString("CMD_CT_STD_COLUMN_1", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Value に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CMD_CT_STD_COLUMN_2 {
+            get {
+                return ResourceManager.GetString("CMD_CT_STD_COLUMN_2", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   The date and time specification is invalid. \nThe date and time must be in the same format as &quot;2005/10/08 19:30:00&quot; where 6 integers are specified, representing year/month/day hour:minute:second separated by forward slashes, a space and then colons. Specify 4 digits for the year. に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CMD_EVAL_DATE_TIME_FAILED {
+            get {
+                return ResourceManager.GetString("CMD_EVAL_DATE_TIME_FAILED", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   You must specify an integer that is not less than 1. に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CMD_EVAL_INT {
+            get {
+                return ResourceManager.GetString("CMD_EVAL_INT", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   You must specify an integer in the range from %u to %u for the value. に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CMD_EVAL_MIN_MAX {
+            get {
+                return ResourceManager.GetString("CMD_EVAL_MIN_MAX", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   You cannot make a blank specification. に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CMD_EVAL_NOT_EMPTY {
+            get {
+                return ResourceManager.GetString("CMD_EVAL_NOT_EMPTY", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Port number is invalid. Specify a port number that is within the range of 1 to 65535. に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CMD_EVAL_PORT {
+            get {
+                return ResourceManager.GetString("CMD_EVAL_PORT", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   The string contains unusable characters. に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CMD_EVAL_SAFE {
+            get {
+                return ResourceManager.GetString("CMD_EVAL_SAFE", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   %S command - %s に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CMD_EXEC_MSG_NAME {
+            get {
+                return ResourceManager.GetString("CMD_EXEC_MSG_NAME", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   The file name is not specified. に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CMD_FILE_NAME_EMPTY {
+            get {
+                return ResourceManager.GetString("CMD_FILE_NAME_EMPTY", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Cannot find specified file &quot;%s&quot;. に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CMD_FILE_NOT_FOUND {
+            get {
+                return ResourceManager.GetString("CMD_FILE_NOT_FOUND", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   You can use the following %u commands: に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CMD_HELP_1 {
+            get {
+                return ResourceManager.GetString("CMD_HELP_1", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   To reference the usage for each command, input &quot;command name /?&quot; to view a help. に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CMD_HELP_2 {
+            get {
+                return ResourceManager.GetString("CMD_HELP_2", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Parameters: に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CMD_HELP_ARGS {
+            get {
+                return ResourceManager.GetString("CMD_HELP_ARGS", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Purpose: に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CMD_HELP_DESCRIPTION {
+            get {
+                return ResourceManager.GetString("CMD_HELP_DESCRIPTION", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Description: に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CMD_HELP_HELP {
+            get {
+                return ResourceManager.GetString("CMD_HELP_HELP", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Help for command &quot;%S&quot; に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CMD_HELP_TITLE {
+            get {
+                return ResourceManager.GetString("CMD_HELP_TITLE", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Usage: に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CMD_HELP_USAGE {
+            get {
+                return ResourceManager.GetString("CMD_HELP_USAGE", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   &quot;IP アドレス/サブネットマスク&quot; の形式で指定してください。
+        ///IP アドレスは 192.168.0.1 のように 10 進数をドットで区切って指定します。サブネットマスクは 255.255.255.0 のように 10 進数をドットで区切って指定するか、24 のように先頭からのビット長を 10 進数で指定できます。
+        ///単一のホストを指定するには、サブネットマスクを 255.255.255.255 または 32 として指定します。
+        ///(例)
+        /// 192.168.0.1/24
+        /// 192.168.0.1/255.255.255.0
+        ///192.168.0.5/255.255.255.255
+        ///
+        /// に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CMD_PARSE_IP_SUBNET_ERROR_1 {
+            get {
+                return ResourceManager.GetString("CMD_PARSE_IP_SUBNET_ERROR_1", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   指定された IP アドレスはネットワークアドレスではありません。 に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CMD_PARSE_IP_SUBNET_ERROR_2 {
+            get {
+                return ResourceManager.GetString("CMD_PARSE_IP_SUBNET_ERROR_2", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Enter a value:  に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CMD_PROMPT {
+            get {
+                return ResourceManager.GetString("CMD_PROMPT", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Input the port number:  に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CMD_PROPMT_PORT {
+            get {
+                return ResourceManager.GetString("CMD_PROPMT_PORT", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   There is no description for this command. に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CMD_UNKNOWM {
+            get {
+                return ResourceManager.GetString("CMD_UNKNOWM", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   There is no command execution example. に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CMD_UNKNOWN_ARGS {
+            get {
+                return ResourceManager.GetString("CMD_UNKNOWN_ARGS", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   There is no detailed description for this command. If you would like to know more detail about this command, please refer to the manual or online documentation. に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CMD_UNKNOWN_HELP {
+            get {
+                return ResourceManager.GetString("CMD_UNKNOWN_HELP", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   There is no description for this parameter. に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CMD_UNKNOWN_PARAM {
+            get {
+                return ResourceManager.GetString("CMD_UNKNOWN_PARAM", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   &quot;%S&quot;: The command-name is ambiguous. に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CON_AMBIGIOUS_CMD {
+            get {
+                return ResourceManager.GetString("CON_AMBIGIOUS_CMD", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   The specified command name matches the following multiple commands. に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CON_AMBIGIOUS_CMD_1 {
+            get {
+                return ResourceManager.GetString("CON_AMBIGIOUS_CMD_1", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Please re-specify the command name more strictly. に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CON_AMBIGIOUS_CMD_2 {
+            get {
+                return ResourceManager.GetString("CON_AMBIGIOUS_CMD_2", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   &quot;%S&quot;: The parameter name is ambiguous. に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CON_AMBIGIOUS_PARAM {
+            get {
+                return ResourceManager.GetString("CON_AMBIGIOUS_PARAM", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   The specified parameter name matches with the following parameters that can be specified as a parameter of command &quot;%S&quot;. に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CON_AMBIGIOUS_PARAM_1 {
+            get {
+                return ResourceManager.GetString("CON_AMBIGIOUS_PARAM_1", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Please re-specify the parameter name more strictly. に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CON_AMBIGIOUS_PARAM_2 {
+            get {
+                return ResourceManager.GetString("CON_AMBIGIOUS_PARAM_2", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Error: Unable to open the specified input file &quot;%s&quot;. に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CON_INFILE_ERROR {
+            get {
+                return ResourceManager.GetString("CON_INFILE_ERROR", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   The commands written in the file &quot;%s&quot; will be used instead of input from keyboard. に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CON_INFILE_START {
+            get {
+                return ResourceManager.GetString("CON_INFILE_START", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   The parameter &quot;/%S&quot; has been specified. It is not possible to specify this parameter when using the command &quot;%S&quot;. Input &quot;%S /HELP&quot; to see the list of what parameters can be used. に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CON_INVALID_PARAM {
+            get {
+                return ResourceManager.GetString("CON_INVALID_PARAM", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Error: Unable to create the specified output file &quot;%s&quot;. に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CON_OUTFILE_ERROR {
+            get {
+                return ResourceManager.GetString("CON_OUTFILE_ERROR", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   The message output to the console will be saved in the file &quot;%s&quot;. に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CON_OUTFILE_START {
+            get {
+                return ResourceManager.GetString("CON_OUTFILE_START", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   &quot;%S&quot;: Command not found. You can use the HELP command to view a list of the available commands. に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CON_UNKNOWN_CMD {
+            get {
+                return ResourceManager.GetString("CON_UNKNOWN_CMD", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   [EOF] に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CON_USER_CANCEL {
+            get {
+                return ResourceManager.GetString("CON_USER_CANCEL", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   The command was canceled. に類似しているローカライズされた文字列を検索します。
+        /// </summary>
+        internal static string CON_USER_CANCELED {
+            get {
+                return ResourceManager.GetString("CON_USER_CANCELED", resourceCulture);
+            }
+        }
+    }
+}
+
+// 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/

+ 431 - 0
src/BuildUtil/Properties/Resources.resx

@@ -0,0 +1,431 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="CDF_BUTTON_ADD" xml:space="preserve">
+    <value>[j]追加[e]Add[/]</value>
+  </data>
+  <data name="CDF_BUTTON_CANCEL" xml:space="preserve">
+    <value>  [j]キャンセル[e]Cancel[/]  </value>
+  </data>
+  <data name="CDF_BUTTON_COMPLETE" xml:space="preserve">
+    <value>   [j]完  了[e]Complete[/]   </value>
+  </data>
+  <data name="CDF_BUTTON_DELETE" xml:space="preserve">
+    <value>[j]削除[e]Delete[/]</value>
+  </data>
+  <data name="CDF_BUTTON_EDIT" xml:space="preserve">
+    <value>[j]編集[e]Edit[/]</value>
+  </data>
+  <data name="CDF_BUTTON_MODIFY" xml:space="preserve">
+    <value>  [j]修正する[e]Modify[/]  </value>
+  </data>
+  <data name="CDF_BUTTON_OK" xml:space="preserve">
+    <value>   O  K   </value>
+  </data>
+  <data name="CDF_BUTTON_SENDING" xml:space="preserve">
+    <value>  [j]処理中[e]Wait[/]...</value>
+  </data>
+  <data name="CDF_CANDIDATES" xml:space="preserve">
+    <value> [j]最近の候補[e]Recent Candidates[/]: </value>
+  </data>
+  <data name="CDF_DATE_EMPTY" xml:space="preserve">
+    <value>[j]日付が入力されていません。[e]Date field is empty.[/]</value>
+  </data>
+  <data name="CDF_DATE_MAX" xml:space="preserve">
+    <value>[j]{0} 以前の日付を指定してください。[e]Please specify a date before {0}.[/]</value>
+  </data>
+  <data name="CDF_DATE_MIN" xml:space="preserve">
+    <value>[j]{0} 以降の日付を指定してください。[e]Please specift a date since {0}.[/]</value>
+  </data>
+  <data name="CDF_DATE_NOTDATE" xml:space="preserve">
+    <value>[j]日付として認識できない文字列が入力されています。[e]Can't recognize as a valid date.[/]</value>
+  </data>
+  <data name="CDF_DL_ALL" xml:space="preserve">
+    <value>[j]全件表示 ({0} 件)[e]Total ({0} entities)[/]</value>
+  </data>
+  <data name="CDF_DOWNLOAD" xml:space="preserve">
+    <value>[j]ダウンロード[e]Download[/]</value>
+  </data>
+  <data name="CDF_DT_EMPTY" xml:space="preserve">
+    <value>[j]日時が入力されていません。[e]Date and Time are empty.[/]</value>
+  </data>
+  <data name="CDF_DT_MAX" xml:space="preserve">
+    <value>[j]{0} 以前の日時を指定してください。[e]Please specify a date and a time before {0}.[/]</value>
+  </data>
+  <data name="CDF_DT_MIN" xml:space="preserve">
+    <value>[j]{0} 以降の日時を指定してください。[e]Please specify a date and a time since {0}.[/]</value>
+  </data>
+  <data name="CDF_DT_NOTDT" xml:space="preserve">
+    <value>[j]日時として認識できない文字列が入力されています。[e]Can't recognize as a valid date and a time.[/]</value>
+  </data>
+  <data name="CDF_EXAMPLE" xml:space="preserve">
+    <value>[j]記入例[e]Example[/]</value>
+  </data>
+  <data name="CDF_GOTHIC" xml:space="preserve">
+    <value>[j]MS ゴシック[e]MS Gothic[/]</value>
+  </data>
+  <data name="CDF_GRID_ERROR_1" xml:space="preserve">
+    <value>[j]データ構造のフィールド数が 1 でありません。[e]The number of fields of data structures is not one.[/]</value>
+  </data>
+  <data name="CDF_GRID_ERROR_2" xml:space="preserve">
+    <value>[j]データ構造がリストでありません。[e]The data structure is not a list.[/]</value>
+  </data>
+  <data name="CDF_INT_MAX" xml:space="preserve">
+    <value>[j]数値は {0} 以下を指定してください。[e]The value must be {0} or less.[/]</value>
+  </data>
+  <data name="CDF_INT_MIN" xml:space="preserve">
+    <value>[j]数値は {0} 以上を指定してください。[e]The value must be {0} or more.[/]</value>
+  </data>
+  <data name="CDF_INT_NOTINTEGER" xml:space="preserve">
+    <value>[j]数値が正しく入力されていません。[e]The value can't be recognized as a formal figure.[/]</value>
+  </data>
+  <data name="CDF_INT_NOT_NUMBER_CHAR" xml:space="preserve">
+    <value>[j]整数以外の文字が入力されています。[e]The value can't be recognized as an integer.[/]</value>
+  </data>
+  <data name="CDF_INVALID" xml:space="preserve">
+    <value>[j]データ "{0}" はこのリストでは不正です。[e]The data "{0}" is invalid at this list.[/]</value>
+  </data>
+  <data name="CDF_INVALID_EMAIL" xml:space="preserve">
+    <value>[j]メールアドレスが不正です。[e]The mail address is invalid.[/]</value>
+  </data>
+  <data name="CDF_LIST_FORMAT" xml:space="preserve">
+    <value>[j]【 {0} 個目の項目 (合計 {1} 個中) - {2} 】[e]Item of piece {0} (Total: {1} entities) - {2}[/]</value>
+  </data>
+  <data name="CDF_NOITEM" xml:space="preserve">
+    <value>[j]項目なし[e]No Entities[/]</value>
+  </data>
+  <data name="CDF_NOT_SELECTED" xml:space="preserve">
+    <value>[j]項目が選択されていません。[e]You have to select an entity.[/]</value>
+  </data>
+  <data name="CDF_NOT_SELECTED_2" xml:space="preserve">
+    <value>[j]正しく選択されていません。[e]You have to select correctly.[/]</value>
+  </data>
+  <data name="CDF_NO_CDFCLASS" xml:space="preserve">
+    <value>CdfClass 属性が正しく指定されていないクラス %s が指定されました。</value>
+  </data>
+  <data name="CDF_NO_SINGLE_ATT" xml:space="preserve">
+    <value>%s 項目に %s 属性が 1 つ指定されていません。</value>
+  </data>
+  <data name="CDF_NO_SINGLE_GENERIC_TYPE" xml:space="preserve">
+    <value>%s 項目のジェネリック型が 1 つ指定されていません。</value>
+  </data>
+  <data name="CDF_PAGING_FORMAT_1" xml:space="preserve">
+    <value>[j]ページ {0}[e]Page {0}[/]</value>
+  </data>
+  <data name="CDF_PAGING_FORMAT_2" xml:space="preserve">
+    <value>[j]最新 {0} 件[e]Latest: {0} entities[/]</value>
+  </data>
+  <data name="CDF_PAGING_HELPSTR_FORMAT" xml:space="preserve">
+    <value>[j] ({2}: {0} ~ {1})[e] ({2}: {0} - {1})[/]</value>
+  </data>
+  <data name="CDF_PLEASE_SELECT" xml:space="preserve">
+    <value>[j]▼選択してください▼[e]- Please Select Here -[/]</value>
+  </data>
+  <data name="CDF_REMOVE" xml:space="preserve">
+    <value>[j]削除[e]Delete[/]</value>
+  </data>
+  <data name="CDF_REMOVEMSG" xml:space="preserve">
+    <value>[j]この項目を削除します。よろしいですか?[e]Do you want to delete this entity?[/]</value>
+  </data>
+  <data name="CDF_ROW_EMPTY" xml:space="preserve">
+    <value>[j]項目が 1 件も見つかりませんでした。[e]No entity is found.[/]</value>
+  </data>
+  <data name="CDF_SELECTABLE" xml:space="preserve">
+    <value>[j]▽選択可能[e]- Selectable -[/]</value>
+  </data>
+  <data name="CDF_SORT_1" xml:space="preserve">
+    <value>[j]▲「{0}」でソート[e]Sort by "{0}" Ascending[/]</value>
+  </data>
+  <data name="CDF_SORT_2" xml:space="preserve">
+    <value>[j]▼「{0}」で逆ソート[e]Sort by "{0}" Descending[/]</value>
+  </data>
+  <data name="CDF_SORT_DEF1" xml:space="preserve">
+    <value>[j]▲標準のソート[e]Standard Ascending Sort[/]</value>
+  </data>
+  <data name="CDF_SORT_DEF2" xml:space="preserve">
+    <value>[j]▼標準の逆ソート[e]Standard Descending Sort[/]</value>
+  </data>
+  <data name="CDF_STRING_INVALIDCHAR" xml:space="preserve">
+    <value>[j]使用できない文字が含まれています。[e]There are some invalid characters which can't be used.[/]</value>
+  </data>
+  <data name="CDF_STRING_MAX" xml:space="preserve">
+    <value>[j]文字数は {0} 以下にする必要があります。[e]The number of characters must be {0} or less.[/]</value>
+  </data>
+  <data name="CDF_STRING_MIN" xml:space="preserve">
+    <value>[j]文字を {0} 文字以上入力する必要があります。[e]The number of characters must be {0} or more.[/]</value>
+  </data>
+  <data name="CDF_STRING_NOLINE" xml:space="preserve">
+    <value>[j]改行文字を含めることはできません。[e]There must not be any New-Line characters in the string.[/]</value>
+  </data>
+  <data name="CDF_STRING_NONPRINTABLE" xml:space="preserve">
+    <value>[j]表示不可能な文字コードが含まれています。[e]There must not be any Non-Printable characters in the string.[/]</value>
+  </data>
+  <data name="CDF_TEXT_CONFIRM" xml:space="preserve">
+    <value>[j]入力いただいた内容を確認のため表示しています。内容をよくご確認ください。&lt;BR&gt;この内容で確定する場合は [OK] ボタンを、修正する場合は [修正する] ボタンをクリックしてください。[e]Please confirm the printed data which you input. Please read it carefully.&lt;BR&gt;If you want to commit with this data, click the "OK" button. Otherwise, click the "Modify" button.[/]</value>
+  </data>
+  <data name="CDF_TEXT_CONFIRM_ERROR" xml:space="preserve">
+    <value>[j]エラーが発生しました。内容を見直してください。修正する場合は [修正する] ボタンをクリックしてください。[e]An error has been occurred. Please confirm the fields. To modify it, click the "Modify" button.[/]</value>
+  </data>
+  <data name="CDF_TEXT_OK" xml:space="preserve">
+    <value>[j]入力が完了したら [OK] ボタンを、入力をキャンセルするには [キャンセル] ボタンをクリックしてください。[e]Please click the "OK" button after you complete filling all nessesary fields. To cancel inputting, click the "Cancel" button.[/]</value>
+  </data>
+  <data name="CDF_TIME_EMPTY" xml:space="preserve">
+    <value>[j]時刻が入力されていません。[e]Time is empty.[/]</value>
+  </data>
+  <data name="CDF_TIME_MAX" xml:space="preserve">
+    <value>[j]{0} 以前の時刻を指定してください。[e]Please specify a time before {0}.[/]</value>
+  </data>
+  <data name="CDF_TIME_MIN" xml:space="preserve">
+    <value>[j]{0} 以降の時刻を指定してください。[e]Please specify a time after {0}.[/]</value>
+  </data>
+  <data name="CDF_TIME_NOTTIME" xml:space="preserve">
+    <value>[j]時刻として認識できない文字列が入力されています。[e]Can't recognize as a valid time.[/]</value>
+  </data>
+  <data name="CDF_UNSUPPORTED" xml:space="preserve">
+    <value>[j]フィールド %s の型 %s がサポートされていません。[e]In the field "%s", the type "%s" is not supported.[/]</value>
+  </data>
+  <data name="CMD_CT_STD_COLUMN_1" xml:space="preserve">
+    <value>Item</value>
+  </data>
+  <data name="CMD_CT_STD_COLUMN_2" xml:space="preserve">
+    <value>Value</value>
+  </data>
+  <data name="CMD_EVAL_DATE_TIME_FAILED" xml:space="preserve">
+    <value>The date and time specification is invalid. \nThe date and time must be in the same format as "2005/10/08 19:30:00" where 6 integers are specified, representing year/month/day hour:minute:second separated by forward slashes, a space and then colons. Specify 4 digits for the year.</value>
+  </data>
+  <data name="CMD_EVAL_INT" xml:space="preserve">
+    <value>You must specify an integer that is not less than 1.</value>
+  </data>
+  <data name="CMD_EVAL_MIN_MAX" xml:space="preserve">
+    <value>You must specify an integer in the range from %u to %u for the value.</value>
+  </data>
+  <data name="CMD_EVAL_NOT_EMPTY" xml:space="preserve">
+    <value>You cannot make a blank specification.</value>
+  </data>
+  <data name="CMD_EVAL_PORT" xml:space="preserve">
+    <value>Port number is invalid. Specify a port number that is within the range of 1 to 65535.</value>
+  </data>
+  <data name="CMD_EVAL_SAFE" xml:space="preserve">
+    <value>The string contains unusable characters.</value>
+  </data>
+  <data name="CMD_EXEC_MSG_NAME" xml:space="preserve">
+    <value>%S command - %s</value>
+  </data>
+  <data name="CMD_FILE_NAME_EMPTY" xml:space="preserve">
+    <value>The file name is not specified.</value>
+  </data>
+  <data name="CMD_FILE_NOT_FOUND" xml:space="preserve">
+    <value>Cannot find specified file "%s".</value>
+  </data>
+  <data name="CMD_HELP_1" xml:space="preserve">
+    <value>You can use the following %u commands:</value>
+  </data>
+  <data name="CMD_HELP_2" xml:space="preserve">
+    <value>To reference the usage for each command, input "command name /?" to view a help.</value>
+  </data>
+  <data name="CMD_HELP_ARGS" xml:space="preserve">
+    <value>Parameters:</value>
+  </data>
+  <data name="CMD_HELP_DESCRIPTION" xml:space="preserve">
+    <value>Purpose:</value>
+  </data>
+  <data name="CMD_HELP_HELP" xml:space="preserve">
+    <value>Description:</value>
+  </data>
+  <data name="CMD_HELP_TITLE" xml:space="preserve">
+    <value>Help for command "%S"</value>
+  </data>
+  <data name="CMD_HELP_USAGE" xml:space="preserve">
+    <value>Usage:</value>
+  </data>
+  <data name="CMD_PARSE_IP_SUBNET_ERROR_1" xml:space="preserve">
+    <value>"IP アドレス/サブネットマスク" の形式で指定してください。
+IP アドレスは 192.168.0.1 のように 10 進数をドットで区切って指定します。サブネットマスクは 255.255.255.0 のように 10 進数をドットで区切って指定するか、24 のように先頭からのビット長を 10 進数で指定できます。
+単一のホストを指定するには、サブネットマスクを 255.255.255.255 または 32 として指定します。
+(例)
+ 192.168.0.1/24
+ 192.168.0.1/255.255.255.0
+192.168.0.5/255.255.255.255
+
+</value>
+  </data>
+  <data name="CMD_PARSE_IP_SUBNET_ERROR_2" xml:space="preserve">
+    <value>指定された IP アドレスはネットワークアドレスではありません。</value>
+  </data>
+  <data name="CMD_PROMPT" xml:space="preserve">
+    <value>Enter a value: </value>
+  </data>
+  <data name="CMD_PROPMT_PORT" xml:space="preserve">
+    <value>Input the port number: </value>
+  </data>
+  <data name="CMD_UNKNOWM" xml:space="preserve">
+    <value>There is no description for this command.</value>
+  </data>
+  <data name="CMD_UNKNOWN_ARGS" xml:space="preserve">
+    <value>There is no command execution example.</value>
+  </data>
+  <data name="CMD_UNKNOWN_HELP" xml:space="preserve">
+    <value>There is no detailed description for this command. If you would like to know more detail about this command, please refer to the manual or online documentation.</value>
+  </data>
+  <data name="CMD_UNKNOWN_PARAM" xml:space="preserve">
+    <value>There is no description for this parameter.</value>
+  </data>
+  <data name="CON_AMBIGIOUS_CMD" xml:space="preserve">
+    <value>"%S": The command-name is ambiguous.</value>
+  </data>
+  <data name="CON_AMBIGIOUS_CMD_1" xml:space="preserve">
+    <value>The specified command name matches the following multiple commands.</value>
+  </data>
+  <data name="CON_AMBIGIOUS_CMD_2" xml:space="preserve">
+    <value>Please re-specify the command name more strictly.</value>
+  </data>
+  <data name="CON_AMBIGIOUS_PARAM" xml:space="preserve">
+    <value>"%S": The parameter name is ambiguous.</value>
+  </data>
+  <data name="CON_AMBIGIOUS_PARAM_1" xml:space="preserve">
+    <value>The specified parameter name matches with the following parameters that can be specified as a parameter of command "%S".</value>
+  </data>
+  <data name="CON_AMBIGIOUS_PARAM_2" xml:space="preserve">
+    <value>Please re-specify the parameter name more strictly.</value>
+  </data>
+  <data name="CON_INFILE_ERROR" xml:space="preserve">
+    <value>Error: Unable to open the specified input file "%s".</value>
+  </data>
+  <data name="CON_INFILE_START" xml:space="preserve">
+    <value>The commands written in the file "%s" will be used instead of input from keyboard.</value>
+  </data>
+  <data name="CON_INVALID_PARAM" xml:space="preserve">
+    <value>The parameter "/%S" has been specified. It is not possible to specify this parameter when using the command "%S". Input "%S /HELP" to see the list of what parameters can be used.</value>
+  </data>
+  <data name="CON_OUTFILE_ERROR" xml:space="preserve">
+    <value>Error: Unable to create the specified output file "%s".</value>
+  </data>
+  <data name="CON_OUTFILE_START" xml:space="preserve">
+    <value>The message output to the console will be saved in the file "%s".</value>
+  </data>
+  <data name="CON_UNKNOWN_CMD" xml:space="preserve">
+    <value>"%S": Command not found. You can use the HELP command to view a list of the available commands.</value>
+  </data>
+  <data name="CON_USER_CANCEL" xml:space="preserve">
+    <value>[EOF]</value>
+  </data>
+  <data name="CON_USER_CANCELED" xml:space="preserve">
+    <value>The command was canceled.</value>
+  </data>
+</root>

+ 1 - 0
src/BuildUtil/VpnBuilder.cs

@@ -484,6 +484,7 @@ namespace BuildUtil
 				".sys",
 				".inf",
 				".wav",
+				".cat",
 			};
 
 			foreach (string ext in filesOnlyWin32)

+ 5 - 5
src/Cedar/Cedar.h

@@ -108,7 +108,7 @@
 #define	CEDAR_VER					403
 
 // Build Number
-#define	CEDAR_BUILD					9408
+#define	CEDAR_BUILD					9411
 
 // Beta number
 //#define	BETA_NUMBER					3
@@ -129,10 +129,10 @@
 // Specifies the build date
 #define	BUILD_DATE_Y		2014
 #define	BUILD_DATE_M		1
-#define	BUILD_DATE_D		4
-#define	BUILD_DATE_HO		19
-#define	BUILD_DATE_MI		10
-#define	BUILD_DATE_SE		55
+#define	BUILD_DATE_D		7
+#define	BUILD_DATE_HO		4
+#define	BUILD_DATE_MI		51
+#define	BUILD_DATE_SE		30
 
 // Tolerable time difference
 #define	ALLOW_TIMESTAMP_DIFF		(UINT64)(3 * 24 * 60 * 60 * 1000)

+ 0 - 41
src/Cedar/Protocol.c

@@ -5449,47 +5449,6 @@ bool ServerDownloadSignature(CONNECTION *c, char **error_detail_str)
 
 					*error_detail_str = "HTTP_ROOT";
 
-					if (s != NULL && s->UseWebTimePage)
-					{
-						// Generate a page that shows the current time as the top page automatically
-						BUF *b = ReadDump("|time.htm");
-
-						if (b != NULL)
-						{
-							char *src = ZeroMalloc(b->Size + 1);
-							UINT dst_size = b->Size * 2 + 64;
-							char *dst = ZeroMalloc(dst_size);
-							char host[MAX_PATH];
-							char portstr[64];
-							char now_str[MAX_PATH];
-
-							GetDateTimeStr64(now_str, sizeof(now_str), LocalTime64());
-
-							GetMachineName(host, sizeof(host));
-							ToStr(portstr, c->FirstSock->LocalPort);
-
-							Copy(src, b->Buf, b->Size);
-							ReplaceStrEx(dst, dst_size, src,
-								"$HOST$", host, false);
-							ReplaceStrEx(dst, dst_size, dst,
-								"$PORT$", portstr, false);
-							ReplaceStrEx(dst, dst_size, dst,
-								"$NOW$", now_str, false);
-
-							FreeHttpHeader(h);
-							h = NewHttpHeader("HTTP/1.1", "202", "OK");
-							AddHttpValue(h, NewHttpValue("Content-Type", HTTP_CONTENT_TYPE4));
-							AddHttpValue(h, NewHttpValue("Connection", "Keep-Alive"));
-							AddHttpValue(h, NewHttpValue("Keep-Alive", HTTP_KEEP_ALIVE));
-							PostHttp(c->FirstSock, h, dst, StrLen(dst));
-
-							Free(src);
-							Free(dst);
-
-							FreeBuf(b);
-						}
-					}
-					else
 					{
 						if (is_free == false)
 						{

+ 0 - 4
src/Cedar/WinUi.c

@@ -2125,10 +2125,6 @@ bool ExecuteHamcoreExe(char *name)
 // Show the Easter Egg
 void ShowEasterEgg(HWND hWnd)
 {
-	ExecuteHamcoreExe("|egg1.exe");
-	ExecuteHamcoreExe("|egg2.exe");
-	ExecuteHamcoreExe("|egg3.exe");
-	ShellExecute(hWnd, "open", "http://www.softether.co.jp/jp/special/vpn3egg/", NULL, NULL, SW_SHOW);
 }
 
 void KakushiThread(THREAD *thread, void *param)

+ 10 - 0
src/ChangeLog.txt

@@ -0,0 +1,10 @@
+ChangeLog of SoftEther VPN
+--------------------------
+
+The ChangeLog of SoftEther VPN is on our web site:
+http://www.softether.org/5-download/history
+
+(In Japanese: http://ja.softether.org/5-download/history)
+
+Enjoy it!
+

+ 2 - 2
src/CurrentBuild.txt

@@ -1,4 +1,4 @@
-BUILD_NUMBER 9408
+BUILD_NUMBER 9411
 VERSION 403
 BUILD_NAME rtm
-BUILD_DATE 20140104_191055
+BUILD_DATE 20140107_045130

+ 0 - 2350
src/LICENSE

@@ -1,2350 +0,0 @@
-SoftEther VPN Server, Client and Bridge are free software, and released as
-open-source. You can redistribute them and/or modify them under the terms of
-the GNU General Public License version 2 as published by the Free Software
-Foundation.
-
-Copyright (c) 2012-2014 Daiyuu Nobori.
-Copyright (c) 2012-2014 SoftEther Project at University of Tsukuba, Japan.
-Copyright (c) 2012-2014 SoftEther Corporation.
-All Rights Reserved.
-http://www.softether.org/
-
-This program is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License version 2 as published by the Free
-Software Foundation.
-
-This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License version 2
-along with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-Neither the name of SoftEther nor the names of its contributors may be used to
-endorse or promote products derived from this software without specific prior
-written permission.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
-THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, UNDER
-JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, MERGE, PUBLISH,
-DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS SOFTWARE, THAT ANY
-JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS SOFTWARE OR ITS CONTENTS,
-AGAINST US (SOFTETHER PROJECT, SOFTETHER CORPORATION, DAIYUU NOBORI OR OTHER
-SUPPLIERS), OR ANY JURIDICAL DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND
-OF USING, COPYING, MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING,
-AND/OR SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
-CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO EXCLUSIVE
-JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, JAPAN. YOU MUST WAIVE
-ALL DEFENSES OF LACK OF PERSONAL JURISDICTION AND FORUM NON CONVENIENS.
-PROCESS MAY BE SERVED ON EITHER PARTY IN THE MANNER AUTHORIZED BY APPLICABLE
-LAW OR COURT RULE.
-
-USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS SOFTWARE
-INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES PROHIBIT ENCRYPTED
-COMMUNICATIONS. USING THIS SOFTWARE IN OTHER COUNTRIES MIGHT BE RESTRICTED.
-
-THE FOLLOWING GPLV2 CONDITIONS APPLY ON ALL SOFTETHER VPN PROGRAMS WHICH ARE
-DEVELOPED BY SOFTETHER VPN PROJECT.
-
-                    GNU GENERAL PUBLIC LICENSE
-                       Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The licenses for most software are designed to take away your freedom to
-share and change it.  By contrast, the GNU General Public License is intended
-to guarantee your freedom to share and change free software--to make sure the
-software is free for all its users.  This General Public License applies to
-most of the Free Software Foundation's software and to any other program whose
-authors commit to using it.  (Some other Free Software Foundation software is
-covered by the GNU Lesser General Public License instead.)  You can apply it
-to your programs, too.
-
-  When we speak of free software, we are referring to freedom, not price.  Our
-General Public Licenses are designed to make sure that you have the freedom to
-distribute copies of free software (and charge for this service if you wish),
-that you receive source code or can get it if you want it, that you can change
-the software or use pieces of it in new free programs; and that you know you
-can do these things.
-
-  To protect your rights, we need to make restrictions that forbid anyone to
-deny you these rights or to ask you to surrender the rights. These
-restrictions translate to certain responsibilities for you if you distribute
-copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether gratis or
-for a fee, you must give the recipients all the rights that you have.  You
-must make sure that they, too, receive or can get the source code.  And you
-must show them these terms so they know their rights.
-
-  We protect your rights with two steps: (1) copyright the software, and (2)
-offer you this license which gives you legal permission to copy, distribute
-and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain that
-everyone understands that there is no warranty for this free software.  If the
-software is modified by someone else and passed on, we want its recipients to
-know that what they have is not the original, so that any problems introduced
-by others will not reflect on the original authors' reputations.
-
-  Finally, any free program is threatened constantly by software patents.  We
-wish to avoid the danger that redistributors of a free program will
-individually obtain patent licenses, in effect making the program proprietary.
-To prevent this, we have made it clear that any patent must be licensed for
-everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and modification
-follow.
-
-                    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains a notice
-placed by the copyright holder saying it may be distributed under the terms of
-this General Public License.  The "Program", below, refers to any such program
-or work, and a "work based on the Program" means either the Program or any
-derivative work under copyright law: that is to say, a work containing the
-Program or a portion of it, either verbatim or with modifications and/or
-translated into another language.  (Hereinafter, translation is included
-without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not covered
-by this License; they are outside its scope.  The act of running the Program
-is not restricted, and the output from the Program is covered only if its
-contents constitute a work based on the Program (independent of having been
-made by running the Program). Whether that is true depends on what the Program
-does.
-
-  1. You may copy and distribute verbatim copies of the Program's source code
-as you receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice and
-disclaimer of warranty; keep intact all the notices that refer to this License
-and to the absence of any warranty; and give any other recipients of the
-Program a copy of this License along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and you may
-at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion of it,
-thus forming a work based on the Program, and copy and distribute such
-modifications or work under the terms of Section 1 above, provided that you
-also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices stating
-that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in whole
-or in part contains or is derived from the Program or any part thereof, to be
-licensed as a whole at no charge to all third parties under the terms of this
-License.
-
-    c) If the modified program normally reads commands interactively when run,
-you must cause it, when started running for such interactive use in the most
-ordinary way, to print or display an announcement including an appropriate
-copyright notice and a notice that there is no warranty (or else, saying that
-you provide a warranty) and that users may redistribute the program under
-these conditions, and telling the user how to view a copy of this License.
-(Exception: if the Program itself is interactive but does not normally print
-such an announcement, your work based on the Program is not required to print
-an announcement.)
-
-These requirements apply to the modified work as a whole.  If identifiable
-sections of that work are not derived from the Program, and can be reasonably
-considered independent and separate works in themselves, then this License,
-and its terms, do not apply to those sections when you distribute them as
-separate works.  But when you distribute the same sections as part of a whole
-which is a work based on the Program, the distribution of the whole must be on
-the terms of this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest your
-rights to work written entirely by you; rather, the intent is to exercise the
-right to control the distribution of derivative or collective works based on
-the Program.
-
-In addition, mere aggregation of another work not based on the Program with
-the Program (or with a work based on the Program) on a volume of a storage or
-distribution medium does not bring the other work under the scope of this
-License.
-
-  3. You may copy and distribute the Program (or a work based on it, under
-Section 2) in object code or executable form under the terms of Sections 1 and
-2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable source
-code, which must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three years, to
-give any third party, for a charge no more than your cost of physically
-performing source distribution, a complete machine-readable copy of the
-corresponding source code, to be distributed under the terms of Sections 1 and
-2 above on a medium customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer to
-distribute corresponding source code.  (This alternative is allowed only for
-noncommercial distribution and only if you received the program in object code
-or executable form with such an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for making
-modifications to it.  For an executable work, complete source code means all
-the source code for all modules it contains, plus any associated interface
-definition files, plus the scripts used to control compilation and
-installation of the executable.  However, as a special exception, the source
-code distributed need not include anything that is normally distributed (in
-either source or binary form) with the major components (compiler, kernel, and
-so on) of the operating system on which the executable runs, unless that
-component itself accompanies the executable.
-
-If distribution of executable or object code is made by offering access to
-copy from a designated place, then offering equivalent access to copy the
-source code from the same place counts as distribution of the source code,
-even though third parties are not compelled to copy the source along with the
-object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program except as
-expressly provided under this License.  Any attempt otherwise to copy, modify,
-sublicense or distribute the Program is void, and will automatically terminate
-your rights under this License. However, parties who have received copies, or
-rights, from you under this License will not have their licenses terminated so
-long as such parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not signed
-it.  However, nothing else grants you permission to modify or distribute the
-Program or its derivative works.  These actions are prohibited by law if you
-do not accept this License.  Therefore, by modifying or distributing the
-Program (or any work based on the Program), you indicate your acceptance of
-this License to do so, and all its terms and conditions for copying,
-distributing or modifying the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the original
-licensor to copy, distribute or modify the Program subject to these terms and
-conditions.  You may not impose any further restrictions on the recipients'
-exercise of the rights granted herein. You are not responsible for enforcing
-compliance by third parties to this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or otherwise)
-that contradict the conditions of this License, they do not excuse you from
-the conditions of this License.  If you cannot distribute so as to satisfy
-simultaneously your obligations under this License and any other pertinent
-obligations, then as a consequence you may not distribute the Program at all.
-For example, if a patent license would not permit royalty-free redistribution
-of the Program by all those who receive copies directly or indirectly through
-you, then the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply and
-the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any patents or
-other property right claims or to contest validity of any such claims; this
-section has the sole purpose of protecting the integrity of the free software
-distribution system, which is implemented by public license practices.  Many
-people have made generous contributions to the wide range of software
-distributed through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing to
-distribute software through any other system and a licensee cannot impose that
-choice.
-
-This section is intended to make thoroughly clear what is believed to be a
-consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in certain
-countries either by patents or by copyrighted interfaces, the original
-copyright holder who places the Program under this License may add an explicit
-geographical distribution limitation excluding those countries, so that
-distribution is permitted only in or among countries not thus excluded.  In
-such case, this License incorporates the limitation as if written in the body
-of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions of
-the General Public License from time to time.  Such new versions will be
-similar in spirit to the present version, but may differ in detail to address
-new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any later
-version", you have the option of following the terms and conditions either of
-that version or of any later version published by the Free Software
-Foundation.  If the Program does not specify a version number of this License,
-you may choose any version ever published by the Free Software Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free programs
-whose distribution conditions are different, write to the author to ask for
-permission.  For software which is copyrighted by the Free Software
-Foundation, write to the Free Software Foundation; we sometimes make
-exceptions for this.  Our decision will be guided by the two goals of
-preserving the free status of all derivatives of our free software and of
-promoting the sharing and reuse of software generally.
-
-                            NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
-THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN OTHERWISE
-STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
-PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND
-PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE,
-YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO
-LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR
-THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-                     END OF TERMS AND CONDITIONS
-
-Note that the above copyright notices and use conditions do not apply on the
-software components listed in below which are included in this Software. When
-you use or distribute Software with including these libraries, you have to
-follow the conditions of these libraries.
-
-These library's copyright notices and conditions are following;
-
--------------------
-
-BitVisor(R) VPN Client Module (IPsec Driver):
-Copyright (c) 2007, 2008 University of Tsukuba.
-Copyright (C) 2007, 2008 National Institute of Information and Communications
-Technology.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. Neither the name of the University of Tsukuba nor the names of its
-contributors may be used to endorse or promote products derived from this
-software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------
-
-Microsoft(R) C Runtime Library:
-(c) 2007 Microsoft Corporation. All Rights Reserved.
-
--------------------
-
-RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki):
-
-License to copy and use this software is granted provided that it is
-identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface
-(Cryptoki)" in all material mentioning or referencing this software.
-
-License is also granted to make and use derivative works provided that such
-works are identified as "derived from the RSA Security Inc. PKCS #11
-Cryptographic Token Interface (Cryptoki)" in all material mentioning or
-referencing the derived work.
-
-RSA Security Inc. makes no representations concerning either the
-merchantability of this software or the suitability of this software for any
-particular purpose. It is provided "as is" without express or implied warranty
-of any kind.
-
--------------------
-
-WinPcap:
-Copyright (c) 2001 - 2003 NetGroup, Politecnico di Torino (Italy)
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. Neither the name of the Politecnico di Torino nor the names of its
-contributors may be used to endorse or promote products derived from this
-software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------
-
-libedit:
-Copyright (c) 1992, 1993 The Regents of the University of California.  All
-rights reserved.
-
-This code is derived from software contributed to Berkeley by Christos Zoulas
-of Cornell University.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. Neither the name of the University nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------
-
-libiconv:
-
-          GNU LIBRARY GENERAL PUBLIC LICENSE
-               Version 2, June 1991
-
- Copyright (C) 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- Everyone is permitted to copy and distribute verbatim copies of this license
-document, but changing it is not allowed.
-
-[This is the first released version of the library GPL. It is
- numbered 2 because it goes with version 2 of the ordinary GPL.]
-
-                Preamble
-
-  The licenses for most software are designed to take away your freedom to
-share and change it. By contrast, the GNU General Public Licenses are intended
-to guarantee your freedom to share and change free software--to make sure the
-software is free for all its users.
-
-  This license, the Library General Public License, applies to some specially
-designated Free Software Foundation software, and to any other libraries whose
-authors decide to use it. You can use it for your libraries, too.
-
-  When we speak of free software, we are referring to freedom, not price. Our
-General Public Licenses are designed to make sure that you have the freedom to
-distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new free
-programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid anyone to
-deny you these rights or to ask you to surrender the rights. These
-restrictions translate to certain responsibilities for you if you distribute
-copies of the library, or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis or for
-a fee, you must give the recipients all the rights that we gave you. You must
-make sure that they, too, receive or can get the source
-code. If you link a program with the library, you must provide complete object
-files to the recipients so that they can relink them with the library, after
-making changes to the library and recompiling it. And you must show them these
-terms so they know their rights.
-
-  Our method of protecting your rights has two steps: (1) copyright the
-library, and (2) offer you this license which gives you legal permission to
-copy, distribute and/or modify the library.
-
-  Also, for each distributor's protection, we want to make certain that
-everyone understands that there is no warranty for this free library. If the
-library is modified by someone else and passed on, we want its recipients to
-know that what they have is not the original version, so that any problems
-introduced by others will not reflect on the original authors' reputations.
-
-  Finally, any free program is threatened constantly by software patents. We
-wish to avoid the danger that companies distributing free software will
-individually obtain patent licenses, thus in effect transforming the program
-into proprietary software. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  Most GNU software, including some libraries, is covered by the ordinary GNU
-General Public License, which was designed for utility programs. This license,
-the GNU Library General Public License, applies to certain designated
-libraries. This license is quite different from the ordinary one; be sure to
-read it in full, and don't assume that anything in it is the same as in the
-ordinary license.
-
-  The reason we have a separate public license for some libraries is that they
-blur the distinction we usually make between modifying or adding to a program
-and simply using it. Linking a program with a library, without changing the
-library, is in some sense simply using the library, and is analogous to
-running a utility program or application program. However, in a textual and
-legal sense, the linked executable is a combined work, a derivative of the
-original library, and the ordinary General Public License treats it as such.
-
-  Because of this blurred distinction, using the ordinary General Public
-License for libraries did not effectively promote software sharing, because
-most developers did not use the libraries. We concluded that weaker conditions
-might promote sharing better.
-
-  However, unrestricted linking of non-free programs would deprive the users
-of those programs of all benefit from the free status of the libraries
-themselves. This Library General Public License is intended to
-permit developers of non-free programs to use free libraries, while preserving
-your freedom as a user of such programs to change the free libraries that are
-incorporated in them. (We have not seen how to achieve this as regards changes
-in header files, but we have achieved it as regards changes in the actual
-functions of the Library.) The hope is that this will lead to faster
-development of free libraries.
-
-  The precise terms and conditions for copying, distribution and modification
-follow. Pay close attention to the difference between a "work based on the
-library" and a "work that uses the library". The former contains code derived
-from the library, while the latter only works together with the library.
-
-  Note that it is possible for a library to be covered by the ordinary General
-Public License rather than by this special one.
-
-          GNU LIBRARY GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library which contains a
-notice placed by the copyright holder or other authorized party saying it may
-be distributed under the terms of this Library
-General Public License (also called "this License"). Each licensee is
-addressed as "you".
-
-  A "library" means a collection of software functions and/or data prepared so
-as to be conveniently linked with application programs (which use some of
-those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work which has
-been distributed under these terms. A "work based on the Library" means either
-the Library or any derivative work under copyright law: that is to say, a work
-containing the Library or a portion of it, either verbatim or with
-modifications and/or translated straightforwardly into another language.
-(Hereinafter, translation is included without limitation in the term
-"modification".)
-
-  "Source code" for a work means the preferred form of the work for making
-modifications to it. For a library, complete source code means all the source
-code for all modules it contains, plus any associated interface definition
-files, plus the scripts used to control compilation and installation of the
-library.
-
-  Activities other than copying, distribution and modification are not covered
-by this License; they are outside its scope. The act of running a program
-using the Library is not restricted, and output from such a program is covered
-only if its contents constitute a work based on the Library (independent of
-the use of the Library in a tool for writing it). Whether that is true depends
-on what the Library does and what the program that uses the Library does.
-
-  1. You may copy and distribute verbatim copies of the Library's complete
-source code as you receive it, in any medium, provided that you conspicuously
-and appropriately publish on each copy an appropriate copyright notice and
-disclaimer of warranty; keep intact all the notices that refer to this License
-and to the absence of any warranty; and distribute a copy of this License
-along with the Library.
-
-  You may charge a fee for the physical act of transferring a copy, and you
-may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Library or any portion of it,
-thus forming a work based on the Library, and copy and distribute such
-modifications or work under the terms of Section 1 above, provided that you
-also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices stating
-that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no charge to all
-third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a table
-of data to be supplied by an application program that uses the facility, other
-than as an argument passed when the facility is invoked, then you must make a
-good faith effort to ensure that, in the event an application does not supply
-such function or table, the facility still operates, and performs whatever
-part of its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has a
-purpose that is entirely well-defined independent of the application.
-Therefore, Subsection 2d requires that any application-supplied function or
-table used by this function must be optional: if the application does not
-supply it, the square root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If identifiable
-sections of that work are not derived from the Library, and can be reasonably
-considered independent and separate works in themselves, then this License,
-and its terms, do not apply to those sections when you distribute them as
-separate works. But when you distribute the same sections as part of a whole
-which is a work based on the Library, the distribution of the whole must be on
-the terms of this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest your
-rights to work written entirely by you; rather, the intent is to exercise the
-right to control the distribution of derivative or collective works based on
-the Library.
-
-In addition, mere aggregation of another work not based on the Library with
-the Library (or with a work based on the Library) on a volume of a storage or
-distribution medium does not bring the other work under the scope of this
-License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do this,
-you must alter all the notices that refer to this License, so that they refer
-to the ordinary GNU General Public License, version 2, instead of to this
-License. (If a newer version than version 2 of the ordinary GNU General Public
-License has appeared, then you can specify that version instead if you wish.)
-Do not make any other change in these notices.
-
-  Once this change is made in a given copy, it is irreversible for that copy,
-so the ordinary GNU General Public License applies to all subsequent copies
-and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of the Library
-into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or derivative of
-it, under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you accompany it with the complete
-corresponding machine-readable source code, which must be distributed under
-the terms of Sections 1 and 2 above on a medium customarily used for software
-interchange.
-
-  If distribution of object code is made by offering access to copy from a
-designated place, then offering equivalent access to copy the source code from
-the same place satisfies the requirement to distribute the source code, even
-though third parties are not compelled to copy the source along with the
-object code.
-
-  5. A program that contains no derivative of any portion of the Library, but
-is designed to work with the Library by being compiled or linked with it, is
-called a "work that uses the Library". Such a work, in isolation, is not a
-derivative work of the Library, and therefore falls outside the scope of this
-License.
-
-  However, linking a "work that uses the Library" with the Library creates an
-executable that is a derivative of the Library (because it contains portions
-of the Library), rather than a "work that uses the library". The executable is
-therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file that is
-part of the Library, the object code for the work may be a derivative work of
-the Library even though the source code is not.
-Whether this is true is especially significant if the work can be linked
-without the Library, or if the work is itself a library. The threshold for
-this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data structure
-layouts and accessors, and small macros and small inline functions (ten lines
-or less in length), then the use of the object file is unrestricted,
-regardless of whether it is legally a derivative work. (Executables containing
-this object code plus portions of the Library will still fall under Section
-6.)
-
-  Otherwise, if the work is a derivative of the Library, you may distribute
-the object code for the work under the terms of Section 6. Any executables
-containing that work also fall under Section 6, whether or not they are linked
-directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also compile or link a
-"work that uses the Library" with the Library to produce a work containing
-portions of the Library, and distribute that work under terms of your choice,
-provided that the terms permit modification of the work for the customer's own
-use and reverse engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the Library
-is used in it and that the Library and its use are covered by this License.
-You must supply a copy of this License. If the work during execution displays
-copyright notices, you must include the copyright notice for the Library among
-them, as well as a reference directing the user to the copy of this License.
-Also, you must do one of these things:
-
-    a) Accompany the work with the complete corresponding machine-readable
-source code for the Library including whatever changes were used in the work
-(which must be distributed under Sections 1 and 2 above) ; and, if the work is
-an executable linked with the Library, with the complete machine-readable
-"work that uses the Library", as object code and/or source code, so that the
-user can modify the Library and then relink to produce a modified executable
-containing the modified Library. (It is understood that the user who changes
-the contents of definitions files in the Library will not necessarily be able
-to recompile the application to use the modified definitions.)
-
-    b) Accompany the work with a written offer, valid for at least three
-years, to give the same user the materials specified in Subsection 6a, above,
-for a charge no more than the cost of performing this distribution.
-
-    c) If distribution of the work is made by offering access to copy from a
-designated place, offer equivalent access to copy the above specified
-materials from the same place.
-
-    d) Verify that the user has already received a copy of these materials or
-that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the Library"
-must include any data and utility programs needed for reproducing the
-executable from it. However, as a special exception, the source code
-distributed need not include anything that is normally distributed (in either
-source or binary form) with the major components (compiler, kernel, and so on)
-of the operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-  It may happen that this requirement contradicts the license restrictions of
-other proprietary libraries that do not normally accompany the operating
-system. Such a contradiction means you cannot use both them and the Library
-together in an executable that you distribute.
-
-  7. You may place library facilities that are a work based on the Library
-side-by-side in a single library together with other library facilities not
-covered by this License, and distribute such a combined library, provided that
-the separate distribution of the work based on the Library and of the other
-library facilities is otherwise permitted, and provided that you do these two
-things:
-
-    a) Accompany the combined library with a copy of the same work based on
-the Library, uncombined with any other library facilities. This must be
-distributed under the terms of the Sections above.
-
-    b) Give prominent notice with the combined library of the fact that part
-of it is a work based on the Library, and explaining where to find the
-accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute the
-Library except as expressly provided under this License. Any attempt otherwise
-to copy, modify, sublicense, link with, or distribute the Library is void, and
-will automatically terminate your rights under this License. However, parties
-who have received copies, or rights, from you under this License will not have
-their licenses terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not signed
-it. However, nothing else grants you permission to modify or distribute the
-Library or its derivative works. These actions are prohibited by law if you do
-not accept this License. Therefore, by modifying or distributing the Library
-(or any work based on the Library), you indicate your acceptance of this
-License to do so, and all its terms and conditions for copying, distributing
-or modifying the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the original
-licensor to copy, distribute, link with or modify the Library subject to these
-terms and conditions. You may not impose any further restrictions on the
-recipients' exercise of the rights granted herein. You are not responsible for
-enforcing compliance by third parties to this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or otherwise)
-that contradict the conditions of this License, they do not excuse you from
-the conditions of this License. If you cannot distribute so as to satisfy
-simultaneously your obligations under this License and any other pertinent
-obligations, then as a consequence you may not distribute the Library at all.
-For example, if a patent license would not permit royalty-free redistribution
-of the Library by all those who receive copies directly or indirectly through
-you, then the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply, and
-the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any patents or
-other property right claims or to contest validity of any such claims; this
-section has the sole purpose of protecting the integrity of the free software
-distribution system which is implemented by public license practices. Many
-people have made generous contributions to the wide range of software
-distributed through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing to
-distribute software through any other system and a licensee cannot impose that
-choice.
-
-This section is intended to make thoroughly clear what is believed to be a
-consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in certain
-countries either by patents or by copyrighted interfaces, the original
-copyright holder who places the Library under this License may add an explicit
-geographical distribution limitation excluding those countries, so that
-distribution is permitted only in or among countries not thus excluded. In
-such case, this License incorporates the limitation as if written in the body
-of this License.
-
-  13. The Free Software Foundation may publish revised and/or new versions of
-the Library General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and "any later
-version", you have the option of following the terms and conditions either of
-that version or of any later version published by the Free Software
-Foundation. If the Library does not specify a license version number, you may
-choose any version ever published by the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free programs
-whose distribution conditions are incompatible with these, write to the author
-to ask for permission. For software which is copyrighted by the Free Software
-Foundation, write to the Free Software Foundation; we sometimes make
-exceptions for this. Our decision will be guided by the two goals of
-preserving the free status of all derivatives of our free software and of
-promoting the sharing and reuse of software generally.
-
-                NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
-THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
-STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
-LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
-PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE,
-YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO
-LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR
-THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-             END OF TERMS AND CONDITIONS
-
--------------------
-
-ncurses:
-Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, distribute with
-modifications, sublicense, and/or sell copies of the Software, and to permit
-persons to whom the Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name(s) of the above copyright holders
-shall not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization.
-
--------------------
-
-OpenSSL:
-OpenSSL License
-Copyright (c) 1998-2011 The OpenSSL Project.  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer. 
-
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-
-3. All advertising materials mentioning features or use of this software must
-display the following acknowledgment: "This product includes software
-developed by the OpenSSL Project for use in the OpenSSL Toolkit.
-(http://www.openssl.org/)"
-
-4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
-endorse or promote products derived from this software without prior written
-permission. For written permission, please contact [email protected].
-
-5. Products derived from this software may not be called "OpenSSL" nor may
-"OpenSSL" appear in their names without prior written permission of the
-OpenSSL Project.
-
-6. Redistributions of any form whatsoever must retain the following
-acknowledgment: "This product includes software developed by the OpenSSL
-Project for use in the OpenSSL Toolkit (http://www.openssl.org/)"
-
-THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY EXPRESSED
-OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
-EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-This product includes cryptographic software written by Eric Young
-([email protected]).  This product includes software written by Tim Hudson
-([email protected]).
-
-Original SSLeay License
-Copyright (C) 1995-1998 Eric Young ([email protected]) All rights reserved.
-
-This package is an SSL implementation written by Eric Young
-([email protected]). The implementation was written so as to conform with
-Netscapes SSL.
-
-This library is free for commercial and non-commercial use as long as the
-following conditions are aheared to.  The following conditions apply to all
-code found in this distribution, be it the RC4, RSA, lhash, DES, etc., code;
-not just the SSL code.  The SSL documentation included with this distribution
-is covered by the same copyright terms except that the holder is Tim Hudson
-([email protected]).
-
-Copyright remains Eric Young's, and as such any Copyright notices in the code
-are not to be removed. If this package is used in a product, Eric Young should
-be given attribution as the author of the parts of the library used. This can
-be in the form of a textual message at program startup or in documentation
-(online or textual) provided with the package.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-1. Redistributions of source code must retain the copyright notice, this list
-of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. All advertising materials mentioning features or use of this software must
-display the following acknowledgement: "This product includes cryptographic
-software written by Eric Young ([email protected])" The word 'cryptographic'
-can be left out if the rouines from the library being used are not
-cryptographic related :-).
-4. If you include any Windows specific code (or a derivative thereof) from the
-apps directory (application code) you must include an acknowledgement: "This
-product includes software written by Tim Hudson ([email protected])"
-
-THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
-EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-The licence and distribution terms for any publically available version or
-derivative of this code cannot be changed.  i.e. this code cannot simply be
-copied and put under another distribution licence [including the GNU Public
-Licence.]
-
--------------------
-
-zlib:
-Acknowledgments:
-  The deflate format used by zlib was defined by Phil Katz. The deflate and
-zlib specifications were written by L. Peter Deutsch. Thanks to all the people
-who reported problems and suggested various improvements in zlib; they are too
-numerous to cite here.
-
-Copyright notice:
- (C) 1995-2004 Jean-loup Gailly and Mark Adler
-
-  This software is provided 'as-is', without any express or implied warranty.
-In no event will the authors be held liable for any damages arising from the
-use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-including commercial applications, and to alter it and redistribute it freely,
-subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-claim that you wrote the original software. If you use this software in a
-product, an acknowledgment in the product documentation would be appreciated
-but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Jean-loup Gailly        Mark Adler
-  [email protected]          [email protected]
-
-If you use the zlib library in a product, we would appreciate *not* receiving
-lengthy legal documents to sign. The sources are provided for free but without
-warranty of any kind.  The library has been entirely written by Jean-loup
-Gailly and Mark Adler; it does not include third-party code.
-
-If you redistribute modified sources, we would appreciate that you include in
-the file ChangeLog history information documenting your changes. Please read
-the FAQ for more information on the distribution of modified source versions.
-
--------------------
-
-Intel AESNI Sample Library:
-
-Copyright (c) 2010, Intel Corporation
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors may
-be used to endorse or promote products derived from this software without
-specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Issue Date: Aug 6, 2010
-
--------------------
-
-NOTES
-
-SoftEther provides source codes of some GPL/LGPL/other libraries listed above
-on its web server. Anyone can download, use and re-distribute them under
-individual licenses which are contained on each archive file, available from
-the following URL:
-http://uploader.softether.co.jp/src/
-
-
-
-BitVisor(R) VPN Client Module (IPsec Driver):
-Copyright (c) 2007, 2008 University of Tsukuba.
-Copyright (C) 2007, 2008 National Institute of Information and Communications
-Technology.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. Neither the name of the University of Tsukuba nor the names of its
-contributors may be used to endorse or promote products derived from this
-software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------
-
-Microsoft(R) C Runtime Library:
-(c) 2007 Microsoft Corporation. All Rights Reserved.
-
--------------------
-
-RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki):
-
-License to copy and use this software is granted provided that it is
-identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface
-(Cryptoki)" in all material mentioning or referencing this software.
-
-License is also granted to make and use derivative works provided that such
-works are identified as "derived from the RSA Security Inc. PKCS #11
-Cryptographic Token Interface (Cryptoki)" in all material mentioning or
-referencing the derived work.
-
-RSA Security Inc. makes no representations concerning either the
-merchantability of this software or the suitability of this software for any
-particular purpose. It is provided "as is" without express or implied warranty
-of any kind.
-
--------------------
-
-WinPcap:
-Copyright (c) 2001 - 2003 NetGroup, Politecnico di Torino (Italy)
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. Neither the name of the Politecnico di Torino nor the names of its
-contributors may be used to endorse or promote products derived from this
-software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------
-
-libedit:
-Copyright (c) 1992, 1993 The Regents of the University of California.  All
-rights reserved.
-
-This code is derived from software contributed to Berkeley by Christos Zoulas
-of Cornell University.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. Neither the name of the University nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------
-
-libiconv:
-
-          GNU LIBRARY GENERAL PUBLIC LICENSE
-               Version 2, June 1991
-
- Copyright (C) 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- Everyone is permitted to copy and distribute verbatim copies of this license
-document, but changing it is not allowed.
-
-[This is the first released version of the library GPL. It is
- numbered 2 because it goes with version 2 of the ordinary GPL.]
-
-                Preamble
-
-  The licenses for most software are designed to take away your freedom to
-share and change it. By contrast, the GNU General Public Licenses are intended
-to guarantee your freedom to share and change free software--to make sure the
-software is free for all its users.
-
-  This license, the Library General Public License, applies to some specially
-designated Free Software Foundation software, and to any other libraries whose
-authors decide to use it. You can use it for your libraries, too.
-
-  When we speak of free software, we are referring to freedom, not price. Our
-General Public Licenses are designed to make sure that you have the freedom to
-distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new free
-programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid anyone to
-deny you these rights or to ask you to surrender the rights. These
-restrictions translate to certain responsibilities for you if you distribute
-copies of the library, or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis or for
-a fee, you must give the recipients all the rights that we gave you. You must
-make sure that they, too, receive or can get the source
-code. If you link a program with the library, you must provide complete object
-files to the recipients so that they can relink them with the library, after
-making changes to the library and recompiling it. And you must show them these
-terms so they know their rights.
-
-  Our method of protecting your rights has two steps: (1) copyright the
-library, and (2) offer you this license which gives you legal permission to
-copy, distribute and/or modify the library.
-
-  Also, for each distributor's protection, we want to make certain that
-everyone understands that there is no warranty for this free library. If the
-library is modified by someone else and passed on, we want its recipients to
-know that what they have is not the original version, so that any problems
-introduced by others will not reflect on the original authors' reputations.
-
-  Finally, any free program is threatened constantly by software patents. We
-wish to avoid the danger that companies distributing free software will
-individually obtain patent licenses, thus in effect transforming the program
-into proprietary software. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  Most GNU software, including some libraries, is covered by the ordinary GNU
-General Public License, which was designed for utility programs. This license,
-the GNU Library General Public License, applies to certain designated
-libraries. This license is quite different from the ordinary one; be sure to
-read it in full, and don't assume that anything in it is the same as in the
-ordinary license.
-
-  The reason we have a separate public license for some libraries is that they
-blur the distinction we usually make between modifying or adding to a program
-and simply using it. Linking a program with a library, without changing the
-library, is in some sense simply using the library, and is analogous to
-running a utility program or application program. However, in a textual and
-legal sense, the linked executable is a combined work, a derivative of the
-original library, and the ordinary General Public License treats it as such.
-
-  Because of this blurred distinction, using the ordinary General Public
-License for libraries did not effectively promote software sharing, because
-most developers did not use the libraries. We concluded that weaker conditions
-might promote sharing better.
-
-  However, unrestricted linking of non-free programs would deprive the users
-of those programs of all benefit from the free status of the libraries
-themselves. This Library General Public License is intended to
-permit developers of non-free programs to use free libraries, while preserving
-your freedom as a user of such programs to change the free libraries that are
-incorporated in them. (We have not seen how to achieve this as regards changes
-in header files, but we have achieved it as regards changes in the actual
-functions of the Library.) The hope is that this will lead to faster
-development of free libraries.
-
-  The precise terms and conditions for copying, distribution and modification
-follow. Pay close attention to the difference between a "work based on the
-library" and a "work that uses the library". The former contains code derived
-from the library, while the latter only works together with the library.
-
-  Note that it is possible for a library to be covered by the ordinary General
-Public License rather than by this special one.
-
-          GNU LIBRARY GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library which contains a
-notice placed by the copyright holder or other authorized party saying it may
-be distributed under the terms of this Library
-General Public License (also called "this License"). Each licensee is
-addressed as "you".
-
-  A "library" means a collection of software functions and/or data prepared so
-as to be conveniently linked with application programs (which use some of
-those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work which has
-been distributed under these terms. A "work based on the Library" means either
-the Library or any derivative work under copyright law: that is to say, a work
-containing the Library or a portion of it, either verbatim or with
-modifications and/or translated straightforwardly into another language.
-(Hereinafter, translation is included without limitation in the term
-"modification".)
-
-  "Source code" for a work means the preferred form of the work for making
-modifications to it. For a library, complete source code means all the source
-code for all modules it contains, plus any associated interface definition
-files, plus the scripts used to control compilation and installation of the
-library.
-
-  Activities other than copying, distribution and modification are not covered
-by this License; they are outside its scope. The act of running a program
-using the Library is not restricted, and output from such a program is covered
-only if its contents constitute a work based on the Library (independent of
-the use of the Library in a tool for writing it). Whether that is true depends
-on what the Library does and what the program that uses the Library does.
-
-  1. You may copy and distribute verbatim copies of the Library's complete
-source code as you receive it, in any medium, provided that you conspicuously
-and appropriately publish on each copy an appropriate copyright notice and
-disclaimer of warranty; keep intact all the notices that refer to this License
-and to the absence of any warranty; and distribute a copy of this License
-along with the Library.
-
-  You may charge a fee for the physical act of transferring a copy, and you
-may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Library or any portion of it,
-thus forming a work based on the Library, and copy and distribute such
-modifications or work under the terms of Section 1 above, provided that you
-also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices stating
-that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no charge to all
-third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a table
-of data to be supplied by an application program that uses the facility, other
-than as an argument passed when the facility is invoked, then you must make a
-good faith effort to ensure that, in the event an application does not supply
-such function or table, the facility still operates, and performs whatever
-part of its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has a
-purpose that is entirely well-defined independent of the application.
-Therefore, Subsection 2d requires that any application-supplied function or
-table used by this function must be optional: if the application does not
-supply it, the square root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If identifiable
-sections of that work are not derived from the Library, and can be reasonably
-considered independent and separate works in themselves, then this License,
-and its terms, do not apply to those sections when you distribute them as
-separate works. But when you distribute the same sections as part of a whole
-which is a work based on the Library, the distribution of the whole must be on
-the terms of this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest your
-rights to work written entirely by you; rather, the intent is to exercise the
-right to control the distribution of derivative or collective works based on
-the Library.
-
-In addition, mere aggregation of another work not based on the Library with
-the Library (or with a work based on the Library) on a volume of a storage or
-distribution medium does not bring the other work under the scope of this
-License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do this,
-you must alter all the notices that refer to this License, so that they refer
-to the ordinary GNU General Public License, version 2, instead of to this
-License. (If a newer version than version 2 of the ordinary GNU General Public
-License has appeared, then you can specify that version instead if you wish.)
-Do not make any other change in these notices.
-
-  Once this change is made in a given copy, it is irreversible for that copy,
-so the ordinary GNU General Public License applies to all subsequent copies
-and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of the Library
-into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or derivative of
-it, under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you accompany it with the complete
-corresponding machine-readable source code, which must be distributed under
-the terms of Sections 1 and 2 above on a medium customarily used for software
-interchange.
-
-  If distribution of object code is made by offering access to copy from a
-designated place, then offering equivalent access to copy the source code from
-the same place satisfies the requirement to distribute the source code, even
-though third parties are not compelled to copy the source along with the
-object code.
-
-  5. A program that contains no derivative of any portion of the Library, but
-is designed to work with the Library by being compiled or linked with it, is
-called a "work that uses the Library". Such a work, in isolation, is not a
-derivative work of the Library, and therefore falls outside the scope of this
-License.
-
-  However, linking a "work that uses the Library" with the Library creates an
-executable that is a derivative of the Library (because it contains portions
-of the Library), rather than a "work that uses the library". The executable is
-therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file that is
-part of the Library, the object code for the work may be a derivative work of
-the Library even though the source code is not.
-Whether this is true is especially significant if the work can be linked
-without the Library, or if the work is itself a library. The threshold for
-this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data structure
-layouts and accessors, and small macros and small inline functions (ten lines
-or less in length), then the use of the object file is unrestricted,
-regardless of whether it is legally a derivative work. (Executables containing
-this object code plus portions of the Library will still fall under Section
-6.)
-
-  Otherwise, if the work is a derivative of the Library, you may distribute
-the object code for the work under the terms of Section 6. Any executables
-containing that work also fall under Section 6, whether or not they are linked
-directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also compile or link a
-"work that uses the Library" with the Library to produce a work containing
-portions of the Library, and distribute that work under terms of your choice,
-provided that the terms permit modification of the work for the customer's own
-use and reverse engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the Library
-is used in it and that the Library and its use are covered by this License.
-You must supply a copy of this License. If the work during execution displays
-copyright notices, you must include the copyright notice for the Library among
-them, as well as a reference directing the user to the copy of this License.
-Also, you must do one of these things:
-
-    a) Accompany the work with the complete corresponding machine-readable
-source code for the Library including whatever changes were used in the work
-(which must be distributed under Sections 1 and 2 above) ; and, if the work is
-an executable linked with the Library, with the complete machine-readable
-"work that uses the Library", as object code and/or source code, so that the
-user can modify the Library and then relink to produce a modified executable
-containing the modified Library. (It is understood that the user who changes
-the contents of definitions files in the Library will not necessarily be able
-to recompile the application to use the modified definitions.)
-
-    b) Accompany the work with a written offer, valid for at least three
-years, to give the same user the materials specified in Subsection 6a, above,
-for a charge no more than the cost of performing this distribution.
-
-    c) If distribution of the work is made by offering access to copy from a
-designated place, offer equivalent access to copy the above specified
-materials from the same place.
-
-    d) Verify that the user has already received a copy of these materials or
-that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the Library"
-must include any data and utility programs needed for reproducing the
-executable from it. However, as a special exception, the source code
-distributed need not include anything that is normally distributed (in either
-source or binary form) with the major components (compiler, kernel, and so on)
-of the operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-  It may happen that this requirement contradicts the license restrictions of
-other proprietary libraries that do not normally accompany the operating
-system. Such a contradiction means you cannot use both them and the Library
-together in an executable that you distribute.
-
-  7. You may place library facilities that are a work based on the Library
-side-by-side in a single library together with other library facilities not
-covered by this License, and distribute such a combined library, provided that
-the separate distribution of the work based on the Library and of the other
-library facilities is otherwise permitted, and provided that you do these two
-things:
-
-    a) Accompany the combined library with a copy of the same work based on
-the Library, uncombined with any other library facilities. This must be
-distributed under the terms of the Sections above.
-
-    b) Give prominent notice with the combined library of the fact that part
-of it is a work based on the Library, and explaining where to find the
-accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute the
-Library except as expressly provided under this License. Any attempt otherwise
-to copy, modify, sublicense, link with, or distribute the Library is void, and
-will automatically terminate your rights under this License. However, parties
-who have received copies, or rights, from you under this License will not have
-their licenses terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not signed
-it. However, nothing else grants you permission to modify or distribute the
-Library or its derivative works. These actions are prohibited by law if you do
-not accept this License. Therefore, by modifying or distributing the Library
-(or any work based on the Library), you indicate your acceptance of this
-License to do so, and all its terms and conditions for copying, distributing
-or modifying the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the original
-licensor to copy, distribute, link with or modify the Library subject to these
-terms and conditions. You may not impose any further restrictions on the
-recipients' exercise of the rights granted herein. You are not responsible for
-enforcing compliance by third parties to this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or otherwise)
-that contradict the conditions of this License, they do not excuse you from
-the conditions of this License. If you cannot distribute so as to satisfy
-simultaneously your obligations under this License and any other pertinent
-obligations, then as a consequence you may not distribute the Library at all.
-For example, if a patent license would not permit royalty-free redistribution
-of the Library by all those who receive copies directly or indirectly through
-you, then the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply, and
-the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any patents or
-other property right claims or to contest validity of any such claims; this
-section has the sole purpose of protecting the integrity of the free software
-distribution system which is implemented by public license practices. Many
-people have made generous contributions to the wide range of software
-distributed through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing to
-distribute software through any other system and a licensee cannot impose that
-choice.
-
-This section is intended to make thoroughly clear what is believed to be a
-consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in certain
-countries either by patents or by copyrighted interfaces, the original
-copyright holder who places the Library under this License may add an explicit
-geographical distribution limitation excluding those countries, so that
-distribution is permitted only in or among countries not thus excluded. In
-such case, this License incorporates the limitation as if written in the body
-of this License.
-
-  13. The Free Software Foundation may publish revised and/or new versions of
-the Library General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and "any later
-version", you have the option of following the terms and conditions either of
-that version or of any later version published by the Free Software
-Foundation. If the Library does not specify a license version number, you may
-choose any version ever published by the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free programs
-whose distribution conditions are incompatible with these, write to the author
-to ask for permission. For software which is copyrighted by the Free Software
-Foundation, write to the Free Software Foundation; we sometimes make
-exceptions for this. Our decision will be guided by the two goals of
-preserving the free status of all derivatives of our free software and of
-promoting the sharing and reuse of software generally.
-
-                NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
-THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
-STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
-LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
-PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE,
-YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO
-LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR
-THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-             END OF TERMS AND CONDITIONS
-
--------------------
-
-ncurses:
-Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, distribute with
-modifications, sublicense, and/or sell copies of the Software, and to permit
-persons to whom the Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name(s) of the above copyright holders
-shall not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization.
-
--------------------
-
-OpenSSL:
-OpenSSL License
-Copyright (c) 1998-2011 The OpenSSL Project.  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer. 
-
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-
-3. All advertising materials mentioning features or use of this software must
-display the following acknowledgment: "This product includes software
-developed by the OpenSSL Project for use in the OpenSSL Toolkit.
-(http://www.openssl.org/)"
-
-4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
-endorse or promote products derived from this software without prior written
-permission. For written permission, please contact [email protected].
-
-5. Products derived from this software may not be called "OpenSSL" nor may
-"OpenSSL" appear in their names without prior written permission of the
-OpenSSL Project.
-
-6. Redistributions of any form whatsoever must retain the following
-acknowledgment: "This product includes software developed by the OpenSSL
-Project for use in the OpenSSL Toolkit (http://www.openssl.org/)"
-
-THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY EXPRESSED
-OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
-EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-This product includes cryptographic software written by Eric Young
-([email protected]).  This product includes software written by Tim Hudson
-([email protected]).
-
-Original SSLeay License
-Copyright (C) 1995-1998 Eric Young ([email protected]) All rights reserved.
-
-This package is an SSL implementation written by Eric Young
-([email protected]). The implementation was written so as to conform with
-Netscapes SSL.
-
-This library is free for commercial and non-commercial use as long as the
-following conditions are aheared to.  The following conditions apply to all
-code found in this distribution, be it the RC4, RSA, lhash, DES, etc., code;
-not just the SSL code.  The SSL documentation included with this distribution
-is covered by the same copyright terms except that the holder is Tim Hudson
-([email protected]).
-
-Copyright remains Eric Young's, and as such any Copyright notices in the code
-are not to be removed. If this package is used in a product, Eric Young should
-be given attribution as the author of the parts of the library used. This can
-be in the form of a textual message at program startup or in documentation
-(online or textual) provided with the package.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-1. Redistributions of source code must retain the copyright notice, this list
-of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. All advertising materials mentioning features or use of this software must
-display the following acknowledgement: "This product includes cryptographic
-software written by Eric Young ([email protected])" The word 'cryptographic'
-can be left out if the rouines from the library being used are not
-cryptographic related :-).
-4. If you include any Windows specific code (or a derivative thereof) from the
-apps directory (application code) you must include an acknowledgement: "This
-product includes software written by Tim Hudson ([email protected])"
-
-THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
-EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-The licence and distribution terms for any publically available version or
-derivative of this code cannot be changed.  i.e. this code cannot simply be
-copied and put under another distribution licence [including the GNU Public
-Licence.]
-
--------------------
-
-zlib:
-Acknowledgments:
-  The deflate format used by zlib was defined by Phil Katz. The deflate and
-zlib specifications were written by L. Peter Deutsch. Thanks to all the people
-who reported problems and suggested various improvements in zlib; they are too
-numerous to cite here.
-
-Copyright notice:
- (C) 1995-2004 Jean-loup Gailly and Mark Adler
-
-  This software is provided 'as-is', without any express or implied warranty.
-In no event will the authors be held liable for any damages arising from the
-use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-including commercial applications, and to alter it and redistribute it freely,
-subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-claim that you wrote the original software. If you use this software in a
-product, an acknowledgment in the product documentation would be appreciated
-but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Jean-loup Gailly        Mark Adler
-  [email protected]          [email protected]
-
-If you use the zlib library in a product, we would appreciate *not* receiving
-lengthy legal documents to sign. The sources are provided for free but without
-warranty of any kind.  The library has been entirely written by Jean-loup
-Gailly and Mark Adler; it does not include third-party code.
-
-If you redistribute modified sources, we would appreciate that you include in
-the file ChangeLog history information documenting your changes. Please read
-the FAQ for more information on the distribution of modified source versions.
-
--------------------
-
-Intel AESNI Sample Library:
-
-Copyright (c) 2010, Intel Corporation
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors may
-be used to endorse or promote products derived from this software without
-specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Issue Date: Aug 6, 2010
-
--------------------
-
-NOTES WRITTEN BY SOFTETHER CORPORATION
-
-Note for users of non-Windows version of PacketiX VPN: The enumerated bundle
-of License Agreements above are copies of original License Agreements of each
-library programs which PacketiX VPN uses. PacketiX VPN is not a delivered work
-from these libraries. PacketiX VPN is a separated work from the libraries, but
-it may call functions of the libraries (whether or not PacketiX VPN calls such
-functions are depended on the user's intention to link them or not on user's
-side computer). While some libraries indicate GPL or LGPL as a condition to
-re-distribute, PacketiX VPN is not license under GPL nor LGPL. Therefore, we
-took special care not to make PacketiX VPN become delivered works of any GPL
-or LGPL libraries. In order to achieve that, both PacketiX VPN and GPL/LGPL
-libraries are distributed with isolated forms (means that any program files of
-PacketiX VPN are not bound nor linked to any GPL/LGPL libraries). If a user of
-PacketiX VPN wants to link GPL/LGPL libraries by their own decisions,
-operations and responsibilities, he may do that on his computer. However, if a
-delivered work under copyright law is created as a result of such an
-operation, such a delivered work must not re-distributed to other people,
-because it may violate GPL/LGPL libraries' conditions.
-
-Note for users of Windows version of PacketiX VPN: For technical reason, the
-above texts are exactly same as a file which is also contained on the
-non-Windows version of PacketiX VPN. Actually, the Windows version of PacketiX
-VPN has no relations to any GPL/LGPL libraries enumerated above.
-
-SoftEther Corporation provides source codes of some GPL/LGPL/other libraries
-listed above on its web server. Anyone can download, use and re-distribute
-them under individual licenses which are contained on each archive file,
-available from the following URL:
-http://uploader.softether.co.jp/src/
-
-
-
-THE IMPORTANT NOTICES ABOUT SOFTETHER VPN
-
-FUNCTIONS OF VPN COMMUNICATIONS EMBEDDED ON THIS SOFTWARE ARE VERY POWERFUL
-THAN EVER. THIS STRONG VPN ABILITY WILL BRING YOU HUGE BENEFITS. HOWEVER, IF
-YOU MISUSE THIS SOFTWARE, IT MIGHT DAMAGES YOURSELF. IN ORDER TO AVOID SUCH
-RISKS, THIS DOCUMENT ACCOUNTS IMPORTANT NOTICES FOR CUSTOMERS WHO ARE WILLING
-TO USE THIS SOFTWARE. THE FOLLOWING INSTRUCTIONS ARE VERY IMPORTANT. READ AND
-UNDERSTAND IT CAREFULLY. ADDITIONALLY, IF YOU ARE PLANNING TO USE THE DYNAMIC
-DNS, THE NAT TRAVERSAL OR THE VPN AZURE FUNCTIONS, READ THE SECTION 3.5
-CAREFULLY. THESE FUNCTIONS ARE FREE SERVICES PROVIDED VIA THE INTERNET, ARE
-NOT GUARANTEED, AND ARE NOT INTENDED TO BE USED FOR BUSINESS OR COMMERCIAL
-USE. DO NOT USE THESE SERVICES FOR YOUR BUSINESS OR COMMERCIAL USE.
-
-
-1. VPN Communication Protocols
-1.1. SoftEther VPN Protocol
-SoftEther VPN can perform VPN communication. Unlike traditional VPN protocols,
-SoftEther VPN has an implementation of the newly-designed "SoftEther VPN
-Protocol (SE-VPN Protocol)" . SE-VPN protocol encapsulates any Ethernet
-packets into a HTTPS (HTTP over SSL) connection. Therefore SE-VPN protocol can
-communicate beyond firewalls even if the firewall is configured to block
-traditional VPN packets by network administrator. SE-VPN protocol is designed
-and implemented to comply TLS 1.0 (RFC 5246) and HTTPS (RFC 2818). However, it
-sometimes have different behavior to RFCs. If you are a network administrator
-and want to block SE-VPN protocols on the firewall, you can adopt a
-"white-list" policy on the firewall to filter any TCP or UDP packets on the
-border except explicitly allowed packets towards specific web sites and
-servers.
-
-1.2. NAT Traversal Function
-Generally, if you use traditional VPN systems you have to request a network
-administrator to make the NAT or firewall to "open" or "relay" specific TCP or
-UDP ports. However, there are demands somehow to eliminate such working costs
-on network administrators. In order to satisfy such demands, SoftEther VPN has
-the newly-implemented "NAT Traversal" function. NAT Traversal is enabled by
-default. A SoftEther VPN Server running on the computer behind NAT or firewall
-can accept VPN connections from the Internet, without any special
-configurations on firewalls or NATs. If you want to disable the NAT Traversal
-function, modify the "DisableNatTraversal" to "true" on the configuration file
-of SoftEther VPN Server. In order to disable it on the client-side, append
-"/tcp" suffix on the destination hostname.
-
-1.3. Dynamic DNS Function
-Traditional legacy VPN system requires a static global IP address on the VPN
-server. In consideration of shortage of global IP addresses, SoftEther
-Corporation implements the "Dynamic DNS Function" on SoftEther VPN Server.
-Dynamic DNS is enabled by default. Dynamic DNS function notify the current
-global IP address of the PC to the Dynamic DNS Servers which are operated by
-SoftEther Corporation. A globally-unique hostname (FQDN) such as
-"abc.softether.net" ( "abc" varies as unique per a user) will be assigned on
-the VPN Server. If you tell this unique hostname to a VPN user, the user can
-specify it as the destination VPN Sever hostname on the VPN Client and will be
-able to connect the VPN Server. No IP addresses are required to know
-beforehand. If the IP address of the VPN Server varies, the registered IP
-address related to the hostname of Dynamic DNS service will be changed
-automatically. By this mechanism, no longer need a static global IP address
-which costs monthly to ISPs. You can use consumer-level inexpensive Internet
-connection with dynamic IP address in order to operate an enterprise-level VPN
-system. If you want to disable Dynamic DNS, specify "true" on the "Disabled"
-items of the "DDnsClient" directive on the SoftEther VPN Server configuration
-file. * Note for residents in People's Republic of China: If your VPN Server
-is running on the People's Republic of China, the DNS suffix will be replaced
-to "sedns.cn" domain. The "sedns.cn" domain is the service possessed and
-operated by "Beijing Daiyuu SoftEther Technology Co., Ltd" which is a
-Chinese-local enterprise.
-
-1.4. VPN over ICMP / VPN over DNS functions
-If you want to make a VPN connection between SoftEther VPN Client / Bridge and
-SoftEther VPN Server, but if TCP and UDP packets are prohibited by the
-firewall, then you can encapsulates payloads into "ICMP" (as known as Ping) or
-"DNS" packets. This function can realize a VPN connection by using ICMP or DNS
-even if the firewall or router blocks every TCP or UDP connections. VPN over
-ICMP / VPN over DNS functions are designed to comply standard ICMP and DNS
-specifications as possible, however it sometimes has a behavior not to fully
-comply them. Therefore, few poor-quality routers may be caused a
-memory-overflow or something troubles when a lot of ICMP or DNS packets are
-passed, and such routers sometimes freezes or reboots. It might affects other
-users on the same network. To avoid such risks, append the suffix "/tcp" on
-the destination hostname which is specified on the VPN-client side to disable
-VPN over ICMP / DNS functions.
-
-1.5. VPN Azure Cloud Service
-If your SoftEther VPN Server is placed behind the NAT or firwall, and by some
-reason you cannot use NAT Traversal function, Dynamic DNS function or VPN over
-ICMP/DNS function, you can use VPN Azure Clouse Service. SoftEther Corporation
-operates VPN Azure Cloud on Internet. After the VPN Server makes a connection
-to the VPN Azure Cloud, the hostname "abc.vpnazure.net" ( "abc" is a unique
-hostname) can be specified to connect to the VPN Server via the VPN Azure
-Cloud. Practically, such a hostname is pointing a global IP address of one of
-cloud servers which are operated by SoftEther Corporation. If A VPN Client
-connects to such a VPN Azure host, then the VPN Azure host will relay all
-traffics between the VPN Client and the VPN Server. VPN Azure is disabled by
-default. You can activate it easily by using VPN Server Configuration Tool.
-
-1.6. UDP Acceleration
-SoftEther VPN has the UDP Acceleration Function. If a VPN consists of two
-sites detects that UDP channel can be established, UDP will be automatically
-used. By this function, throughput of UDP increases. If direct UDP channel can
-be established, direct UDP packets will be used. However, if there is
-something obstacles such as firewalls or NATs, the "UDP Hole Punching"
-technology will be used, instead. The "UDP Hole Punching" uses the cloud
-servers which SoftEther Corporation operates on Internet. UDP Acceleration can
-be disabled anytime by setting up so on the VPN-client side.
-
-
-2. VPN Software
-2.1. SoftEther VPN Client
-If you use SoftEther VPN Client on Windows, the Virtual Network Adapter device
-driver will be installed on Windows. The Virtual Network Adapter is
-implemented as a kernel-mode driver for Windows. The driver is
-digitally-signed by a certificate issued by VeriSign, Inc. and also sub-signed
-by Symantec Corporation. A message to ask you want to sure install the driver
-might be popped up on the screen. SoftEther VPN Client may response the
-message if possible. SoftEther VPN Client also optimizes the configuration of
-MMCSS (Multimedia Class Scheduler Service) on Windows. You can undo the
-optimizations of MMCSS afterwards.
-
-2.2. SoftEther VPN Server / Bridge
-If you use SoftEther VPN Server / Bridge on Windows with "Local Bridge"
-functions, you have to install the low-level Ethernet packet processing driver
-on the computer. The driver is digitally-signed by a certificate issued by
-VeriSign, Inc. and also sub-signed by Symantec Corporation. SoftEther VPN
-Server / Bridge may disable the TCP/IP offloading features on the physical
-network adapter for Local Bridge function. In Windows Vista / 2008 or greater
-version, VPN Server may inject a packet-filter driver which complies Windows
-Filter Platform (WPF) specification into the kernel in order to provide IPsec
-function. The packet-filter driver will be loaded available only if IPsec
-function is enabled. Once you enables IPsec function of SoftEther VPN Server,
-the built-in IPsec function of Windows will be disabled. After you disabled
-IPsec function of SoftEther VPN Server, then the built-in IPsec function of
-Windows will revive. In order to provide the Local Bridge function, SoftEther
-VPN Server / Bridge disables the TCP/IP offloading function on the operating
-system.
-
-2.3. User-mode Installation
-You can install SoftEther VPN Server and SoftEther VPN Bridge as "User-mode"
-on Windows. In other words, even if you don't have Windows system
-administrator's privileges, you can install SoftEther VPN as a normal user.
-User-mode install will disable a few functions, however other most functions
-work well. Therefore, for example, an employee can install SoftEther VPN
-Server on the computer in the office network, and he will be able to connect
-to the server from his home. In order to realize such a system by user-self,
-no system administrative privileges are required in the view-point of
-technical. However, breaking rules of the company to install software on the
-computer without authority might be regarded as an unfavorable behavior. If
-you are an employee and belong to the company, and the company-policy
-prohibits installing software or making communications towards Internet
-without permission, you have to obtain a permission from the network
-administrator or the executive officer of your company in advance to install
-SoftEther VPN. If you install VPN Server / Bridge as User-mode, an icon will
-be appeared on the Windows task-tray. If you feel that the icon disturbs you,
-you can hide it by your operation. However, you must not exploit this hiding
-function to install VPN Server on other person's computer as a spyware. Such
-behavior might be an offence against the criminal law.
-
-2.4. Keep Alive Function
-SoftEther VPN Server and SoftEther VPN Bridge has Keep Alive Function by
-default. The purpose of this function is to sustain the Internet line active.
-The function transmits UDP packets with a random-byte-array-payload
-periodically. This function is useful to avoid automatic disconnection on
-mobile or dial-up connections. You can disable Keep Alive Function anytime.
-
-2.5. Uninstallation
-The uninstallation process of SoftEther VPN software will delete all program
-files. However, non-program files (such as files and data which are generated
-by running of programs) ) will not be deleted. For technical reason, the exe
-and resource files of uninstaller might remain. Such remaining files never
-affects to use the computer, however you can delete it manually. Kernel-mode
-drivers might not be deleted, however such drivers will not be loaded after
-the next boot of Windows. You can use "sc" command of Windows to delete
-kernel-mode drivers manually.
-
-2.6. Security
-You should set the administrator's password on SoftEther VPN Server / Bridge
-after installation. If you neglect to do it, another person can access to
-SoftEther VPN Server / Bridge and can set the password without your
-permission. This caution might be also applied on SoftEther VPN Client for
-Linux.
-
-2.7. Automatic Update Notification
-SoftEther VPN software for Windows has an automatic update notification
-function. It accesses to the SoftEther Update server periodically to check
-whether or not the latest version of software is released. If the latest
-version is released, the notification message will be popped up on the screen.
-In order to achieve this purpose, the version, language settings, the unique
-identifier, the IP address of your computer and the hostname of VPN Server
-which is connected to will be sent to the SoftEther Update server. No personal
-information will be sent. Automatic Update Notification is enabled by default,
-however you can disable it on the configuration screen. The setting whether
-turned on or turned off will be saved individually corresponding to each
-destination VPN server, by VPN Server Manager.
-
-2.8. Virtual NAT Function
-A Virtual Hub on SoftEther VPN Server / Bridge has "Virtual NAT Function" .
-Virtual NAT Function can share a single IP address on the physical network by
-multiple private IP address of VPN Clients. There are two operation mode of
-Virtual NAT: User-mode and Kernel-mode. In the user-mode operation, Virtual
-NAT shares an IP address which is assigned on the host operating system.
-Unlike user-mode, the kernel-mode operation attempts to find DHCP servers on
-the physical network. If there are two or more physical networks, a DHCP
-server will be sought automatically for each segments serially. If a DHCP
-server found, and an IP address is acquired, the IP address will be used by
-the Virtual NAT. In this case, an IP entry as a DHCP client will be registered
-on the IP pool of the physical DHCP Server. The physical default gateway and
-the DNS server will be used by the Virtual NAT in order to communicate with
-hosts in Internet. In kernel-mode operation, a Virtual Hub has a virtual MAC
-address which is operating on the physical Ethernet segment. In order to check
-the connectivity to Internet, SoftEther VPN periodically sends DNS query
-packet to resolve the IP address of host "www.yahoo.com" or "www.baidu.com" ,
-and attempts to connect to the TCP port 80 of such a resulted IP address for
-connectivity check.
-
-2.9. Unattended Installation of Kernel-mode Components
-When SoftEther VPN will detect a necessity to install the kernel-mode
-components on Windows, a confirmation message will be appeared by Windows
-system. In this occasion, SoftEther VPN software will switch to the Unattended
-Installation mode in order to respond "Yes" to Windows. This is a solution to
-prevent dead-locks when a remote-administration is performed from remote
-place.
-
-2.10. Windows Firewall
-SoftEther VPN software will register itself as a safe-program. Such an entry
-will be remain after the uninstallation. You can remove it manually from the
-Control Panel of Windows.
-
-
-3. Internet Services
-3.1. Internet Services which are provided by SoftEther Corporation
-SoftEther Corporation provides Dynamic DNS, NAT Traversal and VPN Azure server
-services on the Internet. These services are free of charge. Customers can
-access to the services by using SoftEther VPN software, via Internet. These
-service will be planned to be available from Open-Source version of "SoftEther
-VPN" which will be released in the future.
-
-3.2. Sent Information and Privacy Protection
-SoftEther VPN software may send an IP address, hostname, the version of VPN
-software on the customer's computer to the cloud service operated by SoftEther
-Corporation, in order to use the above services. These sending of information
-are minimal necessary to use the services. No personal information will be
-sent. SoftEther Corporation records log files of the cloud service servers for
-90 days at least with the received information. Such logs will be used for
-troubleshooting and other legitimate activities. SoftEther Corporation may
-provide logs to a public servant of Japanese government who are belonging to
-courts, police stations and the prosecutor's office, in order to comply such
-authorities' order. (Every Japanese public servants are liable by law to keep
-the information close.) Moreover, the IP addresses or other information will
-be processed statistically and provided to the public, not to expose the each
-concrete IP address, in order to release the release of research activities.
-
-3.3. Communication Data via VPN Azure Service
-Regardless of the above 3.2 rule, if the customer sends or receives VPN
-packets using VPN Azure Cloud Service, the actual payloads will stored and
-forwarded via the volatile memory of the servers for very short period. Such a
-behavior is naturally needed to provide the "VPN relay service" . No payloads
-will be recorded on "fixed" storages such as hard-drives. However, the
-"Wiretapping for Criminals Procedures Act" (The 137th legislation ruled on
-August 18, 1999 in Japan) requires telecommunication companies to allow the
-Japanese government authority to conduct a wire-tapping on the line. VPN Azure
-Servers which are physically placed on Japan are subjects of this law.
-
-3.4. Comply to Japanese Telecommunication Laws
-SoftEther Corporation complies with Japanese Telecommunication Laws as
-necessary to provide online services via Internet.
-
-3.5. Free and Academic Experiment Services
-SoftEther provides Dynamic DNS, NAT Traversal and VPN Azure as academic
-experiment services. Therefore, there services can be used for free of charge.
-These services are not parts of "SoftEther VPN Software Products" . These
-services are provided without any warranty. The services may be suspended or
-discontinued by technical or operational matters. In such occasions, users
-will not be able to use the services. A user have to understand such risks,
-and to acknowledge that such risks are borne by a user-self. SoftEther will
-never be liable to results or damages of use or unable-to-use of the service.
-Even if the user has already paid the license-fee of the commercial version of
-SoftEther VPN, such paid fees don't include any fees of these services.
-Therefore, if the online services will stop or be discontinued, no refunds or
-recoveries of damages will be provided by SoftEther Corporation.
-
-3.6. DNS Proxy Cloud Servers
-In some regions, when a user uses Internet, a DNS query sometimes broken or
-lost when it is passing through the ISP line. If SoftEther VPN Server, Client
-or Bridge detects a possibility that the accessing to the actual VPN server
-might be unstable, then DNS queries will be also transferred to the DNS proxy
-cloud servers which are operated by SoftEther Corporation. A DNS proxy cloud
-server will respond DNS queries with answering correct a IP address.
-
-
-4. General Cautions
-4.1. Needs an Approval from Network Administrator
-SoftEther VPN has powerful functions which don't require special settings by
-network administrators. For example, you need not to ask the administrator to
-configure the existing firewall in order to "open" a TCP/UDP port. Such
-characteristic features are for the purpose to eliminate working times and
-costs of network administrators, and avoid misconfiguration-risks around the
-tasks to open specific exception ports on the firewall. However, any employees
-belong to the company have to obtain an approval from the network
-administrator before installs SoftEther VPN. If your network administrator
-neglects to provide such an approval, you can consider to take an approval
-from an upper authority. (For example, executive officer of the company.) If
-you use SoftEther VPN without any approvals from the authority of your
-company, you might have disadvantage. SoftEther Corporation will be never
-liable for results or damages of using SoftEther VPN.
-
-4.2. Observe Laws of Your Country
-If your country's law prohibits the use of encryption, you have to disable the
-encryption function of SoftEther VPN by yourself. Similarly, in some countries
-or regions, some functions of SoftEther VPN might be prohibited to use by
-laws. Other countries' laws are none of SoftEther Corporation's concern
-because SoftEther Corporation is an enterprise which is located and registered
-in Japan physically. For example, there might be a risk that a part of
-SoftEther VPN conflicts an existing patent which is valid only on the specific
-region. SoftEther Corporation has no interests in such specific region outside
-Japan's territory. Therefore, if you want to use SoftEther VPN in regions
-outside Japan, you have to be careful not to violate third-person's rights.
-You have to verify the legitimacy of the use of SoftEther VPN in the specific
-region before you actually use it in such region. By nature, there are almost
-200 countries in the World, and each country's law is different each other. It
-is practically impossible to verify every countries' laws and regulations and
-make the software comply with all countries' laws in advance to release the
-software. Therefore SoftEther Corporation has verified the legitimacy of
-SoftEther VPN against the laws and regulations of only Japan. If a user uses
-SoftEther VPN in a specific country, and damaged by public servants of the
-government authority, SoftEther Corporation will never be liable to recover or
-compensate such damages or criminal responsibilities.
-
-
-5. VPN Gate Academic Experiment Project
-(This chapter applies only on SoftEther VPN software package which contains
-the extension plug-in for VPN Gate Academic Experiment Project.)
-5.1. About VPN Gate Academic Experiment Project
-VPN Gate Academic Experiment Project is an online service operated for just
-the academic research purpose at the graduate school of University of Tsukuba,
-Japan. The purpose of this research is to expend our knowledge about the
-"Global Distributed Public VPN Relay Server" (GDPVRS) technology. For details,
-please visit http://www.vpngate.net/.
-
-5.2. About VPN Gate Service
-SoftEther VPN Server and SoftEther VPN Client may contain "VPN Gate Service"
-program. However, VPN Gate Service is disabled by default.
-VPN Gate Service should be activated and enabled by the voluntary intention of
-the owner of the computer which SoftEther VPN Server or SoftEther VPN Client
-is installed on. After you activate VPN Gate Service, the computer will be
-start to serve as a part of the Global Distributed Public VPN Relay Servers.
-The IP address, hostname and related information of the computer will be sent
-and registered to the directory server of VPN Gate Academic Experiment
-Project, and they will be published and disclosed to the public. This
-mechanism will allow any VPN Gate Client software's user to connect to the VPN
-Gate Service running on your computer. While the VPN session between a VPN
-Gate Client and your VPN Gate Service is established, the VPN Gate Client's
-user can send/receive any IP packets towards the Internet via the VPN Gate
-Service. The global IP address of the VPN Gate Service's hosing computer will
-be used as the source IP address of such communications which a VPN Gate
-Client initiates.
-VPN Gate Service will send some information to the VPN Gate Academic
-Experiment Service Directory Server. The information includes the operator's
-information which described in section 5.5, logging settings, uptime,
-operating system version, type of protocol, port numbers, quality information,
-statistical information, VPN Gate clients' log history data (includes dates,
-IP addresses, version numbers and IDs) and the version of the software. These
-information will be exposed on the directory. VPN Gate Service also receives a
-key for encoding which is described on the chapter 5.9 from the directory
-server.
-
-5.3. Details of VPN Gate Service's Behavior
-If you enable VPN Gate Service manually, which is disabled by default, the
-"VPNGATE" Virtual Hub will be created on the SoftEther VPN Server. If you are
-using SoftEther VPN Client and attempt to active VPN Gate Service on it, an
-equivalent program to SoftEther VPN Server will be invoked on the same process
-of SoftEther VPN Client, and the "VPNGATE" Virtual Hub will be created. The
-"VPNGATE" Virtual Hub contains a user named "VPN" by default which permits
-anyone on the Internet to make a VPN connection to the Virtual Hub. Once a VPN
-Client connects to the "VPNGATE" Virtual Hub, any communication between the
-user and the Internet will pass through the Virtual Hub, and
-transmitted/received using the physical network interface on the computer
-which SoftEther VPN Server (or SoftEther VPN Client) is running on. This will
-cause the result that a destination host specified by the VPN Client will
-identify that the source of the communication has initiated from the VPN Gate
-Service's hosting computer's IP address. However, for safety, any packets
-which destinations are within 192.168.0.0/255.255.0.0, 172.16.0.0/255.240.0.0
-or 10.0.0.0/255.0.0.0 will be blocked by the "VPNGATE" Virtual Hub in order to
-protect your local network. Therefore, if you run VPN Gate Service on your
-corporate network or private network, it is safe because anonymous VPN Client
-users will not be permitted to access such private networks. VPN Gate Service
-also serves as relay for accessing to the VPN Gate Directory Server.
-In order to make VPN Gate Service familiar with firewalls and NATs, it opens
-an UDP port by using the NAT Traversal function which is described on the
-section 1.2. It also opens and listens on some TCP ports, and some TCP and UDP
-ports will be specified as the target port of Universal Plug and Play (UPnP)
-Port Transfer entries which are requested to your local routers. UPnP request
-packets will be sent periodically. Some routers keep such an opened TCP/UDP
-port permanently on the device. If you wish to close them, do it manually.
-VPN Gate Service also provides the mirror-site function for www.vpngate.net.
-This is a mechanism that a copy of the latest contents from www.vpngate.net
-will be hosted by the mirror-site tiny HTTP server which is running on the VPN
-Gate Service program. It will register itself on the mirror-sites list in
-www.vpngate.net. However, it never relays any other communications which are
-not towards www.vpngate.net.
-
-5.4. Communication between Internet via VPN Gate Service
-VPN Gate Service provides a routing between users and the Internet, by using
-the Virtual NAT Function which is described on the section 2.8. VPN Gate
-Service sends polling Ping packets to the server which is located on
-University of Tsukuba, and the Google Public DNS Server which is identified as
-8.8.8.8, in order to check the latest quality of your Internet line. VPN Gate
-Service also sends and receives a lot of random packets to/from the Speed Test
-Server on University of Tsukuba. These quality data will be reported to VPN
-Gate Directory Server, automatically and periodically. The result will be
-saved and disclosed to the public. These periodical polling communication are
-adjusted not to occupy the Internet line, however in some circumstances they
-might occupy the line.
-
-5.5. Operator's Information of VPN Gate Service
-If you activate VPN Gate Service on your computer, the computer will be a part
-of the Global Distributed Public VPN Relay Servers. Therefore, the Operator's
-administrative information of your VPN Gate Service should be reported and
-registered on the VPN Gate Service Directory. Operator's information contains
-the name of the operator and the abuse-reporting contact e-mail address. These
-information can be inputted on the screen if the VPN Gate configuration.
-Inputted information will be transmitted to the VPN Gate Directory Server,
-stored and disclosed to the public. So you have to be careful to input
-information. By the way, until you specify something as the operator's
-information, the computer's hostname will be used automatically as the field
-of the name of the operator, by appending the "'s owner" string after the
-hostname.
-
-5.6. Observe Laws to Operate VPN Gate Service
-In some countries or regions, a user who is planning to activate and operate
-VPN Gate Service, he are mandated to obtain a license or register a service
-from/to the government. If your region has such a regulation, you must fulfill
-mandated process before activating VPN Gate Service in advance. Neither the
-developers nor operators of the VPN Gate Academic Experiment Project will be
-liable for legal/criminal responsibilities or damages which are occurred from
-failure to comply your local laws.
-
-5.7. Protect Privacy of Communication
-Most of countries have a law which requires communication service's operators,
-including VPN Gate Service operators, to protect the privacy of communication
-of third-persons. When you operate VPN Gate Service, you must always protect
-user's privacy.
-
-5.8. Packet Logs
-The packet logging function is implemented on VPN Gate Service. It records
-essential headers of major TCP/IP packets which are transmitted via the
-Virtual Hub. This function will be helpful to investigate the "original IP
-address" of the initiator of communication who was a connected user of your
-VPN Gate Service, by checking the packet logs and the connection logs. The
-packet logs are recorded only for such legitimate investigates purpose. Do not
-peek nor leak packet logs except the rightful purpose. Such act will be
-violate the section 5.7.
-
-5.9. Packet Logs Automatic Archiving and Encoding Function
-The VPN Gate Academic Experiment Service is operated and running under the
-Japanese constitution and laws. The Japanese constitution laws demand strictly
-protection over the privacy of communication. Because this service is under
-Japanese rules, the program of VPN Gate Service implements this "Automatic Log
-File Encoding" protection mechanism, and enabled by default.
-The VPN Gate Service is currently configured to encode packet log files which
-has passed two or more weeks automatically, by default. In order to protect
-privacy of communication, if a packet log file is once encoded, even the
-administrator of the local computer cannot censor the packet log file. This
-mechanism protects privacy of end-users of VPN Gate Service.
-You can change the VPN Gate Service setting to disable this automatic encoding
-function. Then packet log files will never be encoded even after two weeks
-passed. In such a configuration, all packet logs will remain as plain-text on
-the disk. Therefore you have to take care not to violate user's privacy.
-If you are liable to decode an encoded packet log files (for example: a VPN
-Gate Service's user illegally abused your VPN Gate Service and you have to
-decode the packet logs in order to comply the laws), contact the administrator
-of the VPN Gate Academic Experiment Service at Graduate School of University
-of Tsukuba, Japan. You can find the contact address at
-http://www.vpngate.net/. The administrator of VPN Gate Service will respond to
-decode the packet logs if there is an appropriate and legal request from court
-or other judicial authorities, according to laws.
-
-5.10. Caution if You Operate VPN Gate Service in the Japan's Territories
-When a user operates VPN Gate Service in the Japan's territories, such an act
-may be regulated under the Japanese Telecommunication Laws if the operation is
-a subject to the law. However, in such a circumstance, according to the
-"Japanese Telecommunication Business Compete Manual [supplemental version]" ,
-non- profitable operations of communications are not identified as a
-"telecommunication business" . So usual operators of VPN Gate Service are not
-subjects to "telecommunication business operators" , and not be mandated to
-register to the government. Even so, legalities to protect the privacy of
-communication still imposed. As a conclusion, if you operate VPN Gate Service
-in the Japan's Territories, you must not leak the secrets of communications
-which are transmitted via your operating VPN Gate Service.
-
-5.11. VPN Gate Client
-If SoftEther VPN Client contains the VPN Gate Client plug-in, you can use it
-to obtain the list of current operating VPN Gate Service servers in the
-Internet, and make a VPN connection to a specific server on the list.
-VPN Gate Client always keeps the latest list of the VPN Gate Services
-periodically. Be careful if you are using a pay-per-use Internet line.
-When you start the VPN Gate Client software, the screen which asks you
-activate or not VPN Gate Service will be appeared. For details of VPN Gate
-Service, read the above sections.
-
-5.12. Caution before Joining or Exploiting VPN Gate Academic Experiment
-Project
-The VPN Gate Academic Experiment Service is operated as a research project at
-the graduate school on University of Tsukuba, Japan. The service is governed
-under the Japanese laws. Other countries' laws are none of our concerns nor
-responsibilities.
-By nature, there are almost 200 countries in the World, with different laws.
-It is impossible to verify every countries' laws and regulations and make the
-software comply with all countries' laws in advance to release the software.
-If a user uses VPN Gate service in a specific country, and damaged by public
-servants of the authority, the developer of either the service or software
-will never be liable to recover or compensate such damages or criminal
-responsibilities.
-By using this software and service, the user must observe all concerned laws
-and rules with user's own responsibility. The user will be completely liable
-to any damages and responsibilities which are results of using this software
-and service, regardless of either inside or outside of Japan's territory.
-If you don't agree nor understand the above warnings, do not use any of VPN
-Gate Academic Experiment Service functions.
-VPN Gate is a research project for just academic purpose only. VPN Gate was
-developed as a plug-in for SoftEther VPN and UT-VPN. However, all parts of VPN
-Gate were developed on this research project at University of Tsukuba. Any
-parts of VPN Gate are not developed by SoftEther Corporation. The VPN Gate
-Research Project is not a subject to be led, operated, promoted nor guaranteed
-by SoftEther Corporation.
-
-

+ 9 - 2028
src/LICENSE.TXT

@@ -56,13 +56,17 @@ COMMUNICATIONS. USING THIS SOFTWARE IN OTHER COUNTRIES MIGHT BE RESTRICTED.
 THE FOLLOWING GPLV2 CONDITIONS APPLY ON ALL SOFTETHER VPN PROGRAMS WHICH ARE
 DEVELOPED BY SOFTETHER VPN PROJECT.
 
+READ AND UNDERSTAND THE 'WARNING.TXT' FILE BEFORE USING THIS SOFTWARE.
+SOME SOFTWARE PROGRAMS FROM THIRD PARTIES ARE INCLUDED ON THIS SOFTWARE WITH
+LICENSE CONDITIONS WHICH ARE DESCRIBED ON THE 'THIRD_PARTY.TXT' FILE.
+
                     GNU GENERAL PUBLIC LICENSE
                        Version 2, June 1991
 
  Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
+ Everyone is permitted to copy and distribute verbatim copies of this license
+document, but changing it is not allowed.
 
                             Preamble
 
@@ -320,2031 +324,8 @@ DAMAGES.
 
                      END OF TERMS AND CONDITIONS
 
-Note that the above copyright notices and use conditions do not apply on the
-software components listed in below which are included in this Software. When
-you use or distribute Software with including these libraries, you have to
-follow the conditions of these libraries.
-
-These library's copyright notices and conditions are following;
-
--------------------
-
-BitVisor(R) VPN Client Module (IPsec Driver):
-Copyright (c) 2007, 2008 University of Tsukuba.
-Copyright (C) 2007, 2008 National Institute of Information and Communications
-Technology.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. Neither the name of the University of Tsukuba nor the names of its
-contributors may be used to endorse or promote products derived from this
-software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------
-
-Microsoft(R) C Runtime Library:
-(c) 2007 Microsoft Corporation. All Rights Reserved.
-
--------------------
-
-RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki):
-
-License to copy and use this software is granted provided that it is
-identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface
-(Cryptoki)" in all material mentioning or referencing this software.
-
-License is also granted to make and use derivative works provided that such
-works are identified as "derived from the RSA Security Inc. PKCS #11
-Cryptographic Token Interface (Cryptoki)" in all material mentioning or
-referencing the derived work.
-
-RSA Security Inc. makes no representations concerning either the
-merchantability of this software or the suitability of this software for any
-particular purpose. It is provided "as is" without express or implied warranty
-of any kind.
-
--------------------
-
-WinPcap:
-Copyright (c) 2001 - 2003 NetGroup, Politecnico di Torino (Italy)
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. Neither the name of the Politecnico di Torino nor the names of its
-contributors may be used to endorse or promote products derived from this
-software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------
-
-libedit:
-Copyright (c) 1992, 1993 The Regents of the University of California.  All
-rights reserved.
-
-This code is derived from software contributed to Berkeley by Christos Zoulas
-of Cornell University.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. Neither the name of the University nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------
-
-libiconv:
-
-          GNU LIBRARY GENERAL PUBLIC LICENSE
-               Version 2, June 1991
-
- Copyright (C) 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- Everyone is permitted to copy and distribute verbatim copies of this license
-document, but changing it is not allowed.
-
-[This is the first released version of the library GPL. It is
- numbered 2 because it goes with version 2 of the ordinary GPL.]
-
-                Preamble
-
-  The licenses for most software are designed to take away your freedom to
-share and change it. By contrast, the GNU General Public Licenses are intended
-to guarantee your freedom to share and change free software--to make sure the
-software is free for all its users.
-
-  This license, the Library General Public License, applies to some specially
-designated Free Software Foundation software, and to any other libraries whose
-authors decide to use it. You can use it for your libraries, too.
-
-  When we speak of free software, we are referring to freedom, not price. Our
-General Public Licenses are designed to make sure that you have the freedom to
-distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new free
-programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid anyone to
-deny you these rights or to ask you to surrender the rights. These
-restrictions translate to certain responsibilities for you if you distribute
-copies of the library, or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis or for
-a fee, you must give the recipients all the rights that we gave you. You must
-make sure that they, too, receive or can get the source
-code. If you link a program with the library, you must provide complete object
-files to the recipients so that they can relink them with the library, after
-making changes to the library and recompiling it. And you must show them these
-terms so they know their rights.
-
-  Our method of protecting your rights has two steps: (1) copyright the
-library, and (2) offer you this license which gives you legal permission to
-copy, distribute and/or modify the library.
-
-  Also, for each distributor's protection, we want to make certain that
-everyone understands that there is no warranty for this free library. If the
-library is modified by someone else and passed on, we want its recipients to
-know that what they have is not the original version, so that any problems
-introduced by others will not reflect on the original authors' reputations.
-
-  Finally, any free program is threatened constantly by software patents. We
-wish to avoid the danger that companies distributing free software will
-individually obtain patent licenses, thus in effect transforming the program
-into proprietary software. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  Most GNU software, including some libraries, is covered by the ordinary GNU
-General Public License, which was designed for utility programs. This license,
-the GNU Library General Public License, applies to certain designated
-libraries. This license is quite different from the ordinary one; be sure to
-read it in full, and don't assume that anything in it is the same as in the
-ordinary license.
-
-  The reason we have a separate public license for some libraries is that they
-blur the distinction we usually make between modifying or adding to a program
-and simply using it. Linking a program with a library, without changing the
-library, is in some sense simply using the library, and is analogous to
-running a utility program or application program. However, in a textual and
-legal sense, the linked executable is a combined work, a derivative of the
-original library, and the ordinary General Public License treats it as such.
-
-  Because of this blurred distinction, using the ordinary General Public
-License for libraries did not effectively promote software sharing, because
-most developers did not use the libraries. We concluded that weaker conditions
-might promote sharing better.
-
-  However, unrestricted linking of non-free programs would deprive the users
-of those programs of all benefit from the free status of the libraries
-themselves. This Library General Public License is intended to
-permit developers of non-free programs to use free libraries, while preserving
-your freedom as a user of such programs to change the free libraries that are
-incorporated in them. (We have not seen how to achieve this as regards changes
-in header files, but we have achieved it as regards changes in the actual
-functions of the Library.) The hope is that this will lead to faster
-development of free libraries.
-
-  The precise terms and conditions for copying, distribution and modification
-follow. Pay close attention to the difference between a "work based on the
-library" and a "work that uses the library". The former contains code derived
-from the library, while the latter only works together with the library.
-
-  Note that it is possible for a library to be covered by the ordinary General
-Public License rather than by this special one.
-
-          GNU LIBRARY GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library which contains a
-notice placed by the copyright holder or other authorized party saying it may
-be distributed under the terms of this Library
-General Public License (also called "this License"). Each licensee is
-addressed as "you".
-
-  A "library" means a collection of software functions and/or data prepared so
-as to be conveniently linked with application programs (which use some of
-those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work which has
-been distributed under these terms. A "work based on the Library" means either
-the Library or any derivative work under copyright law: that is to say, a work
-containing the Library or a portion of it, either verbatim or with
-modifications and/or translated straightforwardly into another language.
-(Hereinafter, translation is included without limitation in the term
-"modification".)
-
-  "Source code" for a work means the preferred form of the work for making
-modifications to it. For a library, complete source code means all the source
-code for all modules it contains, plus any associated interface definition
-files, plus the scripts used to control compilation and installation of the
-library.
-
-  Activities other than copying, distribution and modification are not covered
-by this License; they are outside its scope. The act of running a program
-using the Library is not restricted, and output from such a program is covered
-only if its contents constitute a work based on the Library (independent of
-the use of the Library in a tool for writing it). Whether that is true depends
-on what the Library does and what the program that uses the Library does.
-
-  1. You may copy and distribute verbatim copies of the Library's complete
-source code as you receive it, in any medium, provided that you conspicuously
-and appropriately publish on each copy an appropriate copyright notice and
-disclaimer of warranty; keep intact all the notices that refer to this License
-and to the absence of any warranty; and distribute a copy of this License
-along with the Library.
-
-  You may charge a fee for the physical act of transferring a copy, and you
-may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Library or any portion of it,
-thus forming a work based on the Library, and copy and distribute such
-modifications or work under the terms of Section 1 above, provided that you
-also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices stating
-that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no charge to all
-third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a table
-of data to be supplied by an application program that uses the facility, other
-than as an argument passed when the facility is invoked, then you must make a
-good faith effort to ensure that, in the event an application does not supply
-such function or table, the facility still operates, and performs whatever
-part of its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has a
-purpose that is entirely well-defined independent of the application.
-Therefore, Subsection 2d requires that any application-supplied function or
-table used by this function must be optional: if the application does not
-supply it, the square root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If identifiable
-sections of that work are not derived from the Library, and can be reasonably
-considered independent and separate works in themselves, then this License,
-and its terms, do not apply to those sections when you distribute them as
-separate works. But when you distribute the same sections as part of a whole
-which is a work based on the Library, the distribution of the whole must be on
-the terms of this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest your
-rights to work written entirely by you; rather, the intent is to exercise the
-right to control the distribution of derivative or collective works based on
-the Library.
-
-In addition, mere aggregation of another work not based on the Library with
-the Library (or with a work based on the Library) on a volume of a storage or
-distribution medium does not bring the other work under the scope of this
-License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do this,
-you must alter all the notices that refer to this License, so that they refer
-to the ordinary GNU General Public License, version 2, instead of to this
-License. (If a newer version than version 2 of the ordinary GNU General Public
-License has appeared, then you can specify that version instead if you wish.)
-Do not make any other change in these notices.
-
-  Once this change is made in a given copy, it is irreversible for that copy,
-so the ordinary GNU General Public License applies to all subsequent copies
-and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of the Library
-into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or derivative of
-it, under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you accompany it with the complete
-corresponding machine-readable source code, which must be distributed under
-the terms of Sections 1 and 2 above on a medium customarily used for software
-interchange.
-
-  If distribution of object code is made by offering access to copy from a
-designated place, then offering equivalent access to copy the source code from
-the same place satisfies the requirement to distribute the source code, even
-though third parties are not compelled to copy the source along with the
-object code.
-
-  5. A program that contains no derivative of any portion of the Library, but
-is designed to work with the Library by being compiled or linked with it, is
-called a "work that uses the Library". Such a work, in isolation, is not a
-derivative work of the Library, and therefore falls outside the scope of this
-License.
-
-  However, linking a "work that uses the Library" with the Library creates an
-executable that is a derivative of the Library (because it contains portions
-of the Library), rather than a "work that uses the library". The executable is
-therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file that is
-part of the Library, the object code for the work may be a derivative work of
-the Library even though the source code is not.
-Whether this is true is especially significant if the work can be linked
-without the Library, or if the work is itself a library. The threshold for
-this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data structure
-layouts and accessors, and small macros and small inline functions (ten lines
-or less in length), then the use of the object file is unrestricted,
-regardless of whether it is legally a derivative work. (Executables containing
-this object code plus portions of the Library will still fall under Section
-6.)
-
-  Otherwise, if the work is a derivative of the Library, you may distribute
-the object code for the work under the terms of Section 6. Any executables
-containing that work also fall under Section 6, whether or not they are linked
-directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also compile or link a
-"work that uses the Library" with the Library to produce a work containing
-portions of the Library, and distribute that work under terms of your choice,
-provided that the terms permit modification of the work for the customer's own
-use and reverse engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the Library
-is used in it and that the Library and its use are covered by this License.
-You must supply a copy of this License. If the work during execution displays
-copyright notices, you must include the copyright notice for the Library among
-them, as well as a reference directing the user to the copy of this License.
-Also, you must do one of these things:
-
-    a) Accompany the work with the complete corresponding machine-readable
-source code for the Library including whatever changes were used in the work
-(which must be distributed under Sections 1 and 2 above) ; and, if the work is
-an executable linked with the Library, with the complete machine-readable
-"work that uses the Library", as object code and/or source code, so that the
-user can modify the Library and then relink to produce a modified executable
-containing the modified Library. (It is understood that the user who changes
-the contents of definitions files in the Library will not necessarily be able
-to recompile the application to use the modified definitions.)
-
-    b) Accompany the work with a written offer, valid for at least three
-years, to give the same user the materials specified in Subsection 6a, above,
-for a charge no more than the cost of performing this distribution.
-
-    c) If distribution of the work is made by offering access to copy from a
-designated place, offer equivalent access to copy the above specified
-materials from the same place.
-
-    d) Verify that the user has already received a copy of these materials or
-that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the Library"
-must include any data and utility programs needed for reproducing the
-executable from it. However, as a special exception, the source code
-distributed need not include anything that is normally distributed (in either
-source or binary form) with the major components (compiler, kernel, and so on)
-of the operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-  It may happen that this requirement contradicts the license restrictions of
-other proprietary libraries that do not normally accompany the operating
-system. Such a contradiction means you cannot use both them and the Library
-together in an executable that you distribute.
-
-  7. You may place library facilities that are a work based on the Library
-side-by-side in a single library together with other library facilities not
-covered by this License, and distribute such a combined library, provided that
-the separate distribution of the work based on the Library and of the other
-library facilities is otherwise permitted, and provided that you do these two
-things:
-
-    a) Accompany the combined library with a copy of the same work based on
-the Library, uncombined with any other library facilities. This must be
-distributed under the terms of the Sections above.
-
-    b) Give prominent notice with the combined library of the fact that part
-of it is a work based on the Library, and explaining where to find the
-accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute the
-Library except as expressly provided under this License. Any attempt otherwise
-to copy, modify, sublicense, link with, or distribute the Library is void, and
-will automatically terminate your rights under this License. However, parties
-who have received copies, or rights, from you under this License will not have
-their licenses terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not signed
-it. However, nothing else grants you permission to modify or distribute the
-Library or its derivative works. These actions are prohibited by law if you do
-not accept this License. Therefore, by modifying or distributing the Library
-(or any work based on the Library), you indicate your acceptance of this
-License to do so, and all its terms and conditions for copying, distributing
-or modifying the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the original
-licensor to copy, distribute, link with or modify the Library subject to these
-terms and conditions. You may not impose any further restrictions on the
-recipients' exercise of the rights granted herein. You are not responsible for
-enforcing compliance by third parties to this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or otherwise)
-that contradict the conditions of this License, they do not excuse you from
-the conditions of this License. If you cannot distribute so as to satisfy
-simultaneously your obligations under this License and any other pertinent
-obligations, then as a consequence you may not distribute the Library at all.
-For example, if a patent license would not permit royalty-free redistribution
-of the Library by all those who receive copies directly or indirectly through
-you, then the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply, and
-the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any patents or
-other property right claims or to contest validity of any such claims; this
-section has the sole purpose of protecting the integrity of the free software
-distribution system which is implemented by public license practices. Many
-people have made generous contributions to the wide range of software
-distributed through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing to
-distribute software through any other system and a licensee cannot impose that
-choice.
-
-This section is intended to make thoroughly clear what is believed to be a
-consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in certain
-countries either by patents or by copyrighted interfaces, the original
-copyright holder who places the Library under this License may add an explicit
-geographical distribution limitation excluding those countries, so that
-distribution is permitted only in or among countries not thus excluded. In
-such case, this License incorporates the limitation as if written in the body
-of this License.
-
-  13. The Free Software Foundation may publish revised and/or new versions of
-the Library General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and "any later
-version", you have the option of following the terms and conditions either of
-that version or of any later version published by the Free Software
-Foundation. If the Library does not specify a license version number, you may
-choose any version ever published by the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free programs
-whose distribution conditions are incompatible with these, write to the author
-to ask for permission. For software which is copyrighted by the Free Software
-Foundation, write to the Free Software Foundation; we sometimes make
-exceptions for this. Our decision will be guided by the two goals of
-preserving the free status of all derivatives of our free software and of
-promoting the sharing and reuse of software generally.
-
-                NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
-THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
-STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
-LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
-PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE,
-YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO
-LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR
-THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-             END OF TERMS AND CONDITIONS
-
--------------------
-
-ncurses:
-Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, distribute with
-modifications, sublicense, and/or sell copies of the Software, and to permit
-persons to whom the Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name(s) of the above copyright holders
-shall not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization.
-
--------------------
-
-OpenSSL:
-OpenSSL License
-Copyright (c) 1998-2011 The OpenSSL Project.  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer. 
-
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-
-3. All advertising materials mentioning features or use of this software must
-display the following acknowledgment: "This product includes software
-developed by the OpenSSL Project for use in the OpenSSL Toolkit.
-(http://www.openssl.org/)"
-
-4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
-endorse or promote products derived from this software without prior written
-permission. For written permission, please contact [email protected].
-
-5. Products derived from this software may not be called "OpenSSL" nor may
-"OpenSSL" appear in their names without prior written permission of the
-OpenSSL Project.
-
-6. Redistributions of any form whatsoever must retain the following
-acknowledgment: "This product includes software developed by the OpenSSL
-Project for use in the OpenSSL Toolkit (http://www.openssl.org/)"
-
-THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY EXPRESSED
-OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
-EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-This product includes cryptographic software written by Eric Young
-([email protected]).  This product includes software written by Tim Hudson
-([email protected]).
-
-Original SSLeay License
-Copyright (C) 1995-1998 Eric Young ([email protected]) All rights reserved.
-
-This package is an SSL implementation written by Eric Young
-([email protected]). The implementation was written so as to conform with
-Netscapes SSL.
-
-This library is free for commercial and non-commercial use as long as the
-following conditions are aheared to.  The following conditions apply to all
-code found in this distribution, be it the RC4, RSA, lhash, DES, etc., code;
-not just the SSL code.  The SSL documentation included with this distribution
-is covered by the same copyright terms except that the holder is Tim Hudson
-([email protected]).
-
-Copyright remains Eric Young's, and as such any Copyright notices in the code
-are not to be removed. If this package is used in a product, Eric Young should
-be given attribution as the author of the parts of the library used. This can
-be in the form of a textual message at program startup or in documentation
-(online or textual) provided with the package.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-1. Redistributions of source code must retain the copyright notice, this list
-of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. All advertising materials mentioning features or use of this software must
-display the following acknowledgement: "This product includes cryptographic
-software written by Eric Young ([email protected])" The word 'cryptographic'
-can be left out if the rouines from the library being used are not
-cryptographic related :-).
-4. If you include any Windows specific code (or a derivative thereof) from the
-apps directory (application code) you must include an acknowledgement: "This
-product includes software written by Tim Hudson ([email protected])"
-
-THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
-EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-The licence and distribution terms for any publically available version or
-derivative of this code cannot be changed.  i.e. this code cannot simply be
-copied and put under another distribution licence [including the GNU Public
-Licence.]
-
--------------------
-
-zlib:
-Acknowledgments:
-  The deflate format used by zlib was defined by Phil Katz. The deflate and
-zlib specifications were written by L. Peter Deutsch. Thanks to all the people
-who reported problems and suggested various improvements in zlib; they are too
-numerous to cite here.
-
-Copyright notice:
- (C) 1995-2004 Jean-loup Gailly and Mark Adler
-
-  This software is provided 'as-is', without any express or implied warranty.
-In no event will the authors be held liable for any damages arising from the
-use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-including commercial applications, and to alter it and redistribute it freely,
-subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-claim that you wrote the original software. If you use this software in a
-product, an acknowledgment in the product documentation would be appreciated
-but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Jean-loup Gailly        Mark Adler
-  [email protected]          [email protected]
-
-If you use the zlib library in a product, we would appreciate *not* receiving
-lengthy legal documents to sign. The sources are provided for free but without
-warranty of any kind.  The library has been entirely written by Jean-loup
-Gailly and Mark Adler; it does not include third-party code.
-
-If you redistribute modified sources, we would appreciate that you include in
-the file ChangeLog history information documenting your changes. Please read
-the FAQ for more information on the distribution of modified source versions.
-
--------------------
-
-Intel AESNI Sample Library:
-
-Copyright (c) 2010, Intel Corporation
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors may
-be used to endorse or promote products derived from this software without
-specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Issue Date: Aug 6, 2010
-
--------------------
-
-NOTES
-
-SoftEther provides source codes of some GPL/LGPL/other libraries listed above
-on its web server. Anyone can download, use and re-distribute them under
-individual licenses which are contained on each archive file, available from
-the following URL:
-http://uploader.softether.co.jp/src/
-
-
-
-BitVisor(R) VPN Client Module (IPsec Driver):
-Copyright (c) 2007, 2008 University of Tsukuba.
-Copyright (C) 2007, 2008 National Institute of Information and Communications
-Technology.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. Neither the name of the University of Tsukuba nor the names of its
-contributors may be used to endorse or promote products derived from this
-software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------
-
-Microsoft(R) C Runtime Library:
-(c) 2007 Microsoft Corporation. All Rights Reserved.
-
--------------------
-
-RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki):
-
-License to copy and use this software is granted provided that it is
-identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface
-(Cryptoki)" in all material mentioning or referencing this software.
-
-License is also granted to make and use derivative works provided that such
-works are identified as "derived from the RSA Security Inc. PKCS #11
-Cryptographic Token Interface (Cryptoki)" in all material mentioning or
-referencing the derived work.
-
-RSA Security Inc. makes no representations concerning either the
-merchantability of this software or the suitability of this software for any
-particular purpose. It is provided "as is" without express or implied warranty
-of any kind.
-
--------------------
-
-WinPcap:
-Copyright (c) 2001 - 2003 NetGroup, Politecnico di Torino (Italy)
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. Neither the name of the Politecnico di Torino nor the names of its
-contributors may be used to endorse or promote products derived from this
-software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------
-
-libedit:
-Copyright (c) 1992, 1993 The Regents of the University of California.  All
-rights reserved.
-
-This code is derived from software contributed to Berkeley by Christos Zoulas
-of Cornell University.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. Neither the name of the University nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------
-
-libiconv:
-
-          GNU LIBRARY GENERAL PUBLIC LICENSE
-               Version 2, June 1991
-
- Copyright (C) 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- Everyone is permitted to copy and distribute verbatim copies of this license
-document, but changing it is not allowed.
-
-[This is the first released version of the library GPL. It is
- numbered 2 because it goes with version 2 of the ordinary GPL.]
-
-                Preamble
-
-  The licenses for most software are designed to take away your freedom to
-share and change it. By contrast, the GNU General Public Licenses are intended
-to guarantee your freedom to share and change free software--to make sure the
-software is free for all its users.
-
-  This license, the Library General Public License, applies to some specially
-designated Free Software Foundation software, and to any other libraries whose
-authors decide to use it. You can use it for your libraries, too.
-
-  When we speak of free software, we are referring to freedom, not price. Our
-General Public Licenses are designed to make sure that you have the freedom to
-distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new free
-programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid anyone to
-deny you these rights or to ask you to surrender the rights. These
-restrictions translate to certain responsibilities for you if you distribute
-copies of the library, or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis or for
-a fee, you must give the recipients all the rights that we gave you. You must
-make sure that they, too, receive or can get the source
-code. If you link a program with the library, you must provide complete object
-files to the recipients so that they can relink them with the library, after
-making changes to the library and recompiling it. And you must show them these
-terms so they know their rights.
-
-  Our method of protecting your rights has two steps: (1) copyright the
-library, and (2) offer you this license which gives you legal permission to
-copy, distribute and/or modify the library.
-
-  Also, for each distributor's protection, we want to make certain that
-everyone understands that there is no warranty for this free library. If the
-library is modified by someone else and passed on, we want its recipients to
-know that what they have is not the original version, so that any problems
-introduced by others will not reflect on the original authors' reputations.
-
-  Finally, any free program is threatened constantly by software patents. We
-wish to avoid the danger that companies distributing free software will
-individually obtain patent licenses, thus in effect transforming the program
-into proprietary software. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  Most GNU software, including some libraries, is covered by the ordinary GNU
-General Public License, which was designed for utility programs. This license,
-the GNU Library General Public License, applies to certain designated
-libraries. This license is quite different from the ordinary one; be sure to
-read it in full, and don't assume that anything in it is the same as in the
-ordinary license.
-
-  The reason we have a separate public license for some libraries is that they
-blur the distinction we usually make between modifying or adding to a program
-and simply using it. Linking a program with a library, without changing the
-library, is in some sense simply using the library, and is analogous to
-running a utility program or application program. However, in a textual and
-legal sense, the linked executable is a combined work, a derivative of the
-original library, and the ordinary General Public License treats it as such.
-
-  Because of this blurred distinction, using the ordinary General Public
-License for libraries did not effectively promote software sharing, because
-most developers did not use the libraries. We concluded that weaker conditions
-might promote sharing better.
-
-  However, unrestricted linking of non-free programs would deprive the users
-of those programs of all benefit from the free status of the libraries
-themselves. This Library General Public License is intended to
-permit developers of non-free programs to use free libraries, while preserving
-your freedom as a user of such programs to change the free libraries that are
-incorporated in them. (We have not seen how to achieve this as regards changes
-in header files, but we have achieved it as regards changes in the actual
-functions of the Library.) The hope is that this will lead to faster
-development of free libraries.
-
-  The precise terms and conditions for copying, distribution and modification
-follow. Pay close attention to the difference between a "work based on the
-library" and a "work that uses the library". The former contains code derived
-from the library, while the latter only works together with the library.
-
-  Note that it is possible for a library to be covered by the ordinary General
-Public License rather than by this special one.
-
-          GNU LIBRARY GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library which contains a
-notice placed by the copyright holder or other authorized party saying it may
-be distributed under the terms of this Library
-General Public License (also called "this License"). Each licensee is
-addressed as "you".
-
-  A "library" means a collection of software functions and/or data prepared so
-as to be conveniently linked with application programs (which use some of
-those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work which has
-been distributed under these terms. A "work based on the Library" means either
-the Library or any derivative work under copyright law: that is to say, a work
-containing the Library or a portion of it, either verbatim or with
-modifications and/or translated straightforwardly into another language.
-(Hereinafter, translation is included without limitation in the term
-"modification".)
-
-  "Source code" for a work means the preferred form of the work for making
-modifications to it. For a library, complete source code means all the source
-code for all modules it contains, plus any associated interface definition
-files, plus the scripts used to control compilation and installation of the
-library.
-
-  Activities other than copying, distribution and modification are not covered
-by this License; they are outside its scope. The act of running a program
-using the Library is not restricted, and output from such a program is covered
-only if its contents constitute a work based on the Library (independent of
-the use of the Library in a tool for writing it). Whether that is true depends
-on what the Library does and what the program that uses the Library does.
-
-  1. You may copy and distribute verbatim copies of the Library's complete
-source code as you receive it, in any medium, provided that you conspicuously
-and appropriately publish on each copy an appropriate copyright notice and
-disclaimer of warranty; keep intact all the notices that refer to this License
-and to the absence of any warranty; and distribute a copy of this License
-along with the Library.
-
-  You may charge a fee for the physical act of transferring a copy, and you
-may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Library or any portion of it,
-thus forming a work based on the Library, and copy and distribute such
-modifications or work under the terms of Section 1 above, provided that you
-also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices stating
-that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no charge to all
-third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a table
-of data to be supplied by an application program that uses the facility, other
-than as an argument passed when the facility is invoked, then you must make a
-good faith effort to ensure that, in the event an application does not supply
-such function or table, the facility still operates, and performs whatever
-part of its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has a
-purpose that is entirely well-defined independent of the application.
-Therefore, Subsection 2d requires that any application-supplied function or
-table used by this function must be optional: if the application does not
-supply it, the square root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If identifiable
-sections of that work are not derived from the Library, and can be reasonably
-considered independent and separate works in themselves, then this License,
-and its terms, do not apply to those sections when you distribute them as
-separate works. But when you distribute the same sections as part of a whole
-which is a work based on the Library, the distribution of the whole must be on
-the terms of this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest your
-rights to work written entirely by you; rather, the intent is to exercise the
-right to control the distribution of derivative or collective works based on
-the Library.
-
-In addition, mere aggregation of another work not based on the Library with
-the Library (or with a work based on the Library) on a volume of a storage or
-distribution medium does not bring the other work under the scope of this
-License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do this,
-you must alter all the notices that refer to this License, so that they refer
-to the ordinary GNU General Public License, version 2, instead of to this
-License. (If a newer version than version 2 of the ordinary GNU General Public
-License has appeared, then you can specify that version instead if you wish.)
-Do not make any other change in these notices.
-
-  Once this change is made in a given copy, it is irreversible for that copy,
-so the ordinary GNU General Public License applies to all subsequent copies
-and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of the Library
-into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or derivative of
-it, under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you accompany it with the complete
-corresponding machine-readable source code, which must be distributed under
-the terms of Sections 1 and 2 above on a medium customarily used for software
-interchange.
-
-  If distribution of object code is made by offering access to copy from a
-designated place, then offering equivalent access to copy the source code from
-the same place satisfies the requirement to distribute the source code, even
-though third parties are not compelled to copy the source along with the
-object code.
-
-  5. A program that contains no derivative of any portion of the Library, but
-is designed to work with the Library by being compiled or linked with it, is
-called a "work that uses the Library". Such a work, in isolation, is not a
-derivative work of the Library, and therefore falls outside the scope of this
-License.
-
-  However, linking a "work that uses the Library" with the Library creates an
-executable that is a derivative of the Library (because it contains portions
-of the Library), rather than a "work that uses the library". The executable is
-therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file that is
-part of the Library, the object code for the work may be a derivative work of
-the Library even though the source code is not.
-Whether this is true is especially significant if the work can be linked
-without the Library, or if the work is itself a library. The threshold for
-this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data structure
-layouts and accessors, and small macros and small inline functions (ten lines
-or less in length), then the use of the object file is unrestricted,
-regardless of whether it is legally a derivative work. (Executables containing
-this object code plus portions of the Library will still fall under Section
-6.)
-
-  Otherwise, if the work is a derivative of the Library, you may distribute
-the object code for the work under the terms of Section 6. Any executables
-containing that work also fall under Section 6, whether or not they are linked
-directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also compile or link a
-"work that uses the Library" with the Library to produce a work containing
-portions of the Library, and distribute that work under terms of your choice,
-provided that the terms permit modification of the work for the customer's own
-use and reverse engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the Library
-is used in it and that the Library and its use are covered by this License.
-You must supply a copy of this License. If the work during execution displays
-copyright notices, you must include the copyright notice for the Library among
-them, as well as a reference directing the user to the copy of this License.
-Also, you must do one of these things:
-
-    a) Accompany the work with the complete corresponding machine-readable
-source code for the Library including whatever changes were used in the work
-(which must be distributed under Sections 1 and 2 above) ; and, if the work is
-an executable linked with the Library, with the complete machine-readable
-"work that uses the Library", as object code and/or source code, so that the
-user can modify the Library and then relink to produce a modified executable
-containing the modified Library. (It is understood that the user who changes
-the contents of definitions files in the Library will not necessarily be able
-to recompile the application to use the modified definitions.)
-
-    b) Accompany the work with a written offer, valid for at least three
-years, to give the same user the materials specified in Subsection 6a, above,
-for a charge no more than the cost of performing this distribution.
-
-    c) If distribution of the work is made by offering access to copy from a
-designated place, offer equivalent access to copy the above specified
-materials from the same place.
-
-    d) Verify that the user has already received a copy of these materials or
-that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the Library"
-must include any data and utility programs needed for reproducing the
-executable from it. However, as a special exception, the source code
-distributed need not include anything that is normally distributed (in either
-source or binary form) with the major components (compiler, kernel, and so on)
-of the operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-  It may happen that this requirement contradicts the license restrictions of
-other proprietary libraries that do not normally accompany the operating
-system. Such a contradiction means you cannot use both them and the Library
-together in an executable that you distribute.
-
-  7. You may place library facilities that are a work based on the Library
-side-by-side in a single library together with other library facilities not
-covered by this License, and distribute such a combined library, provided that
-the separate distribution of the work based on the Library and of the other
-library facilities is otherwise permitted, and provided that you do these two
-things:
-
-    a) Accompany the combined library with a copy of the same work based on
-the Library, uncombined with any other library facilities. This must be
-distributed under the terms of the Sections above.
-
-    b) Give prominent notice with the combined library of the fact that part
-of it is a work based on the Library, and explaining where to find the
-accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute the
-Library except as expressly provided under this License. Any attempt otherwise
-to copy, modify, sublicense, link with, or distribute the Library is void, and
-will automatically terminate your rights under this License. However, parties
-who have received copies, or rights, from you under this License will not have
-their licenses terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not signed
-it. However, nothing else grants you permission to modify or distribute the
-Library or its derivative works. These actions are prohibited by law if you do
-not accept this License. Therefore, by modifying or distributing the Library
-(or any work based on the Library), you indicate your acceptance of this
-License to do so, and all its terms and conditions for copying, distributing
-or modifying the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the original
-licensor to copy, distribute, link with or modify the Library subject to these
-terms and conditions. You may not impose any further restrictions on the
-recipients' exercise of the rights granted herein. You are not responsible for
-enforcing compliance by third parties to this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or otherwise)
-that contradict the conditions of this License, they do not excuse you from
-the conditions of this License. If you cannot distribute so as to satisfy
-simultaneously your obligations under this License and any other pertinent
-obligations, then as a consequence you may not distribute the Library at all.
-For example, if a patent license would not permit royalty-free redistribution
-of the Library by all those who receive copies directly or indirectly through
-you, then the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply, and
-the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any patents or
-other property right claims or to contest validity of any such claims; this
-section has the sole purpose of protecting the integrity of the free software
-distribution system which is implemented by public license practices. Many
-people have made generous contributions to the wide range of software
-distributed through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing to
-distribute software through any other system and a licensee cannot impose that
-choice.
-
-This section is intended to make thoroughly clear what is believed to be a
-consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in certain
-countries either by patents or by copyrighted interfaces, the original
-copyright holder who places the Library under this License may add an explicit
-geographical distribution limitation excluding those countries, so that
-distribution is permitted only in or among countries not thus excluded. In
-such case, this License incorporates the limitation as if written in the body
-of this License.
-
-  13. The Free Software Foundation may publish revised and/or new versions of
-the Library General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and "any later
-version", you have the option of following the terms and conditions either of
-that version or of any later version published by the Free Software
-Foundation. If the Library does not specify a license version number, you may
-choose any version ever published by the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free programs
-whose distribution conditions are incompatible with these, write to the author
-to ask for permission. For software which is copyrighted by the Free Software
-Foundation, write to the Free Software Foundation; we sometimes make
-exceptions for this. Our decision will be guided by the two goals of
-preserving the free status of all derivatives of our free software and of
-promoting the sharing and reuse of software generally.
-
-                NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
-THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
-STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
-LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
-PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE,
-YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO
-LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR
-THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-             END OF TERMS AND CONDITIONS
-
--------------------
-
-ncurses:
-Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, distribute with
-modifications, sublicense, and/or sell copies of the Software, and to permit
-persons to whom the Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name(s) of the above copyright holders
-shall not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization.
-
--------------------
-
-OpenSSL:
-OpenSSL License
-Copyright (c) 1998-2011 The OpenSSL Project.  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer. 
-
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-
-3. All advertising materials mentioning features or use of this software must
-display the following acknowledgment: "This product includes software
-developed by the OpenSSL Project for use in the OpenSSL Toolkit.
-(http://www.openssl.org/)"
-
-4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
-endorse or promote products derived from this software without prior written
-permission. For written permission, please contact [email protected].
-
-5. Products derived from this software may not be called "OpenSSL" nor may
-"OpenSSL" appear in their names without prior written permission of the
-OpenSSL Project.
-
-6. Redistributions of any form whatsoever must retain the following
-acknowledgment: "This product includes software developed by the OpenSSL
-Project for use in the OpenSSL Toolkit (http://www.openssl.org/)"
-
-THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY EXPRESSED
-OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
-EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-This product includes cryptographic software written by Eric Young
-([email protected]).  This product includes software written by Tim Hudson
-([email protected]).
-
-Original SSLeay License
-Copyright (C) 1995-1998 Eric Young ([email protected]) All rights reserved.
-
-This package is an SSL implementation written by Eric Young
-([email protected]). The implementation was written so as to conform with
-Netscapes SSL.
-
-This library is free for commercial and non-commercial use as long as the
-following conditions are aheared to.  The following conditions apply to all
-code found in this distribution, be it the RC4, RSA, lhash, DES, etc., code;
-not just the SSL code.  The SSL documentation included with this distribution
-is covered by the same copyright terms except that the holder is Tim Hudson
-([email protected]).
-
-Copyright remains Eric Young's, and as such any Copyright notices in the code
-are not to be removed. If this package is used in a product, Eric Young should
-be given attribution as the author of the parts of the library used. This can
-be in the form of a textual message at program startup or in documentation
-(online or textual) provided with the package.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-1. Redistributions of source code must retain the copyright notice, this list
-of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-3. All advertising materials mentioning features or use of this software must
-display the following acknowledgement: "This product includes cryptographic
-software written by Eric Young ([email protected])" The word 'cryptographic'
-can be left out if the rouines from the library being used are not
-cryptographic related :-).
-4. If you include any Windows specific code (or a derivative thereof) from the
-apps directory (application code) you must include an acknowledgement: "This
-product includes software written by Tim Hudson ([email protected])"
-
-THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
-EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-The licence and distribution terms for any publically available version or
-derivative of this code cannot be changed.  i.e. this code cannot simply be
-copied and put under another distribution licence [including the GNU Public
-Licence.]
-
--------------------
-
-zlib:
-Acknowledgments:
-  The deflate format used by zlib was defined by Phil Katz. The deflate and
-zlib specifications were written by L. Peter Deutsch. Thanks to all the people
-who reported problems and suggested various improvements in zlib; they are too
-numerous to cite here.
-
-Copyright notice:
- (C) 1995-2004 Jean-loup Gailly and Mark Adler
-
-  This software is provided 'as-is', without any express or implied warranty.
-In no event will the authors be held liable for any damages arising from the
-use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-including commercial applications, and to alter it and redistribute it freely,
-subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-claim that you wrote the original software. If you use this software in a
-product, an acknowledgment in the product documentation would be appreciated
-but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Jean-loup Gailly        Mark Adler
-  [email protected]          [email protected]
-
-If you use the zlib library in a product, we would appreciate *not* receiving
-lengthy legal documents to sign. The sources are provided for free but without
-warranty of any kind.  The library has been entirely written by Jean-loup
-Gailly and Mark Adler; it does not include third-party code.
-
-If you redistribute modified sources, we would appreciate that you include in
-the file ChangeLog history information documenting your changes. Please read
-the FAQ for more information on the distribution of modified source versions.
-
--------------------
-
-Intel AESNI Sample Library:
-
-Copyright (c) 2010, Intel Corporation
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors may
-be used to endorse or promote products derived from this software without
-specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Issue Date: Aug 6, 2010
-
--------------------
-
-NOTES WRITTEN BY SOFTETHER CORPORATION
-
-Note for users of non-Windows version of PacketiX VPN: The enumerated bundle
-of License Agreements above are copies of original License Agreements of each
-library programs which PacketiX VPN uses. PacketiX VPN is not a delivered work
-from these libraries. PacketiX VPN is a separated work from the libraries, but
-it may call functions of the libraries (whether or not PacketiX VPN calls such
-functions are depended on the user's intention to link them or not on user's
-side computer). While some libraries indicate GPL or LGPL as a condition to
-re-distribute, PacketiX VPN is not license under GPL nor LGPL. Therefore, we
-took special care not to make PacketiX VPN become delivered works of any GPL
-or LGPL libraries. In order to achieve that, both PacketiX VPN and GPL/LGPL
-libraries are distributed with isolated forms (means that any program files of
-PacketiX VPN are not bound nor linked to any GPL/LGPL libraries). If a user of
-PacketiX VPN wants to link GPL/LGPL libraries by their own decisions,
-operations and responsibilities, he may do that on his computer. However, if a
-delivered work under copyright law is created as a result of such an
-operation, such a delivered work must not re-distributed to other people,
-because it may violate GPL/LGPL libraries' conditions.
-
-Note for users of Windows version of PacketiX VPN: For technical reason, the
-above texts are exactly same as a file which is also contained on the
-non-Windows version of PacketiX VPN. Actually, the Windows version of PacketiX
-VPN has no relations to any GPL/LGPL libraries enumerated above.
-
-SoftEther Corporation provides source codes of some GPL/LGPL/other libraries
-listed above on its web server. Anyone can download, use and re-distribute
-them under individual licenses which are contained on each archive file,
-available from the following URL:
-http://uploader.softether.co.jp/src/
-
-
-
-THE IMPORTANT NOTICES ABOUT SOFTETHER VPN
-
-FUNCTIONS OF VPN COMMUNICATIONS EMBEDDED ON THIS SOFTWARE ARE VERY POWERFUL
-THAN EVER. THIS STRONG VPN ABILITY WILL BRING YOU HUGE BENEFITS. HOWEVER, IF
-YOU MISUSE THIS SOFTWARE, IT MIGHT DAMAGES YOURSELF. IN ORDER TO AVOID SUCH
-RISKS, THIS DOCUMENT ACCOUNTS IMPORTANT NOTICES FOR CUSTOMERS WHO ARE WILLING
-TO USE THIS SOFTWARE. THE FOLLOWING INSTRUCTIONS ARE VERY IMPORTANT. READ AND
-UNDERSTAND IT CAREFULLY. ADDITIONALLY, IF YOU ARE PLANNING TO USE THE DYNAMIC
-DNS, THE NAT TRAVERSAL OR THE VPN AZURE FUNCTIONS, READ THE SECTION 3.5
-CAREFULLY. THESE FUNCTIONS ARE FREE SERVICES PROVIDED VIA THE INTERNET, ARE
-NOT GUARANTEED, AND ARE NOT INTENDED TO BE USED FOR BUSINESS OR COMMERCIAL
-USE. DO NOT USE THESE SERVICES FOR YOUR BUSINESS OR COMMERCIAL USE.
-
-
-1. VPN Communication Protocols
-1.1. SoftEther VPN Protocol
-SoftEther VPN can perform VPN communication. Unlike traditional VPN protocols,
-SoftEther VPN has an implementation of the newly-designed "SoftEther VPN
-Protocol (SE-VPN Protocol)" . SE-VPN protocol encapsulates any Ethernet
-packets into a HTTPS (HTTP over SSL) connection. Therefore SE-VPN protocol can
-communicate beyond firewalls even if the firewall is configured to block
-traditional VPN packets by network administrator. SE-VPN protocol is designed
-and implemented to comply TLS 1.0 (RFC 5246) and HTTPS (RFC 2818). However, it
-sometimes have different behavior to RFCs. If you are a network administrator
-and want to block SE-VPN protocols on the firewall, you can adopt a
-"white-list" policy on the firewall to filter any TCP or UDP packets on the
-border except explicitly allowed packets towards specific web sites and
-servers.
-
-1.2. NAT Traversal Function
-Generally, if you use traditional VPN systems you have to request a network
-administrator to make the NAT or firewall to "open" or "relay" specific TCP or
-UDP ports. However, there are demands somehow to eliminate such working costs
-on network administrators. In order to satisfy such demands, SoftEther VPN has
-the newly-implemented "NAT Traversal" function. NAT Traversal is enabled by
-default. A SoftEther VPN Server running on the computer behind NAT or firewall
-can accept VPN connections from the Internet, without any special
-configurations on firewalls or NATs. If you want to disable the NAT Traversal
-function, modify the "DisableNatTraversal" to "true" on the configuration file
-of SoftEther VPN Server. In order to disable it on the client-side, append
-"/tcp" suffix on the destination hostname.
-
-1.3. Dynamic DNS Function
-Traditional legacy VPN system requires a static global IP address on the VPN
-server. In consideration of shortage of global IP addresses, SoftEther
-Corporation implements the "Dynamic DNS Function" on SoftEther VPN Server.
-Dynamic DNS is enabled by default. Dynamic DNS function notify the current
-global IP address of the PC to the Dynamic DNS Servers which are operated by
-SoftEther Corporation. A globally-unique hostname (FQDN) such as
-"abc.softether.net" ( "abc" varies as unique per a user) will be assigned on
-the VPN Server. If you tell this unique hostname to a VPN user, the user can
-specify it as the destination VPN Sever hostname on the VPN Client and will be
-able to connect the VPN Server. No IP addresses are required to know
-beforehand. If the IP address of the VPN Server varies, the registered IP
-address related to the hostname of Dynamic DNS service will be changed
-automatically. By this mechanism, no longer need a static global IP address
-which costs monthly to ISPs. You can use consumer-level inexpensive Internet
-connection with dynamic IP address in order to operate an enterprise-level VPN
-system. If you want to disable Dynamic DNS, specify "true" on the "Disabled"
-items of the "DDnsClient" directive on the SoftEther VPN Server configuration
-file. * Note for residents in People's Republic of China: If your VPN Server
-is running on the People's Republic of China, the DNS suffix will be replaced
-to "sedns.cn" domain. The "sedns.cn" domain is the service possessed and
-operated by "Beijing Daiyuu SoftEther Technology Co., Ltd" which is a
-Chinese-local enterprise.
-
-1.4. VPN over ICMP / VPN over DNS functions
-If you want to make a VPN connection between SoftEther VPN Client / Bridge and
-SoftEther VPN Server, but if TCP and UDP packets are prohibited by the
-firewall, then you can encapsulates payloads into "ICMP" (as known as Ping) or
-"DNS" packets. This function can realize a VPN connection by using ICMP or DNS
-even if the firewall or router blocks every TCP or UDP connections. VPN over
-ICMP / VPN over DNS functions are designed to comply standard ICMP and DNS
-specifications as possible, however it sometimes has a behavior not to fully
-comply them. Therefore, few poor-quality routers may be caused a
-memory-overflow or something troubles when a lot of ICMP or DNS packets are
-passed, and such routers sometimes freezes or reboots. It might affects other
-users on the same network. To avoid such risks, append the suffix "/tcp" on
-the destination hostname which is specified on the VPN-client side to disable
-VPN over ICMP / DNS functions.
-
-1.5. VPN Azure Cloud Service
-If your SoftEther VPN Server is placed behind the NAT or firwall, and by some
-reason you cannot use NAT Traversal function, Dynamic DNS function or VPN over
-ICMP/DNS function, you can use VPN Azure Clouse Service. SoftEther Corporation
-operates VPN Azure Cloud on Internet. After the VPN Server makes a connection
-to the VPN Azure Cloud, the hostname "abc.vpnazure.net" ( "abc" is a unique
-hostname) can be specified to connect to the VPN Server via the VPN Azure
-Cloud. Practically, such a hostname is pointing a global IP address of one of
-cloud servers which are operated by SoftEther Corporation. If A VPN Client
-connects to such a VPN Azure host, then the VPN Azure host will relay all
-traffics between the VPN Client and the VPN Server. VPN Azure is disabled by
-default. You can activate it easily by using VPN Server Configuration Tool.
-
-1.6. UDP Acceleration
-SoftEther VPN has the UDP Acceleration Function. If a VPN consists of two
-sites detects that UDP channel can be established, UDP will be automatically
-used. By this function, throughput of UDP increases. If direct UDP channel can
-be established, direct UDP packets will be used. However, if there is
-something obstacles such as firewalls or NATs, the "UDP Hole Punching"
-technology will be used, instead. The "UDP Hole Punching" uses the cloud
-servers which SoftEther Corporation operates on Internet. UDP Acceleration can
-be disabled anytime by setting up so on the VPN-client side.
-
-
-2. VPN Software
-2.1. SoftEther VPN Client
-If you use SoftEther VPN Client on Windows, the Virtual Network Adapter device
-driver will be installed on Windows. The Virtual Network Adapter is
-implemented as a kernel-mode driver for Windows. The driver is
-digitally-signed by a certificate issued by VeriSign, Inc. and also sub-signed
-by Symantec Corporation. A message to ask you want to sure install the driver
-might be popped up on the screen. SoftEther VPN Client may response the
-message if possible. SoftEther VPN Client also optimizes the configuration of
-MMCSS (Multimedia Class Scheduler Service) on Windows. You can undo the
-optimizations of MMCSS afterwards.
-
-2.2. SoftEther VPN Server / Bridge
-If you use SoftEther VPN Server / Bridge on Windows with "Local Bridge"
-functions, you have to install the low-level Ethernet packet processing driver
-on the computer. The driver is digitally-signed by a certificate issued by
-VeriSign, Inc. and also sub-signed by Symantec Corporation. SoftEther VPN
-Server / Bridge may disable the TCP/IP offloading features on the physical
-network adapter for Local Bridge function. In Windows Vista / 2008 or greater
-version, VPN Server may inject a packet-filter driver which complies Windows
-Filter Platform (WPF) specification into the kernel in order to provide IPsec
-function. The packet-filter driver will be loaded available only if IPsec
-function is enabled. Once you enables IPsec function of SoftEther VPN Server,
-the built-in IPsec function of Windows will be disabled. After you disabled
-IPsec function of SoftEther VPN Server, then the built-in IPsec function of
-Windows will revive. In order to provide the Local Bridge function, SoftEther
-VPN Server / Bridge disables the TCP/IP offloading function on the operating
-system.
-
-2.3. User-mode Installation
-You can install SoftEther VPN Server and SoftEther VPN Bridge as "User-mode"
-on Windows. In other words, even if you don't have Windows system
-administrator's privileges, you can install SoftEther VPN as a normal user.
-User-mode install will disable a few functions, however other most functions
-work well. Therefore, for example, an employee can install SoftEther VPN
-Server on the computer in the office network, and he will be able to connect
-to the server from his home. In order to realize such a system by user-self,
-no system administrative privileges are required in the view-point of
-technical. However, breaking rules of the company to install software on the
-computer without authority might be regarded as an unfavorable behavior. If
-you are an employee and belong to the company, and the company-policy
-prohibits installing software or making communications towards Internet
-without permission, you have to obtain a permission from the network
-administrator or the executive officer of your company in advance to install
-SoftEther VPN. If you install VPN Server / Bridge as User-mode, an icon will
-be appeared on the Windows task-tray. If you feel that the icon disturbs you,
-you can hide it by your operation. However, you must not exploit this hiding
-function to install VPN Server on other person's computer as a spyware. Such
-behavior might be an offence against the criminal law.
-
-2.4. Keep Alive Function
-SoftEther VPN Server and SoftEther VPN Bridge has Keep Alive Function by
-default. The purpose of this function is to sustain the Internet line active.
-The function transmits UDP packets with a random-byte-array-payload
-periodically. This function is useful to avoid automatic disconnection on
-mobile or dial-up connections. You can disable Keep Alive Function anytime.
-
-2.5. Uninstallation
-The uninstallation process of SoftEther VPN software will delete all program
-files. However, non-program files (such as files and data which are generated
-by running of programs) ) will not be deleted. For technical reason, the exe
-and resource files of uninstaller might remain. Such remaining files never
-affects to use the computer, however you can delete it manually. Kernel-mode
-drivers might not be deleted, however such drivers will not be loaded after
-the next boot of Windows. You can use "sc" command of Windows to delete
-kernel-mode drivers manually.
-
-2.6. Security
-You should set the administrator's password on SoftEther VPN Server / Bridge
-after installation. If you neglect to do it, another person can access to
-SoftEther VPN Server / Bridge and can set the password without your
-permission. This caution might be also applied on SoftEther VPN Client for
-Linux.
-
-2.7. Automatic Update Notification
-SoftEther VPN software for Windows has an automatic update notification
-function. It accesses to the SoftEther Update server periodically to check
-whether or not the latest version of software is released. If the latest
-version is released, the notification message will be popped up on the screen.
-In order to achieve this purpose, the version, language settings, the unique
-identifier, the IP address of your computer and the hostname of VPN Server
-which is connected to will be sent to the SoftEther Update server. No personal
-information will be sent. Automatic Update Notification is enabled by default,
-however you can disable it on the configuration screen. The setting whether
-turned on or turned off will be saved individually corresponding to each
-destination VPN server, by VPN Server Manager.
-
-2.8. Virtual NAT Function
-A Virtual Hub on SoftEther VPN Server / Bridge has "Virtual NAT Function" .
-Virtual NAT Function can share a single IP address on the physical network by
-multiple private IP address of VPN Clients. There are two operation mode of
-Virtual NAT: User-mode and Kernel-mode. In the user-mode operation, Virtual
-NAT shares an IP address which is assigned on the host operating system.
-Unlike user-mode, the kernel-mode operation attempts to find DHCP servers on
-the physical network. If there are two or more physical networks, a DHCP
-server will be sought automatically for each segments serially. If a DHCP
-server found, and an IP address is acquired, the IP address will be used by
-the Virtual NAT. In this case, an IP entry as a DHCP client will be registered
-on the IP pool of the physical DHCP Server. The physical default gateway and
-the DNS server will be used by the Virtual NAT in order to communicate with
-hosts in Internet. In kernel-mode operation, a Virtual Hub has a virtual MAC
-address which is operating on the physical Ethernet segment. In order to check
-the connectivity to Internet, SoftEther VPN periodically sends DNS query
-packet to resolve the IP address of host "www.yahoo.com" or "www.baidu.com" ,
-and attempts to connect to the TCP port 80 of such a resulted IP address for
-connectivity check.
-
-2.9. Unattended Installation of Kernel-mode Components
-When SoftEther VPN will detect a necessity to install the kernel-mode
-components on Windows, a confirmation message will be appeared by Windows
-system. In this occasion, SoftEther VPN software will switch to the Unattended
-Installation mode in order to respond "Yes" to Windows. This is a solution to
-prevent dead-locks when a remote-administration is performed from remote
-place.
-
-2.10. Windows Firewall
-SoftEther VPN software will register itself as a safe-program. Such an entry
-will be remain after the uninstallation. You can remove it manually from the
-Control Panel of Windows.
-
-
-3. Internet Services
-3.1. Internet Services which are provided by SoftEther Corporation
-SoftEther Corporation provides Dynamic DNS, NAT Traversal and VPN Azure server
-services on the Internet. These services are free of charge. Customers can
-access to the services by using SoftEther VPN software, via Internet. These
-service will be planned to be available from Open-Source version of "SoftEther
-VPN" which will be released in the future.
-
-3.2. Sent Information and Privacy Protection
-SoftEther VPN software may send an IP address, hostname, the version of VPN
-software on the customer's computer to the cloud service operated by SoftEther
-Corporation, in order to use the above services. These sending of information
-are minimal necessary to use the services. No personal information will be
-sent. SoftEther Corporation records log files of the cloud service servers for
-90 days at least with the received information. Such logs will be used for
-troubleshooting and other legitimate activities. SoftEther Corporation may
-provide logs to a public servant of Japanese government who are belonging to
-courts, police stations and the prosecutor's office, in order to comply such
-authorities' order. (Every Japanese public servants are liable by law to keep
-the information close.) Moreover, the IP addresses or other information will
-be processed statistically and provided to the public, not to expose the each
-concrete IP address, in order to release the release of research activities.
-
-3.3. Communication Data via VPN Azure Service
-Regardless of the above 3.2 rule, if the customer sends or receives VPN
-packets using VPN Azure Cloud Service, the actual payloads will stored and
-forwarded via the volatile memory of the servers for very short period. Such a
-behavior is naturally needed to provide the "VPN relay service" . No payloads
-will be recorded on "fixed" storages such as hard-drives. However, the
-"Wiretapping for Criminals Procedures Act" (The 137th legislation ruled on
-August 18, 1999 in Japan) requires telecommunication companies to allow the
-Japanese government authority to conduct a wire-tapping on the line. VPN Azure
-Servers which are physically placed on Japan are subjects of this law.
-
-3.4. Comply to Japanese Telecommunication Laws
-SoftEther Corporation complies with Japanese Telecommunication Laws as
-necessary to provide online services via Internet.
-
-3.5. Free and Academic Experiment Services
-SoftEther provides Dynamic DNS, NAT Traversal and VPN Azure as academic
-experiment services. Therefore, there services can be used for free of charge.
-These services are not parts of "SoftEther VPN Software Products" . These
-services are provided without any warranty. The services may be suspended or
-discontinued by technical or operational matters. In such occasions, users
-will not be able to use the services. A user have to understand such risks,
-and to acknowledge that such risks are borne by a user-self. SoftEther will
-never be liable to results or damages of use or unable-to-use of the service.
-Even if the user has already paid the license-fee of the commercial version of
-SoftEther VPN, such paid fees don't include any fees of these services.
-Therefore, if the online services will stop or be discontinued, no refunds or
-recoveries of damages will be provided by SoftEther Corporation.
-
-3.6. DNS Proxy Cloud Servers
-In some regions, when a user uses Internet, a DNS query sometimes broken or
-lost when it is passing through the ISP line. If SoftEther VPN Server, Client
-or Bridge detects a possibility that the accessing to the actual VPN server
-might be unstable, then DNS queries will be also transferred to the DNS proxy
-cloud servers which are operated by SoftEther Corporation. A DNS proxy cloud
-server will respond DNS queries with answering correct a IP address.
-
-
-4. General Cautions
-4.1. Needs an Approval from Network Administrator
-SoftEther VPN has powerful functions which don't require special settings by
-network administrators. For example, you need not to ask the administrator to
-configure the existing firewall in order to "open" a TCP/UDP port. Such
-characteristic features are for the purpose to eliminate working times and
-costs of network administrators, and avoid misconfiguration-risks around the
-tasks to open specific exception ports on the firewall. However, any employees
-belong to the company have to obtain an approval from the network
-administrator before installs SoftEther VPN. If your network administrator
-neglects to provide such an approval, you can consider to take an approval
-from an upper authority. (For example, executive officer of the company.) If
-you use SoftEther VPN without any approvals from the authority of your
-company, you might have disadvantage. SoftEther Corporation will be never
-liable for results or damages of using SoftEther VPN.
-
-4.2. Observe Laws of Your Country
-If your country's law prohibits the use of encryption, you have to disable the
-encryption function of SoftEther VPN by yourself. Similarly, in some countries
-or regions, some functions of SoftEther VPN might be prohibited to use by
-laws. Other countries' laws are none of SoftEther Corporation's concern
-because SoftEther Corporation is an enterprise which is located and registered
-in Japan physically. For example, there might be a risk that a part of
-SoftEther VPN conflicts an existing patent which is valid only on the specific
-region. SoftEther Corporation has no interests in such specific region outside
-Japan's territory. Therefore, if you want to use SoftEther VPN in regions
-outside Japan, you have to be careful not to violate third-person's rights.
-You have to verify the legitimacy of the use of SoftEther VPN in the specific
-region before you actually use it in such region. By nature, there are almost
-200 countries in the World, and each country's law is different each other. It
-is practically impossible to verify every countries' laws and regulations and
-make the software comply with all countries' laws in advance to release the
-software. Therefore SoftEther Corporation has verified the legitimacy of
-SoftEther VPN against the laws and regulations of only Japan. If a user uses
-SoftEther VPN in a specific country, and damaged by public servants of the
-government authority, SoftEther Corporation will never be liable to recover or
-compensate such damages or criminal responsibilities.
-
-
-5. VPN Gate Academic Experiment Project
-(This chapter applies only on SoftEther VPN software package which contains
-the extension plug-in for VPN Gate Academic Experiment Project.)
-5.1. About VPN Gate Academic Experiment Project
-VPN Gate Academic Experiment Project is an online service operated for just
-the academic research purpose at the graduate school of University of Tsukuba,
-Japan. The purpose of this research is to expend our knowledge about the
-"Global Distributed Public VPN Relay Server" (GDPVRS) technology. For details,
-please visit http://www.vpngate.net/.
-
-5.2. About VPN Gate Service
-SoftEther VPN Server and SoftEther VPN Client may contain "VPN Gate Service"
-program. However, VPN Gate Service is disabled by default.
-VPN Gate Service should be activated and enabled by the voluntary intention of
-the owner of the computer which SoftEther VPN Server or SoftEther VPN Client
-is installed on. After you activate VPN Gate Service, the computer will be
-start to serve as a part of the Global Distributed Public VPN Relay Servers.
-The IP address, hostname and related information of the computer will be sent
-and registered to the directory server of VPN Gate Academic Experiment
-Project, and they will be published and disclosed to the public. This
-mechanism will allow any VPN Gate Client software's user to connect to the VPN
-Gate Service running on your computer. While the VPN session between a VPN
-Gate Client and your VPN Gate Service is established, the VPN Gate Client's
-user can send/receive any IP packets towards the Internet via the VPN Gate
-Service. The global IP address of the VPN Gate Service's hosing computer will
-be used as the source IP address of such communications which a VPN Gate
-Client initiates.
-VPN Gate Service will send some information to the VPN Gate Academic
-Experiment Service Directory Server. The information includes the operator's
-information which described in section 5.5, logging settings, uptime,
-operating system version, type of protocol, port numbers, quality information,
-statistical information, VPN Gate clients' log history data (includes dates,
-IP addresses, version numbers and IDs) and the version of the software. These
-information will be exposed on the directory. VPN Gate Service also receives a
-key for encoding which is described on the chapter 5.9 from the directory
-server.
-
-5.3. Details of VPN Gate Service's Behavior
-If you enable VPN Gate Service manually, which is disabled by default, the
-"VPNGATE" Virtual Hub will be created on the SoftEther VPN Server. If you are
-using SoftEther VPN Client and attempt to active VPN Gate Service on it, an
-equivalent program to SoftEther VPN Server will be invoked on the same process
-of SoftEther VPN Client, and the "VPNGATE" Virtual Hub will be created. The
-"VPNGATE" Virtual Hub contains a user named "VPN" by default which permits
-anyone on the Internet to make a VPN connection to the Virtual Hub. Once a VPN
-Client connects to the "VPNGATE" Virtual Hub, any communication between the
-user and the Internet will pass through the Virtual Hub, and
-transmitted/received using the physical network interface on the computer
-which SoftEther VPN Server (or SoftEther VPN Client) is running on. This will
-cause the result that a destination host specified by the VPN Client will
-identify that the source of the communication has initiated from the VPN Gate
-Service's hosting computer's IP address. However, for safety, any packets
-which destinations are within 192.168.0.0/255.255.0.0, 172.16.0.0/255.240.0.0
-or 10.0.0.0/255.0.0.0 will be blocked by the "VPNGATE" Virtual Hub in order to
-protect your local network. Therefore, if you run VPN Gate Service on your
-corporate network or private network, it is safe because anonymous VPN Client
-users will not be permitted to access such private networks. VPN Gate Service
-also serves as relay for accessing to the VPN Gate Directory Server.
-In order to make VPN Gate Service familiar with firewalls and NATs, it opens
-an UDP port by using the NAT Traversal function which is described on the
-section 1.2. It also opens and listens on some TCP ports, and some TCP and UDP
-ports will be specified as the target port of Universal Plug and Play (UPnP)
-Port Transfer entries which are requested to your local routers. UPnP request
-packets will be sent periodically. Some routers keep such an opened TCP/UDP
-port permanently on the device. If you wish to close them, do it manually.
-VPN Gate Service also provides the mirror-site function for www.vpngate.net.
-This is a mechanism that a copy of the latest contents from www.vpngate.net
-will be hosted by the mirror-site tiny HTTP server which is running on the VPN
-Gate Service program. It will register itself on the mirror-sites list in
-www.vpngate.net. However, it never relays any other communications which are
-not towards www.vpngate.net.
-
-5.4. Communication between Internet via VPN Gate Service
-VPN Gate Service provides a routing between users and the Internet, by using
-the Virtual NAT Function which is described on the section 2.8. VPN Gate
-Service sends polling Ping packets to the server which is located on
-University of Tsukuba, and the Google Public DNS Server which is identified as
-8.8.8.8, in order to check the latest quality of your Internet line. VPN Gate
-Service also sends and receives a lot of random packets to/from the Speed Test
-Server on University of Tsukuba. These quality data will be reported to VPN
-Gate Directory Server, automatically and periodically. The result will be
-saved and disclosed to the public. These periodical polling communication are
-adjusted not to occupy the Internet line, however in some circumstances they
-might occupy the line.
-
-5.5. Operator's Information of VPN Gate Service
-If you activate VPN Gate Service on your computer, the computer will be a part
-of the Global Distributed Public VPN Relay Servers. Therefore, the Operator's
-administrative information of your VPN Gate Service should be reported and
-registered on the VPN Gate Service Directory. Operator's information contains
-the name of the operator and the abuse-reporting contact e-mail address. These
-information can be inputted on the screen if the VPN Gate configuration.
-Inputted information will be transmitted to the VPN Gate Directory Server,
-stored and disclosed to the public. So you have to be careful to input
-information. By the way, until you specify something as the operator's
-information, the computer's hostname will be used automatically as the field
-of the name of the operator, by appending the "'s owner" string after the
-hostname.
-
-5.6. Observe Laws to Operate VPN Gate Service
-In some countries or regions, a user who is planning to activate and operate
-VPN Gate Service, he are mandated to obtain a license or register a service
-from/to the government. If your region has such a regulation, you must fulfill
-mandated process before activating VPN Gate Service in advance. Neither the
-developers nor operators of the VPN Gate Academic Experiment Project will be
-liable for legal/criminal responsibilities or damages which are occurred from
-failure to comply your local laws.
-
-5.7. Protect Privacy of Communication
-Most of countries have a law which requires communication service's operators,
-including VPN Gate Service operators, to protect the privacy of communication
-of third-persons. When you operate VPN Gate Service, you must always protect
-user's privacy.
-
-5.8. Packet Logs
-The packet logging function is implemented on VPN Gate Service. It records
-essential headers of major TCP/IP packets which are transmitted via the
-Virtual Hub. This function will be helpful to investigate the "original IP
-address" of the initiator of communication who was a connected user of your
-VPN Gate Service, by checking the packet logs and the connection logs. The
-packet logs are recorded only for such legitimate investigates purpose. Do not
-peek nor leak packet logs except the rightful purpose. Such act will be
-violate the section 5.7.
-
-5.9. Packet Logs Automatic Archiving and Encoding Function
-The VPN Gate Academic Experiment Service is operated and running under the
-Japanese constitution and laws. The Japanese constitution laws demand strictly
-protection over the privacy of communication. Because this service is under
-Japanese rules, the program of VPN Gate Service implements this "Automatic Log
-File Encoding" protection mechanism, and enabled by default.
-The VPN Gate Service is currently configured to encode packet log files which
-has passed two or more weeks automatically, by default. In order to protect
-privacy of communication, if a packet log file is once encoded, even the
-administrator of the local computer cannot censor the packet log file. This
-mechanism protects privacy of end-users of VPN Gate Service.
-You can change the VPN Gate Service setting to disable this automatic encoding
-function. Then packet log files will never be encoded even after two weeks
-passed. In such a configuration, all packet logs will remain as plain-text on
-the disk. Therefore you have to take care not to violate user's privacy.
-If you are liable to decode an encoded packet log files (for example: a VPN
-Gate Service's user illegally abused your VPN Gate Service and you have to
-decode the packet logs in order to comply the laws), contact the administrator
-of the VPN Gate Academic Experiment Service at Graduate School of University
-of Tsukuba, Japan. You can find the contact address at
-http://www.vpngate.net/. The administrator of VPN Gate Service will respond to
-decode the packet logs if there is an appropriate and legal request from court
-or other judicial authorities, according to laws.
-
-5.10. Caution if You Operate VPN Gate Service in the Japan's Territories
-When a user operates VPN Gate Service in the Japan's territories, such an act
-may be regulated under the Japanese Telecommunication Laws if the operation is
-a subject to the law. However, in such a circumstance, according to the
-"Japanese Telecommunication Business Compete Manual [supplemental version]" ,
-non- profitable operations of communications are not identified as a
-"telecommunication business" . So usual operators of VPN Gate Service are not
-subjects to "telecommunication business operators" , and not be mandated to
-register to the government. Even so, legalities to protect the privacy of
-communication still imposed. As a conclusion, if you operate VPN Gate Service
-in the Japan's Territories, you must not leak the secrets of communications
-which are transmitted via your operating VPN Gate Service.
-
-5.11. VPN Gate Client
-If SoftEther VPN Client contains the VPN Gate Client plug-in, you can use it
-to obtain the list of current operating VPN Gate Service servers in the
-Internet, and make a VPN connection to a specific server on the list.
-VPN Gate Client always keeps the latest list of the VPN Gate Services
-periodically. Be careful if you are using a pay-per-use Internet line.
-When you start the VPN Gate Client software, the screen which asks you
-activate or not VPN Gate Service will be appeared. For details of VPN Gate
-Service, read the above sections.
-
-5.12. Caution before Joining or Exploiting VPN Gate Academic Experiment
-Project
-The VPN Gate Academic Experiment Service is operated as a research project at
-the graduate school on University of Tsukuba, Japan. The service is governed
-under the Japanese laws. Other countries' laws are none of our concerns nor
-responsibilities.
-By nature, there are almost 200 countries in the World, with different laws.
-It is impossible to verify every countries' laws and regulations and make the
-software comply with all countries' laws in advance to release the software.
-If a user uses VPN Gate service in a specific country, and damaged by public
-servants of the authority, the developer of either the service or software
-will never be liable to recover or compensate such damages or criminal
-responsibilities.
-By using this software and service, the user must observe all concerned laws
-and rules with user's own responsibility. The user will be completely liable
-to any damages and responsibilities which are results of using this software
-and service, regardless of either inside or outside of Japan's territory.
-If you don't agree nor understand the above warnings, do not use any of VPN
-Gate Academic Experiment Service functions.
-VPN Gate is a research project for just academic purpose only. VPN Gate was
-developed as a plug-in for SoftEther VPN and UT-VPN. However, all parts of VPN
-Gate were developed on this research project at University of Tsukuba. Any
-parts of VPN Gate are not developed by SoftEther Corporation. The VPN Gate
-Research Project is not a subject to be led, operated, promoted nor guaranteed
-by SoftEther Corporation.
 
+READ AND UNDERSTAND THE 'WARNING.TXT' FILE BEFORE USING THIS SOFTWARE.
+SOME SOFTWARE PROGRAMS FROM THIRD PARTIES ARE INCLUDED ON THIS SOFTWARE WITH
+LICENSE CONDITIONS WHICH ARE DESCRIBED ON THE 'THIRD_PARTY.TXT' FILE.
 

+ 219 - 35
src/Mayaqua/FileIO.c

@@ -747,6 +747,110 @@ bool GetDiskFreeW(wchar_t *path, UINT64 *free_size, UINT64 *used_size, UINT64 *t
 	return ret;
 }
 
+// Enumeration of direction with all sub directories
+TOKEN_LIST *EnumDirWithSubDirs(char *dirname)
+{
+	TOKEN_LIST *ret;
+	UNI_TOKEN_LIST *ret2;
+	wchar_t tmp[MAX_SIZE];
+	// Validate arguments
+	if (dirname == NULL)
+	{
+		dirname = "./";
+	}
+
+	StrToUni(tmp, sizeof(tmp), dirname);
+
+	ret2 = EnumDirWithSubDirsW(tmp);
+
+	ret = UniTokenListToTokenList(ret2);
+
+	UniFreeToken(ret2);
+
+	return ret;
+}
+UNI_TOKEN_LIST *EnumDirWithSubDirsW(wchar_t *dirname)
+{
+	ENUM_DIR_WITH_SUB_DATA d;
+	UNI_TOKEN_LIST *ret;
+	UINT i;
+	// Validate arguments
+	if (dirname == NULL)
+	{
+		dirname = L"./";
+	}
+
+	Zero(&d, sizeof(d));
+
+	d.FileList = NewListFast(NULL);
+
+	EnumDirWithSubDirsMain(&d, dirname);
+
+	ret = ZeroMalloc(sizeof(UNI_TOKEN_LIST));
+
+	ret->NumTokens = LIST_NUM(d.FileList);
+	ret->Token = ZeroMalloc(sizeof(wchar_t *) * ret->NumTokens);
+
+	for (i = 0;i < ret->NumTokens;i++)
+	{
+		wchar_t *s = LIST_DATA(d.FileList, i);
+
+		ret->Token[i] = UniCopyStr(s);
+	}
+
+	FreeStrList(d.FileList);
+
+	return ret;
+}
+void EnumDirWithSubDirsMain(ENUM_DIR_WITH_SUB_DATA *d, wchar_t *dirname)
+{
+	DIRLIST *dir;
+	UINT i;
+	// Validate arguments
+	if (d == NULL || dirname == NULL)
+	{
+		return;
+	}
+
+	dir = EnumDirExW(dirname, NULL);
+	if (dir == NULL)
+	{
+		return;
+	}
+
+	// Files
+	for (i = 0;i < dir->NumFiles;i++)
+	{
+		DIRENT *e = dir->File[i];
+
+		if (e->Folder == false)
+		{
+			wchar_t tmp[MAX_SIZE];
+
+			ConbinePathW(tmp, sizeof(tmp), dirname, e->FileNameW);
+
+			Add(d->FileList, CopyUniStr(tmp));
+		}
+	}
+
+	// Sub directories
+	for (i = 0;i < dir->NumFiles;i++)
+	{
+		DIRENT *e = dir->File[i];
+
+		if (e->Folder)
+		{
+			wchar_t tmp[MAX_SIZE];
+
+			ConbinePathW(tmp, sizeof(tmp), dirname, e->FileNameW);
+
+			EnumDirWithSubDirsMain(d, tmp);
+		}
+	}
+
+	FreeDir(dir);
+}
+
 // Enumeration of directory
 DIRLIST *EnumDirEx(char *dirname, COMPARE *compare)
 {
@@ -1117,59 +1221,78 @@ void FreeHamcore()
 }
 
 // Build a Hamcore file
-void BuildHamcore()
+void BuildHamcore(char *dst_filename, char *src_dir, bool unix_only)
 {
-	BUF *b;
-	char tmp[MAX_SIZE];
 	char exe_dir[MAX_SIZE];
-	char *s;
 	bool ok = true;
 	LIST *o;
 	UINT i;
+	TOKEN_LIST *src_file_list;
 
 	GetExeDir(exe_dir, sizeof(exe_dir));
-	Format(tmp, sizeof(tmp), "%s/%s", exe_dir, HAMCORE_TEXT_NAME);
 
-	b = ReadDump(tmp);
-	if (b == NULL)
-	{
-		Print("Failed to open %s.\n", tmp);
-		return;
-	}
+	src_file_list = EnumDirWithSubDirs(src_dir);
 
 	o = NewListFast(CompareHamcore);
 
-	while ((s = CfgReadNextLine(b)) != NULL)
+	for (i = 0;i < src_file_list->NumTokens;i++)
 	{
-		char tmp[MAX_SIZE];
+		char rpath[MAX_SIZE];
 		BUF *b;
-		Trim(s);
+		char s[MAX_SIZE];
 
-		Format(tmp, sizeof(tmp), "%s/%s/%s", exe_dir, HAMCORE_DIR_NAME, s);
+		StrCpy(s, sizeof(s), src_file_list->Token[i]);
+		Trim(s);
 
-		b = ReadDump(tmp);
-		if (b == NULL)
+		if (GetRelativePath(rpath, sizeof(rpath), s, src_dir) == false)
 		{
-			Print("Failed to open %s.\n", s);
-			ok = false;
+			// Unknown error !
 		}
 		else
 		{
-			HC *c = ZeroMalloc(sizeof(HC));
-			UINT tmp_size;
-			void *tmp;
-			c->FileName = CopyStr(s);
-			c->Size = b->Size;
-			tmp_size = CalcCompress(c->Size);
-			tmp = Malloc(tmp_size);
-			c->SizeCompressed = Compress(tmp, tmp_size, b->Buf, b->Size);
-			c->Buffer = tmp;
-			Insert(o, c);
-			Print("%s: %u -> %u\n", s, c->Size, c->SizeCompressed);
-			FreeBuf(b);
-		}
+			bool ok = true;
+
+			ReplaceStr(rpath, sizeof(rpath), rpath, "/", "\\");
+
+			if (unix_only)
+			{
+				// Exclude non-UNIX files
+				if (EndWith(s, ".exe") ||
+					EndWith(s, ".dll") ||
+					EndWith(s, ".sys") ||
+					EndWith(s, ".inf") ||
+					EndWith(s, ".cat") ||
+					EndWith(s, ".wav"))
+				{
+					ok = false;
+				}
+			}
 
-		Free(s);
+			if (ok)
+			{
+				b = ReadDump(s);
+				if (b == NULL)
+				{
+					Print("Failed to open '%s'.\n", s);
+					ok = false;
+				}
+				else
+				{
+					HC *c = ZeroMalloc(sizeof(HC));
+					UINT tmp_size;
+					void *tmp;
+					c->FileName = CopyStr(rpath);
+					c->Size = b->Size;
+					tmp_size = CalcCompress(c->Size);
+					tmp = Malloc(tmp_size);
+					c->SizeCompressed = Compress(tmp, tmp_size, b->Buf, b->Size);
+					c->Buffer = tmp;
+					Insert(o, c);
+					Print("%s: %u -> %u\n", s, c->Size, c->SizeCompressed);
+					FreeBuf(b);
+				}
+			}
+		}
 	}
 
 	if (ok)
@@ -1226,7 +1349,7 @@ void BuildHamcore()
 			WriteBuf(b, c->Buffer, c->SizeCompressed);
 		}
 		// Writing
-		Format(tmp, sizeof(tmp), "%s/%s", exe_dir, HAMCORE_FILE_NAME "__");
+		StrCpy(tmp, sizeof(tmp), dst_filename);
 		Print("Writing %s...\n", tmp);
 		FileDelete(tmp);
 		DumpBuf(b, tmp);
@@ -1243,7 +1366,7 @@ void BuildHamcore()
 
 	ReleaseList(o);
 
-	FreeBuf(b);
+	FreeToken(src_file_list);
 }
 
 // Comparison of the HCs
@@ -1842,6 +1965,67 @@ void GetCurrentDir(char *name, UINT size)
 	UniToStr(name, size, name_w);
 }
 
+// Get the relative path
+bool GetRelativePathW(wchar_t *dst, UINT size, wchar_t *fullpath, wchar_t *basepath)
+{
+	wchar_t fullpath2[MAX_SIZE];
+	wchar_t basepath2[MAX_SIZE];
+	// Validate arguments
+	if (dst == NULL || fullpath == NULL || basepath == NULL)
+	{
+		return false;
+	}
+	ClearUniStr(dst, size);
+
+	NormalizePathW(fullpath2, sizeof(fullpath2), fullpath);
+	NormalizePathW(basepath2, sizeof(basepath2), basepath);
+
+#ifdef	OS_WIN32
+	UniStrCat(basepath2, sizeof(basepath2), L"\\");
+#else	// OS_WIN32
+	UniStrCat(basepath2, sizeof(basepath2), L"/");
+#endif	// OS_WIN32
+
+	if (UniStrLen(fullpath2) <= UniStrLen(basepath2))
+	{
+		return false;
+	}
+
+	if (UniStartWith(fullpath2, basepath2) == false)
+	{
+		return false;
+	}
+
+	UniStrCpy(dst, size, fullpath2 + UniStrLen(basepath2));
+
+	return true;
+}
+bool GetRelativePath(char *dst, UINT size, char *fullpath, char *basepath)
+{
+	wchar_t dst_w[MAX_SIZE];
+	wchar_t fullpath_w[MAX_SIZE];
+	wchar_t basepath_w[MAX_SIZE];
+	bool ret;
+	// Validate arguments
+	if (dst == NULL || fullpath == NULL || basepath == NULL)
+	{
+		return false;
+	}
+
+	StrToUni(fullpath_w, sizeof(fullpath_w), fullpath);
+	StrToUni(basepath_w, sizeof(basepath_w), basepath);
+
+	ret = GetRelativePathW(dst_w, sizeof(dst_w), fullpath_w, basepath_w);
+	if (ret == false)
+	{
+		return false;
+	}
+
+	UniToStr(dst, size, dst_w);
+
+	return true;
+}
+
 // Normalize the file path
 void NormalizePathW(wchar_t *dst, UINT size, wchar_t *src)
 {

+ 11 - 1
src/Mayaqua/FileIO.h

@@ -224,6 +224,11 @@ struct ZIP_PACKER
 	ZIP_FILE *CurrentFile;
 };
 
+struct ENUM_DIR_WITH_SUB_DATA
+{
+	LIST *FileList;
+};
+
 void InitCrc32();
 UINT Crc32(void *buf, UINT pos, UINT len);
 UINT Crc32First(void *buf, UINT pos, UINT len);
@@ -287,6 +292,8 @@ bool FileRename(char *old_name, char *new_name);
 bool FileRenameW(wchar_t *old_name, wchar_t *new_name);
 void NormalizePath(char *dst, UINT size, char *src);
 void NormalizePathW(wchar_t *dst, UINT size, wchar_t *src);
+bool GetRelativePathW(wchar_t *dst, UINT size, wchar_t *fullpath, wchar_t *basepath);
+bool GetRelativePath(char *dst, UINT size, char *fullpath, char *basepath);
 TOKEN_LIST *ParseSplitedPath(char *path);
 UNI_TOKEN_LIST *ParseSplitedPathW(wchar_t *path);
 char *GetCurrentPathEnvStr();
@@ -312,7 +319,7 @@ void GetExeName(char *name, UINT size);
 void GetExeNameW(wchar_t *name, UINT size);
 void GetExeDir(char *name, UINT size);
 void GetExeDirW(wchar_t *name, UINT size);
-void BuildHamcore();
+void BuildHamcore(char *dst_filename, char *src_dir, bool unix_only);
 int CompareHamcore(void *p1, void *p2);
 void InitHamcore();
 void FreeHamcore();
@@ -325,6 +332,9 @@ DIRLIST *EnumDir(char *dirname);
 DIRLIST *EnumDirW(wchar_t *dirname);
 DIRLIST *EnumDirEx(char *dirname, COMPARE *compare);
 DIRLIST *EnumDirExW(wchar_t *dirname, COMPARE *compare);
+UNI_TOKEN_LIST *EnumDirWithSubDirsW(wchar_t *dirname);
+TOKEN_LIST *EnumDirWithSubDirs(char *dirname);
+void EnumDirWithSubDirsMain(ENUM_DIR_WITH_SUB_DATA *d, wchar_t *dirname);
 void FreeDir(DIRLIST *d);
 int CompareDirListByName(void *p1, void *p2);
 bool GetDiskFree(char *path, UINT64 *free_size, UINT64 *used_size, UINT64 *total_size);

+ 1 - 0
src/Mayaqua/MayaType.h

@@ -502,6 +502,7 @@ typedef struct ZIP_DIR_HEADER ZIP_DIR_HEADER;
 typedef struct ZIP_END_HEADER ZIP_END_HEADER;
 typedef struct ZIP_FILE ZIP_FILE;
 typedef struct ZIP_PACKER ZIP_PACKER;
+typedef struct ENUM_DIR_WITH_SUB_DATA ENUM_DIR_WITH_SUB_DATA;
 
 // TcpIp.h
 typedef struct MAC_HEADER MAC_HEADER;

BIN
src/PenCore/Thumbs.db


+ 0 - 189
src/README

@@ -1,189 +0,0 @@
-SoftEther VPN - An Open-Source Cross-platform Multi-protocol VPN Program
-http://www.softether.org/
-
-We use GitHub as the primary official SoftEther VPN repository:
-https://github.com/SoftEtherVPN/SoftEtherVPN/
-
-Source code packages (.zip and .tar.gz) and binary files are also available:
-http://www.softether-download.com/
-
-Copyright (c) 2012-2014 SoftEther Project at University of Tsukuba, Japan.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License version 2
-as published by the Free Software Foundation.
-
-SoftEther VPN ("SoftEther" means "Software Ethernet") is one of the
-world's most powerful and easy-to-use multi-protocol VPN software.
-
-SoftEther VPN runs on Windows, Linux, Mac, FreeBSD and Solaris.
-
-SoftEther VPN supports most of widely-used VPN protocols
-including SSL-VPN, OpenVPN, IPsec, L2TP, MS-SSTP, L2TPv3 and EtherIP
-by the single SoftEther VPN Server program.
-
-More details on http://www.softether.org/.
-
-
-SOFTETHER VPN ADVANTAGES
-------------------------
-
-- Supporting all popular VPN protocols by the single VPN server:
-  SSL-VPN (HTTPS)
-  OpenVPN
-  IPsec
-  L2TP
-  MS-SSTP
-  L2TPv3
-  EtherIP
-- Free and open-source software.
-- Easy to establish both remote-access and site-to-site VPN.
-- SSL-VPN Tunneling on HTTPS to pass through NATs and firewalls.
-- Revolutionary VPN over ICMP and VPN over DNS features.
-- Resistance to highly-restricted firewall.
-- Ethernet-bridging (L2) and IP-routing (L3) over VPN.
-- Embedded dynamic-DNS and NAT-traversal so that no static nor
-  fixed IP address is required.
-- AES 256-bit and RSA 4096-bit encryptions.
-- Sufficient security features such as logging and firewall inner
-  VPN tunnel.
-- 1Gbps-class high-speed throughput performance with low memory and
-  CPU usage.
-- Windows, Linux, Mac, Android, iPhone, iPad and Windows Phone are
-  supported.
-- The OpenVPN clone function supports legacy OpenVPN clients.
-- IPv4 / IPv6 dual-stack.
-- The VPN server runs on Windows, Linux, FreeBSD, Solaris and Mac OS X.
-- Configure All settings on GUI.
-- Multi-languages (English, Japanese and Simplified-Chinese).
-- More details at http://www.softether.org/.
-
-
-GETTING STARTED
----------------
-
-Visit the SoftEther VPN Project official web site at first:
-        http://www.softether.org/
-
-If you are not a developer, it is recommended to download the binary
-installers from:
-        http://www.softether-download.com/
-
-To build from the source,
-see "BUILD_UNIX.TXT" or "BUILD_WINDOWS.TXT" files.
-
-
-HOW TO DOWNLOAD THE LATEST SOURCE CODE PACKAGE
-----------------------------------------------
-
-Go to http://www.softether-download.com/ and you can find the latest
-source-code package file in both .ZIP and .TAR.GZ format.
-
-This is the easiest way to obtain the source code of SoftEther VPN.
-
-
-HOW TO GET THE LATEST SOURCE CODE TREE FOR DEVELOPERS
------------------------------------------------------
-
-If you are an open-source developer, visit our GitHub repository:
-https://github.com/SoftEtherVPN/SoftEtherVPN/
-
-You can download the up-to-date source-code tree of SoftEther VPN
-from GitHub. You may make your own fork project from our project.
-
-The download and build instruction is following:
-
-$ git clone https://github.com/SoftEtherVPN/SoftEtherVPN.git
-$ cd SoftEtherVPN
-$ make
-$ make install
-
-
-TO CIRCUMVENT YOUR GOVERNMENT'S FIREWALL RESTRICTION
-----------------------------------------------------
-
-Because SoftEther VPN is overly strong tool to build a VPN tunnel,
-some censorship governments want to block your access to the source code
-of SoftEther VPN, by abusing their censorship firewalls.
-
-To circumvent your censor's unjust restriction,
-SoftEther VPN Project distributes the up-to-date source-code
-on all the following open-source repositories:
-
-  - GitHub
-    https://github.com/SoftEtherVPN/SoftEtherVPN/
-
-  - SourceForge
-    https://sourceforge.net/projects/softethervpn/
-
-  - Google Code
-    https://code.google.com/p/softether/
-
-
-To fetch the source code from GitHub:
-$ git clone https://github.com/SoftEtherVPN/SoftEtherVPN.git
-
-To fetch the source code from SourceForge:
-$ git clone http://git.code.sf.net/p/softethervpn/code
-  - or -
-$ git clone git://git.code.sf.net/p/softethervpn/code
-
-To fetch the source code from Google Code:
-$ git clone https://code.google.com/p/softether/
-
-We hope that you can reach one of the above URLs at least!
-
-
-DEAR SECURITY EXPERTS
----------------------
-
-If you find a bug or a security vulnerability please kindly inform us
-about the problem immediately so that we can fix the security problem
-to protect a lot of users around the world as soon as possible.
-
-Our e-mail address for security reports is:
-softether-vpn-security [at] softether.org
-
-Please note that the above e-mail address is not a technical support
-inquiry address. If you need technical assistance, please visit
-http://www.softether.org/ and ask your question on the users forum.
-
-
-DISCLAIMER
-----------
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN,
-UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY,
-MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS
-SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS
-SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER
-CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL
-DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING,
-MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR
-SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
-CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO
-EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO,
-JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION
-AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN
-THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE.
-
-USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS
-SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
-PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
-COUNTRIES MIGHT BE RESTRICTED.
-
-
-ADVERTISEMENT
--------------
-
-SoftEther VPN is developed by SoftEther VPN Project at University of Tsukuba.
-Department of Computer Science has dozens of overly-enthusiastic geeks.
-Join us: http://www.tsukuba.ac.jp/english/admission/
-

+ 5 - 2
src/README.TXT

@@ -114,10 +114,10 @@ on all the following open-source repositories:
     https://github.com/SoftEtherVPN/SoftEtherVPN/
 
   - SourceForge
-    https://sourceforge.net/projects/softethervpn/
+    https://sourceforge.net/p/softethervpn/code/ci/master/tree/
 
   - Google Code
-    https://code.google.com/p/softether/
+    https://code.google.com/p/softether/source/browse/
 
 
 To fetch the source code from GitHub:
@@ -179,6 +179,9 @@ SOFTWARE INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES
 PROHIBIT ENCRYPTED COMMUNICATIONS. USING THIS SOFTWARE IN OTHER
 COUNTRIES MIGHT BE RESTRICTED.
 
+READ AND UNDERSTAND THE 'WARNING.TXT' FILE BEFORE USING THIS SOFTWARE.
+SOME SOFTWARE PROGRAMS FROM THIRD PARTIES ARE INCLUDED ON THIS SOFTWARE WITH LICENSE CONDITIONS WHICH ARE DESCRIBED ON THE 'THIRD_PARTY.TXT' FILE.
+
 
 ADVERTISEMENT
 -------------

+ 757 - 0
src/THIRD_PARTY.TXT

@@ -0,0 +1,757 @@
+BitVisor(R) VPN Client Module (IPsec Driver):
+Copyright (c) 2007, 2008 University of Tsukuba.
+Copyright (C) 2007, 2008 National Institute of Information and Communications
+Technology.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+3. Neither the name of the University of Tsukuba nor the names of its
+contributors may be used to endorse or promote products derived from this
+software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------
+
+Microsoft(R) C Runtime Library:
+(c) 2007 Microsoft Corporation. All Rights Reserved.
+
+-------------------
+
+RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki):
+
+License to copy and use this software is granted provided that it is
+identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface
+(Cryptoki)" in all material mentioning or referencing this software.
+
+License is also granted to make and use derivative works provided that such
+works are identified as "derived from the RSA Security Inc. PKCS #11
+Cryptographic Token Interface (Cryptoki)" in all material mentioning or
+referencing the derived work.
+
+RSA Security Inc. makes no representations concerning either the
+merchantability of this software or the suitability of this software for any
+particular purpose. It is provided "as is" without express or implied warranty
+of any kind.
+
+-------------------
+
+WinPcap:
+Copyright (c) 2001 - 2003 NetGroup, Politecnico di Torino (Italy)
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+3. Neither the name of the Politecnico di Torino nor the names of its
+contributors may be used to endorse or promote products derived from this
+software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------
+
+libedit:
+Copyright (c) 1992, 1993 The Regents of the University of California.  All
+rights reserved.
+
+This code is derived from software contributed to Berkeley by Christos Zoulas
+of Cornell University.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+1. Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors may be
+used to endorse or promote products derived from this software without
+specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------
+
+libiconv:
+
+          GNU LIBRARY GENERAL PUBLIC LICENSE
+               Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ Everyone is permitted to copy and distribute verbatim copies of this license
+document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+                Preamble
+
+  The licenses for most software are designed to take away your freedom to
+share and change it. By contrast, the GNU General Public Licenses are intended
+to guarantee your freedom to share and change free software--to make sure the
+software is free for all its users.
+
+  This license, the Library General Public License, applies to some specially
+designated Free Software Foundation software, and to any other libraries whose
+authors decide to use it. You can use it for your libraries, too.
+
+  When we speak of free software, we are referring to freedom, not price. Our
+General Public Licenses are designed to make sure that you have the freedom to
+distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new free
+programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid anyone to
+deny you these rights or to ask you to surrender the rights. These
+restrictions translate to certain responsibilities for you if you distribute
+copies of the library, or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis or for
+a fee, you must give the recipients all the rights that we gave you. You must
+make sure that they, too, receive or can get the source
+code. If you link a program with the library, you must provide complete object
+files to the recipients so that they can relink them with the library, after
+making changes to the library and recompiling it. And you must show them these
+terms so they know their rights.
+
+  Our method of protecting your rights has two steps: (1) copyright the
+library, and (2) offer you this license which gives you legal permission to
+copy, distribute and/or modify the library.
+
+  Also, for each distributor's protection, we want to make certain that
+everyone understands that there is no warranty for this free library. If the
+library is modified by someone else and passed on, we want its recipients to
+know that what they have is not the original version, so that any problems
+introduced by others will not reflect on the original authors' reputations.
+
+  Finally, any free program is threatened constantly by software patents. We
+wish to avoid the danger that companies distributing free software will
+individually obtain patent licenses, thus in effect transforming the program
+into proprietary software. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  Most GNU software, including some libraries, is covered by the ordinary GNU
+General Public License, which was designed for utility programs. This license,
+the GNU Library General Public License, applies to certain designated
+libraries. This license is quite different from the ordinary one; be sure to
+read it in full, and don't assume that anything in it is the same as in the
+ordinary license.
+
+  The reason we have a separate public license for some libraries is that they
+blur the distinction we usually make between modifying or adding to a program
+and simply using it. Linking a program with a library, without changing the
+library, is in some sense simply using the library, and is analogous to
+running a utility program or application program. However, in a textual and
+legal sense, the linked executable is a combined work, a derivative of the
+original library, and the ordinary General Public License treats it as such.
+
+  Because of this blurred distinction, using the ordinary General Public
+License for libraries did not effectively promote software sharing, because
+most developers did not use the libraries. We concluded that weaker conditions
+might promote sharing better.
+
+  However, unrestricted linking of non-free programs would deprive the users
+of those programs of all benefit from the free status of the libraries
+themselves. This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while preserving
+your freedom as a user of such programs to change the free libraries that are
+incorporated in them. (We have not seen how to achieve this as regards changes
+in header files, but we have achieved it as regards changes in the actual
+functions of the Library.) The hope is that this will lead to faster
+development of free libraries.
+
+  The precise terms and conditions for copying, distribution and modification
+follow. Pay close attention to the difference between a "work based on the
+library" and a "work that uses the library". The former contains code derived
+from the library, while the latter only works together with the library.
+
+  Note that it is possible for a library to be covered by the ordinary General
+Public License rather than by this special one.
+
+          GNU LIBRARY GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library which contains a
+notice placed by the copyright holder or other authorized party saying it may
+be distributed under the terms of this Library
+General Public License (also called "this License"). Each licensee is
+addressed as "you".
+
+  A "library" means a collection of software functions and/or data prepared so
+as to be conveniently linked with application programs (which use some of
+those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work which has
+been distributed under these terms. A "work based on the Library" means either
+the Library or any derivative work under copyright law: that is to say, a work
+containing the Library or a portion of it, either verbatim or with
+modifications and/or translated straightforwardly into another language.
+(Hereinafter, translation is included without limitation in the term
+"modification".)
+
+  "Source code" for a work means the preferred form of the work for making
+modifications to it. For a library, complete source code means all the source
+code for all modules it contains, plus any associated interface definition
+files, plus the scripts used to control compilation and installation of the
+library.
+
+  Activities other than copying, distribution and modification are not covered
+by this License; they are outside its scope. The act of running a program
+using the Library is not restricted, and output from such a program is covered
+only if its contents constitute a work based on the Library (independent of
+the use of the Library in a tool for writing it). Whether that is true depends
+on what the Library does and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's complete
+source code as you receive it, in any medium, provided that you conspicuously
+and appropriately publish on each copy an appropriate copyright notice and
+disclaimer of warranty; keep intact all the notices that refer to this License
+and to the absence of any warranty; and distribute a copy of this License
+along with the Library.
+
+  You may charge a fee for the physical act of transferring a copy, and you
+may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Library or any portion of it,
+thus forming a work based on the Library, and copy and distribute such
+modifications or work under the terms of Section 1 above, provided that you
+also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices stating
+that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no charge to all
+third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a table
+of data to be supplied by an application program that uses the facility, other
+than as an argument passed when the facility is invoked, then you must make a
+good faith effort to ensure that, in the event an application does not supply
+such function or table, the facility still operates, and performs whatever
+part of its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has a
+purpose that is entirely well-defined independent of the application.
+Therefore, Subsection 2d requires that any application-supplied function or
+table used by this function must be optional: if the application does not
+supply it, the square root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If identifiable
+sections of that work are not derived from the Library, and can be reasonably
+considered independent and separate works in themselves, then this License,
+and its terms, do not apply to those sections when you distribute them as
+separate works. But when you distribute the same sections as part of a whole
+which is a work based on the Library, the distribution of the whole must be on
+the terms of this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest your
+rights to work written entirely by you; rather, the intent is to exercise the
+right to control the distribution of derivative or collective works based on
+the Library.
+
+In addition, mere aggregation of another work not based on the Library with
+the Library (or with a work based on the Library) on a volume of a storage or
+distribution medium does not bring the other work under the scope of this
+License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do this,
+you must alter all the notices that refer to this License, so that they refer
+to the ordinary GNU General Public License, version 2, instead of to this
+License. (If a newer version than version 2 of the ordinary GNU General Public
+License has appeared, then you can specify that version instead if you wish.)
+Do not make any other change in these notices.
+
+  Once this change is made in a given copy, it is irreversible for that copy,
+so the ordinary GNU General Public License applies to all subsequent copies
+and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of the Library
+into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or derivative of
+it, under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you accompany it with the complete
+corresponding machine-readable source code, which must be distributed under
+the terms of Sections 1 and 2 above on a medium customarily used for software
+interchange.
+
+  If distribution of object code is made by offering access to copy from a
+designated place, then offering equivalent access to copy the source code from
+the same place satisfies the requirement to distribute the source code, even
+though third parties are not compelled to copy the source along with the
+object code.
+
+  5. A program that contains no derivative of any portion of the Library, but
+is designed to work with the Library by being compiled or linked with it, is
+called a "work that uses the Library". Such a work, in isolation, is not a
+derivative work of the Library, and therefore falls outside the scope of this
+License.
+
+  However, linking a "work that uses the Library" with the Library creates an
+executable that is a derivative of the Library (because it contains portions
+of the Library), rather than a "work that uses the library". The executable is
+therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file that is
+part of the Library, the object code for the work may be a derivative work of
+the Library even though the source code is not.
+Whether this is true is especially significant if the work can be linked
+without the Library, or if the work is itself a library. The threshold for
+this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data structure
+layouts and accessors, and small macros and small inline functions (ten lines
+or less in length), then the use of the object file is unrestricted,
+regardless of whether it is legally a derivative work. (Executables containing
+this object code plus portions of the Library will still fall under Section
+6.)
+
+  Otherwise, if the work is a derivative of the Library, you may distribute
+the object code for the work under the terms of Section 6. Any executables
+containing that work also fall under Section 6, whether or not they are linked
+directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also compile or link a
+"work that uses the Library" with the Library to produce a work containing
+portions of the Library, and distribute that work under terms of your choice,
+provided that the terms permit modification of the work for the customer's own
+use and reverse engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the Library
+is used in it and that the Library and its use are covered by this License.
+You must supply a copy of this License. If the work during execution displays
+copyright notices, you must include the copyright notice for the Library among
+them, as well as a reference directing the user to the copy of this License.
+Also, you must do one of these things:
+
+    a) Accompany the work with the complete corresponding machine-readable
+source code for the Library including whatever changes were used in the work
+(which must be distributed under Sections 1 and 2 above) ; and, if the work is
+an executable linked with the Library, with the complete machine-readable
+"work that uses the Library", as object code and/or source code, so that the
+user can modify the Library and then relink to produce a modified executable
+containing the modified Library. (It is understood that the user who changes
+the contents of definitions files in the Library will not necessarily be able
+to recompile the application to use the modified definitions.)
+
+    b) Accompany the work with a written offer, valid for at least three
+years, to give the same user the materials specified in Subsection 6a, above,
+for a charge no more than the cost of performing this distribution.
+
+    c) If distribution of the work is made by offering access to copy from a
+designated place, offer equivalent access to copy the above specified
+materials from the same place.
+
+    d) Verify that the user has already received a copy of these materials or
+that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the Library"
+must include any data and utility programs needed for reproducing the
+executable from it. However, as a special exception, the source code
+distributed need not include anything that is normally distributed (in either
+source or binary form) with the major components (compiler, kernel, and so on)
+of the operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+  It may happen that this requirement contradicts the license restrictions of
+other proprietary libraries that do not normally accompany the operating
+system. Such a contradiction means you cannot use both them and the Library
+together in an executable that you distribute.
+
+  7. You may place library facilities that are a work based on the Library
+side-by-side in a single library together with other library facilities not
+covered by this License, and distribute such a combined library, provided that
+the separate distribution of the work based on the Library and of the other
+library facilities is otherwise permitted, and provided that you do these two
+things:
+
+    a) Accompany the combined library with a copy of the same work based on
+the Library, uncombined with any other library facilities. This must be
+distributed under the terms of the Sections above.
+
+    b) Give prominent notice with the combined library of the fact that part
+of it is a work based on the Library, and explaining where to find the
+accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute the
+Library except as expressly provided under this License. Any attempt otherwise
+to copy, modify, sublicense, link with, or distribute the Library is void, and
+will automatically terminate your rights under this License. However, parties
+who have received copies, or rights, from you under this License will not have
+their licenses terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not signed
+it. However, nothing else grants you permission to modify or distribute the
+Library or its derivative works. These actions are prohibited by law if you do
+not accept this License. Therefore, by modifying or distributing the Library
+(or any work based on the Library), you indicate your acceptance of this
+License to do so, and all its terms and conditions for copying, distributing
+or modifying the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the original
+licensor to copy, distribute, link with or modify the Library subject to these
+terms and conditions. You may not impose any further restrictions on the
+recipients' exercise of the rights granted herein. You are not responsible for
+enforcing compliance by third parties to this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or otherwise)
+that contradict the conditions of this License, they do not excuse you from
+the conditions of this License. If you cannot distribute so as to satisfy
+simultaneously your obligations under this License and any other pertinent
+obligations, then as a consequence you may not distribute the Library at all.
+For example, if a patent license would not permit royalty-free redistribution
+of the Library by all those who receive copies directly or indirectly through
+you, then the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply, and
+the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any patents or
+other property right claims or to contest validity of any such claims; this
+section has the sole purpose of protecting the integrity of the free software
+distribution system which is implemented by public license practices. Many
+people have made generous contributions to the wide range of software
+distributed through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing to
+distribute software through any other system and a licensee cannot impose that
+choice.
+
+This section is intended to make thoroughly clear what is believed to be a
+consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in certain
+countries either by patents or by copyrighted interfaces, the original
+copyright holder who places the Library under this License may add an explicit
+geographical distribution limitation excluding those countries, so that
+distribution is permitted only in or among countries not thus excluded. In
+such case, this License incorporates the limitation as if written in the body
+of this License.
+
+  13. The Free Software Foundation may publish revised and/or new versions of
+the Library General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and "any later
+version", you have the option of following the terms and conditions either of
+that version or of any later version published by the Free Software
+Foundation. If the Library does not specify a license version number, you may
+choose any version ever published by the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free programs
+whose distribution conditions are incompatible with these, write to the author
+to ask for permission. For software which is copyrighted by the Free Software
+Foundation, write to the Free Software Foundation; we sometimes make
+exceptions for this. Our decision will be guided by the two goals of
+preserving the free status of all derivatives of our free software and of
+promoting the sharing and reuse of software generally.
+
+                NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
+THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
+STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
+LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
+PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE,
+YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO
+LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR
+THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+             END OF TERMS AND CONDITIONS
+
+-------------------
+
+ncurses:
+Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, distribute with
+modifications, sublicense, and/or sell copies of the Software, and to permit
+persons to whom the Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name(s) of the above copyright holders
+shall not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization.
+
+-------------------
+
+OpenSSL:
+OpenSSL License
+Copyright (c) 1998-2011 The OpenSSL Project.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer. 
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+3. All advertising materials mentioning features or use of this software must
+display the following acknowledgment: "This product includes software
+developed by the OpenSSL Project for use in the OpenSSL Toolkit.
+(http://www.openssl.org/)"
+
+4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+endorse or promote products derived from this software without prior written
+permission. For written permission, please contact [email protected].
+
+5. Products derived from this software may not be called "OpenSSL" nor may
+"OpenSSL" appear in their names without prior written permission of the
+OpenSSL Project.
+
+6. Redistributions of any form whatsoever must retain the following
+acknowledgment: "This product includes software developed by the OpenSSL
+Project for use in the OpenSSL Toolkit (http://www.openssl.org/)"
+
+THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY EXPRESSED
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
+EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+This product includes cryptographic software written by Eric Young
+([email protected]).  This product includes software written by Tim Hudson
+([email protected]).
+
+Original SSLeay License
+Copyright (C) 1995-1998 Eric Young ([email protected]) All rights reserved.
+
+This package is an SSL implementation written by Eric Young
+([email protected]). The implementation was written so as to conform with
+Netscapes SSL.
+
+This library is free for commercial and non-commercial use as long as the
+following conditions are aheared to.  The following conditions apply to all
+code found in this distribution, be it the RC4, RSA, lhash, DES, etc., code;
+not just the SSL code.  The SSL documentation included with this distribution
+is covered by the same copyright terms except that the holder is Tim Hudson
+([email protected]).
+
+Copyright remains Eric Young's, and as such any Copyright notices in the code
+are not to be removed. If this package is used in a product, Eric Young should
+be given attribution as the author of the parts of the library used. This can
+be in the form of a textual message at program startup or in documentation
+(online or textual) provided with the package.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+1. Redistributions of source code must retain the copyright notice, this list
+of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software must
+display the following acknowledgement: "This product includes cryptographic
+software written by Eric Young ([email protected])" The word 'cryptographic'
+can be left out if the rouines from the library being used are not
+cryptographic related :-).
+4. If you include any Windows specific code (or a derivative thereof) from the
+apps directory (application code) you must include an acknowledgement: "This
+product includes software written by Tim Hudson ([email protected])"
+
+THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
+EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+The licence and distribution terms for any publically available version or
+derivative of this code cannot be changed.  i.e. this code cannot simply be
+copied and put under another distribution licence [including the GNU Public
+Licence.]
+
+-------------------
+
+zlib:
+Acknowledgments:
+  The deflate format used by zlib was defined by Phil Katz. The deflate and
+zlib specifications were written by L. Peter Deutsch. Thanks to all the people
+who reported problems and suggested various improvements in zlib; they are too
+numerous to cite here.
+
+Copyright notice:
+ (C) 1995-2004 Jean-loup Gailly and Mark Adler
+
+  This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the
+use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+claim that you wrote the original software. If you use this software in a
+product, an acknowledgment in the product documentation would be appreciated
+but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+
+  Jean-loup Gailly        Mark Adler
+  [email protected]          [email protected]
+
+If you use the zlib library in a product, we would appreciate *not* receiving
+lengthy legal documents to sign. The sources are provided for free but without
+warranty of any kind.  The library has been entirely written by Jean-loup
+Gailly and Mark Adler; it does not include third-party code.
+
+If you redistribute modified sources, we would appreciate that you include in
+the file ChangeLog history information documenting your changes. Please read
+the FAQ for more information on the distribution of modified source versions.
+
+-------------------
+
+Intel AESNI Sample Library:
+
+Copyright (c) 2010, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors may
+be used to endorse or promote products derived from this software without
+specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Issue Date: Aug 6, 2010
+
+-------------------
+
+NOTES WRITTEN BY SOFTETHER CORPORATION
+
+Note for users of non-Windows version of PacketiX VPN: The enumerated bundle
+of License Agreements above are copies of original License Agreements of each
+library programs which PacketiX VPN uses. PacketiX VPN is not a delivered work
+from these libraries. PacketiX VPN is a separated work from the libraries, but
+it may call functions of the libraries (whether or not PacketiX VPN calls such
+functions are depended on the user's intention to link them or not on user's
+side computer). While some libraries indicate GPL or LGPL as a condition to
+re-distribute, PacketiX VPN is not license under GPL nor LGPL. Therefore, we
+took special care not to make PacketiX VPN become delivered works of any GPL
+or LGPL libraries. In order to achieve that, both PacketiX VPN and GPL/LGPL
+libraries are distributed with isolated forms (means that any program files of
+PacketiX VPN are not bound nor linked to any GPL/LGPL libraries). If a user of
+PacketiX VPN wants to link GPL/LGPL libraries by their own decisions,
+operations and responsibilities, he may do that on his computer. However, if a
+delivered work under copyright law is created as a result of such an
+operation, such a delivered work must not re-distributed to other people,
+because it may violate GPL/LGPL libraries' conditions.
+
+Note for users of Windows version of PacketiX VPN: For technical reason, the
+above texts are exactly same as a file which is also contained on the
+non-Windows version of PacketiX VPN. Actually, the Windows version of PacketiX
+VPN has no relations to any GPL/LGPL libraries enumerated above.
+
+SoftEther Corporation provides source codes of some GPL/LGPL/other libraries
+listed above on its web server. Anyone can download, use and re-distribute
+them under individual licenses which are contained on each archive file,
+available from the following URL:
+http://uploader.softether.co.jp/src/
+

+ 523 - 0
src/WARNING.TXT

@@ -0,0 +1,523 @@
+THE IMPORTANT NOTICES ABOUT SOFTETHER VPN
+
+FUNCTIONS OF VPN COMMUNICATIONS EMBEDDED ON THIS SOFTWARE ARE VERY POWERFUL
+THAN EVER. THIS STRONG VPN ABILITY WILL BRING YOU HUGE BENEFITS. HOWEVER, IF
+YOU MISUSE THIS SOFTWARE, IT MIGHT DAMAGES YOURSELF. IN ORDER TO AVOID SUCH
+RISKS, THIS DOCUMENT ACCOUNTS IMPORTANT NOTICES FOR CUSTOMERS WHO ARE WILLING
+TO USE THIS SOFTWARE. THE FOLLOWING INSTRUCTIONS ARE VERY IMPORTANT. READ AND
+UNDERSTAND IT CAREFULLY. ADDITIONALLY, IF YOU ARE PLANNING TO USE THE DYNAMIC
+DNS, THE NAT TRAVERSAL OR THE VPN AZURE FUNCTIONS, READ THE SECTION 3.5
+CAREFULLY. THESE FUNCTIONS ARE FREE SERVICES PROVIDED VIA THE INTERNET, ARE
+NOT GUARANTEED, AND ARE NOT INTENDED TO BE USED FOR BUSINESS OR COMMERCIAL
+USE. DO NOT USE THESE SERVICES FOR YOUR BUSINESS OR COMMERCIAL USE.
+
+
+1. VPN Communication Protocols
+1.1. SoftEther VPN Protocol
+SoftEther VPN can perform VPN communication. Unlike traditional VPN protocols,
+SoftEther VPN has an implementation of the newly-designed "SoftEther VPN
+Protocol (SE-VPN Protocol)" . SE-VPN protocol encapsulates any Ethernet
+packets into a HTTPS (HTTP over SSL) connection. Therefore SE-VPN protocol can
+communicate beyond firewalls even if the firewall is configured to block
+traditional VPN packets by network administrator. SE-VPN protocol is designed
+and implemented to comply TLS 1.0 (RFC 5246) and HTTPS (RFC 2818). However, it
+sometimes have different behavior to RFCs. If you are a network administrator
+and want to block SE-VPN protocols on the firewall, you can adopt a
+"white-list" policy on the firewall to filter any TCP or UDP packets on the
+border except explicitly allowed packets towards specific web sites and
+servers.
+
+1.2. NAT Traversal Function
+Generally, if you use traditional VPN systems you have to request a network
+administrator to make the NAT or firewall to "open" or "relay" specific TCP or
+UDP ports. However, there are demands somehow to eliminate such working costs
+on network administrators. In order to satisfy such demands, SoftEther VPN has
+the newly-implemented "NAT Traversal" function. NAT Traversal is enabled by
+default. A SoftEther VPN Server running on the computer behind NAT or firewall
+can accept VPN connections from the Internet, without any special
+configurations on firewalls or NATs. If you want to disable the NAT Traversal
+function, modify the "DisableNatTraversal" to "true" on the configuration file
+of SoftEther VPN Server. In order to disable it on the client-side, append
+"/tcp" suffix on the destination hostname.
+
+1.3. Dynamic DNS Function
+Traditional legacy VPN system requires a static global IP address on the VPN
+server. In consideration of shortage of global IP addresses, SoftEther
+Corporation implements the "Dynamic DNS Function" on SoftEther VPN Server.
+Dynamic DNS is enabled by default. Dynamic DNS function notify the current
+global IP address of the PC to the Dynamic DNS Servers which are operated by
+SoftEther Corporation. A globally-unique hostname (FQDN) such as
+"abc.softether.net" ( "abc" varies as unique per a user) will be assigned on
+the VPN Server. If you tell this unique hostname to a VPN user, the user can
+specify it as the destination VPN Sever hostname on the VPN Client and will be
+able to connect the VPN Server. No IP addresses are required to know
+beforehand. If the IP address of the VPN Server varies, the registered IP
+address related to the hostname of Dynamic DNS service will be changed
+automatically. By this mechanism, no longer need a static global IP address
+which costs monthly to ISPs. You can use consumer-level inexpensive Internet
+connection with dynamic IP address in order to operate an enterprise-level VPN
+system. If you want to disable Dynamic DNS, specify "true" on the "Disabled"
+items of the "DDnsClient" directive on the SoftEther VPN Server configuration
+file. * Note for residents in People's Republic of China: If your VPN Server
+is running on the People's Republic of China, the DNS suffix will be replaced
+to "sedns.cn" domain. The "sedns.cn" domain is the service possessed and
+operated by "Beijing Daiyuu SoftEther Technology Co., Ltd" which is a
+Chinese-local enterprise.
+
+1.4. VPN over ICMP / VPN over DNS functions
+If you want to make a VPN connection between SoftEther VPN Client / Bridge and
+SoftEther VPN Server, but if TCP and UDP packets are prohibited by the
+firewall, then you can encapsulates payloads into "ICMP" (as known as Ping) or
+"DNS" packets. This function can realize a VPN connection by using ICMP or DNS
+even if the firewall or router blocks every TCP or UDP connections. VPN over
+ICMP / VPN over DNS functions are designed to comply standard ICMP and DNS
+specifications as possible, however it sometimes has a behavior not to fully
+comply them. Therefore, few poor-quality routers may be caused a
+memory-overflow or something troubles when a lot of ICMP or DNS packets are
+passed, and such routers sometimes freezes or reboots. It might affects other
+users on the same network. To avoid such risks, append the suffix "/tcp" on
+the destination hostname which is specified on the VPN-client side to disable
+VPN over ICMP / DNS functions.
+
+1.5. VPN Azure Cloud Service
+If your SoftEther VPN Server is placed behind the NAT or firwall, and by some
+reason you cannot use NAT Traversal function, Dynamic DNS function or VPN over
+ICMP/DNS function, you can use VPN Azure Clouse Service. SoftEther Corporation
+operates VPN Azure Cloud on Internet. After the VPN Server makes a connection
+to the VPN Azure Cloud, the hostname "abc.vpnazure.net" ( "abc" is a unique
+hostname) can be specified to connect to the VPN Server via the VPN Azure
+Cloud. Practically, such a hostname is pointing a global IP address of one of
+cloud servers which are operated by SoftEther Corporation. If A VPN Client
+connects to such a VPN Azure host, then the VPN Azure host will relay all
+traffics between the VPN Client and the VPN Server. VPN Azure is disabled by
+default. You can activate it easily by using VPN Server Configuration Tool.
+
+1.6. UDP Acceleration
+SoftEther VPN has the UDP Acceleration Function. If a VPN consists of two
+sites detects that UDP channel can be established, UDP will be automatically
+used. By this function, throughput of UDP increases. If direct UDP channel can
+be established, direct UDP packets will be used. However, if there is
+something obstacles such as firewalls or NATs, the "UDP Hole Punching"
+technology will be used, instead. The "UDP Hole Punching" uses the cloud
+servers which SoftEther Corporation operates on Internet. UDP Acceleration can
+be disabled anytime by setting up so on the VPN-client side.
+
+
+2. VPN Software
+2.1. SoftEther VPN Client
+If you use SoftEther VPN Client on Windows, the Virtual Network Adapter device
+driver will be installed on Windows. The Virtual Network Adapter is
+implemented as a kernel-mode driver for Windows. The driver is
+digitally-signed by a certificate issued by VeriSign, Inc. and also sub-signed
+by Symantec Corporation. A message to ask you want to sure install the driver
+might be popped up on the screen. SoftEther VPN Client may response the
+message if possible. SoftEther VPN Client also optimizes the configuration of
+MMCSS (Multimedia Class Scheduler Service) on Windows. You can undo the
+optimizations of MMCSS afterwards.
+
+2.2. SoftEther VPN Server / Bridge
+If you use SoftEther VPN Server / Bridge on Windows with "Local Bridge"
+functions, you have to install the low-level Ethernet packet processing driver
+on the computer. The driver is digitally-signed by a certificate issued by
+VeriSign, Inc. and also sub-signed by Symantec Corporation. SoftEther VPN
+Server / Bridge may disable the TCP/IP offloading features on the physical
+network adapter for Local Bridge function. In Windows Vista / 2008 or greater
+version, VPN Server may inject a packet-filter driver which complies Windows
+Filter Platform (WPF) specification into the kernel in order to provide IPsec
+function. The packet-filter driver will be loaded available only if IPsec
+function is enabled. Once you enables IPsec function of SoftEther VPN Server,
+the built-in IPsec function of Windows will be disabled. After you disabled
+IPsec function of SoftEther VPN Server, then the built-in IPsec function of
+Windows will revive. In order to provide the Local Bridge function, SoftEther
+VPN Server / Bridge disables the TCP/IP offloading function on the operating
+system.
+
+2.3. User-mode Installation
+You can install SoftEther VPN Server and SoftEther VPN Bridge as "User-mode"
+on Windows. In other words, even if you don't have Windows system
+administrator's privileges, you can install SoftEther VPN as a normal user.
+User-mode install will disable a few functions, however other most functions
+work well. Therefore, for example, an employee can install SoftEther VPN
+Server on the computer in the office network, and he will be able to connect
+to the server from his home. In order to realize such a system by user-self,
+no system administrative privileges are required in the view-point of
+technical. However, breaking rules of the company to install software on the
+computer without authority might be regarded as an unfavorable behavior. If
+you are an employee and belong to the company, and the company-policy
+prohibits installing software or making communications towards Internet
+without permission, you have to obtain a permission from the network
+administrator or the executive officer of your company in advance to install
+SoftEther VPN. If you install VPN Server / Bridge as User-mode, an icon will
+be appeared on the Windows task-tray. If you feel that the icon disturbs you,
+you can hide it by your operation. However, you must not exploit this hiding
+function to install VPN Server on other person's computer as a spyware. Such
+behavior might be an offence against the criminal law.
+
+2.4. Keep Alive Function
+SoftEther VPN Server and SoftEther VPN Bridge has Keep Alive Function by
+default. The purpose of this function is to sustain the Internet line active.
+The function transmits UDP packets with a random-byte-array-payload
+periodically. This function is useful to avoid automatic disconnection on
+mobile or dial-up connections. You can disable Keep Alive Function anytime.
+
+2.5. Uninstallation
+The uninstallation process of SoftEther VPN software will delete all program
+files. However, non-program files (such as files and data which are generated
+by running of programs) ) will not be deleted. For technical reason, the exe
+and resource files of uninstaller might remain. Such remaining files never
+affects to use the computer, however you can delete it manually. Kernel-mode
+drivers might not be deleted, however such drivers will not be loaded after
+the next boot of Windows. You can use "sc" command of Windows to delete
+kernel-mode drivers manually.
+
+2.6. Security
+You should set the administrator's password on SoftEther VPN Server / Bridge
+after installation. If you neglect to do it, another person can access to
+SoftEther VPN Server / Bridge and can set the password without your
+permission. This caution might be also applied on SoftEther VPN Client for
+Linux.
+
+2.7. Automatic Update Notification
+SoftEther VPN software for Windows has an automatic update notification
+function. It accesses to the SoftEther Update server periodically to check
+whether or not the latest version of software is released. If the latest
+version is released, the notification message will be popped up on the screen.
+In order to achieve this purpose, the version, language settings, the unique
+identifier, the IP address of your computer and the hostname of VPN Server
+which is connected to will be sent to the SoftEther Update server. No personal
+information will be sent. Automatic Update Notification is enabled by default,
+however you can disable it on the configuration screen. The setting whether
+turned on or turned off will be saved individually corresponding to each
+destination VPN server, by VPN Server Manager.
+
+2.8. Virtual NAT Function
+A Virtual Hub on SoftEther VPN Server / Bridge has "Virtual NAT Function" .
+Virtual NAT Function can share a single IP address on the physical network by
+multiple private IP address of VPN Clients. There are two operation mode of
+Virtual NAT: User-mode and Kernel-mode. In the user-mode operation, Virtual
+NAT shares an IP address which is assigned on the host operating system.
+Unlike user-mode, the kernel-mode operation attempts to find DHCP servers on
+the physical network. If there are two or more physical networks, a DHCP
+server will be sought automatically for each segments serially. If a DHCP
+server found, and an IP address is acquired, the IP address will be used by
+the Virtual NAT. In this case, an IP entry as a DHCP client will be registered
+on the IP pool of the physical DHCP Server. The physical default gateway and
+the DNS server will be used by the Virtual NAT in order to communicate with
+hosts in Internet. In kernel-mode operation, a Virtual Hub has a virtual MAC
+address which is operating on the physical Ethernet segment. In order to check
+the connectivity to Internet, SoftEther VPN periodically sends DNS query
+packet to resolve the IP address of host "www.yahoo.com" or "www.baidu.com" ,
+and attempts to connect to the TCP port 80 of such a resulted IP address for
+connectivity check.
+
+2.9. Unattended Installation of Kernel-mode Components
+When SoftEther VPN will detect a necessity to install the kernel-mode
+components on Windows, a confirmation message will be appeared by Windows
+system. In this occasion, SoftEther VPN software will switch to the Unattended
+Installation mode in order to respond "Yes" to Windows. This is a solution to
+prevent dead-locks when a remote-administration is performed from remote
+place.
+
+2.10. Windows Firewall
+SoftEther VPN software will register itself as a safe-program. Such an entry
+will be remain after the uninstallation. You can remove it manually from the
+Control Panel of Windows.
+
+
+3. Internet Services
+3.1. Internet Services which are provided by SoftEther Corporation
+SoftEther Corporation provides Dynamic DNS, NAT Traversal and VPN Azure server
+services on the Internet. These services are free of charge. Customers can
+access to the services by using SoftEther VPN software, via Internet. These
+service will be planned to be available from Open-Source version of "SoftEther
+VPN" which will be released in the future.
+
+3.2. Sent Information and Privacy Protection
+SoftEther VPN software may send an IP address, hostname, the version of VPN
+software on the customer's computer to the cloud service operated by SoftEther
+Corporation, in order to use the above services. These sending of information
+are minimal necessary to use the services. No personal information will be
+sent. SoftEther Corporation records log files of the cloud service servers for
+90 days at least with the received information. Such logs will be used for
+troubleshooting and other legitimate activities. SoftEther Corporation may
+provide logs to a public servant of Japanese government who are belonging to
+courts, police stations and the prosecutor's office, in order to comply such
+authorities' order. (Every Japanese public servants are liable by law to keep
+the information close.) Moreover, the IP addresses or other information will
+be processed statistically and provided to the public, not to expose the each
+concrete IP address, in order to release the release of research activities.
+
+3.3. Communication Data via VPN Azure Service
+Regardless of the above 3.2 rule, if the customer sends or receives VPN
+packets using VPN Azure Cloud Service, the actual payloads will stored and
+forwarded via the volatile memory of the servers for very short period. Such a
+behavior is naturally needed to provide the "VPN relay service" . No payloads
+will be recorded on "fixed" storages such as hard-drives. However, the
+"Wiretapping for Criminals Procedures Act" (The 137th legislation ruled on
+August 18, 1999 in Japan) requires telecommunication companies to allow the
+Japanese government authority to conduct a wire-tapping on the line. VPN Azure
+Servers which are physically placed on Japan are subjects of this law.
+
+3.4. Comply to Japanese Telecommunication Laws
+SoftEther Corporation complies with Japanese Telecommunication Laws as
+necessary to provide online services via Internet.
+
+3.5. Free and Academic Experiment Services
+SoftEther provides Dynamic DNS, NAT Traversal and VPN Azure as academic
+experiment services. Therefore, there services can be used for free of charge.
+These services are not parts of "SoftEther VPN Software Products" . These
+services are provided without any warranty. The services may be suspended or
+discontinued by technical or operational matters. In such occasions, users
+will not be able to use the services. A user have to understand such risks,
+and to acknowledge that such risks are borne by a user-self. SoftEther will
+never be liable to results or damages of use or unable-to-use of the service.
+Even if the user has already paid the license-fee of the commercial version of
+SoftEther VPN, such paid fees don't include any fees of these services.
+Therefore, if the online services will stop or be discontinued, no refunds or
+recoveries of damages will be provided by SoftEther Corporation.
+
+3.6. DNS Proxy Cloud Servers
+In some regions, when a user uses Internet, a DNS query sometimes broken or
+lost when it is passing through the ISP line. If SoftEther VPN Server, Client
+or Bridge detects a possibility that the accessing to the actual VPN server
+might be unstable, then DNS queries will be also transferred to the DNS proxy
+cloud servers which are operated by SoftEther Corporation. A DNS proxy cloud
+server will respond DNS queries with answering correct a IP address.
+
+
+4. General Cautions
+4.1. Needs an Approval from Network Administrator
+SoftEther VPN has powerful functions which don't require special settings by
+network administrators. For example, you need not to ask the administrator to
+configure the existing firewall in order to "open" a TCP/UDP port. Such
+characteristic features are for the purpose to eliminate working times and
+costs of network administrators, and avoid misconfiguration-risks around the
+tasks to open specific exception ports on the firewall. However, any employees
+belong to the company have to obtain an approval from the network
+administrator before installs SoftEther VPN. If your network administrator
+neglects to provide such an approval, you can consider to take an approval
+from an upper authority. (For example, executive officer of the company.) If
+you use SoftEther VPN without any approvals from the authority of your
+company, you might have disadvantage. SoftEther Corporation will be never
+liable for results or damages of using SoftEther VPN.
+
+4.2. Observe Laws of Your Country
+If your country's law prohibits the use of encryption, you have to disable the
+encryption function of SoftEther VPN by yourself. Similarly, in some countries
+or regions, some functions of SoftEther VPN might be prohibited to use by
+laws. Other countries' laws are none of SoftEther Corporation's concern
+because SoftEther Corporation is an enterprise which is located and registered
+in Japan physically. For example, there might be a risk that a part of
+SoftEther VPN conflicts an existing patent which is valid only on the specific
+region. SoftEther Corporation has no interests in such specific region outside
+Japan's territory. Therefore, if you want to use SoftEther VPN in regions
+outside Japan, you have to be careful not to violate third-person's rights.
+You have to verify the legitimacy of the use of SoftEther VPN in the specific
+region before you actually use it in such region. By nature, there are almost
+200 countries in the World, and each country's law is different each other. It
+is practically impossible to verify every countries' laws and regulations and
+make the software comply with all countries' laws in advance to release the
+software. Therefore SoftEther Corporation has verified the legitimacy of
+SoftEther VPN against the laws and regulations of only Japan. If a user uses
+SoftEther VPN in a specific country, and damaged by public servants of the
+government authority, SoftEther Corporation will never be liable to recover or
+compensate such damages or criminal responsibilities.
+
+
+5. VPN Gate Academic Experiment Project
+(This chapter applies only on SoftEther VPN software package which contains
+the extension plug-in for VPN Gate Academic Experiment Project.)
+5.1. About VPN Gate Academic Experiment Project
+VPN Gate Academic Experiment Project is an online service operated for just
+the academic research purpose at the graduate school of University of Tsukuba,
+Japan. The purpose of this research is to expend our knowledge about the
+"Global Distributed Public VPN Relay Server" (GDPVRS) technology. For details,
+please visit http://www.vpngate.net/.
+
+5.2. About VPN Gate Service
+SoftEther VPN Server and SoftEther VPN Client may contain "VPN Gate Service"
+program. However, VPN Gate Service is disabled by default.
+VPN Gate Service should be activated and enabled by the voluntary intention of
+the owner of the computer which SoftEther VPN Server or SoftEther VPN Client
+is installed on. After you activate VPN Gate Service, the computer will be
+start to serve as a part of the Global Distributed Public VPN Relay Servers.
+The IP address, hostname and related information of the computer will be sent
+and registered to the directory server of VPN Gate Academic Experiment
+Project, and they will be published and disclosed to the public. This
+mechanism will allow any VPN Gate Client software's user to connect to the VPN
+Gate Service running on your computer. While the VPN session between a VPN
+Gate Client and your VPN Gate Service is established, the VPN Gate Client's
+user can send/receive any IP packets towards the Internet via the VPN Gate
+Service. The global IP address of the VPN Gate Service's hosing computer will
+be used as the source IP address of such communications which a VPN Gate
+Client initiates.
+VPN Gate Service will send some information to the VPN Gate Academic
+Experiment Service Directory Server. The information includes the operator's
+information which described in section 5.5, logging settings, uptime,
+operating system version, type of protocol, port numbers, quality information,
+statistical information, VPN Gate clients' log history data (includes dates,
+IP addresses, version numbers and IDs) and the version of the software. These
+information will be exposed on the directory. VPN Gate Service also receives a
+key for encoding which is described on the chapter 5.9 from the directory
+server.
+
+5.3. Details of VPN Gate Service's Behavior
+If you enable VPN Gate Service manually, which is disabled by default, the
+"VPNGATE" Virtual Hub will be created on the SoftEther VPN Server. If you are
+using SoftEther VPN Client and attempt to active VPN Gate Service on it, an
+equivalent program to SoftEther VPN Server will be invoked on the same process
+of SoftEther VPN Client, and the "VPNGATE" Virtual Hub will be created. The
+"VPNGATE" Virtual Hub contains a user named "VPN" by default which permits
+anyone on the Internet to make a VPN connection to the Virtual Hub. Once a VPN
+Client connects to the "VPNGATE" Virtual Hub, any communication between the
+user and the Internet will pass through the Virtual Hub, and
+transmitted/received using the physical network interface on the computer
+which SoftEther VPN Server (or SoftEther VPN Client) is running on. This will
+cause the result that a destination host specified by the VPN Client will
+identify that the source of the communication has initiated from the VPN Gate
+Service's hosting computer's IP address. However, for safety, any packets
+which destinations are within 192.168.0.0/255.255.0.0, 172.16.0.0/255.240.0.0
+or 10.0.0.0/255.0.0.0 will be blocked by the "VPNGATE" Virtual Hub in order to
+protect your local network. Therefore, if you run VPN Gate Service on your
+corporate network or private network, it is safe because anonymous VPN Client
+users will not be permitted to access such private networks. VPN Gate Service
+also serves as relay for accessing to the VPN Gate Directory Server.
+In order to make VPN Gate Service familiar with firewalls and NATs, it opens
+an UDP port by using the NAT Traversal function which is described on the
+section 1.2. It also opens and listens on some TCP ports, and some TCP and UDP
+ports will be specified as the target port of Universal Plug and Play (UPnP)
+Port Transfer entries which are requested to your local routers. UPnP request
+packets will be sent periodically. Some routers keep such an opened TCP/UDP
+port permanently on the device. If you wish to close them, do it manually.
+VPN Gate Service also provides the mirror-site function for www.vpngate.net.
+This is a mechanism that a copy of the latest contents from www.vpngate.net
+will be hosted by the mirror-site tiny HTTP server which is running on the VPN
+Gate Service program. It will register itself on the mirror-sites list in
+www.vpngate.net. However, it never relays any other communications which are
+not towards www.vpngate.net.
+
+5.4. Communication between Internet via VPN Gate Service
+VPN Gate Service provides a routing between users and the Internet, by using
+the Virtual NAT Function which is described on the section 2.8. VPN Gate
+Service sends polling Ping packets to the server which is located on
+University of Tsukuba, and the Google Public DNS Server which is identified as
+8.8.8.8, in order to check the latest quality of your Internet line. VPN Gate
+Service also sends and receives a lot of random packets to/from the Speed Test
+Server on University of Tsukuba. These quality data will be reported to VPN
+Gate Directory Server, automatically and periodically. The result will be
+saved and disclosed to the public. These periodical polling communication are
+adjusted not to occupy the Internet line, however in some circumstances they
+might occupy the line.
+
+5.5. Operator's Information of VPN Gate Service
+If you activate VPN Gate Service on your computer, the computer will be a part
+of the Global Distributed Public VPN Relay Servers. Therefore, the Operator's
+administrative information of your VPN Gate Service should be reported and
+registered on the VPN Gate Service Directory. Operator's information contains
+the name of the operator and the abuse-reporting contact e-mail address. These
+information can be inputted on the screen if the VPN Gate configuration.
+Inputted information will be transmitted to the VPN Gate Directory Server,
+stored and disclosed to the public. So you have to be careful to input
+information. By the way, until you specify something as the operator's
+information, the computer's hostname will be used automatically as the field
+of the name of the operator, by appending the "'s owner" string after the
+hostname.
+
+5.6. Observe Laws to Operate VPN Gate Service
+In some countries or regions, a user who is planning to activate and operate
+VPN Gate Service, he are mandated to obtain a license or register a service
+from/to the government. If your region has such a regulation, you must fulfill
+mandated process before activating VPN Gate Service in advance. Neither the
+developers nor operators of the VPN Gate Academic Experiment Project will be
+liable for legal/criminal responsibilities or damages which are occurred from
+failure to comply your local laws.
+
+5.7. Protect Privacy of Communication
+Most of countries have a law which requires communication service's operators,
+including VPN Gate Service operators, to protect the privacy of communication
+of third-persons. When you operate VPN Gate Service, you must always protect
+user's privacy.
+
+5.8. Packet Logs
+The packet logging function is implemented on VPN Gate Service. It records
+essential headers of major TCP/IP packets which are transmitted via the
+Virtual Hub. This function will be helpful to investigate the "original IP
+address" of the initiator of communication who was a connected user of your
+VPN Gate Service, by checking the packet logs and the connection logs. The
+packet logs are recorded only for such legitimate investigates purpose. Do not
+peek nor leak packet logs except the rightful purpose. Such act will be
+violate the section 5.7.
+
+5.9. Packet Logs Automatic Archiving and Encoding Function
+The VPN Gate Academic Experiment Service is operated and running under the
+Japanese constitution and laws. The Japanese constitution laws demand strictly
+protection over the privacy of communication. Because this service is under
+Japanese rules, the program of VPN Gate Service implements this "Automatic Log
+File Encoding" protection mechanism, and enabled by default.
+The VPN Gate Service is currently configured to encode packet log files which
+has passed two or more weeks automatically, by default. In order to protect
+privacy of communication, if a packet log file is once encoded, even the
+administrator of the local computer cannot censor the packet log file. This
+mechanism protects privacy of end-users of VPN Gate Service.
+You can change the VPN Gate Service setting to disable this automatic encoding
+function. Then packet log files will never be encoded even after two weeks
+passed. In such a configuration, all packet logs will remain as plain-text on
+the disk. Therefore you have to take care not to violate user's privacy.
+If you are liable to decode an encoded packet log files (for example: a VPN
+Gate Service's user illegally abused your VPN Gate Service and you have to
+decode the packet logs in order to comply the laws), contact the administrator
+of the VPN Gate Academic Experiment Service at Graduate School of University
+of Tsukuba, Japan. You can find the contact address at
+http://www.vpngate.net/. The administrator of VPN Gate Service will respond to
+decode the packet logs if there is an appropriate and legal request from court
+or other judicial authorities, according to laws.
+
+5.10. Caution if You Operate VPN Gate Service in the Japan's Territories
+When a user operates VPN Gate Service in the Japan's territories, such an act
+may be regulated under the Japanese Telecommunication Laws if the operation is
+a subject to the law. However, in such a circumstance, according to the
+"Japanese Telecommunication Business Compete Manual [supplemental version]" ,
+non- profitable operations of communications are not identified as a
+"telecommunication business" . So usual operators of VPN Gate Service are not
+subjects to "telecommunication business operators" , and not be mandated to
+register to the government. Even so, legalities to protect the privacy of
+communication still imposed. As a conclusion, if you operate VPN Gate Service
+in the Japan's Territories, you must not leak the secrets of communications
+which are transmitted via your operating VPN Gate Service.
+
+5.11. VPN Gate Client
+If SoftEther VPN Client contains the VPN Gate Client plug-in, you can use it
+to obtain the list of current operating VPN Gate Service servers in the
+Internet, and make a VPN connection to a specific server on the list.
+VPN Gate Client always keeps the latest list of the VPN Gate Services
+periodically. Be careful if you are using a pay-per-use Internet line.
+When you start the VPN Gate Client software, the screen which asks you
+activate or not VPN Gate Service will be appeared. For details of VPN Gate
+Service, read the above sections.
+
+5.12. Caution before Joining or Exploiting VPN Gate Academic Experiment
+Project
+The VPN Gate Academic Experiment Service is operated as a research project at
+the graduate school on University of Tsukuba, Japan. The service is governed
+under the Japanese laws. Other countries' laws are none of our concerns nor
+responsibilities.
+By nature, there are almost 200 countries in the World, with different laws.
+It is impossible to verify every countries' laws and regulations and make the
+software comply with all countries' laws in advance to release the software.
+If a user uses VPN Gate service in a specific country, and damaged by public
+servants of the authority, the developer of either the service or software
+will never be liable to recover or compensate such damages or criminal
+responsibilities.
+By using this software and service, the user must observe all concerned laws
+and rules with user's own responsibility. The user will be completely liable
+to any damages and responsibilities which are results of using this software
+and service, regardless of either inside or outside of Japan's territory.
+If you don't agree nor understand the above warnings, do not use any of VPN
+Gate Academic Experiment Service functions.
+VPN Gate is a research project for just academic purpose only. VPN Gate was
+developed as a plug-in for SoftEther VPN and UT-VPN. However, all parts of VPN
+Gate were developed on this research project at University of Tsukuba. Any
+parts of VPN Gate are not developed by SoftEther Corporation. The VPN Gate
+Research Project is not a subject to be led, operated, promoted nor guaranteed
+by SoftEther Corporation.
+

BIN
src/bin/BuiltHamcoreFiles/unix/hamcore.se2


+ 117 - 0
src/bin/SOURCES_OF_BINARY_FILES.TXT

@@ -0,0 +1,117 @@
+All binary files on the 'hamcore' directory are free software under
+the GPLv2 license. (Except WinPcap binaries.)
+
+Some geeks should be interested in how to rebuild .sys (driver) files on
+this directory. This text file helps such crazy geeks.
+
+
+How to rebuild these '.sys' files?
+----------------------------------
+
+Windows Vista or later version of Windows requires all device drivers to be
+signed by Authenticode digital certificate. Therefore, SoftEther VPN Project
+publishes all necessary binary files in the 'hamcore' directory with
+'already-signed' format by the certificate of SoftEther VPN Project.
+
+That is the reason why the all .sys files (device drivers) are already built
+and digitally signed by SoftEther VPN Project on the time of release of
+the source code.
+
+However, the entire source code of all the .sys files are contained on the
+source code tree as follows:
+
+- pxwfp_x86.sys and pxwfp_x64.sys
+  You can build these files from the source code on the 'Wfp' directory.
+
+- see.sys and see_x64.sys
+  You can build these files from the source code on the 'See' directory.
+
+- SeLow_x86.sys and SeLow_x64.sys
+  You can build these files from the source code on the 'SeLow' directory.
+
+- vpn_driver.sys, vpn_driver_x64.sys and vpn_driver_9x.sys
+  You can build these files from the source code on the 'Neo' directory.
+
+- vpn_driver6.sys and vpn_driver6_x64.sys
+  You can build these files from the source code on the 'Neo6' directory.
+
+It is recommended to build these files on the 'SEVPN.sln' Visual Studio 2008
+solution file.
+
+Note that rebuilding these files require Windows Driver Kits.
+Loading the re-built .sys files requires your Authenticode certificate file
+if the operating system is Windows Vista or later.
+
+
+
+How to rebuild these 'vpn16.exe' files?
+---------------------------------------
+
+The vpn16.exe binary is the 16-bit Driver Install Utility for Windows 9x.
+You can build this file from the 'vpn16' directory. However, you need
+Visual C++ 16-bit edition and Windows 98 DDK to rebuild this 'vpn16.exe'.
+
+
+
+How to rebuild the 'vpnweb.cab' and 'vpnweb.ocx' files?
+-------------------------------------------------------
+These files are ActiveX controls.
+The source code is in the 'vpnweb' directory.
+
+
+'winpcap_installer.exe' and 'winpcap_installer_win9x.exe'
+---------------------------------------------------------
+They are WinPcap binaries from http://www.winpcap.org/.
+The WinPcap license is at http://www.winpcap.org/misc/copyright.htm page.
+
+
+License
+-------
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License version 2 as published by the Free
+Software Foundation.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License version 2
+along with this program; if not, write to the Free Software Foundation, Inc.,
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+Neither the name of SoftEther nor the names of its contributors may be used
+to endorse or promote products derived from this software without specific
+prior written permission.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, UNDER
+JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, MERGE, PUBLISH,
+DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS SOFTWARE, THAT ANY JURIDICAL
+DISPUTES WHICH ARE CONCERNED TO THIS SOFTWARE OR ITS CONTENTS, AGAINST US
+(SOFTETHER PROJECT, SOFTETHER CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS),
+OR ANY JURIDICAL DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING,
+COPYING, MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR
+SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
+CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO EXCLUSIVE
+JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, JAPAN. YOU MUST WAIVE
+ALL DEFENSES OF LACK OF PERSONAL JURISDICTION AND FORUM NON CONVENIENS.
+PROCESS MAY BE SERVED ON EITHER PARTY IN THE MANNER AUTHORIZED BY APPLICABLE
+LAW OR COURT RULE.
+
+USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS SOFTWARE
+INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES PROHIBIT ENCRYPTED
+COMMUNICATIONS. USING THIS SOFTWARE IN OTHER COUNTRIES MIGHT BE RESTRICTED.
+
+THE GPLV2 CONDITIONS APPLY ON ALL SOFTETHER VPN PROGRAMS WHICH ARE DEVELOPED
+BY SOFTETHER VPN PROJECT.
+

+ 117 - 0
src/bin/hamcore/SOURCES_OF_BINARY_FILES.TXT

@@ -0,0 +1,117 @@
+All binary files on the 'hamcore' directory are free software under
+the GPLv2 license. (Except WinPcap binaries.)
+
+Some geeks should be interested in how to rebuild .sys (driver) files on
+this directory. This text file helps such crazy geeks.
+
+
+How to rebuild these '.sys' files?
+----------------------------------
+
+Windows Vista or later version of Windows requires all device drivers to be
+signed by Authenticode digital certificate. Therefore, SoftEther VPN Project
+publishes all necessary binary files in the 'hamcore' directory with
+'already-signed' format by the certificate of SoftEther VPN Project.
+
+That is the reason why the all .sys files (device drivers) are already built
+and digitally signed by SoftEther VPN Project on the time of release of
+the source code.
+
+However, the entire source code of all the .sys files are contained on the
+source code tree as follows:
+
+- pxwfp_x86.sys and pxwfp_x64.sys
+  You can build these files from the source code on the 'Wfp' directory.
+
+- see.sys and see_x64.sys
+  You can build these files from the source code on the 'See' directory.
+
+- SeLow_x86.sys and SeLow_x64.sys
+  You can build these files from the source code on the 'SeLow' directory.
+
+- vpn_driver.sys, vpn_driver_x64.sys and vpn_driver_9x.sys
+  You can build these files from the source code on the 'Neo' directory.
+
+- vpn_driver6.sys and vpn_driver6_x64.sys
+  You can build these files from the source code on the 'Neo6' directory.
+
+It is recommended to build these files on the 'SEVPN.sln' Visual Studio 2008
+solution file.
+
+Note that rebuilding these files require Windows Driver Kits.
+Loading the re-built .sys files requires your Authenticode certificate file
+if the operating system is Windows Vista or later.
+
+
+
+How to rebuild these 'vpn16.exe' files?
+---------------------------------------
+
+The vpn16.exe binary is the 16-bit Driver Install Utility for Windows 9x.
+You can build this file from the 'vpn16' directory. However, you need
+Visual C++ 16-bit edition and Windows 98 DDK to rebuild this 'vpn16.exe'.
+
+
+
+How to rebuild the 'vpnweb.cab' and 'vpnweb.ocx' files?
+-------------------------------------------------------
+These files are ActiveX controls.
+The source code is in the 'vpnweb' directory.
+
+
+'winpcap_installer.exe' and 'winpcap_installer_win9x.exe'
+---------------------------------------------------------
+They are WinPcap binaries from http://www.winpcap.org/.
+The WinPcap license is at http://www.winpcap.org/misc/copyright.htm page.
+
+
+License
+-------
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License version 2 as published by the Free
+Software Foundation.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License version 2
+along with this program; if not, write to the Free Software Foundation, Inc.,
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+Neither the name of SoftEther nor the names of its contributors may be used
+to endorse or promote products derived from this software without specific
+prior written permission.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, UNDER
+JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, MERGE, PUBLISH,
+DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS SOFTWARE, THAT ANY JURIDICAL
+DISPUTES WHICH ARE CONCERNED TO THIS SOFTWARE OR ITS CONTENTS, AGAINST US
+(SOFTETHER PROJECT, SOFTETHER CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS),
+OR ANY JURIDICAL DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING,
+COPYING, MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR
+SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND
+CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO EXCLUSIVE
+JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, JAPAN. YOU MUST WAIVE
+ALL DEFENSES OF LACK OF PERSONAL JURISDICTION AND FORUM NON CONVENIENS.
+PROCESS MAY BE SERVED ON EITHER PARTY IN THE MANNER AUTHORIZED BY APPLICABLE
+LAW OR COURT RULE.
+
+USE ONLY IN JAPAN. DO NOT USE IT IN OTHER COUNTRIES. IMPORTING THIS SOFTWARE
+INTO OTHER COUNTRIES IS AT YOUR OWN RISK. SOME COUNTRIES PROHIBIT ENCRYPTED
+COMMUNICATIONS. USING THIS SOFTWARE IN OTHER COUNTRIES MIGHT BE RESTRICTED.
+
+THE GPLV2 CONDITIONS APPLY ON ALL SOFTETHER VPN PROGRAMS WHICH ARE DEVELOPED
+BY SOFTETHER VPN PROJECT.
+

BIN
src/bin/hamcore/SeLow_x64.sys


BIN
src/bin/hamcore/SeLow_x86.sys


BIN
src/bin/hamcore/egg1.exe


BIN
src/bin/hamcore/egg2.exe


BIN
src/bin/hamcore/egg3.exe


+ 2 - 2
src/bin/hamcore/inf/selow_x64/SeLow_x64.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= NetTrans
 ClassGUID					= {4D36E975-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_selow.cat
 
@@ -66,5 +66,5 @@ SeLow_Description			= "A lightweight helper kernel-mode module for PacketiX VPN
 
 
 
-; Auto Generated 20140104_181831.858
+; Auto Generated 20140107_041134.030
 

BIN
src/bin/hamcore/inf/selow_x64/inf.cat


+ 2 - 2
src/bin/hamcore/inf/selow_x86/SeLow_x86.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= NetTrans
 ClassGUID					= {4D36E975-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_selow.cat
 
@@ -66,5 +66,5 @@ SeLow_Description			= "A lightweight helper kernel-mode module for PacketiX VPN
 
 
 
-; Auto Generated 20140104_181657.418
+; Auto Generated 20140107_040959.456
 

BIN
src/bin/hamcore/inf/selow_x86/inf.cat


+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN10.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN10.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN100.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN100.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN101.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN101.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN102.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN102.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN103.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN103.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN104.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN104.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN105.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN105.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN106.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN106.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN107.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN107.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN108.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN108.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN109.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN109.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN11.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN11.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN110.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN110.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN111.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN111.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN112.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN112.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN113.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN113.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN114.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN114.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN115.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN115.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN116.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN116.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN117.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN117.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN118.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN118.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN119.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN119.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN12.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN12.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN120.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN120.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN121.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN121.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN122.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN122.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN123.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN123.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN124.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN124.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN125.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN125.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN126.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN126.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN127.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN127.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN13.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 01/04/2014, 4.3.0.9407
+DriverVer					= 01/07/2014, 4.3.0.9410
 
 CatalogFile.NT				= inf_VPN13.cat
 

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott