httpserver

package
v0.0.0-...-7bc2641 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package httpserver implements an HTTPS server which handles DNS requests over HTTPS.

It implements:

Index

Constants

This section is empty.

Variables

View Source
var InsecureForTesting = false

InsecureForTesting = true will make Server.ListenAndServe will not use TLS. This is only useful for integration testing purposes.

Functions

This section is empty.

Types

type Server

type Server struct {
	Addr     string
	Upstream string
	CertFile string
	KeyFile  string
}

Server is an HTTPS server that implements DNS over HTTPS, see the package-level documentation for more references.

func (*Server) ListenAndServe

func (s *Server) ListenAndServe()

ListenAndServe starts the HTTPS server.

func (*Server) Resolve

func (s *Server) Resolve(w http.ResponseWriter, req *http.Request)

Resolve implements the HTTP handler for incoming DNS resolution requests. It handles "Google's DNS over HTTPS using JSON" requests, as well as "DoH" request.

Jump to

Keyboard shortcuts

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