shadowsocks_2022

package
v0.0.0-...-694aa1c Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MPL-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proxy_shadowsocks_2022_config_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ClientConfig

type ClientConfig struct {
	Address           *net.IPOrDomain `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Port              uint32          `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	Method            string          `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"`
	Key               string          `protobuf:"bytes,4,opt,name=key,proto3" json:"key,omitempty"`
	UdpOverTcp        bool            `protobuf:"varint,5,opt,name=udp_over_tcp,json=udpOverTcp,proto3" json:"udp_over_tcp,omitempty"`
	UdpOverTcpVersion uint32          `protobuf:"varint,6,opt,name=udp_over_tcp_version,json=udpOverTcpVersion,proto3" json:"udp_over_tcp_version,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientConfig) Descriptor deprecated

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

Deprecated: Use ClientConfig.ProtoReflect.Descriptor instead.

func (*ClientConfig) GetAddress

func (x *ClientConfig) GetAddress() *net.IPOrDomain

func (*ClientConfig) GetKey

func (x *ClientConfig) GetKey() string

func (*ClientConfig) GetMethod

func (x *ClientConfig) GetMethod() string

func (*ClientConfig) GetPort

func (x *ClientConfig) GetPort() uint32

func (*ClientConfig) GetUdpOverTcp

func (x *ClientConfig) GetUdpOverTcp() bool

func (*ClientConfig) GetUdpOverTcpVersion

func (x *ClientConfig) GetUdpOverTcpVersion() uint32

func (*ClientConfig) ProtoMessage

func (*ClientConfig) ProtoMessage()

func (*ClientConfig) ProtoReflect

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

func (*ClientConfig) Reset

func (x *ClientConfig) Reset()

func (*ClientConfig) String

func (x *ClientConfig) String() string

type Inbound

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

func NewServer

func NewServer(ctx context.Context, config *ServerConfig) (*Inbound, error)

func (*Inbound) Network

func (i *Inbound) Network() []net.Network

func (*Inbound) NewConnection

func (i *Inbound) NewConnection(ctx context.Context, conn net.Conn, metadata M.Metadata) error

func (*Inbound) NewError

func (i *Inbound) NewError(ctx context.Context, err error)

func (*Inbound) NewPacketConnection

func (i *Inbound) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata M.Metadata) error

func (*Inbound) Process

func (i *Inbound) Process(ctx context.Context, network net.Network, connection stat.Connection, dispatcher routing.Dispatcher) error

type MemoryAccount

type MemoryAccount struct {
	Key   string
	Email string
	Level int32
}

MemoryAccount is an account type converted from Account.

func (*MemoryAccount) Equals

func (a *MemoryAccount) Equals(another protocol.Account) bool

Equals implements protocol.Account.Equals().

type MultiUserInbound

type MultiUserInbound struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewMultiServer

func NewMultiServer(ctx context.Context, config *MultiUserServerConfig) (*MultiUserInbound, error)

func (*MultiUserInbound) AddUser

AddUser implements proxy.UserManager.AddUser().

func (*MultiUserInbound) Network

func (i *MultiUserInbound) Network() []net.Network

func (*MultiUserInbound) NewConnection

func (i *MultiUserInbound) NewConnection(ctx context.Context, conn net.Conn, metadata M.Metadata) error

func (*MultiUserInbound) NewError

func (i *MultiUserInbound) NewError(ctx context.Context, err error)

func (*MultiUserInbound) NewPacketConnection

func (i *MultiUserInbound) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata M.Metadata) error

func (*MultiUserInbound) Process

func (i *MultiUserInbound) Process(ctx context.Context, network net.Network, connection stat.Connection, dispatcher routing.Dispatcher) error

func (*MultiUserInbound) RemoveUser

func (i *MultiUserInbound) RemoveUser(ctx context.Context, email string) error

RemoveUser implements proxy.UserManager.RemoveUser().

type MultiUserServerConfig

type MultiUserServerConfig struct {
	Method  string        `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
	Key     string        `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	Users   []*User       `protobuf:"bytes,3,rep,name=users,proto3" json:"users,omitempty"`
	Network []net.Network `protobuf:"varint,4,rep,packed,name=network,proto3,enum=xray.common.net.Network" json:"network,omitempty"`
	// contains filtered or unexported fields
}

func (*MultiUserServerConfig) Descriptor deprecated

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

Deprecated: Use MultiUserServerConfig.ProtoReflect.Descriptor instead.

func (*MultiUserServerConfig) GetKey

func (x *MultiUserServerConfig) GetKey() string

func (*MultiUserServerConfig) GetMethod

func (x *MultiUserServerConfig) GetMethod() string

func (*MultiUserServerConfig) GetNetwork

func (x *MultiUserServerConfig) GetNetwork() []net.Network

func (*MultiUserServerConfig) GetUsers

func (x *MultiUserServerConfig) GetUsers() []*User

func (*MultiUserServerConfig) ProtoMessage

func (*MultiUserServerConfig) ProtoMessage()

func (*MultiUserServerConfig) ProtoReflect

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

func (*MultiUserServerConfig) Reset

func (x *MultiUserServerConfig) Reset()

func (*MultiUserServerConfig) String

func (x *MultiUserServerConfig) String() string

type Outbound

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

func NewClient

func NewClient(ctx context.Context, config *ClientConfig) (*Outbound, error)

func (*Outbound) Process

func (o *Outbound) Process(ctx context.Context, link *transport.Link, dialer internet.Dialer) error

type RelayDestination

type RelayDestination struct {
	Key     string          `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Address *net.IPOrDomain `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	Port    uint32          `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"`
	Email   string          `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"`
	Level   int32           `protobuf:"varint,5,opt,name=level,proto3" json:"level,omitempty"`
	// contains filtered or unexported fields
}

