Documentation
¶
Index ¶
- Variables
- func Dial(dest string) (net.Conn, error)
- func DialOptions(dest string, options ...Option) (net.Conn, error)
- func Listen() (net.Listener, error)
- func ListenOptions(options ...Option) (net.Listener, error)
- func StoreCredential(c *Credential) ([]byte, error)
- type Credential
- type Option
- type Options
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 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 WithSAMHost ¶
func WithSAMPort ¶
func WithSAMPortUDP ¶
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
}
Click to show internal directories.
Click to hide internal directories.