Documentation
¶
Index ¶
- Constants
- Variables
- func Certificate(w http.ResponseWriter, r *http.Request)
- func DNSQuery(w http.ResponseWriter, r *http.Request)
- func Decrypt(key, data []byte) ([]byte, error)
- func DoHProxy(w http.ResponseWriter, r *http.Request)
- func Encrypt(key, data []byte) ([]byte, error)
- func Errorf(w http.ResponseWriter, code int, format string, a ...interface{})
- func Fatalf(format string, a ...interface{})
- func SAs(w http.ResponseWriter, r *http.Request)
- type CreateSA
- type Envelope
- type KeyPair
- type NewSARequest
- type ProxyRequest
- type SA
Constants ¶
View Source
const ( // REALM defines the OAuth2 authentication realm. REALM = "DNS-over-HTTPS Proxy" // TENANT defines the OAuth2 authentication tenant. TENANT = "DNS-over-HTTPS-proxy" )
View Source
const (
// NonceLen defines the nonce length in bytes.
NonceLen = 12
)
Variables ¶
View Source
var ( // ErrorInvalidKeyPair defines an error when envelope is encrypted // with an unknown key pair. ErrorInvalidKeyPair = errors.New("invalid key pair") )
Functions ¶
func Certificate ¶
func Certificate(w http.ResponseWriter, r *http.Request)
Certificate returns the proxy's authentication certificate.
func DNSQuery ¶
func DNSQuery(w http.ResponseWriter, r *http.Request)
DNSQuery implements handler for DNS queries.
func DoHProxy ¶
func DoHProxy(w http.ResponseWriter, r *http.Request)
DoHProxy implements the Google Cloud Functions entrypoint.
func Errorf ¶
func Errorf(w http.ResponseWriter, code int, format string, a ...interface{})
Errorf returns an HTTP error.
Types ¶
type CreateSA ¶
type CreateSA struct {
SAs []*Envelope
}
CreateSA defines the attibutes for the security association creation request.
type KeyPair ¶
type KeyPair struct {
// contains filtered or unexported fields
}
KeyPair defines a private key and certificate key pair.
func GetEphemeralKeyPair ¶
GetEphemeralKeyPair returns an ephemeral key pair.
type NewSARequest ¶
NewSARequest defines the attributes of the new security association.
type ProxyRequest ¶
ProxyRequest defines the attributes for the DNS proxy request.
Click to show internal directories.
Click to hide internal directories.