Update MikrotikAPI to support more options.

New connectivity methods.
This commit is contained in:
Tech Garage 2024-01-25 19:30:59 +03:30
parent 3bea9768ba
commit 8d9b340aeb
9 changed files with 507 additions and 233 deletions

66
MikrotikAPI/Models/DNS.cs Normal file
View file

@ -0,0 +1,66 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MikrotikAPI.Models
{
public class DNS
{
[JsonProperty("allow-remote-requests")]
public bool AllowRemoteRequests { get; set; }
[JsonProperty("cache-max-ttl")]
public string CacheMaxTtl { get; set; }
[JsonProperty("cache-size")]
public int CacheSize { get; set; }
[JsonProperty("cache-used")]
public int CacheUsed { get; set; }
[JsonProperty("doh-max-concurrent-queries")]
public int DohMaxConcurrentQueries { get; set; }
[JsonProperty("doh-max-server-connections")]
public int DohMaxServerConnections { get; set; }
[JsonProperty("doh-timeout")]
public string DohTimeout { get; set; }
[JsonProperty("dynamic-servers")]
public string DynamicServers { get; set; }
[JsonProperty("max-concurrent-queries")]
public int MaxConcurrentQueries { get; set; }
[JsonProperty("max-concurrent-tcp-sessions")]
public int MaxConcurrentTcpSessions { get; set; }
[JsonProperty("max-udp-packet-size")]
public int MaxUdpPacketSize { get; set; }
[JsonProperty("query-server-timeout")]
public string QueryServerTimeout { get; set; }
[JsonProperty("query-total-timeout")]
public string QueryTotalTimeout { get; set; }
[JsonProperty("servers")]
public string Servers { get; set; }
[JsonProperty("use-doh-server")]
public string UseDohServer { get; set; }
[JsonProperty("verify-doh-cert")]
public bool VerifyDohCert { get; set; }
}
public class MTDNSUpdateModel
{
[JsonProperty("servers")]
public string Servers { get; set; }
}
}