config.pb.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  1. package trojan
  2. import (
  3. protocol "github.com/v2fly/v2ray-core/v5/common/protocol"
  4. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  5. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  6. reflect "reflect"
  7. sync "sync"
  8. )
  9. const (
  10. // Verify that this generated code is sufficiently up-to-date.
  11. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  12. // Verify that runtime/protoimpl is sufficiently up-to-date.
  13. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  14. )
  15. type Account struct {
  16. state protoimpl.MessageState
  17. sizeCache protoimpl.SizeCache
  18. unknownFields protoimpl.UnknownFields
  19. Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"`
  20. }
  21. func (x *Account) Reset() {
  22. *x = Account{}
  23. if protoimpl.UnsafeEnabled {
  24. mi := &file_proxy_trojan_config_proto_msgTypes[0]
  25. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  26. ms.StoreMessageInfo(mi)
  27. }
  28. }
  29. func (x *Account) String() string {
  30. return protoimpl.X.MessageStringOf(x)
  31. }
  32. func (*Account) ProtoMessage() {}
  33. func (x *Account) ProtoReflect() protoreflect.Message {
  34. mi := &file_proxy_trojan_config_proto_msgTypes[0]
  35. if protoimpl.UnsafeEnabled && x != nil {
  36. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  37. if ms.LoadMessageInfo() == nil {
  38. ms.StoreMessageInfo(mi)
  39. }
  40. return ms
  41. }
  42. return mi.MessageOf(x)
  43. }
  44. // Deprecated: Use Account.ProtoReflect.Descriptor instead.
  45. func (*Account) Descriptor() ([]byte, []int) {
  46. return file_proxy_trojan_config_proto_rawDescGZIP(), []int{0}
  47. }
  48. func (x *Account) GetPassword() string {
  49. if x != nil {
  50. return x.Password
  51. }
  52. return ""
  53. }
  54. type Fallback struct {
  55. state protoimpl.MessageState
  56. sizeCache protoimpl.SizeCache
  57. unknownFields protoimpl.UnknownFields
  58. Alpn string `protobuf:"bytes,1,opt,name=alpn,proto3" json:"alpn,omitempty"`
  59. Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
  60. Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
  61. Dest string `protobuf:"bytes,4,opt,name=dest,proto3" json:"dest,omitempty"`
  62. Xver uint64 `protobuf:"varint,5,opt,name=xver,proto3" json:"xver,omitempty"`
  63. }
  64. func (x *Fallback) Reset() {
  65. *x = Fallback{}
  66. if protoimpl.UnsafeEnabled {
  67. mi := &file_proxy_trojan_config_proto_msgTypes[1]
  68. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  69. ms.StoreMessageInfo(mi)
  70. }
  71. }
  72. func (x *Fallback) String() string {
  73. return protoimpl.X.MessageStringOf(x)
  74. }
  75. func (*Fallback) ProtoMessage() {}
  76. func (x *Fallback) ProtoReflect() protoreflect.Message {
  77. mi := &file_proxy_trojan_config_proto_msgTypes[1]
  78. if protoimpl.UnsafeEnabled && x != nil {
  79. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  80. if ms.LoadMessageInfo() == nil {
  81. ms.StoreMessageInfo(mi)
  82. }
  83. return ms
  84. }
  85. return mi.MessageOf(x)
  86. }
  87. // Deprecated: Use Fallback.ProtoReflect.Descriptor instead.
  88. func (*Fallback) Descriptor() ([]byte, []int) {
  89. return file_proxy_trojan_config_proto_rawDescGZIP(), []int{1}
  90. }
  91. func (x *Fallback) GetAlpn() string {
  92. if x != nil {
  93. return x.Alpn
  94. }
  95. return ""
  96. }
  97. func (x *Fallback) GetPath() string {
  98. if x != nil {
  99. return x.Path
  100. }
  101. return ""
  102. }
  103. func (x *Fallback) GetType() string {
  104. if x != nil {
  105. return x.Type
  106. }
  107. return ""
  108. }
  109. func (x *Fallback) GetDest() string {
  110. if x != nil {
  111. return x.Dest
  112. }
  113. return ""
  114. }
  115. func (x *Fallback) GetXver() uint64 {
  116. if x != nil {
  117. return x.Xver
  118. }
  119. return 0
  120. }
  121. type ClientConfig struct {
  122. state protoimpl.MessageState
  123. sizeCache protoimpl.SizeCache
  124. unknownFields protoimpl.UnknownFields
  125. Server []*protocol.ServerEndpoint `protobuf:"bytes,1,rep,name=server,proto3" json:"server,omitempty"`
  126. }
  127. func (x *ClientConfig) Reset() {
  128. *x = ClientConfig{}
  129. if protoimpl.UnsafeEnabled {
  130. mi := &file_proxy_trojan_config_proto_msgTypes[2]
  131. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  132. ms.StoreMessageInfo(mi)
  133. }
  134. }
  135. func (x *ClientConfig) String() string {
  136. return protoimpl.X.MessageStringOf(x)
  137. }
  138. func (*ClientConfig) ProtoMessage() {}
  139. func (x *ClientConfig) ProtoReflect() protoreflect.Message {
  140. mi := &file_proxy_trojan_config_proto_msgTypes[2]
  141. if protoimpl.UnsafeEnabled && 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 ClientConfig.ProtoReflect.Descriptor instead.
  151. func (*ClientConfig) Descriptor() ([]byte, []int) {
  152. return file_proxy_trojan_config_proto_rawDescGZIP(), []int{2}
  153. }
  154. func (x *ClientConfig) GetServer() []*protocol.ServerEndpoint {
  155. if x != nil {
  156. return x.Server
  157. }
  158. return nil
  159. }
  160. type ServerConfig struct {
  161. state protoimpl.MessageState
  162. sizeCache protoimpl.SizeCache
  163. unknownFields protoimpl.UnknownFields
  164. Users []*protocol.User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
  165. Fallbacks []*Fallback `protobuf:"bytes,3,rep,name=fallbacks,proto3" json:"fallbacks,omitempty"`
  166. }
  167. func (x *ServerConfig) Reset() {
  168. *x = ServerConfig{}
  169. if protoimpl.UnsafeEnabled {
  170. mi := &file_proxy_trojan_config_proto_msgTypes[3]
  171. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  172. ms.StoreMessageInfo(mi)
  173. }
  174. }
  175. func (x *ServerConfig) String() string {
  176. return protoimpl.X.MessageStringOf(x)
  177. }
  178. func (*ServerConfig) ProtoMessage() {}
  179. func (x *ServerConfig) ProtoReflect() protoreflect.Message {
  180. mi := &file_proxy_trojan_config_proto_msgTypes[3]
  181. if protoimpl.UnsafeEnabled && x != nil {
  182. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  183. if ms.LoadMessageInfo() == nil {
  184. ms.StoreMessageInfo(mi)
  185. }
  186. return ms
  187. }
  188. return mi.MessageOf(x)
  189. }
  190. // Deprecated: Use ServerConfig.ProtoReflect.Descriptor instead.
  191. func (*ServerConfig) Descriptor() ([]byte, []int) {
  192. return file_proxy_trojan_config_proto_rawDescGZIP(), []int{3}
  193. }
  194. func (x *ServerConfig) GetUsers() []*protocol.User {
  195. if x != nil {
  196. return x.Users
  197. }
  198. return nil
  199. }
  200. func (x *ServerConfig) GetFallbacks() []*Fallback {
  201. if x != nil {
  202. return x.Fallbacks
  203. }
  204. return nil
  205. }
  206. var File_proxy_trojan_config_proto protoreflect.FileDescriptor
  207. var file_proxy_trojan_config_proto_rawDesc = []byte{
  208. 0x0a, 0x19, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x74, 0x72, 0x6f, 0x6a, 0x61, 0x6e, 0x2f, 0x63,
  209. 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x76, 0x32, 0x72,
  210. 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x74, 0x72,
  211. 0x6f, 0x6a, 0x61, 0x6e, 0x1a, 0x1a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f,
  212. 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
  213. 0x1a, 0x21, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f,
  214. 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72,
  215. 0x6f, 0x74, 0x6f, 0x22, 0x25, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a,
  216. 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
  217. 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x6e, 0x0a, 0x08, 0x46, 0x61,
  218. 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x6c, 0x70, 0x6e, 0x18, 0x01,
  219. 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x6c, 0x70, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61,
  220. 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12,
  221. 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79,
  222. 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
  223. 0x52, 0x04, 0x64, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x78, 0x76, 0x65, 0x72, 0x18, 0x05,
  224. 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x78, 0x76, 0x65, 0x72, 0x22, 0x52, 0x0a, 0x0c, 0x43, 0x6c,
  225. 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, 0x0a, 0x06, 0x73, 0x65,
  226. 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x32, 0x72,
  227. 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70,
  228. 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e,
  229. 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x22, 0x87,
  230. 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12,
  231. 0x36, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20,
  232. 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
  233. 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x55, 0x73, 0x65, 0x72,
  234. 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x3f, 0x0a, 0x09, 0x66, 0x61, 0x6c, 0x6c, 0x62,
  235. 0x61, 0x63, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x32, 0x72,
  236. 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x74, 0x72,
  237. 0x6f, 0x6a, 0x61, 0x6e, 0x2e, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x09, 0x66,
  238. 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x42, 0x66, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e,
  239. 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79,
  240. 0x2e, 0x74, 0x72, 0x6f, 0x6a, 0x61, 0x6e, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75,
  241. 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61,
  242. 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x35, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f,
  243. 0x74, 0x72, 0x6f, 0x6a, 0x61, 0x6e, 0xaa, 0x02, 0x17, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43,
  244. 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x54, 0x72, 0x6f, 0x6a, 0x61, 0x6e,
  245. 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  246. }
  247. var (
  248. file_proxy_trojan_config_proto_rawDescOnce sync.Once
  249. file_proxy_trojan_config_proto_rawDescData = file_proxy_trojan_config_proto_rawDesc
  250. )
  251. func file_proxy_trojan_config_proto_rawDescGZIP() []byte {
  252. file_proxy_trojan_config_proto_rawDescOnce.Do(func() {
  253. file_proxy_trojan_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_proxy_trojan_config_proto_rawDescData)
  254. })
  255. return file_proxy_trojan_config_proto_rawDescData
  256. }
  257. var file_proxy_trojan_config_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
  258. var file_proxy_trojan_config_proto_goTypes = []interface{}{
  259. (*Account)(nil), // 0: v2ray.core.proxy.trojan.Account
  260. (*Fallback)(nil), // 1: v2ray.core.proxy.trojan.Fallback
  261. (*ClientConfig)(nil), // 2: v2ray.core.proxy.trojan.ClientConfig
  262. (*ServerConfig)(nil), // 3: v2ray.core.proxy.trojan.ServerConfig
  263. (*protocol.ServerEndpoint)(nil), // 4: v2ray.core.common.protocol.ServerEndpoint
  264. (*protocol.User)(nil), // 5: v2ray.core.common.protocol.User
  265. }
  266. var file_proxy_trojan_config_proto_depIdxs = []int32{
  267. 4, // 0: v2ray.core.proxy.trojan.ClientConfig.server:type_name -> v2ray.core.common.protocol.ServerEndpoint
  268. 5, // 1: v2ray.core.proxy.trojan.ServerConfig.users:type_name -> v2ray.core.common.protocol.User
  269. 1, // 2: v2ray.core.proxy.trojan.ServerConfig.fallbacks:type_name -> v2ray.core.proxy.trojan.Fallback
  270. 3, // [3:3] is the sub-list for method output_type
  271. 3, // [3:3] is the sub-list for method input_type
  272. 3, // [3:3] is the sub-list for extension type_name
  273. 3, // [3:3] is the sub-list for extension extendee
  274. 0, // [0:3] is the sub-list for field type_name
  275. }
  276. func init() { file_proxy_trojan_config_proto_init() }
  277. func file_proxy_trojan_config_proto_init() {
  278. if File_proxy_trojan_config_proto != nil {
  279. return
  280. }
  281. if !protoimpl.UnsafeEnabled {
  282. file_proxy_trojan_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  283. switch v := v.(*Account); i {
  284. case 0:
  285. return &v.state
  286. case 1:
  287. return &v.sizeCache
  288. case 2:
  289. return &v.unknownFields
  290. default:
  291. return nil
  292. }
  293. }
  294. file_proxy_trojan_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  295. switch v := v.(*Fallback); 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_trojan_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  307. switch v := v.(*ClientConfig); 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_trojan_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
  319. switch v := v.(*ServerConfig); 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_trojan_config_proto_rawDesc,
  336. NumEnums: 0,
  337. NumMessages: 4,
  338. NumExtensions: 0,
  339. NumServices: 0,
  340. },
  341. GoTypes: file_proxy_trojan_config_proto_goTypes,
  342. DependencyIndexes: file_proxy_trojan_config_proto_depIdxs,
  343. MessageInfos: file_proxy_trojan_config_proto_msgTypes,
  344. }.Build()
  345. File_proxy_trojan_config_proto = out.File
  346. file_proxy_trojan_config_proto_rawDesc = nil
  347. file_proxy_trojan_config_proto_goTypes = nil
  348. file_proxy_trojan_config_proto_depIdxs = nil
  349. }