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.
This commit is contained in:
Vladimir Dubrovin committed 2026-11-21 17:07:09 +03:00
1 parent f951160329
commit a3e93aa23a
7 files changed
+126 -32

No files matched your search

+7 -6
View File
@@ -918,13 +918,14 @@ of a file to include. The same patterns, and the same prefix, are used by the
\fBhttp\fR command, see BUILT IN HTTP SERVER. Regular expressions are matched
per request and cost more than a wildmask, which is enough for most rules.
Targetportlist may contain ports (X) or port ranges lists (X-Y). A port may
carry a service port after a slash, as X-Y/S or, for any destination, */S:
the rule matches only requests that came through the service listening on
the port S — the port of the proxy or socks it connected to — whatever
their destination. The limiters are shared by all the services, so this is
how a limit is given to one service's connections alone, e.g.
carry the service the request came through after an @, as X-Y@S or, for any
destination, @S: the rule matches only requests that arrived through the
service S — the address it listens on, its port, or both, the address in
brackets when IPv6 (@1080, @10.0.0.1, @10.0.0.1:1080, @[::1]:1080). The
limiters are shared by all the services, so this is how a limit is given to
one service's connections alone, e.g.
.br
connlim 5 60 * * * */1080
connlim 5 60 * * * @1080
.br
denies the sixth concurrent connection of the service on port 1080,
whatever it connects to. For any field *