feat: Optimize log file support for IPv6. (#10418)

Refs https://github.com/1Panel-dev/1Panel/issues/10411
This commit is contained in:
CityFun 2025-09-19 18:12:01 +08:00 committed by GitHub
parent 2040f8f3b0
commit 7ed81996b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -124,7 +124,7 @@ const defaultRules: TokenRule[] = [
},
{
type: 'ipv6',
pattern: /\b(?:[A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}\b/g,
pattern: /\b(?:[A-Fa-f0-9]{0,4}:){1,7}[A-Fa-f0-9]{0,4}\b|\b::[A-Fa-f0-9:]*\b|\b[A-Fa-f0-9:]*::\b/g,
color: '#4A90E2',
},
{