chore: removed routing-mark and interface-name of the group, please set it directly on the proxy instead

This commit is contained in:
wwqgtxx
2025-05-01 01:27:08 +08:00
parent b4fe669848
commit 7e7016b567
34 changed files with 232 additions and 286 deletions

View File

@@ -82,7 +82,7 @@ func (d *dhcpClient) resolve(ctx context.Context) ([]dnsClient, error) {
for _, item := range dns {
nameserver = append(nameserver, NameServer{
Addr: net.JoinHostPort(item.String(), "53"),
Interface: d.ifaceName,
ProxyName: d.ifaceName,
})
}

View File

@@ -393,7 +393,6 @@ func (r *Resolver) ResetConnection() {
type NameServer struct {
Net string
Addr string
Interface string
ProxyAdapter C.ProxyAdapter
ProxyName string
Params map[string]string
@@ -407,7 +406,6 @@ func (ns NameServer) Equal(ns2 NameServer) bool {
}()
if ns.Net == ns2.Net &&
ns.Addr == ns2.Addr &&
ns.Interface == ns2.Interface &&
ns.ProxyAdapter == ns2.ProxyAdapter &&
ns.ProxyName == ns2.ProxyName &&
maps.Equal(ns.Params, ns2.Params) &&

View File

@@ -11,7 +11,6 @@ import (
"time"
"github.com/metacubex/mihomo/common/picker"
"github.com/metacubex/mihomo/component/dialer"
"github.com/metacubex/mihomo/component/resolver"
"github.com/metacubex/mihomo/log"
@@ -115,11 +114,6 @@ func transform(servers []NameServer, resolver *Resolver) []dnsClient {
continue
}
var options []dialer.Option
if s.Interface != "" {
options = append(options, dialer.WithInterface(s.Interface))
}
host, port, _ := net.SplitHostPort(s.Addr)
ret = append(ret, &client{
Client: &D.Client{
@@ -132,7 +126,7 @@ func transform(servers []NameServer, resolver *Resolver) []dnsClient {
},
port: port,
host: host,
dialer: newDNSDialer(resolver, s.ProxyAdapter, s.ProxyName, options...),
dialer: newDNSDialer(resolver, s.ProxyAdapter, s.ProxyName),
})
}
return ret