Compare commits
No commits in common. "8a496e779bbe15d77ef3ef3a56c01f854597f596" and "e2ef3e52a8755b11645b8c041d0450de2ee683ae" have entirely different histories.
8a496e779b
...
e2ef3e52a8
15
.gitignore
vendored
15
.gitignore
vendored
@ -1,16 +1 @@
|
|||||||
/bin
|
/bin
|
||||||
NetMonitorClient/bin
|
|
||||||
NetMonitorClient/obj
|
|
||||||
NetMonitorConsole/bin
|
|
||||||
NetMonitorConsole/obj
|
|
||||||
NetMonitorServer/bin
|
|
||||||
NetMonitorServer/obj
|
|
||||||
Netmonitor-Server/Netmonitor-Server/bin
|
|
||||||
Netmonitor-Server/Netmonitor-Server/obj
|
|
||||||
NetMonitorTray/bin
|
|
||||||
NetMonitorTray/obj
|
|
||||||
NetMonitorUtils/bin
|
|
||||||
NetMonitorUtils/obj
|
|
||||||
NetOpenVPNGUI/bin
|
|
||||||
NetOpenVPNGUI/obj
|
|
||||||
.vs
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||||||
# Visual Studio 2012
|
# Visual Studio 2012
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetMonitorClient", "NetMonitorClient\NetMonitorClient.csproj", "{718693A0-06A3-4765-801D-33842861AA61}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetMonitorClient", "NetMonitorClient\NetMonitorClient.csproj", "{718693A0-06A3-4765-801D-33842861AA61}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetMonitorServer", "NetMonitorServer\NetMonitorServer_old.csproj", "{7813196F-D729-44A2-81C7-82BB83E207F5}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetMonitorServer", "NetMonitorServer\NetMonitorServer.csproj", "{7813196F-D729-44A2-81C7-82BB83E207F5}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetMonitorConsole", "NetMonitorConsole\NetMonitorConsole.csproj", "{148AA47C-FA4D-4807-9EB0-5AEAC36C1524}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetMonitorConsole", "NetMonitorConsole\NetMonitorConsole.csproj", "{148AA47C-FA4D-4807-9EB0-5AEAC36C1524}"
|
||||||
EndProject
|
EndProject
|
||||||
|
|||||||
@ -1,11 +1,14 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.ComponentModel;
|
||||||
using System.Net.Sockets;
|
using System.Data;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
using System.ServiceProcess;
|
using System.ServiceProcess;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Net;
|
||||||
|
using System.Net.Sockets;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
using BlubbFish.Utils;
|
using BlubbFish.Utils;
|
||||||
|
|
||||||
namespace NetMonitorServer {
|
namespace NetMonitorServer {
|
||||||
@ -14,7 +17,6 @@ namespace NetMonitorServer {
|
|||||||
private static UdpClient receiveStream;
|
private static UdpClient receiveStream;
|
||||||
private static FileLogger log;
|
private static FileLogger log;
|
||||||
private static OwnObject.LogLevel loglevel;
|
private static OwnObject.LogLevel loglevel;
|
||||||
|
|
||||||
public MainService() {
|
public MainService() {
|
||||||
string folder = Factory.getSettings().getValue("program", "logfolder");
|
string folder = Factory.getSettings().getValue("program", "logfolder");
|
||||||
folder = folder.EndsWith("\\") ? folder : folder + "\\";
|
folder = folder.EndsWith("\\") ? folder : folder + "\\";
|
||||||
|
|||||||
@ -1,18 +1,139 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||||
|
<ProductVersion>8.0.30703</ProductVersion>
|
||||||
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
|
<ProjectGuid>{7813196F-D729-44A2-81C7-82BB83E207F5}</ProjectGuid>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>NetmonitorServer</RootNamespace>
|
<RootNamespace>NetMonitorServer</RootNamespace>
|
||||||
|
<AssemblyName>NetMonitorServer</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||||
|
<TargetFrameworkProfile>
|
||||||
|
</TargetFrameworkProfile>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<PublishUrl>veröffentlichen\</PublishUrl>
|
||||||
|
<Install>true</Install>
|
||||||
|
<InstallFrom>Disk</InstallFrom>
|
||||||
|
<UpdateEnabled>false</UpdateEnabled>
|
||||||
|
<UpdateMode>Foreground</UpdateMode>
|
||||||
|
<UpdateInterval>7</UpdateInterval>
|
||||||
|
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||||
|
<UpdatePeriodically>false</UpdatePeriodically>
|
||||||
|
<UpdateRequired>false</UpdateRequired>
|
||||||
|
<MapFileExtensions>true</MapFileExtensions>
|
||||||
|
<ApplicationRevision>0</ApplicationRevision>
|
||||||
|
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||||
|
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||||
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
|
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>..\bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugType>none</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>..\bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>
|
||||||
|
</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<ApplicationIcon>icon.ico</ApplicationIcon>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<StartupObject />
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Windows.Compatibility" Version="6.0.0" />
|
<Reference Include="System" />
|
||||||
<PackageReference Include="TopShelf.ServiceInstaller" Version="4.3.0" />
|
<Reference Include="System.Configuration.Install" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.ServiceProcess" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\Utils\Utils\Utils\Utils.csproj" />
|
<Compile Include="ActionClass.cs" />
|
||||||
|
<Compile Include="Controller\OpenVpnController.cs" />
|
||||||
|
<Compile Include="Factory.cs" />
|
||||||
|
<Compile Include="Actions\SetOpenVPNService.cs" />
|
||||||
|
<Compile Include="Actions\SetService.cs" />
|
||||||
|
<Compile Include="MainService.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MainService.Designer.cs">
|
||||||
|
<DependentUpon>MainService.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Program.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="Actions\SetNetworks.cs" />
|
||||||
|
<Compile Include="ServerModel.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
</Project>
|
<EmbeddedResource Include="MainService.resx">
|
||||||
|
<DependentUpon>MainService.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="icon.ico" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\Utils\Utils\Utils.csproj">
|
||||||
|
<Project>{fac8ce64-bf13-4ece-8097-aeb5dd060098}</Project>
|
||||||
|
<Name>Utils</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="app.manifest">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<BootstrapperPackage Include=".NETFramework,Version=v4.5">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>Microsoft .NET Framework 4.5 %28x86 and x64%29</ProductName>
|
||||||
|
<Install>true</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||||
|
<Install>false</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||||
|
<Install>false</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
<Target Name="BeforeBuild">
|
||||||
|
</Target>
|
||||||
|
<Target Name="AfterBuild">
|
||||||
|
</Target>
|
||||||
|
-->
|
||||||
|
</Project>
|
||||||
@ -1,12 +1,21 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup />
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||||
<ItemGroup>
|
<StartArguments>-r</StartArguments>
|
||||||
<Compile Update="MainService.cs">
|
<StartAction>Program</StartAction>
|
||||||
<SubType>Component</SubType>
|
<StartProgram>D:\Visual Studio 2012\Projects\netmonitor\bin\Debug\NetMonitorServer.exe</StartProgram>
|
||||||
</Compile>
|
</PropertyGroup>
|
||||||
<Compile Update="Program.cs">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||||
<SubType>Component</SubType>
|
<StartArguments>-r</StartArguments>
|
||||||
</Compile>
|
</PropertyGroup>
|
||||||
</ItemGroup>
|
<PropertyGroup>
|
||||||
|
<PublishUrlHistory>veröffentlichen\</PublishUrlHistory>
|
||||||
|
<InstallUrlHistory />
|
||||||
|
<SupportUrlHistory />
|
||||||
|
<UpdateUrlHistory />
|
||||||
|
<BootstrapperUrlHistory />
|
||||||
|
<ErrorReportUrlHistory />
|
||||||
|
<FallbackCulture>de-DE</FallbackCulture>
|
||||||
|
<VerifyUploadedFiles>false</VerifyUploadedFiles>
|
||||||
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@ -1,139 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup>
|
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
||||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
|
||||||
<ProductVersion>8.0.30703</ProductVersion>
|
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
|
||||||
<ProjectGuid>{7813196F-D729-44A2-81C7-82BB83E207F5}</ProjectGuid>
|
|
||||||
<OutputType>Exe</OutputType>
|
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
||||||
<RootNamespace>NetMonitorServer</RootNamespace>
|
|
||||||
<AssemblyName>NetMonitorServer</AssemblyName>
|
|
||||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
|
||||||
<TargetFrameworkProfile>
|
|
||||||
</TargetFrameworkProfile>
|
|
||||||
<FileAlignment>512</FileAlignment>
|
|
||||||
<PublishUrl>veröffentlichen\</PublishUrl>
|
|
||||||
<Install>true</Install>
|
|
||||||
<InstallFrom>Disk</InstallFrom>
|
|
||||||
<UpdateEnabled>false</UpdateEnabled>
|
|
||||||
<UpdateMode>Foreground</UpdateMode>
|
|
||||||
<UpdateInterval>7</UpdateInterval>
|
|
||||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
|
||||||
<UpdatePeriodically>false</UpdatePeriodically>
|
|
||||||
<UpdateRequired>false</UpdateRequired>
|
|
||||||
<MapFileExtensions>true</MapFileExtensions>
|
|
||||||
<ApplicationRevision>0</ApplicationRevision>
|
|
||||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
|
||||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
|
||||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>..\bin\Debug\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<DebugType>none</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>..\bin\Release\</OutputPath>
|
|
||||||
<DefineConstants>
|
|
||||||
</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<ApplicationIcon>icon.ico</ApplicationIcon>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<StartupObject />
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="System" />
|
|
||||||
<Reference Include="System.Configuration.Install" />
|
|
||||||
<Reference Include="System.Core" />
|
|
||||||
<Reference Include="System.Windows.Forms" />
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
|
||||||
<Reference Include="Microsoft.CSharp" />
|
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.ServiceProcess" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="ActionClass.cs" />
|
|
||||||
<Compile Include="Controller\OpenVpnController.cs" />
|
|
||||||
<Compile Include="Factory.cs" />
|
|
||||||
<Compile Include="Actions\SetOpenVPNService.cs" />
|
|
||||||
<Compile Include="Actions\SetService.cs" />
|
|
||||||
<Compile Include="MainService.cs">
|
|
||||||
<SubType>Component</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="MainService.Designer.cs">
|
|
||||||
<DependentUpon>MainService.cs</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Program.cs">
|
|
||||||
<SubType>Component</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
<Compile Include="Actions\SetNetworks.cs" />
|
|
||||||
<Compile Include="ServerModel.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<EmbeddedResource Include="MainService.resx">
|
|
||||||
<DependentUpon>MainService.cs</DependentUpon>
|
|
||||||
</EmbeddedResource>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Content Include="icon.ico" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\..\Utils\Utils\Utils.csproj">
|
|
||||||
<Project>{fac8ce64-bf13-4ece-8097-aeb5dd060098}</Project>
|
|
||||||
<Name>Utils</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="app.manifest">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<BootstrapperPackage Include=".NETFramework,Version=v4.5">
|
|
||||||
<Visible>False</Visible>
|
|
||||||
<ProductName>Microsoft .NET Framework 4.5 %28x86 and x64%29</ProductName>
|
|
||||||
<Install>true</Install>
|
|
||||||
</BootstrapperPackage>
|
|
||||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
|
||||||
<Visible>False</Visible>
|
|
||||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
|
||||||
<Install>false</Install>
|
|
||||||
</BootstrapperPackage>
|
|
||||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
|
||||||
<Visible>False</Visible>
|
|
||||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
|
||||||
<Install>false</Install>
|
|
||||||
</BootstrapperPackage>
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
|
||||||
<Target Name="BeforeBuild">
|
|
||||||
</Target>
|
|
||||||
<Target Name="AfterBuild">
|
|
||||||
</Target>
|
|
||||||
-->
|
|
||||||
</Project>
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
|
||||||
<StartArguments>-r</StartArguments>
|
|
||||||
<StartAction>Program</StartAction>
|
|
||||||
<StartProgram>D:\Visual Studio 2012\Projects\netmonitor\bin\Debug\NetMonitorServer.exe</StartProgram>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
|
||||||
<StartArguments>-r</StartArguments>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<PublishUrlHistory>veröffentlichen\</PublishUrlHistory>
|
|
||||||
<InstallUrlHistory />
|
|
||||||
<SupportUrlHistory />
|
|
||||||
<UpdateUrlHistory />
|
|
||||||
<BootstrapperUrlHistory />
|
|
||||||
<ErrorReportUrlHistory />
|
|
||||||
<FallbackCulture>de-DE</FallbackCulture>
|
|
||||||
<VerifyUploadedFiles>false</VerifyUploadedFiles>
|
|
||||||
</PropertyGroup>
|
|
||||||
</Project>
|
|
||||||
@ -1,42 +1,48 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.Linq;
|
||||||
using System.Configuration.Install;
|
|
||||||
using System.ServiceProcess;
|
using System.ServiceProcess;
|
||||||
using System.Threading;
|
using System.Text;
|
||||||
|
using System.Configuration.Install;
|
||||||
using BlubbFish.Utils;
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace NetMonitorServer {
|
namespace NetMonitorServer {
|
||||||
[RunInstaller(true)]
|
[RunInstaller(true)]
|
||||||
public class InstallWindowsService : Installer {
|
public class TestWinInstaller : Installer {
|
||||||
public InstallWindowsService() {
|
private ServiceInstaller m_ThisService;
|
||||||
this.Installers.Add(new ServiceInstaller {
|
private ServiceProcessInstaller m_ThisServiceProcess;
|
||||||
ServiceName = "NetMonitorServer",
|
|
||||||
StartType = ServiceStartMode.Automatic,
|
public TestWinInstaller() {
|
||||||
Description = "Teil von NetMonitor der die Systemnahen Befele ausführt",
|
m_ThisService = new ServiceInstaller();
|
||||||
DisplayName = "Netmonitor Server"
|
m_ThisServiceProcess = new ServiceProcessInstaller();
|
||||||
});
|
|
||||||
this.Installers.Add(new ServiceProcessInstaller {
|
m_ThisServiceProcess.Account = ServiceAccount.LocalSystem;
|
||||||
Account = ServiceAccount.LocalSystem
|
m_ThisService.ServiceName = "NetMonitorServer";
|
||||||
});
|
m_ThisService.StartType = ServiceStartMode.Automatic;
|
||||||
|
m_ThisService.Description = "Teil von NetMonitor der die Systemnahen Befele ausführt";
|
||||||
|
m_ThisService.DisplayName = "Netzwerk Settings Tool";
|
||||||
|
|
||||||
|
Installers.Add(m_ThisService);
|
||||||
|
Installers.Add(m_ThisServiceProcess);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
static class Program {
|
||||||
class Program {
|
/// <summary>
|
||||||
static void Main(String[] args) => new Program(args);
|
/// The main entry point for the application.
|
||||||
|
/// </summary>
|
||||||
public Program(String[] args) {
|
static void Main(string[] args) {
|
||||||
CmdArgs.Instance.SetArguments(new Dictionary<String, CmdArgs.VaildArguments> {
|
if(args.Length == 0) {
|
||||||
{ "-r", new CmdArgs.VaildArguments(CmdArgs.ArgLength.Single, false) }
|
ServiceBase[] ServicesToRun;
|
||||||
}, args);
|
ServicesToRun = new ServiceBase[]
|
||||||
|
{
|
||||||
if(CmdArgs.Instance.HasArgumentType("-r")) {
|
new MainService()
|
||||||
ServiceBase.Run(new ServiceBase[] { new MainService() });
|
};
|
||||||
} else {
|
ServiceBase.Run(ServicesToRun);
|
||||||
new MainService().StartServiceConsole(args);
|
} else if(args.Length == 1 && args[0] == "-r") {
|
||||||
|
MainService s = new MainService();
|
||||||
|
s.StartServiceConsole(args);
|
||||||
while(true) {
|
while(true) {
|
||||||
Thread.Sleep(100);
|
System.Threading.Thread.Sleep(100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,18 +1,31 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using BlubbFish.Utils;
|
using System.Text;
|
||||||
|
using System.Diagnostics;
|
||||||
using NetMonitorServer.Controller;
|
using NetMonitorServer.Controller;
|
||||||
|
|
||||||
namespace NetMonitorServer {
|
namespace NetMonitorServer {
|
||||||
class ServerModel : OwnSingeton<ServerModel> {
|
class ServerModel {
|
||||||
|
private static volatile ServerModel instance;
|
||||||
|
private static object syncRoot = new Object();
|
||||||
|
public static ServerModel Instance {
|
||||||
|
get {
|
||||||
|
if(instance == null) {
|
||||||
|
lock(syncRoot) {
|
||||||
|
if(instance == null)
|
||||||
|
instance = new ServerModel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private ServerModel() {
|
||||||
|
openvpnInstances = new Dictionary<string, OpenVpnController>();
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Openvpn Instanzen Dictionary
|
/// Openvpn Instanzen Dictionary
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Dictionary<String, OpenVpnController> openvpnInstances;
|
public Dictionary<string, OpenVpnController> openvpnInstances;
|
||||||
|
|
||||||
private ServerModel() => this.openvpnInstances = new Dictionary<String, OpenVpnController>();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace Netmonitor_Server {
|
|
||||||
class Program {
|
|
||||||
static void Main(string[] args) {
|
|
||||||
Console.WriteLine("Hello World!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,31 +0,0 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Visual Studio Version 16
|
|
||||||
VisualStudioVersion = 16.0.31112.23
|
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetmonitorServer", "NetmonitorServer\NetmonitorServer.csproj", "{453096FC-1962-46BB-99EF-542875511D52}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Utils", "..\Utils\Utils\Utils\Utils.csproj", "{B62ADF12-390E-4141-AE1F-919130ADAE3D}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|Any CPU = Debug|Any CPU
|
|
||||||
Release|Any CPU = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{453096FC-1962-46BB-99EF-542875511D52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{453096FC-1962-46BB-99EF-542875511D52}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{453096FC-1962-46BB-99EF-542875511D52}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{453096FC-1962-46BB-99EF-542875511D52}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{B62ADF12-390E-4141-AE1F-919130ADAE3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{B62ADF12-390E-4141-AE1F-919130ADAE3D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{B62ADF12-390E-4141-AE1F-919130ADAE3D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{B62ADF12-390E-4141-AE1F-919130ADAE3D}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
||||||
SolutionGuid = {40689E2F-66B1-4A25-A58B-ECCC32EEED42}
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
||||||
Loading…
Reference in New Issue
Block a user