Documentation
¶
Overview ¶
Package network contains all protocols for remote connection used by ZBProxy.
To implement an outbound protocol, one needs to do the following: 1. Implement the interface(s) below.
Index ¶
- Variables
- func SetDialerMultiPathTCP(dialer *net.Dialer, use bool)
- func SetDialerTCPKeepAlive(dialer *net.Dialer, config KeepAliveConfig)
- func SetListenerMultiPathTCP(listenConfig *net.ListenConfig, use bool)
- func SetListenerTCPKeepAlive(listenConfig *net.ListenConfig, config KeepAliveConfig)
- type ControlFunc
- type Dialer
- type Handshake
- type InboundSocketOptions
- type KeepAliveConfig
- type OutboundSocketOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var SystemDialer = &systemOutbound{}
Functions ¶
func SetDialerMultiPathTCP ¶
func SetDialerTCPKeepAlive ¶
func SetDialerTCPKeepAlive(dialer *net.Dialer, config KeepAliveConfig)
func SetListenerMultiPathTCP ¶
func SetListenerMultiPathTCP(listenConfig *net.ListenConfig, use bool)
func SetListenerTCPKeepAlive ¶
func SetListenerTCPKeepAlive(listenConfig *net.ListenConfig, config KeepAliveConfig)
Types ¶
type ControlFunc ¶
func NewDialerControlFromOptions ¶
func NewDialerControlFromOptions(option *OutboundSocketOptions) ControlFunc
func NewListenerControlFromOptions ¶
func NewListenerControlFromOptions(option *InboundSocketOptions) ControlFunc
type Dialer ¶
type Dialer interface {
DialContext(ctx context.Context, network, address string) (net.Conn, error)
}
func NewSystemDialer ¶
func NewSystemDialer(options *OutboundSocketOptions) Dialer
type InboundSocketOptions ¶
type InboundSocketOptions struct { Mark int `json:",omitempty"` SendThrough string `json:",omitempty"` TCPCongestion string `json:",omitempty"` TCPFastOpen bool `json:",omitempty"` MultiPathTCP bool `json:",omitempty"` // contains filtered or unexported fields }
func (*InboundSocketOptions) KeepAliveConfig ¶
func (o *InboundSocketOptions) KeepAliveConfig() (c KeepAliveConfig)
type KeepAliveConfig ¶
type KeepAliveConfig = net.KeepAliveConfig
type OutboundSocketOptions ¶
type OutboundSocketOptions struct { Mark int `json:",omitempty"` Interface string `json:",omitempty"` SendThrough string `json:",omitempty"` TCPCongestion string `json:",omitempty"` TCPFastOpen bool `json:",omitempty"` MultiPathTCP bool `json:",omitempty"` // contains filtered or unexported fields }
func ConvertLegacyOutboundOptions ¶
func ConvertLegacyOutboundOptions(inbound *InboundSocketOptions) *OutboundSocketOptions
func (*OutboundSocketOptions) KeepAliveConfig ¶
func (o *OutboundSocketOptions) KeepAliveConfig() (c KeepAliveConfig)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.