Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-acltools
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-acltools
Commits
6a0fb58b
Unverified
Commit
6a0fb58b
authored
Mar 08, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check in generated RST
parent
f54521b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
93 additions
and
0 deletions
+93
-0
vmod_acltools.man.rst
src/vmod_acltools.man.rst
+93
-0
No files found.
src/vmod_acltools.man.rst
0 → 100644
View file @
6a0fb58b
..
.. NB: This file is machine generated, DO NOT EDIT!
..
.. Edit ./vmod_acltools.vcc and run make instead
..
.. role:: ref(emphasis)
=============
vmod_acltools
=============
----------------------------------------
Varnish Access Control List (ACL) Module
----------------------------------------
:Manual section: 3
SYNOPSIS
========
.. parsed-literal::
import acltools [as name] [from "path"]
ACL dyn_single(STRING ipmask, [ACL fallback], BOOL resolve)
DESCRIPTION
===========
This vmod contains additional functions for Access Control Lists
(ACLs).
.. _acltools.dyn_single():
ACL dyn_single(STRING ipmask, [ACL fallback], BOOL resolve)
-----------------------------------------------------------
::
ACL dyn_single(STRING ipmask, [ACL fallback], BOOL resolve=0)
Returns a dynamic ACL **for immediate use** (see **NOTE** below) with
a single entry constructed from the *ipmask* string, which must be of
format::
<ip>[/<mask>]
or, for compatibility with built-in static ACLs::
"<ip>"[/<mask>]
.. _`std.ip()`: https://varnish-cache.org/docs/trunk/reference/vmod_std.html#std-ip
*<ip>* undergoes the same parsing as the *s* argument of
`std.ip()`_. If *<ip>* is an IPv4 address, *<mask>*, if present, must
be an integer between 0 and 32. If *<ip>* is an IPv6 address,
*<mask>*, if present, must be an integer between 0 and 128. If
*<mask>* is not present, it defaults to the maximum mask (32 or 128,
respectively).
If *<ip>* is not a valid address or *<mask>* is invalid for the
address, the *fallback* argument is returned, if present. If
*fallback* is not given with invalid input, the ACL match will always
fail.
If the *resolve* argument is ``true``, *<ip>* will be resolved as a
DNS name.
Example
::
import acltools;
sub vcl_recv {
if (client.ip ~ acltools.dyn_single(req.http.acl) {
return (synth(200, "matched"));
} else {
return (synth(403, "denied"));
}
}
**NOTE** Due to current limitations in the Varnish-Cache APIs, there
only ever exists one ACL created by this function, and any match is
always on the ACL last created. In particular, ACLs created by this
function can not be saved in variables for later use, they always need
to be matched immediately.
SEE ALSO
========
vcl\(7),
varnishd\(1)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment