Small fixes

This commit is contained in:
crschnick 2023-10-14 16:13:04 +00:00
parent e34fd638a3
commit ee740b43f8
10 changed files with 56 additions and 151 deletions

View file

@ -24,10 +24,10 @@ many IDEs still have problems building this project properly.
For example, you can't build this project in eclipse or vscode as it will complain about missing modules.
The tested and recommended IDE is IntelliJ.
When setting up the project in IntelliJ, make sure that the correct JDK (Java 20)
When setting up the project in IntelliJ, make sure that the correct JDK (Java 21)
is selected both for the project and for gradle itself.
## Setup
## Development Setup
You need to have an up-to-date version of XPipe installed on your local system in order to properly
run XPipe in a development environment.
@ -81,6 +81,10 @@ Once you created your custom classes, you have to register them in your module i
All actions that you can perform for certain connections in the connection overview tab are implemented using an [Action API](https://github.com/xpipe-io/xpipe/blob/master/app/src/main/java/io/xpipe/app/ext/ActionProvider.java). You can find a sample implementation [here](https://github.com/xpipe-io/xpipe/blob/master/ext/base/src/main/java/io/xpipe/ext/base/action/SampleAction.java) and many common action implementations [here](https://github.com/xpipe-io/xpipe/tree/master/ext/base/src/main/java/io/xpipe/ext/base/action).
### Adding more predefined scripts
You can add custom script definitions [here](https://github.com/xpipe-io/xpipe/tree/master/ext/base/src/main/java/io/xpipe/ext/base/script/PredefinedScriptStore.java) and [here](https://github.com/xpipe-io/xpipe/tree/master/ext/base/src/main/resources/io/xpipe/ext/base/resources/scripts).
### Familiarising yourself with the shell and command API
The [sample action](https://github.com/xpipe-io/xpipe/blob/master/ext/base/src/main/java/io/xpipe/ext/base/action/SampleAction.java) shows the basics of working with shells and executing commands in them. For more references, just look for the usages of the [API classes](https://github.com/xpipe-io/xpipe/tree/master/core/src/main/java/io/xpipe/core/process).

119
FAQ.md
View file

@ -1,119 +0,0 @@
# Frequently asked questions
## What is so new and different about this?
Compared to other existing tools, the fundamental approach of how to
connect and how to communicate with remote systems differs.
Other tools utilize the established protocol-based approach, i.e. connect and communicate with a
server via a certain protocol like SSH, SFTP, and many more using a bundled library for that purpose.
XPipe instead utilizes a shell-based approach that works on top of command-line programs.
It exclusively interacts with your installed command-line programs via their stdout, stderr,
and stdin to handle local and remote shell connections.
This approach makes it much more flexible as it doesn't have to deal with any file system APIs, remote file handling protocols, or libraries at all as that part is delegated to your existing programs.
Let's use the example of SSH.
Protocol-based programs come with an included SSH library that allows them to interact with a remote system via SSH.
XPipe does not ship with any sort of SSH library or similar.
Instead, XPipe starts a new process using your local `ssh` executable, which is usually the OpenSSH client.
I.e. it launches the process `ssh user@host` in the background and communicates
with the opened remote shell through the stdout, stderr, stdin of the process.
From there, it detects what kind of server and environment,
e.g. shell type, os, etc. you have logged into with that shell connection,
and adjusts how it talks to the remote system from there.
It effectively delegates everything protocol and connection related to your external programs.
As a result of this approach, you can do stuff with XPipe that you can't do with other tools.
One example would be connecting and accessing files on a docker container as there's no real protocol to formally connect here by default.
XPipe can simply execute `docker exec -i <name> sh` to open a shell into the container
and handle the file management through this opened shell by sending commands like `ls`, `touch`, and more.
More broadly, XPipe can work on any shell connection, regardless of how it is established.
From its perspective, there's no visible difference between a
remote ssh connection, a shell in a docker container, or your local system shell.
If you are more interested in the implementation details,
you can read the [introduction article](https://foojay.io/today/presenting-xpipe/) on foojay.io.
## Does it run on my system?
The desktop application should run on any reasonably up-to-date Windows/Linux/macOS system that has been released in the last ten years.
In case you are running this on a very slow system, there is also a performance mode available in the settings menu to reduce the visual fidelity and make the application more responsive.
## Is this secure / Can I entrust my sensitive information to this?
Due to its nature, XPipe has to handle a lot of sensitive information like passwords, keys, and more. As security plays a very important role here, there exists a dedicated [security details page](/SECURITY.md) that should contain all relevant information for you to make your decision.
In short, all is transferred in an encrypted manner to other programs. You can choose whether you want to store sensitive information within XPipe or source it from other sources such as password managers. If you store that sensitive data in XPipe, it is also stored encrypted on your local machine. You can also set a custom master password to improve the encryption security of your data further.
## How does XPipe handle privacy?
XPipe does not collect any personal data.
The only case in which some sort of data is collected is when the built-in error reporter is used to submit a report.
This report data is limited to general system and error information, no sensitive information is submitted.
For those people who like to read legalese, there's the [privacy policy](/PRIVACY.md).
## Do I have to pay to use this effectively?
I recently decided to develop XPipe full time and hope to finance this by providing plans for professional and commercial users.
The commercialization model is designed to be very generous for personal users. If you don't use XPipe for commercial purposes, you can use it basically without any limitations for free. If you intend to use it for commercial purposes or want to support the development, you can check out the [available tiers](https://buy.xpipe.io/checkout/buy/dbcd37b8-be94-40a5-8c1c-af61979e6537).
## Which release type should I choose?
You are able to essentially get the same feature set regardless which way you choose. There are a few small exceptions, such as desktop environment integrations for your operating system that are only available with installers, however these features are not crucial to XPipe.
Especially in its early development stage, it can be pretty important to frequently distribute new releases. How exactly the update process is handled depends on your distribution:
- Installers (msi/deb/rpm/pkg): They come with the ability to automatically check for
updates, download them, and install them if you provide your confirmation.
- Portable versions (zip/tar.gz/dmg): They can check for updates and will notify you if one is available but
lack the ability to install them. You therefore have to download and extract them manually.
- Package managers: They can check for updates and will notify you if one is available
by allowing you to copy and paste the applicable package manager command in your terminal.
Note that you can choose to disable this update check functionality entirely in the settings menu.
## Does it matter which type of release I choose initially?
Not really, they all share the same configuration data locations. You can switch between different release types, e.g. from the portable version to an installer without any issues if you just want to try it out without installing.
There also exists a separate PTB (Public Test Build) release that is meant for testing out new features early on. You can find them at https://github.com/xpipe-io/xpipe-ptb if you're interested. The regular releases and PTB releases are designed to not interfere with each other and can therefore be installed and used side by side.
## How can I save/export my configuration data?
If you want to export or share the whole connection list, you can find all the data at ~/.xpipe/storage. You can also change that directory in the settings menu.
A simple solution is to change the storage directory to be in a cloud directory like OneDrive or Dropbox so it automatically synchronizes the data across all systems.
The professional version also comes with a feature to synchronize your storage with a remote git repository that you can host yourself wherever you like. This comes with the advantage of a commit history for individual connections and the ability to share this repository data with other team members using the access management of your git platform.
## Can I contribute to this project?
Yes, check out the [contribution page](/CONTRIBUTING.md) for details.
## Why are there no GitHub actions workflows in this repository?
There are several test workflows run in a private environment as they use private test connections such as remote server connections and database connections. Other private workflows are responsible for packaging, signing, and distributing the releases and are also kept private due to them handling a lot of passwords and API keys. So you can assume that the code is tested and the release is automated!
## What is the best way to reach out to the developers and other users?
You can always open a GitHub issue in this repository in case you encounter a problem. There are also several other ways to reach out, so you can choose whatever you like best:
- [XPipe Discord Server](https://discord.gg/8y89vS8cRb)
- [XPipe Slack Server](https://join.slack.com/t/XPipe/shared_invite/zt-1awjq0t5j-5i4UjNJfNe1VN4b_auu6Cg)
## What is XPipe not?
XPipe is not:
- a backup tool: It is not designed to copy large masses of files across systems reliably.
- a system management tool: While it allows you to access any remote system, it does not come with a fancy management dashboard and overview for your server infrastructure.
- a terminal emulator: XPipe is designed around integrating with your own favorite terminal and will allow you to launch any preconfigured shell connection in it. It does not come with any integrated terminal functionality itself.
- a separate protocol handling implementation: XPipe does not come with its own libraries to handle protocols, so it is not able to connect via SSH without a locally installed SSH client like OpenSSH
- an RDP/VNC client: It does not support these protocols (yet)
## What will definitely not be implemented?
While the general development direction is still very open, there are a few things that definitely won't be implemented:
- A mobile version, an app store version, and a flatpak version: The concept of integrating with your local CLI tools is incompatible with most sandboxes.

View file

@ -116,7 +116,7 @@ This mainly concerns the features only available in the professional tier and th
## Further information
You have more questions? Then check out the [FAQ](/FAQ.md).
You have more questions? Then check out the [FAQ](https://xpipe.io/faq).
For information about the security model of XPipe, see the [security page](/SECURITY.md).

View file

@ -1,5 +1,6 @@
package io.xpipe.app.browser;
import io.xpipe.app.issue.ErrorEvent;
import io.xpipe.app.util.ThreadHelper;
import io.xpipe.core.store.FileSystem;
import io.xpipe.core.util.FailableRunnable;
@ -56,7 +57,8 @@ public class BrowserClipboard {
}
currentCopyClipboard.setValue(new Instance(UUID.randomUUID(), null, entries));
} catch (IllegalStateException ignored) {
} catch (Exception e) {
ErrorEvent.fromThrowable(e).expected().omit().handle();
}
}
}));

View file

@ -9,7 +9,6 @@ import io.xpipe.app.prefs.AppPrefs;
import io.xpipe.app.update.XPipeDistributionType;
import io.xpipe.core.process.OsType;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.beans.binding.Bindings;
import javafx.stage.Stage;
import lombok.Getter;
@ -68,13 +67,6 @@ public class App extends Application {
AppWindowHelper.addIcons(stage);
}
public void close() {
Platform.runLater(() -> {
Stage.getWindows().stream().toList().forEach(w -> w.hide());
TrackEvent.debug("Closed main window");
});
}
public void setupWindow() {
var content = new AppLayoutComp();
var titleBinding = Bindings.createStringBinding(

View file

@ -1,3 +1,8 @@
## Update procedure
Note that the automatic updater is broken in version 1.6.0. It will freeze the application and not perform the update.
So you have to install it manually from https://github.com/xpipe-io/xpipe/releases/tag/1.7.0. You can easily do this as uninstalling the old version does not delete any user data.
## Changes in 1.7.0
### Scripts
@ -23,6 +28,7 @@ These colors will be shown to identify tabs everywhere within XPipe and also out
### Other changes
- Fix application not starting up or exiting properly sometimes
- Add support for bsd-based systems
- Fix OPNsense shells timing out
- Make window transparency setting a slider

Binary file not shown.

View file

@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

41
gradlew vendored
View file

@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@ -80,13 +80,11 @@ do
esac
done
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@ -133,22 +131,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@ -193,11 +198,15 @@ if "$cygwin" || "$msys" ; then
done
fi
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
@ -205,6 +214,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.

15
gradlew.bat vendored
View file

@ -14,7 +14,7 @@
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@ -25,7 +25,8 @@
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal