config.pb.go 13 KB

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