Documentation
¶
Index ¶
- Constants
- func AddRelayTransport(p *DcMulti, relaystamp string) error
- func AddTransport(p *DcMulti, id, serverstamp string) (*severbyid, error)
- func NewTransport(p *DcMulti, id, rawstamp string) (dnsx.Transport, error)
- type DcMulti
- func (proxy *DcMulti) Add(t x.DNSTransport) bool
- func (proxy *DcMulti) AddAll(serverscsv string) (int, error)
- func (proxy *DcMulti) AddGateways(routescsv string) (int, error)
- func (proxy *DcMulti) Get(id string) (x.DNSTransport, error)
- func (p *DcMulti) GetAddr() string
- func (p *DcMulti) GetIPs(id string) string
- func (proxy *DcMulti) GetInternal(id string) (dnsx.Transport, error)
- func (p *DcMulti) GetRelay() x.Proxy
- func (p *DcMulti) ID() string
- func (p *DcMulti) IPPorts() []netip.AddrPort
- func (proxy *DcMulti) LiveTransports() string
- func (p *DcMulti) Measure(mid string, n, seconds int32) *x.DNSMeasurement
- func (p *DcMulti) P50() int64
- func (p *DcMulti) Query(network string, q *dns.Msg, smm *x.DNSSummary) (r *dns.Msg, err error)
- func (proxy *DcMulti) Refresh() (string, error)
- func (t *DcMulti) Relaying() bool
- func (proxy *DcMulti) Remove(uid string) bool
- func (proxy *DcMulti) RemoveAll(servernamescsv string) (int, error)
- func (proxy *DcMulti) RemoveGateways(routescsv string) (int, error)
- func (p *DcMulti) Status() int32
- func (proxy *DcMulti) Stop() error
- func (p *DcMulti) Type() string
- type ServersInfo
Constants ¶
const ( // NonceSize is what the name suggests NonceSize = 24 // TagSize is what the name suggests TagSize = 16 // HalfNonceSize is half of NonceSize HalfNonceSize = NonceSize / 2 // PublicKeySize is the size of a public key PublicKeySize = 32 // QueryOverhead is the amount of request overhead due to client-magic, public key, nonce, and tag QueryOverhead = xdns.ClientMagicLen + PublicKeySize + HalfNonceSize + TagSize // ResponseOverhead is the amount of answer overhead due to server-magic, nonce, and tag ResponseOverhead = len(xdns.ServerMagic) + NonceSize + TagSize )
const ( ActionNone = iota // No action has been taken ActionContinue // Continue with the request ActionDrop // Drop the request ActionSynth // Use synthesized response )
const ( ReturnCodePass = iota ReturnCodeSynth )
Variables ¶
This section is empty.
Functions ¶
func AddRelayTransport ¶
AddRelayTransport creates and adds a relay server to p
func AddTransport ¶
AddTransport creates and adds a dnscrypt transport to p
func NewTransport ¶
NewTransport creates a free-standing (unregistered) DNSCrypt transport for id from rawstamp (a sdns:// stamp), dialing via p's proxies. The returned transport is not registered with p nor tracked by any resolver, and its certificate is not refreshed; it is expected to be short-lived (as long as the fetched certificate remains valid).
Types ¶
type DcMulti ¶
DcMulti is a dnsx.TransportMult supporting dnscrypt servers and relays
func NewDcMult ¶
func NewDcMult(pctx context.Context, px ipn.ProxyProvider) *DcMulti
NewDcMult creates a dnscrypt proxy
func (*DcMulti) Add ¶
func (proxy *DcMulti) Add(t x.DNSTransport) bool
Add implements dnsx.TransportMult
func (*DcMulti) AddGateways ¶
AddGateways adds relay servers
func (*DcMulti) Get ¶
func (proxy *DcMulti) Get(id string) (x.DNSTransport, error)
Get implements dnsx.TransportMult
func (*DcMulti) GetInternal ¶
GetInternal implements dnsx.TransportMult
func (*DcMulti) LiveTransports ¶
LiveTransports returns csv of dnscrypt server-names currently in-use
func (*DcMulti) RemoveGateways ¶
RemoveGateways removes relay servers