|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
|
|
<ItemGroup Label="ProjectConfigurations">
|
|
|
|
<ProjectConfiguration Include="Debug|Win32">
|
|
|
|
<Configuration>Debug</Configuration>
|
|
|
|
<Platform>Win32</Platform>
|
|
|
|
</ProjectConfiguration>
|
|
|
|
<ProjectConfiguration Include="Release|Win32">
|
|
|
|
<Configuration>Release</Configuration>
|
|
|
|
<Platform>Win32</Platform>
|
|
|
|
</ProjectConfiguration>
|
|
|
|
<ProjectConfiguration Include="Debug|x64">
|
|
|
|
<Configuration>Debug</Configuration>
|
|
|
|
<Platform>x64</Platform>
|
|
|
|
</ProjectConfiguration>
|
|
|
|
<ProjectConfiguration Include="Release|x64">
|
|
|
|
<Configuration>Release</Configuration>
|
|
|
|
<Platform>x64</Platform>
|
|
|
|
</ProjectConfiguration>
|
|
|
|
</ItemGroup>
|
|
|
|
<PropertyGroup Label="Globals">
|
|
|
|
<VCProjectVersion>16.0</VCProjectVersion>
|
|
|
|
<ProjectGuid>{028B1211-5625-48F7-B2D7-98C2F1994A70}</ProjectGuid>
|
|
|
|
<Keyword>Win32Proj</Keyword>
|
|
|
|
</PropertyGroup>
|
|
|
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
|
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
|
|
|
<ConfigurationType>Application</ConfigurationType>
|
|
|
|
<UseDebugLibraries>true</UseDebugLibraries>
|
|
|
|
<PlatformToolset>v142</PlatformToolset>
|
|
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
|
|
|
<ConfigurationType>Application</ConfigurationType>
|
|
|
|
<UseDebugLibraries>false</UseDebugLibraries>
|
|
|
|
<PlatformToolset>v142</PlatformToolset>
|
|
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
|
|
|
<ConfigurationType>Application</ConfigurationType>
|
|
|
|
<UseDebugLibraries>true</UseDebugLibraries>
|
|
|
|
<PlatformToolset>v142</PlatformToolset>
|
|
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
|
|
|
<ConfigurationType>Application</ConfigurationType>
|
|
|
|
<UseDebugLibraries>false</UseDebugLibraries>
|
|
|
|
<PlatformToolset>v142</PlatformToolset>
|
|
|
|
</PropertyGroup>
|
|
|
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
|
|
<ImportGroup Label="ExtensionSettings">
|
|
|
|
</ImportGroup>
|
|
|
|
<ImportGroup Label="Shared">
|
|
|
|
</ImportGroup>
|
|
|
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
|
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
|
|
</ImportGroup>
|
|
|
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
|
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
|
|
</ImportGroup>
|
|
|
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
|
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
|
|
</ImportGroup>
|
|
|
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
|
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
|
|
</ImportGroup>
|
|
|
|
<PropertyGroup Label="UserMacros" />
|
|
|
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
|
|
<LinkIncremental>true</LinkIncremental>
|
|
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
|
|
<LinkIncremental>true</LinkIncremental>
|
|
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
|
|
<GenerateManifest>false</GenerateManifest>
|
|
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
|
|
<GenerateManifest>false</GenerateManifest>
|
|
|
|
</PropertyGroup>
|
|
|
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
|
|
<ClCompile>
|
|
|
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
|
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
|
|
|
<WarningLevel>Level3</WarningLevel>
|
|
|
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
|
|
|
<Optimization>Disabled</Optimization>
|
|
|
|
</ClCompile>
|
|
|
|
<Link>
|
|
|
|
<TargetMachine>MachineX86</TargetMachine>
|
|
|
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
|
|
<SubSystem>Windows</SubSystem>
|
|
|
|
</Link>
|
|
|
|
</ItemDefinitionGroup>
|
|
|
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
|
|
<ClCompile>
|
|
|
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
|
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
|
|
|
<WarningLevel>Level3</WarningLevel>
|
|
|
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
|
|
|
</ClCompile>
|
|
|
|
<Link>
|
|
|
|
<TargetMachine>MachineX86</TargetMachine>
|
|
|
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
|
|
<SubSystem>Windows</SubSystem>
|
|
|
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
|
|
<OptimizeReferences>true</OptimizeReferences>
|
|
|
|
</Link>
|
|
|
|
</ItemDefinitionGroup>
|
|
|
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
|
|
<ClCompile>
|
|
|
|
<PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;UNICODE;_UNICODE;_INC_MATH;_CRT_NON_CONFORMING_WCSTOK;HAVE_CONFIG_H</PreprocessorDefinitions>
|
|
|
|
<UndefinePreprocessorDefinitions>
|
|
|
|
</UndefinePreprocessorDefinitions>
|
|
|
|
<AdditionalIncludeDirectories>$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
|
|
</ClCompile>
|
|
|
|
<ResourceCompile>
|
|
|
|
<AdditionalIncludeDirectories>$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
|
|
<SuppressStartupBanner>false</SuppressStartupBanner>
|
|
|
|
<ResourceOutputFileName>openvpn-gui-res.rc</ResourceOutputFileName>
|
|
|
|
<PreprocessorDefinitions>HAVE_CONFIG_H;_MSC_VER</PreprocessorDefinitions>
|
|
|
|
</ResourceCompile>
|
|
|
|
<Link>
|
|
|
|
<AdditionalDependencies>Netapi32.lib;Wtsapi32.lib;Comctl32.lib;Secur32.lib;Ws2_32.lib;Crypt32.lib;Shlwapi.lib;Winhttp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
|
|
</Link>
|
|
|
|
<PreBuildEvent>
|
|
|
|
<Command>copy config-msvc.h config.h</Command>
|
|
|
|
</PreBuildEvent>
|
|
|
|
</ItemDefinitionGroup>
|
|
|
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
|
|
<PreBuildEvent>
|
|
|
|
<Command>copy config-msvc.h config.h</Command>
|
|
|
|
</PreBuildEvent>
|
|
|
|
<ClCompile>
|
|
|
|
<AdditionalIncludeDirectories>$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
|
|
<PreprocessorDefinitions>_INC_MATH;WIN32_LEAN_AND_MEAN;UNICODE;_UNICODE;_CRT_NON_CONFORMING_WCSTOK;HAVE_CONFIG_H</PreprocessorDefinitions>
|
|
|
|
</ClCompile>
|
|
|
|
<Link>
|
|
|
|
<AdditionalDependencies>Netapi32.lib;Wtsapi32.lib;Comctl32.lib;Secur32.lib;Ws2_32.lib;Crypt32.lib;Shlwapi.lib;Winhttp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
|
|
</Link>
|
|
|
|
</ItemDefinitionGroup>
|
|
|
|
<ItemGroup>
|
|
|
|
<ClCompile Include="access.c" />
|
Parse and display messages received by echo msg commands
Process four new echo commands to construct messages to be
displayed to the user:
echo msg message-text
echo msg-n message-text
echo msg-window message-title
echo msg-notify message-title
Note: All rules of push and echo processing apply and determine
what is received as echo commands by the GUI. In addition,
'url-encoded' characters (% followed by two hex digits) are
decoded and displayed.
The message is constructed in the GUI by concatenating the text
specified in one or more "echo msg text" or "echo msg-n text"
commands. In case of "echo msg text" text is appended with a new
line. An empty text in this case will
just add a new line.
The message ends and gets displayed when one of the following
are receieved:
echo msg-window title
echo msg-notify title
where "title" becomes the title of the message window. In case of
msg-window, a modeless window shows the message, in the latter case
a notification balloon is shown.
Example: when pushed from the server:
push "echo msg I say let the world go to hell%2C"
push "echo msg I must have my cup of tea."
push "echo msg-window Notes from the underground"
will display a modeless window with title
"Notes from the underground" and a two line body
--
I say let the world go to hell,
I must have my cup of tea.
--
Note that the message itself is not quoted in the above examples
and so it relies on the server's option-parser combining
individual words into a space separated string. Number of words
on a line is limited by the maximum number of parameters allowed
in openvpn commands (16). This limitation may be avoided by quoting
the text that follows so that the option parser sees it as one
parameter.
The comma character is not allowed in pushed strings, so
it has to be sent encoded as %2C as shown above.
Such encoding of arbitrary bytes is suppored. For example,
newlines may be embedded as %0A, though discouraged. Instead
use multiple "echo msg" commands to separate lines by new line.
An example with embedded spaces and multiple lines concatenated
without a new line in between (note use of single quotes):
push "echo msg-n I swear to you gentlemen%2C that to be"
push "echo msg-n ' overly conscious is a sickness%2C ' "
push "echo msg-n a real%2C thorough sickness."
push "echo msg-notify Quote of the Day"
will show up as a notification that displays for an
OS-dependent interval as:
--
Quote of the Day
I swear to you gentlemen, that to be overly conscious
is a sickness, a real, thorough sickness.
--
where the location of the line break is automatically determined
by the notification API and is OS version-dependent.
Commands like "echo msg ..." in the config file are also
processed the same way. It gets displayed when the GUI connects
to the management interface and receives all pending echo.
Pushed message(s) get displayed when the client daemon
processes push-reply and passes on echo directives to the
GUI.
TODO: The actual window that displays the messages is
implemented in the next commit.
Signed-off-by: Selva Nair <selva.nair@gmail.com>
7 years ago
|
|
|
<ClCompile Include="echo.c" />
|
|
|
|
<ClCompile Include="env_set.c" />
|
|
|
|
<ClCompile Include="localization.c" />
|
|
|
|
<ClCompile Include="main.c" />
|
|
|
|
<ClCompile Include="manage.c" />
|
|
|
|
<ClCompile Include="misc.c" />
|
|
|
|
<ClCompile Include="openvpn.c" />
|
|
|
|
<ClCompile Include="openvpn_config.c" />
|
|
|
|
<ClCompile Include="options.c" />
|
|
|
|
<ClCompile Include="passphrase.c" />
|
|
|
|
<ClCompile Include="proxy.c" />
|
|
|
|
<ClCompile Include="registry.c" />
|
|
|
|
<ClCompile Include="save_pass.c" />
|
|
|
|
<ClCompile Include="scripts.c" />
|
|
|
|
<ClCompile Include="service.c" />
|
|
|
|
<ClCompile Include="tray.c" />
|
|
|
|
<ClCompile Include="viewlog.c" />
|
|
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
|
|
<ClInclude Include="access.h" />
|
|
|
|
<ClInclude Include="chartable.h" />
|
|
|
|
<ClInclude Include="config-msvc.h" />
|
Parse and display messages received by echo msg commands
Process four new echo commands to construct messages to be
displayed to the user:
echo msg message-text
echo msg-n message-text
echo msg-window message-title
echo msg-notify message-title
Note: All rules of push and echo processing apply and determine
what is received as echo commands by the GUI. In addition,
'url-encoded' characters (% followed by two hex digits) are
decoded and displayed.
The message is constructed in the GUI by concatenating the text
specified in one or more "echo msg text" or "echo msg-n text"
commands. In case of "echo msg text" text is appended with a new
line. An empty text in this case will
just add a new line.
The message ends and gets displayed when one of the following
are receieved:
echo msg-window title
echo msg-notify title
where "title" becomes the title of the message window. In case of
msg-window, a modeless window shows the message, in the latter case
a notification balloon is shown.
Example: when pushed from the server:
push "echo msg I say let the world go to hell%2C"
push "echo msg I must have my cup of tea."
push "echo msg-window Notes from the underground"
will display a modeless window with title
"Notes from the underground" and a two line body
--
I say let the world go to hell,
I must have my cup of tea.
--
Note that the message itself is not quoted in the above examples
and so it relies on the server's option-parser combining
individual words into a space separated string. Number of words
on a line is limited by the maximum number of parameters allowed
in openvpn commands (16). This limitation may be avoided by quoting
the text that follows so that the option parser sees it as one
parameter.
The comma character is not allowed in pushed strings, so
it has to be sent encoded as %2C as shown above.
Such encoding of arbitrary bytes is suppored. For example,
newlines may be embedded as %0A, though discouraged. Instead
use multiple "echo msg" commands to separate lines by new line.
An example with embedded spaces and multiple lines concatenated
without a new line in between (note use of single quotes):
push "echo msg-n I swear to you gentlemen%2C that to be"
push "echo msg-n ' overly conscious is a sickness%2C ' "
push "echo msg-n a real%2C thorough sickness."
push "echo msg-notify Quote of the Day"
will show up as a notification that displays for an
OS-dependent interval as:
--
Quote of the Day
I swear to you gentlemen, that to be overly conscious
is a sickness, a real, thorough sickness.
--
where the location of the line break is automatically determined
by the notification API and is OS version-dependent.
Commands like "echo msg ..." in the config file are also
processed the same way. It gets displayed when the GUI connects
to the management interface and receives all pending echo.
Pushed message(s) get displayed when the client daemon
processes push-reply and passes on echo directives to the
GUI.
TODO: The actual window that displays the messages is
implemented in the next commit.
Signed-off-by: Selva Nair <selva.nair@gmail.com>
7 years ago
|
|
|
<ClInclude Include="echo.h" />
|
|
|
|
<ClInclude Include="env_set.h" />
|
|
|
|
<ClInclude Include="localization.h" />
|
|
|
|
<ClInclude Include="main.h" />
|
|
|
|
<ClInclude Include="manage.h" />
|
|
|
|
<ClInclude Include="misc.h" />
|
|
|
|
<ClInclude Include="openvpn-gui-res.h" />
|
|
|
|
<ClInclude Include="openvpn.h" />
|
|
|
|
<ClInclude Include="openvpn_config.h" />
|
|
|
|
<ClInclude Include="options.h" />
|
|
|
|
<ClInclude Include="passphrase.h" />
|
|
|
|
<ClInclude Include="proxy.h" />
|
|
|
|
<ClInclude Include="registry.h" />
|
|
|
|
<ClInclude Include="save_pass.h" />
|
|
|
|
<ClInclude Include="scripts.h" />
|
|
|
|
<ClInclude Include="service.h" />
|
|
|
|
<ClInclude Include="tray.h" />
|
|
|
|
<ClInclude Include="viewlog.h" />
|
|
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
|
|
<ResourceCompile Include="res\openvpn-gui-res.rc" />
|
|
|
|
</ItemGroup>
|
|
|
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
|
|
<ImportGroup Label="ExtensionTargets">
|
|
|
|
</ImportGroup>
|
|
|
|
</Project>
|