Documentation ¶
Index ¶
- Variables
- func StartConnectServer(ID uint64, Verify bool, tcpConn *net.TCPConn, reader *bufio.Reader, ...) (insize, tosize int)
- func StartHTTPProxy(ID uint64, tcpConn *bufio.ReadWriter, handler AuthHandlerFunc, ...)
- func StartSocks5Proxy(ID uint64, tcpConn *bufio.ReadWriter, handler AuthHandlerFunc, ...)
- type AuthHander
- type AuthHandlerFunc
- type Configuration
- type Server
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ServerCert ... ServerCert = ".wsproxy/certs/server.crt" // ServerKey ... ServerKey = ".wsproxy/certs/server.key" // ClientCert ... ClientCert = ".wsproxy/certs/client.crt" // ClientKey ... ClientKey = ".wsproxy/certs/client.key" // UnixSockAddr ... UnixSockAddr = "wsproxy.sock" // JSONConfig ... JSONConfig = "config.json" // DisableProxy 表示只开启wss服务, 不启用socks5/http proxy服务. DisableProxy = false // ServerTLSConfig ... ServerTLSConfig *tls.Config // Users for auth ... Users map[string]string // ConnectionID ... ConnectionID uint64 // Encoding ... Encoding string )
Functions ¶
func StartConnectServer ¶
func StartConnectServer(ID uint64, Verify bool, tcpConn *net.TCPConn, reader *bufio.Reader, writer *bufio.Writer, server string) (insize, tosize int)
StartConnectServer ...
func StartHTTPProxy ¶
func StartHTTPProxy(ID uint64, tcpConn *bufio.ReadWriter, handler AuthHandlerFunc, reader *bufio.Reader, writer *bufio.Writer)
StartHTTPProxy ...
func StartSocks5Proxy ¶
func StartSocks5Proxy(ID uint64, tcpConn *bufio.ReadWriter, handler AuthHandlerFunc, reader *bufio.Reader, writer *bufio.Writer)
StartSocks5Proxy ...
Types ¶
type Configuration ¶
type Configuration struct { Servers []string `json:"Servers"` ServerVerifyClientCert bool `json:"VerifyClientCert"` Listen string `json:"ListenAddr"` DisableProxy bool `json:"DisableProxy"` Users []UserInfo `json:"Users"` UpstreamProxyServer string `json:"UpstreamProxyServer"` Encoding string `json:"Encoding"` }
Configuration ...
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server ...
func (*Server) AuthHandleFunc ¶
AuthHandleFunc ...
func (*Server) StartWithAuth ¶
func (s *Server) StartWithAuth(addr string, handler AuthHander) error
StartWithAuth start wserver...
Click to show internal directories.
Click to hide internal directories.