diff --git a/SafeExamBrowser.Configuration.Contracts/Settings/NetworkSettings.cs b/SafeExamBrowser.Configuration.Contracts/Settings/NetworkSettings.cs
index 6ff7cbfa..0b8b3691 100644
--- a/SafeExamBrowser.Configuration.Contracts/Settings/NetworkSettings.cs
+++ b/SafeExamBrowser.Configuration.Contracts/Settings/NetworkSettings.cs
@@ -21,12 +21,12 @@ namespace SafeExamBrowser.Configuration.Contracts.Settings
///
/// Defines whether all content requests for a web page should be filtered according to the defined .
///
- public bool EnableContentRequestFilter { get; set; }
+ public bool FilterContentRequests { get; set; }
///
/// Defines whether the main request for a web page should be filtered according to the defined .
///
- public bool EnableMainRequestFilter { get; set; }
+ public bool FilterMainRequests { get; set; }
///
/// Defines all rules to be used to filter network requests.
diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.Network.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.Network.cs
index 2f271044..b9a4ab01 100644
--- a/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.Network.cs
+++ b/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.Network.cs
@@ -16,17 +16,17 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
{
private void MapEnableContentRequestFilter(Settings settings, object value)
{
- if (value is bool enable)
+ if (value is bool filter)
{
- settings.Network.EnableContentRequestFilter = enable;
+ settings.Network.FilterContentRequests = filter;
}
}
private void MapEnableMainRequestFilter(Settings settings, object value)
{
- if (value is bool enable)
+ if (value is bool filter)
{
- settings.Network.EnableMainRequestFilter = enable;
+ settings.Network.FilterMainRequests = filter;
}
}
diff --git a/SafeExamBrowser.Network/Filter/RequestFilter.cs b/SafeExamBrowser.Network/Filter/RequestFilter.cs
new file mode 100644
index 00000000..198cad30
--- /dev/null
+++ b/SafeExamBrowser.Network/Filter/RequestFilter.cs
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET)
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+using System;
+using SafeExamBrowser.Network.Contracts;
+using SafeExamBrowser.Network.Contracts.Filter;
+
+namespace SafeExamBrowser.Network.Filter
+{
+ public class RequestFilter : IRequestFilter
+ {
+ public FilterResult Default { private get; set; }
+
+ public void Load(FilterRule rule)
+ {
+ throw new NotImplementedException();
+ }
+
+ public FilterResult Process(Request request)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/SafeExamBrowser.Network/Properties/AssemblyInfo.cs b/SafeExamBrowser.Network/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..9f98c533
--- /dev/null
+++ b/SafeExamBrowser.Network/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("SafeExamBrowser.Network")]
+[assembly: AssemblyDescription("Safe Exam Browser")]
+[assembly: AssemblyCompany("ETH Zürich")]
+[assembly: AssemblyProduct("SafeExamBrowser.Network")]
+[assembly: AssemblyCopyright("Copyright © 2019 ETH Zürich, Educational Development and Technology (LET)")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("2da8f505-51be-48c8-b32b-5e753e936dec")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyInformationalVersion("1.0.0.0")]
diff --git a/SafeExamBrowser.Network/SafeExamBrowser.Network.csproj b/SafeExamBrowser.Network/SafeExamBrowser.Network.csproj
new file mode 100644
index 00000000..443b5021
--- /dev/null
+++ b/SafeExamBrowser.Network/SafeExamBrowser.Network.csproj
@@ -0,0 +1,67 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {2DA8F505-51BE-48C8-B32B-5E753E936DEC}
+ Library
+ Properties
+ SafeExamBrowser.Network
+ SafeExamBrowser.Network
+ v4.7.2
+ 512
+ true
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+ true
+ bin\x86\Debug\
+ DEBUG;TRACE
+ full
+ x86
+ prompt
+ MinimumRecommendedRules.ruleset
+
+
+ bin\x86\Release\
+ TRACE
+ true
+ pdbonly
+ x86
+ prompt
+ MinimumRecommendedRules.ruleset
+
+
+
+
+
+
+
+
+
+
+
+
+ {2947da3c-61f3-44be-81cf-d1d5c10aec95}
+ SafeExamBrowser.Network.Contracts
+
+
+
+
\ No newline at end of file
diff --git a/SafeExamBrowser.sln b/SafeExamBrowser.sln
index a23aeab4..05febaff 100644
--- a/SafeExamBrowser.sln
+++ b/SafeExamBrowser.sln
@@ -104,6 +104,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SafeExamBrowser.UserInterfa
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SafeExamBrowser.WindowsApi.Contracts", "SafeExamBrowser.WindowsApi.Contracts\SafeExamBrowser.WindowsApi.Contracts.csproj", "{7016F080-9AA5-41B2-A225-385AD877C171}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SafeExamBrowser.Network", "SafeExamBrowser.Network\SafeExamBrowser.Network.csproj", "{2DA8F505-51BE-48C8-B32B-5E753E936DEC}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -466,6 +468,14 @@ Global
{7016F080-9AA5-41B2-A225-385AD877C171}.Release|Any CPU.Build.0 = Release|Any CPU
{7016F080-9AA5-41B2-A225-385AD877C171}.Release|x86.ActiveCfg = Release|x86
{7016F080-9AA5-41B2-A225-385AD877C171}.Release|x86.Build.0 = Release|x86
+ {2DA8F505-51BE-48C8-B32B-5E753E936DEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2DA8F505-51BE-48C8-B32B-5E753E936DEC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2DA8F505-51BE-48C8-B32B-5E753E936DEC}.Debug|x86.ActiveCfg = Debug|x86
+ {2DA8F505-51BE-48C8-B32B-5E753E936DEC}.Debug|x86.Build.0 = Debug|x86
+ {2DA8F505-51BE-48C8-B32B-5E753E936DEC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2DA8F505-51BE-48C8-B32B-5E753E936DEC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2DA8F505-51BE-48C8-B32B-5E753E936DEC}.Release|x86.ActiveCfg = Release|x86
+ {2DA8F505-51BE-48C8-B32B-5E753E936DEC}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE