Documentation
¶
Overview ¶
Package skydns pkg/skydns/skydns.go
SkyDNS lets every app on a phone open .dmsg and .skynet names, whatever its proxy support. It sits on a tunnel's packet path and owns Range: apps ask ResolverAddr for names, mesh names get a synthetic IP from the mesh gateway's pool, and every other name goes to an Exchanger. TCP to a synthetic IP is carried over the mesh by the gateway (pkg/vpnrouter/meshgw).
Package skydns pkg/skydns/upstream.go
Index ¶
Constants ¶
const ( // Range is RFC 2544 benchmark space, so no real network uses it. Unlike // 100.64.0.0/10 it never holds a carrier's CGNAT address for the phone. Range = "198.18.0.0/15" // PoolCIDR is where mesh names get their synthetic IPs. PoolCIDR = "198.18.0.0/16" // ResolverAddr is the DNS server apps are pointed at. ResolverAddr = "198.19.0.53" // LocalAddr is the standalone tunnel's own address. LocalAddr = "198.19.0.1" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// Dial carries a connection to a synthetic IP over the mesh.
Dial meshgw.MeshDial
// Upstream answers every name that is not a mesh name.
Upstream Exchanger
// Aliases maps friendly names to PKs. Optional.
Aliases map[string]cipher.PubKey
// Minter, when set, terminates HTTPS to mesh names. Optional.
Minter skynetca.LeafMinter
// MTU of the tunnel. Zero means 1500.
MTU int
Log logrus.FieldLogger
}
Config is what an Engine needs from its host.
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine is SkyDNS on one tunnel. Write hands it the packets Owns picks out, and Read returns the packets it sends back. Safe for concurrent use.
type Upstream ¶
type Upstream struct {
// contains filtered or unexported fields
}
Upstream asks one resolver over DNS-over-TLS (RFC 7858). Unless strict, a resolver with no TLS on 853 is asked in plain DNS, as Android's automatic Private DNS does.
func NewUpstream ¶
NewUpstream returns an Upstream for the resolver at server, an IP address.