summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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 ()