core: v2ray.com/core/transport/internet/tcp Index | Files

package tcp

import "v2ray.com/core/transport/internet/tcp"

Index

Package Files

config.go config.pb.go dialer.go errors.generated.go hub.go sockopt_linux.go tcp.go

Constants

const SO_ORIGINAL_DST = 80

Variables

var File_transport_internet_tcp_config_proto protoreflect.FileDescriptor

func Dial Uses

func Dial(ctx context.Context, dest net.Destination, streamSettings *internet.MemoryStreamConfig) (internet.Connection, error)

Dial dials a new TCP connection to the given destination.

func GetOriginalDestination Uses

func GetOriginalDestination(conn internet.Connection) (net.Destination, error)

func ListenTCP Uses

func ListenTCP(ctx context.Context, address net.Address, port net.Port, streamSettings *internet.MemoryStreamConfig, handler internet.ConnHandler) (internet.Listener, error)

ListenTCP creates a new Listener based on configurations.

type Config Uses

type Config struct {
    HeaderSettings      *serial.TypedMessage `protobuf:"bytes,2,opt,name=header_settings,json=headerSettings,proto3" json:"header_settings,omitempty"`
    AcceptProxyProtocol bool                 `protobuf:"varint,3,opt,name=accept_proxy_protocol,json=acceptProxyProtocol,proto3" json:"accept_proxy_protocol,omitempty"`
    // contains filtered or unexported fields
}

func (*Config) Descriptor Uses

func (*Config) Descriptor() ([]byte, []int)

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetAcceptProxyProtocol Uses

func (x *Config) GetAcceptProxyProtocol() bool

func (*Config) GetHeaderSettings Uses

func (x *Config) GetHeaderSettings() *serial.TypedMessage

func (*Config) ProtoMessage Uses

func (*Config) ProtoMessage()

func (*Config) ProtoReflect Uses

func (x *Config) ProtoReflect() protoreflect.Message

func (*Config) Reset Uses

func (x *Config) Reset()

func (*Config) String Uses

func (x *Config) String() string

type Listener Uses

type Listener struct {
    // contains filtered or unexported fields
}

Listener is an internet.Listener that listens for TCP connections.

func (*Listener) Addr Uses

func (v *Listener) Addr() net.Addr

Addr implements internet.Listener.Addr.

func (*Listener) Close Uses

func (v *Listener) Close() error

Close implements internet.Listener.Close.

Package tcp imports 20 packages (graph) and is imported by 23 packages. Updated 2020-10-15. Refresh now. Tools for package owners.