proxy

package
v0.0.0-...-0a4c363 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: BSD-3-Clause Imports: 21 Imported by: 0

README

This is a standalone (not browser-based) version of the Snowflake proxy.

Usage: ./proxy

Documentation

Index

Constants

View Source
const (
	NATUnknown      = "unknown"
	NATRestricted   = "restricted"
	NATUnrestricted = "unrestricted"
)

Variables

This section is empty.

Functions

func CopyLoop

func CopyLoop(c1 io.ReadWriteCloser, c2 io.ReadWriteCloser)

Types

type BytesLogger

type BytesLogger interface {
	AddOutbound(int)
	AddInbound(int)
	ThroughputSummary() string
}

type BytesNullLogger

type BytesNullLogger struct{}

Default BytesLogger does nothing.

func (BytesNullLogger) AddInbound

func (b BytesNullLogger) AddInbound(amount int)

func (BytesNullLogger) AddOutbound

func (b BytesNullLogger) AddOutbound(amount int)

func (BytesNullLogger) ThroughputSummary

func (b BytesNullLogger) ThroughputSummary() string

type BytesSyncLogger

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

BytesSyncLogger uses channels to safely log from multiple sources with output occuring at reasonable intervals.

func NewBytesSyncLogger

func NewBytesSyncLogger() *BytesSyncLogger

NewBytesSyncLogger returns a new BytesSyncLogger and starts it loggin.

func (*BytesSyncLogger) AddInbound

func (b *BytesSyncLogger) AddInbound(amount int)

func (*BytesSyncLogger) AddOutbound

func (b *BytesSyncLogger) AddOutbound(amount int)

func (*BytesSyncLogger) ThroughputSummary

func (b *BytesSyncLogger) ThroughputSummary() string

type SignalingServer

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

func (*SignalingServer) Post

func (s *SignalingServer) Post(path string, payload io.Reader) ([]byte, error)

type SnowflakeProxy

type SnowflakeProxy struct {
	Capacity           uint
	StunURL            string
	BrokerURL          string
	KeepLocalAddresses bool
	RelayURL           string
	Tokens             chan bool
	ConnectionId       string
	// contains filtered or unexported fields
}

func (*SnowflakeProxy) StartProxy

func (p *SnowflakeProxy) StartProxy()

Jump to

Keyboard shortcuts

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