proxy management scripts for macos
authorAndrew Lorimer <andrew@lorimer.id.au>
Sun, 16 Sep 2018 10:53:02 +0000 (20:53 +1000)
committerAndrew Lorimer <andrew@lorimer.id.au>
Sun, 16 Sep 2018 10:53:02 +0000 (20:53 +1000)
proxyman.sh [new file with mode: 0755]
torproxy2.sh [new file with mode: 0755]
diff --git a/proxyman.sh b/proxyman.sh
new file mode 100755 (executable)
index 0000000..1ba6f85
--- /dev/null
@@ -0,0 +1,16 @@
+#! /bin/bash
+
+enable() {
+       open -a torbrowser.app
+       networksetup -setsocksfirewallproxy wi-fi localhost 9150
+       networksetup -setsocksfirewallproxystate wi-fi on
+       echo "done"
+}
+
+disable() {
+       osascript -e 'quit app "Tor Browser"'
+       networksetup -setsocksfirewallproxystate wi-fi off
+}
+
+
+$@
diff --git a/torproxy2.sh b/torproxy2.sh
new file mode 100755 (executable)
index 0000000..a826967
--- /dev/null
@@ -0,0 +1,10 @@
+#! /bin/bash
+
+enable {
+
+       tor
+       torsocks open -a "Google Chrome.app"
+
+}
+
+$@