Help us shape the future of Go! Take the 2026 Go Developer Survey

samizdat

package
v0.0.156 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInbound

func NewInbound(
	ctx context.Context,
	router adapter.Router,
	logger log.ContextLogger,
	tag string,
	options option.SamizdatInboundOptions,
) (adapter.Inbound, error)

NewInbound creates a new Samizdat inbound adapter.

func NewOutbound

func NewOutbound(
	ctx context.Context,
	router adapter.Router,
	logger log.ContextLogger,
	tag string,
	options option.SamizdatOutboundOptions,
) (adapter.Outbound, error)

NewOutbound creates a new Samizdat outbound adapter.

func RegisterInbound

func RegisterInbound(registry *inbound.Registry)

RegisterInbound registers the Samizdat inbound adapter with the given registry.

func RegisterOutbound

func RegisterOutbound(registry *outbound.Registry)

RegisterOutbound registers the Samizdat outbound adapter with the given registry.

Types

type Inbound

type Inbound struct {
	inbound.Adapter
	// contains filtered or unexported fields
}

Inbound represents a Samizdat inbound adapter.

func (*Inbound) Close

func (i *Inbound) Close() error

Close stops the Samizdat inbound server and sing-box listener.

func (*Inbound) Start

func (i *Inbound) Start(stage adapter.StartStage) error

Start starts the Samizdat inbound server.

type Outbound

type Outbound struct {
	outbound.Adapter
	// contains filtered or unexported fields
}

Outbound represents a Samizdat outbound adapter.

func (*Outbound) Close

func (o *Outbound) Close() error

Close shuts down the Samizdat client.

func (*Outbound) DialContext

func (o *Outbound) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error)

DialContext dials a connection to the destination through the Samizdat proxy.

func (*Outbound) ListenPacket

func (o *Outbound) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error)

ListenPacket creates a UoT packet connection through the Samizdat proxy.

Jump to

Keyboard shortcuts

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