I use privoxy 3.0.24, and found when I access this url http://vdl.china.com.cn/test_tianmai/AnHuiHD/2016/04/02/AnHuiHD_2500000_20160402_18393222_0_126.mp4
, it could not be played fully.
I add debug code in privoxy just see that the FD_ISSET check client socket close the socket, and I capture packet through wireshark, show client FIN and RST the socket.
when I remove privoxy, it just work fine.
Browser used : Safari, Firefox. URL link as above.
Please help me check what cause browser close socket to privoxy ? thanks a lot.
Please provide a log excerpt as documented at:
https://www.privoxy.org/user-manual/contact.html
This is just a hunch, but you could try allowing Range requests:
https://www.privoxy.org/user-manual/actions-file.html#CLIENT-HEADER-TAGGER
Sorry, not provide much information.
Now, I have add the privoxy config and user.filter user.action three configuration file for your reference.
And the log as below when error happened, even if toggle off.
I also use the CLIENT_HEADER_TAGGER in user.filter file, but it still not work fine.
To reproduce this problem:
Just use privoxy as web proxy, and access url http://vdl.china.com.cn/test_tianmai/AnHuiHD/2016/04/02/AnHuiHD_2500000_20160402_18393222_0_126.mp4
You will see above log in privoxy log(I have added some log debug log into the privoxy, just find out browser-side client close the socket, the deep reason, I can not find anymore)
If above information is not enough, please contact me, I will provide as detail as I can, thanks.
Last edit: Weeds 2016-04-04
I tried from several locations, but the server isn't accepting my
connections (with or without Privoxy) so I can't reproduce this myself.
Please provide a complete log excerpt that shows at least one whole failing
request and the response. Please use the debug settings documented at:
https://www.privoxy.org/user-manual/contact.html
and a unmodified Privoxy version.
Your user.filter contains an action section that doesn't belong
there.
Filter files just define taggers, to enable them you need an action
section and your user.action only seems to enable a custom filter.
To allow Range requests, please copy the last two action sections from:
https://www.privoxy.org/user-manual/actions-file.html#CLIENT-HEADER-TAGGER
to one of your action files. (Copying all of them won't hurt, but
only the last two are relevant here.)
OK, I will try that right now.
As you say the link unaccessable, I think maybe due to China Firewall cause that.
I have already download the video and put it on my site found it still can reproduce, so you can try link: http://hiweeds.net/test.mp4 if this still have some cannot access, try replace domain with IP address 112.74.112.103
Currently, I add action and filter rule to action file, not help with that.
I had no problems downloading the file from http://hiweeds.net/test.mp4:
SHA256 (test.mp4) = e6c6ace335ed411152e107cce59fcca91dfda252afd76fd4a0f0bc1119a9dcf2
Did you verify that you can reproduce the problem with this URL?
It's likely that the problem has something to do with the server
and the actual content does not matter.
I tried with privoxy 3.0.24 source code, if just use default Makefile, it will work fine.
But if I use configure like this:
./configure --sysconfdir=/Users/weeds/git/privoxy-3.0.24-stable --disable-toggle --disable-force --disable-acl-support --disable-trust-files --disable-editor --disable-stats --disable-image-blocking --disable-trust-files --with-debug
It will reproduce the problem I found. and I have collect the log in attachments.
You can see below message when error happen:
Your log excerpt indicates that you did not enable the tagger I suggested
previously and that Range headers are being removed as suspected:
2016-04-04 19:30:30.264 000003a8 Header: Content filtering is enabled. Crunching: 'Range: bytes=196608-262143' to prevent range-mismatch problems.
As mentioned before, this could explain why the client does
not like the response. Please try to reproduce the problem with
the tagger enabled.
See below comment
I enable header tagger. (see user.action and user.filter)
it works on Firefox browser, but not work on Safari
You can see my the log.
You put the action section in a filter file instead of an action file:
From your log:
2016-04-04 21:09:42.335 000002a0 Info: Loading filter file: /Users/weeds/git/privoxy/user.filter
2016-04-04 21:09:42.335 000002a0 Error: Adding re_filter job '{+client-header-tagger{range-requests}}' to filter client-useragent failed: (pcrs:) Syntax error while parsing command
2016-04-04 21:09:42.335 000002a0 Error: Adding re_filter job '/' to filter client-useragent failed: (pcrs:) Syntax error while parsing command
As a result, Range headers are still being removed:
2016-04-04 21:09:47.613 000001d0 Header: Content filtering is enabled. Crunching: 'Range: bytes=199573-22022507' to prevent range-mismatch problems.
Understood.
Now the major problem is how to enable the clien-header-tagger.
I follow your suggestions above to copy last two section into action file, but still no enable it.
user.action:
**user.filter: **
The error log as below:
And I search the reference document, still not find the way to enable the range-requests tagger.
Could you indicate where I am doing wrong ? thanks
Your user.action excerpt looks good, but your user.filter excerpt
is invalid (incorrect filter type combined with a TAG pattern which
is only valid in action files).
Also note that the range-request client-header tagger is already
defined in default.filter:
http://ijbswa.cvs.sourceforge.net/viewvc/ijbswa/current/default.filter?view=markup#l778
If you disabled the default.filter file shipped with Privoxy you
could copy and paste the client-header tagger from there to your
user.filter file.
Thanks Fabian, that solved my problem.
You're welcome. Thanks for the confirmation.
Privoxy 3.0.25 will allow Range requests by default.