config.pb.go 10 KB

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