protocol Property
The protocol used for the DNS request.
Syntax
def get_protocol() -> int: ... def set_protocol(value: int) -> None: ...
protocol = property(get_protocol, set_protocol)
Default Value
0
Remarks
This property specifies the protocol used for the DNS request when query is called. Possible values are:
0 (ptUDP - default) | UDP is used. This is the most commonly used DNS protocol. |
1 (ptTCP) | TCP is used. |
2 (ptTLS) | TCP with TLS is used. Set dns_port to the port which the server uses for TLS connections. Typically this is port 853. |
3 (ptHTTPS) | HTTP is used. The DNS request is made over HTTP. dns_server must bet set to a URL of a server accepting DNS over HTTPS (DoH) requests. See the DoHMethod configuration setting for additional options when using this protocol. |