diff --git a/bin/recordings/recording_1562370863/client.rbs b/bin/recordings/recording_1562370863/client.rbs new file mode 100644 index 0000000..50605b4 Binary files /dev/null and b/bin/recordings/recording_1562370863/client.rbs differ diff --git a/bin/recordings/recording_1562370863/server.rbs b/bin/recordings/recording_1562370863/server.rbs new file mode 100644 index 0000000..96eb0a9 Binary files /dev/null and b/bin/recordings/recording_1562370863/server.rbs differ diff --git a/bin/recordings/recording_1562370884/client.rbs b/bin/recordings/recording_1562370884/client.rbs new file mode 100644 index 0000000..2ee65d2 Binary files /dev/null and b/bin/recordings/recording_1562370884/client.rbs differ diff --git a/bin/recordings/recording_1562370884/server.rbs b/bin/recordings/recording_1562370884/server.rbs new file mode 100644 index 0000000..e006e24 Binary files /dev/null and b/bin/recordings/recording_1562370884/server.rbs differ diff --git a/bin/vnc_recorder b/bin/vnc_recorder index c16c001..b0cc113 100755 Binary files a/bin/vnc_recorder and b/bin/vnc_recorder differ diff --git a/vnc_rec/proxy.go b/vnc_rec/proxy.go index 69fd1e6..6a6058d 100644 --- a/vnc_rec/proxy.go +++ b/vnc_rec/proxy.go @@ -2,6 +2,7 @@ package vnc_rec import ( "net" + "os" "path" "strconv" "time" @@ -83,8 +84,10 @@ func (vp *VncProxy) newServerConnHandler(cfg *server.ServerConfig, sconn *server if session.Type == SessionTypeRecordingProxy { timeCurrent := strconv.FormatInt(time.Now().Unix(), 10) - recServerFile := "recording_server_" + timeCurrent + ".rbs" - recServerPath := path.Join(vp.RecordingDir, recServerFile) + recFolder := path.Join(vp.RecordingDir, "recording_"+timeCurrent) + os.MkdirAll(recFolder, os.ModePerm) + recServerFile := "server.rbs" + recServerPath := path.Join(recFolder, recServerFile) rec_s, err = NewServerRecorder(recServerPath) if err != nil { logger.Errorf("Proxy.newServerConnHandler can't open ServerRecorder save path: %s", recServerPath) @@ -93,8 +96,8 @@ func (vp *VncProxy) newServerConnHandler(cfg *server.ServerConfig, sconn *server sconn.Listeners.AddListener(rec_s) - recClientFile := "recording_client_" + timeCurrent + ".rbs" - recClientPath := path.Join(vp.RecordingDir, recClientFile) + recClientFile := "client.rbs" + recClientPath := path.Join(recFolder, recClientFile) rec_c, err = NewClientRecorder(recClientPath) if err != nil { logger.Errorf("Proxy.newServerConnHandler can't open ClientRecorder save path: %s", recClientPath)