Documentation ¶
Index ¶
- func SetAccessList(s []string) func(*AccessTunnel) error
- func SetAccessListType(s string) func(*AccessTunnel) error
- func SetAllowZeroIn(b bool) func(*AccessTunnel) error
- func SetAllowZeroOut(b bool) func(*AccessTunnel) error
- func SetCloseIdle(b bool) func(*AccessTunnel) error
- func SetCloseIdleTime(u int) func(*AccessTunnel) error
- func SetCloseIdleTimeMs(u int) func(*AccessTunnel) error
- func SetCompress(b bool) func(*AccessTunnel) error
- func SetEncrypt(b bool) func(*AccessTunnel) error
- func SetFastRecieve(b bool) func(*AccessTunnel) error
- func SetFilePath(s string) func(*AccessTunnel) error
- func SetHost(s string) func(*AccessTunnel) error
- func SetInBackups(u int) func(*AccessTunnel) error
- func SetInLength(u int) func(*AccessTunnel) error
- func SetInQuantity(u int) func(*AccessTunnel) error
- func SetInVariance(i int) func(*AccessTunnel) error
- func SetKeyFile(s string) func(*AccessTunnel) error
- func SetLeaseSetKey(s string) func(*AccessTunnel) error
- func SetLeaseSetPrivateKey(s string) func(*AccessTunnel) error
- func SetLeaseSetPrivateSigningKey(s string) func(*AccessTunnel) error
- func SetMessageReliability(s string) func(*AccessTunnel) error
- func SetName(s string) func(*AccessTunnel) error
- func SetOutBackups(u int) func(*AccessTunnel) error
- func SetOutLength(u int) func(*AccessTunnel) error
- func SetOutQuantity(u int) func(*AccessTunnel) error
- func SetOutVariance(i int) func(*AccessTunnel) error
- func SetPort(s string) func(*AccessTunnel) error
- func SetReduceIdle(b bool) func(*AccessTunnel) error
- func SetReduceIdleQuantity(u int) func(*AccessTunnel) error
- func SetReduceIdleTime(u int) func(*AccessTunnel) error
- func SetReduceIdleTimeMs(u int) func(*AccessTunnel) error
- func SetSAMHost(s string) func(*AccessTunnel) error
- func SetSAMPort(s string) func(*AccessTunnel) error
- func SetSaveFile(b bool) func(*AccessTunnel) error
- func SetSigType(s string) func(*AccessTunnel) error
- func SetType(s string) func(*AccessTunnel) error
- type AccessTunnel
- func (f *AccessTunnel) Base32() string
- func (f *AccessTunnel) Base32Readable() string
- func (f *AccessTunnel) Base64() string
- func (f *AccessTunnel) Check(requestBytesOrString interface{}) (string, interface{}, bool)
- func (f *AccessTunnel) Cleanup()
- func (f *AccessTunnel) Close() error
- func (f *AccessTunnel) Config() *i2ptunconf.Conf
- func (f *AccessTunnel) GetType() string
- func (f *AccessTunnel) ID() string
- func (f *AccessTunnel) Keys() i2pkeys.I2PKeys
- func (s *AccessTunnel) Load() (samtunnel.SAMTunnel, error)
- func (f *AccessTunnel) Print() string
- func (f *AccessTunnel) Props() map[string]string
- func (f *AccessTunnel) Search(search string) string
- func (f *AccessTunnel) Serve() error
- func (f *AccessTunnel) ServeHTTP(rw http.ResponseWriter, rq *http.Request)
- func (f *AccessTunnel) ServeParent()
- func (f *AccessTunnel) ServeRegistrar()
- func (f *AccessTunnel) Target() string
- func (f *AccessTunnel) Up() bool
- func (f *AccessTunnel) Whitelist() []string
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetAccessList ¶
func SetAccessList(s []string) func(*AccessTunnel) error
SetAccessList tells the system to treat the accessList as a whitelist
func SetAccessListType ¶
func SetAccessListType(s string) func(*AccessTunnel) error
SetAccessListType tells the system to treat the accessList as a whitelist
func SetAllowZeroIn ¶
func SetAllowZeroIn(b bool) func(*AccessTunnel) error
SetAllowZeroIn tells the tunnel to accept zero-hop peers
func SetAllowZeroOut ¶
func SetAllowZeroOut(b bool) func(*AccessTunnel) error
SetAllowZeroOut tells the tunnel to accept zero-hop peers
func SetCloseIdle ¶
func SetCloseIdle(b bool) func(*AccessTunnel) error
SetCloseIdle tells the connection to close it's tunnels during extended idle time.
func SetCloseIdleTime ¶
func SetCloseIdleTime(u int) func(*AccessTunnel) error
SetCloseIdleTime sets the time to wait before closing tunnels to idle levels
func SetCloseIdleTimeMs ¶
func SetCloseIdleTimeMs(u int) func(*AccessTunnel) error
SetCloseIdleTimeMs sets the time to wait before closing tunnels to idle levels in milliseconds
func SetCompress ¶
func SetCompress(b bool) func(*AccessTunnel) error
SetCompress tells clients to use compression
func SetEncrypt ¶
func SetEncrypt(b bool) func(*AccessTunnel) error
SetEncrypt tells the router to use an encrypted leaseset
func SetFastRecieve ¶
func SetFastRecieve(b bool) func(*AccessTunnel) error
SetFastRecieve tells clients to use compression
func SetFilePath ¶
func SetFilePath(s string) func(*AccessTunnel) error
SetFilePath sets the path to save the config file at.
func SetHost ¶
func SetHost(s string) func(*AccessTunnel) error
SetHost sets the host of the service to forward
func SetInBackups ¶
func SetInBackups(u int) func(*AccessTunnel) error
SetInBackups sets the inbound tunnel backups
func SetInLength ¶
func SetInLength(u int) func(*AccessTunnel) error
SetInLength sets the number of hops inbound
func SetInQuantity ¶
func SetInQuantity(u int) func(*AccessTunnel) error
SetInQuantity sets the inbound tunnel quantity
func SetInVariance ¶
func SetInVariance(i int) func(*AccessTunnel) error
SetInVariance sets the variance of a number of hops inbound
func SetLeaseSetKey ¶
func SetLeaseSetKey(s string) func(*AccessTunnel) error
SetLeaseSetKey sets the host of the AccessTunnel's SAM bridge
func SetLeaseSetPrivateKey ¶
func SetLeaseSetPrivateKey(s string) func(*AccessTunnel) error
SetLeaseSetPrivateKey sets the host of the AccessTunnel's SAM bridge
func SetLeaseSetPrivateSigningKey ¶
func SetLeaseSetPrivateSigningKey(s string) func(*AccessTunnel) error
SetLeaseSetPrivateSigningKey sets the host of the AccessTunnel's SAM bridge
func SetMessageReliability ¶
func SetMessageReliability(s string) func(*AccessTunnel) error
SetMessageReliability sets the host of the AccessTunnel's SAM bridge
func SetName ¶
func SetName(s string) func(*AccessTunnel) error
SetName sets the host of the AccessTunnel's SAM bridge
func SetOutBackups ¶
func SetOutBackups(u int) func(*AccessTunnel) error
SetOutBackups sets the inbound tunnel backups
func SetOutLength ¶
func SetOutLength(u int) func(*AccessTunnel) error
SetOutLength sets the number of hops outbound
func SetOutQuantity ¶
func SetOutQuantity(u int) func(*AccessTunnel) error
SetOutQuantity sets the outbound tunnel quantity
func SetOutVariance ¶
func SetOutVariance(i int) func(*AccessTunnel) error
SetOutVariance sets the variance of a number of hops outbound
func SetPort ¶
func SetPort(s string) func(*AccessTunnel) error
SetPort sets the port of the service to forward
func SetReduceIdle ¶
func SetReduceIdle(b bool) func(*AccessTunnel) error
SetReduceIdle tells the connection to reduce it's tunnels during extended idle time.
func SetReduceIdleQuantity ¶
func SetReduceIdleQuantity(u int) func(*AccessTunnel) error
SetReduceIdleQuantity sets minimum number of tunnels to reduce to during idle time
func SetReduceIdleTime ¶
func SetReduceIdleTime(u int) func(*AccessTunnel) error
SetReduceIdleTime sets the time to wait before reducing tunnels to idle levels
func SetReduceIdleTimeMs ¶
func SetReduceIdleTimeMs(u int) func(*AccessTunnel) error
SetReduceIdleTimeMs sets the time to wait before reducing tunnels to idle levels in milliseconds
func SetSAMHost ¶
func SetSAMHost(s string) func(*AccessTunnel) error
SetSAMHost sets the host of the AccessTunnel's SAM bridge
func SetSAMPort ¶
func SetSAMPort(s string) func(*AccessTunnel) error
SetSAMPort sets the port of the AccessTunnel's SAM bridge using a string
func SetSaveFile ¶
func SetSaveFile(b bool) func(*AccessTunnel) error
SetSaveFile tells the router to save the tunnel's keys long-term
func SetSigType ¶
func SetSigType(s string) func(*AccessTunnel) error
SetSigType sets the type of the forwarder server
func SetType ¶
func SetType(s string) func(*AccessTunnel) error
SetType sets the type of the forwarder server
Types ¶
type AccessTunnel ¶
type AccessTunnel struct { samtunnel.SAMTunnel *samforwarder.SAMForwarder *i2ptunconf.Conf Whitelister []whitelister.WhiteLister // contains filtered or unexported fields }
AccessTunnel is a SAM-based generic tunnel accompanied by an HTTP-over-SAM based registrar of base64 public keys to use as a whitelist.
func NewAccessTunnel ¶
func NewAccessTunnel(host, port string) (*AccessTunnel, error)
NewAccessTunnel makes a new SAM forwarder with default options, accepts host:port arguments
func NewAccessTunnelFromOptions ¶
func NewAccessTunnelFromOptions(opts ...func(*AccessTunnel) error) (*AccessTunnel, error)
NewAccessTunnelFromOptions makes a new SAM forwarder with default options, accepts host:port arguments
func (*AccessTunnel) Base32 ¶
func (f *AccessTunnel) Base32() string
Base32 returns the base32 address where the local service is being forwarded
func (*AccessTunnel) Base32Readable ¶
func (f *AccessTunnel) Base32Readable() string
Base32Readable returns the base32 address where the local service is being forwarded
func (*AccessTunnel) Base64 ¶
func (f *AccessTunnel) Base64() string
Base64 returns the base64 address where the local service is being forwarded
func (*AccessTunnel) Check ¶
func (f *AccessTunnel) Check(requestBytesOrString interface{}) (string, interface{}, bool)
func (*AccessTunnel) Cleanup ¶
func (f *AccessTunnel) Cleanup()
func (*AccessTunnel) Config ¶
func (f *AccessTunnel) Config() *i2ptunconf.Conf
func (*AccessTunnel) GetType ¶
func (f *AccessTunnel) GetType() string
func (*AccessTunnel) ID ¶
func (f *AccessTunnel) ID() string
func (*AccessTunnel) Keys ¶
func (f *AccessTunnel) Keys() i2pkeys.I2PKeys
func (*AccessTunnel) Load ¶
func (s *AccessTunnel) Load() (samtunnel.SAMTunnel, error)
func (*AccessTunnel) Print ¶
func (f *AccessTunnel) Print() string
func (*AccessTunnel) Props ¶
func (f *AccessTunnel) Props() map[string]string
func (*AccessTunnel) Search ¶
func (f *AccessTunnel) Search(search string) string
func (*AccessTunnel) Serve ¶
func (f *AccessTunnel) Serve() error
Serve starts the SAM connection and and forwards the local host:port to i2p
func (*AccessTunnel) ServeHTTP ¶
func (f *AccessTunnel) ServeHTTP(rw http.ResponseWriter, rq *http.Request)
func (*AccessTunnel) ServeParent ¶
func (f *AccessTunnel) ServeParent()
func (*AccessTunnel) ServeRegistrar ¶
func (f *AccessTunnel) ServeRegistrar()
func (*AccessTunnel) Target ¶
func (f *AccessTunnel) Target() string
Target returns the host:port of the local service you want to forward to i2p
func (*AccessTunnel) Up ¶
func (f *AccessTunnel) Up() bool
func (*AccessTunnel) Whitelist ¶
func (f *AccessTunnel) Whitelist() []string