Skip to content

Commit

Permalink
update pac gwflist, support remote PAC
Browse files Browse the repository at this point in the history
  • Loading branch information
xxnet committed Jul 29, 2015
1 parent f4d8a40 commit f3465ef
Show file tree
Hide file tree
Showing 3 changed files with 3,486 additions and 3,384 deletions.
7 changes: 4 additions & 3 deletions gae_proxy/local/pac_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ def update_pacfile(filename):
opener = get_opener()

listen_ip = config.LISTEN_IP
autoproxy = '%s:%s' % (listen_ip, config.LISTEN_PORT)
blackhole = '%s:%s' % (listen_ip, config.PAC_PORT)
autoproxy = gae_proxy_listen
blackhole = pac_listen
default = 'DIRECT'

if config.PAC_ADBLOCK:
Expand Down Expand Up @@ -325,7 +325,8 @@ def do_GET(self):
with open(pac_filename, 'rb') as fp:
data = fp.read()

host, _, port = self.path.rpartition(':')
host = self.headers.getheader('Host')
host, _, port = host.rpartition(":")
gae_proxy_proxy = host + ":" + str(config.LISTEN_PORT)
pac_proxy = host + ":" + str(config.PAC_PORT)
data = data.replace(gae_proxy_listen, gae_proxy_proxy)
Expand Down
2 changes: 1 addition & 1 deletion gae_proxy/local/proxy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ enable = 1
ip = 127.0.0.1
port = 8086
file = proxy.pac
gfwlist = http://autoproxy-gfwlist.googlecode.com/svn/trunk/gfwlist.txt
gfwlist = https://raw.githubusercontent.com/gfwlist/gfwlist/master/gfwlist.txt
;adblock = http://adblock-chinalist.googlecode.com/svn/trunk/adblock.txt
; this project have stopped.
expired = 86400
Expand Down
Loading

0 comments on commit f3465ef

Please sign in to comment.