outbound

package
v0.0.0-...-a5406a4 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package outbound 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

Constants

View Source
const (
	// TCP_FASTOPEN_CONNECT for out-going connections.
	TCP_FASTOPEN_CONNECT = 30 //nolint: revive,stylecheck
)

Variables

This section is empty.

Functions

func SetMultiPathTCP

func SetMultiPathTCP(dialer *net.Dialer, use bool)

Types

type DialerControl

type DialerControl = func(network string, address string, c syscall.RawConn) error

func NewDialerControlFromOptions

func NewDialerControlFromOptions(option *SocketOptions) DialerControl

type Outbound

type Outbound interface {
	Dial(network, address string) (net.Conn, error)
	DialTCP(network string, laddr, raddr *net.TCPAddr) (*net.TCPConn, error)
	Handshake(r io.Reader, w io.Writer, network, address string) error
}
var SystemOutbound Outbound = &systemOutbound{}

func NewSystemOutbound

func NewSystemOutbound(options *SocketOptions) Outbound

type SocketOptions

type SocketOptions struct {
	Mark          int    `json:",omitempty"`
	Interface     string `json:",omitempty"`
	TCPFastOpen   bool   `json:",omitempty"`
	TCPCongestion string `json:",omitempty"`
	MultiPathTCP  bool   `json:",omitempty"`
}

Directories

Path Synopsis
Package socks implemented SOCKS protocol version 4, 4a and 5 (RFC1928).
Package socks implemented SOCKS protocol version 4, 4a and 5 (RFC1928).

Jump to

Keyboard shortcuts

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