diff options
Diffstat (limited to '')
-rw-r--r-- | http_server.go | 4 | ||||
-rw-r--r-- | ssh_server.go | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/http_server.go b/http_server.go index 917d68c..5970cf7 100644 --- a/http_server.go +++ b/http_server.go @@ -6,11 +6,15 @@ import ( "net/http" "strconv" "strings" + + "go.lindenii.runxiyu.org/lindenii-common/clog" ) type http_router_t struct{} func (router *http_router_t) ServeHTTP(w http.ResponseWriter, r *http.Request) { + clog.Debug("Incoming HTTP: " + r.RemoteAddr + " " + r.Method + " " + r.RequestURI) + segments, _, err := parse_request_uri(r.RequestURI) if err != nil { http.Error(w, err.Error(), http.StatusBadRequest) diff --git a/ssh_server.go b/ssh_server.go index e841e65..8cea1a9 100644 --- a/ssh_server.go +++ b/ssh_server.go @@ -5,6 +5,7 @@ import ( "net" "os" "os/exec" + "strings" glider_ssh "github.com/gliderlabs/ssh" "go.lindenii.runxiyu.org/lindenii-common/clog" @@ -39,7 +40,8 @@ func serve_ssh(listener net.Listener) error { if client_public_key != nil { client_public_key_string = string(go_ssh.MarshalAuthorizedKey(client_public_key)) } - _ = client_public_key_string + + clog.Debug("Incoming SSH: " + session.RemoteAddr().String() + " " + strings.TrimSuffix(client_public_key_string, "\n") + " " + session.RawCommand()) cmd := session.Command() |