tecklr

package module
v0.0.0-...-74637ed Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: AGPL-3.0 Imports: 12 Imported by: 0

README

A throttled, encrypted, compressed, kept-alive, long-lived, rate-limited TCP tunnel.


General guidelines for this repository:

  1. License: this code is AGPLv3-licensed; by using it, you agree to comply with the terms.
  2. Issues: only bug reports will be reviewed; do not submit support or feature requests.
  3. Pull requests: accepted only if they directly address a reported bug linked to an issue.

This repository is not intended for general public use so there is no documentation.

Documentation

Index

Constants

View Source
const IdleTimeout = 10 * time.Second

Variables

View Source
var Heartbeat = []byte("heartbeat")

Functions

This section is empty.

Types

type Listener

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

func Listen

func Listen(address string, limit int, seconds int, logger *log.Logger) (Listener, error)

func (*Listener) Accept

func (l *Listener) Accept() (Tunnel, error)

func (*Listener) Close

func (l *Listener) Close() error

type RateLimiter

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

func NewRateLimiter

func NewRateLimiter(limit int, seconds int) RateLimiter

func (*RateLimiter) CanGo

func (rl *RateLimiter) CanGo(key string) bool

type RateLimiterRecord

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

type Throttle

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

func NewThrottle

func NewThrottle(mbps float64) Throttle

type Tunnel

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

func DialTimeout

func DialTimeout(address string, timeout time.Duration, logger *log.Logger) (Tunnel, error)

func (*Tunnel) Die

func (t *Tunnel) Die()

func (*Tunnel) IsDead

func (t *Tunnel) IsDead() bool

func (*Tunnel) ReadMessage

func (t *Tunnel) ReadMessage() ([]byte, error)

func (*Tunnel) SetKey

func (t *Tunnel) SetKey(key []byte)

func (*Tunnel) SetThrottle

func (t *Tunnel) SetThrottle(throttle *Throttle)

func (*Tunnel) WriteMessage

func (t *Tunnel) WriteMessage(message []byte) error

Jump to

Keyboard shortcuts

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