mirror of
https://github.com/yibaiba/hideck.git
synced 2026-12-06 16:01:13 +00:00
13 lines
381 B
TypeScript
13 lines
381 B
TypeScript
export const upstreamProxyIPv6AddressHint = 'IPv6 地址请使用 [IPv6]:port,例如 [2001:db8::1]:1080'
|
|
|
|
export function upstreamProxyAddressWarning(addr: string): string {
|
|
const value = String(addr || '').trim()
|
|
if (!value || value.startsWith('[')) {
|
|
return ''
|
|
}
|
|
if ((value.match(/:/g) || []).length > 1) {
|
|
return upstreamProxyIPv6AddressHint
|
|
}
|
|
return ''
|
|
}
|