ramp

package module
v0.0.0-...-305b382 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2019 License: MIT Imports: 5 Imported by: 0

README

ramp

allium tricoccum

inclined plane

builds upon: eyedeekay/sam3, eyedeekay/gosam

Convenient structures for managing sam sessions in Go. Some of them might be reimplemented in sam3, it's initially intended to make it more intuitive to port cretz/bine based applications to I2P streaming.

Besides that, it in general exists to explore a few ease-of-use issues in sam3 and goSam, like how for now they use different, non-compatible formats for saving keys, which are in turn not compatible with i2ptunnel, the more-tedious-than-it-needs-to-be keeping track of configuration options, full support for Contexts, etc.

Directory Structure

    ./         : Base Ramp classes, the things most will need to use
    ./config   : Configuration structures to deal with compatibility issues
    ./consume  : Handle replies from the SAM bridge
    ./emit     : Takes a stored configuration and uses it to send SAM commands
    ./examples : Usage examples
    ./sam3     : Functional sam3 constructors

Goals

  1. Make gosam and sam3 share a common(optional) configuration class
  2. Make gosam and sam3 share a common(mandatory) key storage format inherited from sam3
  3. Make sam3 configuration much more intuitive, require less user input to create a session
  4. Make gosam and sam3 configurable from files without adding clutter to their code
  5. Be a useful underlying primitive for custom/application specific SAM interactions and a toolkit for developing new libraries
  6. Have lots of examples and documentation

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetAccessList

func SetAccessList(s []string) func(*Ramp) error

SetAccessList tells the system to treat the AccessList as a whitelist

func SetAccessListType

func SetAccessListType(s string) func(*Ramp) error

SetAccessListType tells the system to treat the AccessList as a whitelist

func SetAllowZeroIn

func SetAllowZeroIn(b bool) func(*Ramp) error

SetAllowZeroIn tells the tunnel to accept zero-hop peers

func SetAllowZeroOut

func SetAllowZeroOut(b bool) func(*Ramp) error

SetAllowZeroOut tells the tunnel to accept zero-hop peers

func SetCloseIdle

func SetCloseIdle(b bool) func(*Ramp) error

SetCloseIdle tells the connection to close it's tunnels during extended idle time.

func SetCloseIdleTime

func SetCloseIdleTime(u int) func(*Ramp) error

SetCloseIdleTime sets the time to wait before closing tunnels to idle levels

func SetCloseIdleTimeMs

func SetCloseIdleTimeMs(u int) func(*Ramp) error

SetCloseIdleTimeMs sets the time to wait before closing tunnels to idle levels in milliseconds

func SetCompress

func SetCompress(b bool) func(*Ramp) error

SetCompress tells clients to use compression

func SetEncrypt

func SetEncrypt(b bool) func(*Ramp) error

SetEncrypt tells the router to use an encrypted leaseset

func SetFastRecieve

func SetFastRecieve(b bool) func(*Ramp) error

SetFastRecieve tells clients to use compression

func SetFromPort

func SetFromPort(s string) func(*Ramp) error

SetFromPort sets the FROM_PORT propert to pass to SAM

func SetInBackups

func SetInBackups(u int) func(*Ramp) error

SetInBackups sets the inbound tunnel backups

func SetInLength

func SetInLength(u int) func(*Ramp) error

SetInLength sets the number of hops inbound

func SetInQuantity

func SetInQuantity(u int) func(*Ramp) error

SetInQuantity sets the inbound tunnel quantity

func SetInVariance

func SetInVariance(i int) func(*Ramp) error

SetInVariance sets the variance of a number of hops inbound

func SetLeaseSetKey

func SetLeaseSetKey(s string) func(*Ramp) error

SetLeaseSetKey sets the host of the Ramp's SAM bridge

func SetLeaseSetPrivateKey

func SetLeaseSetPrivateKey(s string) func(*Ramp) error

SetLeaseSetPrivateKey sets the host of the Ramp's SAM bridge

func SetLeaseSetPrivateSigningKey

func SetLeaseSetPrivateSigningKey(s string) func(*Ramp) error

SetLeaseSetPrivateSigningKey sets the host of the Ramp's SAM bridge

func SetMessageReliability

func SetMessageReliability(s string) func(*Ramp) error

SetMessageReliability sets the host of the Ramp's SAM bridge

func SetName

func SetName(s string) func(*Ramp) error

SetName sets the host of the Ramp's SAM bridge

func SetOutBackups

func SetOutBackups(u int) func(*Ramp) error

SetOutBackups sets the inbound tunnel backups

func SetOutLength

func SetOutLength(u int) func(*Ramp) error

SetOutLength sets the number of hops outbound

func SetOutQuantity

func SetOutQuantity(u int) func(*Ramp) error

SetOutQuantity sets the outbound tunnel quantity

func SetOutVariance

func SetOutVariance(i int) func(*Ramp) error

SetOutVariance sets the variance of a number of hops outbound

func SetReduceIdle

func SetReduceIdle(b bool) func(*Ramp) error

SetReduceIdle tells the connection to reduce it's tunnels during extended idle time.

func SetReduceIdleQuantity

func SetReduceIdleQuantity(u int) func(*Ramp) error

SetReduceIdleQuantity sets minimum number of tunnels to reduce to during idle time

func SetReduceIdleTime

func SetReduceIdleTime(u int) func(*Ramp) error

SetReduceIdleTime sets the time to wait before reducing tunnels to idle levels

func SetReduceIdleTimeMs

func SetReduceIdleTimeMs(u int) func(*Ramp) error

SetReduceIdleTimeMs sets the time to wait before reducing tunnels to idle levels in milliseconds

func SetSAMAddress

func SetSAMAddress(s string) func(*Ramp) error

func SetSAMHost

func SetSAMHost(s string) func(*Ramp) error

SetSAMHost sets the host of the Ramp's SAM bridge

func SetSAMPort

func SetSAMPort(s string) func(*Ramp) error

SetSAMPort sets the port of the Ramp's SAM bridge using a string

func SetToPort

func SetToPort(s string) func(*Ramp) error

SetToPort sets the TO_PORT property to pass to SAM

func SetType

func SetType(s string) func(*Ramp) error

SetType sets the type of the forwarder server

Types

type Option

type Option func(*Ramp) error

Option is a Ramp Option

type Ramp

type Ramp struct {
	*SAM
	SAMConn
	StreamSession
	StreamListener
}

func NewRamp

func NewRamp(opts ...func(*Ramp) error) (*Ramp, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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