mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-10-11 09:48:10 +08:00
feat: add linsters
This commit is contained in:
1 parent
ba884c29bd
commit
4f75201a98
49 files changed
+1018
-306
No files matched your search
@@ -10,8 +10,14 @@ import (
|
||||
|
||||
// NewHTTPS receive CONNECT request and return ConnContext
|
||||
func NewHTTPS(request *http.Request, conn net.Conn) *context.ConnContext {
|
||||
return NewHTTPSWithInfos(request, conn, "", "")
|
||||
}
|
||||
|
||||
func NewHTTPSWithInfos(request *http.Request, conn net.Conn, inName, preferRulesName string) *context.ConnContext {
|
||||
metadata := parseHTTPAddr(request)
|
||||
metadata.Type = C.HTTPS
|
||||
metadata.PreferRulesName = preferRulesName
|
||||
metadata.InName = inName
|
||||
if ip, port, err := parseAddr(conn.RemoteAddr().String()); err == nil {
|
||||
metadata.SrcIP = ip
|
||||
metadata.SrcPort = port
|
||||
|
||||
Reference in new issue
Block a user