Documentation ¶
Index ¶
- Variables
- func DialTCP(addr string) (net.Conn, error)
- func DialUDP(address string) (*net.UDPConn, error)
- func ListenLocalUDP() (net.PacketConn, error)
- func TlsConfigQuicALPN(config *tls.Config) *tls.Config
- type Conn
- type Dialer
- type GrpcOptions
- type KcpOptions
- type ObfsOptions
- type Options
- type QuicOptions
- type TcpConnBound
- type TcpConnBoundHandler
- type Type
- type UdpConnBound
- type UdpConnBoundHandler
- type WsOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultDialerOutboundOption = &defaultDialerOutboundOption{}
View Source
var DefaultGrpcOptions = &GrpcOptions{}
View Source
var DefaultKcpOptions = &KcpOptions{ Crypt: "none", Key: "", Mode: "normal", Mtu: 1350, SndWnd: 2048, RevWnd: 2048, DataShard: 10, ParityShard: 3, Dscp: 46, Resend: 2, NoCompress: true, AckNoDelay: false, Interval: 40, Nc: 1, SockBuf: 16777217, SmuxVer: 1, SmuxBuf: 16777217, StreamBuf: 2097152, KeepAlive: 10, Conns: 3, }
View Source
var DefaultObfsOptions = &ObfsOptions{
Host: "www.baidu.com",
}
View Source
var DefaultOptions = &defaultDialerOption{}
View Source
var DefaultQuicOptions = &QuicOptions{ HandshakeIdleTimeout: 5 * time.Second, KeepAlivePeriod: 30 * time.Second, MaxIdleTimeout: 30 * time.Second, Conns: 3, }
View Source
var DefaultWsOptions = &WsOptions{ Host: "www.baidu.com", Path: "/ws", SndBuffer: 4096, RevBuffer: 4096, Compress: false, TLS: false, UserAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36", }
Functions ¶
func ListenLocalUDP ¶
func ListenLocalUDP() (net.PacketConn, error)
ListenLocalUDP create an unconnected udp connection
Types ¶
type GrpcOptions ¶
type GrpcOptions struct { SndBuffer int RevBuffer int TLS bool Hostname string CAPath string CertPath string KeyPath string }
func (*GrpcOptions) Update ¶
func (opts *GrpcOptions) Update()
type KcpOptions ¶
type KcpOptions struct { Key string Crypt string Mode string Mtu int SndWnd int RevWnd int DataShard int ParityShard int Dscp int NoCompress bool AckNoDelay bool NoDelay int Interval int Resend int Nc int SockBuf int SmuxVer int SmuxBuf int StreamBuf int KeepAlive int Conns int BC kcp.BlockCrypt }
func (*KcpOptions) Update ¶
func (opts *KcpOptions) Update()
type ObfsOptions ¶
type ObfsOptions struct {
Host string
}
func (*ObfsOptions) Update ¶
func (opts *ObfsOptions) Update()
type QuicOptions ¶
type QuicOptions struct { HandshakeIdleTimeout time.Duration KeepAlivePeriod time.Duration MaxIdleTimeout time.Duration Conns int }
func (*QuicOptions) Update ¶
func (opts *QuicOptions) Update()
type TcpConnBoundHandler ¶
type UdpConnBound ¶
type UdpConnBound interface {
UdpConn(net.PacketConn) net.PacketConn
}
type UdpConnBoundHandler ¶
type UdpConnBoundHandler func(net.PacketConn) net.PacketConn
func (UdpConnBoundHandler) UdpConn ¶
func (f UdpConnBoundHandler) UdpConn(c net.PacketConn) net.PacketConn
Click to show internal directories.
Click to hide internal directories.