proxy

package
v0.0.0-...-49f66c4 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2021 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package proxy can be used with the Gate service gateservice.net/listener when it doesn't allow public client connections. The proxy creates client certificates using the Ed25519 private key which owns the Gate instance.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateClientCertificate

func CreateClientCertificate(key crypto.PrivateKey, now time.Time, rand io.Reader) (tls.Certificate, error)

CreateClientCertificate valid for a short time. Supports ed25519.PrivateKey.

Types

type Proxy

type Proxy struct {
	// contains filtered or unexported fields
}

Proxy manages client certificates automatically.

func New

func New(key crypto.PrivateKey) *Proxy

New supports ed25519.PrivateKey.

func (*Proxy) Dial

func (p *Proxy) Dial(network, addr string, config *tls.Config) (*tls.Conn, error)

Dial with default dialer. See DialWithDialer for details.

func (*Proxy) DialWithDialer

func (p *Proxy) DialWithDialer(dialer *net.Dialer, network, addr string, config *tls.Config) (*tls.Conn, error)

DialWithDialer and transparent connection authentication. Either addr or config.ServerName should refer to the DNS name of a Gate listener endpoint. ServerName is set automatically if it's empty.

Jump to

Keyboard shortcuts

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