[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/crdt 72e2b8be12 42/44: Merge branch 'master' into devel
From: |
ELPA Syncer |
Subject: |
[elpa] externals/crdt 72e2b8be12 42/44: Merge branch 'master' into development |
Date: |
Sat, 2 Jul 2022 22:57:35 -0400 (EDT) |
branch: externals/crdt
commit 72e2b8be126d735404fb34272aae1808327e0832
Merge: 780478a090 1f1e309cd7
Author: Qiantan Hong <qhong@alum.mit.edu>
Commit: Qiantan Hong <qhong@alum.mit.edu>
Merge branch 'master' into development
---
crdt.el | 56 ++++++++++++++++++++++++++++++++++++--------------------
1 file changed, 36 insertions(+), 20 deletions(-)
diff --git a/crdt.el b/crdt.el
index baa79b2bbf..752e9cde34 100644
--- a/crdt.el
+++ b/crdt.el
@@ -127,6 +127,13 @@ See `crdt-new-session'.'"
"Alpha value for highlighting selections."
:type 'float)
+(defcustom crdt-tuntox-password-in-url nil
+ "Whether or not to include the session password in the tuntox connection URL.
+Useful if you plan to share your session URL over a trusted secure channel.
Your
+password will be in plaintext in the URL, so take care when sharing URLs with
+this option enabled."
+ :type 'boolean)
+
;;; Pseudo cursor/region utils
(defvar crdt-cursor-colors
@@ -2359,15 +2366,18 @@ Each element should be one of
(process-put network-process 'crdt-session new-session)
(push new-session crdt--session-list)
(if tuntox-p ; TODO: factor this out like `crdt-start-stunnel'
- (let ((proxy-process
- (make-process :name "Tuntox Proxy"
- :buffer (generate-new-buffer "*Tuntox Proxy*")
- :command
- `(,crdt-tuntox-executable
- "-C" ,(expand-file-name crdt-tuntox-key-path)
- "-f" "/dev/stdin" ; do the filtering for safety
sake
- ,@ (when (and password (> (length password) 0))
- `("-s" ,password))))))
+ (let* ((password-p (and password (> (length password) 0)))
+ (proxy-process
+ (make-process :name "Tuntox Proxy"
+ :buffer (generate-new-buffer "*Tuntox Proxy*")
+ :command
+ `(,crdt-tuntox-executable
+ "-C" ,(expand-file-name crdt-tuntox-key-path)
+ "-f" "/dev/stdin" ; do the filtering for
safety sake
+ ,@ (when password-p
+ `("-s" ,password))))))
+ (when password-p
+ (process-put proxy-process 'password password))
(display-buffer (process-buffer proxy-process))
(process-put network-process 'tuntox-process proxy-process)
(process-send-string proxy-process (format "127.0.0.1:%s\n" port)) ;
only allow connection to our port
@@ -2435,16 +2445,20 @@ Currently this only work if a tuntox proxy is used."
(network-process (crdt--session-network-process session))
(tuntox-process (process-get network-process 'tuntox-process)))
(if tuntox-process
- (progn
- (kill-new (format "tuntox://%s:%s"
- (with-current-buffer (process-buffer
tuntox-process)
- (save-excursion
- (goto-char (point-min))
- (search-forward "Using Tox ID: ")
- (let ((start (point)))
- (end-of-line)
- (buffer-substring-no-properties start
(point)))))
- (process-contact network-process :service)))
+ (let ((url-base (format "tuntox://%s:%s"
+ (with-current-buffer (process-buffer
tuntox-process)
+ (save-excursion
+ (goto-char (point-min))
+ (search-forward "Using Tox ID: ")
+ (let ((start (point)))
+ (end-of-line)
+ (buffer-substring-no-properties start
(point)))))
+ (process-contact network-process :service))))
+ (kill-new (if (and crdt-tuntox-password-in-url (process-get
tuntox-process 'password))
+ (format "%s?pwd=%s"
+ url-base
+ (process-get tuntox-process 'password))
+ url-base))
(message "URL copied."))
(message "No known URL to copy, find out your public IP address
yourself!"))))
@@ -2545,7 +2559,9 @@ Join with DISPLAY-NAME."
(let ((port (read-from-minibuffer (format "tuntox proxy port
(default %s): "
(1+ (url-portspec url)))
nil nil t nil (format "%s" (1+
(url-portspec url)))))
- (password (read-passwd "tuntox password (empty for no
password): ")))
+ (password (or (when (url-filename url)
+ (cadr (split-string (url-filename url)
"?pwd=")))
+ (read-passwd "tuntox password (empty for no
password): "))))
(switch-to-buffer-other-window
(process-buffer
(make-process
- [elpa] externals/crdt fae016ba25 08/44: Preliminary url support, (continued)
- [elpa] externals/crdt fae016ba25 08/44: Preliminary url support, ELPA Syncer, 2022/07/02
- [elpa] externals/crdt 28c5f6bd0e 27/44: Also `crdt--refresh-users-maybe' when `crdt-stop-follow', ELPA Syncer, 2022/07/02
- [elpa] externals/crdt f81f5297fa 28/44: Improve naming for user and buffer list, ELPA Syncer, 2022/07/02
- [elpa] externals/crdt 0743dd15f0 29/44: change `crdt--session-name' to `crdt--session-urlstr', ELPA Syncer, 2022/07/02
- [elpa] externals/crdt 9f83928758 32/44: Merge branch 'master' into development, ELPA Syncer, 2022/07/02
- [elpa] externals/crdt 7548a9420e 33/44: :name->:urlstr, and fix TLS downgrade, ELPA Syncer, 2022/07/02
- [elpa] externals/crdt 01551d66c9 34/44: Fix default theme bug and other bugs., ELPA Syncer, 2022/07/02
- [elpa] externals/crdt 949f4a1afd 37/44: reflect key binding addition in README.org, ELPA Syncer, 2022/07/02
- [elpa] externals/crdt 780478a090 39/44: Fix crdt--cycle-user bug with different buffer/window, ELPA Syncer, 2022/07/02
- [elpa] externals/crdt df8954b9c3 40/44: feat: Option to put tuntox password in copied URL, ELPA Syncer, 2022/07/02
- [elpa] externals/crdt 72e2b8be12 42/44: Merge branch 'master' into development,
ELPA Syncer <=
- [elpa] externals/crdt 3883736730 17/44: many changes, ELPA Syncer, 2022/07/02
- [elpa] externals/crdt e2b6c9ebf6 22/44: get sharing buffer from clients working, ELPA Syncer, 2022/07/02
- [elpa] externals/crdt 932566653e 23/44: TLS support by stunnel., ELPA Syncer, 2022/07/02
- [elpa] externals/crdt 282c48c47c 44/44: Revise README, ELPA Syncer, 2022/07/02
- [elpa] externals/crdt 709059ff5e 13/44: fix disconnect warn condition, ELPA Syncer, 2022/07/02
- [elpa] externals/crdt 2bc5389ba9 26/44: add `crdt-author' to default tracked text properties, ELPA Syncer, 2022/07/02
- [elpa] externals/crdt 89e3a2699d 31/44: Capitalise “Session” buffer to follow new convention, ELPA Syncer, 2022/07/02
- [elpa] externals/crdt 1f1e309cd7 41/44: Merge branch 'tuntox-password-in-url' into 'master', ELPA Syncer, 2022/07/02