[Privoxy-users] Toggle Privoxy as scheduled task or similar

Lee ler762 at gmail.com
Tue Aug 15 17:15:35 UTC 2017


On 8/15/17, Walter Hyland <wally at moli.ca> wrote:
> Hello I'm running 3.0.8 on a windows machine to filter web traffic in a
> small office.
> Is there an existing feature that allows me to either toggle off the proxy
> automatically at certain times (lunch and after hours), or to reload a
> different default.actions file so that users can access sites I have blocked
> during working hours?
>
> I understand that the toggle option is available on the web config but I'm
> nowhere near savvy enough to try scripting that, and I don't want any
> curious people to poke around and find it.

set
  enable-remote-toggle  1
in the config and do
  curl -q --proxy 127.0.0.1:8118 --referer http://p.p/
http://p.p/toggle?set=disable
to toggle privoxy off and
  curl -q --proxy 127.0.0.1:8118 --referer http://p.p/
http://p.p/toggle?set=enable
to toggle it back on.

I don't know how you can restrict it to just you [or your group?] at work tho :(


> Currently I'm using a batch file and Scdeduled Tasks to kill the process,
> rename the default.actions file to a temp name, rename an "open" actions
> file to default.actions, and relaunch the program. Then reversing the
> operation after lunchtime etc. I'm just hoping there is a more graceful way
> of doing this.

Not really.

I'd have a 'config-workingHours.txt' and a 'config-afterHours.txt' so
that I didn't have to edit anything, just
  echo y | copy config-XXX.txt config.txt
to alternate between the configs.  But it's probably not worth the
effort of changing what you have.

Is there a reason you're still on 3.0.8?  Privoxy has gotten much
better about checking for the config file changing, so you don't have
to kill/restart the process to make sure that it picks up changes now.
  @rem  get Privoxy to re-read it's config
  curl -q --proxy 127.0.0.1:8118 --referer http://p.p/show-url-info
--silent http://p.p/show-url-info?url=http://foo.com > /nul
is enough to get privoxy to re-read the config file.

Regards,
Lee

curl site  :  https://curl.haxx.se/
download:  https://curl.haxx.se/download.html


More information about the Privoxy-users mailing list