commands

package
v0.0.0-...-4762219 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2020 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_DOH_SERVER        = "cloudflare-dns.com"
	OBLIVIOUS_DOH             = "application/oblivious-dns-message"
	TARGET_HTTP_MODE          = "https"
	PROXY_HTTP_MODE           = "http"
	ODOH_CONFIG_WELLKNOWN_URL = "/.well-known/odohconfigs"
)
View Source
const (
	INDEX = "telemetry"
)

Variables

View Source
var Commands = []cli.Command{
	{
		Name:   "doh",
		Usage:  "An application/dns-message request",
		Action: plainDnsRequest,
		Flags: []cli.Flag{
			cli.StringFlag{
				Name:  "domain, d",
				Value: "www.cloudflare.com.",
			},
			cli.StringFlag{
				Name:  "dnstype, t",
				Value: "AAAA",
			},
			cli.StringFlag{
				Name:  "target",
				Value: "localhost:8080",
			},
		},
	},
	{
		Name:   "odoh",
		Usage:  "An application/oblivious-dns-message request",
		Action: obliviousDnsRequest,
		Flags: []cli.Flag{
			cli.StringFlag{
				Name:  "domain, d",
				Value: "www.cloudflare.com.",
				Usage: "Domain name which needs to be resolved. Use trailing period (.).",
			},
			cli.StringFlag{
				Name:  "dnstype, t",
				Value: "AAAA",
				Usage: "Type of DNS Question. Currently supports A, AAAA, CAA, CNAME",
			},
			cli.StringFlag{
				Name:  "target",
				Value: "localhost:8080",
				Usage: "Hostname:Port format declaration of the target resolver hostname",
			},
			cli.StringFlag{
				Name:  "proxy, p",
				Usage: "Hostname:Port format declaration of the proxy hostname",
			},
		},
	},
	{
		Name:   "odohconfig-fetch",
		Usage:  "Retrieves the ObliviousDoHConfigs of the target resolver",
		Action: getTargetConfigs,
		Flags: []cli.Flag{
			cli.StringFlag{
				Name:  "target",
				Value: "localhost:8080",
			},
			cli.BoolFlag{
				Name: "pretty",
			},
		},
	},
	{
		Name:   "odohconfig-mint",
		Usage:  "Mints a singleton ObliviousDoHConfig with the specified (KEM, KDF, AEAD) HPKE ciphersuite",
		Action: createConfigurations,
		Flags: []cli.Flag{
			cli.StringFlag{
				Name:  "kemid",
				Value: "32",
			},
			cli.StringFlag{
				Name:  "kdfid",
				Value: "1",
			},
			cli.StringFlag{
				Name:  "aeadid",
				Value: "1",
			},
		},
	},
	{
		Name:   "bench",
		Usage:  "Performs a benchmark for ODOH Target Resolver",
		Action: benchmarkClient,
		Flags: []cli.Flag{
			cli.StringFlag{
				Name:  "data",
				Value: "dataset.csv",
			},
			cli.Uint64Flag{
				Name:  "pick",
				Value: 10,
			},
			cli.Uint64Flag{
				Name:  "numclients",
				Value: 10,
			},
			cli.Uint64Flag{
				Name:  "rate",
				Value: 15,
			},
			cli.StringFlag{
				Name:  "out",
				Value: "data/data-test.txt",
			},
			cli.StringFlag{
				Name:  "discovery",
				Value: "odoh-discovery.crypto-team.workers.dev",
			},
		},
	},
}

Functions

func GetInstance

func GetInstance(N uint64) *state

Types

type DiscoveryServiceResponse

type DiscoveryServiceResponse struct {
	Proxies []string `json:"proxies"`
	Targets []string `json:"targets"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL