Documentation ¶
Index ¶
- Constants
- Variables
- func CheckAuth(u *UserInfo, r *http.Request) bool
- func CreateTunnel(from net.Conn, remoteAddr string, config *ClientConfig)
- func GetMethod(from *http.Request, remote string, to net.Conn, config *ClientConfig)
- func InitLogger()
- func NewTransport(proxyAddr string) *http2.Transport
- func ParseConfig() (category string, config interface{})
- func SetAuthInHeader(u *UserInfo, req *http.Request)
- type ClientConfig
- type FileConfig
- type H2proxy
- type Http2Server
- type HttpProxy
- type ServerConfig
- type Sock5Proxy
- type UserInfo
Constants ¶
View Source
const ( HTTP = "http" SERVER = "server" SOCKSV5 = "socks5" LOCAL_HOST = "local_host" LOCAL_PORT = "local_port" PROXY_HOST = "proxy_host" PROXY_PORT = "proxy_port" )
Variables ¶
View Source
var Debug = false
global config
View Source
var (
Log *zap.SugaredLogger
)
Functions ¶
func CreateTunnel ¶
func CreateTunnel(from net.Conn, remoteAddr string, config *ClientConfig)
create http request with connect method
func InitLogger ¶
func InitLogger()
func ParseConfig ¶
func ParseConfig() (category string, config interface{})
Types ¶
type ClientConfig ¶
type FileConfig ¶
type FileConfig struct { Category string Server *ServerConfig Client *ClientConfig }
type Http2Server ¶
type Http2Server struct {
Config *ServerConfig
}
func (Http2Server) Start ¶
func (h Http2Server) Start()
type HttpProxy ¶
type HttpProxy struct {
Config *ClientConfig
}
type ServerConfig ¶
type Sock5Proxy ¶
type Sock5Proxy struct {
Config *ClientConfig
}
func (Sock5Proxy) Start ¶
func (s Sock5Proxy) Start()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.