Skip to content

Commit 27698c4

Browse files
authored
Chore: Move query types
1 parent fbcfe3f commit 27698c4

File tree

3 files changed

+20
-17
lines changed

3 files changed

+20
-17
lines changed

Source/NETworkManager.Models/Network/DNSLookup.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,24 @@ public DNSLookup(DNSLookupSettings settings, IEnumerable<ServerConnectionInfo> d
3434
#endregion
3535

3636
#region Variables
37+
/// <summary>
38+
/// Query types that can be used.
39+
/// </summary>
40+
public static HashSet<QueryType> QueryTypes =>
41+
[
42+
QueryType.A,
43+
QueryType.AAAA,
44+
QueryType.ANY,
45+
QueryType.CAA,
46+
QueryType.CNAME,
47+
QueryType.DNSKEY,
48+
QueryType.MX,
49+
QueryType.NS,
50+
QueryType.PTR,
51+
QueryType.SOA,
52+
QueryType.SRV,
53+
QueryType.TXT
54+
];
3755

3856
/// <summary>
3957
/// DNS lookup settings to use for the DNS lookup.

Source/NETworkManager.Settings/GlobalStaticConfiguration.cs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -143,22 +143,7 @@ public static class GlobalStaticConfiguration
143143

144144
// Application: DNS Lookup
145145
public static QueryClass DNSLookup_QueryClass => QueryClass.IN;
146-
public static QueryType DNSLookup_QueryType => QueryType.ANY;
147-
public static HashSet<QueryType> DNSLookup_CustomQueryTypes =>
148-
[
149-
QueryType.A,
150-
QueryType.AAAA,
151-
QueryType.ANY,
152-
QueryType.CAA,
153-
QueryType.CNAME,
154-
QueryType.DNSKEY,
155-
QueryType.MX,
156-
QueryType.NS,
157-
QueryType.PTR,
158-
QueryType.SOA,
159-
QueryType.SRV,
160-
QueryType.TXT
161-
];
146+
public static QueryType DNSLookup_QueryType => QueryType.ANY;
162147
public static bool DNSLookup_UseTCPOnly => false;
163148
public static int DNSLookup_Retries => 3;
164149
public static int DNSLookup_Timeout => 2;

Source/NETworkManager/ViewModels/DNSLookupViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ private void LoadTypes()
261261
//else
262262
// QueryTypes = [.. queryTypes.OrderBy(x => x.ToString())];
263263

264-
QueryTypes = [.. queryTypes.Where(GlobalStaticConfiguration.DNSLookup_CustomQueryTypes.Contains).OrderBy(x => x.ToString())];
264+
QueryTypes = [.. queryTypes.Where(DNSLookup.QueryTypes.Contains).OrderBy(x => x.ToString())];
265265
QueryType = QueryTypes.FirstOrDefault(x => x == SettingsManager.Current.DNSLookup_QueryType);
266266

267267
// Fallback

0 commit comments

Comments
 (0)