Determine if the connection to the host should be intercepted
(self, host)
| 75 | pass |
| 76 | |
| 77 | def should_intercept(self, host): |
| 78 | """ |
| 79 | Determine if the connection to the host should be intercepted |
| 80 | """ |
| 81 | if host in self.passthrough_domains: |
| 82 | return False |
| 83 | |
| 84 | if host in self.intercept_domains: |
| 85 | return True |
| 86 | |
| 87 | for d in self.intercept_domains: |
| 88 | if d.startswith("*."): |
| 89 | suffix = d[1:] |
| 90 | if host.endswith(suffix): |
| 91 | return True |
| 92 | |
| 93 | return False |
| 94 | |
| 95 | async def handle_client( |
| 96 | self, reader: asyncio.StreamReader, writer: asyncio.StreamWriter |
no outgoing calls