audreyann / switchy

Automatically exported from code.google.com/p/switchy
0 stars 0 forks source link

AutoProxy Compatible List does not understand all gfwlist syntax #149

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. use http://autoproxy-gfwlist.googlecode.com/svn/trunk/gfwlist.txt as 
online rule list
2. check "AutoProxy Compatible"
3. visit facebook.com

What is the expected output?
show facebook home page

What do you see instead?
strange page layout, seems some js/css from fbcdn.net does not fetched 
correctly.
when manually added fbcdn.net rule, facebook page showed okay.

Please provide any additional information below. Attach a screenshot if
possible.
fbcdn.net showed in the above gfwlist.txt as "||fbcdn.net",
facebook.com showed in gfwlist.txt as both ".facebook.com" and 
"||facebook.com".

Original issue reported on code.google.com by james.fa...@gmail.com on 8 May 2010 at 9:25

GoogleCodeExporter commented 8 years ago
my Switchy version is 1.6.3
and i tried "||flagfox.net" in gfwlist.txt, and can not open it with auto 
switching.
but i can visit flagfox with my proxy if not auto switching.

so seems to be the issue is caused by "||", and Switch does not understand it.

Original comment by james.fa...@gmail.com on 8 May 2010 at 9:30

GoogleCodeExporter commented 8 years ago
you can use this script to proxy all the request to gfwlist.
this script will automatically transform all the identifier that switchy doesnt 
understand to the form that switchy understands, and also remove all 
unnecessary codes to keep the list clean.

Usage:
just upload the script to a host or place it in your localhost, and then point 
the switchy online list path to your path.

Original comment by ayanamist on 22 Oct 2010 at 12:30

GoogleCodeExporter commented 8 years ago
just find if you use this script, all request will pass through proxy. i 
checked the final generated list file but can't find the reason. i will write 
another script to transform the list to switchy native list so to avoid this 
problem

Original comment by ayanamist on 22 Oct 2010 at 1:23

GoogleCodeExporter commented 8 years ago
well, after quite a hard work, i fix all bugs i can find in my script and i am 
happy to release it again.
USAGE is above, please see.
i must point out that the rule of autoproxy's list is quite messed-up and i can 
understand why switchy's author is not willing to support it. it's just like a 
SHIT!
here is the php script.

Original comment by ayanamist on 22 Oct 2010 at 5:46

GoogleCodeExporter commented 8 years ago
another update with the script, enhance the process with url start with dot.
still want to fuck the rule!

Original comment by ayanamist on 23 Oct 2010 at 2:57

Attachments:

GoogleCodeExporter commented 8 years ago
I met the same issue.
in my SwitchyAuto.pac file(translated from gfw list), there are below line:

if (shExpMatch(url, '*+|http://rapidscan.me*')) return 'SOCKS5
127.0.0.1:8888';

and the +| is making the rest of the rule unavailable.

for example, the twitter rule:

if (shExpMatch(url, '*.twitter.com*') || shExpMatch(url, '*twitter.com*')) 
return 'SOCKS5 127.0.0.1:8888';

if it's above the +| line, it will work, otherwise, it won't work.

Original comment by linz...@gmail.com on 30 Oct 2010 at 6:16