Documentation ¶
Index ¶
- Constants
- Variables
- func CopyBuffer(dst io.Writer, src io.Reader) (written int64, err error)
- func NewTimeoutConn(conn net.Conn, timeout time.Duration) *timeoutConn
- func ShowVersion()
- type CloseWriter
- type HttpProxy
- type ProxyContextDialer
- type Server
- type ServerOption
- func WithCertFile(certFile string) ServerOption
- func WithConnectTimeout(timeout time.Duration) ServerOption
- func WithKeyFile(keyFile string) ServerOption
- func WithListenAddress(listenAddress string) ServerOption
- func WithListenPort(listenPort uint16) ServerOption
- func WithPassword(password string) ServerOption
- func WithPretendAsWeb(pretendAsWeb bool) ServerOption
- func WithProxy(addr string) ServerOption
- func WithTimeout(timeout time.Duration) ServerOption
- func WithUsername(username string) ServerOption
Constants ¶
View Source
const RAND_SEQ_ID_LEN = 12
Variables ¶
View Source
var Name string = "httpproxy"
View Source
var Version string = "unkown"
Functions ¶
func CopyBuffer ¶ added in v0.4.3
Copy copy with default buf
func NewTimeoutConn ¶ added in v0.4.3
NewTimeoutConn create timeout conn
func ShowVersion ¶
func ShowVersion()
Types ¶
type CloseWriter ¶ added in v1.0.0
type CloseWriter interface {
CloseWrite() error
}
type HttpProxy ¶ added in v0.4.0
type HttpProxy struct {
// contains filtered or unexported fields
}
func NewHttpProxy ¶ added in v0.4.0
type ProxyContextDialer ¶ added in v0.4.2
type ProxyContextDialer struct {
// contains filtered or unexported fields
}
func NewProxyContextDialer ¶ added in v0.4.2
func NewProxyContextDialer(d proxy.Dialer) ProxyContextDialer
func (ProxyContextDialer) DialContext ¶ added in v0.4.2
func (d ProxyContextDialer) DialContext(ctx context.Context, network, address string) (net.Conn, error)
*
- from golang.org/x/net/proxy.dialContext
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(opts ...ServerOption) (*Server, error)
func (*Server) ListenAndServe ¶
type ServerOption ¶ added in v0.4.2
type ServerOption interface {
// contains filtered or unexported methods
}
func WithCertFile ¶ added in v1.0.1
func WithCertFile(certFile string) ServerOption
func WithConnectTimeout ¶ added in v0.4.2
func WithConnectTimeout(timeout time.Duration) ServerOption
func WithKeyFile ¶ added in v1.0.1
func WithKeyFile(keyFile string) ServerOption
func WithListenAddress ¶ added in v1.0.1
func WithListenAddress(listenAddress string) ServerOption
func WithListenPort ¶ added in v1.0.1
func WithListenPort(listenPort uint16) ServerOption
func WithPassword ¶ added in v1.0.0
func WithPassword(password string) ServerOption
func WithPretendAsWeb ¶ added in v1.0.3
func WithPretendAsWeb(pretendAsWeb bool) ServerOption
func WithProxy ¶ added in v0.4.2
func WithProxy(addr string) ServerOption
func WithTimeout ¶ added in v0.4.3
func WithTimeout(timeout time.Duration) ServerOption
func WithUsername ¶ added in v1.0.0
func WithUsername(username string) ServerOption
Source Files ¶
Click to show internal directories.
Click to hide internal directories.