outline

package
v0.0.221 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package outline implements the smart dialer outbound using the outline-sdk package. You can find more details here: https://github.com/Jigsaw-Code/outline-sdk/tree/v0.0.18/x/smart

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOutbound

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

NewOutbound creates a proxyless outbond that uses the proxyless transport for dialing

func RegisterOutbound

func RegisterOutbound(registry *outbound.Registry)

RegisterOutbound registers the outline outbound to the registry

Types

type Outbound

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

Outbound implements the smart dialer outbound from outline sdk

func (*Outbound) DialContext

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

DialContext dials destination through the smart dialer, which needs a hostname for its DNS and TLS strategies. It uses the destination's own hostname, else the inbound metadata's domain (sniffed, or from a reverse DNS mapping) when the destination is an IP, else the IP. Callers that dial the outbound directly, such as a remote rule-set's download_detour, carry no metadata. A nested dial with an IP destination, such as a DNS server using this outbound as its detour, can still inherit a parent connection's unrelated domain.

func (*Outbound) ListenPacket

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

ListenPacket isn't implemented

Jump to

Keyboard shortcuts

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