Skip to content

Commit

Permalink
Update resolver.go
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellacosse authored Oct 6, 2023
1 parent 0997a79 commit fd39c68
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions dns/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,11 @@

package dns

/*
A resolver is a function that resolves a hostname to a list of IP addresses.
TODO: provide factory methods to create a Resolver. For example:
```go
manualDns := makeManualResolver(
map[string][]string{ "example.com": []string{"255.255.255.255:80" }
})
dialer := &shadowsocks.NewStreamDialer(endpoint, key, manualDns)
````
*/
type Resolver func(host string) ([]string, error)
// A resolver is a function that resolves a hostname to a list of IP addresses.
// TODO: provide factory methods to create a Resolver. For example:
// manualDns := makeLocalResolver(
// map[string][]string{ "example.com": []string{"255.255.255.255:80" }
// })
//
// dialer := &shadowsocks.NewStreamDialer(endpoint, key, manualDns)
type Resolver func(host string) ([]string, error)

0 comments on commit fd39c68

Please sign in to comment.