module
0.0.0-20220915123554-284e01a61eca
Repository: https://github.com/yaproxy/libyap.git
Documentation: pkg.go.dev
# README
Golang Library powered by Yaproxy
Package Proxy
Package proxy provides support for a variety of protocols to proxy network data.
Example
- Basic Usage
import "github.com/yaproxy/libyap/proxy"
...
func X() {
fixedURL := "http://username:[email protected]" // HTTP Proxy
//fixedURL := "https://username:[email protected]" // HTTPS Proxy
//fixedURL := "sock5://username:[email protected]" // 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
...
}
# Packages
Package proxy provides support for a variety of protocols to proxy network data.