summaryrefslogtreecommitdiffhomepage
path: root/lib/net
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-10-24 00:10:40 +0100
committerjao <jao@gnu.org>2021-10-25 16:04:40 +0100
commit338d5081af3127aa98dcac368ccfbffc33a47ba7 (patch)
tree6b92e1a987cde8deb664f87ac0979ad40fa4f2a3 /lib/net
parentddaedd037d689af3e11bf2d86b7e4d32bd981c4d (diff)
downloadelibs-338d5081af3127aa98dcac368ccfbffc33a47ba7.tar.gz
elibs-338d5081af3127aa98dcac368ccfbffc33a47ba7.tar.bz2
mullvad reconnections
Diffstat (limited to 'lib/net')
-rw-r--r--lib/net/jao-mullvad.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/net/jao-mullvad.el b/lib/net/jao-mullvad.el
index f53840f..fc48221 100644
--- a/lib/net/jao-mullvad.el
+++ b/lib/net/jao-mullvad.el
@@ -34,6 +34,7 @@
(define-key map [?l] 'jao-mullvad-list)
(define-key map [?u] 'jao-mullvad-update-list)
(define-key map [?r] 'jao-mullvad-reconnect)
+ (define-key map [?R] 'jao-mullvad-set-relay)
(define-key map [?d] 'jao-mullvad-disconnect)
(define-key map [?c] 'jao-mullvad-connect)
map))
@@ -108,7 +109,7 @@
(goto-char (point-min))))))
;;;###autoload
-(defun jao-mullvad-connect ()
+(defun jao-mullvad-set-relay ()
"Choose a country and city and set them to the default relay location."
(interactive)
(let* ((cc (jao-mullvad--list))
@@ -120,10 +121,16 @@
(jao-mullvad--do (format "relay set location %s %s" cntr code)))))
;;;###autoload
+(defun jao-mullvad-connect ()
+ "Connect to mullvad VPM, with the current configuration."
+ (interactive)
+ (jao-mullvad--do "connect && sudo service postfix restart"))
+
+;;;###autoload
(defun jao-mullvad-reconnect ()
"Ask mullvad to reconnect."
(interactive)
- (jao-mullvad--do "reconnect"))
+ (jao-mullvad--do "reconnect && sudo service postfix restart"))
;;;###autoload
(defun jao-mullvad-disconnect ()