nws/socks5/resolver_test.go

22 lines
293 B
Go
Raw Normal View History

2024-07-22 21:00:21 +00:00
package socks5
import (
"testing"
"context"
)
func TestDNSResolver(t *testing.T) {
d := DNSResolver{}
ctx := context.Background()
_, addr, err := d.Resolve(ctx, "localhost")
if err != nil {
t.Fatalf("err: %v", err)
}
if !addr.IsLoopback() {
t.Fatalf("expected loopback")
}
}