Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SimulateWebBrowse ¶ added in v0.1.0
SimulateWebBrowse requests /index.html from the decoy site, parses all linked resources (src/href), and returns a list of absolute URLs (in order). If a link is a relative path (starts with /), it will be joined with decoyBaseURL.
Types ¶
type BandwidthConfig ¶
BandwidthConfig describes the maximum bandwidth that the server can use, in bytes per second.
type Client ¶
func NewReconnectableClient ¶
func NewReconnectableClient(configFunc func() (*Config, error), connectedFunc func(Client, *HandshakeInfo, int), lazy bool) (Client, error)
NewReconnectableClient creates a reconnectable client. If lazy is true, the client will not connect until the first call to TCP() or UDP(). We use a function for config mainly to delay config evaluation (which involves DNS resolution) until the actual connection attempt.
type Config ¶
type Config struct {
ConnFactory ConnFactory
ServerAddr net.Addr
Auth string
TLSConfig TLSConfig
QUICConfig QUICConfig
BandwidthConfig BandwidthConfig
FastOpen bool
DecoyURL string
Protocol ProtocolType
ProtocolParam string
EnableUQUIC bool
UQUICSpecID quic.QUICID // 类型必须为 quic.QUICID
// contains filtered or unexported fields
}
type ConnFactory ¶
type ConnFactory interface {
New(net.Addr) (net.PacketConn, error)
}
type HandshakeInfo ¶
type ProtocolType ¶ added in v0.3.1
type ProtocolType string
ProtocolType 定义了客户端支持的协议类型
const (
ProtocolTypeDefault ProtocolType = "default" // 默认协议类型
)
type QUICConfig ¶
type QUICConfig struct {
InitialStreamReceiveWindow uint64
MaxStreamReceiveWindow uint64
InitialConnectionReceiveWindow uint64
MaxConnectionReceiveWindow uint64
MaxIdleTimeout time.Duration
KeepAlivePeriod time.Duration
DisablePathMTUDiscovery bool
}
QUICConfig contains the QUIC configuration fields that we want to expose to the user.