diff --git a/.github/README.md b/.github/README.md
index 078994afe..f75bf4e19 100644
--- a/.github/README.md
+++ b/.github/README.md
@@ -2,8 +2,8 @@
FilterLists is the independent, comprehensive directory of filter and host lists for advertisements, trackers, malware, and annoyances.
-
-
+
+

diff --git a/FilterLists.sln.DotSettings b/FilterLists.sln.DotSettings
index 7309602f7..8e4e1b2cb 100644
--- a/FilterLists.sln.DotSettings
+++ b/FilterLists.sln.DotSettings
@@ -11,193 +11,7 @@
False
CHOP_IF_LONG
ALIGN_ALL
- <?xml version="1.0" encoding="utf-16"?>
-<Patterns xmlns="urn:schemas-jetbrains-com:member-reordering-patterns">
- <TypePattern DisplayName="Non-reorderable types">
- <TypePattern.Match>
- <Or>
- <And>
- <Kind Is="Interface" />
- <Or>
- <HasAttribute Name="System.Runtime.InteropServices.InterfaceTypeAttribute" />
- <HasAttribute Name="System.Runtime.InteropServices.ComImport" />
- </Or>
- </And>
- <Kind Is="Struct" />
- <HasAttribute Name="JetBrains.Annotations.NoReorderAttribute" />
- <HasAttribute Name="JetBrains.Annotations.NoReorder" />
- </Or>
- </TypePattern.Match>
- </TypePattern>
- <TypePattern DisplayName="xUnit.net Test Classes" RemoveRegions="All">
- <TypePattern.Match>
- <And>
- <Kind Is="Class" />
- <HasMember>
- <And>
- <Kind Is="Method" />
- <HasAttribute Name="Xunit.FactAttribute" Inherited="True" />
- </And>
- </HasMember>
- </And>
- </TypePattern.Match>
- <Entry DisplayName="Setup/Teardown Methods">
- <Entry.Match>
- <Or>
- <Kind Is="Constructor" />
- <And>
- <Kind Is="Method" />
- <ImplementsInterface Name="System.IDisposable" />
- </And>
- </Or>
- </Entry.Match>
- <Entry.SortBy>
- <Kind Order="Constructor" />
- </Entry.SortBy>
- </Entry>
- <Entry DisplayName="All other members" />
- <Entry Priority="100" DisplayName="Test Methods">
- <Entry.Match>
- <And>
- <Kind Is="Method" />
- <HasAttribute Name="Xunit.FactAttribute" />
- </And>
- </Entry.Match>
- <Entry.SortBy>
- <Name />
- </Entry.SortBy>
- </Entry>
- </TypePattern>
- <TypePattern DisplayName="NUnit Test Fixtures" RemoveRegions="All">
- <TypePattern.Match>
- <And>
- <Kind Is="Class" />
- <HasAttribute Name="NUnit.Framework.TestFixtureAttribute" Inherited="True" />
- </And>
- </TypePattern.Match>
- <Entry DisplayName="Setup/Teardown Methods">
- <Entry.Match>
- <And>
- <Kind Is="Method" />
- <Or>
- <HasAttribute Name="NUnit.Framework.SetUpAttribute" Inherited="True" />
- <HasAttribute Name="NUnit.Framework.TearDownAttribute" Inherited="True" />
- <HasAttribute Name="NUnit.Framework.FixtureSetUpAttribute" Inherited="True" />
- <HasAttribute Name="NUnit.Framework.FixtureTearDownAttribute" Inherited="True" />
- </Or>
- </And>
- </Entry.Match>
- </Entry>
- <Entry DisplayName="All other members" />
- <Entry Priority="100" DisplayName="Test Methods">
- <Entry.Match>
- <And>
- <Kind Is="Method" />
- <HasAttribute Name="NUnit.Framework.TestAttribute" />
- </And>
- </Entry.Match>
- <Entry.SortBy>
- <Name />
- </Entry.SortBy>
- </Entry>
- </TypePattern>
- <TypePattern DisplayName="Default Pattern">
- <Entry Priority="100" DisplayName="Public Delegates">
- <Entry.Match>
- <And>
- <Access Is="Public" />
- <Kind Is="Delegate" />
- </And>
- </Entry.Match>
- <Entry.SortBy>
- <Name />
- </Entry.SortBy>
- </Entry>
- <Entry Priority="100" DisplayName="Public Enums">
- <Entry.Match>
- <And>
- <Access Is="Public" />
- <Kind Is="Enum" />
- </And>
- </Entry.Match>
- <Entry.SortBy>
- <Name />
- </Entry.SortBy>
- </Entry>
- <Entry DisplayName="Static Fields and Constants">
- <Entry.Match>
- <Or>
- <Kind Is="Constant" />
- <And>
- <Kind Is="Field" />
- <Static />
- </And>
- </Or>
- </Entry.Match>
- <Entry.SortBy>
- <Kind Order="Constant Field" />
- </Entry.SortBy>
- </Entry>
- <Entry DisplayName="Fields">
- <Entry.Match>
- <And>
- <Kind Is="Field" />
- <Not>
- <Static />
- </Not>
- </And>
- </Entry.Match>
- <Entry.SortBy>
- <Readonly />
- <Access />
- </Entry.SortBy>
- </Entry>
- <Entry DisplayName="Constructors">
- <Entry.Match>
- <Kind Is="Constructor" />
- </Entry.Match>
- <Entry.SortBy>
- <Static />
- </Entry.SortBy>
- </Entry>
- <Entry DisplayName="Properties, Indexers">
- <Entry.Match>
- <Or>
- <Kind Is="Property" />
- <Kind Is="Indexer" />
- </Or>
- </Entry.Match>
- <Entry.SortBy>
- <Access />
- </Entry.SortBy>
- </Entry>
- <Entry Priority="100" DisplayName="Interface Implementations">
- <Entry.Match>
- <And>
- <Kind Is="Member" />
- <ImplementsInterface />
- </And>
- </Entry.Match>
- <Entry.SortBy>
- <ImplementsInterface Immediate="True" />
- </Entry.SortBy>
- </Entry>
- <Entry DisplayName="All other members" />
- <Entry DisplayName="Nested Types">
- <Entry.Match>
- <Kind Is="Type" />
- </Entry.Match>
- </Entry>
- </TypePattern>
-</Patterns>
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- True
- True
- True
- True
- True
+ False
True
True
- True
\ No newline at end of file
diff --git a/data/FilterList.json b/data/FilterList.json
index 2c0416652..fa45f31a9 100644
--- a/data/FilterList.json
+++ b/data/FilterList.json
@@ -7095,15 +7095,15 @@
},
{
"id": 670,
- "description": "A version of the Norwegian filter list for Little Snitch. It currently doesn't see much work done on it, as the maintainer does not have a Mac to test it with.",
+ "description": "A version of the Nordic filter list for Little Snitch. It currently doesn't see much work done on it, as the maintainer does not have a Mac to test it with.",
"donateUrl": "https://sproutsluckycorner.wordpress.com/2017/11/14/my-work-and-contact-resume/#donations",
"emailAddress": "imreeil42@gmail.com",
"homeUrl": "https://github.com/DandelionSprout/adfilt",
"issuesUrl": "https://github.com/DandelionSprout/adfilt/issues",
"licenseId": 10,
- "name": "Dandelion Sprout's Norwegian Filters for Tidier Websites (Little Snitch)",
+ "name": "Dandelion Sprout's Nordic Filters for Tidier Websites (Little Snitch)",
"syntaxId": 18,
- "updatedDate": "2018-09-30T04:23:50",
+ "updatedDate": "2019-05-02T00:00:00",
"viewUrl": "https://raw.githubusercontent.com/DandelionSprout/adfilt/master/NorwegianExperimentalList%20alternate%20versions/LittleSnitchNorwegianList.lsrules",
"viewUrlMirror1": "https://repo.or.cz/FilterMirrorRepo.git/blob_plain/refs/heads/master:/NorwegianExperimentalList%20alternate%20versions/LittleSnitchNorwegianList.lsrules",
"viewUrlMirror2": "https://gitlab.com/DandelionSprout/adfilt/raw/master/NorwegianExperimentalList%20alternate%20versions/LittleSnitchNorwegianList.lsrules"
@@ -16946,5 +16946,26 @@
"viewUrl": "https://raw.githubusercontent.com/DandelionSprout/adfilt/master/Anti-'Custom%20cursors'%20List.txt",
"viewUrlMirror1": "https://repo.or.cz/FilterMirrorRepo.git/blob_plain/refs/heads/master:/Anti-'Custom%20cursors'%20List.txt",
"viewUrlMirror2": "https://gitlab.com/DandelionSprout/adfilt/raw/master/Anti-'Custom%20cursors'%20List.txt"
+ },
+ {
+ "id": 1577,
+ "donateUrl": "https://opencollective.com/adnauseam",
+ "homeUrl": "https://github.com/dhowe/uAssets",
+ "issuesUrl": "https://github.com/dhowe/uAssets/issues",
+ "licenseId": 4,
+ "name": "AdNauseam Filters",
+ "syntaxId": 4,
+ "viewUrl": "https://raw.githubusercontent.com/dhowe/uAssets/master/filters/adnauseam.txt"
+ },
+ {
+ "id": 1578,
+ "description": "This is a long list of domains accociated with facebook taken from https://github.com/jmdugan/blocklists",
+ "descriptionSourceUrl": "https://raw.githubusercontent.com/fabianmoronzirfas/block-facebook/master/block-facebook.lsrules",
+ "homeUrl": "https://github.com/fabianmoronzirfas/block-facebook",
+ "issuesUrl": "https://github.com/fabianmoronzirfas/block-facebook/issues",
+ "licenseId": 28,
+ "name": "Little Snitch Block Facebook Rule Set",
+ "syntaxId": 18,
+ "viewUrl": "https://raw.githubusercontent.com/fabianmoronzirfas/block-facebook/master/block-facebook.lsrules"
}
]
diff --git a/data/FilterListLanguage.json b/data/FilterListLanguage.json
index 3b9dc5573..7e5cfb4a8 100644
--- a/data/FilterListLanguage.json
+++ b/data/FilterListLanguage.json
@@ -2126,5 +2126,9 @@
{
"filterListId": 1242,
"languageId": 167
+ },
+ {
+ "filterListId": 670,
+ "languageId": 106
}
]
diff --git a/data/FilterListTag.json b/data/FilterListTag.json
index 33cf010ec..2f8121a80 100644
--- a/data/FilterListTag.json
+++ b/data/FilterListTag.json
@@ -6722,5 +6722,17 @@
{
"filterListId": 1576,
"tagId": 27
+ },
+ {
+ "filterListId": 1577,
+ "tagId": 2
+ },
+ {
+ "filterListId": 1577,
+ "tagId": 10
+ },
+ {
+ "filterListId": 1578,
+ "tagId": 19
}
]
diff --git a/data/README.md b/data/README.md
index 0a5263d62..21ff790fb 100644
--- a/data/README.md
+++ b/data/README.md
@@ -1,5 +1,29 @@
## Adding or Updating Lists
-To submit a new list or update data about an existing list, please submit a pull request to this directory in conjunction with the data model described [here](https://github.com/collinbarrett/FilterLists/wiki/Data-Model_sidebar). Alternatively, you can [open a new issue](https://github.com/collinbarrett/FilterLists/issues/new) providing information for all of the fields described in the [data model](https://github.com/collinbarrett/FilterLists/wiki/Data-Model_sidebar).
+To submit a new list or update data about an existing list, please submit a pull request to [data](https://github.com/collinbarrett/FilterLists/tree/master/data) in conjunction with the data model described [here](https://github.com/collinbarrett/FilterLists/wiki/Data-Model_sidebar). Alternatively, you can [open a new issue](https://github.com/collinbarrett/FilterLists/issues/new) providing information for all of the fields described in the [data model](https://github.com/collinbarrett/FilterLists/wiki/Data-Model_sidebar).
-*Note: We prefer not to re-use `Id`s. So, when submitting a PR, add any new lists, maintainers, etc. with the next incremental Id at the end of the list (rather than filling in a hole in the sequence that may have been left by a previously removed entity).
+## Building and Running Locally
+
+We have containerized FilterLists to make it as easy as possible for contributers to get the project up and running locally.
+
+### Up and Running
+
+1. Install Docker CE for your computer's operating system. [Docs](https://docs.docker.com/install/)
+2. Clone the FilterLists git repository to your computer. [Docs](https://help.github.com/en/articles/cloning-a-repository)
+3. Navigate to the root directory of your locally cloned FilterLists git repository in a command-line interface.
+4. Execute `docker-compose up`.
+5. Visit the locally running version of FilterLists in a web browser at `http://localhost/`.
+
+### Testing changes to the data (.json files)
+
+#### Automated
+
+Execute:
+
+`docker-compose -f docker-compose.data.tests.yml down -v && docker-compose -f docker-compose.data.tests.yml build api && docker-compose -f docker-compose.data.tests.yml run api`
+
+#### Manual
+
+1. Execute `docker container ls` to find the `CONTAINER ID` of the `filterlists.api` container.
+2. Execute `docker-compose up -d --build [CONTAINER ID]` replacing `[CONTAINER ID]` with the hash from step 1.
+3. Verify your changes are properly reflected at `http://localhost/`.
diff --git a/data/Software.json b/data/Software.json
index 9f0e9d27e..fe99957b8 100644
--- a/data/Software.json
+++ b/data/Software.json
@@ -200,5 +200,12 @@
"homeUrl": "https://github.com/AdguardTeam/AdGuardHome",
"isAbpSubscribable": false,
"name": "AdGuard Home"
+ },
+ {
+ "id": 32,
+ "downloadUrl": "https://adnauseam.io/",
+ "homeUrl": "https://adnauseam.io/",
+ "isAbpSubscribable": true,
+ "name": "AdNauseam"
}
-]
\ No newline at end of file
+]
diff --git a/data/SoftwareSyntax.json b/data/SoftwareSyntax.json
index 9bcfa6046..e04a29e49 100644
--- a/data/SoftwareSyntax.json
+++ b/data/SoftwareSyntax.json
@@ -51,6 +51,10 @@
"softwareId": 31,
"syntaxId": 1
},
+ {
+ "softwareId": 32,
+ "syntaxId": 1
+ },
{
"softwareId": 1,
"syntaxId": 2
@@ -91,6 +95,10 @@
"softwareId": 31,
"syntaxId": 2
},
+ {
+ "softwareId": 32,
+ "syntaxId": 2
+ },
{
"softwareId": 1,
"syntaxId": 3
@@ -115,6 +123,10 @@
"softwareId": 24,
"syntaxId": 3
},
+ {
+ "softwareId": 32,
+ "syntaxId": 3
+ },
{
"softwareId": 1,
"syntaxId": 4
@@ -127,6 +139,10 @@
"softwareId": 5,
"syntaxId": 4
},
+ {
+ "softwareId": 32,
+ "syntaxId": 4
+ },
{
"softwareId": 1,
"syntaxId": 6
@@ -139,6 +155,10 @@
"softwareId": 5,
"syntaxId": 6
},
+ {
+ "softwareId": 32,
+ "syntaxId": 6
+ },
{
"softwareId": 1,
"syntaxId": 7
@@ -151,6 +171,10 @@
"softwareId": 25,
"syntaxId": 7
},
+ {
+ "softwareId": 32,
+ "syntaxId": 7
+ },
{
"softwareId": 1,
"syntaxId": 8
@@ -159,6 +183,10 @@
"softwareId": 5,
"syntaxId": 8
},
+ {
+ "softwareId": 32,
+ "syntaxId": 8
+ },
{
"softwareId": 1,
"syntaxId": 9
@@ -183,6 +211,10 @@
"softwareId": 5,
"syntaxId": 12
},
+ {
+ "softwareId": 32,
+ "syntaxId": 9
+ },
{
"softwareId": 1,
"syntaxId": 13
@@ -195,6 +227,10 @@
"softwareId": 13,
"syntaxId": 13
},
+ {
+ "softwareId": 32,
+ "syntaxId": 13
+ },
{
"softwareId": 7,
"syntaxId": 14
@@ -231,6 +267,10 @@
"softwareId": 31,
"syntaxId": 16
},
+ {
+ "softwareId": 32,
+ "syntaxId": 16
+ },
{
"softwareId": 1,
"syntaxId": 17
@@ -251,6 +291,10 @@
"softwareId": 23,
"syntaxId": 20
},
+ {
+ "softwareId": 32,
+ "syntaxId": 17
+ },
{
"softwareId": 1,
"syntaxId": 21
@@ -259,6 +303,10 @@
"softwareId": 5,
"syntaxId": 21
},
+ {
+ "softwareId": 32,
+ "syntaxId": 21
+ },
{
"softwareId": 4,
"syntaxId": 22
@@ -310,5 +358,9 @@
{
"softwareId": 31,
"syntaxId": 28
+ },
+ {
+ "softwareId": 32,
+ "syntaxId": 28
}
-]
\ No newline at end of file
+]
diff --git a/src/FilterLists.Agent/FilterLists.Agent.csproj b/src/FilterLists.Agent/FilterLists.Agent.csproj
index f8e7dd8e9..6d8ea839d 100644
--- a/src/FilterLists.Agent/FilterLists.Agent.csproj
+++ b/src/FilterLists.Agent/FilterLists.Agent.csproj
@@ -18,8 +18,17 @@
false
+
+ FilterLists.Agent.ruleset
+
+
+
+ FilterLists.Agent.ruleset
+
+
+
diff --git a/src/FilterLists.Agent/FilterLists.Agent.ruleset b/src/FilterLists.Agent/FilterLists.Agent.ruleset
new file mode 100644
index 000000000..e4169cd7d
--- /dev/null
+++ b/src/FilterLists.Agent/FilterLists.Agent.ruleset
@@ -0,0 +1,74 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/FilterLists.Api/DependencyInjection/Extensions/ConfigureServicesCollection.cs b/src/FilterLists.Api/DependencyInjection/Extensions/ConfigureServicesCollection.cs
index 1388a2e83..c1caaa892 100644
--- a/src/FilterLists.Api/DependencyInjection/Extensions/ConfigureServicesCollection.cs
+++ b/src/FilterLists.Api/DependencyInjection/Extensions/ConfigureServicesCollection.cs
@@ -1,13 +1,9 @@
-using System;
-using System.IO;
-using Microsoft.ApplicationInsights.Extensibility.Implementation;
+using Microsoft.ApplicationInsights.Extensibility.Implementation;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Extensions.PlatformAbstractions;
using Newtonsoft.Json;
-using Swashbuckle.AspNetCore.Swagger;
namespace FilterLists.Api.DependencyInjection.Extensions
{
@@ -21,7 +17,6 @@ public static void AddFilterListsApi(this IServiceCollection services)
services.AddMvcCustom();
services.AddRoutingCustom();
services.AddApiVersioning();
- services.AddSwaggerGenCustom();
TelemetryDebugWriter.IsTracingDisabled = true;
}
@@ -43,35 +38,5 @@ private static void AddMvcCustom(this IServiceCollection services) =>
private static void AddRoutingCustom(this IServiceCollection services) =>
services.AddRouting(opts => opts.LowercaseUrls = true);
-
- private static void AddSwaggerGenCustom(this IServiceCollection services) =>
- services.AddSwaggerGen(opts =>
- {
- opts.SwaggerDoc("v1",
- new Info
- {
- Title = "FilterLists API",
- Version = "v1",
- Description =
- "An API for FilterLists, the independent, comprehensive directory of all public filter and hosts lists for advertisements, trackers, malware, and annoyances." +
- Environment.NewLine +
- "Home: https://filterlists.com" +
- Environment.NewLine +
- "Data Model Docs: https://github.com/collinbarrett/FilterLists/wiki/Data-Model_sidebar",
- Contact =
- new Contact
- {
- Url = "https://github.com/collinbarrett/FilterLists/",
- Name = "FilterLists - GitHub"
- },
- License = new License
- {
- Name = "MIT License",
- Url = "https://github.com/collinbarrett/FilterLists/blob/master/LICENSE"
- }
- });
- opts.IncludeXmlComments(Path.Combine(PlatformServices.Default.Application.ApplicationBasePath,
- "FilterLists.Api.xml"));
- });
}
}
\ No newline at end of file
diff --git a/src/FilterLists.Api/FilterLists.Api.csproj b/src/FilterLists.Api/FilterLists.Api.csproj
index a9246a9e1..e81d11986 100644
--- a/src/FilterLists.Api/FilterLists.Api.csproj
+++ b/src/FilterLists.Api/FilterLists.Api.csproj
@@ -22,6 +22,14 @@
..\..\docker-compose.dcproj
+
+ FilterLists.Api.ruleset
+
+
+
+ FilterLists.Api.ruleset
+
+
@@ -33,9 +41,9 @@
+
-
diff --git a/src/FilterLists.Api/FilterLists.Api.ruleset b/src/FilterLists.Api/FilterLists.Api.ruleset
new file mode 100644
index 000000000..e4169cd7d
--- /dev/null
+++ b/src/FilterLists.Api/FilterLists.Api.ruleset
@@ -0,0 +1,74 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/FilterLists.Api/Startup.cs b/src/FilterLists.Api/Startup.cs
index 70fa9e78f..b51d4ee76 100644
--- a/src/FilterLists.Api/Startup.cs
+++ b/src/FilterLists.Api/Startup.cs
@@ -1,5 +1,4 @@
-using System.Linq;
-using FilterLists.Api.DependencyInjection.Extensions;
+using FilterLists.Api.DependencyInjection.Extensions;
using FilterLists.Services.DependencyInjection.Extensions;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Builder;
@@ -7,7 +6,6 @@
using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
-using Swashbuckle.AspNetCore.Swagger;
namespace FilterLists.Api
{
@@ -30,48 +28,15 @@ public void ConfigureServices(IServiceCollection services)
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
- {
app.UseDeveloperExceptionPage();
- }
else
- {
app.UseExceptionHandler("/Error");
- app.UseHsts();
- }
-
app.UseForwardedHeaders(new ForwardedHeadersOptions
{
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
});
- app.UseHttpsRedirection();
app.UseStaticFiles();
- app.UseCookiePolicy();
app.UseMvc();
- app.UseSwagger(opts =>
- {
- opts.PreSerializeFilters.Add((swaggerDoc, httpReq) => swaggerDoc.Host = httpReq.Host.Value);
- //TODO: remove preprocessor directives
-#if RELEASE
- opts.PreSerializeFilters.Add((swaggerDoc, httpReq) => swaggerDoc.BasePath = "/api");
-#endif
- opts.RouteTemplate = "docs/{documentName}/swagger.json";
- UseLowercaseControllerNameInSwaggerHack(opts);
- });
- app.UseSwaggerUI(opts =>
- {
- opts.SwaggerEndpoint("v1/swagger.json", "FilterLists API v1");
- opts.DocumentTitle = "FilterLists API v1";
- opts.RoutePrefix = "docs";
- });
}
-
- //TODO: remove hack (https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/74#issuecomment-386762178)
- private static void UseLowercaseControllerNameInSwaggerHack(SwaggerOptions opts) =>
- opts.PreSerializeFilters.Add((document, request) =>
- {
- var paths = document.Paths.ToDictionary(item => item.Key.ToLowerInvariant(), item => item.Value);
- document.Paths.Clear();
- foreach (var pathItem in paths) document.Paths.Add(pathItem.Key, pathItem.Value);
- });
}
}
\ No newline at end of file
diff --git a/src/FilterLists.Api/V1/Controllers/BaseController.cs b/src/FilterLists.Api/V1/Controllers/BaseController.cs
index 2bcceb414..6cce28d1b 100644
--- a/src/FilterLists.Api/V1/Controllers/BaseController.cs
+++ b/src/FilterLists.Api/V1/Controllers/BaseController.cs
@@ -8,7 +8,6 @@
namespace FilterLists.Api.V1.Controllers
{
[ApiVersion("1.0")]
- //TODO: use versioning without needing to manually specify in swagger-ui (https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/370)
[Route("v{version:apiVersion}/[controller]")]
[ResponseCache(Duration = 86400)]
public abstract class BaseController : Controller
diff --git a/src/FilterLists.Data/FilterLists.Data.csproj b/src/FilterLists.Data/FilterLists.Data.csproj
index 6ddcd79c0..c541daf99 100644
--- a/src/FilterLists.Data/FilterLists.Data.csproj
+++ b/src/FilterLists.Data/FilterLists.Data.csproj
@@ -16,9 +16,18 @@
false
+
+ FilterLists.Data.ruleset
+
+
+
+ FilterLists.Data.ruleset
+
+
+
all
diff --git a/src/FilterLists.Data/FilterLists.Data.ruleset b/src/FilterLists.Data/FilterLists.Data.ruleset
new file mode 100644
index 000000000..e4169cd7d
--- /dev/null
+++ b/src/FilterLists.Data/FilterLists.Data.ruleset
@@ -0,0 +1,74 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/FilterLists.Data/FilterListsDesignTimeDbContextFactory.cs b/src/FilterLists.Data/FilterListsDesignTimeDbContextFactory.cs
deleted file mode 100644
index ee34cb2dd..000000000
--- a/src/FilterLists.Data/FilterListsDesignTimeDbContextFactory.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using System;
-using JetBrains.Annotations;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Design;
-
-namespace FilterLists.Data
-{
- //TODO: [BLOCKED] pass connection string https://github.com/aspnet/EntityFrameworkCore/issues/8332
- //[UsedImplicitly]
- //public class FilterListsDesignTimeDbContextFactory : IDesignTimeDbContextFactory
- //{
- // private readonly int commandTimeoutSecs = (int)TimeSpan.FromMinutes(30).TotalSeconds;
-
- // ///
- // /// increases command timeout for design time migrations
- // ///
- // public FilterListsDbContext CreateDbContext(string[] args)
- // {
- // var optionsBuilder = new DbContextOptionsBuilder();
- // optionsBuilder.UseMySql(
- // @"",
- // o =>
- // {
- // o.MigrationsAssembly("FilterLists.Api");
- // o.CommandTimeout(commandTimeoutSecs);
- // }
- // );
-
- // return new FilterListsDbContext(optionsBuilder.Options);
- // }
- //}
-}
\ No newline at end of file
diff --git a/src/FilterLists.Services/DependencyInjection/Extensions/ConfigureServicesCollection.cs b/src/FilterLists.Services/DependencyInjection/Extensions/ConfigureServicesCollection.cs
index f5db60192..456e14753 100644
--- a/src/FilterLists.Services/DependencyInjection/Extensions/ConfigureServicesCollection.cs
+++ b/src/FilterLists.Services/DependencyInjection/Extensions/ConfigureServicesCollection.cs
@@ -35,7 +35,7 @@ public static void AddFilterListsApiServices(this IServiceCollection services, I
services.TryAddScoped();
services.TryAddScoped();
services.TryAddScoped();
- services.AddAutoMapper();
+ services.AddAutoMapper(typeof(Service));
}
public static void AddFilterListsAgentServices(this IServiceCollection services, IConfiguration config)
@@ -48,7 +48,7 @@ public static void AddFilterListsAgentServices(this IServiceCollection services,
services.TryAddScoped();
services.TryAddScoped();
services.TryAddScoped();
- services.AddAutoMapper();
+ services.AddAutoMapper(typeof(Service));
}
}
}
\ No newline at end of file
diff --git a/src/FilterLists.Services/Extensions/StringExtensions.cs b/src/FilterLists.Services/Extensions/StringExtensions.cs
index bc7b7b885..d48d163d7 100644
--- a/src/FilterLists.Services/Extensions/StringExtensions.cs
+++ b/src/FilterLists.Services/Extensions/StringExtensions.cs
@@ -12,7 +12,7 @@ public static bool IsValidHttpOrHttpsUrl(this string source) =>
public static int GetNthIndexOfChar(this string s, int n, char t)
{
if (n < 1)
- throw new ArgumentOutOfRangeException();
+ throw new ArgumentOutOfRangeException($"n = {n}");
var nthIndexOfChar = s.TakeWhile(c => (n -= c == t ? 1 : 0) > 0).Count();
return nthIndexOfChar == s.Length ? -1 : nthIndexOfChar;
}
diff --git a/src/FilterLists.Services/FilterLists.Services.csproj b/src/FilterLists.Services/FilterLists.Services.csproj
index dbab4d666..f83bc86d4 100644
--- a/src/FilterLists.Services/FilterLists.Services.csproj
+++ b/src/FilterLists.Services/FilterLists.Services.csproj
@@ -16,11 +16,20 @@
false
+
+ FilterLists.Services.ruleset
+
+
+
+ FilterLists.Services.ruleset
+
+
+
diff --git a/src/FilterLists.Services/FilterLists.Services.ruleset b/src/FilterLists.Services/FilterLists.Services.ruleset
new file mode 100644
index 000000000..e4169cd7d
--- /dev/null
+++ b/src/FilterLists.Services/FilterLists.Services.ruleset
@@ -0,0 +1,74 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/FilterLists.Web/ClientApp/Layout.tsx b/src/FilterLists.Web/ClientApp/Layout.tsx
index c4516bb69..8024be1a7 100644
--- a/src/FilterLists.Web/ClientApp/Layout.tsx
+++ b/src/FilterLists.Web/ClientApp/Layout.tsx
@@ -45,8 +45,8 @@ const GitHubLink = () =>
;
const ApiLink = () =>
-
+
API
;
diff --git a/src/FilterLists.Web/ClientApp/modules/home/components/linkButtons/SubscribeButton.tsx b/src/FilterLists.Web/ClientApp/modules/home/components/linkButtons/SubscribeButton.tsx
index 15e0c462a..f7f3d4c1b 100644
--- a/src/FilterLists.Web/ClientApp/modules/home/components/linkButtons/SubscribeButton.tsx
+++ b/src/FilterLists.Web/ClientApp/modules/home/components/linkButtons/SubscribeButton.tsx
@@ -28,16 +28,25 @@ if (props.url.indexOf(".tpl") > 0)
{
href = `javascript:window.external.msAddTrackingProtectionList('${encodeURIComponent(props.url)}', '${hrefTitle}')`;
} else if (props.url.indexOf(".lsrules") > 0)
+{
+ href = `x-littlesnitch:subscribe-rules?url=${encodeURIComponent(props.url)}`;
+} else if (props.url.indexOf("?hostformat=littlesnitch") > 0)
{
href = `x-littlesnitch:subscribe-rules?url=${encodeURIComponent(props.url)}`;
} else {
href = `abp:subscribe?location=${encodeURIComponent(props.url)}&title=${hrefTitle}`;
};
+
+
+
let title;
if (props.url.indexOf(".tpl") > 0)
{
title = `${titlePrefix}Subscribe to ${props.name} with Internet Explorer's Tracking Protection List feature.`;
} else if (props.url.indexOf(".lsrules") > 0)
+{
+ title = `${titlePrefix}Subscribe to ${props.name} with Little Snitch's rule group subscription feature.`;
+} else if (props.url.indexOf("?hostformat=littlesnitch") > 0)
{
title = `${titlePrefix}Subscribe to ${props.name} with Little Snitch's rule group subscription feature.`;
} else {
diff --git a/src/FilterLists.Web/ClientApp/modules/home/components/softwareIcon/SoftwareIcon.tsx b/src/FilterLists.Web/ClientApp/modules/home/components/softwareIcon/SoftwareIcon.tsx
index a8e93655c..aea450f0a 100644
--- a/src/FilterLists.Web/ClientApp/modules/home/components/softwareIcon/SoftwareIcon.tsx
+++ b/src/FilterLists.Web/ClientApp/modules/home/components/softwareIcon/SoftwareIcon.tsx
@@ -29,7 +29,8 @@ import {
img28,
img29,
img30,
- img31
+ img31,
+ img32
} from "./imgs";
interface IProps {
@@ -80,4 +81,5 @@ const icons: { [id: number]: IIcon; } = {
29: { image: img29, imageTitle: "Unbound" },
30: { image: img30, imageTitle: "BIND" },
31: { image: img31, imageTitle: "AdGuard Home" },
+ 32: { image: img32, imageTitle: "AdNauseam" },
};
diff --git a/src/FilterLists.Web/ClientApp/modules/home/components/softwareIcon/imgs/32-AdNauseam.png b/src/FilterLists.Web/ClientApp/modules/home/components/softwareIcon/imgs/32-AdNauseam.png
new file mode 100644
index 000000000..773f3c556
Binary files /dev/null and b/src/FilterLists.Web/ClientApp/modules/home/components/softwareIcon/imgs/32-AdNauseam.png differ
diff --git a/src/FilterLists.Web/ClientApp/modules/home/components/softwareIcon/imgs/index.ts b/src/FilterLists.Web/ClientApp/modules/home/components/softwareIcon/imgs/index.ts
index c18daf10e..275a7c849 100644
--- a/src/FilterLists.Web/ClientApp/modules/home/components/softwareIcon/imgs/index.ts
+++ b/src/FilterLists.Web/ClientApp/modules/home/components/softwareIcon/imgs/index.ts
@@ -28,6 +28,7 @@ import img28 from "./28-personalDNSfilter.svg";
import img29 from "./29-Unbound.png";
import img30 from "./30-BIND.png";
import img31 from "./31-AdGuard-Home.png";
+import img32 from "./32-AdNauseam.png";
export {
img1,
@@ -59,5 +60,6 @@ export {
img28,
img29,
img30,
- img31
+ img31,
+ img32
};
diff --git a/src/FilterLists.Web/FilterLists.Web.csproj b/src/FilterLists.Web/FilterLists.Web.csproj
index 2a2a25d7b..0a1d6eed3 100644
--- a/src/FilterLists.Web/FilterLists.Web.csproj
+++ b/src/FilterLists.Web/FilterLists.Web.csproj
@@ -22,10 +22,19 @@
..\..\docker-compose.dcproj
+
+ FilterLists.Web.ruleset
+
+
+
+ FilterLists.Web.ruleset
+
+
+
diff --git a/src/FilterLists.Web/FilterLists.Web.ruleset b/src/FilterLists.Web/FilterLists.Web.ruleset
new file mode 100644
index 000000000..e4169cd7d
--- /dev/null
+++ b/src/FilterLists.Web/FilterLists.Web.ruleset
@@ -0,0 +1,74 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/FilterLists.Data.Tests/FilterLists.Data.Tests.csproj b/tests/FilterLists.Data.Tests/FilterLists.Data.Tests.csproj
index 761f6ffbc..696da93d7 100644
--- a/tests/FilterLists.Data.Tests/FilterLists.Data.Tests.csproj
+++ b/tests/FilterLists.Data.Tests/FilterLists.Data.Tests.csproj
@@ -16,7 +16,16 @@
https://github.com/collinbarrett/FilterLists
+
+ FilterLists.Data.Tests.ruleset
+
+
+
+ FilterLists.Data.Tests.ruleset
+
+
+
all
runtime; build; native; contentfiles; analyzers
diff --git a/tests/FilterLists.Data.Tests/FilterLists.Data.Tests.ruleset b/tests/FilterLists.Data.Tests/FilterLists.Data.Tests.ruleset
new file mode 100644
index 000000000..a3be703a8
--- /dev/null
+++ b/tests/FilterLists.Data.Tests/FilterLists.Data.Tests.ruleset
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/FilterLists.Services.Tests/FilterLists.Services.Tests.csproj b/tests/FilterLists.Services.Tests/FilterLists.Services.Tests.csproj
index 7b21e3c09..9a95dc0d1 100644
--- a/tests/FilterLists.Services.Tests/FilterLists.Services.Tests.csproj
+++ b/tests/FilterLists.Services.Tests/FilterLists.Services.Tests.csproj
@@ -16,7 +16,16 @@
https://github.com/collinbarrett/FilterLists
+
+ FilterLists.Services.Tests.ruleset
+
+
+
+ FilterLists.Services.Tests.ruleset
+
+
+
all
runtime; build; native; contentfiles; analyzers
diff --git a/tests/FilterLists.Services.Tests/FilterLists.Services.Tests.ruleset b/tests/FilterLists.Services.Tests/FilterLists.Services.Tests.ruleset
new file mode 100644
index 000000000..a3be703a8
--- /dev/null
+++ b/tests/FilterLists.Services.Tests/FilterLists.Services.Tests.ruleset
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file