mirror of
https://github.com/xvzc/SpoofDPI.git
synced 2024-12-22 06:15:51 +00:00
chore: rename client to resolver
This commit is contained in:
parent
8515b9a23f
commit
a244aa6f1b
@ -26,16 +26,16 @@ type Dns struct {
|
||||
dohClient Resolver
|
||||
}
|
||||
|
||||
func NewResolver(config *util.Config) *Dns {
|
||||
func NewDns(config *util.Config) *Dns {
|
||||
addr := *config.DnsAddr
|
||||
port := strconv.Itoa(*config.DnsPort)
|
||||
|
||||
return &Dns{
|
||||
host: *config.DnsAddr,
|
||||
port: port,
|
||||
systemClient: client.NewSystemResolver(),
|
||||
generalClient: client.NewGeneralResolver(net.JoinHostPort(addr, port)),
|
||||
dohClient: client.NewDOHResolver(addr),
|
||||
systemClient: resolver.NewSystemResolver(),
|
||||
generalClient: resolver.NewGeneralResolver(net.JoinHostPort(addr, port)),
|
||||
dohClient: resolver.NewDOHResolver(addr),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
package client
|
||||
package resolver
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
@ -1,4 +1,4 @@
|
||||
package client
|
||||
package resolver
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
@ -1,4 +1,4 @@
|
||||
package client
|
||||
package resolver
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
@ -1,4 +1,4 @@
|
||||
package client
|
||||
package resolver
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
@ -31,7 +31,7 @@ func New(config *util.Config) *Proxy {
|
||||
windowSize: *config.WindowSize,
|
||||
enableDoh: *config.EnableDoh,
|
||||
allowedPattern: config.AllowedPatterns,
|
||||
resolver: dns.NewResolver(config),
|
||||
resolver: dns.NewDns(config),
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user