mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 13:04:02 +03:00
Add documentation for network
This commit is contained in:
@@ -115,6 +115,10 @@ func (n *network) dnsResolve(protocol, address string) ([]string, error) {
|
||||
return ips, nil
|
||||
}
|
||||
|
||||
// NewNetwork assembles an mtglib.Network compatible structure
|
||||
// based on a dialer and given params.
|
||||
//
|
||||
// It brings simple DNS cache and DNS-Over-HTTPS when necessary.
|
||||
func NewNetwork(dialer Dialer,
|
||||
userAgent, dohHostname string,
|
||||
httpTimeout time.Duration) (mtglib.Network, error) {
|
||||
|
||||
Reference in New Issue
Block a user