mirror of https://github.com/Dreamacro/clash.git
17 lines
301 B
Go
17 lines
301 B
Go
package adapters
|
|
|
|
import (
|
|
"net"
|
|
"net/http"
|
|
)
|
|
|
|
// NewHTTPS is HTTPAdapter generator
|
|
func NewHTTPS(request *http.Request, conn net.Conn) *SocketAdapter {
|
|
metadata := parseHTTPAddr(request)
|
|
metadata.SourceIP = parseSourceIP(conn)
|
|
return &SocketAdapter{
|
|
metadata: metadata,
|
|
Conn: conn,
|
|
}
|
|
}
|