diff --git a/mitmaddon/littlesnitch.py b/mitmaddon/littlesnitch.py index 94c6a17..3eb833e 100644 --- a/mitmaddon/littlesnitch.py +++ b/mitmaddon/littlesnitch.py @@ -6,6 +6,7 @@ from queue import Queue, Empty import time import zmq import json +from enum import Enum NO_MSG = {"msg": None} INIT_MSG = {"msg": "init"} @@ -13,6 +14,12 @@ ACK_MSG = {"msg": "ack"} PING_MSG = {"msg": "ping"} PONG_MSG = {"msg": "pong"} +class NetworkState(Enum): + DISCONNECTED = auto() + CONNECTED = auto() + PING = auto() + SENDING = auto() + def convert_to_strings(obj): if isinstance(obj, dict): return {convert_to_strings(key): convert_to_strings(value)