module
Version:
v0.0.0-...-656f817
Opens a new window with list of versions in this module.
Published: Sep 15, 2022
License: Apache-2.0
Opens a new window with license information.
README
¶
Golang Library powered by Yaproxy
Package Proxy
Package proxy provides support for a variety of protocols to proxy network data.
Example
import "github.com/yaproxy/libyap/proxy"
...
func X() {
fixedURL := "http://username:password@proxy.site" // HTTP Proxy
//fixedURL := "https://username:password@proxy.site" // HTTPS Proxy
//fixedURL := "sock5://username:password@proxy.site" // sock5 Proxy
// customize your dialer
dialer := &net.Dialer{
Timeout: 30 * time.Second,
KeepAlive: 30 * time.Second,
}
newDialer, err := proxy.FromURL(fixedURL, dialer, nil)
conn, err := newDialer.Dial("tcp", "google.com:443")
// use the tcp connection
...
}
Directories
¶
Package proxy provides support for a variety of protocols to proxy network data.
|
Package proxy provides support for a variety of protocols to proxy network data. |
Click to show internal directories.
Click to hide internal directories.