15 lines
398 B
Python
15 lines
398 B
Python
class TheIPManager:
|
|
def __init__(self):
|
|
self.always_allowed_ips = set()
|
|
|
|
# Checks
|
|
def is_client_ip_always_allowed(self, client_ip:str):
|
|
return client_ip in self.always_allowed_ips
|
|
|
|
# Add
|
|
def add_always_allowed_ip(self, client_ip:str):
|
|
self.always_allowed_ips.add(client_ip)
|
|
|
|
def update_always_allowed_ip(self, client_ips:set):
|
|
self.always_allowed_ips.update(client_ips)
|