import "github.com/v2ray/v2ray-core/transport/internet/tcp"
config.go config.pb.go dialer.go errors.generated.go hub.go sockopt_linux.go tcp.go
const SO_ORIGINAL_DST = 80
var File_transport_internet_tcp_config_proto protoreflect.FileDescriptor
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(conn internet.Connection) (net.Destination, error)
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 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 }
Deprecated: Use Config.ProtoReflect.Descriptor instead.
func (x *Config) GetHeaderSettings() *serial.TypedMessage
func (x *Config) ProtoReflect() protoreflect.Message
type Listener struct {
// contains filtered or unexported fields
}
Listener is an internet.Listener that listens for TCP connections.
Addr implements internet.Listener.Addr.
Close implements internet.Listener.Close.
Package tcp imports 20 packages (graph) and is imported by 1 packages. Updated 2020-10-21. Refresh now. Tools for package owners.