config.pb.go 11 KB

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