From f21e30b72e313ab04c70a23895d667fcfc6de002 Mon Sep 17 00:00:00 2001 From: Runciter Date: Mon, 19 May 2025 23:56:05 +0800 Subject: Add configurable extra forwardings to stealth proxy in whispers ssh. M whispers/packages/doc.scm Update ssh-tunneler-doc package to latest commit; Update whispers-doc package to latest commit M whispers/services/ssh-tunneler.scm In record type socks-proxy-configuration; Improve comments to the dynamic-forward member. M whispers/services/whispers/ssh.scm In record type whispers-forwarding; Add member stealth-extra-forwards; Use it to extend extra forwardings to proxy server sshd --- whispers/services/ssh-tunneler.scm | 3 ++- whispers/services/whispers/ssh.scm | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'whispers/services') diff --git a/whispers/services/ssh-tunneler.scm b/whispers/services/ssh-tunneler.scm index 7559336..505273e 100644 --- a/whispers/services/ssh-tunneler.scm +++ b/whispers/services/ssh-tunneler.scm @@ -294,7 +294,8 @@ (thunked)) ;; #f, or a guix record returned by a call to ;; (ssh-connection-configuration - ;; (forwards (list (dynamic-forward-configuration ...))) + ;; (forwards (list (dynamic-forward-configuration ...) + ;; ...)) ;; ...) (dynamic-forward socks-proxy-configuration-dynamic-forward (default #f))) diff --git a/whispers/services/whispers/ssh.scm b/whispers/services/whispers/ssh.scm index 8cf73ff..56d12e0 100644 --- a/whispers/services/whispers/ssh.scm +++ b/whispers/services/whispers/ssh.scm @@ -182,6 +182,9 @@ ;; An integer. (stealth-proxy-port whispers-forwarding-stealth-proxy-port (default 8585)) + ;; A list of records of type + (stealth-extra-forwards whispers-forwarding-stealth-extra-forwards + (default '())) ;; A boolean value. (%auto-start? whispers-forwarding-auto-start? (default #t))) @@ -330,6 +333,8 @@ defined by FORWARDING, a record of the type." (stealth-timeout (whispers-forwarding-stealth-timeout forwarding)) (stealth-proxy-port (whispers-forwarding-stealth-proxy-port forwarding)) + (stealth-extra-forwards (whispers-forwarding-stealth-extra-forwards + forwarding)) (stealth-strict (whispers-forwarding-stealth-strict-check forwarding)) (stealth-kh-files (whispers-forwarding-stealth-known-hosts-files @@ -396,8 +401,9 @@ defined by FORWARDING, a record of the type." (log-folder-override (log-folder-forwarding user (cadr conn))) (sshd-user stealth-sshd-user) (forwards - (list (dynamic-forward-configuration - (entry-port stealth-proxy-port)))) + (cons (dynamic-forward-configuration (entry-port + stealth-proxy-port)) + stealth-extra-forwards)) (sshd-host stealth-host) (sshd-port stealth-port) (strict-check stealth-strict) -- cgit v1.2.3