fix: validation error handling for age-secret-key

This commit is contained in:
wwqgtxx committed 2026-06-04 13:49:33 +08:00
1 parent f99d4e1be6
commit 1abd12619a
1 file changed
+4 -2
+4 -2
View File
@@ -366,8 +366,10 @@ func NewProxiesParser(pdName string, tunnel C.Tunnel, filter string, excludeFilt
filterRegs = append(filterRegs, filterReg)
}
if err := age.VeritySecretKeys(ageSecretKey); err != nil {
return nil, fmt.Errorf("invalid age-secret-key: %w", err)
if ageSecretKey != "" {
if err := age.VeritySecretKeys(ageSecretKey); err != nil {
return nil, fmt.Errorf("invalid age-secret-key: %w", err)
}
}
return func(buf []byte) ([]C.Proxy, error) {