def check_stats_request(self, messages): for message in messages: allowed, _ = self._timeline.check(message) if allowed: yield message else: yield DelayMessageByProof(message)
def check_debug_request(self, messages): for message in messages: # the signed source_address (in the packet payload) must be the same as the UDP source # address. this will still allow spoofing. if not message.payload.source_address == message.candidate.wan_address: yield DropMessage(message, "Phising attempt") continue allowed, _ = self._timeline.check(message) if not allowed: yield DelayMessageByProof(message) continue yield message