diff options
author | Runxi Yu <me@runxiyu.org> | 2025-02-15 00:38:29 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-02-15 00:38:29 +0800 |
commit | 612a65349492306e068e0b2259510ee6648027ba (patch) | |
tree | 30addcf73a35f346773418b66bb00ed0bc0e1dff | |
parent | templates: *.html.tmpl -> *.tmpl (diff) | |
download | forge-612a65349492306e068e0b2259510ee6648027ba.tar.gz forge-612a65349492306e068e0b2259510ee6648027ba.tar.zst forge-612a65349492306e068e0b2259510ee6648027ba.zip |
ssh_server: Add link to source
-rw-r--r-- | config.go | 1 | ||||
-rw-r--r-- | forge.scfg | 1 | ||||
-rw-r--r-- | ssh_server.go | 1 |
3 files changed, 3 insertions, 0 deletions
@@ -19,6 +19,7 @@ var config struct { Net string `scfg:"net"` Addr string `scfg:"addr"` CookieExpiry int `scfg:"cookie_expiry"` + Root string `scfg:"root"` } `scfg:"http"` SSH struct { Net string `scfg:"net"` @@ -2,6 +2,7 @@ http { net tcp addr :8080 cookie_expiry 604800 + root https://forge.example.org } ssh { diff --git a/ssh_server.go b/ssh_server.go index b5882de..bddfeeb 100644 --- a/ssh_server.go +++ b/ssh_server.go @@ -42,6 +42,7 @@ func serve_ssh(listener net.Listener) error { } clog.Info("Incoming SSH: " + session.RemoteAddr().String() + " " + strings.TrimSuffix(client_public_key_string, "\n") + " " + session.RawCommand()) + fmt.Fprintln(session.Stderr(), "Lindenii Forge " + VERSION + ", source at " + strings.TrimSuffix(config.HTTP.Root, "/") + "/:/source/") cmd := session.Command() |