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 ¶
- func NewInbound(ctx context.Context, router adapter.Router, logger log.ContextLogger, ...) (adapter.Inbound, error)
- func NewOutbound(ctx context.Context, router adapter.Router, logger log.ContextLogger, ...) (adapter.Outbound, error)
- func RegisterInbound(registry *inbound.Registry)
- func RegisterOutbound(registry *outbound.Registry)
- type Inbound
- type Outbound
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 RegisterOutbound ¶
Types ¶
type Inbound ¶
Inbound is a wrapper around [http.Inbound] that listens for connections using the Application Layer Geneva HTTP protocol.
func (*Inbound) NewConnectionEx ¶
func (a *Inbound) NewConnectionEx(ctx context.Context, conn net.Conn, metadata adapter.InboundContext, onClose N.CloseHandlerFunc)
type Outbound ¶
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.