registration

package
v0.7.10 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDecoyRegistrar

func NewDecoyRegistrar() *dr.DecoyRegistrar

NewDecoyRegistrar returns a decoy registrar..

func NewDecoyRegistrarWithDialer deprecated

func NewDecoyRegistrarWithDialer(dialer dr.DialFunc) *dr.DecoyRegistrar

NewDecoyRegistrarWithDialer returns a decoy registrar with custom dialer.

Deprecated: Set dialer in tapdace.Dialer.DialerWithLaddr instead.

Types

type APIRegistrar

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

APIRegistrar implements a registration strategy using a centralized REST API to create registrations. Only the Endpoint need be specified; the remaining fields are valid with their zero values and provide the opportunity for additional control over the process.

func NewAPIRegistrar

func NewAPIRegistrar(config *Config) (*APIRegistrar, error)

func (*APIRegistrar) PrepareRegKeys added in v0.7.0

func (r *APIRegistrar) PrepareRegKeys(stationPubkey [32]byte, sessionSecret []byte) error

PrepareRegKeys prepares key materials specific to the registrar

func (APIRegistrar) Register

func (r APIRegistrar) Register(cjSession *tapdance.ConjureSession, ctx context.Context) (*tapdance.ConjureReg, error)

type Config

type Config struct {
	// DNSTransportMethod is the transport method to be used in the DNS registrar
	DNSTransportMethod DNSTransportMethodType

	// Target is the target registration addr/url
	Target string

	// BaseDomain is the base domain for the DNS request that the responder is authoritative for in the DNS registrar
	BaseDomain string

	// Pubkey is the public key for the listening DNS registration server
	Pubkey []byte

	// UTLSDistribution allows utls distribution to be specified for the utls connection used during DoH and DoT in the DNS registrar
	UTLSDistribution string

	// MaxRetries is the max number of retries a registrar will attempt
	MaxRetries int

	// Delay is the delay duration between retries
	//
	// Deprecated: Use tapdance.Dialer.RegDelay instead.
	Delay time.Duration

	// STUNAddr is the address of STUN server used to determine the client's IPv4 address for the DNS registrar
	STUNAddr string

	// Bidirectional sets wether the registrar should be bidirectional or unidirectional
	Bidirectional bool

	// SecondaryRegistrar is the secondary registrar to use when the main one fails
	SecondaryRegistrar tapdance.Registrar

	// HTTPClient is the HTTP client to use for the API registrar
	HTTPClient *http.Client
}

type DNSRegistrar

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

func NewDNSRegistrar

func NewDNSRegistrar(config *Config) (*DNSRegistrar, error)

NewDNSRegistrar creates a DNSRegistrar from config

func (*DNSRegistrar) PrepareRegKeys added in v0.7.0

func (r *DNSRegistrar) PrepareRegKeys(stationPubkey [32]byte, sessionSecret []byte) error

PrepareRegKeys prepares key materials specific to the registrar

func (*DNSRegistrar) Register

func (r *DNSRegistrar) Register(cjSession *tapdance.ConjureSession, ctx context.Context) (*tapdance.ConjureReg, error)

Register prepares and sends the registration request.

type DNSTransportMethodType

type DNSTransportMethodType int

DNSTransportMethodType declares the DNS transport method to be used

const (
	DoH DNSTransportMethodType = iota
	DoT
	UDP
)

Jump to

Keyboard shortcuts

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