config.pb.go 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  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. CipherType_AES_128_GCM CipherType = 5
  24. CipherType_AES_256_GCM CipherType = 6
  25. CipherType_CHACHA20_POLY1305 CipherType = 7
  26. )
  27. var CipherType_name = map[int32]string{
  28. 0: "UNKNOWN",
  29. 1: "AES_128_CFB",
  30. 2: "AES_256_CFB",
  31. 3: "CHACHA20",
  32. 4: "CHACHA20_IETF",
  33. 5: "AES_128_GCM",
  34. 6: "AES_256_GCM",
  35. 7: "CHACHA20_POLY1305",
  36. }
  37. var CipherType_value = map[string]int32{
  38. "UNKNOWN": 0,
  39. "AES_128_CFB": 1,
  40. "AES_256_CFB": 2,
  41. "CHACHA20": 3,
  42. "CHACHA20_IETF": 4,
  43. "AES_128_GCM": 5,
  44. "AES_256_GCM": 6,
  45. "CHACHA20_POLY1305": 7,
  46. }
  47. func (x CipherType) String() string {
  48. return proto.EnumName(CipherType_name, int32(x))
  49. }
  50. func (CipherType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  51. type Account_OneTimeAuth int32
  52. const (
  53. Account_Auto Account_OneTimeAuth = 0
  54. Account_Disabled Account_OneTimeAuth = 1
  55. Account_Enabled Account_OneTimeAuth = 2
  56. )
  57. var Account_OneTimeAuth_name = map[int32]string{
  58. 0: "Auto",
  59. 1: "Disabled",
  60. 2: "Enabled",
  61. }
  62. var Account_OneTimeAuth_value = map[string]int32{
  63. "Auto": 0,
  64. "Disabled": 1,
  65. "Enabled": 2,
  66. }
  67. func (x Account_OneTimeAuth) String() string {
  68. return proto.EnumName(Account_OneTimeAuth_name, int32(x))
  69. }
  70. func (Account_OneTimeAuth) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} }
  71. type Account struct {
  72. Password string `protobuf:"bytes,1,opt,name=password" json:"password,omitempty"`
  73. CipherType CipherType `protobuf:"varint,2,opt,name=cipher_type,json=cipherType,enum=v2ray.core.proxy.shadowsocks.CipherType" json:"cipher_type,omitempty"`
  74. Ota Account_OneTimeAuth `protobuf:"varint,3,opt,name=ota,enum=v2ray.core.proxy.shadowsocks.Account_OneTimeAuth" json:"ota,omitempty"`
  75. }
  76. func (m *Account) Reset() { *m = Account{} }
  77. func (m *Account) String() string { return proto.CompactTextString(m) }
  78. func (*Account) ProtoMessage() {}
  79. func (*Account) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  80. func (m *Account) GetPassword() string {
  81. if m != nil {
  82. return m.Password
  83. }
  84. return ""
  85. }
  86. func (m *Account) GetCipherType() CipherType {
  87. if m != nil {
  88. return m.CipherType
  89. }
  90. return CipherType_UNKNOWN
  91. }
  92. func (m *Account) GetOta() Account_OneTimeAuth {
  93. if m != nil {
  94. return m.Ota
  95. }
  96. return Account_Auto
  97. }
  98. type ServerConfig struct {
  99. UdpEnabled bool `protobuf:"varint,1,opt,name=udp_enabled,json=udpEnabled" json:"udp_enabled,omitempty"`
  100. User *v2ray_core_common_protocol.User `protobuf:"bytes,2,opt,name=user" json:"user,omitempty"`
  101. }
  102. func (m *ServerConfig) Reset() { *m = ServerConfig{} }
  103. func (m *ServerConfig) String() string { return proto.CompactTextString(m) }
  104. func (*ServerConfig) ProtoMessage() {}
  105. func (*ServerConfig) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  106. func (m *ServerConfig) GetUdpEnabled() bool {
  107. if m != nil {
  108. return m.UdpEnabled
  109. }
  110. return false
  111. }
  112. func (m *ServerConfig) GetUser() *v2ray_core_common_protocol.User {
  113. if m != nil {
  114. return m.User
  115. }
  116. return nil
  117. }
  118. type ClientConfig struct {
  119. Server []*v2ray_core_common_protocol1.ServerEndpoint `protobuf:"bytes,1,rep,name=server" json:"server,omitempty"`
  120. }
  121. func (m *ClientConfig) Reset() { *m = ClientConfig{} }
  122. func (m *ClientConfig) String() string { return proto.CompactTextString(m) }
  123. func (*ClientConfig) ProtoMessage() {}
  124. func (*ClientConfig) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
  125. func (m *ClientConfig) GetServer() []*v2ray_core_common_protocol1.ServerEndpoint {
  126. if m != nil {
  127. return m.Server
  128. }
  129. return nil
  130. }
  131. func init() {
  132. proto.RegisterType((*Account)(nil), "v2ray.core.proxy.shadowsocks.Account")
  133. proto.RegisterType((*ServerConfig)(nil), "v2ray.core.proxy.shadowsocks.ServerConfig")
  134. proto.RegisterType((*ClientConfig)(nil), "v2ray.core.proxy.shadowsocks.ClientConfig")
  135. proto.RegisterEnum("v2ray.core.proxy.shadowsocks.CipherType", CipherType_name, CipherType_value)
  136. proto.RegisterEnum("v2ray.core.proxy.shadowsocks.Account_OneTimeAuth", Account_OneTimeAuth_name, Account_OneTimeAuth_value)
  137. }
  138. func init() { proto.RegisterFile("v2ray.com/core/proxy/shadowsocks/config.proto", fileDescriptor0) }
  139. var fileDescriptor0 = []byte{
  140. // 470 bytes of a gzipped FileDescriptorProto
  141. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0xd1, 0x8e, 0xd2, 0x40,
  142. 0x14, 0x86, 0xb7, 0x80, 0x80, 0xa7, 0xa8, 0xdd, 0x49, 0x4c, 0x08, 0xd9, 0x44, 0xc2, 0x15, 0x6e,
  143. 0xe2, 0x14, 0xba, 0xae, 0xf1, 0xb6, 0x8c, 0xac, 0xbb, 0x51, 0x81, 0x14, 0x56, 0xa3, 0x37, 0x4d,
  144. 0x77, 0x3a, 0x4a, 0x23, 0xed, 0x4c, 0x66, 0xda, 0x5d, 0xfb, 0x20, 0xbe, 0x84, 0x6f, 0xe6, 0x5b,
  145. 0x98, 0x4e, 0x81, 0x6d, 0xbc, 0x60, 0xef, 0x7a, 0x4e, 0xff, 0xff, 0xef, 0x7f, 0xbe, 0xc2, 0xab,
  146. 0x5b, 0x47, 0x06, 0x39, 0xa6, 0x3c, 0xb6, 0x29, 0x97, 0xcc, 0x16, 0x92, 0xff, 0xca, 0x6d, 0xb5,
  147. 0x0e, 0x42, 0x7e, 0xa7, 0x38, 0xfd, 0xa9, 0x6c, 0xca, 0x93, 0xef, 0xd1, 0x0f, 0x2c, 0x24, 0x4f,
  148. 0x39, 0x3a, 0xd9, 0xc9, 0x25, 0xc3, 0x5a, 0x8a, 0x2b, 0xd2, 0xde, 0xcb, 0xff, 0xc2, 0x28, 0x8f,
  149. 0x63, 0x9e, 0xd8, 0xda, 0x4a, 0xf9, 0xc6, 0xce, 0x14, 0x93, 0x65, 0x50, 0x6f, 0xf4, 0x80, 0x54,
  150. 0x31, 0x79, 0xcb, 0xa4, 0xaf, 0x04, 0xa3, 0xa5, 0x63, 0xf0, 0xd7, 0x80, 0x96, 0x4b, 0x29, 0xcf,
  151. 0x92, 0x14, 0xf5, 0xa0, 0x2d, 0x02, 0xa5, 0xee, 0xb8, 0x0c, 0xbb, 0x46, 0xdf, 0x18, 0x3e, 0xf6,
  152. 0xf6, 0x33, 0xba, 0x02, 0x93, 0x46, 0x62, 0xcd, 0xa4, 0x9f, 0xe6, 0x82, 0x75, 0x6b, 0x7d, 0x63,
  153. 0xf8, 0xd4, 0x19, 0xe2, 0x43, 0xc5, 0x31, 0xd1, 0x86, 0x55, 0x2e, 0x98, 0x07, 0x74, 0xff, 0x8c,
  154. 0x08, 0xd4, 0x79, 0x1a, 0x74, 0xeb, 0x3a, 0x62, 0x7c, 0x38, 0x62, 0x5b, 0x0d, 0xcf, 0x13, 0xb6,
  155. 0x8a, 0x62, 0xe6, 0x66, 0xe9, 0xda, 0x2b, 0xdc, 0x03, 0x07, 0xcc, 0xca, 0x0e, 0xb5, 0xa1, 0xe1,
  156. 0x66, 0x29, 0xb7, 0x8e, 0x50, 0x07, 0xda, 0xef, 0x22, 0x15, 0xdc, 0x6c, 0x58, 0x68, 0x19, 0xc8,
  157. 0x84, 0xd6, 0x34, 0x29, 0x87, 0xda, 0x80, 0x41, 0x67, 0xa9, 0x01, 0x10, 0x0d, 0x1f, 0xbd, 0x00,
  158. 0x33, 0x0b, 0x85, 0xcf, 0x4a, 0x81, 0x3e, 0xb9, 0xed, 0x41, 0x16, 0x8a, 0xad, 0x05, 0xbd, 0x86,
  159. 0x46, 0x01, 0x57, 0x5f, 0x6b, 0x3a, 0xfd, 0x6a, 0xd5, 0x92, 0x2c, 0xde, 0x91, 0xc5, 0xd7, 0x8a,
  160. 0x49, 0x4f, 0xab, 0x07, 0x1e, 0x74, 0xc8, 0x26, 0x62, 0x49, 0xba, 0xfd, 0xcc, 0x04, 0x9a, 0x25,
  161. 0xf7, 0xae, 0xd1, 0xaf, 0x0f, 0x4d, 0xe7, 0xf4, 0x50, 0x4e, 0x59, 0x70, 0x9a, 0x84, 0x82, 0x47,
  162. 0x49, 0xea, 0x6d, 0x9d, 0xa7, 0xbf, 0x0d, 0x80, 0x7b, 0x9c, 0xc5, 0x59, 0xd7, 0xb3, 0x0f, 0xb3,
  163. 0xf9, 0x97, 0x99, 0x75, 0x84, 0x9e, 0x81, 0xe9, 0x4e, 0x97, 0xfe, 0xd8, 0x79, 0xeb, 0x93, 0x8b,
  164. 0x89, 0x65, 0xec, 0x16, 0xce, 0xf9, 0x1b, 0xbd, 0xa8, 0x15, 0x4c, 0xc8, 0xa5, 0x4b, 0x2e, 0x5d,
  165. 0x67, 0x64, 0xd5, 0xd1, 0x31, 0x3c, 0xd9, 0x4d, 0xfe, 0xd5, 0x74, 0x75, 0x61, 0x35, 0xaa, 0x11,
  166. 0xef, 0xc9, 0x27, 0xeb, 0x51, 0x35, 0xa2, 0x58, 0x34, 0xd1, 0x73, 0x38, 0xde, 0x9b, 0x16, 0xf3,
  167. 0x8f, 0x5f, 0xc7, 0x67, 0xa3, 0x73, 0xab, 0x35, 0x59, 0x40, 0x9f, 0xf2, 0xf8, 0xe0, 0x3f, 0x5c,
  168. 0x18, 0xdf, 0xcc, 0xca, 0xf8, 0xa7, 0x76, 0xf2, 0xd9, 0xf1, 0x82, 0x1c, 0x93, 0x42, 0xbd, 0xd0,
  169. 0xea, 0xe5, 0xfd, 0xeb, 0x9b, 0xa6, 0x46, 0x71, 0xf6, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x37, 0x7d,
  170. 0x8e, 0xab, 0x43, 0x03, 0x00, 0x00,
  171. }