config.pb.go 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.36.11
  4. // protoc v6.33.5
  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. unsafe "unsafe"
  15. )
  16. const (
  17. // Verify that this generated code is sufficiently up-to-date.
  18. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  19. // Verify that runtime/protoimpl is sufficiently up-to-date.
  20. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  21. )
  22. type CipherType int32
  23. const (
  24. CipherType_UNKNOWN CipherType = 0
  25. CipherType_AES_128_GCM CipherType = 5
  26. CipherType_AES_256_GCM CipherType = 6
  27. CipherType_CHACHA20_POLY1305 CipherType = 7
  28. CipherType_XCHACHA20_POLY1305 CipherType = 8
  29. CipherType_NONE CipherType = 9
  30. )
  31. // Enum value maps for CipherType.
  32. var (
  33. CipherType_name = map[int32]string{
  34. 0: "UNKNOWN",
  35. 5: "AES_128_GCM",
  36. 6: "AES_256_GCM",
  37. 7: "CHACHA20_POLY1305",
  38. 8: "XCHACHA20_POLY1305",
  39. 9: "NONE",
  40. }
  41. CipherType_value = map[string]int32{
  42. "UNKNOWN": 0,
  43. "AES_128_GCM": 5,
  44. "AES_256_GCM": 6,
  45. "CHACHA20_POLY1305": 7,
  46. "XCHACHA20_POLY1305": 8,
  47. "NONE": 9,
  48. }
  49. )
  50. func (x CipherType) Enum() *CipherType {
  51. p := new(CipherType)
  52. *p = x
  53. return p
  54. }
  55. func (x CipherType) String() string {
  56. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  57. }
  58. func (CipherType) Descriptor() protoreflect.EnumDescriptor {
  59. return file_proxy_shadowsocks_config_proto_enumTypes[0].Descriptor()
  60. }
  61. func (CipherType) Type() protoreflect.EnumType {
  62. return &file_proxy_shadowsocks_config_proto_enumTypes[0]
  63. }
  64. func (x CipherType) Number() protoreflect.EnumNumber {
  65. return protoreflect.EnumNumber(x)
  66. }
  67. // Deprecated: Use CipherType.Descriptor instead.
  68. func (CipherType) EnumDescriptor() ([]byte, []int) {
  69. return file_proxy_shadowsocks_config_proto_rawDescGZIP(), []int{0}
  70. }
  71. type Account struct {
  72. state protoimpl.MessageState `protogen:"open.v1"`
  73. Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"`
  74. CipherType CipherType `protobuf:"varint,2,opt,name=cipher_type,json=cipherType,proto3,enum=xray.proxy.shadowsocks.CipherType" json:"cipher_type,omitempty"`
  75. IvCheck bool `protobuf:"varint,3,opt,name=iv_check,json=ivCheck,proto3" json:"iv_check,omitempty"`
  76. unknownFields protoimpl.UnknownFields
  77. sizeCache protoimpl.SizeCache
  78. }
  79. func (x *Account) Reset() {
  80. *x = Account{}
  81. mi := &file_proxy_shadowsocks_config_proto_msgTypes[0]
  82. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  83. ms.StoreMessageInfo(mi)
  84. }
  85. func (x *Account) String() string {
  86. return protoimpl.X.MessageStringOf(x)
  87. }
  88. func (*Account) ProtoMessage() {}
  89. func (x *Account) ProtoReflect() protoreflect.Message {
  90. mi := &file_proxy_shadowsocks_config_proto_msgTypes[0]
  91. if x != nil {
  92. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  93. if ms.LoadMessageInfo() == nil {
  94. ms.StoreMessageInfo(mi)
  95. }
  96. return ms
  97. }
  98. return mi.MessageOf(x)
  99. }
  100. // Deprecated: Use Account.ProtoReflect.Descriptor instead.
  101. func (*Account) Descriptor() ([]byte, []int) {
  102. return file_proxy_shadowsocks_config_proto_rawDescGZIP(), []int{0}
  103. }
  104. func (x *Account) GetPassword() string {
  105. if x != nil {
  106. return x.Password
  107. }
  108. return ""
  109. }
  110. func (x *Account) GetCipherType() CipherType {
  111. if x != nil {
  112. return x.CipherType
  113. }
  114. return CipherType_UNKNOWN
  115. }
  116. func (x *Account) GetIvCheck() bool {
  117. if x != nil {
  118. return x.IvCheck
  119. }
  120. return false
  121. }
  122. type ServerConfig struct {
  123. state protoimpl.MessageState `protogen:"open.v1"`
  124. Users []*protocol.User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
  125. Network []net.Network `protobuf:"varint,2,rep,packed,name=network,proto3,enum=xray.common.net.Network" json:"network,omitempty"`
  126. unknownFields protoimpl.UnknownFields
  127. sizeCache protoimpl.SizeCache
  128. }
  129. func (x *ServerConfig) Reset() {
  130. *x = ServerConfig{}
  131. mi := &file_proxy_shadowsocks_config_proto_msgTypes[1]
  132. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  133. ms.StoreMessageInfo(mi)
  134. }
  135. func (x *ServerConfig) String() string {
  136. return protoimpl.X.MessageStringOf(x)
  137. }
  138. func (*ServerConfig) ProtoMessage() {}
  139. func (x *ServerConfig) ProtoReflect() protoreflect.Message {
  140. mi := &file_proxy_shadowsocks_config_proto_msgTypes[1]
  141. if x != nil {
  142. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  143. if ms.LoadMessageInfo() == nil {
  144. ms.StoreMessageInfo(mi)
  145. }
  146. return ms
  147. }
  148. return mi.MessageOf(x)
  149. }
  150. // Deprecated: Use ServerConfig.ProtoReflect.Descriptor instead.
  151. func (*ServerConfig) Descriptor() ([]byte, []int) {
  152. return file_proxy_shadowsocks_config_proto_rawDescGZIP(), []int{1}
  153. }
  154. func (x *ServerConfig) GetUsers() []*protocol.User {
  155. if x != nil {
  156. return x.Users
  157. }
  158. return nil
  159. }
  160. func (x *ServerConfig) GetNetwork() []net.Network {
  161. if x != nil {
  162. return x.Network
  163. }
  164. return nil
  165. }
  166. type ClientConfig struct {
  167. state protoimpl.MessageState `protogen:"open.v1"`
  168. Server *protocol.ServerEndpoint `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
  169. unknownFields protoimpl.UnknownFields
  170. sizeCache protoimpl.SizeCache
  171. }
  172. func (x *ClientConfig) Reset() {
  173. *x = ClientConfig{}
  174. mi := &file_proxy_shadowsocks_config_proto_msgTypes[2]
  175. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  176. ms.StoreMessageInfo(mi)
  177. }
  178. func (x *ClientConfig) String() string {
  179. return protoimpl.X.MessageStringOf(x)
  180. }
  181. func (*ClientConfig) ProtoMessage() {}
  182. func (x *ClientConfig) ProtoReflect() protoreflect.Message {
  183. mi := &file_proxy_shadowsocks_config_proto_msgTypes[2]
  184. if x != nil {
  185. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  186. if ms.LoadMessageInfo() == nil {
  187. ms.StoreMessageInfo(mi)
  188. }
  189. return ms
  190. }
  191. return mi.MessageOf(x)
  192. }
  193. // Deprecated: Use ClientConfig.ProtoReflect.Descriptor instead.
  194. func (*ClientConfig) Descriptor() ([]byte, []int) {
  195. return file_proxy_shadowsocks_config_proto_rawDescGZIP(), []int{2}
  196. }
  197. func (x *ClientConfig) GetServer() *protocol.ServerEndpoint {
  198. if x != nil {
  199. return x.Server
  200. }
  201. return nil
  202. }
  203. var File_proxy_shadowsocks_config_proto protoreflect.FileDescriptor
  204. const file_proxy_shadowsocks_config_proto_rawDesc = "" +
  205. "\n" +
  206. "\x1eproxy/shadowsocks/config.proto\x12\x16xray.proxy.shadowsocks\x1a\x18common/net/network.proto\x1a\x1acommon/protocol/user.proto\x1a!common/protocol/server_spec.proto\"\x85\x01\n" +
  207. "\aAccount\x12\x1a\n" +
  208. "\bpassword\x18\x01 \x01(\tR\bpassword\x12C\n" +
  209. "\vcipher_type\x18\x02 \x01(\x0e2\".xray.proxy.shadowsocks.CipherTypeR\n" +
  210. "cipherType\x12\x19\n" +
  211. "\biv_check\x18\x03 \x01(\bR\aivCheck\"t\n" +
  212. "\fServerConfig\x120\n" +
  213. "\x05users\x18\x01 \x03(\v2\x1a.xray.common.protocol.UserR\x05users\x122\n" +
  214. "\anetwork\x18\x02 \x03(\x0e2\x18.xray.common.net.NetworkR\anetwork\"L\n" +
  215. "\fClientConfig\x12<\n" +
  216. "\x06server\x18\x01 \x01(\v2$.xray.common.protocol.ServerEndpointR\x06server*t\n" +
  217. "\n" +
  218. "CipherType\x12\v\n" +
  219. "\aUNKNOWN\x10\x00\x12\x0f\n" +
  220. "\vAES_128_GCM\x10\x05\x12\x0f\n" +
  221. "\vAES_256_GCM\x10\x06\x12\x15\n" +
  222. "\x11CHACHA20_POLY1305\x10\a\x12\x16\n" +
  223. "\x12XCHACHA20_POLY1305\x10\b\x12\b\n" +
  224. "\x04NONE\x10\tBd\n" +
  225. "\x1acom.xray.proxy.shadowsocksP\x01Z+github.com/xtls/xray-core/proxy/shadowsocks\xaa\x02\x16Xray.Proxy.Shadowsocksb\x06proto3"
  226. var (
  227. file_proxy_shadowsocks_config_proto_rawDescOnce sync.Once
  228. file_proxy_shadowsocks_config_proto_rawDescData []byte
  229. )
  230. func file_proxy_shadowsocks_config_proto_rawDescGZIP() []byte {
  231. file_proxy_shadowsocks_config_proto_rawDescOnce.Do(func() {
  232. file_proxy_shadowsocks_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_proxy_shadowsocks_config_proto_rawDesc), len(file_proxy_shadowsocks_config_proto_rawDesc)))
  233. })
  234. return file_proxy_shadowsocks_config_proto_rawDescData
  235. }
  236. var file_proxy_shadowsocks_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
  237. var file_proxy_shadowsocks_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
  238. var file_proxy_shadowsocks_config_proto_goTypes = []any{
  239. (CipherType)(0), // 0: xray.proxy.shadowsocks.CipherType
  240. (*Account)(nil), // 1: xray.proxy.shadowsocks.Account
  241. (*ServerConfig)(nil), // 2: xray.proxy.shadowsocks.ServerConfig
  242. (*ClientConfig)(nil), // 3: xray.proxy.shadowsocks.ClientConfig
  243. (*protocol.User)(nil), // 4: xray.common.protocol.User
  244. (net.Network)(0), // 5: xray.common.net.Network
  245. (*protocol.ServerEndpoint)(nil), // 6: xray.common.protocol.ServerEndpoint
  246. }
  247. var file_proxy_shadowsocks_config_proto_depIdxs = []int32{
  248. 0, // 0: xray.proxy.shadowsocks.Account.cipher_type:type_name -> xray.proxy.shadowsocks.CipherType
  249. 4, // 1: xray.proxy.shadowsocks.ServerConfig.users:type_name -> xray.common.protocol.User
  250. 5, // 2: xray.proxy.shadowsocks.ServerConfig.network:type_name -> xray.common.net.Network
  251. 6, // 3: xray.proxy.shadowsocks.ClientConfig.server:type_name -> xray.common.protocol.ServerEndpoint
  252. 4, // [4:4] is the sub-list for method output_type
  253. 4, // [4:4] is the sub-list for method input_type
  254. 4, // [4:4] is the sub-list for extension type_name
  255. 4, // [4:4] is the sub-list for extension extendee
  256. 0, // [0:4] is the sub-list for field type_name
  257. }
  258. func init() { file_proxy_shadowsocks_config_proto_init() }
  259. func file_proxy_shadowsocks_config_proto_init() {
  260. if File_proxy_shadowsocks_config_proto != nil {
  261. return
  262. }
  263. type x struct{}
  264. out := protoimpl.TypeBuilder{
  265. File: protoimpl.DescBuilder{
  266. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  267. RawDescriptor: unsafe.Slice(unsafe.StringData(file_proxy_shadowsocks_config_proto_rawDesc), len(file_proxy_shadowsocks_config_proto_rawDesc)),
  268. NumEnums: 1,
  269. NumMessages: 3,
  270. NumExtensions: 0,
  271. NumServices: 0,
  272. },
  273. GoTypes: file_proxy_shadowsocks_config_proto_goTypes,
  274. DependencyIndexes: file_proxy_shadowsocks_config_proto_depIdxs,
  275. EnumInfos: file_proxy_shadowsocks_config_proto_enumTypes,
  276. MessageInfos: file_proxy_shadowsocks_config_proto_msgTypes,
  277. }.Build()
  278. File_proxy_shadowsocks_config_proto = out.File
  279. file_proxy_shadowsocks_config_proto_goTypes = nil
  280. file_proxy_shadowsocks_config_proto_depIdxs = nil
  281. }