mirror of
https://github.com/xvzc/SpoofDPI.git
synced 2024-12-22 14:26:31 +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
|
dohClient Resolver
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewResolver(config *util.Config) *Dns {
|
func NewDns(config *util.Config) *Dns {
|
||||||
addr := *config.DnsAddr
|
addr := *config.DnsAddr
|
||||||
port := strconv.Itoa(*config.DnsPort)
|
port := strconv.Itoa(*config.DnsPort)
|
||||||
|
|
||||||
return &Dns{
|
return &Dns{
|
||||||
host: *config.DnsAddr,
|
host: *config.DnsAddr,
|
||||||
port: port,
|
port: port,
|
||||||
systemClient: client.NewSystemResolver(),
|
systemClient: resolver.NewSystemResolver(),
|
||||||
generalClient: client.NewGeneralResolver(net.JoinHostPort(addr, port)),
|
generalClient: resolver.NewGeneralResolver(net.JoinHostPort(addr, port)),
|
||||||
dohClient: client.NewDOHResolver(addr),
|
dohClient: resolver.NewDOHResolver(addr),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package client
|
package resolver
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package client
|
package resolver
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package client
|
package resolver
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package client
|
package resolver
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
@ -31,7 +31,7 @@ func New(config *util.Config) *Proxy {
|
|||||||
windowSize: *config.WindowSize,
|
windowSize: *config.WindowSize,
|
||||||
enableDoh: *config.EnableDoh,
|
enableDoh: *config.EnableDoh,
|
||||||
allowedPattern: config.AllowedPatterns,
|
allowedPattern: config.AllowedPatterns,
|
||||||
resolver: dns.NewResolver(config),
|
resolver: dns.NewDns(config),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user