config.pb.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. package hysteria2
  2. import (
  3. protocol "github.com/v2fly/v2ray-core/v5/common/protocol"
  4. _ "github.com/v2fly/v2ray-core/v5/common/protoext"
  5. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  6. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  7. reflect "reflect"
  8. sync "sync"
  9. )
  10. const (
  11. // Verify that this generated code is sufficiently up-to-date.
  12. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  13. // Verify that runtime/protoimpl is sufficiently up-to-date.
  14. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  15. )
  16. type Congestion struct {
  17. state protoimpl.MessageState
  18. sizeCache protoimpl.SizeCache
  19. unknownFields protoimpl.UnknownFields
  20. Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
  21. UpMbps uint64 `protobuf:"varint,2,opt,name=up_mbps,json=upMbps,proto3" json:"up_mbps,omitempty"`
  22. DownMbps uint64 `protobuf:"varint,3,opt,name=down_mbps,json=downMbps,proto3" json:"down_mbps,omitempty"`
  23. }
  24. func (x *Congestion) Reset() {
  25. *x = Congestion{}
  26. if protoimpl.UnsafeEnabled {
  27. mi := &file_transport_internet_hysteria2_config_proto_msgTypes[0]
  28. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  29. ms.StoreMessageInfo(mi)
  30. }
  31. }
  32. func (x *Congestion) String() string {
  33. return protoimpl.X.MessageStringOf(x)
  34. }
  35. func (*Congestion) ProtoMessage() {}
  36. func (x *Congestion) ProtoReflect() protoreflect.Message {
  37. mi := &file_transport_internet_hysteria2_config_proto_msgTypes[0]
  38. if protoimpl.UnsafeEnabled && x != nil {
  39. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  40. if ms.LoadMessageInfo() == nil {
  41. ms.StoreMessageInfo(mi)
  42. }
  43. return ms
  44. }
  45. return mi.MessageOf(x)
  46. }
  47. // Deprecated: Use Congestion.ProtoReflect.Descriptor instead.
  48. func (*Congestion) Descriptor() ([]byte, []int) {
  49. return file_transport_internet_hysteria2_config_proto_rawDescGZIP(), []int{0}
  50. }
  51. func (x *Congestion) GetType() string {
  52. if x != nil {
  53. return x.Type
  54. }
  55. return ""
  56. }
  57. func (x *Congestion) GetUpMbps() uint64 {
  58. if x != nil {
  59. return x.UpMbps
  60. }
  61. return 0
  62. }
  63. func (x *Congestion) GetDownMbps() uint64 {
  64. if x != nil {
  65. return x.DownMbps
  66. }
  67. return 0
  68. }
  69. type Config struct {
  70. state protoimpl.MessageState
  71. sizeCache protoimpl.SizeCache
  72. unknownFields protoimpl.UnknownFields
  73. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
  74. Security *protocol.SecurityConfig `protobuf:"bytes,2,opt,name=security,proto3" json:"security,omitempty"`
  75. Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
  76. Congestion *Congestion `protobuf:"bytes,4,opt,name=congestion,proto3" json:"congestion,omitempty"`
  77. IgnoreClientBandwidth bool `protobuf:"varint,5,opt,name=ignore_client_bandwidth,json=ignoreClientBandwidth,proto3" json:"ignore_client_bandwidth,omitempty"`
  78. UseUdpExtension bool `protobuf:"varint,6,opt,name=use_udp_extension,json=useUdpExtension,proto3" json:"use_udp_extension,omitempty"`
  79. }
  80. func (x *Config) Reset() {
  81. *x = Config{}
  82. if protoimpl.UnsafeEnabled {
  83. mi := &file_transport_internet_hysteria2_config_proto_msgTypes[1]
  84. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  85. ms.StoreMessageInfo(mi)
  86. }
  87. }
  88. func (x *Config) String() string {
  89. return protoimpl.X.MessageStringOf(x)
  90. }
  91. func (*Config) ProtoMessage() {}
  92. func (x *Config) ProtoReflect() protoreflect.Message {
  93. mi := &file_transport_internet_hysteria2_config_proto_msgTypes[1]
  94. if protoimpl.UnsafeEnabled && x != nil {
  95. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  96. if ms.LoadMessageInfo() == nil {
  97. ms.StoreMessageInfo(mi)
  98. }
  99. return ms
  100. }
  101. return mi.MessageOf(x)
  102. }
  103. // Deprecated: Use Config.ProtoReflect.Descriptor instead.
  104. func (*Config) Descriptor() ([]byte, []int) {
  105. return file_transport_internet_hysteria2_config_proto_rawDescGZIP(), []int{1}
  106. }
  107. func (x *Config) GetKey() string {
  108. if x != nil {
  109. return x.Key
  110. }
  111. return ""
  112. }
  113. func (x *Config) GetSecurity() *protocol.SecurityConfig {
  114. if x != nil {
  115. return x.Security
  116. }
  117. return nil
  118. }
  119. func (x *Config) GetPassword() string {
  120. if x != nil {
  121. return x.Password
  122. }
  123. return ""
  124. }
  125. func (x *Config) GetCongestion() *Congestion {
  126. if x != nil {
  127. return x.Congestion
  128. }
  129. return nil
  130. }
  131. func (x *Config) GetIgnoreClientBandwidth() bool {
  132. if x != nil {
  133. return x.IgnoreClientBandwidth
  134. }
  135. return false
  136. }
  137. func (x *Config) GetUseUdpExtension() bool {
  138. if x != nil {
  139. return x.UseUdpExtension
  140. }
  141. return false
  142. }
  143. var File_transport_internet_hysteria2_config_proto protoreflect.FileDescriptor
  144. var file_transport_internet_hysteria2_config_proto_rawDesc = []byte{
  145. 0x0a, 0x29, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65,
  146. 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x79, 0x73, 0x74, 0x65, 0x72, 0x69, 0x61, 0x32, 0x2f, 0x63,
  147. 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x27, 0x76, 0x32, 0x72,
  148. 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72,
  149. 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x79, 0x73, 0x74, 0x65,
  150. 0x72, 0x69, 0x61, 0x32, 0x1a, 0x1d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f,
  151. 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72,
  152. 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74,
  153. 0x6f, 0x65, 0x78, 0x74, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
  154. 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x56, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x67, 0x65, 0x73, 0x74,
  155. 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
  156. 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x70, 0x5f, 0x6d, 0x62,
  157. 0x70, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x75, 0x70, 0x4d, 0x62, 0x70, 0x73,
  158. 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x6f, 0x77, 0x6e, 0x5f, 0x6d, 0x62, 0x70, 0x73, 0x18, 0x03, 0x20,
  159. 0x01, 0x28, 0x04, 0x52, 0x08, 0x64, 0x6f, 0x77, 0x6e, 0x4d, 0x62, 0x70, 0x73, 0x22, 0xd3, 0x02,
  160. 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
  161. 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x08, 0x73, 0x65,
  162. 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76,
  163. 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
  164. 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69,
  165. 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69,
  166. 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03,
  167. 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x53,
  168. 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01,
  169. 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e,
  170. 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e,
  171. 0x65, 0x74, 0x2e, 0x68, 0x79, 0x73, 0x74, 0x65, 0x72, 0x69, 0x61, 0x32, 0x2e, 0x43, 0x6f, 0x6e,
  172. 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x67, 0x65, 0x73, 0x74,
  173. 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x17, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x63, 0x6c,
  174. 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x05,
  175. 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x43, 0x6c, 0x69, 0x65,
  176. 0x6e, 0x74, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, 0x2a, 0x0a, 0x11, 0x75,
  177. 0x73, 0x65, 0x5f, 0x75, 0x64, 0x70, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
  178. 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x75, 0x73, 0x65, 0x55, 0x64, 0x70, 0x45, 0x78,
  179. 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x1a, 0x82, 0xb5, 0x18, 0x16, 0x0a, 0x09, 0x74,
  180. 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x09, 0x68, 0x79, 0x73, 0x74, 0x65, 0x72,
  181. 0x69, 0x61, 0x32, 0x42, 0x96, 0x01, 0x0a, 0x2b, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61,
  182. 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74,
  183. 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x79, 0x73, 0x74, 0x65, 0x72,
  184. 0x69, 0x61, 0x32, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
  185. 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f,
  186. 0x72, 0x65, 0x2f, 0x76, 0x35, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f,
  187. 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x79, 0x73, 0x74, 0x65, 0x72, 0x69,
  188. 0x61, 0x32, 0xaa, 0x02, 0x27, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e,
  189. 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e,
  190. 0x65, 0x74, 0x2e, 0x48, 0x79, 0x73, 0x74, 0x65, 0x72, 0x69, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72,
  191. 0x6f, 0x74, 0x6f, 0x33,
  192. }
  193. var (
  194. file_transport_internet_hysteria2_config_proto_rawDescOnce sync.Once
  195. file_transport_internet_hysteria2_config_proto_rawDescData = file_transport_internet_hysteria2_config_proto_rawDesc
  196. )
  197. func file_transport_internet_hysteria2_config_proto_rawDescGZIP() []byte {
  198. file_transport_internet_hysteria2_config_proto_rawDescOnce.Do(func() {
  199. file_transport_internet_hysteria2_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_transport_internet_hysteria2_config_proto_rawDescData)
  200. })
  201. return file_transport_internet_hysteria2_config_proto_rawDescData
  202. }
  203. var file_transport_internet_hysteria2_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
  204. var file_transport_internet_hysteria2_config_proto_goTypes = []interface{}{
  205. (*Congestion)(nil), // 0: v2ray.core.transport.internet.hysteria2.Congestion
  206. (*Config)(nil), // 1: v2ray.core.transport.internet.hysteria2.Config
  207. (*protocol.SecurityConfig)(nil), // 2: v2ray.core.common.protocol.SecurityConfig
  208. }
  209. var file_transport_internet_hysteria2_config_proto_depIdxs = []int32{
  210. 2, // 0: v2ray.core.transport.internet.hysteria2.Config.security:type_name -> v2ray.core.common.protocol.SecurityConfig
  211. 0, // 1: v2ray.core.transport.internet.hysteria2.Config.congestion:type_name -> v2ray.core.transport.internet.hysteria2.Congestion
  212. 2, // [2:2] is the sub-list for method output_type
  213. 2, // [2:2] is the sub-list for method input_type
  214. 2, // [2:2] is the sub-list for extension type_name
  215. 2, // [2:2] is the sub-list for extension extendee
  216. 0, // [0:2] is the sub-list for field type_name
  217. }
  218. func init() { file_transport_internet_hysteria2_config_proto_init() }
  219. func file_transport_internet_hysteria2_config_proto_init() {
  220. if File_transport_internet_hysteria2_config_proto != nil {
  221. return
  222. }
  223. if !protoimpl.UnsafeEnabled {
  224. file_transport_internet_hysteria2_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  225. switch v := v.(*Congestion); i {
  226. case 0:
  227. return &v.state
  228. case 1:
  229. return &v.sizeCache
  230. case 2:
  231. return &v.unknownFields
  232. default:
  233. return nil
  234. }
  235. }
  236. file_transport_internet_hysteria2_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  237. switch v := v.(*Config); i {
  238. case 0:
  239. return &v.state
  240. case 1:
  241. return &v.sizeCache
  242. case 2:
  243. return &v.unknownFields
  244. default:
  245. return nil
  246. }
  247. }
  248. }
  249. type x struct{}
  250. out := protoimpl.TypeBuilder{
  251. File: protoimpl.DescBuilder{
  252. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  253. RawDescriptor: file_transport_internet_hysteria2_config_proto_rawDesc,
  254. NumEnums: 0,
  255. NumMessages: 2,
  256. NumExtensions: 0,
  257. NumServices: 0,
  258. },
  259. GoTypes: file_transport_internet_hysteria2_config_proto_goTypes,
  260. DependencyIndexes: file_transport_internet_hysteria2_config_proto_depIdxs,
  261. MessageInfos: file_transport_internet_hysteria2_config_proto_msgTypes,
  262. }.Build()
  263. File_transport_internet_hysteria2_config_proto = out.File
  264. file_transport_internet_hysteria2_config_proto_rawDesc = nil
  265. file_transport_internet_hysteria2_config_proto_goTypes = nil
  266. file_transport_internet_hysteria2_config_proto_depIdxs = nil
  267. }