commands

package
v0.0.0-...-33b7bd6 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OBLIVIOUS_DOH    = "application/oblivious-dns-message"
	TARGET_HTTP_MODE = "http"
	PROXY_HTTP_MODE  = "http"
)
View Source
const (
	INDEX = "telemetry"
)

Variables

View Source
var Commands = []cli.Command{
	{
		Name:   "doh",
		Usage:  "A plain 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 oblivious 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:   "get-publickey",
		Usage:  "Retrieves the public key of the target resolver",
		Action: getTargetPublicKey,
		Flags: []cli.Flag{
			cli.StringFlag{
				Name:  "ip",
				Value: "localhost:8080",
			},
		},
	},
	{
		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

func RetrievePublicKey

func RetrievePublicKey(ip string, client *http.Client) (odoh.ObliviousDNSPublicKey, error)

Types

type DiscoveryServiceResponse

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

func DiscoverProxiesAndTargets

func DiscoverProxiesAndTargets(hostname string, client *http.Client) (response DiscoveryServiceResponse, err error)

Jump to

Keyboard shortcuts

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