added compatibilty x2x

This commit is contained in:
2021-09-21 22:43:48 +04:00
parent 78462a7ab1
commit 5b2a36693d
4 changed files with 64 additions and 16 deletions

View File

@@ -53,7 +53,20 @@ func GetHttp() *http.ServeMux {
return
}
fmt.Fprintf(w, configResp.BarrierHostName)
fmt.Fprintf(w, configResp.SystemUsername)
})
//Get SSH password of the current machine
server.HandleFunc("/SSHPassword", func(w http.ResponseWriter, r *http.Request) {
// Read hostname from config file
configResp, err := config.ConfigInit()
if err != nil {
print(err)
return
}
fmt.Fprintf(w, configResp.SSHPassword)
})
server.HandleFunc("/ws_serve", func(writer http.ResponseWriter, request *http.Request) {