mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
Add Diversion 5.0 dnsmasq configuration syntax support
- Add 3 new syntax types for dnsmasq configuration formats: - id 59: "dnsmasq address" for address= directives - id 60: "dnsmasq server" for server= directives - id 61: "dnsmasq local" for local= directives - Link both Diversion (id 22) and dnsmasq (id 23) to these new syntax types - Generate EF Core migration to apply database changes - All syntax types reference official dnsmasq documentation Co-authored-by: collinbarrett <6483057+collinbarrett@users.noreply.github.com>
This commit is contained in:
parent
0b0ff0bc1a
commit
6a27455f05
5 changed files with 91128 additions and 0 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,88 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
||||
|
||||
namespace FilterLists.Directory.Infrastructure.Migrations.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddDiversionDnsmasqSyntaxSupport : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.InsertData(
|
||||
table: "Syntax",
|
||||
columns: new[] { "Id", "Description", "Name", "Url" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ (short)59, null, "dnsmasq address", "http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html" },
|
||||
{ (short)60, null, "dnsmasq server", "http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html" },
|
||||
{ (short)61, null, "dnsmasq local", "http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html" }
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "SoftwareSyntax",
|
||||
columns: new[] { "SoftwareId", "SyntaxId" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ (short)22, (short)59 },
|
||||
{ (short)22, (short)60 },
|
||||
{ (short)22, (short)61 },
|
||||
{ (short)23, (short)59 },
|
||||
{ (short)23, (short)60 },
|
||||
{ (short)23, (short)61 }
|
||||
});
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SoftwareSyntax",
|
||||
keyColumns: new[] { "SoftwareId", "SyntaxId" },
|
||||
keyValues: new object[] { (short)22, (short)59 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SoftwareSyntax",
|
||||
keyColumns: new[] { "SoftwareId", "SyntaxId" },
|
||||
keyValues: new object[] { (short)22, (short)60 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SoftwareSyntax",
|
||||
keyColumns: new[] { "SoftwareId", "SyntaxId" },
|
||||
keyValues: new object[] { (short)22, (short)61 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SoftwareSyntax",
|
||||
keyColumns: new[] { "SoftwareId", "SyntaxId" },
|
||||
keyValues: new object[] { (short)23, (short)59 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SoftwareSyntax",
|
||||
keyColumns: new[] { "SoftwareId", "SyntaxId" },
|
||||
keyValues: new object[] { (short)23, (short)60 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "SoftwareSyntax",
|
||||
keyColumns: new[] { "SoftwareId", "SyntaxId" },
|
||||
keyValues: new object[] { (short)23, (short)61 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "Syntax",
|
||||
keyColumn: "Id",
|
||||
keyValue: (short)59);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "Syntax",
|
||||
keyColumn: "Id",
|
||||
keyValue: (short)60);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "Syntax",
|
||||
keyColumn: "Id",
|
||||
keyValue: (short)61);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -65923,11 +65923,41 @@ protected override void BuildModel(ModelBuilder modelBuilder)
|
|||
SyntaxId = (short)48
|
||||
},
|
||||
new
|
||||
{
|
||||
SoftwareId = (short)22,
|
||||
SyntaxId = (short)59
|
||||
},
|
||||
new
|
||||
{
|
||||
SoftwareId = (short)22,
|
||||
SyntaxId = (short)60
|
||||
},
|
||||
new
|
||||
{
|
||||
SoftwareId = (short)22,
|
||||
SyntaxId = (short)61
|
||||
},
|
||||
new
|
||||
{
|
||||
SoftwareId = (short)23,
|
||||
SyntaxId = (short)20
|
||||
},
|
||||
new
|
||||
{
|
||||
SoftwareId = (short)23,
|
||||
SyntaxId = (short)59
|
||||
},
|
||||
new
|
||||
{
|
||||
SoftwareId = (short)23,
|
||||
SyntaxId = (short)60
|
||||
},
|
||||
new
|
||||
{
|
||||
SoftwareId = (short)23,
|
||||
SyntaxId = (short)61
|
||||
},
|
||||
new
|
||||
{
|
||||
SoftwareId = (short)25,
|
||||
SyntaxId = (short)1
|
||||
|
|
@ -66809,6 +66839,24 @@ protected override void BuildModel(ModelBuilder modelBuilder)
|
|||
Id = (short)58,
|
||||
Name = "Suricata",
|
||||
Url = "https://suricata.io/documentation/"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = (short)59,
|
||||
Name = "dnsmasq address",
|
||||
Url = "http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = (short)60,
|
||||
Name = "dnsmasq server",
|
||||
Url = "http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = (short)61,
|
||||
Name = "dnsmasq local",
|
||||
Url = "http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html"
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -347,10 +347,34 @@
|
|||
"softwareId": 22,
|
||||
"syntaxId": 48
|
||||
},
|
||||
{
|
||||
"softwareId": 22,
|
||||
"syntaxId": 59
|
||||
},
|
||||
{
|
||||
"softwareId": 22,
|
||||
"syntaxId": 60
|
||||
},
|
||||
{
|
||||
"softwareId": 22,
|
||||
"syntaxId": 61
|
||||
},
|
||||
{
|
||||
"softwareId": 23,
|
||||
"syntaxId": 20
|
||||
},
|
||||
{
|
||||
"softwareId": 23,
|
||||
"syntaxId": 59
|
||||
},
|
||||
{
|
||||
"softwareId": 23,
|
||||
"syntaxId": 60
|
||||
},
|
||||
{
|
||||
"softwareId": 23,
|
||||
"syntaxId": 61
|
||||
},
|
||||
{
|
||||
"softwareId": 25,
|
||||
"syntaxId": 1
|
||||
|
|
|
|||
|
|
@ -217,5 +217,20 @@
|
|||
"id": 58,
|
||||
"name": "Suricata",
|
||||
"url": "https://suricata.io/documentation/"
|
||||
},
|
||||
{
|
||||
"id": 59,
|
||||
"name": "dnsmasq address",
|
||||
"url": "http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html"
|
||||
},
|
||||
{
|
||||
"id": 60,
|
||||
"name": "dnsmasq server",
|
||||
"url": "http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html"
|
||||
},
|
||||
{
|
||||
"id": 61,
|
||||
"name": "dnsmasq local",
|
||||
"url": "http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue