Skip to content

Commit

Permalink
Merge pull request #39 from jumpserver/dev
Browse files Browse the repository at this point in the history
feat: 支持xftp
  • Loading branch information
Halo1236 authored Apr 16, 2024
2 parents 0e1e2d5 + 9444bb8 commit b134a68
Show file tree
Hide file tree
Showing 9 changed files with 95 additions and 30 deletions.
1 change: 1 addition & 0 deletions go-client/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ build-client:
GOARCH=amd64 GOOS=darwin $(CLIENTBUILD) -ldflags "$(LDFLAGS)" -o $(BUILDDIR)/darwin/client $(SSHCSRCFILE)

GOARCH=amd64 GOOS=windows $(CLIENTBUILD) -ldflags "$(LDFLAGS) -H windowsgui" -o $(BUILDDIR)/windows/JumpServerClient.exe $(CLIENTSRCFILE)
GOARCH=386 GOOS=windows $(CLIENTBUILD) -ldflags "$(LDFLAGS) -H windowsgui" -o $(BUILDDIR)/windows/JumpServerClient32.exe $(CLIENTSRCFILE)

GOARCH=amd64 GOOS=linux $(CLIENTBUILD) -ldflags "$(LDFLAGS)" -o $(BUILDDIR)/linux-amd64/JumpServerClient $(CLIENTSRCFILE)
GOARCH=amd64 GOOS=linux $(CLIENTBUILD) -ldflags "$(LDFLAGS)" -o $(BUILDDIR)/linux-amd64/client $(SSHCSRCFILE)
Expand Down
57 changes: 57 additions & 0 deletions go-client/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,25 @@
"is_internal": false,
"is_default": false,
"is_set": false
},
{
"name": "xftp",
"display_name": "Xftp",
"protocol": [
"sftp"
],
"comment": {
"zh": "Xftp是一个功能强大的SFTP、FTP 文件传输软件。",
"en": "Xftp is a powerful SFTP and FTP file transfer software."
},
"download_url": "https://www.xshell.com/zh/xftp-download/",
"type": "linux",
"path": "",
"arg_format": "-newwin {protocol}://{username}:{value}@{host}:{port}",
"match_first": [],
"is_internal": false,
"is_default": false,
"is_set": false
}
],
"databases": [
Expand Down Expand Up @@ -224,6 +243,25 @@
"is_internal": false,
"is_default": false,
"is_set": false
},
{
"name": "another_redis",
"display_name": "Another Redis Desktop Manager",
"protocol": [
"redis"
],
"comment": {
"zh": "更快、更好、更稳定的Redis桌面(GUI)管理客户端。",
"en": "A faster, better and more stable redis desktop manager."
},
"download_url": "https://github.com/qishibo/AnotherRedisDesktopManager",
"type": "databases",
"path": "",
"arg_format": "--host {host} --port {port} --auth {username}@{value}",
"match_first": [],
"is_internal": false,
"is_default": false,
"is_set": false
}
]
},
Expand Down Expand Up @@ -386,6 +424,25 @@
"is_internal": false,
"is_default": false,
"is_set": false
},
{
"name": "another_redis",
"display_name": "Another Redis Desktop Manager",
"protocol": [
"redis"
],
"comment": {
"zh": "更快、更好、更稳定的Redis桌面(GUI)管理客户端。",
"en": "A faster, better and more stable redis desktop manager."
},
"download_url": "https://github.com/qishibo/AnotherRedisDesktopManager",
"type": "databases",
"path": "/Applications/Another Redis Desktop Manager.app/Contents/MacOS/Another Redis Desktop Manager",
"arg_format": "--host {host} --port {port} --auth {username}@{value}",
"match_first": [],
"is_internal": false,
"is_default": false,
"is_set": false
}
]
},
Expand Down
48 changes: 25 additions & 23 deletions go-client/pkg/awaken/awaken_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,31 +107,33 @@ func handleDB(r *Rouse, cfg *config.AppConfig) *exec.Cmd {
connectMap["protocol"] = "mssql_jdbc_ms_new"
}
if r.Protocol == "redis" {
var conList []map[string]string
ss := make(map[string]string)
ss["host"] = r.Host
ss["port"] = strconv.Itoa(r.Port)
ss["name"] = r.getName()
ss["auth"] = r.Token.ID + "@" + r.Value
ss["ssh_agent_path"] = ""
ss["ssh_password"] = ""
ss["ssh_private_key_path"] = ""
ss["timeout_connect"] = "60000"
ss["timeout_execute"] = "60000"
conList = append(conList, ss)
if appItem.Name == "resp" {
var conList []map[string]string
ss := make(map[string]string)
ss["host"] = r.Host
ss["port"] = strconv.Itoa(r.Port)
ss["name"] = r.getName()
ss["auth"] = r.Token.ID + "@" + r.Value
ss["ssh_agent_path"] = ""
ss["ssh_password"] = ""
ss["ssh_private_key_path"] = ""
ss["timeout_connect"] = "60000"
ss["timeout_execute"] = "60000"
conList = append(conList, ss)

bjson, _ := json.Marshal(conList)
currentPath := filepath.Dir(os.Args[0])
rdmPath := filepath.Join(currentPath, ".rdm")
EnsureDirExist(rdmPath)
filePath := filepath.Join(rdmPath, "connections.json")
global.LOG.Error(filePath)
err := ioutil.WriteFile(filePath, bjson, os.ModePerm)
if err != nil {
global.LOG.Error(err.Error())
return nil
bjson, _ := json.Marshal(conList)
currentPath := filepath.Dir(os.Args[0])
rdmPath := filepath.Join(currentPath, ".rdm")
EnsureDirExist(rdmPath)
filePath := filepath.Join(rdmPath, "connections.json")
global.LOG.Error(filePath)
err := ioutil.WriteFile(filePath, bjson, os.ModePerm)
if err != nil {
global.LOG.Error(err.Error())
return nil
}
connectMap["config_file"] = currentPath
}
connectMap["config_file"] = currentPath
}
commands := getCommandFromArgs(connectMap, appItem.ArgFormat)
if strings.Contains(commands, "*") {
Expand Down
7 changes: 5 additions & 2 deletions interface/build/win/installer.nsh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
WriteRegStr HKCR "jms" "URL Protocol" ""
WriteRegStr HKCR "jms\shell" "" ""
WriteRegStr HKCR "jms\shell\open" "" ""
WriteRegStr HKCR "jms\shell\open\command" "" '"$INSTDIR\resources\bin\windows\JumpServerClient.exe" "%1"'

${If} ${RunningX64}
WriteRegStr HKCR "jms\shell\open\command" "" '"$INSTDIR\resources\bin\windows\JumpServerClient.exe" "%1"'
${else}
WriteRegStr HKCR "jms\shell\open\command" "" '"$INSTDIR\resources\bin\windows\JumpServerClient32.exe" "%1"'
${EndIf}
AccessControl::GrantOnFile \
"$INSTDIR\resources\bin" "(BU)" "GenericWrite + GenericRead"
Pop $R0
Expand Down
2 changes: 1 addition & 1 deletion interface/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jumpserver-client",
"author": "Fit2Cloud Technology Co., Ltd.; <[email protected]>",
"version": "v2.1.1",
"version": "v2.1.3",
"homepage": "https://jumpserver.org",
"private": true,
"scripts": {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added interface/src/renderer/assets/xftp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions interface/src/renderer/pages/About.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<div>
<img id="logo" src="@/assets/JumpServer.png" alt=""/>
<p>{{ $t('Common.JumpServerClient') }}</p>
<p>{{ $t('AboutUs.Version') }}:v2.1.1</p>
<p>{{ $t('AboutUs.Copyright') }}:FIT2CLOUD 飞致云 © 2014-2023 {{ $t('AboutUs.AllRightsReserved')}}</p>
<p>{{ $t('AboutUs.Version') }}:v2.1.3</p>
<p>{{ $t('AboutUs.Copyright') }}:FIT2CLOUD 飞致云 © 2014-2024 {{ $t('AboutUs.AllRightsReserved')}}</p>
<a target="_blank" href="https://www.fit2cloud.com/jumpserver/index.html">{{ $t('AboutUs.OfficialWebsite') }}</a>
<a target="_blank" href="https://docs.jumpserver.org/zh/v3/">{{ $t('AboutUs.OnlineDocumentation') }}</a>
<a target="_blank" href="https://kb.fit2cloud.com/categories/jumpserver">{{ $t('AboutUs.KnowledgeBase') }}</a>
Expand Down
6 changes: 4 additions & 2 deletions interface/vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,14 @@ module.exports = {
target: [{
target: 'nsis',
arch: [
'x64'
'x64',
'ia32'
]
},{
target: 'msiWrapped',
arch: [
'x64'
'x64',
'ia32'
]
}]
},
Expand Down

0 comments on commit b134a68

Please sign in to comment.