From a0ae62d0a31322e1342807c2c1969d5b19f8dc78 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Tue, 3 Nov 2020 03:56:24 +0000 Subject: [PATCH] added togglenetwork module in torcontrol --- src/netcontroller/torcontrol/togglenetwork.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/netcontroller/torcontrol/togglenetwork.py diff --git a/src/netcontroller/torcontrol/togglenetwork.py b/src/netcontroller/torcontrol/togglenetwork.py new file mode 100644 index 00000000..5a74cfea --- /dev/null +++ b/src/netcontroller/torcontrol/togglenetwork.py @@ -0,0 +1,11 @@ +from . import torcontroller + + +def enable_tor_network_connection(): + with torcontroller.get_controller() as controller: + c.set_conf("DisableNetwork", 0) + + +def disable_tor_network_connection(): + with torcontroller.get_controller() as controller: + c.set_conf("DisableNetwork", 1)