A Pluckeye Forum

A place for Pluckeye users to chew the cud.

You are not logged in.

#1 2020-09-10 10:26:52

eye.wander
Member
Registered: 2019-08-19
Posts: 27

Different delays on "pluck del block xxx"

According to the Release Note v0.99.10 - 2019-11-23, delays may vary based on the rule being added or removed.
I've tried to extend the delay of deleting "deny" rule to 24h:

pluck + "delay 24h - block"
pluck + "delay 1440m - deny"
pluck + "delay 10m - del"

Failed, the export command shows the normal operating delay (2h).
Is that super useful feature still in the code? Maybe it's something wrong with my poor pluck commands typing hmm

I use the

pluck del deny xxx.com

command to delete the deny rule.

Last edited by eye.wander (2020-09-10 10:28:09)

Offline

#2 2020-09-10 21:52:08

RNYC
Moderator
Registered: 2017-01-14
Posts: 271

Re: Different delays on "pluck del block xxx"

There are no Deny rules in the new rule format. You can enter them in the command prompt but they are converted to Block commands. So the example rule given in the Release Notes:

pluck + "delay 10m - block"

is the general format you want. I think if you change the 10m to 24h you will have what you want. But the

pluck delay

command will always show your 'normal' delay amount, not the delay set by this special rule.

Offline

#3 2020-09-12 09:18:02

eye.wander
Member
Registered: 2019-08-19
Posts: 27

Re: Different delays on "pluck del block xxx"

Many thanks for your reply, RNYC.

I am checking the specific delay by

pluck del block xxx.site

and

pluck export | grep xxx

Then I am able to identify the time required to delete the block rule.

Unfortunately, by using the generic form of

pluck + "delay 24h - block"

gives no result.

Note: what I want to achieve here is to extend the delay of deleting rules, eg, site xxx is blocked, the regular delay is 2h but I want to  "deleting the block" rule delay to be extended to 24h. I believe the minus sign in the

pluck + "delay 24h - block"

command is equivalent of "del" in the "pluck del block xxx.site" command.

Last edited by eye.wander (2020-09-12 09:20:58)

Offline

#4 2020-09-12 13:32:29

RNYC
Moderator
Registered: 2017-01-14
Posts: 271

Re: Different delays on "pluck del block xxx"

Try this syntax from the examples page

# delay patterns
#
# The syntax of these is *very* picky at present.
#
# To set a 10 hour delay for allowing everything (a.k.a., a whiteout):

delay 36000 + action:allow everything:true
#           must be a tab ^
#
# In a bash shell this is done like so:
#
# pluck + delay 36000 $'+ action:allow\teverything'

I just tested this. I currently have a zero delay for testing purposes. I blocked the site whitehouse.gov. Then I entered this in the command prompt:

pluck + delay 120 $'- action:block'

In my browser I went to whitehouse.gov and it was blocked. I used the button to allow the site. Nothing happened. (With delay zero it should have automatically reloaded.) I checked my scheduled rules (pluck future) and saw that the block would end in two  minutes.

The rule above is basically saying "put a two minute delay (delay 120)" whenever I "remove a block (- action:block).

The tab (\t) in the longer description above is only needed when you want to specify a specific site that the rule applies to. I know this option worked when I first saw this option and tested it. But it is not working for me right now and I'm not sure if that is due to an error on my part or a regression from one of the updates.

Offline

#5 2020-09-12 20:29:07

jon
Administrator
Registered: 2017-01-10
Posts: 344

Re: Different delays on "pluck del block xxx"

You want:

pluck + delay 24h "- action:block"

Side note for RNYC: I use double-quotes because they are universal: they work on Windows (in cmd), macOS, and Linux.  Single quotes only work on macOS and Linux (or POSIX-sh-like shells on Windows).  In bash $'a-\t-b' causes the shell to expand the expression to a-<real-tab-character>-b, but that syntax won't work in cmd.

As you point out, eye.wander just cares about blocking anything, so he doesn't need to use a tab character.

"- action:block" is sufficient because that string will match

1. - action:block<tab>host:whitehouse.gov
2. - action:block<tab>everything:true, and
3. - action:block<tab>...

Future Pluckeye will simplify this so that

pluck + delay 24h "- block"
pluck + delay 12h "- block everything"

does what one would expect.

Offline

Board footer

Powered by FluxBB