config.pb.go 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. package utls
  2. import (
  3. _ "github.com/v2fly/v2ray-core/v5/common/protoext"
  4. tls "github.com/v2fly/v2ray-core/v5/transport/internet/tls"
  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 ForcedALPN int32
  17. const (
  18. ForcedALPN_TRANSPORT_PREFERENCE_TAKE_PRIORITY ForcedALPN = 0
  19. ForcedALPN_NO_ALPN ForcedALPN = 1
  20. ForcedALPN_UTLS_PRESET ForcedALPN = 2
  21. )
  22. // Enum value maps for ForcedALPN.
  23. var (
  24. ForcedALPN_name = map[int32]string{
  25. 0: "TRANSPORT_PREFERENCE_TAKE_PRIORITY",
  26. 1: "NO_ALPN",
  27. 2: "UTLS_PRESET",
  28. }
  29. ForcedALPN_value = map[string]int32{
  30. "TRANSPORT_PREFERENCE_TAKE_PRIORITY": 0,
  31. "NO_ALPN": 1,
  32. "UTLS_PRESET": 2,
  33. }
  34. )
  35. func (x ForcedALPN) Enum() *ForcedALPN {
  36. p := new(ForcedALPN)
  37. *p = x
  38. return p
  39. }
  40. func (x ForcedALPN) String() string {
  41. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  42. }
  43. func (ForcedALPN) Descriptor() protoreflect.EnumDescriptor {
  44. return file_transport_internet_tls_utls_config_proto_enumTypes[0].Descriptor()
  45. }
  46. func (ForcedALPN) Type() protoreflect.EnumType {
  47. return &file_transport_internet_tls_utls_config_proto_enumTypes[0]
  48. }
  49. func (x ForcedALPN) Number() protoreflect.EnumNumber {
  50. return protoreflect.EnumNumber(x)
  51. }
  52. // Deprecated: Use ForcedALPN.Descriptor instead.
  53. func (ForcedALPN) EnumDescriptor() ([]byte, []int) {
  54. return file_transport_internet_tls_utls_config_proto_rawDescGZIP(), []int{0}
  55. }
  56. type Config struct {
  57. state protoimpl.MessageState
  58. sizeCache protoimpl.SizeCache
  59. unknownFields protoimpl.UnknownFields
  60. TlsConfig *tls.Config `protobuf:"bytes,1,opt,name=tls_config,json=tlsConfig,proto3" json:"tls_config,omitempty"`
  61. Imitate string `protobuf:"bytes,2,opt,name=imitate,proto3" json:"imitate,omitempty"`
  62. NoSNI bool `protobuf:"varint,3,opt,name=noSNI,proto3" json:"noSNI,omitempty"`
  63. ForceAlpn ForcedALPN `protobuf:"varint,4,opt,name=force_alpn,json=forceAlpn,proto3,enum=v2ray.core.transport.internet.tls.utls.ForcedALPN" json:"force_alpn,omitempty"`
  64. }
  65. func (x *Config) Reset() {
  66. *x = Config{}
  67. if protoimpl.UnsafeEnabled {
  68. mi := &file_transport_internet_tls_utls_config_proto_msgTypes[0]
  69. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  70. ms.StoreMessageInfo(mi)
  71. }
  72. }
  73. func (x *Config) String() string {
  74. return protoimpl.X.MessageStringOf(x)
  75. }
  76. func (*Config) ProtoMessage() {}
  77. func (x *Config) ProtoReflect() protoreflect.Message {
  78. mi := &file_transport_internet_tls_utls_config_proto_msgTypes[0]
  79. if protoimpl.UnsafeEnabled && x != nil {
  80. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  81. if ms.LoadMessageInfo() == nil {
  82. ms.StoreMessageInfo(mi)
  83. }
  84. return ms
  85. }
  86. return mi.MessageOf(x)
  87. }
  88. // Deprecated: Use Config.ProtoReflect.Descriptor instead.
  89. func (*Config) Descriptor() ([]byte, []int) {
  90. return file_transport_internet_tls_utls_config_proto_rawDescGZIP(), []int{0}
  91. }
  92. func (x *Config) GetTlsConfig() *tls.Config {
  93. if x != nil {
  94. return x.TlsConfig
  95. }
  96. return nil
  97. }
  98. func (x *Config) GetImitate() string {
  99. if x != nil {
  100. return x.Imitate
  101. }
  102. return ""
  103. }
  104. func (x *Config) GetNoSNI() bool {
  105. if x != nil {
  106. return x.NoSNI
  107. }
  108. return false
  109. }
  110. func (x *Config) GetForceAlpn() ForcedALPN {
  111. if x != nil {
  112. return x.ForceAlpn
  113. }
  114. return ForcedALPN_TRANSPORT_PREFERENCE_TAKE_PRIORITY
  115. }
  116. var File_transport_internet_tls_utls_config_proto protoreflect.FileDescriptor
  117. var file_transport_internet_tls_utls_config_proto_rawDesc = []byte{
  118. 0x0a, 0x28, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65,
  119. 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x75, 0x74, 0x6c, 0x73, 0x2f, 0x63, 0x6f,
  120. 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x26, 0x76, 0x32, 0x72, 0x61,
  121. 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74,
  122. 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x75, 0x74,
  123. 0x6c, 0x73, 0x1a, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
  124. 0x65, 0x78, 0x74, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70,
  125. 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f,
  126. 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x63, 0x6f, 0x6e,
  127. 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xef, 0x01, 0x0a, 0x06, 0x43, 0x6f,
  128. 0x6e, 0x66, 0x69, 0x67, 0x12, 0x48, 0x0a, 0x0a, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66,
  129. 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79,
  130. 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e,
  131. 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x43, 0x6f, 0x6e,
  132. 0x66, 0x69, 0x67, 0x52, 0x09, 0x74, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18,
  133. 0x0a, 0x07, 0x69, 0x6d, 0x69, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
  134. 0x07, 0x69, 0x6d, 0x69, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x53, 0x4e,
  135. 0x49, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x6e, 0x6f, 0x53, 0x4e, 0x49, 0x12, 0x51,
  136. 0x0a, 0x0a, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x6c, 0x70, 0x6e, 0x18, 0x04, 0x20, 0x01,
  137. 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e,
  138. 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e,
  139. 0x65, 0x74, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x75, 0x74, 0x6c, 0x73, 0x2e, 0x46, 0x6f, 0x72, 0x63,
  140. 0x65, 0x64, 0x41, 0x4c, 0x50, 0x4e, 0x52, 0x09, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x41, 0x6c, 0x70,
  141. 0x6e, 0x3a, 0x18, 0x82, 0xb5, 0x18, 0x0a, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74,
  142. 0x79, 0x82, 0xb5, 0x18, 0x06, 0x12, 0x04, 0x75, 0x74, 0x6c, 0x73, 0x2a, 0x52, 0x0a, 0x0a, 0x46,
  143. 0x6f, 0x72, 0x63, 0x65, 0x64, 0x41, 0x4c, 0x50, 0x4e, 0x12, 0x26, 0x0a, 0x22, 0x54, 0x52, 0x41,
  144. 0x4e, 0x53, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43,
  145. 0x45, 0x5f, 0x54, 0x41, 0x4b, 0x45, 0x5f, 0x50, 0x52, 0x49, 0x4f, 0x52, 0x49, 0x54, 0x59, 0x10,
  146. 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x4e, 0x4f, 0x5f, 0x41, 0x4c, 0x50, 0x4e, 0x10, 0x01, 0x12, 0x0f,
  147. 0x0a, 0x0b, 0x55, 0x54, 0x4c, 0x53, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x54, 0x10, 0x02, 0x42,
  148. 0x93, 0x01, 0x0a, 0x2a, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f,
  149. 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74,
  150. 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x75, 0x74, 0x6c, 0x73, 0x50, 0x01,
  151. 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66,
  152. 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x35,
  153. 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72,
  154. 0x6e, 0x65, 0x74, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x75, 0x74, 0x6c, 0x73, 0xaa, 0x02, 0x26, 0x56,
  155. 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70,
  156. 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x54, 0x6c, 0x73,
  157. 0x2e, 0x55, 0x54, 0x6c, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  158. }
  159. var (
  160. file_transport_internet_tls_utls_config_proto_rawDescOnce sync.Once
  161. file_transport_internet_tls_utls_config_proto_rawDescData = file_transport_internet_tls_utls_config_proto_rawDesc
  162. )
  163. func file_transport_internet_tls_utls_config_proto_rawDescGZIP() []byte {
  164. file_transport_internet_tls_utls_config_proto_rawDescOnce.Do(func() {
  165. file_transport_internet_tls_utls_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_transport_internet_tls_utls_config_proto_rawDescData)
  166. })
  167. return file_transport_internet_tls_utls_config_proto_rawDescData
  168. }
  169. var file_transport_internet_tls_utls_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
  170. var file_transport_internet_tls_utls_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
  171. var file_transport_internet_tls_utls_config_proto_goTypes = []interface{}{
  172. (ForcedALPN)(0), // 0: v2ray.core.transport.internet.tls.utls.ForcedALPN
  173. (*Config)(nil), // 1: v2ray.core.transport.internet.tls.utls.Config
  174. (*tls.Config)(nil), // 2: v2ray.core.transport.internet.tls.Config
  175. }
  176. var file_transport_internet_tls_utls_config_proto_depIdxs = []int32{
  177. 2, // 0: v2ray.core.transport.internet.tls.utls.Config.tls_config:type_name -> v2ray.core.transport.internet.tls.Config
  178. 0, // 1: v2ray.core.transport.internet.tls.utls.Config.force_alpn:type_name -> v2ray.core.transport.internet.tls.utls.ForcedALPN
  179. 2, // [2:2] is the sub-list for method output_type
  180. 2, // [2:2] is the sub-list for method input_type
  181. 2, // [2:2] is the sub-list for extension type_name
  182. 2, // [2:2] is the sub-list for extension extendee
  183. 0, // [0:2] is the sub-list for field type_name
  184. }
  185. func init() { file_transport_internet_tls_utls_config_proto_init() }
  186. func file_transport_internet_tls_utls_config_proto_init() {
  187. if File_transport_internet_tls_utls_config_proto != nil {
  188. return
  189. }
  190. if !protoimpl.UnsafeEnabled {
  191. file_transport_internet_tls_utls_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  192. switch v := v.(*Config); i {
  193. case 0:
  194. return &v.state
  195. case 1:
  196. return &v.sizeCache
  197. case 2:
  198. return &v.unknownFields
  199. default:
  200. return nil
  201. }
  202. }
  203. }
  204. type x struct{}
  205. out := protoimpl.TypeBuilder{
  206. File: protoimpl.DescBuilder{
  207. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  208. RawDescriptor: file_transport_internet_tls_utls_config_proto_rawDesc,
  209. NumEnums: 1,
  210. NumMessages: 1,
  211. NumExtensions: 0,
  212. NumServices: 0,
  213. },
  214. GoTypes: file_transport_internet_tls_utls_config_proto_goTypes,
  215. DependencyIndexes: file_transport_internet_tls_utls_config_proto_depIdxs,
  216. EnumInfos: file_transport_internet_tls_utls_config_proto_enumTypes,
  217. MessageInfos: file_transport_internet_tls_utls_config_proto_msgTypes,
  218. }.Build()
  219. File_transport_internet_tls_utls_config_proto = out.File
  220. file_transport_internet_tls_utls_config_proto_rawDesc = nil
  221. file_transport_internet_tls_utls_config_proto_goTypes = nil
  222. file_transport_internet_tls_utls_config_proto_depIdxs = nil
  223. }