config.pb.go 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.30.0
  4. // protoc v4.23.1
  5. // source: proxy/shadowsocks/config.proto
  6. package shadowsocks
  7. import (
  8. net "github.com/xtls/xray-core/common/net"
  9. protocol "github.com/xtls/xray-core/common/protocol"
  10. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  11. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  12. reflect "reflect"
  13. sync "sync"
  14. )
  15. const (
  16. // Verify that this generated code is sufficiently up-to-date.
  17. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  18. // Verify that runtime/protoimpl is sufficiently up-to-date.
  19. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  20. )
  21. type CipherType int32
  22. const (
  23. CipherType_UNKNOWN CipherType = 0
  24. CipherType_AES_128_GCM CipherType = 5
  25. CipherType_AES_256_GCM CipherType = 6
  26. CipherType_CHACHA20_POLY1305 CipherType = 7
  27. CipherType_XCHACHA20_POLY1305 CipherType = 8
  28. CipherType_NONE CipherType = 9
  29. )
  30. // Enum value maps for CipherType.
  31. var (
  32. CipherType_name = map[int32]string{
  33. 0: "UNKNOWN",
  34. 5: "AES_128_GCM",
  35. 6: "AES_256_GCM",
  36. 7: "CHACHA20_POLY1305",
  37. 8: "XCHACHA20_POLY1305",
  38. 9: "NONE",
  39. }
  40. CipherType_value = map[string]int32{
  41. "UNKNOWN": 0,
  42. "AES_128_GCM": 5,
  43. "AES_256_GCM": 6,
  44. "CHACHA20_POLY1305": 7,
  45. "XCHACHA20_POLY1305": 8,
  46. "NONE": 9,
  47. }
  48. )
  49. func (x CipherType) Enum() *CipherType {
  50. p := new(CipherType)
  51. *p = x
  52. return p
  53. }
  54. func (x CipherType) String() string {
  55. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  56. }
  57. func (CipherType) Descriptor() protoreflect.EnumDescriptor {
  58. return file_proxy_shadowsocks_config_proto_enumTypes[0].Descriptor()
  59. }
  60. func (CipherType) Type() protoreflect.EnumType {
  61. return &file_proxy_shadowsocks_config_proto_enumTypes[0]
  62. }
  63. func (x CipherType) Number() protoreflect.EnumNumber {
  64. return protoreflect.EnumNumber(x)
  65. }
  66. // Deprecated: Use CipherType.Descriptor instead.
  67. func (CipherType) EnumDescriptor() ([]byte, []int) {
  68. return file_proxy_shadowsocks_config_proto_rawDescGZIP(), []int{0}
  69. }
  70. type Account struct {
  71. state protoimpl.MessageState
  72. sizeCache protoimpl.SizeCache
  73. unknownFields protoimpl.UnknownFields
  74. Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"`
  75. CipherType CipherType `protobuf:"varint,2,opt,name=cipher_type,json=cipherType,proto3,enum=xray.proxy.shadowsocks.CipherType" json:"cipher_type,omitempty"`
  76. IvCheck bool `protobuf:"varint,3,opt,name=iv_check,json=ivCheck,proto3" json:"iv_check,omitempty"`
  77. }
  78. func (x *Account) Reset() {
  79. *x = Account{}
  80. if protoimpl.UnsafeEnabled {
  81. mi := &file_proxy_shadowsocks_config_proto_msgTypes[0]
  82. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  83. ms.StoreMessageInfo(mi)
  84. }
  85. }
  86. func (x *Account) String() string {
  87. return protoimpl.X.MessageStringOf(x)
  88. }
  89. func (*Account) ProtoMessage() {}
  90. func (x *Account) ProtoReflect() protoreflect.Message {
  91. mi := &file_proxy_shadowsocks_config_proto_msgTypes[0]
  92. if protoimpl.UnsafeEnabled && x != nil {
  93. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  94. if ms.LoadMessageInfo() == nil {
  95. ms.StoreMessageInfo(mi)
  96. }
  97. return ms
  98. }
  99. return mi.MessageOf(x)
  100. }
  101. // Deprecated: Use Account.ProtoReflect.Descriptor instead.
  102. func (*Account) Descriptor() ([]byte, []int) {
  103. return file_proxy_shadowsocks_config_proto_rawDescGZIP(), []int{0}
  104. }
  105. func (x *Account) GetPassword() string {
  106. if x != nil {
  107. return x.Password
  108. }
  109. return ""
  110. }
  111. func (x *Account) GetCipherType() CipherType {
  112. if x != nil {
  113. return x.CipherType
  114. }
  115. return CipherType_UNKNOWN
  116. }
  117. func (x *Account) GetIvCheck() bool {
  118. if x != nil {
  119. return x.IvCheck
  120. }
  121. return false
  122. }
  123. type ServerConfig struct {
  124. state protoimpl.MessageState
  125. sizeCache protoimpl.SizeCache
  126. unknownFields protoimpl.UnknownFields
  127. Users []*protocol.User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
  128. Network []net.Network `protobuf:"varint,2,rep,packed,name=network,proto3,enum=xray.common.net.Network" json:"network,omitempty"`
  129. }
  130. func (x *ServerConfig) Reset() {
  131. *x = ServerConfig{}
  132. if protoimpl.UnsafeEnabled {
  133. mi := &file_proxy_shadowsocks_config_proto_msgTypes[1]
  134. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  135. ms.StoreMessageInfo(mi)
  136. }
  137. }
  138. func (x *ServerConfig) String() string {
  139. return protoimpl.X.MessageStringOf(x)
  140. }
  141. func (*ServerConfig) ProtoMessage() {}
  142. func (x *ServerConfig) ProtoReflect() protoreflect.Message {
  143. mi := &file_proxy_shadowsocks_config_proto_msgTypes[1]
  144. if protoimpl.UnsafeEnabled && x != nil {
  145. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  146. if ms.LoadMessageInfo() == nil {
  147. ms.StoreMessageInfo(mi)
  148. }
  149. return ms
  150. }
  151. return mi.MessageOf(x)
  152. }
  153. // Deprecated: Use ServerConfig.ProtoReflect.Descriptor instead.
  154. func (*ServerConfig) Descriptor() ([]byte, []int) {
  155. return file_proxy_shadowsocks_config_proto_rawDescGZIP(), []int{1}
  156. }
  157. func (x *ServerConfig) GetUsers() []*protocol.User {
  158. if x != nil {
  159. return x.Users
  160. }
  161. return nil
  162. }
  163. func (x *ServerConfig) GetNetwork() []net.Network {
  164. if x != nil {
  165. return x.Network
  166. }
  167. return nil
  168. }
  169. type ClientConfig struct {
  170. state protoimpl.MessageState
  171. sizeCache protoimpl.SizeCache
  172. unknownFields protoimpl.UnknownFields
  173. Server []*protocol.ServerEndpoint `protobuf:"bytes,1,rep,name=server,proto3" json:"server,omitempty"`
  174. }
  175. func (x *ClientConfig) Reset() {
  176. *x = ClientConfig{}
  177. if protoimpl.UnsafeEnabled {
  178. mi := &file_proxy_shadowsocks_config_proto_msgTypes[2]
  179. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  180. ms.StoreMessageInfo(mi)
  181. }
  182. }
  183. func (x *ClientConfig) String() string {
  184. return protoimpl.X.MessageStringOf(x)
  185. }
  186. func (*ClientConfig) ProtoMessage() {}
  187. func (x *ClientConfig) ProtoReflect() protoreflect.Message {
  188. mi := &file_proxy_shadowsocks_config_proto_msgTypes[2]
  189. if protoimpl.UnsafeEnabled && x != nil {
  190. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  191. if ms.LoadMessageInfo() == nil {
  192. ms.StoreMessageInfo(mi)
  193. }
  194. return ms
  195. }
  196. return mi.MessageOf(x)
  197. }
  198. // Deprecated: Use ClientConfig.ProtoReflect.Descriptor instead.
  199. func (*ClientConfig) Descriptor() ([]byte, []int) {
  200. return file_proxy_shadowsocks_config_proto_rawDescGZIP(), []int{2}
  201. }
  202. func (x *ClientConfig) GetServer() []*protocol.ServerEndpoint {
  203. if x != nil {
  204. return x.Server
  205. }
  206. return nil
  207. }
  208. var File_proxy_shadowsocks_config_proto protoreflect.FileDescriptor
  209. var file_proxy_shadowsocks_config_proto_rawDesc = []byte{
  210. 0x0a, 0x1e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x73, 0x6f,
  211. 0x63, 0x6b, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
  212. 0x12, 0x16, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x73, 0x68, 0x61,
  213. 0x64, 0x6f, 0x77, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0x1a, 0x18, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
  214. 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f,
  215. 0x74, 0x6f, 0x1a, 0x1a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
  216. 0x63, 0x6f, 0x6c, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21,
  217. 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f,
  218. 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74,
  219. 0x6f, 0x22, 0x85, 0x01, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a,
  220. 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
  221. 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x43, 0x0a, 0x0b, 0x63, 0x69, 0x70,
  222. 0x68, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22,
  223. 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x73, 0x68, 0x61, 0x64,
  224. 0x6f, 0x77, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0x2e, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x54, 0x79,
  225. 0x70, 0x65, 0x52, 0x0a, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19,
  226. 0x0a, 0x08, 0x69, 0x76, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08,
  227. 0x52, 0x07, 0x69, 0x76, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x22, 0x74, 0x0a, 0x0c, 0x53, 0x65, 0x72,
  228. 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x30, 0x0a, 0x05, 0x75, 0x73, 0x65,
  229. 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e,
  230. 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e,
  231. 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x32, 0x0a, 0x07, 0x6e,
  232. 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x78,
  233. 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x4e,
  234. 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x22,
  235. 0x4c, 0x0a, 0x0c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12,
  236. 0x3c, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
  237. 0x24, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72,
  238. 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x64,
  239. 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2a, 0x74, 0x0a,
  240. 0x0a, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55,
  241. 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x45, 0x53, 0x5f,
  242. 0x31, 0x32, 0x38, 0x5f, 0x47, 0x43, 0x4d, 0x10, 0x05, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x45, 0x53,
  243. 0x5f, 0x32, 0x35, 0x36, 0x5f, 0x47, 0x43, 0x4d, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x48,
  244. 0x41, 0x43, 0x48, 0x41, 0x32, 0x30, 0x5f, 0x50, 0x4f, 0x4c, 0x59, 0x31, 0x33, 0x30, 0x35, 0x10,
  245. 0x07, 0x12, 0x16, 0x0a, 0x12, 0x58, 0x43, 0x48, 0x41, 0x43, 0x48, 0x41, 0x32, 0x30, 0x5f, 0x50,
  246. 0x4f, 0x4c, 0x59, 0x31, 0x33, 0x30, 0x35, 0x10, 0x08, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e,
  247. 0x45, 0x10, 0x09, 0x42, 0x64, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e,
  248. 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x73, 0x6f, 0x63, 0x6b,
  249. 0x73, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
  250. 0x78, 0x74, 0x6c, 0x73, 0x2f, 0x78, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70,
  251. 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x73, 0x6f, 0x63, 0x6b, 0x73,
  252. 0xaa, 0x02, 0x16, 0x58, 0x72, 0x61, 0x79, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x53, 0x68,
  253. 0x61, 0x64, 0x6f, 0x77, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
  254. 0x33,
  255. }
  256. var (
  257. file_proxy_shadowsocks_config_proto_rawDescOnce sync.Once
  258. file_proxy_shadowsocks_config_proto_rawDescData = file_proxy_shadowsocks_config_proto_rawDesc
  259. )
  260. func file_proxy_shadowsocks_config_proto_rawDescGZIP() []byte {
  261. file_proxy_shadowsocks_config_proto_rawDescOnce.Do(func() {
  262. file_proxy_shadowsocks_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_proxy_shadowsocks_config_proto_rawDescData)
  263. })
  264. return file_proxy_shadowsocks_config_proto_rawDescData
  265. }
  266. var file_proxy_shadowsocks_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
  267. var file_proxy_shadowsocks_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
  268. var file_proxy_shadowsocks_config_proto_goTypes = []interface{}{
  269. (CipherType)(0), // 0: xray.proxy.shadowsocks.CipherType
  270. (*Account)(nil), // 1: xray.proxy.shadowsocks.Account
  271. (*ServerConfig)(nil), // 2: xray.proxy.shadowsocks.ServerConfig
  272. (*ClientConfig)(nil), // 3: xray.proxy.shadowsocks.ClientConfig
  273. (*protocol.User)(nil), // 4: xray.common.protocol.User
  274. (net.Network)(0), // 5: xray.common.net.Network
  275. (*protocol.ServerEndpoint)(nil), // 6: xray.common.protocol.ServerEndpoint
  276. }
  277. var file_proxy_shadowsocks_config_proto_depIdxs = []int32{
  278. 0, // 0: xray.proxy.shadowsocks.Account.cipher_type:type_name -> xray.proxy.shadowsocks.CipherType
  279. 4, // 1: xray.proxy.shadowsocks.ServerConfig.users:type_name -> xray.common.protocol.User
  280. 5, // 2: xray.proxy.shadowsocks.ServerConfig.network:type_name -> xray.common.net.Network
  281. 6, // 3: xray.proxy.shadowsocks.ClientConfig.server:type_name -> xray.common.protocol.ServerEndpoint
  282. 4, // [4:4] is the sub-list for method output_type
  283. 4, // [4:4] is the sub-list for method input_type
  284. 4, // [4:4] is the sub-list for extension type_name
  285. 4, // [4:4] is the sub-list for extension extendee
  286. 0, // [0:4] is the sub-list for field type_name
  287. }
  288. func init() { file_proxy_shadowsocks_config_proto_init() }
  289. func file_proxy_shadowsocks_config_proto_init() {
  290. if File_proxy_shadowsocks_config_proto != nil {
  291. return
  292. }
  293. if !protoimpl.UnsafeEnabled {
  294. file_proxy_shadowsocks_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  295. switch v := v.(*Account); i {
  296. case 0:
  297. return &v.state
  298. case 1:
  299. return &v.sizeCache
  300. case 2:
  301. return &v.unknownFields
  302. default:
  303. return nil
  304. }
  305. }
  306. file_proxy_shadowsocks_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  307. switch v := v.(*ServerConfig); i {
  308. case 0:
  309. return &v.state
  310. case 1:
  311. return &v.sizeCache
  312. case 2:
  313. return &v.unknownFields
  314. default:
  315. return nil
  316. }
  317. }
  318. file_proxy_shadowsocks_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  319. switch v := v.(*ClientConfig); i {
  320. case 0:
  321. return &v.state
  322. case 1:
  323. return &v.sizeCache
  324. case 2:
  325. return &v.unknownFields
  326. default:
  327. return nil
  328. }
  329. }
  330. }
  331. type x struct{}
  332. out := protoimpl.TypeBuilder{
  333. File: protoimpl.DescBuilder{
  334. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  335. RawDescriptor: file_proxy_shadowsocks_config_proto_rawDesc,
  336. NumEnums: 1,
  337. NumMessages: 3,
  338. NumExtensions: 0,
  339. NumServices: 0,
  340. },
  341. GoTypes: file_proxy_shadowsocks_config_proto_goTypes,
  342. DependencyIndexes: file_proxy_shadowsocks_config_proto_depIdxs,
  343. EnumInfos: file_proxy_shadowsocks_config_proto_enumTypes,
  344. MessageInfos: file_proxy_shadowsocks_config_proto_msgTypes,
  345. }.Build()
  346. File_proxy_shadowsocks_config_proto = out.File
  347. file_proxy_shadowsocks_config_proto_rawDesc = nil
  348. file_proxy_shadowsocks_config_proto_goTypes = nil
  349. file_proxy_shadowsocks_config_proto_depIdxs = nil
  350. }