kindling

package module
v0.0.0-...-944349e Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: Apache-2.0 Imports: 20 Imported by: 2

README

Kindling

Library using a series of techniques to send and receive small amounts of data through censoring firewalls.

Example

k := kindling.NewKindling(
    kindling.WithLogWriter(os.Stdout),
    kindling.WithDomainFronting("https://url-with-gzipped-domain-fronting-config"),
    kindling.WithProxyless("example.com"),
    //kindling.WithDoHTunnel(),
    //kindling.WithPushNotifications(),
)
httpClient := k.NewHTTPClient()

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kindling

type Kindling interface {
	// NewHTTPClient returns a new HTTP client that is configured to use kindling.
	NewHTTPClient() *http.Client
}

Kindling is the interface that wraps the basic Dial and DialContext methods for control plane traffic.

func NewKindling

func NewKindling(options ...Option) Kindling

NewKindling returns a new Kindling.

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option is a functional option type that allows us to configure the Client.

func WithDomainFronting

func WithDomainFronting(configURL, countryCode string) Option

WithDomainFronting is a functional option that enables domain fronting for the Kindling.

func WithLogWriter

func WithLogWriter(w io.Writer) Option

WithLogWriter is a functional option that sets the log writer for the Kindling. By default, the log writer is set to os.Stdout. This should be the first option to be applied to the Kindling to ensure that all logs are captured.

func WithPanicListener

func WithPanicListener(panicListener func(string)) Option

WithPanicListener is a functional option that sets a panic listener that should be notified whenever any goroutine panics. We set this with a higher priority so that it is set before any other options that may depend on it.

func WithProxyless

func WithProxyless(domains ...string) Option

WithProxyless is a functional option that enables proxyless mode for the Kindling such that it accesses the control plane directly using a variety of proxyless techniques.

func WithRootCA

func WithRootCA(rootCA string) Option

WithRootCA pins the root CA to use for TLS.

Jump to

Keyboard shortcuts

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