func (*RelayDestination) Descriptor deprecated

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

Deprecated: Use RelayDestination.ProtoReflect.Descriptor instead.

func (*RelayDestination) GetAddress

func (x *RelayDestination) GetAddress() *net.IPOrDomain

func (*RelayDestination) GetEmail

func (x *RelayDestination) GetEmail() string

func (*RelayDestination) GetKey

func (x *RelayDestination) GetKey() string

func (*RelayDestination) GetLevel

func (x *RelayDestination) GetLevel() int32

func (*RelayDestination) GetPort

func (x *RelayDestination) GetPort() uint32

func (*RelayDestination) ProtoMessage

func (*RelayDestination) ProtoMessage()

func (*RelayDestination) ProtoReflect

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

func (*RelayDestination) Reset

func (x *RelayDestination) Reset()

func (*RelayDestination) String

func (x *RelayDestination) String() string

type RelayInbound

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

func NewRelayServer

func NewRelayServer(ctx context.Context, config *RelayServerConfig) (*RelayInbound, error)

func (*RelayInbound) Network

func (i *RelayInbound) Network() []net.Network

func (*RelayInbound) NewConnection

func (i *RelayInbound) NewConnection(ctx context.Context, conn net.Conn, metadata M.Metadata) error

func (*RelayInbound) NewError

func (i *RelayInbound) NewError(ctx context.Context, err error)

func (*RelayInbound) NewPacketConnection

func (i *RelayInbound) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata M.Metadata) error

func (*RelayInbound) Process

func (i *RelayInbound) Process(ctx context.Context, network net.Network, connection stat.Connection, dispatcher routing.Dispatcher) error

type RelayServerConfig

type RelayServerConfig struct {
	Method       string              `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
	Key          string              `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	Destinations []*RelayDestination `protobuf:"bytes,3,rep,name=destinations,proto3" json:"destinations,omitempty"`
	Network      []net.Network       `protobuf:"varint,4,rep,packed,name=network,proto3,enum=xray.common.net.Network" json:"network,omitempty"`
	// contains filtered or unexported fields
}

func (*RelayServerConfig) Descriptor deprecated

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

Deprecated: Use RelayServerConfig.ProtoReflect.Descriptor instead.

func (*RelayServerConfig) GetDestinations

func (x *RelayServerConfig) GetDestinations() []*RelayDestination

func (*RelayServerConfig) GetKey

func (x *RelayServerConfig) GetKey() string

func (*RelayServerConfig) GetMethod

func (x *RelayServerConfig) GetMethod() string

func (*RelayServerConfig) GetNetwork

func (x *RelayServerConfig) GetNetwork() []net.Network

func (*RelayServerConfig) ProtoMessage

func (*RelayServerConfig) ProtoMessage()

func (*RelayServerConfig) ProtoReflect

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

func (*RelayServerConfig) Reset

func (x *RelayServerConfig) Reset()

func (*RelayServerConfig) String

func (x *RelayServerConfig) String() string

type ServerConfig

type ServerConfig struct {
	Method  string        `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
	Key     string        `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	Email   string        `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	Level   int32         `protobuf:"varint,4,opt,name=level,proto3" json:"level,omitempty"`
	Network []net.Network `protobuf:"varint,5,rep,packed,name=network,proto3,enum=xray.common.net.Network" json:"network,omitempty"`
	// contains filtered or unexported fields
}

func (*ServerConfig) Descriptor deprecated

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

Deprecated: Use ServerConfig.ProtoReflect.Descriptor instead.

func (*ServerConfig) GetEmail

func (x *ServerConfig) GetEmail() string

func (*ServerConfig) GetKey

func (x *ServerConfig) GetKey() string

func (*ServerConfig) GetLevel

func (x *ServerConfig) GetLevel() int32

func (*ServerConfig) GetMethod

func (x *ServerConfig) GetMethod() string

func (*ServerConfig) GetNetwork

func (x *ServerConfig) GetNetwork() []net.Network

func (*ServerConfig) ProtoMessage

func (*ServerConfig) ProtoMessage()

func (*ServerConfig) ProtoReflect

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

func (*ServerConfig) Reset

func (x *ServerConfig) Reset()

func (*ServerConfig) String

func (x *ServerConfig) String() string

type User

type User struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	Level int32  `protobuf:"varint,3,opt,name=level,proto3" json:"level,omitempty"`
	// contains filtered or unexported fields
}

func (*User) AsAccount

func (u *User) AsAccount() (protocol.Account, error)

AsAccount implements protocol.AsAccount.

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetKey

func (x *User) GetKey() string

func (*User) GetLevel

func (x *User) GetLevel() int32

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

Jump to

Keyboard shortcuts

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