Skip to content

Commit

Permalink
Fix .pk.ygg resolver after refactoring
Browse files Browse the repository at this point in the history
Signed-off-by: Vasyl Gello <[email protected]>
  • Loading branch information
basilgello committed Jul 23, 2024
1 parent 5008a4e commit 2c09a1d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cmd/yggstack/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 2c09a1d

Please sign in to comment.