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

algeneva

package
v0.0.163 Latest Latest
Warning

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

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

Documentation

Overview

Package algeneva provides a sing-box compatible implementation of the Application Layer Geneva HTTP protocol. The protocol works by applying transformations to the HTTP request to bypass censorship, and for this reason, the request must be sent in plaintext. However, algeneva will encrypt the connection after the connection is established with the proxy server using the provided TLS config. In order to look like normal traffic, algeneva will upgrade the connection to a secure WebSocket connection.

More information about the protocol can be found at github.com/getlantern/algeneva and https://www.usenix.org/system/files/sec22-harrity.pdf

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.ALGenevaInboundOptions) (adapter.Inbound, error)

NewInbound creates a new algeneva inbound adapter.

func NewOutbound

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

NewOutbound creates a new Application Layer Geneva HTTP outbound adapter.

func RegisterInbound

func RegisterInbound(registry *inbound.Registry)

func RegisterOutbound

func RegisterOutbound(registry *outbound.Registry)

Types

type Inbound

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

Inbound is a wrapper around [http.Inbound] that listens for connections using the Application Layer Geneva HTTP protocol.

func (*Inbound) Close

func (a *Inbound) Close() error

func (*Inbound) NewConnectionEx

func (a *Inbound) NewConnectionEx(ctx context.Context, conn net.Conn, metadata adapter.InboundContext, onClose N.CloseHandlerFunc)

func (*Inbound) Start

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

type Outbound

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

Outbound is a wrapper around sHTTP.Client that implements the Application Layer Geneva HTTP protocol.

func (*Outbound) DialContext

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

DialContext dials a connection to the destination.

func (*Outbound) ListenPacket

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

ListenPacket is not supported.

Jump to

Keyboard shortcuts

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