Skip to content

Commit

Permalink
fix bug: XX-net#1166, FWD some request, but gvs ip can't work correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
xxnet committed Oct 9, 2015
1 parent 15945ce commit 99d5bcf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@

XX-Net
========
最新状态(2015.10.2): 各地情况不同,启动后需要扫描ip 十分钟到1个小时。
最新状态(2015.10.9): 各地情况不同,启动后需要扫描ip 十分钟到1个小时。
上海电信连接困难。


下载链接:
==========
测试版:
https://codeload.github.com/XX-net/XX-Net/zip/2.5.1
https://codeload.github.com/XX-net/XX-Net/zip/2.5.2

稳定版:
https://codeload.github.com/XX-net/XX-Net/zip/2.3.0
Expand Down
10 changes: 5 additions & 5 deletions gae_proxy/local/proxy_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,16 +233,16 @@ def do_CONNECT_AGENT(self):
self.path = 'https://%s%s' % (self.headers['Host'], self.path)
xlog.debug('GAE CONNECT %s %s', self.command, self.path)
if self.command not in self.gae_support_methods:
if host.endswith(".google.com") or host.endswith(config.HOSTS_FWD_ENDSWITH) or host.endswith(config.HOSTS_GAE_ENDSWITH):
if host.endswith(".google.com") or host.endswith(config.HOSTS_DIRECT_ENDSWITH) or host.endswith(config.HOSTS_GAE_ENDSWITH):
if host in config.HOSTS_GAE:
gae_set = [s for s in config.HOSTS_GAE]
gae_set.remove(host)
config.HOSTS_GAE = tuple(gae_set)
if host not in config.HOSTS_FWD:
fwd_set = [s for s in config.HOSTS_FWD]
if host not in config.HOSTS_DIRECT:
fwd_set = [s for s in config.HOSTS_DIRECT]
fwd_set.append(host)
config.HOSTS_FWD = tuple(fwd_set)
xlog.warn("Method %s not support in GAE, Redirect to FWD for %s", self.command, self.path)
config.HOSTS_DIRECT = tuple(fwd_set)
xlog.warn("Method %s not support in GAE, Redirect to DIRECT for %s", self.command, self.path)
return self.wfile.write(('HTTP/1.1 301\r\nLocation: %s\r\n\r\n' % self.path).encode())
else:
xlog.warn("Method %s not support in GAEProxy for %s", self.command, self.path)
Expand Down

0 comments on commit 99d5bcf

Please sign in to comment.