Refactor: plain http proxy (#1443)

This commit is contained in:
Kr328
2021-06-15 17:13:40 +08:00
committed by GitHub
parent 70d53fd45a
commit b6ff08074c
11 changed files with 281 additions and 273 deletions

View File

@ -289,12 +289,7 @@ func handleTCPConn(ctx C.ConnContext) {
log.Infoln("[TCP] %s --> %v doesn't match any rule using DIRECT", metadata.SourceAddress(), metadata.String())
}
switch c := ctx.(type) {
case *context.HTTPContext:
handleHTTP(c, remoteConn)
default:
handleSocket(ctx, remoteConn)
}
handleSocket(ctx, remoteConn)
}
func shouldResolveIP(rule C.Rule, metadata *C.Metadata) bool {