mirror of
https://github.com/yggdrasil-network/yggstack.git
synced 2025-04-27 21:55:07 +03:00
Fix .pk.ygg resolver after refactoring
Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
This commit is contained in:
parent
5008a4ea2d
commit
2c09a1d7b2
1 changed files with 5 additions and 4 deletions
|
@ -292,12 +292,13 @@ func main() {
|
|||
socksOptions := []socks5.Option{
|
||||
socks5.WithDial(s.DialContext),
|
||||
}
|
||||
if nameserver != nil && *nameserver != "" {
|
||||
if nameserver != nil {
|
||||
if *nameserver == "" {
|
||||
logger.Infof("DNS nameserver is not set!")
|
||||
logger.Infof("SOCKS server will not be able to resolve hostnames other than .pk.ygg !")
|
||||
}
|
||||
resolver := types.NewNameResolver(s, *nameserver)
|
||||
socksOptions = append(socksOptions, socks5.WithResolver(resolver))
|
||||
} else {
|
||||
logger.Infof("DNS nameserver is not set!")
|
||||
logger.Infof("SOCKS server will not be able to resolve hostnames other than .pk.ygg !")
|
||||
}
|
||||
if logger.GetLevel("debug") {
|
||||
socksOptions = append(socksOptions, socks5.WithLogger(logger))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue