From 85558326dff16f6562dced6efde4a4d5323e1e65 Mon Sep 17 00:00:00 2001 From: cyx20080216 <63776734+cyx20080216@users.noreply.github.com> Date: Thu, 9 Jun 2022 22:22:03 +0800 Subject: [PATCH 1/2] Do not use CFW or GAE when it is not set. (#233) --- local/ProxyHandler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/local/ProxyHandler.py b/local/ProxyHandler.py index 356fc64..91a61f6 100644 --- a/local/ProxyHandler.py +++ b/local/ProxyHandler.py @@ -1398,7 +1398,9 @@ def _set_temp_FAKECERT(self): self.badhost[host] = 1 def go_TEMPACT(self): - if GC.LISTEN_ACT == 'GAE' and self.command not in self.gae_fetcmds: + if GC.LISTEN_ACT == 'GAE' and (self.command not in self.gae_fetcmds or not GC.GAE_APPIDS): + return self.go_BAD() + elif GC.LISTEN_ACT == "CFW" and not (GC.CFW_SUBDOMAIN and GC.CFW_WORKERS or GC.CFW_WORKER): return self.go_BAD() self._set_temp_ACT() self.action = GC.LISTEN_ACTNAME From 9a4e6bfc58c808075712b2640cd80c21895f5179 Mon Sep 17 00:00:00 2001 From: cyx20080216 <63776734+cyx20080216@users.noreply.github.com> Date: Sat, 9 Jul 2022 09:16:20 +0800 Subject: [PATCH 2/2] Do not use CFW or GAE when it is not set. (#235) This is a supplement of #233 --- local/ProxyHandler.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/local/ProxyHandler.py b/local/ProxyHandler.py index 91a61f6..f5082e1 100644 --- a/local/ProxyHandler.py +++ b/local/ProxyHandler.py @@ -1412,6 +1412,10 @@ def go_FAKECERT(self): self.do_action() def go_FAKECERT_TEMPACT(self): + if GC.LISTEN_ACT == 'GAE' and (self.command not in self.gae_fetcmds or not GC.GAE_APPIDS): + return self.go_BAD() + elif GC.LISTEN_ACT == "CFW" and not (GC.CFW_SUBDOMAIN and GC.CFW_WORKERS or GC.CFW_WORKER): + return self.go_BAD() self.path = '/' self._set_temp_ACT() self._set_temp_ACT()