Skip to content

Commit

Permalink
refactor: change waf firewall timing
Browse files Browse the repository at this point in the history
  • Loading branch information
alandtse committed Feb 25, 2021
1 parent 37207ce commit 09f490c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions teslajsonpy/teslaproxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(self, proxy_url: URL, host_url: URL) -> None:
self._config_flow_id = None
self._callback_url = None
self.waf_retry = 0
self.waf_limit = 7
self.waf_limit = 30
self.tests = {"test_url": self.test_url}

self.headers = {
Expand Down Expand Up @@ -99,7 +99,7 @@ async def test_url(
return return_timer_countdown_refresh_html(
max(30 * (self.waf_retry - self.waf_limit), 120)
if self.waf_retry > self.waf_limit
else random.random() * self.waf_retry + 10,
else random.random() * self.waf_retry + 5,
f"Detected Tesla web application firewall block #{self.waf_retry}. Please wait and then reload the page or wait for the auto reload.",
)
self.waf_retry = 0
Expand Down

0 comments on commit 09f490c

Please sign in to comment.