DNSServer constructor

DNSServer({
  1. required String host,
  2. String? name,
  3. String? description,
  4. int port = 53,
  5. DNSProtocol protocol = DNSProtocol.udp,
  6. String path = '/dns-query',
  7. Map<String, String> headers = const {'Accept' : 'application/dns-message', 'Content-Type' : 'application/dns-message', 'Connection' : 'close'},
})

Implementation

DNSServer({
    required this.host,
    this.name,
    this.description,
    this.port = 53, // Default port
    this.protocol = DNSProtocol.udp, // Default protocol
    this.path = '/dns-query', // Default path for DoH
    this.headers = const { // Default headers for DoH
        'Accept': 'application/dns-message',
        'Content-Type': 'application/dns-message',
        'Connection': 'close',
    },
});