mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-12-06 08:06:50 +00:00
The quick-add parser rejected every IPv6 proxy: the host group [^:]+ cannot match IPv6 literals (colons) and the pattern had no bracketed form, so lines like socks5://[2001:db8::1]:1080 were reported invalid. Add a bracketed-IPv6 host alternative and strip the brackets before storing; the backend re-brackets via net.JoinHostPort when building the proxy URL. Bare (unbracketed) IPv6 stays rejected because it is ambiguous with host:port. Also add a regression test.