// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 // protoc v6.33.5 // source: proxy/dns/config.proto package dns import ( geodata "github.com/xtls/xray-core/common/geodata" net "github.com/xtls/xray-core/common/net" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" unsafe "unsafe" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type RuleAction int32 const ( RuleAction_Direct RuleAction = 0 RuleAction_Drop RuleAction = 1 RuleAction_Reject RuleAction = 2 RuleAction_Hijack RuleAction = 3 ) // Enum value maps for RuleAction. var ( RuleAction_name = map[int32]string{ 0: "Direct", 1: "Drop", 2: "Reject", 3: "Hijack", } RuleAction_value = map[string]int32{ "Direct": 0, "Drop": 1, "Reject": 2, "Hijack": 3, } ) func (x RuleAction) Enum() *RuleAction { p := new(RuleAction) *p = x return p } func (x RuleAction) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (RuleAction) Descriptor() protoreflect.EnumDescriptor { return file_proxy_dns_config_proto_enumTypes[0].Descriptor() } func (RuleAction) Type() protoreflect.EnumType { return &file_proxy_dns_config_proto_enumTypes[0] } func (x RuleAction) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use RuleAction.Descriptor instead. func (RuleAction) EnumDescriptor() ([]byte, []int) { return file_proxy_dns_config_proto_rawDescGZIP(), []int{0} } type DNSRuleConfig struct { state protoimpl.MessageState `protogen:"open.v1"` Action RuleAction `protobuf:"varint,1,opt,name=action,proto3,enum=xray.proxy.dns.RuleAction" json:"action,omitempty"` Qtype []int32 `protobuf:"varint,2,rep,packed,name=qtype,proto3" json:"qtype,omitempty"` Domain []*geodata.DomainRule `protobuf:"bytes,3,rep,name=domain,proto3" json:"domain,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *DNSRuleConfig) Reset() { *x = DNSRuleConfig{} mi := &file_proxy_dns_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *DNSRuleConfig) String() string { return protoimpl.X.MessageStringOf(x) } func (*DNSRuleConfig) ProtoMessage() {} func (x *DNSRuleConfig) ProtoReflect() protoreflect.Message { mi := &file_proxy_dns_config_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use DNSRuleConfig.ProtoReflect.Descriptor instead. func (*DNSRuleConfig) Descriptor() ([]byte, []int) { return file_proxy_dns_config_proto_rawDescGZIP(), []int{0} } func (x *DNSRuleConfig) GetAction() RuleAction { if x != nil { return x.Action } return RuleAction_Direct } func (x *DNSRuleConfig) GetQtype() []int32 { if x != nil { return x.Qtype } return nil } func (x *DNSRuleConfig) GetDomain() []*geodata.DomainRule { if x != nil { return x.Domain } return nil } type Config struct { state protoimpl.MessageState `protogen:"open.v1"` UserLevel uint32 `protobuf:"varint,1,opt,name=user_level,json=userLevel,proto3" json:"user_level,omitempty"` Rule []*DNSRuleConfig `protobuf:"bytes,2,rep,name=rule,proto3" json:"rule,omitempty"` RewriteServer *net.Endpoint `protobuf:"bytes,3,opt,name=rewrite_server,json=rewriteServer,proto3" json:"rewrite_server,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *Config) Reset() { *x = Config{} mi := &file_proxy_dns_config_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *Config) String() string { return protoimpl.X.MessageStringOf(x) } func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { mi := &file_proxy_dns_config_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { return file_proxy_dns_config_proto_rawDescGZIP(), []int{1} } func (x *Config) GetUserLevel() uint32 { if x != nil { return x.UserLevel } return 0 } func (x *Config) GetRule() []*DNSRuleConfig { if x != nil { return x.Rule } return nil } func (x *Config) GetRewriteServer() *net.Endpoint { if x != nil { return x.RewriteServer } return nil } var File_proxy_dns_config_proto protoreflect.FileDescriptor const file_proxy_dns_config_proto_rawDesc = "" + "\n" + "\x16proxy/dns/config.proto\x12\x0exray.proxy.dns\x1a\x1ccommon/net/destination.proto\x1a\x1bcommon/geodata/geodat.proto\"\x92\x01\n" + "\rDNSRuleConfig\x122\n" + "\x06action\x18\x01 \x01(\x0e2\x1a.xray.proxy.dns.RuleActionR\x06action\x12\x14\n" + "\x05qtype\x18\x02 \x03(\x05R\x05qtype\x127\n" + "\x06domain\x18\x03 \x03(\v2\x1f.xray.common.geodata.DomainRuleR\x06domain\"\x9c\x01\n" + "\x06Config\x12\x1d\n" + "\n" + "user_level\x18\x01 \x01(\rR\tuserLevel\x121\n" + "\x04rule\x18\x02 \x03(\v2\x1d.xray.proxy.dns.DNSRuleConfigR\x04rule\x12@\n" + "\x0erewrite_server\x18\x03 \x01(\v2\x19.xray.common.net.EndpointR\rrewriteServer*:\n" + "\n" + "RuleAction\x12\n" + "\n" + "\x06Direct\x10\x00\x12\b\n" + "\x04Drop\x10\x01\x12\n" + "\n" + "\x06Reject\x10\x02\x12\n" + "\n" + "\x06Hijack\x10\x03BL\n" + "\x12com.xray.proxy.dnsP\x01Z#github.com/xtls/xray-core/proxy/dns\xaa\x02\x0eXray.Proxy.Dnsb\x06proto3" var ( file_proxy_dns_config_proto_rawDescOnce sync.Once file_proxy_dns_config_proto_rawDescData []byte ) func file_proxy_dns_config_proto_rawDescGZIP() []byte { file_proxy_dns_config_proto_rawDescOnce.Do(func() { file_proxy_dns_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_proxy_dns_config_proto_rawDesc), len(file_proxy_dns_config_proto_rawDesc))) }) return file_proxy_dns_config_proto_rawDescData } var file_proxy_dns_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_proxy_dns_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_proxy_dns_config_proto_goTypes = []any{ (RuleAction)(0), // 0: xray.proxy.dns.RuleAction (*DNSRuleConfig)(nil), // 1: xray.proxy.dns.DNSRuleConfig (*Config)(nil), // 2: xray.proxy.dns.Config (*geodata.DomainRule)(nil), // 3: xray.common.geodata.DomainRule (*net.Endpoint)(nil), // 4: xray.common.net.Endpoint } var file_proxy_dns_config_proto_depIdxs = []int32{ 0, // 0: xray.proxy.dns.DNSRuleConfig.action:type_name -> xray.proxy.dns.RuleAction 3, // 1: xray.proxy.dns.DNSRuleConfig.domain:type_name -> xray.common.geodata.DomainRule 1, // 2: xray.proxy.dns.Config.rule:type_name -> xray.proxy.dns.DNSRuleConfig 4, // 3: xray.proxy.dns.Config.rewrite_server:type_name -> xray.common.net.Endpoint 4, // [4:4] is the sub-list for method output_type 4, // [4:4] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name 4, // [4:4] is the sub-list for extension extendee 0, // [0:4] is the sub-list for field type_name } func init() { file_proxy_dns_config_proto_init() } func file_proxy_dns_config_proto_init() { if File_proxy_dns_config_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_proxy_dns_config_proto_rawDesc), len(file_proxy_dns_config_proto_rawDesc)), NumEnums: 1, NumMessages: 2, NumExtensions: 0, NumServices: 0, }, GoTypes: file_proxy_dns_config_proto_goTypes, DependencyIndexes: file_proxy_dns_config_proto_depIdxs, EnumInfos: file_proxy_dns_config_proto_enumTypes, MessageInfos: file_proxy_dns_config_proto_msgTypes, }.Build() File_proxy_dns_config_proto = out.File file_proxy_dns_config_proto_goTypes = nil file_proxy_dns_config_proto_depIdxs = nil }