hy2

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DialHY2

func DialHY2(u *url.URL, o *proxyclient.Options) (http.RoundTripper, error)

DialHY2 creates a RoundTripper for Hysteria2 proxy

Types

type HY2Config

type HY2Config struct {
	Auth              string
	Address           string
	Port              int
	SNI               string
	Insecure          bool
	ObfsType          string // "salamander" or "gecko"
	ObfsPassword      string
	ObfsMinPacketSize int
	ObfsMaxPacketSize int
	Up                string // e.g., "100 mbps"
	Down              string // e.g., "200 mbps"
	FastOpen          bool
	Remark            string
	// contains filtered or unexported fields
}

HY2Config stores Hysteria2 URL parameters

type HY2URL

type HY2URL struct {
	Config *HY2Config
}

func ParseHY2URL

func ParseHY2URL(u *url.URL) (*HY2URL, error)

ParseHY2URL parses hysteria2:// or hy2:// URL

func (*HY2URL) Host

func (h *HY2URL) Host() string

func (*HY2URL) Name

func (h *HY2URL) Name() string

func (*HY2URL) Opaque

func (h *HY2URL) Opaque() string

func (*HY2URL) Password

func (h *HY2URL) Password() string

func (*HY2URL) Port

func (h *HY2URL) Port() string

func (*HY2URL) Protocol

func (h *HY2URL) Protocol() string

func (*HY2URL) Raw

func (h *HY2URL) Raw() *url.URL

func (*HY2URL) User

func (h *HY2URL) User() string

Jump to

Keyboard shortcuts

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