Documentation
¶
Index ¶
- Constants
- Variables
- func NewDialer(name string, nextDialer netproxy.Dialer, header Header) (netproxy.Dialer, error)
- func Register(name string, c Creator)
- func TCPAddrToUDPAddr(addr *net.TCPAddr) *net.UDPAddr
- type Creator
- type Flags
- type Header
- type Metadata
- type MetadataCmd
- type MetadataType
- type Protocol
Constants ¶
View Source
const (
Flags_Tuic_UdpRelayModeQuic = 1 << iota
)
View Source
const (
Flags_VMess_UsePacketAddr = 1 << iota
)
Variables ¶
View Source
var ( ErrFailAuth = fmt.Errorf("fail to authenticate") ErrReplayAttack = fmt.Errorf("replay attack") )
View Source
var Mapper = make(map[string]Creator)
Functions ¶
Types ¶
type Header ¶
type Header struct {
ProxyAddress string
SNI string
Feature1 interface{}
// 扩展特性字段用于不同协议方言的临时透传
Feature2 interface{}
Feature3 interface{}
Feature4 interface{}
Feature5 interface{}
// 额外键值对参数(如 pqv、0rtt token 等)
Extra map[string]string
TlsConfig *tls.Config
Cipher string
User string
Password string
IsClient bool
Flags Flags
}
type Metadata ¶
type Metadata struct {
Type MetadataType
Hostname string
Port uint16
// Cmd is valid only if Type is MetadataTypeMsg.
Cmd MetadataCmd
Cipher string
IsClient bool
}
func ParseMetadata ¶
type MetadataCmd ¶
type MetadataCmd uint8
const ( MetadataCmdPing MetadataCmd = iota MetadataCmdSyncPassages MetadataCmdResponse )
type MetadataType ¶
type MetadataType int
const ( MetadataTypeIPv4 MetadataType = iota MetadataTypeIPv6 MetadataTypeDomain MetadataTypeMsg MetadataTypeInvalid )
Click to show internal directories.
Click to hide internal directories.