samforwarder

package
v0.33.2 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: MIT Imports: 16 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSAMClientForwarder

func NewSAMClientForwarder(host, port string) (samtunnel.SAMTunnel, error)

NewSAMClientForwarder makes a new SAM forwarder with default options, accepts host:port arguments

func NewSAMForwarder

func NewSAMForwarder(host, port string) (samtunnel.SAMTunnel, error)

NewSAMForwarder makes a new SAM forwarder with default options, accepts host:port arguments

func Proxy added in v0.33.2

func Proxy(srvConn, cliConn net.Conn)

func SetByteLimit added in v0.32.1

func SetByteLimit(u int64) func(*SAMForwarder) error

SetByteLimit sets the number of hops inbound

Types

type SAMClientForwarder

type SAMClientForwarder struct {
	*i2ptunconf.Conf

	SamKeys i2pkeys.I2PKeys
	Hasher  *hashhash.Hasher

	Bytes     map[string]int
	ByteLimit int
	// contains filtered or unexported fields
}

SAMClientForwarder is a tcp proxy that automatically forwards ports to i2p

func NewSAMClientForwarderFromOptions

func NewSAMClientForwarderFromOptions(opts ...func(samtunnel.SAMTunnel) error) (*SAMClientForwarder, error)

NewSAMClientForwarderFromOptions makes a new SAM forwarder with default options, accepts host:port arguments

func (*SAMClientForwarder) Base32

func (f *SAMClientForwarder) Base32() string

Base32 returns the base32 address of the local destination

func (*SAMClientForwarder) Base32Readable

func (f *SAMClientForwarder) Base32Readable() string

Base32Readable returns the base32 address where the local service is being forwarded

func (*SAMClientForwarder) Base64

func (f *SAMClientForwarder) Base64() string

Base64 returns the base64 address of the local destiantion

func (*SAMClientForwarder) Cleanup

func (f *SAMClientForwarder) Cleanup()

func (*SAMClientForwarder) Close

func (f *SAMClientForwarder) Close() error

Close shuts the whole thing down.

func (*SAMClientForwarder) Config added in v0.32.1

func (f *SAMClientForwarder) Config() *i2ptunconf.Conf

func (*SAMClientForwarder) Destination

func (f *SAMClientForwarder) Destination() string

Destination returns the destination of the i2p service you want to forward locally

func (*SAMClientForwarder) GetType

func (f *SAMClientForwarder) GetType() string

func (*SAMClientForwarder) ID

func (f *SAMClientForwarder) ID() string

func (*SAMClientForwarder) Keys

func (*SAMClientForwarder) Load

func (*SAMClientForwarder) Print

func (f *SAMClientForwarder) Print() string

func (*SAMClientForwarder) Props

func (f *SAMClientForwarder) Props() map[string]string

func (*SAMClientForwarder) Search

func (f *SAMClientForwarder) Search(search string) string

func (*SAMClientForwarder) Serve

func (f *SAMClientForwarder) Serve() error

Serve starts the SAM connection and and forwards the local host:port to i2p

func (*SAMClientForwarder) Target

func (f *SAMClientForwarder) Target() string

Target returns the host:port of the local service you want to forward to i2p

func (*SAMClientForwarder) Up

func (f *SAMClientForwarder) Up() bool

type SAMForwarder

type SAMForwarder struct {
	*i2ptunconf.Conf

	SamKeys i2pkeys.I2PKeys
	Hasher  *hashhash.Hasher

	//publishListen *sam3.StreamListener
	Bytes     map[string]int64
	ByteLimit int64
	// contains filtered or unexported fields
}

SAMForwarder is a structure which automatically configured the forwarding of a local service to i2p over the SAM API.

func NewSAMForwarderFromOptions

func NewSAMForwarderFromOptions(opts ...func(samtunnel.SAMTunnel) error) (*SAMForwarder, error)

NewSAMForwarderFromOptions makes a new SAM forwarder with default options, accepts host:port arguments

func (*SAMForwarder) Base32

func (f *SAMForwarder) Base32() string

Base32 returns the base32 address where the local service is being forwarded

func (*SAMForwarder) Base32Readable

func (f *SAMForwarder) Base32Readable() string

Base32Readable returns the base32 address where the local service is being forwarded

func (*SAMForwarder) Base64

func (f *SAMForwarder) Base64() string

Base64 returns the base64 address where the local service is being forwarded

func (*SAMForwarder) Cleanup

func (f *SAMForwarder) Cleanup()

func (*SAMForwarder) ClientBase64 added in v0.32.1

func (f *SAMForwarder) ClientBase64(conn net.Conn) string

func (*SAMForwarder) Close

func (f *SAMForwarder) Close() error

Close shuts the whole thing down.

func (*SAMForwarder) Config added in v0.32.1

func (f *SAMForwarder) Config() *i2ptunconf.Conf

func (*SAMForwarder) GetType

func (f *SAMForwarder) GetType() string

func (*SAMForwarder) HTTPRequestBytes

func (f *SAMForwarder) HTTPRequestBytes(conn net.Conn) ([]byte, *http.Request, error)

func (*SAMForwarder) HTTPResponseBytes

func (f *SAMForwarder) HTTPResponseBytes(conn net.Conn, req *http.Request) ([]byte, error)

func (*SAMForwarder) ID

func (f *SAMForwarder) ID() string

func (*SAMForwarder) Keys

func (f *SAMForwarder) Keys() i2pkeys.I2PKeys

func (*SAMForwarder) Load

func (s *SAMForwarder) Load() (samtunnel.SAMTunnel, error)

func (*SAMForwarder) Print

func (f *SAMForwarder) Print() string

func (*SAMForwarder) Props

func (f *SAMForwarder) Props() map[string]string

func (*SAMForwarder) Search

func (f *SAMForwarder) Search(search string) string

func (*SAMForwarder) Serve

func (f *SAMForwarder) Serve() error

Serve starts the SAM connection and and forwards the local host:port to i2p

func (*SAMForwarder) Target

func (f *SAMForwarder) Target() string

Target returns the host:port of the local service you want to forward to i2p

func (*SAMForwarder) Up

func (f *SAMForwarder) Up() bool

Jump to

Keyboard shortcuts

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