mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-02-23 12:42:27 +08:00
fix: undefined parameter
This commit is contained in:
parent
564a6fdf35
commit
2e08a4b4e1
@ -18,7 +18,7 @@ func isUpgradeRequest(req *http.Request) bool {
|
|||||||
return strings.EqualFold(req.Header.Get("Connection"), "Upgrade")
|
return strings.EqualFold(req.Header.Get("Connection"), "Upgrade")
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleUpgrade(conn net.Conn, request *http.Request, in chan<- C.ConnContext) (resp *http.Response) {
|
func handleUpgrade(localConn net.Conn, source net.Addr, request *http.Request, in chan<- C.ConnContext) (resp *http.Response) {
|
||||||
removeProxyHeaders(request.Header)
|
removeProxyHeaders(request.Header)
|
||||||
removeExtraHTTPHostPort(request)
|
removeExtraHTTPHostPort(request)
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ func handleUpgrade(conn net.Conn, request *http.Request, in chan<- C.ConnContext
|
|||||||
|
|
||||||
left, right := net.Pipe()
|
left, right := net.Pipe()
|
||||||
|
|
||||||
in <- inbound.NewHTTP(dstAddr, conn.RemoteAddr(), right)
|
in <- inbound.NewHTTP(dstAddr, source, right)
|
||||||
|
|
||||||
var remoteServer *N.BufferedConn
|
var remoteServer *N.BufferedConn
|
||||||
if request.TLS != nil {
|
if request.TLS != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user