add network for bypass

This commit is contained in:
ginuerzh committed 2023-09-30 17:51:55 +08:00
1 parent ea585fc25d
commit 836cf6eade
24 files changed
+92 -160

No files matched your search

+1 -1
View File
@@ -155,7 +155,7 @@ func (h *http2Handler) roundTrip(ctx context.Context, w http.ResponseWriter, req
}
ctx = auth_util.ContextWithID(ctx, auth_util.ID(id))
if h.options.Bypass != nil && h.options.Bypass.Contains(ctx, addr) {
if h.options.Bypass != nil && h.options.Bypass.Contains(ctx, "tcp", addr) {
w.WriteHeader(http.StatusForbidden)
log.Debug("bypass: ", addr)
return nil