Commit Graph
2 Commits
Author SHA1 Message Date
Vladimir Dubrovin c099e632c8 acl: a rule's port names the service it came through by @, not by a slash
The part after the @ of a port in a rule names the service: by its
port, by the address it listens on, or by both, the address in
brackets when IPv6 —

 connlim 5 60 * * * @1080
 connlim 5 60 * * * @10.0.0.1:1080
 deny * * * @[::1]

A slash, as the delimiter of the first take, would have read as a
CIDR habit the day a service is named inside an address list, and
@ cannot appear in a port or an address. Digits alone are a port, a
dashed pair a port range, anything else an address with a port behind
a colon; an @ with nothing after it is refused. The destination port
before the @ is unchanged, and so is every rule without one.
2026-11-21 17:07:12 +03:00
Vladimir Dubrovin 59756eeb62 acl: a rule's port may name the service it came through (#665)
A port in a rule's targetportlist may carry a service port after a
slash, X-Y/S, or, for any destination, */S: the rule matches only
requests that arrived through the service listening on the port S,
the port of its proxy -p or socks -p, whatever their destination. The
limiters are shared by all the services of a configuration, so this is
how a limit is given to the connections of one service alone:

 connlim 5 60 * * * */1080

denies the sixth concurrent connection of the service on port 1080.
The destination port and the service port are both ranges or single
ports, a slash with nothing after it is refused, and a rule without a
slash is what it always was.
2026-11-21 16:55:46 +03:00