libyap

module
v0.0.0-...-656f817 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2022 License: Apache-2.0

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: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

Path Synopsis
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL