hysteria2

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveTimeConn

type ActiveTimeConn struct {
	net.Conn
	// contains filtered or unexported fields
}

func (*ActiveTimeConn) Read

func (c *ActiveTimeConn) Read(b []byte) (int, error)

type ActiveTimeHyUDPConn

type ActiveTimeHyUDPConn struct {
	client.HyUDPConn
	// contains filtered or unexported fields
}

func (*ActiveTimeHyUDPConn) Receive

func (c *ActiveTimeHyUDPConn) Receive() ([]byte, string, error)

type Config

type Config struct {
	Tag                        string
	PacketListener             i.PacketListener
	HysteriaClientConfig       *client.Config
	SalamanderPassword         string
	Address                    net.Address
	PortSelector               i.PortSelector
	IpResolverForNodeAddress   i.IPResolver
	DomainStrategy             domain.DomainStrategy
	IpResolverForTargetAddress i.IPResolver
	RejectQuic                 bool
}

type HyPacketConn

type HyPacketConn struct {
	// contains filtered or unexported fields
}

Adapter for client.HyUDPConn to implement net.PacketConn

func (*HyPacketConn) Close

func (c *HyPacketConn) Close() error

Close implements net.PacketConn

func (*HyPacketConn) LocalAddr

func (c *HyPacketConn) LocalAddr() net.Addr

LocalAddr implements net.PacketConn

func (*HyPacketConn) ReadFrom

func (c *HyPacketConn) ReadFrom(p []byte) (n int, addr net.Addr, err error)

ReadFrom implements net.PacketConn

func (*HyPacketConn) SetDeadline

func (c *HyPacketConn) SetDeadline(t time.Time) error

SetDeadline implements net.PacketConn

func (*HyPacketConn) SetReadDeadline

func (c *HyPacketConn) SetReadDeadline(t time.Time) error

SetReadDeadline implements net.PacketConn

func (*HyPacketConn) SetWriteDeadline

func (c *HyPacketConn) SetWriteDeadline(t time.Time) error

SetWriteDeadline implements net.PacketConn

func (*HyPacketConn) WriteTo

func (c *HyPacketConn) WriteTo(p []byte, addr net.Addr) (n int, err error)

WriteTo implements net.PacketConn

type HyUdpConnToNetConn

type HyUdpConnToNetConn struct {
	// contains filtered or unexported fields
}

func (*HyUdpConnToNetConn) Close

func (c *HyUdpConnToNetConn) Close() error

func (*HyUdpConnToNetConn) LocalAddr

func (c *HyUdpConnToNetConn) LocalAddr() net.Addr

func (*HyUdpConnToNetConn) Read

func (c *HyUdpConnToNetConn) Read(p []byte) (n int, err error)

func (*HyUdpConnToNetConn) RemoteAddr

func (c *HyUdpConnToNetConn) RemoteAddr() net.Addr

func (*HyUdpConnToNetConn) SetDeadline

func (c *HyUdpConnToNetConn) SetDeadline(t time.Time) error

func (*HyUdpConnToNetConn) SetReadDeadline

func (c *HyUdpConnToNetConn) SetReadDeadline(t time.Time) error

func (*HyUdpConnToNetConn) SetWriteDeadline

func (c *HyUdpConnToNetConn) SetWriteDeadline(t time.Time) error

func (*HyUdpConnToNetConn) Write

func (c *HyUdpConnToNetConn) Write(p []byte) (int, error)

type HysClient

type HysClient struct {
	IpResolverForNodeAddress   i.IPResolver
	IpResolverForTargetAddress i.IPResolver
	DomainStrategy             domain.DomainStrategy

	RejectQuic bool
	sync.Mutex
	// contains filtered or unexported fields
}

func NewClient

func NewClient(config *Config) (*HysClient, error)

func (*HysClient) HandleFlow

func (d *HysClient) HandleFlow(ctx context.Context, dst net.Destination, rw buf.ReaderWriter) error

func (*HysClient) HandlePacketConn

func (d *HysClient) HandlePacketConn(ctx context.Context, dst net.Destination, p udp.PacketReaderWriter) error

func (*HysClient) ListenPacket

func (d *HysClient) ListenPacket(ctx context.Context, dst net.Destination) (udp.UdpConn, error)

func (*HysClient) ProxyDial

func (d *HysClient) ProxyDial(ctx context.Context, dst net.Destination,
	initialData buf.MultiBuffer) (i.FlowConn, error)

func (*HysClient) Tag

func (d *HysClient) Tag() string

Jump to

Keyboard shortcuts

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