amate / Proxydomo

ローカルで動作するプロクシフィルタリングソフトです
http://www31.atwiki.jp/lafe/pages/37.html
GNU General Public License v2.0
74 stars 12 forks source link

Filters misfire on codepen.io #46

Closed mas91180 closed 7 years ago

mas91180 commented 7 years ago

I have two filters - one deals with headers and removes br and sdch from Accept-Encoding, the second one just cleans html with $TYPE(htm) in URL pattern. When you visit any codepen.io page, there's a JS code iframe, it's loaded via ajax and looks like https://s.codepen.io/boomerang/iFrameKey-/index.html The problem is the first one with headers doesn't work (while it should) but the second one with html works (while it shouldn't, I prohibit it via ^$LST(something) ). Both filters work good on any other sites as far as I can tell.

Can you give it a look?

amate commented 7 years ago

I can't reproduce the first problem.

The second problem. Please take the filter of "^$LST(something)" at the top of the filter list.

mas91180 commented 7 years ago

Thanks, but moving filter on top didn't change a thing, here's my (almost) exact filters and page I'm on: Header filter [HTTP headers] Key = "Accept-Encoding: br header fix" In = FALSE Out = TRUE Version = "" Author = "" Comment = "" Active = TRUE Multi = FALSE URL = "^$LST(nobrfix)" Bounds = "" Limit = 256 Match = "*\1, (sdch|br)" Replace = "\1"

HTML filter: [Patterns] Name = "test" Version = "" Author = "" Comment = "" Active = TRUE Multi = FALSE URL = "$TYPE(htm)(^$LST(something))" Bounds = "" Limit = 1024 Match = "ad-App" Replace = "test-app"

I'm testing here: https://codepen.io/anthonydugois/pen/mewdyZ

NB: On a side note a small wish - could you add Clone filter button like it is in good old proxomitron without using clipboard?

amate commented 7 years ago

I can't reproduce the first problem.

>>> port 51111 #744 : Request received from browser
GET /boomerang/iFrameKey-da7e90cf-41bc-e189-a9fb-92fb6063b98c/index.html HTTP/1.1
Host: s.codepen.io
Connection: keep-alive
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.114 Safari/537.36 Vivaldi/1.9.818.50
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Referer: https://codepen.io/anthonydugois/pen/mewdyZ
Accept-Encoding: gzip, deflate, sdch, br
Accept-Language: ja,en-US;q=0.8,en;q=0.6
Cookie: __cfduid=d3bea1b7221d2d9a3f7f7794f31efcaa11495805951

#744 : HeaderMatch [br header fix] 
>>> port 51111 #744 : Request sent to website
GET /boomerang/iFrameKey-da7e90cf-41bc-e189-a9fb-92fb6063b98c/index.html HTTP/1.1
Host: s.codepen.io
Connection: keep-alive
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.114 Safari/537.36 Vivaldi/1.9.818.50
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Referer: https://codepen.io/anthonydugois/pen/mewdyZ
Accept-Encoding: gzip, deflate
Accept-Language: ja,en-US;q=0.8,en;q=0.6
Cookie: __cfduid=d3bea1b7221d2d9a3f7f7794f31efcaa11495805951

>>> port 51111 #744 : Response received from website
HTTP/1.1 200 OK
Date: Sat, 27 May 2017 09:26:00 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 200 OK
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 5a44d45d-1eee-4574-a1fd-91b408c4a333
X-Env: production
X-Frame-Options: ALLOWALL
X-Runtime: 0.005869
X-Powered-By: Phusion Passenger Enterprise 5.1.2
Server: cloudflare-nginx
CF-RAY: 3657ee19df926eff-NRT
Content-Encoding: gzip

>>> port 51111 #744 : Response sent to browser
HTTP/1.1 200 OK
Date: Sat, 27 May 2017 09:26:00 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 200 OK
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 5a44d45d-1eee-4574-a1fd-91b408c4a333
X-Env: production
X-Frame-Options: ALLOWALL
X-Runtime: 0.005869
X-Powered-By: Phusion Passenger Enterprise 5.1.2
Server: cloudflare-nginx
CF-RAY: 3657ee19df926eff-NRT

The second problem. When I added "s.codepen.io/" to something.txt, the filter didn't work. There is a problem with the contents of something.txt and nobrfix.txt.

mas91180 commented 7 years ago

Sorry, it was my mistake.