feat: add skip-auth-prefixes

This commit is contained in:
wwqgtxx
2023-10-10 19:43:26 +08:00
parent 7ed25ddc74
commit 6bcd91a801
13 changed files with 110 additions and 61 deletions

View File

@ -100,6 +100,9 @@ func HandleConn(c net.Conn, tunnel C.Tunnel, cache *cache.LruCache[string, bool]
func authenticate(request *http.Request, cache *cache.LruCache[string, bool]) *http.Response {
authenticator := authStore.Authenticator()
if inbound.SkipAuthRemoteAddr(N.NewCustomAddr("", request.RemoteAddr, nil)) {
authenticator = nil
}
if authenticator != nil {
credential := parseBasicProxyAuthorization(request)
if credential == "" {