[Privoxy-users] permit-access wildcards?

Fabian Keil fk at fabiankeil.de
Sun Aug 27 13:09:11 CEST 2023


Richard Glaser <richard.glaser at utah.edu> wrote on 2023-08-23 at 20:55:40:

> Basically, we are blocking all other domains, except...
> 
> 
> *.lib.utah.edu
> *.utah.edu
> *.duosecurity.com
> *.apple.com
> 
> And some miscellaneous other that are needed for the above website needs.
> 
> If permit and deny supported regular expression it would make it much
> easier to implement, but currently need to do allow ever hostname per
> domain and some because the require wildard support are an option.
> 
> Any other suggestions on accomplishing this with our wildcard or regular
> expression support for permit deny access?

If you want to treat all clients the same anyway you should be able
to use the +block{} action [0] with enforce-blocks [1] enabled.

Just block everything ("/") and then make exceptions for the
hosts that should be accessible.

Quoting the documentation [2]:
| When compiled with FEATURE_PCRE_HOST_PATTERNS patterns can be
| prefixed with "PCRE-HOST-PATTERN:" in which case full regular
| expression (PCRE) can be used for the host pattern as well.

For your example patterns you shouldn't need this feature, though.

Fabian

[0] <https://www.privoxy.org/user-manual/actions-file.html#BLOCK>
[1] <https://www.privoxy.org/user-manual/config.html#ENFORCE-BLOCKS>
[2] <https://www.privoxy.org/user-manual/actions-file.html#HOST-PATTERN>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.privoxy.org/pipermail/privoxy-users/attachments/20230827/d66d862a/attachment.bin>


More information about the Privoxy-users mailing list