fix: finish profile editor preview scrolling

This commit is contained in:
proxyctl coordinator
2026-07-18 00:07:57 +08:00
parent c56c206d8b
commit 27beb51a0e
6 changed files with 110 additions and 19 deletions
+3 -3
View File
@@ -263,12 +263,12 @@ func normalizeBypassEntry(raw string) (string, error) {
return host, nil
}
var credentialPattern = regexp.MustCompile(`(?i)(https?|socks5h?)://([^/@\s:]+):([^@\s]*)@`)
var credentialPattern = regexp.MustCompile(`(?i)((?:https?|socks5h?)://)?([^/@\s:]+):([^@\s]*)@`)
// RedactText removes URL passwords from diagnostic text without requiring the
// surrounding text to be a valid URL.
// surrounding text to be a valid URL or to include a scheme.
func RedactText(value string) string {
return credentialPattern.ReplaceAllString(value, `${1}://${2}:REDACTED@`)
return credentialPattern.ReplaceAllString(value, `${1}${2}:REDACTED@`)
}
func ObscureURL(value string) string {