config.pb.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. package websocket
  2. import (
  3. _ "github.com/v2fly/v2ray-core/v5/common/protoext"
  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 Header struct {
  16. state protoimpl.MessageState
  17. sizeCache protoimpl.SizeCache
  18. unknownFields protoimpl.UnknownFields
  19. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
  20. Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
  21. }
  22. func (x *Header) Reset() {
  23. *x = Header{}
  24. if protoimpl.UnsafeEnabled {
  25. mi := &file_transport_internet_websocket_config_proto_msgTypes[0]
  26. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  27. ms.StoreMessageInfo(mi)
  28. }
  29. }
  30. func (x *Header) String() string {
  31. return protoimpl.X.MessageStringOf(x)
  32. }
  33. func (*Header) ProtoMessage() {}
  34. func (x *Header) ProtoReflect() protoreflect.Message {
  35. mi := &file_transport_internet_websocket_config_proto_msgTypes[0]
  36. if protoimpl.UnsafeEnabled && x != nil {
  37. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  38. if ms.LoadMessageInfo() == nil {
  39. ms.StoreMessageInfo(mi)
  40. }
  41. return ms
  42. }
  43. return mi.MessageOf(x)
  44. }
  45. // Deprecated: Use Header.ProtoReflect.Descriptor instead.
  46. func (*Header) Descriptor() ([]byte, []int) {
  47. return file_transport_internet_websocket_config_proto_rawDescGZIP(), []int{0}
  48. }
  49. func (x *Header) GetKey() string {
  50. if x != nil {
  51. return x.Key
  52. }
  53. return ""
  54. }
  55. func (x *Header) GetValue() string {
  56. if x != nil {
  57. return x.Value
  58. }
  59. return ""
  60. }
  61. type Config struct {
  62. state protoimpl.MessageState
  63. sizeCache protoimpl.SizeCache
  64. unknownFields protoimpl.UnknownFields
  65. // URL path to the WebSocket service. Empty value means root(/).
  66. Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
  67. Header []*Header `protobuf:"bytes,3,rep,name=header,proto3" json:"header,omitempty"`
  68. AcceptProxyProtocol bool `protobuf:"varint,4,opt,name=accept_proxy_protocol,json=acceptProxyProtocol,proto3" json:"accept_proxy_protocol,omitempty"`
  69. MaxEarlyData int32 `protobuf:"varint,5,opt,name=max_early_data,json=maxEarlyData,proto3" json:"max_early_data,omitempty"`
  70. UseBrowserForwarding bool `protobuf:"varint,6,opt,name=use_browser_forwarding,json=useBrowserForwarding,proto3" json:"use_browser_forwarding,omitempty"`
  71. EarlyDataHeaderName string `protobuf:"bytes,7,opt,name=early_data_header_name,json=earlyDataHeaderName,proto3" json:"early_data_header_name,omitempty"`
  72. }
  73. func (x *Config) Reset() {
  74. *x = Config{}
  75. if protoimpl.UnsafeEnabled {
  76. mi := &file_transport_internet_websocket_config_proto_msgTypes[1]
  77. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  78. ms.StoreMessageInfo(mi)
  79. }
  80. }
  81. func (x *Config) String() string {
  82. return protoimpl.X.MessageStringOf(x)
  83. }
  84. func (*Config) ProtoMessage() {}
  85. func (x *Config) ProtoReflect() protoreflect.Message {
  86. mi := &file_transport_internet_websocket_config_proto_msgTypes[1]
  87. if protoimpl.UnsafeEnabled && x != nil {
  88. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  89. if ms.LoadMessageInfo() == nil {
  90. ms.StoreMessageInfo(mi)
  91. }
  92. return ms
  93. }
  94. return mi.MessageOf(x)
  95. }
  96. // Deprecated: Use Config.ProtoReflect.Descriptor instead.
  97. func (*Config) Descriptor() ([]byte, []int) {
  98. return file_transport_internet_websocket_config_proto_rawDescGZIP(), []int{1}
  99. }
  100. func (x *Config) GetPath() string {
  101. if x != nil {
  102. return x.Path
  103. }
  104. return ""
  105. }
  106. func (x *Config) GetHeader() []*Header {
  107. if x != nil {
  108. return x.Header
  109. }
  110. return nil
  111. }
  112. func (x *Config) GetAcceptProxyProtocol() bool {
  113. if x != nil {
  114. return x.AcceptProxyProtocol
  115. }
  116. return false
  117. }
  118. func (x *Config) GetMaxEarlyData() int32 {
  119. if x != nil {
  120. return x.MaxEarlyData
  121. }
  122. return 0
  123. }
  124. func (x *Config) GetUseBrowserForwarding() bool {
  125. if x != nil {
  126. return x.UseBrowserForwarding
  127. }
  128. return false
  129. }
  130. func (x *Config) GetEarlyDataHeaderName() string {
  131. if x != nil {
  132. return x.EarlyDataHeaderName
  133. }
  134. return ""
  135. }
  136. var File_transport_internet_websocket_config_proto protoreflect.FileDescriptor
  137. var file_transport_internet_websocket_config_proto_rawDesc = []byte{
  138. 0x0a, 0x29, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65,
  139. 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2f, 0x63,
  140. 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x27, 0x76, 0x32, 0x72,
  141. 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72,
  142. 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x6f,
  143. 0x63, 0x6b, 0x65, 0x74, 0x1a, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f,
  144. 0x74, 0x6f, 0x65, 0x78, 0x74, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73,
  145. 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x30, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72,
  146. 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
  147. 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
  148. 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xd2, 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6e,
  149. 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28,
  150. 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x47, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65,
  151. 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e,
  152. 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69,
  153. 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65,
  154. 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72,
  155. 0x12, 0x32, 0x0a, 0x15, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79,
  156. 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52,
  157. 0x13, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74,
  158. 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x61, 0x72, 0x6c,
  159. 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x61,
  160. 0x78, 0x45, 0x61, 0x72, 0x6c, 0x79, 0x44, 0x61, 0x74, 0x61, 0x12, 0x34, 0x0a, 0x16, 0x75, 0x73,
  161. 0x65, 0x5f, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72,
  162. 0x64, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x75, 0x73, 0x65, 0x42,
  163. 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67,
  164. 0x12, 0x33, 0x0a, 0x16, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x68,
  165. 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09,
  166. 0x52, 0x13, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x44, 0x61, 0x74, 0x61, 0x48, 0x65, 0x61, 0x64, 0x65,
  167. 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x20, 0x82, 0xb5, 0x18, 0x1c, 0x0a, 0x09, 0x74, 0x72, 0x61,
  168. 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x02, 0x77, 0x73, 0x8a, 0xff, 0x29, 0x09, 0x77, 0x65,
  169. 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x42, 0x96, 0x01,
  170. 0x0a, 0x2b, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65,
  171. 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72,
  172. 0x6e, 0x65, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x50, 0x01, 0x5a,
  173. 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c,
  174. 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x35, 0x2f,
  175. 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e,
  176. 0x65, 0x74, 0x2f, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0xaa, 0x02, 0x27, 0x56,
  177. 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70,
  178. 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x57, 0x65, 0x62,
  179. 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  180. }
  181. var (
  182. file_transport_internet_websocket_config_proto_rawDescOnce sync.Once
  183. file_transport_internet_websocket_config_proto_rawDescData = file_transport_internet_websocket_config_proto_rawDesc
  184. )
  185. func file_transport_internet_websocket_config_proto_rawDescGZIP() []byte {
  186. file_transport_internet_websocket_config_proto_rawDescOnce.Do(func() {
  187. file_transport_internet_websocket_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_transport_internet_websocket_config_proto_rawDescData)
  188. })
  189. return file_transport_internet_websocket_config_proto_rawDescData
  190. }
  191. var file_transport_internet_websocket_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
  192. var file_transport_internet_websocket_config_proto_goTypes = []interface{}{
  193. (*Header)(nil), // 0: v2ray.core.transport.internet.websocket.Header
  194. (*Config)(nil), // 1: v2ray.core.transport.internet.websocket.Config
  195. }
  196. var file_transport_internet_websocket_config_proto_depIdxs = []int32{
  197. 0, // 0: v2ray.core.transport.internet.websocket.Config.header:type_name -> v2ray.core.transport.internet.websocket.Header
  198. 1, // [1:1] is the sub-list for method output_type
  199. 1, // [1:1] is the sub-list for method input_type
  200. 1, // [1:1] is the sub-list for extension type_name
  201. 1, // [1:1] is the sub-list for extension extendee
  202. 0, // [0:1] is the sub-list for field type_name
  203. }
  204. func init() { file_transport_internet_websocket_config_proto_init() }
  205. func file_transport_internet_websocket_config_proto_init() {
  206. if File_transport_internet_websocket_config_proto != nil {
  207. return
  208. }
  209. if !protoimpl.UnsafeEnabled {
  210. file_transport_internet_websocket_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  211. switch v := v.(*Header); i {
  212. case 0:
  213. return &v.state
  214. case 1:
  215. return &v.sizeCache
  216. case 2:
  217. return &v.unknownFields
  218. default:
  219. return nil
  220. }
  221. }
  222. file_transport_internet_websocket_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  223. switch v := v.(*Config); i {
  224. case 0:
  225. return &v.state
  226. case 1:
  227. return &v.sizeCache
  228. case 2:
  229. return &v.unknownFields
  230. default:
  231. return nil
  232. }
  233. }
  234. }
  235. type x struct{}
  236. out := protoimpl.TypeBuilder{
  237. File: protoimpl.DescBuilder{
  238. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  239. RawDescriptor: file_transport_internet_websocket_config_proto_rawDesc,
  240. NumEnums: 0,
  241. NumMessages: 2,
  242. NumExtensions: 0,
  243. NumServices: 0,
  244. },
  245. GoTypes: file_transport_internet_websocket_config_proto_goTypes,
  246. DependencyIndexes: file_transport_internet_websocket_config_proto_depIdxs,
  247. MessageInfos: file_transport_internet_websocket_config_proto_msgTypes,
  248. }.Build()
  249. File_transport_internet_websocket_config_proto = out.File
  250. file_transport_internet_websocket_config_proto_rawDesc = nil
  251. file_transport_internet_websocket_config_proto_goTypes = nil
  252. file_transport_internet_websocket_config_proto_depIdxs = nil
  253. }