socks5

package
v0.6.160 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultStreamProtocol warpnet.WarpProtocolID = "/socks5/exit/1.0.0"
)
View Source
const ErrTelegramUnreachable warpnet.WarpError = "no Telegram DC reachable"

Variables

This section is empty.

Functions

func NewServer

func NewServer(
	ctx context.Context,
	port, psk string,
	m MetricsPusher,
) *socksServer

func StreamSocksExitHandler

func StreamSocksExitHandler(s warpnet.WarpStream)

Types

type GeoResponse added in v0.6.54

type GeoResponse struct {
	Status      string `json:"status"`
	Country     string `json:"country"`
	CountryCode string `json:"countryCode"`
}

type MetricsPusher added in v0.6.63

type MetricsPusher interface {
	PushSocksConnections(nodeId, ip string)
	RemoveSocksConnections(nodeId, ip string)
}

type Streamer added in v0.6.54

type Streamer interface {
	Node() warpnet.P2PNode
	NodeInfo() warpnet.NodeInfo
	Peerstore() warpnet.WarpPeerstore
	Network() warpnet.WarpNetwork
	SimpleConnect(warpnet.WarpAddrInfo) error
}

Jump to

Keyboard shortcuts

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