github.com/imannamdari/v2ray-core/v5@v5.0.5/transport/internet/tls/utls/config.pb.go (about)

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