From 5ce5ade437ca41fca2f242f2a3dac10342cd78f7 Mon Sep 17 00:00:00 2001 From: igoogolx <27353191+igoogolx@users.noreply.github.com> Date: Mon, 6 Jan 2025 00:14:03 +0800 Subject: [PATCH] v1.23.5 (#55) * ci: rename VirusTotal * ci(virusTotal): enable update_release_body * refactor(dns): remove unused interface fragment of servers --- .../workflows/{VirusTotal.yml => virusTotal.yml} | 1 + internal/cfg/distribution/dns.go | 16 ++++------------ 2 files changed, 5 insertions(+), 12 deletions(-) rename .github/workflows/{VirusTotal.yml => virusTotal.yml} (89%) diff --git a/.github/workflows/VirusTotal.yml b/.github/workflows/virusTotal.yml similarity index 89% rename from .github/workflows/VirusTotal.yml rename to .github/workflows/virusTotal.yml index 0ee1978..dbb2aac 100644 --- a/.github/workflows/VirusTotal.yml +++ b/.github/workflows/virusTotal.yml @@ -13,6 +13,7 @@ jobs: uses: crazy-max/ghaction-virustotal@v4 with: vt_api_key: ${{ secrets.VT_API_KEY }} + update_release_body: true files: | .zip$ .gz$ diff --git a/internal/cfg/distribution/dns.go b/internal/cfg/distribution/dns.go index 0e9f1aa..0352d58 100644 --- a/internal/cfg/distribution/dns.go +++ b/internal/cfg/distribution/dns.go @@ -20,11 +20,7 @@ func NewDnsDistribution( dd := DnsDistribution{} //Boost - var bootDnsServers []string - for _, server := range bootDns { - bootDnsServers = append(bootDnsServers, server+"#"+defaultInterfaceName) - } - boostDnsClient, err := resolver.New(bootDnsServers, defaultInterfaceName, func() (C.Proxy, error) { + boostDnsClient, err := resolver.New(bootDns, defaultInterfaceName, func() (C.Proxy, error) { return conn.GetProxy(constants.PolicyDirect) }, disableCache) if err != nil { @@ -32,22 +28,18 @@ func NewDnsDistribution( } dd.Boost = SubDnsDistribution{ Client: boostDnsClient, - Addresses: bootDnsServers, + Addresses: bootDns, } //Local - var localDnsServers []string - for _, server := range localDns { - localDnsServers = append(localDnsServers, server+"#"+defaultInterfaceName) - } - localDnsClient, err := resolver.New(localDnsServers, defaultInterfaceName, func() (C.Proxy, error) { + localDnsClient, err := resolver.New(localDns, defaultInterfaceName, func() (C.Proxy, error) { return conn.GetProxy(constants.PolicyDirect) }, disableCache) if err != nil { return DnsDistribution{}, err } dd.Local = SubDnsDistribution{ - Addresses: localDnsServers, + Addresses: localDns, Client: localDnsClient, }