Documentation ¶
Index ¶
- func HTTPError(code int, err string, req *http.Request) *http.Response
- func HTTPText(code int, header http.Header, text string, req *http.Request) *http.Response
- func NewResponse(code int, header http.Header, body io.Reader, req *http.Request) *http.Response
- type Client
- type Service
- type Session
- type TCPServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the proxy server
func NewService ¶
NewService create a Service instance The address is that the proxy server listen on, and the tlsCfg will be used to sign the https website
func (*Service) OnAcceptHandler ¶
OnAcceptHandler each connection is handled by this method
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session parse the protocol on the connection and call Client.Do handle every http request
type TCPServer ¶
type TCPServer struct {
// contains filtered or unexported fields
}
TCPServer as name
func NewTCPServer ¶
NewTCPServer create new tcp server
Click to show internal directories.
Click to hide internal directories.