Documentation ¶
Index ¶
- Constants
- func AnonymizedDNSHeader() []byte
- func CertMagic() []byte
- func Query(dialFn common.DialFn, proto string, service *Service, bin []byte, ...) ([]byte, time.Duration, error)
- func RetrieveServicesInfo(useSk bool, resolver *Resolver, dialFn common.DialFn, proto string, ...) (time.Duration, error)
- func ServerMagic() []byte
- type CryptoConstruction
- type Resolver
- type ServerKey
- type Service
- type ServiceInfo
Constants ¶
View Source
const ( ClientMagicLen = 8 ServerMagicLen = 8 AnonymizedOverhead = 28 PublicKeySize = 32 NonceSize = unclassified.NonceSize HalfNonceSize = unclassified.NonceSize / 2 TagSize = unclassified.TagSize QueryOverhead = ClientMagicLen + PublicKeySize + HalfNonceSize + TagSize ResponseHeaderLen = ServerMagicLen + NonceSize ResponseOverhead = ResponseHeaderLen + TagSize IdentifierPrefix = "2.dnscrypt-cert." DNSRoot = "." )
Variables ¶
This section is empty.
Functions ¶
func AnonymizedDNSHeader ¶
func AnonymizedDNSHeader() []byte
func CertMagic ¶
func CertMagic() []byte
these are the fingerprint of the dnscrypt protocols, keep in mind
func Query ¶
func Query(dialFn common.DialFn, proto string, service *Service, bin []byte, upstreamAddr, relayAddr *common.Endpoint) ([]byte, time.Duration, error)
looks like a standard dns query via user-defined port, nevertheless it's fixed with fingerprints
func RetrieveServicesInfo ¶
func ServerMagic ¶
func ServerMagic() []byte
Types ¶
type CryptoConstruction ¶
type CryptoConstruction uint8
const ( UndefinedConstruction CryptoConstruction = iota XSalsa20Poly1305 XChacha20Poly1305 )
type Resolver ¶
type Resolver struct { Name *string Identifiers []string PublicKey ed25519.PublicKey V1_Services []*ServiceInfo V2_Services []*ServiceInfo VN_Services []*ServiceInfo }
type ServerKey ¶
type ServerKey struct { MagicQuery [ClientMagicLen]byte ServerPk [PublicKeySize]byte }
type Service ¶
type Service struct { *ServerKey Name *string Version CryptoConstruction }
Click to show internal directories.
Click to hide internal directories.