mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
Remove unuseful files for stund library
This commit is contained in:
@ -1,38 +0,0 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 7.00
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinStun", "WinStun\WinStun.vcproj", "{717021E7-DCC4-41E7-9CDA-FA7596F18C56}"
|
||||
EndProject
|
||||
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "WinStunSetup", "WinStunSetup\WinStunSetup.vdproj", "{EB812030-9F2E-4FB7-813D-2E99AE2C5E4E}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "client", "client.vcproj", "{76E56991-C964-444B-82A6-AFDA5145E18A}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "server", "server.vcproj", "{2011B7B6-6932-431D-83A3-E825A271F8A8}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
ConfigName.0 = Debug
|
||||
ConfigName.1 = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectDependencies) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{717021E7-DCC4-41E7-9CDA-FA7596F18C56}.Debug.ActiveCfg = Debug|Win32
|
||||
{717021E7-DCC4-41E7-9CDA-FA7596F18C56}.Debug.Build.0 = Debug|Win32
|
||||
{717021E7-DCC4-41E7-9CDA-FA7596F18C56}.Release.ActiveCfg = Release|Win32
|
||||
{717021E7-DCC4-41E7-9CDA-FA7596F18C56}.Release.Build.0 = Release|Win32
|
||||
{EB812030-9F2E-4FB7-813D-2E99AE2C5E4E}.Debug.ActiveCfg = Debug
|
||||
{EB812030-9F2E-4FB7-813D-2E99AE2C5E4E}.Release.ActiveCfg = Release
|
||||
{EB812030-9F2E-4FB7-813D-2E99AE2C5E4E}.Release.Build.0 = Release
|
||||
{76E56991-C964-444B-82A6-AFDA5145E18A}.Debug.ActiveCfg = Debug|Win32
|
||||
{76E56991-C964-444B-82A6-AFDA5145E18A}.Debug.Build.0 = Debug|Win32
|
||||
{76E56991-C964-444B-82A6-AFDA5145E18A}.Release.ActiveCfg = Release|Win32
|
||||
{76E56991-C964-444B-82A6-AFDA5145E18A}.Release.Build.0 = Release|Win32
|
||||
{2011B7B6-6932-431D-83A3-E825A271F8A8}.Debug.ActiveCfg = Debug|Win32
|
||||
{2011B7B6-6932-431D-83A3-E825A271F8A8}.Debug.Build.0 = Debug|Win32
|
||||
{2011B7B6-6932-431D-83A3-E825A271F8A8}.Release.ActiveCfg = Release|Win32
|
||||
{2011B7B6-6932-431D-83A3-E825A271F8A8}.Release.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@ -1,67 +0,0 @@
|
||||
// WinStun.cpp : Defines the class behaviors for the application.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "WinStun.h"
|
||||
#include "WinStunDlg.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
|
||||
// CWinStunApp
|
||||
|
||||
BEGIN_MESSAGE_MAP(CWinStunApp, CWinApp)
|
||||
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CWinStunApp construction
|
||||
|
||||
CWinStunApp::CWinStunApp()
|
||||
{
|
||||
// TODO: add construction code here,
|
||||
// Place all significant initialization in InitInstance
|
||||
}
|
||||
|
||||
|
||||
// The one and only CWinStunApp object
|
||||
|
||||
CWinStunApp theApp;
|
||||
|
||||
|
||||
// CWinStunApp initialization
|
||||
|
||||
BOOL CWinStunApp::InitInstance()
|
||||
{
|
||||
// InitCommonControls() is required on Windows XP if an application
|
||||
// manifest specifies use of ComCtl32.dll version 6 or later to enable
|
||||
// visual styles. Otherwise, any window creation will fail.
|
||||
InitCommonControls();
|
||||
|
||||
CWinApp::InitInstance();
|
||||
|
||||
if (!AfxSocketInit())
|
||||
{
|
||||
AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
AfxEnableControlContainer();
|
||||
|
||||
|
||||
CWinStunDlg dlg;
|
||||
m_pMainWnd = &dlg;
|
||||
INT_PTR nResponse = dlg.DoModal();
|
||||
|
||||
if (nResponse == IDCANCEL)
|
||||
{
|
||||
// TODO: Place code here to handle when the dialog is
|
||||
// dismissed with Cancel
|
||||
}
|
||||
|
||||
// Since the dialog has been closed, return FALSE so that we exit the
|
||||
// application, rather than start the application's message pump.
|
||||
return FALSE;
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
// WinStun.h : main header file for the PROJECT_NAME application
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __AFXWIN_H__
|
||||
#error include 'stdafx.h' before including this file for PCH
|
||||
#endif
|
||||
|
||||
#include "resource.h" // main symbols
|
||||
|
||||
|
||||
// CWinStunApp:
|
||||
// See WinStun.cpp for the implementation of this class
|
||||
//
|
||||
|
||||
class CWinStunApp : public CWinApp
|
||||
{
|
||||
public:
|
||||
CWinStunApp();
|
||||
|
||||
// Overrides
|
||||
public:
|
||||
virtual BOOL InitInstance();
|
||||
|
||||
// Implementation
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
extern CWinStunApp theApp;
|
@ -1,210 +0,0 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_OLE_RESOURCES\r\n"
|
||||
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
|
||||
"\r\n"
|
||||
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
|
||||
"LANGUAGE 9, 1\r\n"
|
||||
"#pragma code_page(1252)\r\n"
|
||||
"#include ""res\\WinStun.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
|
||||
"#include ""afxres.rc"" // Standard components\r\n"
|
||||
"#endif\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDR_MAINFRAME ICON "res\\WinStun.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_ABOUTBOX DIALOGEX 0, 0, 235, 55
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
CAPTION "About WinStun"
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20
|
||||
LTEXT "WinStun Version 0.92",IDC_STATIC,40,10,119,8,
|
||||
SS_NOPREFIX
|
||||
LTEXT "Cullen Jennings",IDC_STATIC,40,25,119,8
|
||||
DEFPUSHBUTTON "OK",IDOK,178,7,50,16,WS_GROUP
|
||||
END
|
||||
|
||||
IDD_WINSTUN_DIALOG DIALOGEX 0, 0, 209, 129
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE |
|
||||
WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "WinStun"
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
PUSHBUTTON "Quit",IDCANCEL,116,106,50,16
|
||||
PUSHBUTTON "Run Test",IDC_TEST,19,108,50,14
|
||||
LTEXT "Stun Server",IDC_STATIC,7,7,39,8
|
||||
EDITTEXT IDC_SERVER,48,7,142,12,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_RESULT,7,24,190,77,ES_MULTILINE | ES_AUTOVSCROLL |
|
||||
ES_READONLY | WS_VSCROLL | NOT WS_TABSTOP,
|
||||
WS_EX_STATICEDGE
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 0,92,0,0
|
||||
PRODUCTVERSION 0,92,0,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904e4"
|
||||
BEGIN
|
||||
VALUE "FileDescription", "STUN Client"
|
||||
VALUE "FileVersion", "0, 92, 0, 0"
|
||||
VALUE "InternalName", "WinStun.exe"
|
||||
VALUE "OriginalFilename", "WinStun.exe"
|
||||
VALUE "ProductName", "WinStun"
|
||||
VALUE "ProductVersion", "0.92.0.0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1252
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_ABOUTBOX, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 228
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 48
|
||||
END
|
||||
|
||||
IDD_WINSTUN_DIALOG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 202
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 122
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// RT_MANIFEST
|
||||
//
|
||||
|
||||
IDR_MANIFEST RT_MANIFEST "res\\WinStun.manifest"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_ABOUTBOX "&About WinStun..."
|
||||
IDP_SOCKETS_INIT_FAILED "Windows sockets initialization failed."
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
#define _AFX_NO_SPLITTER_RESOURCES
|
||||
#define _AFX_NO_OLE_RESOURCES
|
||||
#define _AFX_NO_TRACKER_RESOURCES
|
||||
#define _AFX_NO_PROPERTY_RESOURCES
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
LANGUAGE 9, 1
|
||||
#pragma code_page(1252)
|
||||
#include "res\WinStun.rc2" // non-Microsoft Visual C++ edited resources
|
||||
#include "afxres.rc" // Standard components
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
@ -1,186 +0,0 @@
|
||||
<?xml version="1.0" encoding = "Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.00"
|
||||
Name="WinStun"
|
||||
ProjectGUID="{717021E7-DCC4-41E7-9CDA-FA7596F18C56}"
|
||||
Keyword="MFCProj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="2"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
TreatWChar_tAsBuiltInType="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="FALSE"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories="$(IntDir)"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="2"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
OmitFramePointers="TRUE"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG"
|
||||
StringPooling="TRUE"
|
||||
MinimalRebuild="FALSE"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
TreatWChar_tAsBuiltInType="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="FALSE"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories="$(IntDir)"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
|
||||
<File
|
||||
RelativePath="WinStun.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="WinStunDlg.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="stdafx.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\stun.cxx">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\udp.cxx">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc">
|
||||
<File
|
||||
RelativePath="Resource.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="WinStun.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="WinStunDlg.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="stdafx.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\stun.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\udp.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;jpg;jpeg;jpe;manifest">
|
||||
<File
|
||||
RelativePath="res\WinStun.ico">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="res\WinStun.manifest">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="WinStun.rc">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="res\WinStun.rc2">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
@ -1,246 +0,0 @@
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "WinStun.h"
|
||||
#include "WinStunDlg.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "../stun.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
|
||||
// CAboutDlg dialog used for App About
|
||||
|
||||
class CAboutDlg : public CDialog
|
||||
{
|
||||
public:
|
||||
CAboutDlg();
|
||||
|
||||
// Dialog Data
|
||||
enum { IDD = IDD_ABOUTBOX };
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
|
||||
{
|
||||
}
|
||||
|
||||
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CWinStunDlg dialog
|
||||
|
||||
|
||||
|
||||
CWinStunDlg::CWinStunDlg(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CWinStunDlg::IDD, pParent)
|
||||
, mServerName(_T(""))
|
||||
{
|
||||
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
|
||||
}
|
||||
|
||||
void CWinStunDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
mServerName = _T("larry.gloo.net");
|
||||
CDialog::DoDataExchange(pDX);
|
||||
DDX_Text(pDX, IDC_SERVER, mServerName);
|
||||
DDV_MaxChars(pDX, mServerName, 128);
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(CWinStunDlg, CDialog)
|
||||
ON_WM_SYSCOMMAND()
|
||||
ON_WM_PAINT()
|
||||
ON_WM_QUERYDRAGICON()
|
||||
//}}AFX_MSG_MAP
|
||||
ON_BN_CLICKED(IDC_TEST, OnBnClickedTest)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CWinStunDlg message handlers
|
||||
|
||||
BOOL CWinStunDlg::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
// Add "About..." menu item to system menu.
|
||||
|
||||
// IDM_ABOUTBOX must be in the system command range.
|
||||
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
|
||||
ASSERT(IDM_ABOUTBOX < 0xF000);
|
||||
|
||||
CMenu* pSysMenu = GetSystemMenu(FALSE);
|
||||
if (pSysMenu != NULL)
|
||||
{
|
||||
CString strAboutMenu;
|
||||
strAboutMenu.LoadString(IDS_ABOUTBOX);
|
||||
if (!strAboutMenu.IsEmpty())
|
||||
{
|
||||
pSysMenu->AppendMenu(MF_SEPARATOR);
|
||||
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
|
||||
}
|
||||
}
|
||||
|
||||
// Set the icon for this dialog. The framework does this automatically
|
||||
// when the application's main window is not a dialog
|
||||
SetIcon(m_hIcon, TRUE); // Set big icon
|
||||
SetIcon(m_hIcon, FALSE); // Set small icon
|
||||
|
||||
// TODO: Add extra initialization here
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
}
|
||||
|
||||
void CWinStunDlg::OnSysCommand(UINT nID, LPARAM lParam)
|
||||
{
|
||||
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
|
||||
{
|
||||
CAboutDlg dlgAbout;
|
||||
dlgAbout.DoModal();
|
||||
}
|
||||
else
|
||||
{
|
||||
CDialog::OnSysCommand(nID, lParam);
|
||||
}
|
||||
}
|
||||
|
||||
// If you add a minimize button to your dialog, you will need the code below
|
||||
// to draw the icon. For MFC applications using the document/view model,
|
||||
// this is automatically done for you by the framework.
|
||||
|
||||
void CWinStunDlg::OnPaint()
|
||||
{
|
||||
if (IsIconic())
|
||||
{
|
||||
CPaintDC dc(this); // device context for painting
|
||||
|
||||
SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);
|
||||
|
||||
// Center icon in client rectangle
|
||||
int cxIcon = GetSystemMetrics(SM_CXICON);
|
||||
int cyIcon = GetSystemMetrics(SM_CYICON);
|
||||
CRect rect;
|
||||
GetClientRect(&rect);
|
||||
int x = (rect.Width() - cxIcon + 1) / 2;
|
||||
int y = (rect.Height() - cyIcon + 1) / 2;
|
||||
|
||||
// Draw the icon
|
||||
dc.DrawIcon(x, y, m_hIcon);
|
||||
}
|
||||
else
|
||||
{
|
||||
CDialog::OnPaint();
|
||||
}
|
||||
}
|
||||
|
||||
// The system calls this function to obtain the cursor to display while the user drags
|
||||
// the minimized window.
|
||||
HCURSOR CWinStunDlg::OnQueryDragIcon()
|
||||
{
|
||||
return static_cast<HCURSOR>(m_hIcon);
|
||||
}
|
||||
|
||||
void CWinStunDlg::OnBnClickedTest()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
CString& server = mServerName;
|
||||
|
||||
CEdit* display = (CEdit*)GetDlgItem(IDC_RESULT);
|
||||
assert(display);
|
||||
display->SetWindowText( CString( _T("Running...\r\n")) );
|
||||
|
||||
CEdit* edit = (CEdit*)GetDlgItem(IDC_SERVER);
|
||||
assert(edit);
|
||||
edit->GetWindowText(server);
|
||||
|
||||
StunAddress4 stunServerAddr;
|
||||
|
||||
LPCTSTR str;
|
||||
str = server;
|
||||
char* s;
|
||||
s = (char*)str;
|
||||
stunParseServerName( s, stunServerAddr);
|
||||
|
||||
bool verbose = false;
|
||||
StunAddress4 sAddr;
|
||||
sAddr.port = 0;
|
||||
sAddr.addr = 0;
|
||||
bool preservePort;
|
||||
bool hairpin;
|
||||
int port=0;
|
||||
NatType stype = stunNatType( stunServerAddr, verbose, &preservePort, &hairpin, port, &sAddr );
|
||||
|
||||
CString text;
|
||||
|
||||
switch (stype)
|
||||
{
|
||||
case StunTypeOpen:
|
||||
text = _T("No NAT detected - VoIP should work");
|
||||
break;
|
||||
case StunTypeConeNat:
|
||||
text = _T("Cone Nat detect - VoIP will work with STUN");
|
||||
break;
|
||||
case StunTypeRestrictedNat:
|
||||
text = _T("Address restricted NAT detected - VoIP will work with STUN");
|
||||
break;
|
||||
case StunTypePortRestrictedNat:
|
||||
text = _T("Port restricted NAT detected - VoIP will work with STUN");
|
||||
break;
|
||||
case StunTypeSymNat:
|
||||
text = _T("Symetric - VOIP will NOT work");
|
||||
break;
|
||||
case StunTypeSymFirewall:
|
||||
text = _T("Symetric firewall - VOIP will NOT work");
|
||||
break;
|
||||
case StunTypeBlocked:
|
||||
text = _T("Could not reach the stun server - check server name is correct");
|
||||
break;
|
||||
default:
|
||||
text = _T("Unkown NAT type");
|
||||
break;
|
||||
}
|
||||
|
||||
text += _T("\r\n");
|
||||
|
||||
if (preservePort)
|
||||
{
|
||||
text+= _T("Preserves port number\r\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
text+= _T("Does not preserve port number\r\n");
|
||||
}
|
||||
|
||||
if (hairpin)
|
||||
{
|
||||
text+= _T("Supports hairpin of media\r\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
text+= _T("Does not supports hairpin of media\r\n");
|
||||
}
|
||||
|
||||
|
||||
CString strAddr;
|
||||
strAddr.Format(_T("Public IP address: %d.%d.%d.%d"),
|
||||
(sAddr.addr>>24)&0xFF,(sAddr.addr>>16)&0xFF,(sAddr.addr>>8)&0xFF,(sAddr.addr>>0)&0xFF
|
||||
);
|
||||
|
||||
text += strAddr;
|
||||
|
||||
display->SetWindowText( text + CString( _T("\r\n")) );
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
// WinStunDlg.h : header file
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
// CWinStunDlg dialog
|
||||
class CWinStunDlg : public CDialog
|
||||
{
|
||||
// Construction
|
||||
public:
|
||||
CWinStunDlg(CWnd* pParent = NULL); // standard constructor
|
||||
|
||||
// Dialog Data
|
||||
enum { IDD = IDD_WINSTUN_DIALOG };
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
HICON m_hIcon;
|
||||
|
||||
// Generated message map functions
|
||||
virtual BOOL OnInitDialog();
|
||||
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
|
||||
afx_msg void OnPaint();
|
||||
afx_msg HCURSOR OnQueryDragIcon();
|
||||
DECLARE_MESSAGE_MAP()
|
||||
public:
|
||||
afx_msg void OnBnClickedTest();
|
||||
// the name of the stun server to use
|
||||
CString mServerName;
|
||||
};
|
Binary file not shown.
Before Width: | Height: | Size: 21 KiB |
@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity
|
||||
version="1.0.0.0"
|
||||
processorArchitecture="X86"
|
||||
name="Microsoft.Windows.WinStun"
|
||||
type="win32"
|
||||
/>
|
||||
<description>Your app description here</description>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="X86"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
</assembly>
|
@ -1,13 +0,0 @@
|
||||
//
|
||||
// WinStun.RC2 - resources Microsoft Visual C++ does not edit directly
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#error this file is not editable by Microsoft Visual C++
|
||||
#endif //APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Add manually edited resources here...
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
@ -1,26 +0,0 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by WinStun.rc
|
||||
//
|
||||
#define IDR_MANIFEST 1
|
||||
#define IDM_ABOUTBOX 0x0010
|
||||
#define IDD_ABOUTBOX 100
|
||||
#define IDS_ABOUTBOX 101
|
||||
#define IDD_WINSTUN_DIALOG 102
|
||||
#define IDP_SOCKETS_INIT_FAILED 103
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDC_TEST 1000
|
||||
#define IDC_SERVER 1001
|
||||
#define IDC_EDIT2 1002
|
||||
#define IDC_RESULT 1002
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 129
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#define _APS_NEXT_CONTROL_VALUE 1003
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
@ -1,7 +0,0 @@
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// WinStun.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
|
@ -1,43 +0,0 @@
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently,
|
||||
// but are changed infrequently
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef VC_EXTRALEAN
|
||||
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
|
||||
#endif
|
||||
|
||||
// Modify the following defines if you have to target a platform prior to the ones specified below.
|
||||
// Refer to MSDN for the latest info on corresponding values for different platforms.
|
||||
#ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later.
|
||||
#define WINVER 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later.
|
||||
#define _WIN32_WINNT 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
|
||||
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later.
|
||||
#define _WIN32_IE 0x0400 // Change this to the appropriate value to target IE 5.0 or later.
|
||||
#endif
|
||||
|
||||
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
|
||||
|
||||
// turns off MFC's hiding of some common and often safely ignored warning messages
|
||||
#define _AFX_ALL_WARNINGS
|
||||
|
||||
#include <afxwin.h> // MFC core and standard components
|
||||
#include <afxext.h> // MFC extensions
|
||||
#include <afxdisp.h> // MFC Automation classes
|
||||
|
||||
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
|
||||
#ifndef _AFX_NO_AFXCMN_SUPPORT
|
||||
#include <afxcmn.h> // MFC support for Windows Common Controls
|
||||
#endif // _AFX_NO_AFXCMN_SUPPORT
|
||||
|
||||
#include <afxsock.h> // MFC socket extensions
|
@ -1,797 +0,0 @@
|
||||
"DeployProject"
|
||||
{
|
||||
"VSVersion" = "3:700"
|
||||
"ProjectType" = "8:{5443560c-dbb4-11d2-8724-00a0c9a8b90c}"
|
||||
"IsWebType" = "8:FALSE"
|
||||
"ProjectName" = "8:WinStunSetup"
|
||||
"LanguageId" = "3:1033"
|
||||
"CodePage" = "3:1252"
|
||||
"UILanguageId" = "3:1033"
|
||||
"SccProjectName" = "8:"
|
||||
"SccLocalPath" = "8:"
|
||||
"SccAuxPath" = "8:"
|
||||
"SccProvider" = "8:"
|
||||
"Hierarchy"
|
||||
{
|
||||
"Entry"
|
||||
{
|
||||
"MsmKey" = "8:_09250952BF7CDB5CAADD71B62AF74DB4"
|
||||
"OwnerKey" = "8:_F6B936BEEBCC457AA39994BB0B8A53A5"
|
||||
"MsmSig" = "8:C:\\WINDOWS\\SYSTEM32\\WSOCK32.DLL"
|
||||
}
|
||||
"Entry"
|
||||
{
|
||||
"MsmKey" = "8:_18DB37B1E06F4ECDBE22138D2E3423BA"
|
||||
"OwnerKey" = "8:_F6B936BEEBCC457AA39994BB0B8A53A5"
|
||||
"MsmSig" = "8:VC_User_MFC.BA9B6D6E_0DE0_11D5_A548_0090278A1BB8"
|
||||
}
|
||||
"Entry"
|
||||
{
|
||||
"MsmKey" = "8:_4B317DFBE5B54D45BA632D40E0B2978C"
|
||||
"OwnerKey" = "8:_F6B936BEEBCC457AA39994BB0B8A53A5"
|
||||
"MsmSig" = "8:VC_User_STL.BA9B76E9_0DE0_11D5_A548_0090278A1BB8"
|
||||
}
|
||||
"Entry"
|
||||
{
|
||||
"MsmKey" = "8:_4D3B42BBD8694AA0A7E8B8681774E515"
|
||||
"OwnerKey" = "8:_F6B936BEEBCC457AA39994BB0B8A53A5"
|
||||
"MsmSig" = "8:VC_User_CRT.BA9B6D09_0DE0_11D5_A548_0090278A1BB8"
|
||||
}
|
||||
"Entry"
|
||||
{
|
||||
"MsmKey" = "8:_F6B936BEEBCC457AA39994BB0B8A53A5"
|
||||
"OwnerKey" = "8:_UNDEFINED"
|
||||
"MsmSig" = "8:C:\\VOCAL\\STUND\\WINSTUN\\DEBUG\\WINSTUN.EXE"
|
||||
}
|
||||
}
|
||||
"Configurations"
|
||||
{
|
||||
"Debug"
|
||||
{
|
||||
"DisplayName" = "8:Debug"
|
||||
"IsDebugOnly" = "11:TRUE"
|
||||
"IsReleaseOnly" = "11:FALSE"
|
||||
"OutputFilename" = "8:Debug\\WinStunSetup.msi"
|
||||
"PackageFilesAs" = "3:2"
|
||||
"PackageFileSize" = "3:-2147483648"
|
||||
"CabType" = "3:1"
|
||||
"Compression" = "3:2"
|
||||
"SignOutput" = "11:FALSE"
|
||||
"CertificateFile" = "8:"
|
||||
"PrivateKeyFile" = "8:"
|
||||
"TimeStampServer" = "8:"
|
||||
"InstallerBootstrapper" = "3:2"
|
||||
}
|
||||
"Release"
|
||||
{
|
||||
"DisplayName" = "8:Release"
|
||||
"IsDebugOnly" = "11:FALSE"
|
||||
"IsReleaseOnly" = "11:TRUE"
|
||||
"OutputFilename" = "8:Release\\WinStunSetup.msi"
|
||||
"PackageFilesAs" = "3:2"
|
||||
"PackageFileSize" = "3:-2147483648"
|
||||
"CabType" = "3:1"
|
||||
"Compression" = "3:3"
|
||||
"SignOutput" = "11:FALSE"
|
||||
"CertificateFile" = "8:"
|
||||
"PrivateKeyFile" = "8:"
|
||||
"TimeStampServer" = "8:"
|
||||
"InstallerBootstrapper" = "3:2"
|
||||
}
|
||||
}
|
||||
"Deployable"
|
||||
{
|
||||
"CustomAction"
|
||||
{
|
||||
}
|
||||
"DefaultFeature"
|
||||
{
|
||||
"Name" = "8:DefaultFeature"
|
||||
"Title" = "8:"
|
||||
"Description" = "8:"
|
||||
}
|
||||
"Feature"
|
||||
{
|
||||
}
|
||||
"File"
|
||||
{
|
||||
"{54DA9790-1474-11D3-8E00-00C04F6837D0}:_09250952BF7CDB5CAADD71B62AF74DB4"
|
||||
{
|
||||
"Signature" = "8:2000000000e0230e7df7c201409bc8ce88f8c30100e0230e7df7c20100000000005400000000000000000000770073006f0063006b00330032002e0064006c006c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"SourcePath" = "8:WSOCK32.dll"
|
||||
"TargetName" = "8:WSOCK32.dll"
|
||||
"Tag" = "8:"
|
||||
"Folder" = "8:_1ACFCA01E86242009E7DA340371B556E"
|
||||
"Condition" = "8:"
|
||||
"Transitive" = "11:FALSE"
|
||||
"Vital" = "11:TRUE"
|
||||
"ReadOnly" = "11:FALSE"
|
||||
"Hidden" = "11:FALSE"
|
||||
"System" = "11:FALSE"
|
||||
"Permanent" = "11:FALSE"
|
||||
"SharedLegacy" = "11:FALSE"
|
||||
"PackageAs" = "3:1"
|
||||
"Register" = "3:1"
|
||||
"Exclude" = "11:TRUE"
|
||||
"IsDependency" = "11:TRUE"
|
||||
"IsolateTo" = "8:"
|
||||
}
|
||||
}
|
||||
"FileType"
|
||||
{
|
||||
}
|
||||
"Folder"
|
||||
{
|
||||
"{EE62640D-12F2-11D3-8D6C-00A0C9CFCEE6}:_1ACFCA01E86242009E7DA340371B556E"
|
||||
{
|
||||
"DefaultLocation" = "8:[ProgramFilesFolder][Manufacturer]\\[ProductName]"
|
||||
"Name" = "8:#1925"
|
||||
"AlwaysCreate" = "11:FALSE"
|
||||
"Condition" = "8:"
|
||||
"Transitive" = "11:FALSE"
|
||||
"Property" = "8:TARGETDIR"
|
||||
"Folders"
|
||||
{
|
||||
}
|
||||
}
|
||||
"{777C097F-0ED8-11D3-8D6C-00A0C9CFCEE6}:_9F73FB694078487ABBE751685A98BAE5"
|
||||
{
|
||||
"Name" = "8:#1919"
|
||||
"AlwaysCreate" = "11:FALSE"
|
||||
"Condition" = "8:"
|
||||
"Transitive" = "11:FALSE"
|
||||
"Property" = "8:ProgramMenuFolder"
|
||||
"Folders"
|
||||
{
|
||||
}
|
||||
}
|
||||
"{777C097F-0ED8-11D3-8D6C-00A0C9CFCEE6}:_CD285AFD3A9A4AF09C71F647BCB5F55F"
|
||||
{
|
||||
"Name" = "8:#1916"
|
||||
"AlwaysCreate" = "11:FALSE"
|
||||
"Condition" = "8:"
|
||||
"Transitive" = "11:FALSE"
|
||||
"Property" = "8:DesktopFolder"
|
||||
"Folders"
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
"LaunchCondition"
|
||||
{
|
||||
}
|
||||
"Locator"
|
||||
{
|
||||
}
|
||||
"Shortcut"
|
||||
{
|
||||
"{D0C99CFE-1238-11D3-8E00-00C04F6837D0}:_9DD31FDA83A043F7A0E558517B5725D3"
|
||||
{
|
||||
"Name" = "8:WinSTUN"
|
||||
"Arguments" = "8:"
|
||||
"Description" = "8:"
|
||||
"ShowCmd" = "3:1"
|
||||
"IconIndex" = "3:0"
|
||||
"Transitive" = "11:FALSE"
|
||||
"Target" = "8:_F6B936BEEBCC457AA39994BB0B8A53A5"
|
||||
"Folder" = "8:_9F73FB694078487ABBE751685A98BAE5"
|
||||
"WorkingFolder" = "8:_1ACFCA01E86242009E7DA340371B556E"
|
||||
"Icon" = "8:"
|
||||
"Feature" = "8:"
|
||||
}
|
||||
}
|
||||
"Sequences"
|
||||
{
|
||||
}
|
||||
"Registry"
|
||||
{
|
||||
"HKLM"
|
||||
{
|
||||
"Keys"
|
||||
{
|
||||
"{7DF0CD0A-FF27-11D2-8D6B-00A0C9CFCEE6}:_40E4B8C97A03455C8DF5FA68455B929E"
|
||||
{
|
||||
"Name" = "8:Software"
|
||||
"Condition" = "8:"
|
||||
"AlwaysCreate" = "11:FALSE"
|
||||
"DeleteAtUninstall" = "11:FALSE"
|
||||
"Transitive" = "11:FALSE"
|
||||
"Keys"
|
||||
{
|
||||
"{7DF0CD0A-FF27-11D2-8D6B-00A0C9CFCEE6}:_50DC98EDDEAB4F63A5B6A17D733642C2"
|
||||
{
|
||||
"Name" = "8:[Manufacturer]"
|
||||
"Condition" = "8:"
|
||||
"AlwaysCreate" = "11:FALSE"
|
||||
"DeleteAtUninstall" = "11:FALSE"
|
||||
"Transitive" = "11:FALSE"
|
||||
"Keys"
|
||||
{
|
||||
}
|
||||
"Values"
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
"Values"
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"HKCU"
|
||||
{
|
||||
"Keys"
|
||||
{
|
||||
"{7DF0CD0A-FF27-11D2-8D6B-00A0C9CFCEE6}:_D404EAC782F44270A6D873736C45FB23"
|
||||
{
|
||||
"Name" = "8:Software"
|
||||
"Condition" = "8:"
|
||||
"AlwaysCreate" = "11:FALSE"
|
||||
"DeleteAtUninstall" = "11:FALSE"
|
||||
"Transitive" = "11:FALSE"
|
||||
"Keys"
|
||||
{
|
||||
"{7DF0CD0A-FF27-11D2-8D6B-00A0C9CFCEE6}:_221FC41A7DD547B182BD9DE45E0E8EB2"
|
||||
{
|
||||
"Name" = "8:[Manufacturer]"
|
||||
"Condition" = "8:"
|
||||
"AlwaysCreate" = "11:FALSE"
|
||||
"DeleteAtUninstall" = "11:FALSE"
|
||||
"Transitive" = "11:FALSE"
|
||||
"Keys"
|
||||
{
|
||||
}
|
||||
"Values"
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
"Values"
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"HKCR"
|
||||
{
|
||||
"Keys"
|
||||
{
|
||||
}
|
||||
}
|
||||
"HKU"
|
||||
{
|
||||
"Keys"
|
||||
{
|
||||
}
|
||||
}
|
||||
"HKPU"
|
||||
{
|
||||
"Keys"
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
"ProjectOutput"
|
||||
{
|
||||
"{B1E2BB22-187D-11D3-8E02-00C04F6837D0}:_F6B936BEEBCC457AA39994BB0B8A53A5"
|
||||
{
|
||||
"SourcePath" = "8:..\\WinStun\\Release\\WinStun.exe"
|
||||
"TargetName" = "8:"
|
||||
"Tag" = "8:"
|
||||
"Folder" = "8:_1ACFCA01E86242009E7DA340371B556E"
|
||||
"Condition" = "8:"
|
||||
"Transitive" = "11:FALSE"
|
||||
"Vital" = "11:TRUE"
|
||||
"ReadOnly" = "11:FALSE"
|
||||
"Hidden" = "11:FALSE"
|
||||
"System" = "11:FALSE"
|
||||
"Permanent" = "11:FALSE"
|
||||
"SharedLegacy" = "11:FALSE"
|
||||
"PackageAs" = "3:1"
|
||||
"Register" = "3:1"
|
||||
"Exclude" = "11:FALSE"
|
||||
"IsDependency" = "11:FALSE"
|
||||
"IsolateTo" = "8:"
|
||||
"ProjectOutputGroupRegister" = "3:1"
|
||||
"OutputConfiguration" = "8:"
|
||||
"OutputGroupCanonicalName" = "8:Built"
|
||||
"OutputProjectCanonicalName" = "8:WinStun\\WinStun.vcproj"
|
||||
"OutputProjectGuid" = "8:{717021E7-DCC4-41E7-9CDA-FA7596F18C56}"
|
||||
"ShowKeyOutput" = "11:TRUE"
|
||||
"ExcludeFilters"
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
"Product"
|
||||
{
|
||||
"Name" = "8:Microsoft Visual Studio"
|
||||
"ProductName" = "8:WinStun"
|
||||
"ProductCode" = "8:{8B7B86B7-1FB6-4907-AD02-B5C8D480A324}"
|
||||
"PackageCode" = "8:{63782D74-DA83-46E2-BBEA-C3448AAF05DA}"
|
||||
"UpgradeCode" = "8:{2F0F50F5-2556-4068-8E05-1BDCCFBF66D7}"
|
||||
"RestartWWWService" = "11:FALSE"
|
||||
"RemovePreviousVersions" = "11:TRUE"
|
||||
"DetectNewerInstalledVersion" = "11:TRUE"
|
||||
"ProductVersion" = "8:0.91"
|
||||
"Manufacturer" = "8:fluffy"
|
||||
"ARPHELPTELEPHONE" = "8:"
|
||||
"ARPHELPLINK" = "8:www.vovida.org"
|
||||
"Title" = "8:WinStun"
|
||||
"Subject" = "8:"
|
||||
"ARPCONTACT" = "8:fluffy"
|
||||
"Keywords" = "8:Stun"
|
||||
"ARPCOMMENTS" = "8:Stun Test Program"
|
||||
"ARPURLINFOABOUT" = "8:"
|
||||
"ARPPRODUCTICON" = "8:"
|
||||
"ARPIconIndex" = "3:0"
|
||||
"SearchPath" = "8:"
|
||||
"UseSystemSearchPath" = "11:TRUE"
|
||||
}
|
||||
"MsiBootstrapper"
|
||||
{
|
||||
"LangId" = "3:1033"
|
||||
}
|
||||
"MergeModule"
|
||||
{
|
||||
"{AC8774A4-3E09-11D3-8E14-00C04F6837D0}:_18DB37B1E06F4ECDBE22138D2E3423BA"
|
||||
{
|
||||
"UseDynamicProperties" = "11:TRUE"
|
||||
"IsDependency" = "11:TRUE"
|
||||
"SourcePath" = "8:vc_mfc.msm"
|
||||
"ModuleSignature" = "8:VC_User_MFC.BA9B6D6E_0DE0_11D5_A548_0090278A1BB8"
|
||||
"Properties"
|
||||
{
|
||||
"DIR_RETARGET_TARGETDIR"
|
||||
{
|
||||
"Name" = "8:DIR_RETARGET_TARGETDIR"
|
||||
"DisplayName" = "8:Module Retargetable Folder"
|
||||
"Description" = "8:"
|
||||
"Type" = "3:10"
|
||||
"ContextData" = "8:IsolationDir"
|
||||
"Attributes" = "3:6"
|
||||
"Setting" = "3:1"
|
||||
"UsePlugInResources" = "11:FALSE"
|
||||
}
|
||||
}
|
||||
"LanguageId" = "3:0"
|
||||
"Exclude" = "11:FALSE"
|
||||
"Folder" = "8:"
|
||||
"Feature" = "8:"
|
||||
"IsolateTo" = "8:"
|
||||
}
|
||||
"{AC8774A4-3E09-11D3-8E14-00C04F6837D0}:_4B317DFBE5B54D45BA632D40E0B2978C"
|
||||
{
|
||||
"UseDynamicProperties" = "11:TRUE"
|
||||
"IsDependency" = "11:TRUE"
|
||||
"SourcePath" = "8:vc_stl.msm"
|
||||
"ModuleSignature" = "8:VC_User_STL.BA9B76E9_0DE0_11D5_A548_0090278A1BB8"
|
||||
"Properties"
|
||||
{
|
||||
"DIR_RETARGET_TARGETDIR"
|
||||
{
|
||||
"Name" = "8:DIR_RETARGET_TARGETDIR"
|
||||
"DisplayName" = "8:Module Retargetable Folder"
|
||||
"Description" = "8:"
|
||||
"Type" = "3:10"
|
||||
"ContextData" = "8:IsolationDir"
|
||||
"Attributes" = "3:6"
|
||||
"Setting" = "3:1"
|
||||
"UsePlugInResources" = "11:FALSE"
|
||||
}
|
||||
}
|
||||
"LanguageId" = "3:0"
|
||||
"Exclude" = "11:FALSE"
|
||||
"Folder" = "8:"
|
||||
"Feature" = "8:"
|
||||
"IsolateTo" = "8:"
|
||||
}
|
||||
"{AC8774A4-3E09-11D3-8E14-00C04F6837D0}:_4D3B42BBD8694AA0A7E8B8681774E515"
|
||||
{
|
||||
"UseDynamicProperties" = "11:TRUE"
|
||||
"IsDependency" = "11:TRUE"
|
||||
"SourcePath" = "8:vc_crt.msm"
|
||||
"ModuleSignature" = "8:VC_User_CRT.BA9B6D09_0DE0_11D5_A548_0090278A1BB8"
|
||||
"Properties"
|
||||
{
|
||||
"DIR_RETARGET_TARGETDIR"
|
||||
{
|
||||
"Name" = "8:DIR_RETARGET_TARGETDIR"
|
||||
"DisplayName" = "8:Module Retargetable Folder"
|
||||
"Description" = "8:"
|
||||
"Type" = "3:10"
|
||||
"ContextData" = "8:IsolationDir"
|
||||
"Attributes" = "3:6"
|
||||
"Setting" = "3:1"
|
||||
"UsePlugInResources" = "11:FALSE"
|
||||
}
|
||||
}
|
||||
"LanguageId" = "3:0"
|
||||
"Exclude" = "11:FALSE"
|
||||
"Folder" = "8:"
|
||||
"Feature" = "8:"
|
||||
"IsolateTo" = "8:"
|
||||
}
|
||||
}
|
||||
"UserInterface"
|
||||
{
|
||||
"{E4ECAB26-4AB7-11D3-8D78-00A0C9CFCEE6}:_309D912E287A4301B573A2B8BF79CA47"
|
||||
{
|
||||
"UseDynamicProperties" = "11:FALSE"
|
||||
"IsDependency" = "11:FALSE"
|
||||
"SourcePath" = "8:<VsdDialogDir>\\VsdBasicDialogs.wim"
|
||||
"ModuleSignature" = "8:VsdDialogs.CE4B864F_F1C1_4B85_98D4_2A2BF5FFB12B"
|
||||
}
|
||||
"{7DFFC192-4ABE-11D3-8D78-00A0C9CFCEE6}:_3AAC016866E5446D98CAA124E4E70365"
|
||||
{
|
||||
"Name" = "8:#1900"
|
||||
"Sequence" = "3:2"
|
||||
"Attributes" = "3:1"
|
||||
"Dialogs"
|
||||
{
|
||||
"{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_6453CD704CE541EDB46A6A6F40AD5B11"
|
||||
{
|
||||
"Sequence" = "3:100"
|
||||
"DisplayName" = "8:Welcome"
|
||||
"UseDynamicProperties" = "11:TRUE"
|
||||
"IsDependency" = "11:FALSE"
|
||||
"SourcePath" = "8:<VsdDialogDir>\\VsdAdminWelcomeDlg.wid"
|
||||
"ModuleSignature" = "8:VsdDialogs.E35A0E2C_F131_4B57_B946_59A1A2A8F45F"
|
||||
"Properties"
|
||||
{
|
||||
"BannerBitmap"
|
||||
{
|
||||
"Name" = "8:BannerBitmap"
|
||||
"DisplayName" = "8:#1001"
|
||||
"Description" = "8:#1101"
|
||||
"Type" = "3:8"
|
||||
"ContextData" = "8:Bitmap"
|
||||
"Attributes" = "3:4"
|
||||
"Setting" = "3:1"
|
||||
"UsePlugInResources" = "11:TRUE"
|
||||
}
|
||||
"CopyrightWarning"
|
||||
{
|
||||
"Name" = "8:CopyrightWarning"
|
||||
"DisplayName" = "8:#1002"
|
||||
"Description" = "8:#1102"
|
||||
"Type" = "3:3"
|
||||
"ContextData" = "8:"
|
||||
"Attributes" = "3:0"
|
||||
"Setting" = "3:1"
|
||||
"Value" = "8:#1202"
|
||||
"DefaultValue" = "8:#1202"
|
||||
"UsePlugInResources" = "11:TRUE"
|
||||
}
|
||||
"Welcome"
|
||||
{
|
||||
"Name" = "8:Welcome"
|
||||
"DisplayName" = "8:#1003"
|
||||
"Description" = "8:#1103"
|
||||
"Type" = "3:3"
|
||||
"ContextData" = "8:"
|
||||
"Attributes" = "3:0"
|
||||
"Setting" = "3:1"
|
||||
"Value" = "8:#1203"
|
||||
"DefaultValue" = "8:#1203"
|
||||
"UsePlugInResources" = "11:TRUE"
|
||||
}
|
||||
}
|
||||
}
|
||||
"{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_8866EC8182F44659BA8DB0975A01235C"
|
||||
{
|
||||
"Sequence" = "3:200"
|
||||
"DisplayName" = "8:Installation Folder"
|
||||
"UseDynamicProperties" = "11:TRUE"
|
||||
"IsDependency" = "11:FALSE"
|
||||
"SourcePath" = "8:<VsdDialogDir>\\VsdAdminFolderDlg.wid"
|
||||
"ModuleSignature" = "8:VsdDialogs.2DED2424_5429_4616_A1AD_4D62837C2ADA"
|
||||
"Properties"
|
||||
{
|
||||
"BannerBitmap"
|
||||
{
|
||||
"Name" = "8:BannerBitmap"
|
||||
"DisplayName" = "8:#1001"
|
||||
"Description" = "8:#1101"
|
||||
"Type" = "3:8"
|
||||
"ContextData" = "8:Bitmap"
|
||||
"Attributes" = "3:4"
|
||||
"Setting" = "3:1"
|
||||
"UsePlugInResources" = "11:TRUE"
|
||||
}
|
||||
}
|
||||
}
|
||||
"{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_93025AA9E4EB456B92CEA130A0F3BCF4"
|
||||
{
|
||||
"Sequence" = "3:300"
|
||||
"DisplayName" = "8:Confirm Installation"
|
||||
"UseDynamicProperties" = "11:TRUE"
|
||||
"IsDependency" = "11:FALSE"
|
||||
"SourcePath" = "8:<VsdDialogDir>\\VsdAdminConfirmDlg.wid"
|
||||
"ModuleSignature" = "8:VsdDialogs.FA58E60A_A1E8_4876_95FC_2AC3B5AAA5F8"
|
||||
"Properties"
|
||||
{
|
||||
"BannerBitmap"
|
||||
{
|
||||
"Name" = "8:BannerBitmap"
|
||||
"DisplayName" = "8:#1001"
|
||||
"Description" = "8:#1101"
|
||||
"Type" = "3:8"
|
||||
"ContextData" = "8:Bitmap"
|
||||
"Attributes" = "3:4"
|
||||
"Setting" = "3:1"
|
||||
"UsePlugInResources" = "11:TRUE"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"{7DFFC192-4ABE-11D3-8D78-00A0C9CFCEE6}:_3EA2C9B465F54D72A7DDDFCC5621F1D0"
|
||||
{
|
||||
"Name" = "8:#1902"
|
||||
"Sequence" = "3:1"
|
||||
"Attributes" = "3:3"
|
||||
"Dialogs"
|
||||
{
|
||||
"{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_16667F6AD73F471591FDCB7F4172769C"
|
||||
{
|
||||
"Sequence" = "3:100"
|
||||
"DisplayName" = "8:Finished"
|
||||
"UseDynamicProperties" = "11:TRUE"
|
||||
"IsDependency" = "11:FALSE"
|
||||
"SourcePath" = "8:<VsdDialogDir>\\VsdFinishedDlg.wid"
|
||||
"ModuleSignature" = "8:VsdDialogs.1DB77F5A_BA5C_4470_89B6_0B0EC07E3A10"
|
||||
"Properties"
|
||||
{
|
||||
"BannerBitmap"
|
||||
{
|
||||
"Name" = "8:BannerBitmap"
|
||||
"DisplayName" = "8:#1001"
|
||||
"Description" = "8:#1101"
|
||||
"Type" = "3:8"
|
||||
"ContextData" = "8:Bitmap"
|
||||
"Attributes" = "3:4"
|
||||
"Setting" = "3:1"
|
||||
"UsePlugInResources" = "11:TRUE"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"{7DFFC192-4ABE-11D3-8D78-00A0C9CFCEE6}:_91E8D85BC8534AFE80406ED50E981274"
|
||||
{
|
||||
"Name" = "8:#1902"
|
||||
"Sequence" = "3:2"
|
||||
"Attributes" = "3:3"
|
||||
"Dialogs"
|
||||
{
|
||||
"{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_8BD23B7A446C400F965A22995B56653C"
|
||||
{
|
||||
"Sequence" = "3:100"
|
||||
"DisplayName" = "8:Finished"
|
||||
"UseDynamicProperties" = "11:TRUE"
|
||||
"IsDependency" = "11:FALSE"
|
||||
"SourcePath" = "8:<VsdDialogDir>\\VsdAdminFinishedDlg.wid"
|
||||
"ModuleSignature" = "8:VsdDialogs.83D22742_1B79_46f6_9A99_DF0F2BD4C077"
|
||||
"Properties"
|
||||
{
|
||||
"BannerBitmap"
|
||||
{
|
||||
"Name" = "8:BannerBitmap"
|
||||
"DisplayName" = "8:#1001"
|
||||
"Description" = "8:#1101"
|
||||
"Type" = "3:8"
|
||||
"ContextData" = "8:Bitmap"
|
||||
"Attributes" = "3:4"
|
||||
"Setting" = "3:1"
|
||||
"UsePlugInResources" = "11:TRUE"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"{7DFFC192-4ABE-11D3-8D78-00A0C9CFCEE6}:_A4071551ACF7452A8194ECACD3822A24"
|
||||
{
|
||||
"Name" = "8:#1901"
|
||||
"Sequence" = "3:2"
|
||||
"Attributes" = "3:2"
|
||||
"Dialogs"
|
||||
{
|
||||
"{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_487DF826178549ADAA991554EE93AC62"
|
||||
{
|
||||
"Sequence" = "3:100"
|
||||
"DisplayName" = "8:Progress"
|
||||
"UseDynamicProperties" = "11:TRUE"
|
||||
"IsDependency" = "11:FALSE"
|
||||
"SourcePath" = "8:<VsdDialogDir>\\VsdAdminProgressDlg.wid"
|
||||
"ModuleSignature" = "8:VsdDialogs.EE9A1AFA_41DD_4514_B727_DF0ACA1D7389"
|
||||
"Properties"
|
||||
{
|
||||
"BannerBitmap"
|
||||
{
|
||||
"Name" = "8:BannerBitmap"
|
||||
"DisplayName" = "8:#1001"
|
||||
"Description" = "8:#1101"
|
||||
"Type" = "3:8"
|
||||
"ContextData" = "8:Bitmap"
|
||||
"Attributes" = "3:4"
|
||||
"Setting" = "3:1"
|
||||
"UsePlugInResources" = "11:TRUE"
|
||||
}
|
||||
"ShowProgress"
|
||||
{
|
||||
"Name" = "8:ShowProgress"
|
||||
"DisplayName" = "8:#1009"
|
||||
"Description" = "8:#1109"
|
||||
"Type" = "3:5"
|
||||
"ContextData" = "8:1;True=1;False=0"
|
||||
"Attributes" = "3:0"
|
||||
"Setting" = "3:0"
|
||||
"Value" = "3:1"
|
||||
"DefaultValue" = "3:1"
|
||||
"UsePlugInResources" = "11:TRUE"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"{E4ECAB26-4AB7-11D3-8D78-00A0C9CFCEE6}:_B77D9D04895542BC9E437226DBC206BA"
|
||||
{
|
||||
"UseDynamicProperties" = "11:FALSE"
|
||||
"IsDependency" = "11:FALSE"
|
||||
"SourcePath" = "8:<VsdDialogDir>\\VsdUserInterface.wim"
|
||||
"ModuleSignature" = "8:VsdUserInterface.524F4245_5254_5341_4C45_534153783400"
|
||||
}
|
||||
"{7DFFC192-4ABE-11D3-8D78-00A0C9CFCEE6}:_CB82D982E7E04D1BB99B02029BFF4BB4"
|
||||
{
|
||||
"Name" = "8:#1900"
|
||||
"Sequence" = "3:1"
|
||||
"Attributes" = "3:1"
|
||||
"Dialogs"
|
||||
{
|
||||
"{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_1C9C413826E7442292BDADA01492608D"
|
||||
{
|
||||
"Sequence" = "3:200"
|
||||
"DisplayName" = "8:Installation Folder"
|
||||
"UseDynamicProperties" = "11:TRUE"
|
||||
"IsDependency" = "11:FALSE"
|
||||
"SourcePath" = "8:<VsdDialogDir>\\VsdFolderDlg.wid"
|
||||
"ModuleSignature" = "8:VsdDialogs.C113BC36_2532_4D45_8099_4818B1133B2F"
|
||||
"Properties"
|
||||
{
|
||||
"BannerBitmap"
|
||||
{
|
||||
"Name" = "8:BannerBitmap"
|
||||
"DisplayName" = "8:#1001"
|
||||
"Description" = "8:#1101"
|
||||
"Type" = "3:8"
|
||||
"ContextData" = "8:Bitmap"
|
||||
"Attributes" = "3:4"
|
||||
"Setting" = "3:1"
|
||||
"UsePlugInResources" = "11:TRUE"
|
||||
}
|
||||
}
|
||||
}
|
||||
"{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_9949CC0ADBD947A7B1C91226942F4FEE"
|
||||
{
|
||||
"Sequence" = "3:100"
|
||||
"DisplayName" = "8:Welcome"
|
||||
"UseDynamicProperties" = "11:TRUE"
|
||||
"IsDependency" = "11:FALSE"
|
||||
"SourcePath" = "8:<VsdDialogDir>\\VsdWelcomeDlg.wid"
|
||||
"ModuleSignature" = "8:VsdDialogs.68F69290_BB7C_474E_A153_6679845F3DDF"
|
||||
"Properties"
|
||||
{
|
||||
"BannerBitmap"
|
||||
{
|
||||
"Name" = "8:BannerBitmap"
|
||||
"DisplayName" = "8:#1001"
|
||||
"Description" = "8:#1101"
|
||||
"Type" = "3:8"
|
||||
"ContextData" = "8:Bitmap"
|
||||
"Attributes" = "3:4"
|
||||
"Setting" = "3:1"
|
||||
"UsePlugInResources" = "11:TRUE"
|
||||
}
|
||||
"CopyrightWarning"
|
||||
{
|
||||
"Name" = "8:CopyrightWarning"
|
||||
"DisplayName" = "8:#1002"
|
||||
"Description" = "8:#1102"
|
||||
"Type" = "3:3"
|
||||
"ContextData" = "8:"
|
||||
"Attributes" = "3:0"
|
||||
"Setting" = "3:1"
|
||||
"Value" = "8:#1202"
|
||||
"DefaultValue" = "8:#1202"
|
||||
"UsePlugInResources" = "11:TRUE"
|
||||
}
|
||||
"Welcome"
|
||||
{
|
||||
"Name" = "8:Welcome"
|
||||
"DisplayName" = "8:#1003"
|
||||
"Description" = "8:#1103"
|
||||
"Type" = "3:3"
|
||||
"ContextData" = "8:"
|
||||
"Attributes" = "3:0"
|
||||
"Setting" = "3:1"
|
||||
"Value" = "8:#1203"
|
||||
"DefaultValue" = "8:#1203"
|
||||
"UsePlugInResources" = "11:TRUE"
|
||||
}
|
||||
}
|
||||
}
|
||||
"{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_C35965DAA3654FD188EB3BE51C84178E"
|
||||
{
|
||||
"Sequence" = "3:300"
|
||||
"DisplayName" = "8:Confirm Installation"
|
||||
"UseDynamicProperties" = "11:TRUE"
|
||||
"IsDependency" = "11:FALSE"
|
||||
"SourcePath" = "8:<VsdDialogDir>\\VsdConfirmDlg.wid"
|
||||
"ModuleSignature" = "8:VsdDialogs.6DBC9783_3677_4D68_8BF5_D749558A0AC1"
|
||||
"Properties"
|
||||
{
|
||||
"BannerBitmap"
|
||||
{
|
||||
"Name" = "8:BannerBitmap"
|
||||
"DisplayName" = "8:#1001"
|
||||
"Description" = "8:#1101"
|
||||
"Type" = "3:8"
|
||||
"ContextData" = "8:Bitmap"
|
||||
"Attributes" = "3:4"
|
||||
"Setting" = "3:1"
|
||||
"UsePlugInResources" = "11:TRUE"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"{7DFFC192-4ABE-11D3-8D78-00A0C9CFCEE6}:_F18016A4BE774D76B6D7D70741C9C574"
|
||||
{
|
||||
"Name" = "8:#1901"
|
||||
"Sequence" = "3:1"
|
||||
"Attributes" = "3:2"
|
||||
"Dialogs"
|
||||
{
|
||||
"{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_4CBDFAD72B2541849D7DFA35D5E52B1F"
|
||||
{
|
||||
"Sequence" = "3:100"
|
||||
"DisplayName" = "8:Progress"
|
||||
"UseDynamicProperties" = "11:TRUE"
|
||||
"IsDependency" = "11:FALSE"
|
||||
"SourcePath" = "8:<VsdDialogDir>\\VsdProgressDlg.wid"
|
||||
"ModuleSignature" = "8:VsdDialogs.4FB12620_0D15_42D0_8677_2766FFA6923F"
|
||||
"Properties"
|
||||
{
|
||||
"BannerBitmap"
|
||||
{
|
||||
"Name" = "8:BannerBitmap"
|
||||
"DisplayName" = "8:#1001"
|
||||
"Description" = "8:#1101"
|
||||
"Type" = "3:8"
|
||||
"ContextData" = "8:Bitmap"
|
||||
"Attributes" = "3:4"
|
||||
"Setting" = "3:1"
|
||||
"UsePlugInResources" = "11:TRUE"
|
||||
}
|
||||
"ShowProgress"
|
||||
{
|
||||
"Name" = "8:ShowProgress"
|
||||
"DisplayName" = "8:#1009"
|
||||
"Description" = "8:#1109"
|
||||
"Type" = "3:5"
|
||||
"ContextData" = "8:1;True=1;False=0"
|
||||
"Attributes" = "3:0"
|
||||
"Setting" = "3:0"
|
||||
"Value" = "3:1"
|
||||
"DefaultValue" = "3:1"
|
||||
"UsePlugInResources" = "11:TRUE"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,399 +0,0 @@
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
|
||||
#ifdef WIN32
|
||||
#include <time.h>
|
||||
#else
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <netinet/in.h>
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
#include "udp.h"
|
||||
#include "stun.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
void
|
||||
usage()
|
||||
{
|
||||
cerr << "Usage:" << endl
|
||||
<< " ./client stunServerHostname [testNumber] [-v] [-p srcPort] [-i nicAddr1] [-i nicAddr2] [-i nicAddr3]" << endl
|
||||
<< "For example, if the STUN server was larry.gloo.net, you could do:" << endl
|
||||
<< " ./client larry.gloo.net" << endl
|
||||
<< "The testNumber is just used for special tests." << endl
|
||||
<< " test 1 runs test 1 from the RFC. For example:" << endl
|
||||
<< " ./client larry.gloo.net 0" << endl << endl
|
||||
<< "Return Values:" << endl
|
||||
<< " -1 Generic Error" << endl << endl
|
||||
<< "low order bits (mask 0x07)" << endl
|
||||
<< " 0 No NAT Present (Open)" << endl
|
||||
<< " 1 Full Cone NAT" << endl
|
||||
<< " 2 Address Restricted Cone NAT" << endl
|
||||
<< " 3 Port Restricted Cone NAT" << endl
|
||||
<< " 4 Symmetric NAT" << endl
|
||||
<< " 5 Symmetric Firewall" << endl
|
||||
<< " 6 Blocked or Network Error" << endl
|
||||
<< "0x08 bit is set if the NAT does NOT supports hairpinning" << endl
|
||||
<< "0x10 bit is set if the NAT tries to preserver port numbers" << endl
|
||||
<< endl;
|
||||
}
|
||||
|
||||
#define MAX_NIC 3
|
||||
|
||||
int
|
||||
main(int argc, char* argv[])
|
||||
{
|
||||
assert( sizeof(UInt8 ) == 1 );
|
||||
assert( sizeof(UInt16) == 2 );
|
||||
assert( sizeof(UInt32) == 4 );
|
||||
|
||||
initNetwork();
|
||||
|
||||
cout << "STUN client version " << STUN_VERSION << endl;
|
||||
|
||||
int testNum = 0;
|
||||
bool verbose = false;
|
||||
|
||||
StunAddress4 stunServerAddr;
|
||||
stunServerAddr.addr=0;
|
||||
|
||||
int srcPort=0;
|
||||
StunAddress4 sAddr[MAX_NIC];
|
||||
int retval[MAX_NIC];
|
||||
int numNic=0;
|
||||
|
||||
for ( int i=0; i<MAX_NIC; i++ )
|
||||
{
|
||||
sAddr[i].addr=0;
|
||||
sAddr[i].port=0;
|
||||
retval[i]=0;
|
||||
}
|
||||
|
||||
for ( int arg = 1; arg<argc; arg++ )
|
||||
{
|
||||
if ( !strcmp( argv[arg] , "-v" ) )
|
||||
{
|
||||
verbose = true;
|
||||
}
|
||||
else if ( !strcmp( argv[arg] , "-i" ) )
|
||||
{
|
||||
arg++;
|
||||
if ( argc <= arg )
|
||||
{
|
||||
usage();
|
||||
exit(-1);
|
||||
}
|
||||
if ( numNic >= MAX_NIC )
|
||||
{
|
||||
cerr << "Can not have more than "<< MAX_NIC <<" -i options" << endl;
|
||||
usage();
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
stunParseServerName(argv[arg], sAddr[numNic++]);
|
||||
}
|
||||
else if ( !strcmp( argv[arg] , "-p" ) )
|
||||
{
|
||||
arg++;
|
||||
if ( argc <= arg )
|
||||
{
|
||||
usage();
|
||||
exit(-1);
|
||||
}
|
||||
srcPort = strtol( argv[arg], NULL, 10);
|
||||
}
|
||||
else
|
||||
{
|
||||
char* ptr;
|
||||
int t = strtol( argv[arg], &ptr, 10 );
|
||||
if ( *ptr == 0 )
|
||||
{
|
||||
// conversion worked
|
||||
testNum = t;
|
||||
cout << "running test number " << testNum << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
bool ret = stunParseServerName( argv[arg], stunServerAddr);
|
||||
if ( ret != true )
|
||||
{
|
||||
cerr << argv[arg] << " is not a valid host name " << endl;
|
||||
usage();
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( numNic == 0 )
|
||||
{
|
||||
// use default
|
||||
numNic = 1;
|
||||
}
|
||||
|
||||
for ( int nic=0; nic<numNic; nic++ )
|
||||
{
|
||||
sAddr[nic].port=srcPort;
|
||||
if ( stunServerAddr.addr == 0 )
|
||||
{
|
||||
usage();
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
if (testNum==0)
|
||||
{
|
||||
bool presPort=false;
|
||||
bool hairpin=false;
|
||||
|
||||
NatType stype = stunNatType( stunServerAddr, verbose, &presPort, &hairpin,
|
||||
srcPort, &sAddr[nic]);
|
||||
|
||||
if ( nic == 0 )
|
||||
{
|
||||
cout << "Primary: ";
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << "Secondary: ";
|
||||
}
|
||||
|
||||
switch (stype)
|
||||
{
|
||||
case StunTypeFailure:
|
||||
cout << "Some error detetecting NAT type";
|
||||
retval[nic] = -1;
|
||||
exit(-1);
|
||||
break;
|
||||
case StunTypeUnknown:
|
||||
cout << "Some error detetecting NAT type";
|
||||
retval[nic] = 0x07;
|
||||
break;
|
||||
case StunTypeOpen:
|
||||
cout << "Open";
|
||||
retval[nic] = 0;
|
||||
break;
|
||||
case StunTypeConeNat:
|
||||
cout << "Full Cone Nat";
|
||||
if ( presPort ) cout << ", preserves ports"; else cout << ", random port";
|
||||
if ( hairpin ) cout << ", will hairpin"; else cout << ", no hairpin";
|
||||
retval[nic] = 0x01;
|
||||
break;
|
||||
case StunTypeRestrictedNat:
|
||||
cout << "Address Restricted Nat";
|
||||
if ( presPort ) cout << ", preserves ports"; else cout << ", random port";
|
||||
if ( hairpin ) cout << ", will hairpin"; else cout << ", no hairpin";
|
||||
retval[nic] = 0x02;
|
||||
break;
|
||||
case StunTypePortRestrictedNat:
|
||||
cout << "Port Restricted Nat";
|
||||
if ( presPort ) cout << ", preserves ports"; else cout << ", random port";
|
||||
if ( hairpin ) cout << ", will hairpin"; else cout << ", no hairpin";
|
||||
retval[nic] = 0x03;
|
||||
break;
|
||||
case StunTypeSymNat:
|
||||
cout << "Symmetric Nat";
|
||||
if ( presPort ) cout << ", preserves ports"; else cout << ", random port";
|
||||
if ( hairpin ) cout << ", will hairpin"; else cout << ", no hairpin";
|
||||
retval[nic] = 0x04;
|
||||
break;
|
||||
case StunTypeSymFirewall:
|
||||
cout << "Symmetric Firewall";
|
||||
if ( hairpin ) cout << ", will hairpin"; else cout << ", no hairpin";
|
||||
retval[nic] = 0x05;
|
||||
break;
|
||||
case StunTypeBlocked:
|
||||
cout << "Blocked or could not reach STUN server";
|
||||
retval[nic] = 0x06;
|
||||
break;
|
||||
default:
|
||||
cout << stype;
|
||||
cout << "Unkown NAT type";
|
||||
retval[nic] = 0x07; // Unknown NAT type
|
||||
break;
|
||||
}
|
||||
cout << "\t"; cout.flush();
|
||||
|
||||
if (!hairpin)
|
||||
{
|
||||
retval[nic] |= 0x08;
|
||||
}
|
||||
|
||||
if (presPort)
|
||||
{
|
||||
retval[nic] |= 0x10;
|
||||
}
|
||||
}
|
||||
else if (testNum==100)
|
||||
{
|
||||
Socket myFd = openPort(srcPort,sAddr[nic].addr,verbose);
|
||||
|
||||
StunMessage req;
|
||||
memset(&req, 0, sizeof(StunMessage));
|
||||
|
||||
StunAtrString username;
|
||||
StunAtrString password;
|
||||
username.sizeValue = 0;
|
||||
password.sizeValue = 0;
|
||||
|
||||
stunBuildReqSimple( &req, username,
|
||||
false , false ,
|
||||
0x0c );
|
||||
|
||||
char buf[STUN_MAX_MESSAGE_SIZE];
|
||||
int len = STUN_MAX_MESSAGE_SIZE;
|
||||
|
||||
len = stunEncodeMessage( req, buf, len, password,verbose );
|
||||
|
||||
if ( verbose )
|
||||
{
|
||||
cout << "About to send msg of len " << len
|
||||
<< " to " << stunServerAddr << endl;
|
||||
}
|
||||
|
||||
while (1)
|
||||
{
|
||||
for ( int i=0; i<100; i++ )
|
||||
{
|
||||
sendMessage( myFd,
|
||||
buf, len,
|
||||
stunServerAddr.addr,
|
||||
stunServerAddr.port,verbose );
|
||||
}
|
||||
#ifdef WIN32 // !cj! TODO - should fix this up in windows
|
||||
clock_t now = clock();
|
||||
assert( CLOCKS_PER_SEC == 1000 );
|
||||
while ( clock() <= now+10 ) { };
|
||||
#else
|
||||
usleep(10*1000);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else if (testNum==-2)
|
||||
{
|
||||
const int numPort = 5;
|
||||
int fd[numPort];
|
||||
StunAddress4 mappedAddr;
|
||||
|
||||
for( int i=0; i<numPort; i++ )
|
||||
{
|
||||
fd[i] = stunOpenSocket( stunServerAddr, &mappedAddr,
|
||||
(srcPort==0)?0:(srcPort+i), &sAddr[nic],
|
||||
verbose );
|
||||
cout << "Got port at " << mappedAddr.port << endl;
|
||||
}
|
||||
|
||||
for( int i=0; i<numPort; i++ )
|
||||
{
|
||||
closesocket(fd[i]);
|
||||
}
|
||||
}
|
||||
else if (testNum==-1)
|
||||
{
|
||||
int fd3,fd4;
|
||||
StunAddress4 mappedAddr;
|
||||
|
||||
bool ok = stunOpenSocketPair(stunServerAddr,
|
||||
&mappedAddr,
|
||||
&fd3,
|
||||
&fd4,
|
||||
srcPort,
|
||||
&sAddr[nic],
|
||||
verbose);
|
||||
if ( ok )
|
||||
{
|
||||
closesocket(fd3);
|
||||
closesocket(fd4);
|
||||
cout << "Got port pair at " << mappedAddr.port << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
cerr << "Opened a stun socket pair FAILED" << endl;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
stunTest( stunServerAddr,testNum,verbose,&(sAddr[nic]) );
|
||||
}
|
||||
} // end of for loop
|
||||
cout << endl;
|
||||
|
||||
UInt32 ret=0;
|
||||
for ( int i=numNic-1; i>=0; i-- )
|
||||
{
|
||||
if ( retval[i] == -1 )
|
||||
{
|
||||
ret = 0xFFFFFFFF;
|
||||
break;
|
||||
}
|
||||
ret = ret << 8;
|
||||
ret = ret | ( retval[i] & 0xFF );
|
||||
}
|
||||
|
||||
cout << "Return value is " << hex << "0x" << ret << dec << endl;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/* ====================================================================
|
||||
* The Vovida Software License, Version 1.0
|
||||
*
|
||||
* Copyright (c) 2000 Vovida Networks, Inc. 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. The names "VOCAL", "Vovida Open Communication Application Library",
|
||||
* and "Vovida Open Communication Application Library (VOCAL)" must
|
||||
* not be used to endorse or promote products derived from this
|
||||
* software without prior written permission. For written
|
||||
* permission, please contact vocal@vovida.org.
|
||||
*
|
||||
* 4. Products derived from this software may not be called "VOCAL", nor
|
||||
* may "VOCAL" appear in their name, without prior written
|
||||
* permission of Vovida Networks, Inc.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
|
||||
* NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
|
||||
* NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
|
||||
* IN EXCESS OF $1,000, NOR FOR ANY 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 software consists of voluntary contributions made by Vovida
|
||||
* Networks, Inc. and many individuals on behalf of Vovida Networks,
|
||||
* Inc. For more information on Vovida Networks, Inc., please see
|
||||
* <http://www.vovida.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
// Local Variables:
|
||||
// mode:c++
|
||||
// c-file-style:"ellemtel"
|
||||
// c-file-offsets:((case-label . +))
|
||||
// indent-tabs-mode:nil
|
||||
// End:
|
@ -1,21 +0,0 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 7.00
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "client", "client.vcproj", "{76E56991-C964-444B-82A6-AFDA5145E18A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
ConfigName.0 = Debug
|
||||
ConfigName.1 = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectDependencies) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{76E56991-C964-444B-82A6-AFDA5145E18A}.Debug.ActiveCfg = Debug|Win32
|
||||
{76E56991-C964-444B-82A6-AFDA5145E18A}.Debug.Build.0 = Debug|Win32
|
||||
{76E56991-C964-444B-82A6-AFDA5145E18A}.Release.ActiveCfg = Release|Win32
|
||||
{76E56991-C964-444B-82A6-AFDA5145E18A}.Release.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@ -1,134 +0,0 @@
|
||||
<?xml version="1.0" encoding = "Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.00"
|
||||
Name="client"
|
||||
ProjectGUID="{76E56991-C964-444B-82A6-AFDA5145E18A}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="ClientDebug"
|
||||
IntermediateDirectory="ClientDebug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="5"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Ws2_32.lib"
|
||||
OutputFile="$(OutDir)/client.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/client.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="ClientRelease"
|
||||
IntermediateDirectory="ClientRelease"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
OmitFramePointers="TRUE"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="4"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Ws2_32.lib"
|
||||
OutputFile="$(OutDir)/client.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
|
||||
<File
|
||||
RelativePath="client.cxx">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="stun.cxx">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="udp.cxx">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc">
|
||||
<File
|
||||
RelativePath="stun.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="udp.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
@ -1,15 +0,0 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICazCCAdQCAQMwDQYJKoZIhvcNAQEEBQAwgYAxCzAJBgNVBAYTAlVBMQswCQYD
|
||||
VQQIEwJDQTERMA8GA1UEBxMITWlscGl0YXMxDjAMBgNVBAoTBUZvb0NvMRMwEQYD
|
||||
VQQLEwp3aWRnZXQgZGl2MRIwEAYDVQQDEwlsb2NhbGhvc3QxGDAWBgkqhkiG9w0B
|
||||
CQEWCWZvb0Bmb28uYzAeFw0wMjExMDEwMzUyMjhaFw0wMjEyMDEwMzUyMjhaMHsx
|
||||
CzAJBgNVBAYTAkdCMRIwEAYDVQQIEwlCZXJrc2hpcmUxEDAOBgNVBAcTB05ld2J1
|
||||
cnkxFzAVBgNVBAoTDk15IENvbXBhbnkgTHRkMRIwEAYDVQQDEwlsb2NhbGhvc3Qx
|
||||
GTAXBgkqhkiG9w0BCQEWCnNlcnZlci5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0A
|
||||
MIGJAoGBAO0DwcHArwHx2XoX3XAcjc9lc/ERveDqFO9NJChtA2R3/b7EaH4FOlv1
|
||||
QxL5aaCxiwhqHVo7F/BG2OxcIIBCp8HBLRYwmKnWwta4s4imD3ZI/AAaTPm5r/KJ
|
||||
GbAh0vpF7WIdtsEOaSYbnLVnQTXTgfswgoH502sM13fVY0qJhjrTAgMBAAEwDQYJ
|
||||
KoZIhvcNAQEEBQADgYEAUSwhHT7j9ammZBo/VHT8mZylqOzBakMuASiUQNwL40sc
|
||||
0eb3MtKEg2GLlX8GtB0g2+bieA337XSXe4kyhpQ7j9ClajI3Dpr463ZKLJ43JFH0
|
||||
Ynqkfo61d9fQYtxJTXjYIatzLNXpzsxADEQ2MGokQmEMGJcBftLdMfvtOy8Kh7I=
|
||||
-----END CERTIFICATE-----
|
@ -1,15 +0,0 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIICXQIBAAKBgQDtA8HBwK8B8dl6F91wHI3PZXPxEb3g6hTvTSQobQNkd/2+xGh+
|
||||
BTpb9UMS+WmgsYsIah1aOxfwRtjsXCCAQqfBwS0WMJip1sLWuLOIpg92SPwAGkz5
|
||||
ua/yiRmwIdL6Re1iHbbBDmkmG5y1Z0E104H7MIKB+dNrDNd31WNKiYY60wIDAQAB
|
||||
AoGAJt7C2/+5s9vyCq/3RPep2iWNSi/asBQzsrs3/tlCASwclTio2mIJHCOxCF+X
|
||||
Dx+O6aZdgfrHBkTYNos1WVOVJ0S3K47HQ5gPZgIus855SEmfINzJkTPz0kahjUj9
|
||||
hMeKfmtM6uRqkVcs+H35chhXg2rW0uQRP3tlgd5wq+uRjoECQQD30oykMIbA32i6
|
||||
nHw1u1zJNZXaABoUsXlu5ylwXZp39FYxQiMmwTzI7AJAKTCf2YiHP4C9YLKnjKMo
|
||||
8D+HudAxAkEA9NXo91TuOYtxYn3NJi4FCpo+hcrHH33M+ttB8L+lO9ctgzGuvI63
|
||||
pNszIVTNnV+RwnSyR+CtO7q/PQOcrK8eQwJAVCXVBYdIqkLxv7OU5XXKKrQcPtqc
|
||||
AHzGm+a4BmRyJ9r6TV2ErAsfRaYFmZ2i2hQ2LJ5ea29jGktBt4vkNoTccQJBAL49
|
||||
dE6ybITEJ+8axwwSmBI79bbp8D0099A4DA2wLAjKUu/s69RRpLpxJFKS3U2aE90f
|
||||
5eNZ3eFaYvxa0SOQ0pcCQQDEaX+MPPNUlOk4Im7XTaiT/qQDJyIHyl7+UeHOZbvN
|
||||
X9HHnTnImOk38K3zFpEvCF9LHR3BTUzVcOEIPR/3hTor
|
||||
-----END RSA PRIVATE KEY-----
|
@ -1,54 +0,0 @@
|
||||
#!/bin/bash
|
||||
# nattest shell script
|
||||
|
||||
# set defaults
|
||||
# Interfaces typically begin eth on Linux, en on Macintosh, le or hme on Solaris
|
||||
# type ifconfig -a or ifconfig -l to see a list of all interfaces
|
||||
serverint=eth0
|
||||
clientint=eth1
|
||||
serverip1=1.1.1.2
|
||||
serverip2=1.1.1.3
|
||||
servermask=255.255.255.0
|
||||
clientip1=192.168.0.2
|
||||
clientip2=192.168.0.3
|
||||
clientmask=255.255.255.0
|
||||
|
||||
# print warning, get confirmation
|
||||
cat nattestwarning.txt
|
||||
read -p "Are you sure you want to run this? [yes]" confirm
|
||||
case $confirm in
|
||||
[nN] ) exit;;
|
||||
[nN][oO] ) exit;;
|
||||
esac
|
||||
|
||||
# off we go then....
|
||||
# add second IP address to each interface
|
||||
ifconfig $serverint $serverip2 netmask 255.255.255.255 alias
|
||||
ifconfig $clientint $clientip2 netmask 255.255.255.255 alias
|
||||
# for Solaris, use these instead
|
||||
# ifconfig ${serverint}:1 $serverip2 netmask $servermask
|
||||
# ifconfig ${clientint}:1 $clientip2 netmask $clientmask
|
||||
|
||||
./stund -h $serverip1 -a $serverip2 -b
|
||||
# verify server is running
|
||||
|
||||
./stunner $serverip1 -i $clientip1 -i2 $clientip2
|
||||
# process results of stunner and print pass/fail
|
||||
case "$?" in
|
||||
10 ) echo "[PASS] (Address) Restricted Cone NAT with Hairpinning";;
|
||||
11 ) echo "[PASS] Port Restricted Cone NAT with Hairpinning";;
|
||||
8 ) echo "[No NAT] You have open internet access";;
|
||||
2 ) echo "[FAIL] Your (Address) Restricted Cone NAT doesn't do hairpinning";;
|
||||
3 ) echo "[FAIL] Your Port Restricted Cone NAT doesn't do hairpinning";;
|
||||
-1 ) echo "ERROR! the STUN test program had an error";;
|
||||
* ) echo "[FAIL] You have a NAT or Firewall type which is NOT RECOMMENDED.";;
|
||||
esac
|
||||
|
||||
# cleanup
|
||||
killall -HUP stund
|
||||
ifconfig $serverint $serverip2 -alias
|
||||
ifconfig $clientint $clientip2 -alias
|
||||
# for Solaris, use these instead
|
||||
# ifconfig ${serverint}:1 unplumb
|
||||
# ifconfig ${clientint}:1 unplumb
|
||||
|
@ -1,47 +0,0 @@
|
||||
WARNING: This script runs as "root" and makes changes to your network interface
|
||||
configuration. This script makes several assumptions about the test environment
|
||||
you might be using. Several of these assumptions may not hold in your environment
|
||||
and could cause you to lose all connectivity to this or other computers.
|
||||
It is designed to be run from the console on two networks which are connected
|
||||
only to a NAT in a configuration like the one shown below:
|
||||
|
||||
Logical Configuration
|
||||
|
||||
+--------+
|
||||
| STUN |192.168.0.2 +-------+
|
||||
| Client |---------------| |
|
||||
+--------+ | |public +--------+
|
||||
| |side | STUN | 1.1.1.2
|
||||
192.168.0.1 | NAT |------------| Server | 1.1.1.3
|
||||
private side| |1.1.1.1 +--------+
|
||||
| |
|
||||
+--------+ | |
|
||||
| STUN |---------------| |
|
||||
| Client |192.168.0.3 +-------+
|
||||
+--------+
|
||||
|
||||
The test actually just requires a single computer with two interfaces which acts
|
||||
as a STUN server and a pair of cooperating STUN clients. The physical configuration
|
||||
is shown below. First plug in the NAT and computer and configure the primary IP
|
||||
interface on each interface. There should be no other computers or networks
|
||||
connected to the test bed.
|
||||
|
||||
Physical Configuration
|
||||
|
||||
Private Public
|
||||
or "inside" or "outside"
|
||||
interface +--------------+ interface
|
||||
| NAT device |
|
||||
192.168.0.1 +-----| under |-----+ 1.1.1.1
|
||||
| | test | |
|
||||
| | | |
|
||||
| +--------------+ |
|
||||
| |
|
||||
| |
|
||||
| +--------------+ |
|
||||
| | test | |
|
||||
192.168.0.2 +-----| computer |-----+ 1.1.1.2
|
||||
192.168.0.3 eth1| |eth0 1.1.1.3
|
||||
| |
|
||||
+--------------+
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,20 +0,0 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDWTCCAsKgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBgDELMAkGA1UEBhMCVUEx
|
||||
CzAJBgNVBAgTAkNBMREwDwYDVQQHEwhNaWxwaXRhczEOMAwGA1UEChMFRm9vQ28x
|
||||
EzARBgNVBAsTCndpZGdldCBkaXYxEjAQBgNVBAMTCWxvY2FsaG9zdDEYMBYGCSqG
|
||||
SIb3DQEJARYJZm9vQGZvby5jMB4XDTAyMTEwMTAzMDUwOFoXDTAyMTIwMTAzMDUw
|
||||
OFowgYAxCzAJBgNVBAYTAlVBMQswCQYDVQQIEwJDQTERMA8GA1UEBxMITWlscGl0
|
||||
YXMxDjAMBgNVBAoTBUZvb0NvMRMwEQYDVQQLEwp3aWRnZXQgZGl2MRIwEAYDVQQD
|
||||
Ewlsb2NhbGhvc3QxGDAWBgkqhkiG9w0BCQEWCWZvb0Bmb28uYzCBnzANBgkqhkiG
|
||||
9w0BAQEFAAOBjQAwgYkCgYEAwgvATkHnZzuN3poEtJ+l3p8rWlRVN4QnT4hW/pxI
|
||||
kZgs+U3/2QX2HZtGBcm+YJCfAICWdsnMDwhPlyp/YXdpyhe2wkl1LdukvMav8j+H
|
||||
shEQdcO+qPrjUZ8VLkMsMxM56b+UNT1m3CEoQ3qnIGuIb0DjvwfJRaiTo15LZv5j
|
||||
1wkCAwEAAaOB4DCB3TAdBgNVHQ4EFgQUlnqNTIdfldOWBuAsqXVxr8OB4p4wga0G
|
||||
A1UdIwSBpTCBooAUlnqNTIdfldOWBuAsqXVxr8OB4p6hgYakgYMwgYAxCzAJBgNV
|
||||
BAYTAlVBMQswCQYDVQQIEwJDQTERMA8GA1UEBxMITWlscGl0YXMxDjAMBgNVBAoT
|
||||
BUZvb0NvMRMwEQYDVQQLEwp3aWRnZXQgZGl2MRIwEAYDVQQDEwlsb2NhbGhvc3Qx
|
||||
GDAWBgkqhkiG9w0BCQEWCWZvb0Bmb28uY4IBADAMBgNVHRMEBTADAQH/MA0GCSqG
|
||||
SIb3DQEBBAUAA4GBAC0j/qC+PRfpIRwISxQALNm/HPtIFbQDNFwYBfVgxxQOm9cT
|
||||
gP1S9zRU8Z6K7E0ZYu6VvZAzuY9qOJK4M6X0gdGlx60QqR7poAnFiWtUtrWzs6YS
|
||||
M6ZGUjSXnnqMkP1vauvbmV72CdYLR9dIQ6OMQqJ6GKznOGJd0hW8nHzhvBUh
|
||||
-----END CERTIFICATE-----
|
@ -1,292 +0,0 @@
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
|
||||
#ifndef WIN32
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <netinet/in.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#include "udp.h"
|
||||
#include "stun.h"
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
void
|
||||
usage()
|
||||
{
|
||||
cerr << "Usage: " << endl
|
||||
<< " ./server [-v] [-h] [-h IP_Address] [-a IP_Address] [-p port] [-o port] [-m mediaport]" << endl
|
||||
<< " " << endl
|
||||
<< " If the IP addresses of your NIC are 10.0.1.150 and 10.0.1.151, run this program with" << endl
|
||||
<< " ./server -v -h 10.0.1.150 -a 10.0.1.151" << endl
|
||||
<< " STUN servers need two IP addresses and two ports, these can be specified with:" << endl
|
||||
<< " -h sets the primary IP" << endl
|
||||
<< " -a sets the secondary IP" << endl
|
||||
<< " -p sets the primary port and defaults to 3478" << endl
|
||||
<< " -o sets the secondary port and defaults to 3479" << endl
|
||||
<< " -b makes the program run in the backgroud" << endl
|
||||
<< " -m sets up a STERN server starting at port m" << endl
|
||||
<< " -v runs in verbose mode" << endl
|
||||
// in makefile too
|
||||
<< endl;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char* argv[])
|
||||
{
|
||||
assert( sizeof(UInt8 ) == 1 );
|
||||
assert( sizeof(UInt16) == 2 );
|
||||
assert( sizeof(UInt32) == 4 );
|
||||
|
||||
initNetwork();
|
||||
|
||||
clog << "STUN server version " << STUN_VERSION << endl;
|
||||
|
||||
StunAddress4 myAddr;
|
||||
StunAddress4 altAddr;
|
||||
bool verbose=false;
|
||||
bool background=false;
|
||||
|
||||
myAddr.addr = 0;
|
||||
altAddr.addr = 0;
|
||||
myAddr.port = STUN_PORT;
|
||||
altAddr.port = STUN_PORT+1;
|
||||
int myPort = 0;
|
||||
int altPort = 0;
|
||||
int myMediaPort = 0;
|
||||
|
||||
UInt32 interfaces[10];
|
||||
int numInterfaces = stunFindLocalInterfaces(interfaces,10);
|
||||
|
||||
if (numInterfaces == 2)
|
||||
{
|
||||
myAddr.addr = interfaces[0];
|
||||
myAddr.port = STUN_PORT;
|
||||
altAddr.addr = interfaces[1];
|
||||
altAddr.port = STUN_PORT+1;
|
||||
}
|
||||
|
||||
for ( int arg = 1; arg<argc; arg++ )
|
||||
{
|
||||
if ( !strcmp( argv[arg] , "-v" ) )
|
||||
{
|
||||
verbose = true;
|
||||
}
|
||||
else if ( !strcmp( argv[arg] , "-b" ) )
|
||||
{
|
||||
background = true;
|
||||
}
|
||||
else if ( !strcmp( argv[arg] , "-h" ) )
|
||||
{
|
||||
arg++;
|
||||
if ( argc <= arg )
|
||||
{
|
||||
usage();
|
||||
exit(-1);
|
||||
}
|
||||
stunParseServerName(argv[arg], myAddr);
|
||||
}
|
||||
else if ( !strcmp( argv[arg] , "-a" ) )
|
||||
{
|
||||
arg++;
|
||||
if ( argc <= arg )
|
||||
{
|
||||
usage();
|
||||
exit(-1);
|
||||
}
|
||||
stunParseServerName(argv[arg], altAddr);
|
||||
}
|
||||
else if ( !strcmp( argv[arg] , "-p" ) )
|
||||
{
|
||||
arg++;
|
||||
if ( argc <= arg )
|
||||
{
|
||||
usage();
|
||||
exit(-1);
|
||||
}
|
||||
myPort = UInt16(strtol( argv[arg], NULL, 10));
|
||||
}
|
||||
else if ( !strcmp( argv[arg] , "-o" ) )
|
||||
{
|
||||
arg++;
|
||||
if ( argc <= arg )
|
||||
{
|
||||
usage();
|
||||
exit(-1);
|
||||
}
|
||||
altPort = UInt16(strtol( argv[arg], NULL, 10));
|
||||
}
|
||||
else if ( !strcmp( argv[arg] , "-m" ) )
|
||||
{
|
||||
arg++;
|
||||
if ( argc <= arg )
|
||||
{
|
||||
usage();
|
||||
exit(-1);
|
||||
}
|
||||
myMediaPort = UInt16(strtol( argv[arg], NULL, 10));
|
||||
}
|
||||
else
|
||||
{
|
||||
usage();
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
if ( myPort != 0 )
|
||||
{
|
||||
myAddr.port = myPort;
|
||||
}
|
||||
if ( altPort != 0 )
|
||||
{
|
||||
altAddr.port = altPort;
|
||||
}
|
||||
|
||||
if ( (myAddr.addr == 0) || (altAddr.addr == 0) )
|
||||
{
|
||||
clog << "If your machine does not have exactly two ethernet interfaces, "
|
||||
<< "you must specify the server and alt server" << endl;
|
||||
//usage();
|
||||
//exit(-1);
|
||||
}
|
||||
|
||||
if ( myAddr.port == altAddr.port )
|
||||
{
|
||||
altAddr.port = myAddr.port+1;
|
||||
}
|
||||
|
||||
if ( verbose )
|
||||
{
|
||||
clog << "Running with on interface "
|
||||
<< myAddr << " with alternate "
|
||||
<< altAddr << endl;
|
||||
}
|
||||
|
||||
if (
|
||||
( myAddr.addr == 0 ) ||
|
||||
( myAddr.port == 0 ) ||
|
||||
//( altAddr.addr == 0 ) ||
|
||||
( altAddr.port == 0 )
|
||||
)
|
||||
{
|
||||
cerr << "Bad command line" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ( altAddr.addr == 0 )
|
||||
{
|
||||
cerr << "Warning - no alternate ip address STUN will not work" << endl;
|
||||
//exit(1);
|
||||
}
|
||||
|
||||
#if defined(WIN32)
|
||||
int pid=0;
|
||||
|
||||
if ( background )
|
||||
{
|
||||
cerr << "The -b background option does not work in windows" << endl;
|
||||
exit(-1);
|
||||
}
|
||||
#else
|
||||
pid_t pid=0;
|
||||
|
||||
if ( background )
|
||||
{
|
||||
pid = fork();
|
||||
|
||||
if (pid < 0)
|
||||
{
|
||||
cerr << "fork: unable to fork" << endl;
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (pid == 0) //child or not using background
|
||||
{
|
||||
StunServerInfo info;
|
||||
bool ok = stunInitServer(info, myAddr, altAddr, myMediaPort, verbose);
|
||||
|
||||
int c=0;
|
||||
while (ok)
|
||||
{
|
||||
ok = stunServerProcess(info, verbose);
|
||||
c++;
|
||||
if ( c%1000 == 0 )
|
||||
{
|
||||
clog << "*";
|
||||
}
|
||||
}
|
||||
// Notreached
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* ====================================================================
|
||||
* The Vovida Software License, Version 1.0
|
||||
*
|
||||
* Copyright (c) 2000 Vovida Networks, Inc. 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. The names "VOCAL", "Vovida Open Communication Application Library",
|
||||
* and "Vovida Open Communication Application Library (VOCAL)" must
|
||||
* not be used to endorse or promote products derived from this
|
||||
* software without prior written permission. For written
|
||||
* permission, please contact vocal@vovida.org.
|
||||
*
|
||||
* 4. Products derived from this software may not be called "VOCAL", nor
|
||||
* may "VOCAL" appear in their name, without prior written
|
||||
* permission of Vovida Networks, Inc.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
|
||||
* NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
|
||||
* NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
|
||||
* IN EXCESS OF $1,000, NOR FOR ANY 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 software consists of voluntary contributions made by Vovida
|
||||
* Networks, Inc. and many individuals on behalf of Vovida Networks,
|
||||
* Inc. For more information on Vovida Networks, Inc., please see
|
||||
* <http://www.vovida.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
// Local Variables:
|
||||
// mode:c++
|
||||
// c-file-style:"ellemtel"
|
||||
// c-file-offsets:((case-label . +))
|
||||
// indent-tabs-mode:nil
|
||||
// End:
|
@ -1,21 +0,0 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 7.00
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "server", "server.vcproj", "{2011B7B6-6932-431D-83A3-E825A271F8A8}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
ConfigName.0 = Debug
|
||||
ConfigName.1 = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectDependencies) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{2011B7B6-6932-431D-83A3-E825A271F8A8}.Debug.ActiveCfg = Debug|Win32
|
||||
{2011B7B6-6932-431D-83A3-E825A271F8A8}.Debug.Build.0 = Debug|Win32
|
||||
{2011B7B6-6932-431D-83A3-E825A271F8A8}.Release.ActiveCfg = Release|Win32
|
||||
{2011B7B6-6932-431D-83A3-E825A271F8A8}.Release.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@ -1,134 +0,0 @@
|
||||
<?xml version="1.0" encoding = "Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.00"
|
||||
Name="server"
|
||||
ProjectGUID="{2011B7B6-6932-431D-83A3-E825A271F8A8}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="ServerDebug"
|
||||
IntermediateDirectory="ServerDebug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="5"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Ws2_32.lib"
|
||||
OutputFile="$(OutDir)/server.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/server.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="ServerRelease"
|
||||
IntermediateDirectory="ServerRelease"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
OmitFramePointers="TRUE"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="4"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Ws2_32.lib"
|
||||
OutputFile="$(OutDir)/server.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
|
||||
<File
|
||||
RelativePath="server.cxx">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="stun.cxx">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="udp.cxx">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc">
|
||||
<File
|
||||
RelativePath="stun.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="udp.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
@ -1,502 +0,0 @@
|
||||
|
||||
/*
|
||||
This program takes no arguments. It opens the STUN tcp port and rus a tls server
|
||||
on it.
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
#include <openssl/e_os2.h>
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/pkcs7.h>
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/x509v3.h>
|
||||
#include <openssl/ssl.h>
|
||||
#ifdef WIN32
|
||||
#include <errno.h>
|
||||
#include <winsock2.h>
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#ifndef WIN32
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/select.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
# include <windows.h>
|
||||
# include <winbase.h>
|
||||
# include <errno.h>
|
||||
# include <winsock2.h>
|
||||
# include <io.h>
|
||||
typedef unsigned int u_int32_t;
|
||||
#endif
|
||||
|
||||
#include <cassert>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __MACH__
|
||||
typedef int socklen_t;
|
||||
#endif
|
||||
|
||||
#include "stun.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
#define MAX_CONNECTIONS 64
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
typedef int socklen_t;
|
||||
//#define errno WSAGetLastError()
|
||||
typedef SOCKET Socket;
|
||||
#else
|
||||
typedef int Socket;
|
||||
static const Socket INVALID_SOCKET = -1;
|
||||
static const int SOCKET_ERROR = -1;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// TODO - !cj! - need to deal with closing connections
|
||||
|
||||
|
||||
void
|
||||
makeSocketNonBlocking(Socket fd)
|
||||
{
|
||||
#if WIN32
|
||||
unsigned long noBlock = 1;
|
||||
int errNoBlock = ioctlsocket( fd, FIONBIO , &noBlock );
|
||||
if ( errNoBlock != 0 )
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
#else
|
||||
int flags = fcntl( fd, F_GETFL, 0);
|
||||
int errNoBlock = fcntl(fd, F_SETFL, flags | O_NONBLOCK );
|
||||
if ( errNoBlock != 0 ) // !cj! I may have messed up this line
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
#ifdef WIN32
|
||||
WORD wVersionRequested = MAKEWORD( 2, 2 );
|
||||
WSADATA wsaData;
|
||||
int err;
|
||||
|
||||
err = WSAStartup( wVersionRequested, &wsaData );
|
||||
if ( err != 0 )
|
||||
{
|
||||
// could not find a usable WinSock DLL
|
||||
//cerr << "Could not load winsock" << endl;
|
||||
assert(0); // is this is failing, try a different version that 2.2, 1.0 or later will likely work
|
||||
exit(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
// contexts for each connection
|
||||
SSL* ssl[MAX_CONNECTIONS];
|
||||
|
||||
// buffers for each connection
|
||||
BIO* bio[MAX_CONNECTIONS];
|
||||
|
||||
// file descriptors for each connection
|
||||
Socket fd[MAX_CONNECTIONS];
|
||||
|
||||
// ip address of other side of connection
|
||||
int peerip[MAX_CONNECTIONS];
|
||||
|
||||
// root cert list
|
||||
X509_STORE* certAuthorities;
|
||||
// my public cert
|
||||
X509* publicCert;
|
||||
// my private key
|
||||
EVP_PKEY* privateKey;
|
||||
// SSL Context
|
||||
SSL_CTX* ctx;
|
||||
|
||||
Socket mFd;
|
||||
|
||||
char* password = "password";
|
||||
|
||||
|
||||
for ( int i=0; i<MAX_CONNECTIONS; i++ )
|
||||
{
|
||||
fd[i]=-1;
|
||||
bio[i]=0;
|
||||
ssl[i]=0;
|
||||
}
|
||||
|
||||
|
||||
// load public cert
|
||||
FILE* fp = fopen("id.pem","rb");
|
||||
if ( !fp )
|
||||
{
|
||||
cerr << "Could not read public cert" <<endl; exit(1);
|
||||
}
|
||||
publicCert = PEM_read_X509(fp,NULL,NULL,NULL);
|
||||
if (!publicCert)
|
||||
{
|
||||
cerr << "Error reading contents of public cert"<<endl; exit(1);
|
||||
}
|
||||
cerr << "Loaded public cert"<<endl;
|
||||
|
||||
|
||||
// load private key
|
||||
fp = fopen("id_key.pem","rb");
|
||||
if ( !fp )
|
||||
{
|
||||
cerr << "Could not read private key"<<endl; exit(1);
|
||||
}
|
||||
privateKey = PEM_read_PrivateKey(fp,NULL,NULL,password);
|
||||
if (!privateKey)
|
||||
{
|
||||
cerr << "Error reading contents of private key file "<<endl;exit(1);
|
||||
}
|
||||
cerr << "Loaded private key "<<endl;
|
||||
|
||||
// load root certs
|
||||
certAuthorities = X509_STORE_new();
|
||||
assert( certAuthorities );
|
||||
if ( X509_STORE_load_locations(certAuthorities,"root.pem",NULL) != 1 )
|
||||
{
|
||||
cerr << "Error reading contents of root cert file "<<endl;
|
||||
}
|
||||
cerr << "Loaded public CAs"<<endl;
|
||||
|
||||
|
||||
// set up main security context
|
||||
SSL_library_init();
|
||||
|
||||
SSL_load_error_strings();
|
||||
|
||||
OpenSSL_add_all_ciphers();
|
||||
OpenSSL_add_all_digests();
|
||||
|
||||
ERR_load_crypto_strings();
|
||||
|
||||
ctx=SSL_CTX_new( TLSv1_method() );
|
||||
assert( ctx );
|
||||
|
||||
int ok;
|
||||
ok = SSL_CTX_use_certificate(ctx, publicCert);
|
||||
assert( ok == 1);
|
||||
|
||||
ok = SSL_CTX_use_PrivateKey(ctx,privateKey);
|
||||
assert( ok == 1);
|
||||
|
||||
assert( certAuthorities );
|
||||
SSL_CTX_set_cert_store(ctx, certAuthorities);
|
||||
|
||||
|
||||
// open a socket to listen for requests on
|
||||
mFd = socket(PF_INET, SOCK_STREAM, 0);
|
||||
|
||||
sockaddr_in addr;
|
||||
addr.sin_family = AF_INET;
|
||||
addr.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
addr.sin_port = htons(STUN_PORT);
|
||||
|
||||
if ( bind( mFd, (struct sockaddr*) &addr, sizeof(addr)) == SOCKET_ERROR )
|
||||
{
|
||||
int err = errno;
|
||||
if ( err == EADDRINUSE )
|
||||
{
|
||||
cerr << "Port already in use"<<endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
cerr << "Could not bind to port"<<endl;
|
||||
}
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
||||
makeSocketNonBlocking(mFd);
|
||||
|
||||
int e = listen(mFd,64 );
|
||||
if (e != 0 )
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
||||
|
||||
cerr << "Ready for requests" << endl;
|
||||
|
||||
while ( true )
|
||||
{
|
||||
// set up the read fd set for select
|
||||
fd_set read;
|
||||
FD_ZERO(&read);
|
||||
int size=0;
|
||||
|
||||
FD_SET(mFd, &read);
|
||||
size = mFd+1;
|
||||
|
||||
for ( int i=0; i<MAX_CONNECTIONS; i++ )
|
||||
{
|
||||
if ( fd[i] > 0 )
|
||||
{
|
||||
FD_SET(fd[i], &read);
|
||||
size = ( int(fd[i]+1) > size) ? int(fd[i]+1) : size;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// do a select
|
||||
unsigned long ms = 500;
|
||||
struct timeval tv;
|
||||
tv.tv_sec = (ms/1000);
|
||||
tv.tv_usec = (ms%1000)*1000;
|
||||
int e = select(size, &read, NULL, NULL, &tv);
|
||||
|
||||
cerr << "." ;
|
||||
|
||||
// process any new connections
|
||||
if ( FD_ISSET(mFd, &read))
|
||||
{
|
||||
cerr << "Got a new connection" << endl;
|
||||
|
||||
// find an unused connection
|
||||
int i=0;
|
||||
for ( ; i<MAX_CONNECTIONS; i++ )
|
||||
{
|
||||
if ( fd[i] == -1 )
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( i >= MAX_CONNECTIONS )
|
||||
{
|
||||
cerr << "Ran out of connections to use "<<endl;
|
||||
break;
|
||||
}
|
||||
|
||||
struct sockaddr_in peer;
|
||||
int peerLen=sizeof(peer);
|
||||
fd[i] = accept( mFd, (struct sockaddr*)&peer,(socklen_t*)&peerLen);
|
||||
if ( fd[i] == -1 )
|
||||
{
|
||||
int err = errno;
|
||||
cerr << "Error on accept: " << strerror(err)<<endl;
|
||||
break;
|
||||
}
|
||||
|
||||
int* ptr = (int*)( &peer.sin_addr );
|
||||
peerip[i] = *ptr;
|
||||
|
||||
ssl[i] = NULL;
|
||||
|
||||
ssl[i] = SSL_new(ctx);
|
||||
assert(ssl[i]);
|
||||
|
||||
bio[i] = BIO_new_socket(fd[i],0/*close flag*/);
|
||||
assert( bio[i] );
|
||||
|
||||
SSL_set_bio( ssl[i], bio[i], bio[i] );
|
||||
|
||||
int ok=0;
|
||||
ok = SSL_accept(ssl[i]);
|
||||
|
||||
if ( ok != 1 )
|
||||
{
|
||||
int err = SSL_get_error(ssl[i],ok);
|
||||
char buf[256];
|
||||
ERR_error_string_n(err,buf,sizeof(buf));
|
||||
|
||||
cerr << "ssl connection failed "<<endl;
|
||||
|
||||
bio[i] = NULL;
|
||||
}
|
||||
|
||||
makeSocketNonBlocking(fd[i]);
|
||||
}
|
||||
|
||||
|
||||
// process reads and writes
|
||||
for (int i=0; i<MAX_CONNECTIONS; i++)
|
||||
{
|
||||
if ( ssl[i] )
|
||||
if ( FD_ISSET( fd[i], &read) || SSL_pending(ssl[i]) )
|
||||
{
|
||||
cerr << "got a message on connection " << i << endl;
|
||||
|
||||
char buf[STUN_MAX_MESSAGE_SIZE];
|
||||
|
||||
int ret = SSL_read(ssl[i],buf,sizeof(buf));
|
||||
if (ret < 0 )
|
||||
{
|
||||
int err = SSL_get_error(ssl[i],ret);
|
||||
switch (err)
|
||||
{
|
||||
case SSL_ERROR_WANT_READ:
|
||||
case SSL_ERROR_WANT_WRITE:
|
||||
case SSL_ERROR_NONE:
|
||||
{
|
||||
cerr << "Got TLS read got condition of " << err <<endl;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
char buf[256];
|
||||
ERR_error_string_n(err,buf,sizeof(buf));
|
||||
cerr << "Got TLS read error " << err << " " << buf <<endl;
|
||||
}
|
||||
break;
|
||||
}
|
||||
// !cj! - big mem leak here - need to close and cleanup
|
||||
closesocket( fd[i] );
|
||||
fd[i] = -1;
|
||||
ssl[i]=0;
|
||||
}
|
||||
|
||||
cerr << "Received message with " << ret << " bytes"<<endl;
|
||||
|
||||
StunAddress4 from;
|
||||
StunAddress4 myAddr;
|
||||
StunAddress4 altAddr;
|
||||
StunMessage resp;
|
||||
StunAddress4 destination;
|
||||
StunAtrString hmacPassword;
|
||||
bool changePort;
|
||||
bool changeIp;
|
||||
|
||||
from.addr = peerip[i];
|
||||
|
||||
bool ok = stunServerProcessMsg( buf,ret,
|
||||
from,
|
||||
myAddr,
|
||||
altAddr,
|
||||
&resp,
|
||||
&destination,
|
||||
&hmacPassword,
|
||||
&changePort,
|
||||
&changeIp,
|
||||
true /*verbose*/ );
|
||||
|
||||
if (!ok )
|
||||
{
|
||||
cerr << "Message did not parse - closeing conneciton " << i <<endl;
|
||||
closesocket( fd[i] );
|
||||
fd[i] = -1;
|
||||
ssl[i]=0;
|
||||
}
|
||||
|
||||
if (ok)
|
||||
{
|
||||
int len = stunEncodeMessage( resp, buf, sizeof(buf), hmacPassword );
|
||||
|
||||
ret = SSL_write(ssl[i],(const char*)buf,len);
|
||||
|
||||
if (ret < 0 )
|
||||
{
|
||||
int err = SSL_get_error(ssl[i],ret);
|
||||
switch (err)
|
||||
{
|
||||
case SSL_ERROR_WANT_READ:
|
||||
case SSL_ERROR_WANT_WRITE:
|
||||
case SSL_ERROR_NONE:
|
||||
{
|
||||
cerr << "Got TLS write got codition of " << err <<endl;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
cerr << "Got TLS write error " << err <<endl;
|
||||
}
|
||||
break;
|
||||
}
|
||||
// !cj! big mem leak - need to cleanup
|
||||
closesocket( fd[i] );
|
||||
fd[i] = -1;
|
||||
ssl[i]=0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* ====================================================================
|
||||
* The Vovida Software License, Version 1.0
|
||||
*
|
||||
* Copyright (c) 2000 Vovida Networks, Inc. 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. The names "VOCAL", "Vovida Open Communication Application Library",
|
||||
* and "Vovida Open Communication Application Library (VOCAL)" must
|
||||
* not be used to endorse or promote products derived from this
|
||||
* software without prior written permission. For written
|
||||
* permission, please contact vocal@vovida.org.
|
||||
*
|
||||
* 4. Products derived from this software may not be called "VOCAL", nor
|
||||
* may "VOCAL" appear in their name, without prior written
|
||||
* permission of Vovida Networks, Inc.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
|
||||
* NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
|
||||
* NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
|
||||
* IN EXCESS OF $1,000, NOR FOR ANY 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 software consists of voluntary contributions made by Vovida
|
||||
* Networks, Inc. and many individuals on behalf of Vovida Networks,
|
||||
* Inc. For more information on Vovida Networks, Inc., please see
|
||||
* <http://www.vovida.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
// Local Variables:
|
||||
// mode:c++
|
||||
// c-file-style:"ellemtel"
|
||||
// c-file-offsets:((case-label . +))
|
||||
// indent-tabs-mode:nil
|
||||
// End:
|
||||
|
||||
|
@ -1,40 +0,0 @@
|
||||
@echo off
|
||||
rem wnattest.bat
|
||||
if defined %4 (
|
||||
goto usage
|
||||
) else if defined %3 (
|
||||
goto start
|
||||
) else (
|
||||
goto usage
|
||||
)
|
||||
:start
|
||||
stunner %1 -i %2 -i2 %3
|
||||
if %errorlevel% == -1 (
|
||||
echo "ERROR! the STUN test program had an error" (
|
||||
) else if %errorlevel% == 10 (
|
||||
echo "[PASS] (Address) Restricted Cone NAT with Hairpinning"
|
||||
) else if %errorlevel% == 21 (
|
||||
echo "[PASS] Port Restricted Cone NAT with Hairpinning"
|
||||
) else if %errorlevel% == 8 (
|
||||
echo "[No NAT] You have open internet access"
|
||||
) else if %errorlevel% == 2 (
|
||||
echo "[FAIL] Your (Address) Restricted Cone NAT doesn't do hairpinning"
|
||||
) else if %errorlevel% == 3 (
|
||||
echo "[FAIL] Your Port Restricted Cone NAT doesn't do hairpinning"
|
||||
) else (
|
||||
echo "[FAIL] You have a NAT or Firewall type which is NOT RECOMMENDED. "
|
||||
if %errorlevel% LSS 8 (
|
||||
echo "It also does not support hairpinning"
|
||||
) else (
|
||||
each "it does at least support hairpinning"
|
||||
)
|
||||
)
|
||||
goto end
|
||||
:usage
|
||||
echo Usage:
|
||||
echo wnattest <server-ip> <client-primary-ip> <client-secondary-ip>
|
||||
echo.
|
||||
echo Example: wnattest 1.1.1.2 192.168.0.2 192.168.0.3
|
||||
echo.
|
||||
:end
|
||||
|
Reference in New Issue
Block a user