mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
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.
This commit is contained in:
1 parent
51cbdb2fad
commit
f951160329
7 files changed
+144
-14
No files matched your search
@@ -1209,6 +1209,7 @@ void freeacl(struct ace *ac){
|
||||
for(ipl = ac->src; ipl; ipl = (struct iplist *)itfree(ipl, ipl->next));
|
||||
for(ipl = ac->dst; ipl; ipl = (struct iplist *)itfree(ipl,ipl->next));
|
||||
for(pl = ac->ports; pl; pl = (struct portlist *)itfree(pl, pl->next));
|
||||
for(pl = ac->viaports; pl; pl = (struct portlist *)itfree(pl, pl->next));
|
||||
for(pel = ac->periods; pel; pel = (struct period *)itfree(pel, pel->next));
|
||||
for(ul = ac->users; ul; ul = (struct userlist *)itfree(ul, ul->next)){
|
||||
if(ul->user)free(ul->user);
|
||||
|
||||
Reference in new issue
Block a user