Skip to content

Commit

Permalink
Finish library and add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fortuna committed Dec 28, 2023
1 parent 68acbf4 commit df90c43
Show file tree
Hide file tree
Showing 8 changed files with 719 additions and 155 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
run: go build -C x -o bin/ -v ./...

- name: Test SDK
run: go test -v -race -bench '.' ./... -benchtime=100ms
run: go test -v -race -bench '.' ./... -benchtime=100ms -tags nettest

- name: Test X
run: go test -C x -v -race -bench '.' ./... -benchtime=100ms
run: go test -C x -v -race -bench '.' ./... -benchtime=100ms -tags nettest
14 changes: 9 additions & 5 deletions dns/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,24 @@
Package dns provides utilities to interact with the Domain Name System (DNS).
The [Domain Name System] (DNS) is responsible for mapping domain names to IP addresses.
Because domain resolution gatekeeps connections and is predominantly done in plaintext, it is commonly used
for network-level filtering.
Because domain resolution gatekeeps connections and is predominantly done in plaintext, it is [commonly used
for network-level filtering].
# Transports
The main concept in this library is that of a [Resolver], which allows code to query the DNS. Different implementations are provided
to perform DNS resolution over multiple transports:
to perform DNS resolution over different transports:
- DNS-over-UDP: the standard mechanism of querying resolvers. Communication is done in plaintext, using port 53.
- [DNS-over-TCP]: alternative to UDP when responses are large. Communication is done in plaintext, using port 53.
- [DNS-over-UDP]: the standard mechanism of querying resolvers. Communication is done in plaintext, using port 53.
- [DNS-over-TCP]: alternative to UDP that allows for more reliable delivery and larger responses, but requires establishing a connection. Communication is done in plaintext, using port 53.
- [DNS-over-TLS] (DoT): uses the TCP protocol, but over a connection encrypted with TLS. Is uses port 853, which
makes it very easy to block using the port number, as no other protocol is assigned to that port.
- [DNS-over-HTTPS] (DoH): uses HTTP exchanges for querying the resolver and communicates over a connection encrypted with TLS. It uses
port 443. That makes the DoH traffic undistinguishable from web traffic, making it harder to block.
[Domain Name System]: https://datatracker.ietf.org/doc/html/rfc1034
[commonly used for network-level filtering]: https://datatracker.ietf.org/doc/html/rfc9505#section-5.1.1
[DNS-over-UDP]: https://datatracker.ietf.org/doc/html/rfc1035#section-4.2.1
[DNS-over-TCP]: https://datatracker.ietf.org/doc/html/rfc7766
[DNS-over-TLS]: https://datatracker.ietf.org/doc/html/rfc7858
[DNS-over-HTTPS]: https://datatracker.ietf.org/doc/html/rfc8484
Expand Down
Loading

0 comments on commit df90c43

Please sign in to comment.