Skip to content

bbokorney/proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

proxy

A Golang library for network proxies.

Currently it supports proxying TCP connections.

Usage

// make the
p := proxy.ProxiedTCPConn{
    // the TCP connection to proxy
	LocalConn:      clientConn,

    // The address of the remote server
   RemoteAddr:      remoteAddr,

    // The timeout to connect to the remote server
	ConnectTimeout: 10 * time.Second,

    // The timeout for I/O operations
	IOTimeout:      5 * time.Second,
}

// this will block while
// the connections remain open
err := p.Proxy()

You may want to start the proxy in a new goroutine.

go func() {
    err := p.Proxy()
}()

About

A Golang library for network proxies.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages