Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrRegFailed = errors.New("registration failed")
)
Functions ¶
This section is empty.
Types ¶
type APIRegistrar ¶
type APIRegistrar struct {
// contains filtered or unexported fields
}
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) 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 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) 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 )
type DecoyRegistrar ¶
type DecoyRegistrar struct {
// contains filtered or unexported fields
}
func NewDecoyRegistrar ¶
func NewDecoyRegistrar() *DecoyRegistrar
func NewDecoyRegistrarWithDialer ¶
func NewDecoyRegistrarWithDialer(dialer DialFunc) *DecoyRegistrar
func (DecoyRegistrar) Register ¶
func (r DecoyRegistrar) Register(cjSession *tapdance.ConjureSession, ctx context.Context) (*tapdance.ConjureReg, error)
Click to show internal directories.
Click to hide internal directories.