Documentation ¶
Index ¶
- Constants
- Variables
- func DialTCPContext(ctx context.Context, address string) (net.Conn, error)
- func DialTLSContext(ctx context.Context, network, addr string, cfg *tls.Config) (net.Conn, error)
- func GetAuthorizedConn(ctx context.Context, host string, port string) (*net.Conn, error)
- func HandleConnect(w http.ResponseWriter, r *http.Request)
- func HandleConnectH2(w http.ResponseWriter, r *http.Request)
- func HandleError()
- func Handler(w http.ResponseWriter, r *http.Request)
- func HandlerH2(w http.ResponseWriter, r *http.Request)
- func HandlerH3(w http.ResponseWriter, r *http.Request)
- func HandlerRealWs(w http.ResponseWriter, r *http.Request)
- func Pip(from io.ReadCloser, to io.WriteCloser)
- func RandKey() string
- type IdConnMap
- type Mux
Constants ¶
View Source
const (
HttpsProxyEstablished = "HTTP/1.1 200 Connection Established\r\n\r\n"
)
Variables ¶
View Source
var ( Users = make(map[string]string) DnsResolver = getEnvOr("FCK_DNS_RESOLVER", "") UserName = getEnvOr("FCK_USER_NAME", "USER_NAME") Password = getEnvOr("FCK_PASSWORD", "PASSWORD") Salt = getEnvOr("FCK_SALT", "SALT") RemoteHost = getEnvOr("FCK_REMOTE_HOST", "127.0.0.1") RemotePort = getEnvOr("FCK_REMOTE_PORT", "443") HttpDomain = getEnvOr("FCK_REMOTE_DOMAIN", "test.com") HttpPath = getEnvOr("FCK_REMOTE_HTTP_PATH", "/yyuiopk") HttpUserAgent = getEnvOr("FCK_REMOTE_HTTP_UA", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0") RemoteSSL = getEnvOr("FCK_REMOTE_HTTPS", "true") != "false" AllowInsecure = getEnvOr("FCK_REMOTE_HTTPS_TRUST_ALL", "false") == "false" )
Functions ¶
func DialTLSContext ¶
func GetAuthorizedConn ¶
和Remote服务器建立连接,并进行鉴权处理
func HandleConnect ¶
func HandleConnect(w http.ResponseWriter, r *http.Request)
Handler for basic http
func HandleConnectH2 ¶
func HandleConnectH2(w http.ResponseWriter, r *http.Request)
Handler for basic http
func HandleError ¶
func HandleError()
func HandlerRealWs ¶
func HandlerRealWs(w http.ResponseWriter, r *http.Request)
Handler for basic http
func Pip ¶
func Pip(from io.ReadCloser, to io.WriteCloser)
Types ¶
type IdConnMap ¶
type IdConnMap struct {
// contains filtered or unexported fields
}
func NewIdConnMap ¶
func NewIdConnMap() *IdConnMap
type Mux ¶
type Mux struct { ServeMux *http.ServeMux ConnectMethodHandlerFunc *http.HandlerFunc }
func (*Mux) HandleFunc ¶
Click to show internal directories.
Click to hide internal directories.