Something like “decentraleyes” for Privoxy…
|
Aug. 21, 2018, 12:14 PM
Post: #16
|
|||
|
|||
RE: Something like “decentraleyes” for Privoxy…
First part is definitely OK as input has been caught. From the error it seems is the replacement part that wrong as it says resulting URL is invalid.
Could it be that when using "$2" variable for both cases is wrong and instead of using @https://192.168.101.101:8447/font/$[email protected] for both one should have $1 while other $2? |
|||
Mar. 31, 2019, 06:34 PM
Post: #17
|
|||
|
|||
RE: Something like “decentraleyes” for Privoxy…
Here is this addon https://addons.mozilla.org/ru/firefox/ad...ntraleyes/
I downloaded the xpi file and unpacked it. Decided to do actions and filters. But, with yastatic.net the redirect does not work. In the privoxy log reports that everything is done, but the file itself is not harvested, it can be seen in the apache2 log. Here is the action: Code: {+redirect{[email protected]^(https?://)?[^,%]+\b(angularjs|jquery|modernizr|moment)(js)?/([0-9\.]+)/[a-z\-]+\b[^/]*\.js$@https://192.168.2.1/decentraleyes/$2/$4/$[email protected]} \ ![]() What could be the problem? |
|||
Apr. 01, 2019, 05:39 AM
Post: #18
|
|||
|
|||
RE: Something like “decentraleyes” for Privoxy…
(Mar. 31, 2019 06:34 PM)vlad_s Wrote: What could be the problem? Have you added 192.168.2.1 to yandex's Content-Security-Policy header as an allowed script-src? Yandex's header: Code: Content-Security-Policy: connect-src 'self' wss://webasr.yandex.net https://mc.webvisor.com https://mc.webvisor.org wss://push.yandex.ru wss://portal-xiva.yandex.net https://yastatic.net |
|||
Apr. 01, 2019, 04:11 PM
(This post was last modified: Apr. 01, 2019 04:12 PM by vlad_s.)
Post: #19
|
|||
|
|||
RE: Something like “decentraleyes” for Privoxy…
Yes added:
Code: SERVER-HEADER-FILTER: Content-Security-Policy Content Security Policy. Code: Header: Transforming "Content-Security-Policy: default-src 'none'; script-src 'self'...mc... [too long, truncated] |
|||
Apr. 01, 2019, 04:35 PM
(This post was last modified: Apr. 01, 2019 04:44 PM by vlad_s.)
Post: #20
|
|||
|
|||
RE: Something like “decentraleyes” for Privoxy…
In general, the header is modified, but still does not work.
![]() From Iron browser: Code: Refused to load the script 'https://192.168.2.1/decentraleyes/jquery/2.2.3/jquery.min.jsm' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline' 'unsafe-eval' 'nonce-6JP75lFRjo5x8uG1ExrL7g' yastatic.net *.yandex.net yandex.st *.yandex.st yandex.ru *.yandex.ru mc.yandex.ru mc.yandex.by mc.yandex.kz mc.yandex.ua mc.yandex.co.il mc.yandex.com mc.yandex.com.am mc.yandex.com.ge mc.yandex.com.tr mc.yandex.az mc.yandex.ee mc.yandex.fr mc.yandex.kg mc.yandex.lt mc.yandex.lv mc.yandex.md mc.yandex.ru mc.yandex.tj mc.yandex.tm mc.yandex.uz mc.webvisor.com mc.webvisor.org yastat.net pass.yandex.ru suggest.yandex.ru news.yandex.ru social.yandex.ru export.yandex.ru an.yandex.ru awaps.yandex.ru yabs.yandex.ru news-clck.yandex.ru". |
|||
Apr. 02, 2019, 04:15 AM
Post: #21
|
|||
|
|||
RE: Something like “decentraleyes” for Privoxy…
(Apr. 01, 2019 04:11 PM)vlad_s Wrote: And I tried to delete all these extra headers, I did not achieve the result. Maybe something is not right? If the browser blocks 192.168.2.1 by default, deleting the header may not help. (Apr. 01, 2019 04:35 PM)vlad_s Wrote: In general, the header is modified, Are you sure? This message from Iron does not show 192.168.2.1 in script-src section of the Content Security Policy directive. (Apr. 01, 2019 04:35 PM)vlad_s Wrote: |
|||
Apr. 02, 2019, 05:59 PM
(This post was last modified: Apr. 02, 2019 07:01 PM by vlad_s.)
Post: #22
|
|||
|
|||
RE: Something like “decentraleyes” for Privoxy…
The exact sequence of my actions. In the file filter:
Code: SERVER-HEADER-FILTER: Content-Security-Policy Content Security Policy. Code: {+server-header-filter{Content-Security-Policy} \ ![]() ![]() It can be seen that my added ip 192.168.2.1 appears somewhere, but the script does not load. And I can see in the Apache log that the request for https://192.168.2.1/decentraleyes/jquery...ry.min.jsm does not even pass, but a message in the console like "Refused to load the script" https: // 192.168.2.1/decentraleyes/jquery/2.1.4/jquery.min.jsm ..." appears. How does the browser know that something is wrong with 192.168.1, because it did not download the script from this link to find out the Content Security Policy header? I added another filter to eliminate the message "Refused to load the script" https: // 192.168.2.1/decentraleyes/jquery/2.1.4/jquery.min.jsm ... ": Code: SERVER-HEADER-FILTER: Add-Content-Security-Policy Add header Content Security Policy. Code: {+server-header-filter{Content-Security-Policy} \ ![]() I load the script using the link https://192.168.2.1/decentraleyes/jquery...ry.min.jsm to see the headers: ![]() It seems all right? But does not work. |
|||
Apr. 03, 2019, 12:40 AM
Post: #23
|
|||
|
|||
RE: Something like “decentraleyes” for Privoxy…
Ahh... I don't think you understand.
You need to modify the Content Security Policy response header from yandex. You do not need to add the header to 192.168.2.1 (Apr. 02, 2019 05:59 PM)vlad_s Wrote: It can be seen that my added ip 192.168.2.1 appears somewhere, but the script does not load. 192.168.2.1 needs to be in the "script-src" section of the response header from the yandex server. (Apr. 02, 2019 05:59 PM)vlad_s Wrote: How does the browser know that something is wrong with 192.168.1, because it did not download the script from this link to find out the Content Security Policy header? The Content Security Policy header belongs to the response from yandex.ru. It tells the browser the addresses that it may access to create the page. The script is not allowed because the address 192.168.2.1. is not allowed. An example from the Proxomitron: The sidki set uses files from https://local.ptron:8443 . So, it adds "https://local.ptron:8443" for 'default-src', 'img-src', 'script-src', and 'style-src'. This is the header that the set creates from the 'yandex.ru' response header: Quote:Content-Security-Policy: connect-src 'self' wss://webasr.yandex.net To do this the filter replaces 'default-src' with 'default-src https://local.ptron:8443 ', 'img-src' with 'img-src https://local.ptron:8443 ', 'script-src' with 'script-src https://local.ptron:8443 ', 'style-src' with 'style-src https://local.ptron:8443 ' It also adds 'unsafe-inline'. |
|||
Apr. 03, 2019, 05:10 PM
Post: #24
|
|||
|
|||
RE: Something like “decentraleyes” for Privoxy…
You are right, I am not well versed in this. But I did as you indicated. The script "https://yastatic.net/jquery/2.1.4/jquery.min.js" does not load due to the absence of another header, "Access-Control-Allow-Origin: *". I added it:
Code: #filter ![]() |
|||
Apr. 04, 2019, 02:16 AM
(This post was last modified: Apr. 04, 2019 02:18 AM by JJoe.)
Post: #25
|
|||
|
|||
RE: Something like “decentraleyes” for Privoxy…
(Apr. 03, 2019 05:10 PM)vlad_s Wrote: I am not well versed in this. "This" is always changing. So, we are all always learning. ![]() I'm not sure Privoxy can do this and as I understand it... ![]() Your browser requests yastatic.net/jquery/2.1.4/jquery.min.js. Privoxy returns a redirect (302) to https://192.168.2.1/decentraleyes/jquery/2.1.4/jquery.min.js. Your browser requests https://192.168.2.1/decentraleyes/jquery/2.1.4/jquery.min.js. 192.168.2.1 returns (200) jquery.min.js. Privoxy's redirect response (302) AND 192.168.2.1 server's file response (200) must contain Code: Access-Control-Allow-Origin: * Can Access-Control-Allow-Origin header be added to Privoxy's redirect (302) response? BTW: The sidki set adds 'unsafe-inline' for the inline scripts that it adds to the page. The next set will not add 'unsafe-inline'. If you don't need 'unsafe-inline', don't add it. |
|||
Apr. 04, 2019, 06:48 PM
(This post was last modified: Apr. 04, 2019 06:49 PM by vlad_s.)
Post: #26
|
|||
|
|||
RE: Something like “decentraleyes” for Privoxy…
No, when requested by the browser yastatic.net/jquery/2.1.4/jquery.min.js, it does not actually occur. In the Apache log, there is no record of this, and when everything is correct, then the logs contain something like this:
Code: 192.168.2.1 - - [03/Apr/2019:21:41:21 +0300] "GET /decentraleyes/jquery/1.11.3/jquery.min.jsm HTTP/1.1" 200 97729 "http://ipv6-test.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0" ![]() |
|||
Apr. 04, 2019, 11:26 PM
(This post was last modified: Apr. 04, 2019 11:27 PM by JJoe.)
Post: #27
|
|||
|
|||
RE: Something like “decentraleyes” for Privoxy…
(Apr. 04, 2019 06:48 PM)vlad_s Wrote: Privoxy - I could not add a header to 302, The missing header in Privoxy's 302 response is the problem. If a browser extension is acceptable, CORS Everywhere for Firefox should allow the file to load. Try adding https://192.168.2.1 or https://192.168.2.1:443 to the extension's Activation whitelist. |
|||
Apr. 05, 2019, 07:23 PM
Post: #28
|
|||
|
|||
RE: Something like “decentraleyes” for Privoxy…
Is it possible to somehow weaken the site policy by removing some of the headers?
|
|||
Apr. 06, 2019, 03:54 AM
(This post was last modified: Apr. 06, 2019 03:55 AM by JJoe.)
Post: #29
|
|||
|
|||
RE: Something like “decentraleyes” for Privoxy…
(Apr. 05, 2019 07:23 PM)vlad_s Wrote: Is it possible to somehow weaken the site policy by removing some of the headers? I don't think that will work. We can remove the request headers but the browser still knows that it sent them. However, redirect works after I change Yandex.ru html from Code: <link rel="preload" href="//yastatic.net/jquery/2.1.4/jquery.min.js" as="script" crossorigin="anonymous"> to Code: <link rel="preload" href="//yastatic.net/jquery/2.1.4/jquery.min.js" as="script"> |
|||
![]() vlad_s |
Apr. 08, 2019, 06:35 PM
(This post was last modified: Apr. 08, 2019 06:41 PM by vlad_s.)
Post: #30
|
|||
|
|||
RE: Something like “decentraleyes” for Privoxy…
It works. I have a bad understanding of this, but I looked at news.yandex.ru, there is code "301 Moved Permanently" for the request https://news.yandex.ru/favicon.ico for https://yastatic.net/iconostasis/_/egVpf...c22BBg.ico without transmitting the header "Access-Control-Allow-Origin: *". I am assuming that you can still configure the redirect, without filtering the page suggested with your last message? Or am I wrong?
|
|||
« Next Oldest | Next Newest »
|