mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 11:54:01 +03:00
Add documentation for network
This commit is contained in:
@@ -7,6 +7,10 @@ import (
|
||||
"golang.org/x/net/proxy"
|
||||
)
|
||||
|
||||
// NewSocks5Dialer build a new dialer from a given one (so, in theory
|
||||
// you can chain here). Proxy parameters are passed with URI in a form of:
|
||||
//
|
||||
// socks5://[user:[password]]@host:port
|
||||
func NewSocks5Dialer(baseDialer Dialer, proxyURL *url.URL) (Dialer, error) {
|
||||
rv, err := proxy.FromURL(proxyURL, baseDialer)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user