2 Commits
Author SHA1 Message Date
Zakk fcfc7c7864 fix(serverObj): reject an http or socks link with no server address
Defaulting the port made an absent port legal, and with it a link that carries
no host at all: `socks5://` was accepted and stored as a node with an empty
server, where the previous port conversion had rejected it.
2026-09-18 05:05:34 +10:00
Zakk b98b1b00e4 fix(serverObj): default the port of http proxy links and reject paths
ParseHttpURL ran strconv.Atoi on the port before the per-scheme default,
so a link without a port failed with "invalid parameters" and the
Port == 0 branches were unreachable. Parse the port only when present.

A proxy link never carries a path or query; one that does is a
subscription URL pasted into the server box. Reject it with a message
that says so instead of the bare parameter error.
2026-09-18 02:53:30 +10:00