github.com/v2fly/v2ray-core/v5@v5.16.2-0.20240507031116-8191faa6e095/transport/internet/tls/utls/config.pb.go (about)

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