autoi2pd

package module
v0.0.0-...-78d8535 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2025 License: MIT Imports: 9 Imported by: 0

README

AutoI2Pd

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultI2PClientConf = []string{"inbound.length=1", "outbound.length=1",
	"inbound.lengthVariance=0", "outbound.lengthVariance=0",
	"inbound.backupQuantity=2", "outbound.backupQuantity=2",
	"inbound.quantity=3", "outbound.quantity=3"}
View Source
var DefaultI2PServerConf = []string{"inbound.length=1", "outbound.length=1",
	"inbound.lengthVariance=0", "outbound.lengthVariance=0",
	"inbound.backupQuantity=3", "outbound.backupQuantity=3",
	"inbound.quantity=5", "outbound.quantity=5"}

Functions

func Dial

func Dial(dest string) (net.Conn, error)

func DialOptions

func DialOptions(dest string, options ...Option) (net.Conn, error)

func Listen

func Listen() (net.Listener, error)

func ListenOptions

func ListenOptions(options ...Option) (net.Listener, error)

func StoreCredential

func StoreCredential(c *Credential) ([]byte, error)

Types

type Credential

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

func LoadCredential

func LoadCredential(b []byte) (*Credential, error)

func (*Credential) Key

func (c *Credential) Key() i2pkeys.I2PKeys

type Option

type Option func(*Options)

func WithCredential

func WithCredential(c *Credential) Option

func WithPSK

func WithPSK(psk []byte) Option

func WithSAMHost

func WithSAMHost(addr string) Option

func WithSAMPort

func WithSAMPort(port int) Option

func WithSAMPortUDP

func WithSAMPortUDP(port int) Option

type Options

type Options struct {
	Host    string // default to 127.0.0.1
	Port    int    // default to 7656
	PortUDP int    // default to 0

	Credential *Credential // if nil, new credential will be generated
	I2PConf    []string    // if nil, DefaultI2PClientConf and DefaultI2PServerConf will be used

	PSK             []byte // if nil, default PSK will be used
	KCPDataShards   int    // default to 10
	KCPParityShards int    // default to 3
}

Jump to

Keyboard shortcuts

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