Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import&export of hosts and port forwards using Gson #1089

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Craeckie
Copy link

Fixes #527 and #922.

The hosts and port forwards are exported to the clipboard in json format. This does not include any keys.

The class HostExport is a crude workaround. Currently there is no Object-Oriented data structure that maps port forwards to hosts. If someone is willing to refactor the existing code, this class could be removed. This workaround was the simplest way I found to serialize all hosts with their respective port forwards.

@CLAassistant
Copy link

CLAassistant commented Feb 23, 2022

CLA assistant check
All committers have signed the CLA.

@Naramsim
Copy link

Any news?

@dakusan
Copy link

dakusan commented Dec 10, 2022

+1

@felfert
Copy link

felfert commented Dec 10, 2022

PLEASE somebody review this! This is such a useful feature.

@winice-test
Copy link

winice-test commented Aug 21, 2023

Thanks for this enhancement. But I found some other potential issues with this change. I have some scripts in postLogin. I can export it to clipboard. But import always fails. Here is the log for example I set "postLogin":"ssh test"

08-21 11:02:03.311 12318 12318 E MessageQueue-JNI: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unexpected value at line 1 column 117 path $[0].host.postLogin
08-21 11:02:03.311 12318 12318 E MessageQueue-JNI: at com.google.gson.Gson.fromJson(SourceFile:0)
08-21 11:02:03.311 12318 12318 E MessageQueue-JNI: at com.google.gson.Gson.fromJson(SourceFile:0)
08-21 11:02:03.311 12318 12318 E MessageQueue-JNI: at com.google.gson.Gson.fromJson(SourceFile:0)
08-21 11:02:03.311 12318 12318 E MessageQueue-JNI: at org.connectbot.HostListActivity$6.onMenuItemClick(Unknown Source:60)
08-21 11:02:03.311 12318 12318 E MessageQueue-JNI: at androidx.appcompat.view.menu.MenuItemImpl.invoke(Unknown Source:5)
08-21 11:02:03.311 12318 12318 E MessageQueue-JNI: at androidx.appcompat.view.menu.MenuBuilder.performItemAction(SourceFile:0)

@7wells
Copy link

7wells commented Feb 8, 2024

Hello!

Is there anything that I as humble user can do to support this update getting implemented?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to export/import config
7 participants