parent
3e97c9d028
commit
f9f2204207
2
main.go
2
main.go
@ -22,7 +22,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
const Version = "v0.2.3"
|
const Version = "v0.2.4"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
log.Fatal(Run())
|
log.Fatal(Run())
|
||||||
|
@ -309,7 +309,8 @@ func SessionDownloadEndpoint(c echo.Context) error {
|
|||||||
}
|
}
|
||||||
//remoteDir := c.Query("dir")
|
//remoteDir := c.Query("dir")
|
||||||
remoteFile := c.QueryParam("file")
|
remoteFile := c.QueryParam("file")
|
||||||
|
// 获取带后缀的文件名称
|
||||||
|
filenameWithSuffix := path.Base(remoteFile)
|
||||||
if "ssh" == session.Protocol {
|
if "ssh" == session.Protocol {
|
||||||
tun, ok := global.Store.Get(sessionId)
|
tun, ok := global.Store.Get(sessionId)
|
||||||
if !ok {
|
if !ok {
|
||||||
@ -322,8 +323,6 @@ func SessionDownloadEndpoint(c echo.Context) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defer dstFile.Close()
|
defer dstFile.Close()
|
||||||
// 获取带后缀的文件名称
|
|
||||||
filenameWithSuffix := path.Base(remoteFile)
|
|
||||||
c.Response().Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=%s", filenameWithSuffix))
|
c.Response().Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=%s", filenameWithSuffix))
|
||||||
|
|
||||||
var buff bytes.Buffer
|
var buff bytes.Buffer
|
||||||
@ -338,7 +337,7 @@ func SessionDownloadEndpoint(c echo.Context) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return c.File(path.Join(drivePath, remoteFile))
|
return c.Attachment(path.Join(drivePath, remoteFile), filenameWithSuffix)
|
||||||
}
|
}
|
||||||
|
|
||||||
return err
|
return err
|
||||||
|
@ -34,6 +34,10 @@ const (
|
|||||||
DisableOffscreenCaching = "disable-offscreen-caching"
|
DisableOffscreenCaching = "disable-offscreen-caching"
|
||||||
DisableGlyphCaching = "disable-glyph-caching"
|
DisableGlyphCaching = "disable-glyph-caching"
|
||||||
|
|
||||||
|
RemoteApp = "remote-app"
|
||||||
|
RemoteAppDir = "remote-app-dir"
|
||||||
|
RemoteAppArgs = "remote-app-args"
|
||||||
|
|
||||||
ColorDepth = "color-depth"
|
ColorDepth = "color-depth"
|
||||||
Cursor = "cursor"
|
Cursor = "cursor"
|
||||||
SwapRedBlue = "swap-red-blue"
|
SwapRedBlue = "swap-red-blue"
|
||||||
|
@ -21,7 +21,7 @@ func (r *AssetAttribute) TableName() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var SSHParameterNames = []string{guacd.FontName, guacd.FontSize, guacd.ColorScheme, guacd.Backspace, guacd.TerminalType, SshMode}
|
var SSHParameterNames = []string{guacd.FontName, guacd.FontSize, guacd.ColorScheme, guacd.Backspace, guacd.TerminalType, SshMode}
|
||||||
var RDPParameterNames = []string{guacd.EnableWallpaper, guacd.EnableTheming, guacd.EnableFontSmoothing, guacd.EnableFullWindowDrag, guacd.EnableDesktopComposition, guacd.EnableMenuAnimations, guacd.DisableBitmapCaching, guacd.DisableOffscreenCaching, guacd.DisableGlyphCaching}
|
var RDPParameterNames = []string{guacd.RemoteApp, guacd.RemoteAppDir, guacd.RemoteAppArgs}
|
||||||
var VNCParameterNames = []string{guacd.ColorDepth, guacd.Cursor, guacd.SwapRedBlue, guacd.DestHost, guacd.DestPort}
|
var VNCParameterNames = []string{guacd.ColorDepth, guacd.Cursor, guacd.SwapRedBlue, guacd.DestHost, guacd.DestPort}
|
||||||
var TelnetParameterNames = []string{guacd.FontName, guacd.FontSize, guacd.ColorScheme, guacd.Backspace, guacd.TerminalType, guacd.UsernameRegex, guacd.PasswordRegex, guacd.LoginSuccessRegex, guacd.LoginFailureRegex}
|
var TelnetParameterNames = []string{guacd.FontName, guacd.FontSize, guacd.ColorScheme, guacd.Backspace, guacd.TerminalType, guacd.UsernameRegex, guacd.PasswordRegex, guacd.LoginSuccessRegex, guacd.LoginFailureRegex}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "next-terminal",
|
"name": "next-terminal",
|
||||||
"version": "0.2.3",
|
"version": "0.2.4",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ant-design/icons": "^4.3.0",
|
"@ant-design/icons": "^4.3.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user