From 5bac7bc75dd9f8406ad405d2b7cb7f30b6d7ec14 Mon Sep 17 00:00:00 2001 From: local Date: Sun, 31 Mar 2024 12:00:01 +0400 Subject: [PATCH 1/5] proxy dns with NOTIMP error --- proxy/dns/dns.go | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/proxy/dns/dns.go b/proxy/dns/dns.go index ef23d6f3f97..e01bc421d46 100644 --- a/proxy/dns/dns.go +++ b/proxy/dns/dns.go @@ -197,12 +197,13 @@ func (h *Handler) Process(ctx context.Context, link *transport.Link, d internet. if isIPQuery { if domain, err := strmatcher.ToDomain(domain); err == nil { go h.handleIPQuery(id, qType, domain, writer) - continue + } else { + h.handleDNSError(id, dnsmessage.RCodeFormatError, writer) } + } else { + h.handleDNSError(id, dnsmessage.RCodeNotImplemented, writer) } - } - - if err := connWriter.WriteMessage(b); err != nil { + } else if err := connWriter.WriteMessage(b); err != nil { return err } } @@ -296,6 +297,35 @@ func (h *Handler) handleIPQuery(id uint16, qType dnsmessage.Type, domain string, } } +func (h *Handler) handleDNSError(id uint16, rCode dnsmessage.RCode, writer dns_proto.MessageWriter) { + var err error + + b := buf.New() + rawBytes := b.Extend(buf.Size) + builder := dnsmessage.NewBuilder(rawBytes[:0], dnsmessage.Header{ + ID: id, + RCode: rCode, + RecursionAvailable: true, + RecursionDesired: true, + Response: true, + }) + builder.EnableCompression() + common.Must(builder.StartQuestions()) + common.Must(builder.StartAnswers()) + + msgBytes, err := builder.Finish() + if err != nil { + newError("pack message").Base(err).WriteToLog() + b.Release() + return + } + b.Resize(0, int32(len(msgBytes))) + + if err := writer.WriteMessage(b); err != nil { + newError("write IP answer").Base(err).WriteToLog() + } +} + type outboundConn struct { access sync.Mutex dialer func() (internet.Connection, error) From 1fcf4cc410662075cb98f7c0b28876213eb7d846 Mon Sep 17 00:00:00 2001 From: local Date: Sun, 3 Nov 2024 21:15:00 +0800 Subject: [PATCH 2/5] fix compile error when protoc is relative link ``` $ go generate ... proto.go fork/exec ../Cellar/protobuf/28.3/bin/protoc: no such file or directory exit status 1 proto.go:5: running "go": exit status 1 context_test.go functions_test.go v2ray_test.go $ ls -l `which protoc` lrwxr-xr-x 1 local admin 34 Nov 1 13:56 /opt/homebrew/bin/protoc -> ../Cellar/protobuf/28.3/bin/protoc ``` --- infra/vprotogen/main.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/infra/vprotogen/main.go b/infra/vprotogen/main.go index 05ce25b7fa8..fcbbe7735ff 100644 --- a/infra/vprotogen/main.go +++ b/infra/vprotogen/main.go @@ -189,10 +189,6 @@ func main() { os.Exit(1) } - if linkPath, err := os.Readlink(protoc); err == nil { - protoc = linkPath - } - installedVersion, err := getInstalledProtocVersion(protoc) if err != nil { fmt.Println(err) From ff1eb9f2651c23a82ddcdcf4d26a7d53335ebb95 Mon Sep 17 00:00:00 2001 From: local Date: Sun, 3 Nov 2024 21:05:43 +0800 Subject: [PATCH 3/5] add nonIPQuery for dns config --- proxy/dns/config.proto | 1 + proxy/dns/dns.go | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/proxy/dns/config.proto b/proxy/dns/config.proto index fb20fd4cfac..9f435a2cee5 100644 --- a/proxy/dns/config.proto +++ b/proxy/dns/config.proto @@ -14,6 +14,7 @@ message Config { // original one. v2ray.core.common.net.Endpoint server = 1; uint32 user_level = 2; + string non_IP_query = 3; } message SimplifiedConfig { diff --git a/proxy/dns/dns.go b/proxy/dns/dns.go index e01bc421d46..eb8311212df 100644 --- a/proxy/dns/dns.go +++ b/proxy/dns/dns.go @@ -53,6 +53,7 @@ type Handler struct { ownLinkVerifier ownLinkVerifier server net.Destination timeout time.Duration + nonIPQuery string } func (h *Handler) Init(config *Config, dnsClient dns.Client, policyManager policy.Manager) error { @@ -82,6 +83,8 @@ func (h *Handler) Init(config *Config, dnsClient dns.Client, policyManager polic if config.Server != nil { h.server = config.Server.AsDestination() } + h.nonIPQuery = config.Non_IPQuery + return nil } @@ -194,7 +197,7 @@ func (h *Handler) Process(ctx context.Context, link *transport.Link, d internet. if !h.isOwnLink(ctx) { isIPQuery, domain, id, qType := parseIPQuery(b.Bytes()) - if isIPQuery { + if isIPQuery || h.nonIPQuery != "drop" { if domain, err := strmatcher.ToDomain(domain); err == nil { go h.handleIPQuery(id, qType, domain, writer) } else { From d266b05d6d0144e09f926634ad38be8255fc907c Mon Sep 17 00:00:00 2001 From: local Date: Sun, 3 Nov 2024 21:05:52 +0800 Subject: [PATCH 4/5] go generate with only dns.proto --- app/dns/config.pb.go | 228 ++++++++--------------------------------- proxy/dns/config.pb.go | 95 +++++++---------- 2 files changed, 81 insertions(+), 242 deletions(-) diff --git a/app/dns/config.pb.go b/app/dns/config.pb.go index a2b1580a6a8..506b2ae3b4b 100644 --- a/app/dns/config.pb.go +++ b/app/dns/config.pb.go @@ -237,11 +237,9 @@ type NameServer struct { func (x *NameServer) Reset() { *x = NameServer{} - if protoimpl.UnsafeEnabled { - mi := &file_app_dns_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_app_dns_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NameServer) String() string { @@ -252,7 +250,7 @@ func (*NameServer) ProtoMessage() {} func (x *NameServer) ProtoReflect() protoreflect.Message { mi := &file_app_dns_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -360,11 +358,9 @@ type HostMapping struct { func (x *HostMapping) Reset() { *x = HostMapping{} - if protoimpl.UnsafeEnabled { - mi := &file_app_dns_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_app_dns_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HostMapping) String() string { @@ -375,7 +371,7 @@ func (*HostMapping) ProtoMessage() {} func (x *HostMapping) ProtoReflect() protoreflect.Message { mi := &file_app_dns_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -470,11 +466,9 @@ type Config struct { func (x *Config) Reset() { *x = Config{} - if protoimpl.UnsafeEnabled { - mi := &file_app_dns_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_app_dns_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Config) String() string { @@ -485,7 +479,7 @@ func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { mi := &file_app_dns_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -644,11 +638,9 @@ type SimplifiedConfig struct { func (x *SimplifiedConfig) Reset() { *x = SimplifiedConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_app_dns_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_app_dns_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SimplifiedConfig) String() string { @@ -659,7 +651,7 @@ func (*SimplifiedConfig) ProtoMessage() {} func (x *SimplifiedConfig) ProtoReflect() protoreflect.Message { mi := &file_app_dns_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -776,11 +768,9 @@ type SimplifiedHostMapping struct { func (x *SimplifiedHostMapping) Reset() { *x = SimplifiedHostMapping{} - if protoimpl.UnsafeEnabled { - mi := &file_app_dns_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_app_dns_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SimplifiedHostMapping) String() string { @@ -791,7 +781,7 @@ func (*SimplifiedHostMapping) ProtoMessage() {} func (x *SimplifiedHostMapping) ProtoReflect() protoreflect.Message { mi := &file_app_dns_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -858,11 +848,9 @@ type SimplifiedNameServer struct { func (x *SimplifiedNameServer) Reset() { *x = SimplifiedNameServer{} - if protoimpl.UnsafeEnabled { - mi := &file_app_dns_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_app_dns_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SimplifiedNameServer) String() string { @@ -873,7 +861,7 @@ func (*SimplifiedNameServer) ProtoMessage() {} func (x *SimplifiedNameServer) ProtoReflect() protoreflect.Message { mi := &file_app_dns_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -984,11 +972,9 @@ type NameServer_PriorityDomain struct { func (x *NameServer_PriorityDomain) Reset() { *x = NameServer_PriorityDomain{} - if protoimpl.UnsafeEnabled { - mi := &file_app_dns_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_app_dns_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NameServer_PriorityDomain) String() string { @@ -999,7 +985,7 @@ func (*NameServer_PriorityDomain) ProtoMessage() {} func (x *NameServer_PriorityDomain) ProtoReflect() protoreflect.Message { mi := &file_app_dns_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1039,11 +1025,9 @@ type NameServer_OriginalRule struct { func (x *NameServer_OriginalRule) Reset() { *x = NameServer_OriginalRule{} - if protoimpl.UnsafeEnabled { - mi := &file_app_dns_config_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_app_dns_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NameServer_OriginalRule) String() string { @@ -1054,7 +1038,7 @@ func (*NameServer_OriginalRule) ProtoMessage() {} func (x *NameServer_OriginalRule) ProtoReflect() protoreflect.Message { mi := &file_app_dns_config_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1094,11 +1078,9 @@ type SimplifiedNameServer_PriorityDomain struct { func (x *SimplifiedNameServer_PriorityDomain) Reset() { *x = SimplifiedNameServer_PriorityDomain{} - if protoimpl.UnsafeEnabled { - mi := &file_app_dns_config_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_app_dns_config_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SimplifiedNameServer_PriorityDomain) String() string { @@ -1109,7 +1091,7 @@ func (*SimplifiedNameServer_PriorityDomain) ProtoMessage() {} func (x *SimplifiedNameServer_PriorityDomain) ProtoReflect() protoreflect.Message { mi := &file_app_dns_config_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1149,11 +1131,9 @@ type SimplifiedNameServer_OriginalRule struct { func (x *SimplifiedNameServer_OriginalRule) Reset() { *x = SimplifiedNameServer_OriginalRule{} - if protoimpl.UnsafeEnabled { - mi := &file_app_dns_config_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_app_dns_config_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SimplifiedNameServer_OriginalRule) String() string { @@ -1164,7 +1144,7 @@ func (*SimplifiedNameServer_OriginalRule) ProtoMessage() {} func (x *SimplifiedNameServer_OriginalRule) ProtoReflect() protoreflect.Message { mi := &file_app_dns_config_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1495,7 +1475,7 @@ func file_app_dns_config_proto_rawDescGZIP() []byte { var file_app_dns_config_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_app_dns_config_proto_msgTypes = make([]protoimpl.MessageInfo, 11) -var file_app_dns_config_proto_goTypes = []interface{}{ +var file_app_dns_config_proto_goTypes = []any{ (DomainMatchingType)(0), // 0: v2ray.core.app.dns.DomainMatchingType (QueryStrategy)(0), // 1: v2ray.core.app.dns.QueryStrategy (CacheStrategy)(0), // 2: v2ray.core.app.dns.CacheStrategy @@ -1566,130 +1546,8 @@ func file_app_dns_config_proto_init() { if File_app_dns_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_app_dns_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NameServer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_app_dns_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HostMapping); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_app_dns_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Config); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_app_dns_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SimplifiedConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_app_dns_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SimplifiedHostMapping); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_app_dns_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SimplifiedNameServer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_app_dns_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NameServer_PriorityDomain); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_app_dns_config_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NameServer_OriginalRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_app_dns_config_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SimplifiedNameServer_PriorityDomain); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_app_dns_config_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SimplifiedNameServer_OriginalRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_app_dns_config_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_app_dns_config_proto_msgTypes[5].OneofWrappers = []interface{}{} + file_app_dns_config_proto_msgTypes[0].OneofWrappers = []any{} + file_app_dns_config_proto_msgTypes[5].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/proxy/dns/config.pb.go b/proxy/dns/config.pb.go index d3f0380e898..2ba0ea6c84c 100644 --- a/proxy/dns/config.pb.go +++ b/proxy/dns/config.pb.go @@ -23,17 +23,16 @@ type Config struct { // Server is the DNS server address. If specified, this address overrides the // original one. - Server *net.Endpoint `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"` - UserLevel uint32 `protobuf:"varint,2,opt,name=user_level,json=userLevel,proto3" json:"user_level,omitempty"` + Server *net.Endpoint `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"` + UserLevel uint32 `protobuf:"varint,2,opt,name=user_level,json=userLevel,proto3" json:"user_level,omitempty"` + Non_IPQuery string `protobuf:"bytes,3,opt,name=non_IP_query,json=nonIPQuery,proto3" json:"non_IP_query,omitempty"` } func (x *Config) Reset() { *x = Config{} - if protoimpl.UnsafeEnabled { - mi := &file_proxy_dns_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_proxy_dns_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Config) String() string { @@ -44,7 +43,7 @@ func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { mi := &file_proxy_dns_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -73,6 +72,13 @@ func (x *Config) GetUserLevel() uint32 { return 0 } +func (x *Config) GetNon_IPQuery() string { + if x != nil { + return x.Non_IPQuery + } + return "" +} + type SimplifiedConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -81,11 +87,9 @@ type SimplifiedConfig struct { func (x *SimplifiedConfig) Reset() { *x = SimplifiedConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_proxy_dns_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_proxy_dns_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SimplifiedConfig) String() string { @@ -96,7 +100,7 @@ func (*SimplifiedConfig) ProtoMessage() {} func (x *SimplifiedConfig) ProtoReflect() protoreflect.Message { mi := &file_proxy_dns_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -120,22 +124,25 @@ var file_proxy_dns_config_proto_rawDesc = []byte{ 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x65, 0x78, 0x74, 0x2f, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x60, - 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x37, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, - 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, - 0x22, 0x27, 0x0a, 0x10, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x13, 0x82, 0xb5, 0x18, 0x0f, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x62, - 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x03, 0x64, 0x6e, 0x73, 0x42, 0x5d, 0x0a, 0x18, 0x63, 0x6f, 0x6d, - 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x64, 0x6e, 0x73, 0x50, 0x01, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, - 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x35, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x64, 0x6e, - 0x73, 0xaa, 0x02, 0x14, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x44, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x82, + 0x01, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x37, 0x0a, 0x06, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x32, 0x72, 0x61, + 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, + 0x74, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, + 0x6c, 0x12, 0x20, 0x0a, 0x0c, 0x6e, 0x6f, 0x6e, 0x5f, 0x49, 0x50, 0x5f, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x6f, 0x6e, 0x49, 0x50, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x22, 0x27, 0x0a, 0x10, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x13, 0x82, 0xb5, 0x18, 0x0f, 0x0a, 0x08, 0x6f, + 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x03, 0x64, 0x6e, 0x73, 0x42, 0x5d, 0x0a, 0x18, + 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x64, 0x6e, 0x73, 0x50, 0x01, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, + 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x35, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x64, 0x6e, 0x73, 0xaa, 0x02, 0x14, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, + 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x44, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -151,7 +158,7 @@ func file_proxy_dns_config_proto_rawDescGZIP() []byte { } var file_proxy_dns_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_proxy_dns_config_proto_goTypes = []interface{}{ +var file_proxy_dns_config_proto_goTypes = []any{ (*Config)(nil), // 0: v2ray.core.proxy.dns.Config (*SimplifiedConfig)(nil), // 1: v2ray.core.proxy.dns.SimplifiedConfig (*net.Endpoint)(nil), // 2: v2ray.core.common.net.Endpoint @@ -170,32 +177,6 @@ func file_proxy_dns_config_proto_init() { if File_proxy_dns_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_proxy_dns_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Config); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proxy_dns_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SimplifiedConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ From b3ed45a70c1730458c84f1e0369c3591e339fa20 Mon Sep 17 00:00:00 2001 From: Shelikhoo Date: Sat, 18 Jan 2025 11:43:24 +0000 Subject: [PATCH 5/5] Try Allowing Github actions