├── CppWinRT ├── TestVpnPluginApp │ ├── test │ ├── Class.cpp │ ├── pch.cpp │ ├── App.idl │ ├── Assets │ │ ├── StoreLogo.png │ │ ├── SplashScreen.scale-200.png │ │ ├── LockScreenLogo.scale-200.png │ │ ├── Square44x44Logo.scale-200.png │ │ ├── Wide310x150Logo.scale-200.png │ │ ├── Square150x150Logo.scale-200.png │ │ └── Square44x44Logo.targetsize-24_altform-unplated.png │ ├── packages.config │ ├── MainPage.idl │ ├── App.xaml │ ├── App.h │ ├── PropertySheet.props │ ├── pch.h │ ├── MainPage.h │ ├── readme.txt │ ├── TestVpnPluginApp.vcxproj.filters │ ├── MainPage.xaml │ ├── MainPage.cpp │ ├── Package.appxmanifest │ ├── App.cpp │ └── TestVpnPluginApp.vcxproj ├── TestVpnPluginAppBg │ ├── pch.cpp │ ├── PacketUtils.cpp │ ├── TestVpnPluginAppBg.def │ ├── packages.config │ ├── Utils.h │ ├── TestVpnPluginAppBgTask.idl │ ├── VPNConfiguration.h │ ├── PropertySheet.props │ ├── Utils.cpp │ ├── TestVpnPluginAppBgTask.h │ ├── readme.txt │ ├── BackgroundPacketWorker.h │ ├── pch.h │ ├── NativeBuffer.h │ ├── TestVpnPluginAppBg.vcxproj.filters │ ├── VpnPlugInImpl.h │ ├── TestVpnPluginAppBgTask.cpp │ ├── CustomConfiguration.h │ ├── PacketUtils.h │ └── TestVpnPluginAppBg.vcxproj └── TestVpnPluginApp.sln ├── CSharp ├── TestVpnPluginApp │ ├── Assets │ │ ├── Logo.png │ │ ├── Badge.png │ │ ├── Logo-Main.png │ │ ├── SmallLogo.png │ │ ├── SmallLogo-44.png │ │ ├── SplashScreen.png │ │ ├── Logo.scale-100.png │ │ ├── Logo.scale-125.png │ │ ├── Logo.scale-150.png │ │ ├── Logo.scale-200.png │ │ ├── Logo.scale-400.png │ │ ├── StoreLogo.backup.png │ │ ├── LargeTile.scale-100.png │ │ ├── LargeTile.scale-125.png │ │ ├── LargeTile.scale-150.png │ │ ├── LargeTile.scale-200.png │ │ ├── LargeTile.scale-400.png │ │ ├── SmallLogo.scale-100.png │ │ ├── SmallLogo.scale-125.png │ │ ├── SmallLogo.scale-150.png │ │ ├── SmallLogo.scale-200.png │ │ ├── SmallLogo.scale-400.png │ │ ├── SmallTile.scale-100.png │ │ ├── SmallTile.scale-125.png │ │ ├── SmallTile.scale-150.png │ │ ├── SmallTile.scale-200.png │ │ ├── SmallTile.scale-400.png │ │ ├── StoreLogo.scale-100.png │ │ ├── StoreLogo.scale-125.png │ │ ├── StoreLogo.scale-150.png │ │ ├── StoreLogo.scale-200.png │ │ ├── StoreLogo.scale-400.png │ │ ├── WideTile.scale-100.png │ │ ├── WideTile.scale-125.png │ │ ├── WideTile.scale-150.png │ │ ├── WideTile.scale-200.png │ │ ├── WideTile.scale-400.png │ │ ├── SmallLogo-44.scale-100.png │ │ ├── SmallLogo-44.scale-125.png │ │ ├── SmallLogo-44.scale-150.png │ │ ├── SmallLogo-44.scale-200.png │ │ ├── SmallLogo-44.scale-400.png │ │ ├── SplashScreen.scale-100.png │ │ ├── SplashScreen.scale-125.png │ │ ├── SplashScreen.scale-150.png │ │ ├── SplashScreen.scale-200.png │ │ ├── SplashScreen.scale-400.png │ │ ├── LockScreenLogo.scale-200.png │ │ ├── SmallLogo.targetsize-16.png │ │ ├── SmallLogo.targetsize-24.png │ │ ├── SmallLogo.targetsize-256.png │ │ ├── SmallLogo.targetsize-32.png │ │ ├── SmallLogo.targetsize-48.png │ │ ├── SmallLogo-44.targetsize-16.png │ │ ├── SmallLogo-44.targetsize-24.png │ │ ├── SmallLogo-44.targetsize-256.png │ │ ├── SmallLogo-44.targetsize-32.png │ │ ├── SmallLogo-44.targetsize-48.png │ │ ├── Square150x150Logo.scale-200.png │ │ ├── Square44x44Logo.scale-100.png │ │ ├── Square44x44Logo.scale-200.png │ │ ├── Wide310x150Logo.scale-200.png │ │ ├── SmallLogo.altform-unplated_targetsize-16.png │ │ ├── SmallLogo.altform-unplated_targetsize-24.png │ │ ├── SmallLogo.altform-unplated_targetsize-256.png │ │ ├── SmallLogo.altform-unplated_targetsize-32.png │ │ ├── SmallLogo.altform-unplated_targetsize-48.png │ │ ├── SmallLogo-44.altform-unplated_targetsize-16.png │ │ ├── SmallLogo-44.altform-unplated_targetsize-24.png │ │ ├── SmallLogo-44.altform-unplated_targetsize-256.png │ │ ├── SmallLogo-44.altform-unplated_targetsize-32.png │ │ ├── SmallLogo-44.altform-unplated_targetsize-48.png │ │ ├── SmallLogo.altform-lightunplated_targetsize-16.png │ │ ├── SmallLogo.altform-lightunplated_targetsize-24.png │ │ ├── SmallLogo.altform-lightunplated_targetsize-256.png │ │ ├── SmallLogo.altform-lightunplated_targetsize-32.png │ │ ├── SmallLogo.altform-lightunplated_targetsize-48.png │ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ │ ├── SmallLogo-44.altform-lightunplated_targetsize-16.png │ │ ├── SmallLogo-44.altform-lightunplated_targetsize-24.png │ │ ├── SmallLogo-44.altform-lightunplated_targetsize-256.png │ │ ├── SmallLogo-44.altform-lightunplated_targetsize-32.png │ │ └── SmallLogo-44.altform-lightunplated_targetsize-48.png │ ├── App.xaml │ ├── CredentialsDialog.xaml │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ └── Default.rd.xml │ ├── CredentialsDialog.xaml.cs │ ├── Common │ │ ├── RelayCommand.cs │ │ └── ObservableDictionary.cs │ ├── Package.appxmanifest │ ├── MainPage.xaml │ ├── App.xaml.cs │ └── TestVpnPluginApp.csproj ├── TestVpnPluginAppBg │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Logger.cs │ ├── TestVpnPluginAppBg.csproj │ ├── TestVpnPluginAppBgTask.cs │ └── PacketUtils.cs └── TestVpnPluginApp.sln ├── SimpleVpnServer ├── SimpleVpnServer │ ├── Properties │ │ └── launchSettings.json │ ├── SimpleVpnServer.csproj │ ├── Logger.cs │ └── Client.cs └── SimpleVpnServer.sln ├── SimpleUDPListener ├── SimpleUDPListener │ ├── SimpleUDPListener.csproj │ └── Client.cs └── SimpleUDPLIstener.sln ├── CODE_OF_CONDUCT.md ├── SUPPORT.md ├── LICENSE ├── SECURITY.md ├── README.md └── .gitignore /CppWinRT/TestVpnPluginApp/test: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginApp/Class.cpp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginApp/pch.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginAppBg/pch.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginApp/App.idl: -------------------------------------------------------------------------------- 1 | namespace TestVpnPluginApp 2 | { 3 | } 4 | -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginAppBg/PacketUtils.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "PacketUtils.h" 3 | -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/Logo.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/Badge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/Badge.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/Logo-Main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/Logo-Main.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo-44.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo-44.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SplashScreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SplashScreen.png -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginApp/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CppWinRT/TestVpnPluginApp/Assets/StoreLogo.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/Logo.scale-100.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/Logo.scale-125.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/Logo.scale-150.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/Logo.scale-200.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/Logo.scale-400.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/StoreLogo.backup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/StoreLogo.backup.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/LargeTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/LargeTile.scale-100.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/LargeTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/LargeTile.scale-125.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/LargeTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/LargeTile.scale-150.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/LargeTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/LargeTile.scale-200.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/LargeTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/LargeTile.scale-400.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo.scale-100.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo.scale-125.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo.scale-150.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo.scale-200.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo.scale-400.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallTile.scale-100.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallTile.scale-125.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallTile.scale-150.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallTile.scale-200.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallTile.scale-400.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/StoreLogo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/StoreLogo.scale-100.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/StoreLogo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/StoreLogo.scale-125.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/StoreLogo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/StoreLogo.scale-150.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/StoreLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/StoreLogo.scale-200.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/StoreLogo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/StoreLogo.scale-400.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/WideTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/WideTile.scale-100.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/WideTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/WideTile.scale-125.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/WideTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/WideTile.scale-150.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/WideTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/WideTile.scale-200.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/WideTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/WideTile.scale-400.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo-44.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo-44.scale-100.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo-44.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo-44.scale-125.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo-44.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo-44.scale-150.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo-44.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo-44.scale-200.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo-44.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo-44.scale-400.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SplashScreen.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SplashScreen.scale-100.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SplashScreen.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SplashScreen.scale-125.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SplashScreen.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SplashScreen.scale-150.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SplashScreen.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SplashScreen.scale-400.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo.targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo.targetsize-16.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo.targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo.targetsize-24.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo.targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo.targetsize-256.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo.targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo.targetsize-32.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo.targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo.targetsize-48.png -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginApp/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CppWinRT/TestVpnPluginApp/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo-44.targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo-44.targetsize-16.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo-44.targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo-44.targetsize-24.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo-44.targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo-44.targetsize-256.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo-44.targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo-44.targetsize-32.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo-44.targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo-44.targetsize-48.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/Square44x44Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/Square44x44Logo.scale-100.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginApp/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CppWinRT/TestVpnPluginApp/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginApp/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CppWinRT/TestVpnPluginApp/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginApp/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CppWinRT/TestVpnPluginApp/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginApp/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CppWinRT/TestVpnPluginApp/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginAppBg/TestVpnPluginAppBg.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | DllCanUnloadNow = WINRT_CanUnloadNow PRIVATE 3 | DllGetActivationFactory = WINRT_GetActivationFactory PRIVATE 4 | -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginApp/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginAppBg/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo.altform-unplated_targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo.altform-unplated_targetsize-16.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo.altform-unplated_targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo.altform-unplated_targetsize-24.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo.altform-unplated_targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo.altform-unplated_targetsize-256.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo.altform-unplated_targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo.altform-unplated_targetsize-32.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo.altform-unplated_targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo.altform-unplated_targetsize-48.png -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginApp/MainPage.idl: -------------------------------------------------------------------------------- 1 | namespace TestVpnPluginApp 2 | { 3 | [default_interface] 4 | runtimeclass MainPage : Windows.UI.Xaml.Controls.Page 5 | { 6 | MainPage(); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo-44.altform-unplated_targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo-44.altform-unplated_targetsize-16.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo-44.altform-unplated_targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo-44.altform-unplated_targetsize-24.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo-44.altform-unplated_targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo-44.altform-unplated_targetsize-256.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo-44.altform-unplated_targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo-44.altform-unplated_targetsize-32.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo-44.altform-unplated_targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo-44.altform-unplated_targetsize-48.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo.altform-lightunplated_targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo.altform-lightunplated_targetsize-16.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo.altform-lightunplated_targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo.altform-lightunplated_targetsize-24.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo.altform-lightunplated_targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo.altform-lightunplated_targetsize-256.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo.altform-lightunplated_targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo.altform-lightunplated_targetsize-32.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo.altform-lightunplated_targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo.altform-lightunplated_targetsize-48.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo-44.altform-lightunplated_targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo-44.altform-lightunplated_targetsize-16.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo-44.altform-lightunplated_targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo-44.altform-lightunplated_targetsize-24.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo-44.altform-lightunplated_targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo-44.altform-lightunplated_targetsize-256.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo-44.altform-lightunplated_targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo-44.altform-lightunplated_targetsize-32.png -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Assets/SmallLogo-44.altform-lightunplated_targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CSharp/TestVpnPluginApp/Assets/SmallLogo-44.altform-lightunplated_targetsize-48.png -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/UwpVpnPluginSample/HEAD/CppWinRT/TestVpnPluginApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /SimpleVpnServer/SimpleVpnServer/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "SimpleVpnServer": { 4 | "commandName": "Project", 5 | "commandLineArgs": "/Start /Port 444 /Forward /PacketCounter" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /SimpleVpnServer/SimpleVpnServer/SimpleVpnServer.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp3.1 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SimpleUDPListener/SimpleUDPListener/SimpleUDPListener.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp3.1 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginApp/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginAppBg/Utils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | using namespace winrt::Windows::Storage::Streams; 4 | class Utils 5 | { 6 | public: 7 | static std::wstring GetLowerString(winrt::hstring const& input); 8 | static std::wstring GetLowerString(std::wstring& val); 9 | static winrt::hstring GetLowerHString(winrt::hstring const& input); 10 | }; 11 | 12 | -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginAppBg/TestVpnPluginAppBgTask.idl: -------------------------------------------------------------------------------- 1 | namespace TestVpnPluginAppBg 2 | { 3 | [default_interface] 4 | runtimeclass TestVpnPluginAppBgTask : Windows.ApplicationModel.Background.IBackgroundTask 5 | { 6 | TestVpnPluginAppBgTask(); 7 | } 8 | 9 | [default_interface] 10 | runtimeclass VpnPlugInImpl : Windows.Networking.Vpn.IVpnPlugIn 11 | { 12 | VpnPlugInImpl(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Microsoft Open Source Code of Conduct 2 | 3 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 4 | 5 | Resources: 6 | 7 | - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) 8 | - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) 9 | - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns 10 | -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginApp/App.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "App.xaml.g.h" 3 | 4 | namespace winrt::TestVpnPluginApp::implementation 5 | { 6 | struct App : AppT 7 | { 8 | App(); 9 | 10 | void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs const&); 11 | void OnSuspending(IInspectable const&, Windows::ApplicationModel::SuspendingEventArgs const&); 12 | void OnNavigationFailed(IInspectable const&, Windows::UI::Xaml::Navigation::NavigationFailedEventArgs const&); 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /SUPPORT.md: -------------------------------------------------------------------------------- 1 | # Support 2 | 3 | ## How to file issues and get help 4 | 5 | This project uses GitHub Issues to track bugs and feature requests. Please search the existing 6 | issues before filing new issues to avoid duplicates. For new issues, file your bug or 7 | feature request as a new Issue. 8 | 9 | For help and questions about using this project, please use the [Windows Q&A forums](https://docs.microsoft.com/en-us/answers/topics/46321/windows-uwp.html), marking your question as a "windows-uwp" question. 10 | 11 | ## Microsoft Support Policy 12 | 13 | Support for this **PROJECT or PRODUCT** is limited to the resources listed above. 14 | -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginAppBg/VPNConfiguration.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "pch.h" 3 | 4 | using namespace winrt::Windows::Networking::Vpn; 5 | 6 | struct VPN_AUTHENTICATION 7 | { 8 | VpnCredentialType authType; 9 | std::wstring expectedUser; 10 | std::wstring expectedPass; 11 | std::wstring expectedPin; 12 | std::wstring expectedNewPass; 13 | std::wstring certSubject; 14 | bool useSingleSignOn; 15 | }; 16 | 17 | enum class VPN_PLUGIN_TYPE 18 | { 19 | VPN_PLUGIN_TRANSPORT_TYPE_TCP, 20 | VPN_PLUGIN_TRANSPORT_TYPE_UDP, 21 | VPN_PLUGIN_TRANSPORT_TYPE_DUAL, 22 | VPN_PLUGIN_TRANSPORT_TYPE_MAX 23 | }; 24 | 25 | 26 | class VpnConfiguration 27 | { 28 | }; 29 | 30 | -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginApp/PropertySheet.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginAppBg/PropertySheet.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginApp/pch.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | #include 18 | #include 19 | -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginAppBg/Utils.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "Utils.h" 3 | 4 | using namespace winrt::Windows::Foundation; 5 | using namespace winrt::Windows::Security::Cryptography::Core; 6 | using namespace winrt::Windows::Storage::Streams; 7 | 8 | std::wstring Utils::GetLowerString(winrt::hstring const& input) 9 | { 10 | auto val = std::wstring{ input }; 11 | return GetLowerString(val); 12 | } 13 | 14 | std::wstring Utils::GetLowerString(std::wstring& val) 15 | { 16 | std::transform( 17 | val.begin(), val.end(), 18 | val.begin(), 19 | towlower); 20 | return val; 21 | } 22 | 23 | winrt::hstring Utils::GetLowerHString(winrt::hstring const& input) 24 | { 25 | auto val = winrt::hstring{ GetLowerString(input) }; 26 | return val; 27 | } 28 | -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/CredentialsDialog.xaml: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginAppBg/TestVpnPluginAppBgTask.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "TestVpnPluginAppBgTask.g.h" 3 | 4 | using namespace winrt; 5 | using namespace winrt::Windows::Networking::Vpn; 6 | using namespace winrt::Windows::ApplicationModel; 7 | using namespace Background; 8 | using namespace Core; 9 | using namespace winrt::Windows::Foundation; 10 | using namespace winrt::Windows::System; 11 | using namespace winrt::Windows::UI::Core; 12 | 13 | 14 | namespace winrt::TestVpnPluginAppBg::implementation 15 | { 16 | struct TestVpnPluginAppBgTask : TestVpnPluginAppBgTaskT 17 | { 18 | TestVpnPluginAppBgTask() = default; 19 | 20 | void Run(Windows::ApplicationModel::Background::IBackgroundTaskInstance const& taskInstance); 21 | }; 22 | } 23 | namespace winrt::TestVpnPluginAppBg::factory_implementation 24 | { 25 | struct TestVpnPluginAppBgTask : TestVpnPluginAppBgTaskT 26 | { 27 | }; 28 | } -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginApp/MainPage.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MainPage.g.h" 4 | 5 | namespace winrt::TestVpnPluginApp::implementation 6 | { 7 | struct MainPage : MainPageT 8 | { 9 | MainPage(); 10 | hstring PROFILE_NAME = L"CPP Test VPN Plugin Autoprofile"; 11 | 12 | winrt::Windows::Networking::Vpn::VpnManagementAgent VpnAgent() const 13 | { 14 | return m_VpnAgent; 15 | } 16 | 17 | Windows::Foundation::IAsyncAction CreateAppProfileOnClick(IInspectable, winrt::Windows::UI::Xaml::RoutedEventArgs); 18 | Windows::Foundation::IAsyncAction CreateProfileHandler(); 19 | Windows::Foundation::IAsyncAction MainPage::DeleteExistingProfile(hstring profileName); 20 | 21 | private: 22 | winrt::Windows::Networking::Vpn::VpnManagementAgent m_VpnAgent; 23 | }; 24 | } 25 | 26 | namespace winrt::TestVpnPluginApp::factory_implementation 27 | { 28 | struct MainPage : MainPageT 29 | { 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("TestVpnPluginApp")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("TestVpnPluginApp")] 12 | [assembly: AssemblyCopyright("Copyright © 2015")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Version information for an assembly consists of the following four values: 17 | // 18 | // Major Version 19 | // Minor Version 20 | // Build Number 21 | // Revision 22 | // 23 | // You can specify all the values or you can default the Build and Revision Numbers 24 | // by using the '*' as shown below: 25 | // [assembly: AssemblyVersion("1.0.*")] 26 | [assembly: AssemblyVersion("1.0.0.0")] 27 | [assembly: AssemblyFileVersion("1.0.0.0")] 28 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /CSharp/TestVpnPluginAppBg/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("TestVpnPluginAppBg")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("TestVpnPluginAppBg")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE 22 | -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/CredentialsDialog.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Runtime.InteropServices.WindowsRuntime; 6 | using Windows.Foundation; 7 | using Windows.Foundation.Collections; 8 | using Windows.UI.Xaml; 9 | using Windows.UI.Xaml.Controls; 10 | using Windows.UI.Xaml.Controls.Primitives; 11 | using Windows.UI.Xaml.Data; 12 | using Windows.UI.Xaml.Input; 13 | using Windows.UI.Xaml.Media; 14 | using Windows.UI.Xaml.Navigation; 15 | 16 | // The Content Dialog item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238 17 | 18 | namespace TestVpnPluginApp 19 | { 20 | public sealed partial class CredentialsDialog : ContentDialog 21 | { 22 | public ValueSet valueSet; 23 | public CredentialsDialog() 24 | { 25 | this.InitializeComponent(); 26 | valueSet = new ValueSet(); 27 | } 28 | 29 | 30 | private void Submit_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) 31 | { 32 | valueSet.Add("Username", Username.Text); 33 | valueSet.Add("Password", Password.Password); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /SimpleVpnServer/SimpleVpnServer.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30907.101 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleVpnServer", "SimpleVpnServer\SimpleVpnServer.csproj", "{13E7361B-E866-498E-9970-61E69946C470}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {13E7361B-E866-498E-9970-61E69946C470}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {13E7361B-E866-498E-9970-61E69946C470}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {13E7361B-E866-498E-9970-61E69946C470}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {13E7361B-E866-498E-9970-61E69946C470}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {E621FD01-E19F-4899-8548-B48A46B2746A} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginApp/readme.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | C++/WinRT TestVpnPluginApp Project Overview 3 | ======================================================================== 4 | 5 | This project demonstrates how to get started writing XAML apps directly 6 | with standard C++, using the C++/WinRT SDK component and XAML compiler 7 | support to generate implementation headers from interface (IDL) files. 8 | These headers can then be used to implement the local Windows Runtime 9 | classes referenced in the app's XAML pages. 10 | 11 | Steps: 12 | 1. Create an interface (IDL) file to define any local Windows Runtime 13 | classes referenced in the app's XAML pages. 14 | 2. Build the project once to generate implementation templates under 15 | the "Generated Files" folder, as well as skeleton class definitions 16 | under "Generated Files\sources". 17 | 3. Use the skeleton class definitions for reference to implement your 18 | Windows Runtime classes. 19 | 20 | ======================================================================== 21 | Learn more about C++/WinRT here: 22 | http://aka.ms/cppwinrt/ 23 | ======================================================================== 24 | -------------------------------------------------------------------------------- /SimpleUDPListener/SimpleUDPLIstener.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30804.86 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleUDPListener", "SimpleUDPListener\SimpleUDPListener.csproj", "{3B5B11A4-198F-4226-A21A-6630E566DB27}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {3B5B11A4-198F-4226-A21A-6630E566DB27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {3B5B11A4-198F-4226-A21A-6630E566DB27}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {3B5B11A4-198F-4226-A21A-6630E566DB27}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {3B5B11A4-198F-4226-A21A-6630E566DB27}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {8865CAEB-3C12-4B81-A420-F2293F8DFF28} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginAppBg/readme.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | C++/WinRT TestVpnPluginAppBg Project Overview 3 | ======================================================================== 4 | 5 | This project demonstrates how to get started authoring Windows Runtime 6 | classes directly with standard C++, using the C++/WinRT SDK component 7 | to generate implementation headers from interface (IDL) files. The 8 | generated Windows Runtime component binary and WinMD files should then 9 | be bundled with the Universal Windows Platform (UWP) app consuming them. 10 | 11 | Steps: 12 | 1. Create an interface (IDL) file to define your Windows Runtime class, 13 | its default interface, and any other interfaces it implements. 14 | 2. Build the project once to generate module.g.cpp, module.h.cpp, and 15 | implementation templates under the "Generated Files" folder, as 16 | well as skeleton class definitions under "Generated Files\sources". 17 | 3. Use the skeleton class definitions for reference to implement your 18 | Windows Runtime classes. 19 | 20 | ======================================================================== 21 | Learn more about C++/WinRT here: 22 | http://aka.ms/cppwinrt/ 23 | ======================================================================== 24 | -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginAppBg/BackgroundPacketWorker.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | using namespace std; 5 | using namespace winrt::Windows::Networking; 6 | using namespace winrt::Windows::Networking::Vpn; 7 | using namespace winrt::Windows::Networking::Sockets; 8 | 9 | using namespace winrt::Windows::Storage::Streams; 10 | 11 | 12 | struct VPN_PLUGIN_DECAP_STATE 13 | { 14 | uint8_t* currentPartialPacket; 15 | uint16_t packetHostOrderTotalLength; 16 | uint32_t currentSize; 17 | bool isV6; 18 | }; 19 | 20 | static void FinishWithCurrentPacket(winrt::Windows::Networking::Vpn::VpnChannel const& channel, VPN_PLUGIN_DECAP_STATE& state, uint8_t* buffer); 21 | 22 | static void ProcessPacketVersion(uint8_t* buffer, uint32_t length, VPN_PLUGIN_DECAP_STATE& state); 23 | static bool IsV6Packet(uint8_t* buffer); 24 | 25 | static VPN_CONTROL GetAndHandleControlByte(uint8_t* buffer); 26 | 27 | 28 | class BackgroundPacketWorker 29 | { 30 | public: 31 | std::queue q; 32 | std::shared_mutex m; 33 | bool isWorking; 34 | VPN_PLUGIN_DECAP_STATE gDecapState; 35 | 36 | void AddPacket(VpnPacketBuffer buff); 37 | void EncapPacketLambda(winrt::Windows::Networking::Vpn::VpnChannel const& channel); 38 | void TryStartConsumePacketsThread(bool encap, winrt::Windows::Networking::Vpn::VpnChannel const& channel); 39 | }; 40 | 41 | -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp/Properties/Default.rd.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginAppBg/pch.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include 16 | #include 17 | 18 | #include 19 | 20 | #include 21 | #include 22 | 23 | #include 24 | #include 25 | 26 | #include 27 | #include 28 | #include 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | #include 37 | #include 38 | 39 | #include 40 | #include 41 | #include 42 | #include 43 | 44 | #include 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /SimpleUDPListener/SimpleUDPListener/Client.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net; 3 | using System.Net.Sockets; 4 | using System.Text; 5 | 6 | namespace SampleServerClient 7 | { 8 | class Client 9 | { 10 | static void Main(string[] args) 11 | { 12 | bool done = false; 13 | int listenPort = 55600; 14 | using (UdpClient listener = new UdpClient(listenPort)) 15 | { 16 | IPEndPoint listenEndPoint = new IPEndPoint(IPAddress.Any, listenPort); 17 | while (!done) 18 | { 19 | byte[] receivedData = listener.Receive(ref listenEndPoint); 20 | string decodedData = Encoding.ASCII.GetString(receivedData); 21 | 22 | Console.WriteLine("Received broadcast message from client {0}", listenEndPoint.ToString()); 23 | 24 | Console.WriteLine("Decoded data is:"); 25 | Console.WriteLine(decodedData); 26 | 27 | if (decodedData.ToLower().Contains("done")) 28 | { 29 | done = true; 30 | receivedData = Encoding.ASCII.GetBytes("Closing socket: received payload containing done"); 31 | } 32 | 33 | //now we reply 34 | 35 | listener.Send(receivedData, receivedData.Length, listenEndPoint); 36 | Console.Write("Sent response to: {0}", listenEndPoint.ToString()); 37 | } 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginAppBg/NativeBuffer.h: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Copyright (c) 2019 Microsoft Corporation 4 | 5 | Module Name: 6 | 7 | NativeBuffer.h 8 | 9 | Abstract: 10 | 11 | Native buffer that's implements IBuffer and does not perform an alloc. 12 | 13 | --*/ 14 | 15 | #include "pch.h" 16 | 17 | using namespace winrt::Windows::Storage::Streams; 18 | 19 | namespace winrt::TestVpnPluginAppBg::implementation 20 | { 21 | struct __declspec(uuid("905a0fef-bc53-11df-8c49-001e4fc686da")) IBufferByteAccess : ::IUnknown 22 | { 23 | virtual HRESULT __stdcall Buffer(void** value) = 0; 24 | }; 25 | 26 | struct NativeBuffer : implements 27 | { 28 | unsigned char* m_pointer; 29 | uint32_t m_length{}; 30 | uint32_t m_capacity{}; 31 | 32 | NativeBuffer(unsigned char* pointer, uint32_t capacity) : 33 | m_pointer(pointer), m_capacity(capacity) 34 | { 35 | } 36 | 37 | uint32_t Capacity() const 38 | { 39 | return m_capacity; 40 | } 41 | 42 | uint32_t Length() const 43 | { 44 | return m_length; 45 | } 46 | 47 | void Length(uint32_t value) 48 | { 49 | if (value > m_capacity) 50 | { 51 | throw hresult_invalid_argument(); 52 | } 53 | 54 | m_length = value; 55 | } 56 | 57 | HRESULT __stdcall Buffer(void** value) final 58 | { 59 | *value = m_pointer; 60 | return S_OK; 61 | } 62 | }; 63 | } 64 | -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginAppBg/TestVpnPluginAppBg.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | accd3aa8-1ba0-4223-9bbe-0c431709210b 6 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tga;tiff;tif;png;wav;mfcribbon-ms 7 | 8 | 9 | {926ab91d-31b4-48c3-b9a4-e681349f27f0} 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /CSharp/TestVpnPluginApp.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30711.63 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestVpnPluginApp", "TestVpnPluginApp\TestVpnPluginApp.csproj", "{67E7B63A-9255-431F-8B33-1703069E2C39}" 7 | ProjectSection(ProjectDependencies) = postProject 8 | {78E031DB-E1B6-4F11-816F-E43C24B01BD4} = {78E031DB-E1B6-4F11-816F-E43C24B01BD4} 9 | EndProjectSection 10 | EndProject 11 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestVpnPluginAppBg", "TestVpnPluginAppBg\TestVpnPluginAppBg.csproj", "{78E031DB-E1B6-4F11-816F-E43C24B01BD4}" 12 | EndProject 13 | Global 14 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 15 | Debug|x64 = Debug|x64 16 | Release|x64 = Release|x64 17 | EndGlobalSection 18 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 19 | {67E7B63A-9255-431F-8B33-1703069E2C39}.Debug|x64.ActiveCfg = Debug|x64 20 | {67E7B63A-9255-431F-8B33-1703069E2C39}.Debug|x64.Build.0 = Debug|x64 21 | {67E7B63A-9255-431F-8B33-1703069E2C39}.Debug|x64.Deploy.0 = Debug|x64 22 | {67E7B63A-9255-431F-8B33-1703069E2C39}.Release|x64.ActiveCfg = Release|x64 23 | {67E7B63A-9255-431F-8B33-1703069E2C39}.Release|x64.Build.0 = Release|x64 24 | {67E7B63A-9255-431F-8B33-1703069E2C39}.Release|x64.Deploy.0 = Release|x64 25 | {78E031DB-E1B6-4F11-816F-E43C24B01BD4}.Debug|x64.ActiveCfg = Debug|x64 26 | {78E031DB-E1B6-4F11-816F-E43C24B01BD4}.Debug|x64.Build.0 = Debug|x64 27 | {78E031DB-E1B6-4F11-816F-E43C24B01BD4}.Release|x64.ActiveCfg = Release|x64 28 | {78E031DB-E1B6-4F11-816F-E43C24B01BD4}.Release|x64.Build.0 = Release|x64 29 | EndGlobalSection 30 | GlobalSection(SolutionProperties) = preSolution 31 | HideSolutionNode = FALSE 32 | EndGlobalSection 33 | GlobalSection(ExtensibilityGlobals) = postSolution 34 | SolutionGuid = {883210F9-51D2-4BEC-A671-DB8BD9B60111} 35 | EndGlobalSection 36 | EndGlobal 37 | -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginApp/TestVpnPluginApp.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | Assets 25 | 26 | 27 | Assets 28 | 29 | 30 | Assets 31 | 32 | 33 | Assets 34 | 35 | 36 | Assets 37 | 38 | 39 | Assets 40 | 41 | 42 | Assets 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | {e48dc53e-40b1-40cb-970a-f89935452892} 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /CppWinRT/TestVpnPluginApp/MainPage.xaml: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | Vpn Test Plugin 16 | 17 | 18 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 42 | 43 | 44 |