[squid-users] regex for normal websites

Matus UHLAR - fantomas uhlar at fantomas.sk
Tue Aug 2 16:21:14 UTC 2022


On 02.08.22 16:41, robert k Wild wrote:
>thats incorrect as
>
>adobe\.com$ works but

it works for hackadobe.com too.

>.adobe\.com$ or
>\.adobe\.com$
>
>doesnt work so i just want to know why

these two don't match adobe.com.
the first marched hadobe.com, the seconda matches anything .adobe.com

so, again you must use:

^adobe\.com$
\.adobe\.com$

first will match "adobe.com", the second will match its subdomains.

again, from what I remember, using "dstdomain"  .adobe.com should match 
both (haven't tried), and I was hoping it should apply for ssl::servername 
(or how is that names).


>On Tue, 2 Aug 2022 at 16:32, Antony Stone <Antony.Stone at squid.open.source.it>
>wrote:
>
>> On Tuesday 02 August 2022 at 17:23:51, robert k Wild wrote:
>>
>> > mmm... so i just want to know and really sorry for the dumb question, so
>> >
>> > adobe\.com$
>> >
>> > works but then again if a website was eg
>> >
>> > hackadobe\.com$
>> >
>> > that would work as well probably, so i want to do something like this
>> >
>> > \.adobe\.com$
>> >
>> > ie put a dot . infront of adobe so
>> >
>> > www.adobe.com or
>> > account.adobe.com
>> >
>> > would work but then
>> >
>> > hackadobe\.com$
>> >
>> > would no longer work
>>
>> ... and neither would plain "adobe.com", missing the leading dot.

-- 
Matus UHLAR - fantomas, uhlar at fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
I don't have lysdexia. The Dog wouldn't allow that.


More information about the squid-users mailing list