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

xtls

package
v1.0.26 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodePbk

func DecodePbk(s string) ([]byte, error)

DecodePbk reads a 32-byte X25519 public key as hex or base64 (URL or std).

func DecodeSid

func DecodeSid(s string) ([]byte, error)

DecodeSid reads a Reality short id as hex, 0–8 bytes. Empty is valid.

func DialReality

func DialReality(raw net.Conn, r Reality, insecure bool) (net.Conn, error)

DialReality wraps raw in a uTLS REALITY handshake.

func DialXHTTP

func DialXHTTP(tlsConn net.Conn, x XHTTP) (net.Conn, error)

DialXHTTP runs an HTTP/2 POST over an already-handshaked TLS or REALITY conn.

func HelloID

func HelloID(fp string) utls.ClientHelloID

HelloID maps a share-URI fp= value to a uTLS ClientHello.

Types

type Reality

type Reality struct {
	SNI         string
	Fingerprint string
	PublicKey   string
	ShortID     string
}

Reality is the share-URI fields a REALITY handshake needs.

type XHTTP

type XHTTP struct {
	Host string
	SNI  string
	Addr string
	Path string
}

XHTTP is path / Host for a stream-one POST.

Jump to

Keyboard shortcuts

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