Documentation ¶
Overview ¶
Package shadowsocks is a generated protocol buffer package.
It is generated from these files:
v2ray.com/core/proxy/shadowsocks/config.proto
It has these top-level messages:
Account ServerConfig ClientConfig
R.I.P Shadowsocks
Index ¶
- Constants
- Variables
- func ChunkKeyGenerator(iv []byte) func() []byte
- func HeaderKeyGenerator(key []byte, iv []byte) func() []byte
- func PasswordToCipherKey(password string, keySize int) []byte
- type Account
- func (this *Account) AsAccount() (protocol.Account, error)
- func (*Account) Descriptor() ([]byte, []int)
- func (this *Account) Equals(another protocol.Account) bool
- func (this *Account) GetCipher() (Cipher, error)
- func (this *Account) GetCipherKey() []byte
- func (*Account) ProtoMessage()
- func (m *Account) Reset()
- func (m *Account) String() string
- type AesCfb
- type Authenticator
- type ChaCha20
- type ChunkReader
- type Cipher
- type CipherType
- type ClientConfig
- type KeyGenerator
- type Request
- type Server
- type ServerConfig
- type ServerFactory
Constants ¶
View Source
const ( AddrTypeIPv4 = 1 AddrTypeIPv6 = 4 AddrTypeDomain = 3 )
View Source
const (
AuthSize = 10
)
Variables ¶
View Source
var CipherType_name = map[int32]string{
0: "UNKNOWN",
1: "AES_128_CFB",
2: "AES_256_CFB",
3: "CHACHA20",
4: "CHACHA20_IEFT",
}
View Source
var CipherType_value = map[string]int32{
"UNKNOWN": 0,
"AES_128_CFB": 1,
"AES_256_CFB": 2,
"CHACHA20": 3,
"CHACHA20_IEFT": 4,
}
Functions ¶
func ChunkKeyGenerator ¶
func HeaderKeyGenerator ¶
func PasswordToCipherKey ¶
Types ¶
type Account ¶
type Account struct { Password string `protobuf:"bytes,1,opt,name=password" json:"password,omitempty"` CipherType CipherType `` /* 130-byte string literal not displayed */ }
func (*Account) Descriptor ¶
func (*Account) GetCipherKey ¶
func (*Account) ProtoMessage ¶
func (*Account) ProtoMessage()
type Authenticator ¶
type Authenticator struct {
// contains filtered or unexported fields
}
func NewAuthenticator ¶
func NewAuthenticator(keygen KeyGenerator) *Authenticator
func (*Authenticator) Authenticate ¶
func (this *Authenticator) Authenticate(auth []byte, data []byte) []byte
type ChunkReader ¶
type ChunkReader struct {
// contains filtered or unexported fields
}
func NewChunkReader ¶
func NewChunkReader(reader io.Reader, auth *Authenticator) *ChunkReader
func (*ChunkReader) Release ¶ added in v1.11.1
func (this *ChunkReader) Release()
type CipherType ¶
type CipherType int32
const ( CipherType_UNKNOWN CipherType = 0 CipherType_AES_128_CFB CipherType = 1 CipherType_AES_256_CFB CipherType = 2 CipherType_CHACHA20 CipherType = 3 CipherType_CHACHA20_IEFT CipherType = 4 )
func (CipherType) EnumDescriptor ¶
func (CipherType) EnumDescriptor() ([]byte, []int)
func (CipherType) String ¶
func (x CipherType) String() string
type ClientConfig ¶
type ClientConfig struct {
Server []*v2ray_core_common_protocol1.ServerEndpoint `protobuf:"bytes,1,rep,name=server" json:"server,omitempty"`
}
func (*ClientConfig) Descriptor ¶
func (*ClientConfig) Descriptor() ([]byte, []int)
func (*ClientConfig) GetServer ¶
func (m *ClientConfig) GetServer() []*v2ray_core_common_protocol1.ServerEndpoint
func (*ClientConfig) ProtoMessage ¶
func (*ClientConfig) ProtoMessage()
func (*ClientConfig) Reset ¶
func (m *ClientConfig) Reset()
func (*ClientConfig) String ¶
func (m *ClientConfig) String() string
type KeyGenerator ¶
type KeyGenerator func() []byte
type Server ¶ added in v1.12.9
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶ added in v1.12.9
func NewServer(config *ServerConfig, space app.Space, meta *proxy.InboundHandlerMeta) (*Server, error)
type ServerConfig ¶
type ServerConfig struct { UdpEnabled bool `protobuf:"varint,1,opt,name=udp_enabled,json=udpEnabled" json:"udp_enabled,omitempty"` User *v2ray_core_common_protocol.User `protobuf:"bytes,2,opt,name=user" json:"user,omitempty"` }
func (*ServerConfig) Descriptor ¶
func (*ServerConfig) Descriptor() ([]byte, []int)
func (*ServerConfig) GetUser ¶
func (m *ServerConfig) GetUser() *v2ray_core_common_protocol.User
func (*ServerConfig) ProtoMessage ¶
func (*ServerConfig) ProtoMessage()
func (*ServerConfig) Reset ¶
func (m *ServerConfig) Reset()
func (*ServerConfig) String ¶
func (m *ServerConfig) String() string
type ServerFactory ¶ added in v1.17.1
type ServerFactory struct{}
func (*ServerFactory) Create ¶ added in v1.17.1
func (this *ServerFactory) Create(space app.Space, rawConfig interface{}, meta *proxy.InboundHandlerMeta) (proxy.InboundHandler, error)
func (*ServerFactory) StreamCapability ¶ added in v1.17.1
func (this *ServerFactory) StreamCapability() v2net.NetworkList
Click to show internal directories.
Click to hide internal directories.