config.pb.go 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. package shadowsocks
  2. import proto "github.com/golang/protobuf/proto"
  3. import fmt "fmt"
  4. import math "math"
  5. import v2ray_core_common_protocol "v2ray.com/core/common/protocol"
  6. import v2ray_core_common_protocol1 "v2ray.com/core/common/protocol"
  7. // Reference imports to suppress errors if they are not otherwise used.
  8. var _ = proto.Marshal
  9. var _ = fmt.Errorf
  10. var _ = math.Inf
  11. // This is a compile-time assertion to ensure that this generated file
  12. // is compatible with the proto package it is being compiled against.
  13. // A compilation error at this line likely means your copy of the
  14. // proto package needs to be updated.
  15. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  16. type CipherType int32
  17. const (
  18. CipherType_UNKNOWN CipherType = 0
  19. CipherType_AES_128_CFB CipherType = 1
  20. CipherType_AES_256_CFB CipherType = 2
  21. CipherType_CHACHA20 CipherType = 3
  22. CipherType_CHACHA20_IETF CipherType = 4
  23. )
  24. var CipherType_name = map[int32]string{
  25. 0: "UNKNOWN",
  26. 1: "AES_128_CFB",
  27. 2: "AES_256_CFB",
  28. 3: "CHACHA20",
  29. 4: "CHACHA20_IETF",
  30. }
  31. var CipherType_value = map[string]int32{
  32. "UNKNOWN": 0,
  33. "AES_128_CFB": 1,
  34. "AES_256_CFB": 2,
  35. "CHACHA20": 3,
  36. "CHACHA20_IETF": 4,
  37. }
  38. func (x CipherType) String() string {
  39. return proto.EnumName(CipherType_name, int32(x))
  40. }
  41. func (CipherType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  42. type Account_OneTimeAuth int32
  43. const (
  44. Account_Auto Account_OneTimeAuth = 0
  45. Account_Disabled Account_OneTimeAuth = 1
  46. Account_Enabled Account_OneTimeAuth = 2
  47. )
  48. var Account_OneTimeAuth_name = map[int32]string{
  49. 0: "Auto",
  50. 1: "Disabled",
  51. 2: "Enabled",
  52. }
  53. var Account_OneTimeAuth_value = map[string]int32{
  54. "Auto": 0,
  55. "Disabled": 1,
  56. "Enabled": 2,
  57. }
  58. func (x Account_OneTimeAuth) String() string {
  59. return proto.EnumName(Account_OneTimeAuth_name, int32(x))
  60. }
  61. func (Account_OneTimeAuth) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} }
  62. type Account struct {
  63. Password string `protobuf:"bytes,1,opt,name=password" json:"password,omitempty"`
  64. CipherType CipherType `protobuf:"varint,2,opt,name=cipher_type,json=cipherType,enum=v2ray.core.proxy.shadowsocks.CipherType" json:"cipher_type,omitempty"`
  65. Ota Account_OneTimeAuth `protobuf:"varint,3,opt,name=ota,enum=v2ray.core.proxy.shadowsocks.Account_OneTimeAuth" json:"ota,omitempty"`
  66. }
  67. func (m *Account) Reset() { *m = Account{} }
  68. func (m *Account) String() string { return proto.CompactTextString(m) }
  69. func (*Account) ProtoMessage() {}
  70. func (*Account) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  71. func (m *Account) GetPassword() string {
  72. if m != nil {
  73. return m.Password
  74. }
  75. return ""
  76. }
  77. func (m *Account) GetCipherType() CipherType {
  78. if m != nil {
  79. return m.CipherType
  80. }
  81. return CipherType_UNKNOWN
  82. }
  83. func (m *Account) GetOta() Account_OneTimeAuth {
  84. if m != nil {
  85. return m.Ota
  86. }
  87. return Account_Auto
  88. }
  89. type ServerConfig struct {
  90. UdpEnabled bool `protobuf:"varint,1,opt,name=udp_enabled,json=udpEnabled" json:"udp_enabled,omitempty"`
  91. User *v2ray_core_common_protocol.User `protobuf:"bytes,2,opt,name=user" json:"user,omitempty"`
  92. }
  93. func (m *ServerConfig) Reset() { *m = ServerConfig{} }
  94. func (m *ServerConfig) String() string { return proto.CompactTextString(m) }
  95. func (*ServerConfig) ProtoMessage() {}
  96. func (*ServerConfig) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  97. func (m *ServerConfig) GetUdpEnabled() bool {
  98. if m != nil {
  99. return m.UdpEnabled
  100. }
  101. return false
  102. }
  103. func (m *ServerConfig) GetUser() *v2ray_core_common_protocol.User {
  104. if m != nil {
  105. return m.User
  106. }
  107. return nil
  108. }
  109. type ClientConfig struct {
  110. Server []*v2ray_core_common_protocol1.ServerEndpoint `protobuf:"bytes,1,rep,name=server" json:"server,omitempty"`
  111. }
  112. func (m *ClientConfig) Reset() { *m = ClientConfig{} }
  113. func (m *ClientConfig) String() string { return proto.CompactTextString(m) }
  114. func (*ClientConfig) ProtoMessage() {}
  115. func (*ClientConfig) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
  116. func (m *ClientConfig) GetServer() []*v2ray_core_common_protocol1.ServerEndpoint {
  117. if m != nil {
  118. return m.Server
  119. }
  120. return nil
  121. }
  122. func init() {
  123. proto.RegisterType((*Account)(nil), "v2ray.core.proxy.shadowsocks.Account")
  124. proto.RegisterType((*ServerConfig)(nil), "v2ray.core.proxy.shadowsocks.ServerConfig")
  125. proto.RegisterType((*ClientConfig)(nil), "v2ray.core.proxy.shadowsocks.ClientConfig")
  126. proto.RegisterEnum("v2ray.core.proxy.shadowsocks.CipherType", CipherType_name, CipherType_value)
  127. proto.RegisterEnum("v2ray.core.proxy.shadowsocks.Account_OneTimeAuth", Account_OneTimeAuth_name, Account_OneTimeAuth_value)
  128. }
  129. func init() { proto.RegisterFile("v2ray.com/core/proxy/shadowsocks/config.proto", fileDescriptor0) }
  130. var fileDescriptor0 = []byte{
  131. // 442 bytes of a gzipped FileDescriptorProto
  132. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0x4f, 0x6f, 0xd3, 0x40,
  133. 0x10, 0xc5, 0xeb, 0x24, 0x6a, 0xc3, 0x38, 0x80, 0xd9, 0x53, 0x14, 0x55, 0xc2, 0xca, 0x29, 0x54,
  134. 0x62, 0xdd, 0x2e, 0x7f, 0xc4, 0xd5, 0x31, 0xa9, 0x5a, 0x21, 0xa5, 0x91, 0x93, 0x82, 0x84, 0x90,
  135. 0x2c, 0x77, 0xbd, 0x10, 0x8b, 0xd8, 0xb3, 0xda, 0xb5, 0x5b, 0xfc, 0x95, 0xf8, 0x66, 0x7c, 0x0b,
  136. 0xe4, 0x75, 0xd2, 0x44, 0x1c, 0xcc, 0xcd, 0x33, 0x7e, 0xef, 0x79, 0xde, 0xcf, 0xf0, 0xfa, 0x9e,
  137. 0xa9, 0xb8, 0xa2, 0x1c, 0x33, 0x8f, 0xa3, 0x12, 0x9e, 0x54, 0xf8, 0xab, 0xf2, 0xf4, 0x3a, 0x4e,
  138. 0xf0, 0x41, 0x23, 0xff, 0xa9, 0x3d, 0x8e, 0xf9, 0xf7, 0xf4, 0x07, 0x95, 0x0a, 0x0b, 0x24, 0xa7,
  139. 0x3b, 0xb9, 0x12, 0xd4, 0x48, 0xe9, 0x81, 0x74, 0xf4, 0xea, 0x9f, 0x30, 0x8e, 0x59, 0x86, 0xb9,
  140. 0x67, 0xac, 0x1c, 0x37, 0x5e, 0xa9, 0x85, 0x6a, 0x82, 0x46, 0xe7, 0xff, 0x91, 0x6a, 0xa1, 0xee,
  141. 0x85, 0x8a, 0xb4, 0x14, 0xbc, 0x71, 0x8c, 0xff, 0x58, 0x70, 0xe2, 0x73, 0x8e, 0x65, 0x5e, 0x90,
  142. 0x11, 0xf4, 0x65, 0xac, 0xf5, 0x03, 0xaa, 0x64, 0x68, 0xb9, 0xd6, 0xe4, 0x49, 0xf8, 0x38, 0x93,
  143. 0x6b, 0xb0, 0x79, 0x2a, 0xd7, 0x42, 0x45, 0x45, 0x25, 0xc5, 0xb0, 0xe3, 0x5a, 0x93, 0x67, 0x6c,
  144. 0x42, 0xdb, 0x0e, 0xa7, 0x81, 0x31, 0xac, 0x2a, 0x29, 0x42, 0xe0, 0x8f, 0xcf, 0x24, 0x80, 0x2e,
  145. 0x16, 0xf1, 0xb0, 0x6b, 0x22, 0x2e, 0xda, 0x23, 0xb6, 0xa7, 0xd1, 0x9b, 0x5c, 0xac, 0xd2, 0x4c,
  146. 0xf8, 0x65, 0xb1, 0x0e, 0x6b, 0xf7, 0x98, 0x81, 0x7d, 0xb0, 0x23, 0x7d, 0xe8, 0xf9, 0x65, 0x81,
  147. 0xce, 0x11, 0x19, 0x40, 0xff, 0x63, 0xaa, 0xe3, 0xbb, 0x8d, 0x48, 0x1c, 0x8b, 0xd8, 0x70, 0x32,
  148. 0xcb, 0x9b, 0xa1, 0x33, 0x16, 0x30, 0x58, 0x1a, 0x00, 0x81, 0x81, 0x4f, 0x5e, 0x82, 0x5d, 0x26,
  149. 0x32, 0x12, 0x8d, 0xc0, 0x54, 0xee, 0x87, 0x50, 0x26, 0x72, 0x6b, 0x21, 0x6f, 0xa1, 0x57, 0xc3,
  150. 0x35, 0x6d, 0x6d, 0xe6, 0x1e, 0x9e, 0xda, 0x90, 0xa5, 0x3b, 0xb2, 0xf4, 0x56, 0x0b, 0x15, 0x1a,
  151. 0xf5, 0x38, 0x84, 0x41, 0xb0, 0x49, 0x45, 0x5e, 0x6c, 0x3f, 0x33, 0x85, 0xe3, 0x86, 0xfb, 0xd0,
  152. 0x72, 0xbb, 0x13, 0x9b, 0x9d, 0xb5, 0xe5, 0x34, 0x07, 0xce, 0xf2, 0x44, 0x62, 0x9a, 0x17, 0xe1,
  153. 0xd6, 0x79, 0xf6, 0x0d, 0x60, 0x4f, 0xb3, 0x6e, 0x75, 0x3b, 0xff, 0x34, 0xbf, 0xf9, 0x32, 0x77,
  154. 0x8e, 0xc8, 0x73, 0xb0, 0xfd, 0xd9, 0x32, 0xba, 0x60, 0x1f, 0xa2, 0xe0, 0x72, 0xea, 0x58, 0xbb,
  155. 0x05, 0x7b, 0xf7, 0xde, 0x2c, 0x3a, 0x35, 0x92, 0xe0, 0xca, 0x0f, 0xae, 0x7c, 0x76, 0xee, 0x74,
  156. 0xc9, 0x0b, 0x78, 0xba, 0x9b, 0xa2, 0xeb, 0xd9, 0xea, 0xd2, 0xe9, 0x4d, 0x17, 0xe0, 0x72, 0xcc,
  157. 0x5a, 0xff, 0xc4, 0xc2, 0xfa, 0x6a, 0x1f, 0x8c, 0xbf, 0x3b, 0xa7, 0x9f, 0x59, 0x18, 0x57, 0x34,
  158. 0xa8, 0xd5, 0x0b, 0xa3, 0x5e, 0xee, 0x5f, 0xdf, 0x1d, 0x9b, 0x42, 0x6f, 0xfe, 0x06, 0x00, 0x00,
  159. 0xff, 0xff, 0x2b, 0x46, 0x7c, 0x1c, 0x09, 0x03, 0x00, 0x00,
  160. }