Return the response obtained after sending a query via DNS-over-QUIC. *q*, a ``dns.message.Message``, the query to send. *where*, a ``str``, the nameserver IP address. *timeout*, a ``float`` or ``None``, the number of seconds to wait before the query times out. If ``None``, the de
(
q: dns.message.Message,
where: str,
timeout: float | None = None,
port: int = 853,
source: str | None = None,
source_port: int = 0,
one_rr_per_rrset: bool = False,
ignore_trailing: bool = False,
connection: dns.quic.SyncQuicConnection | None = None,
verify: bool | str = True,
hostname: str | None = None,
server_hostname: str | None = None,
)
| 1431 | |
| 1432 | |
| 1433 | def quic( |
| 1434 | q: dns.message.Message, |
| 1435 | where: str, |
| 1436 | timeout: float | None = None, |
| 1437 | port: int = 853, |
| 1438 | source: str | None = None, |
| 1439 | source_port: int = 0, |
| 1440 | one_rr_per_rrset: bool = False, |
| 1441 | ignore_trailing: bool = False, |
| 1442 | connection: dns.quic.SyncQuicConnection | None = None, |
| 1443 | verify: bool | str = True, |
| 1444 | hostname: str | None = None, |
| 1445 | server_hostname: str | None = None, |
| 1446 | ) -> dns.message.Message: |
| 1447 | """Return the response obtained after sending a query via DNS-over-QUIC. |
| 1448 | |
| 1449 | *q*, a ``dns.message.Message``, the query to send. |
| 1450 | |
| 1451 | *where*, a ``str``, the nameserver IP address. |
| 1452 | |
| 1453 | *timeout*, a ``float`` or ``None``, the number of seconds to wait before the query |
| 1454 | times out. If ``None``, the default, wait forever. |
| 1455 | |
| 1456 | *port*, a ``int``, the port to send the query to. The default is 853. |
| 1457 | |
| 1458 | *source*, a ``str`` containing an IPv4 or IPv6 address, specifying the source |
| 1459 | address. The default is the wildcard address. |
| 1460 | |
| 1461 | *source_port*, an ``int``, the port from which to send the message. The default is |
| 1462 | 0. |
| 1463 | |
| 1464 | *one_rr_per_rrset*, a ``bool``. If ``True``, put each RR into its own RRset. |
| 1465 | |
| 1466 | *ignore_trailing*, a ``bool``. If ``True``, ignore trailing junk at end of the |
| 1467 | received message. |
| 1468 | |
| 1469 | *connection*, a ``dns.quic.SyncQuicConnection``. If provided, the connection to use |
| 1470 | to send the query. |
| 1471 | |
| 1472 | *verify*, a ``bool`` or ``str``. If a ``True``, then TLS certificate verification |
| 1473 | of the server is done using the default CA bundle; if ``False``, then no |
| 1474 | verification is done; if a `str` then it specifies the path to a certificate file or |
| 1475 | directory which will be used for verification. |
| 1476 | |
| 1477 | *hostname*, a ``str`` containing the server's hostname or ``None``. The default is |
| 1478 | ``None``, which means that no hostname is known, and if an SSL context is created, |
| 1479 | hostname checking will be disabled. This value is ignored if *url* is not |
| 1480 | ``None``. |
| 1481 | |
| 1482 | *server_hostname*, a ``str`` or ``None``. This item is for backwards compatibility |
| 1483 | only, and has the same meaning as *hostname*. |
| 1484 | |
| 1485 | Returns a ``dns.message.Message``. |
| 1486 | """ |
| 1487 | |
| 1488 | if not dns.quic.have_quic: |
| 1489 | raise NoDOQ("DNS-over-QUIC is not available.") # pragma: no cover |
| 1490 |
nothing calls this directly
no test coverage detected
searching dependent graphs…