diff --git a/app/src/main/java/io/xpipe/app/core/mode/GuiMode.java b/app/src/main/java/io/xpipe/app/core/mode/GuiMode.java index 3ad3b27df..681bc8267 100644 --- a/app/src/main/java/io/xpipe/app/core/mode/GuiMode.java +++ b/app/src/main/java/io/xpipe/app/core/mode/GuiMode.java @@ -4,6 +4,7 @@ import io.xpipe.app.core.window.AppMainWindow; import io.xpipe.app.issue.TrackEvent; import io.xpipe.app.util.PlatformThread; +import io.xpipe.core.process.OsType; import javafx.application.Platform; import javafx.stage.Stage; @@ -17,8 +18,8 @@ public class GuiMode extends PlatformMode { @Override public void onSwitchFrom() { // If we are in an externally started shutdown hook, don't close the windows until the platform exits - // That way, it is kept open to block for shutdowns - if (!OperationMode.isInShutdownHook()) { + // That way, it is kept open to block for shutdowns on Windows systems + if (OsType.getLocal() == OsType.WINDOWS && !OperationMode.isInShutdownHook()) { Platform.runLater(() -> { TrackEvent.info("Closing windows"); Stage.getWindows().stream().toList().forEach(w -> { diff --git a/app/src/main/java/io/xpipe/app/ext/LocalStore.java b/app/src/main/java/io/xpipe/app/ext/LocalStore.java index d860116d9..9120280e6 100644 --- a/app/src/main/java/io/xpipe/app/ext/LocalStore.java +++ b/app/src/main/java/io/xpipe/app/ext/LocalStore.java @@ -40,6 +40,6 @@ public class LocalStore implements NetworkTunnelStore, ShellStore, StatefulDataS @Override public NetworkTunnelSession createTunnelSession(int localPort, int remotePort, String address) { - throw new UnsupportedOperationException(); + return null; } } diff --git a/app/src/main/java/io/xpipe/app/util/DocumentationLink.java b/app/src/main/java/io/xpipe/app/util/DocumentationLink.java index 2d7ffb8f5..5fc08aabf 100644 --- a/app/src/main/java/io/xpipe/app/util/DocumentationLink.java +++ b/app/src/main/java/io/xpipe/app/util/DocumentationLink.java @@ -35,6 +35,7 @@ public enum DocumentationLink { SSH("guide/ssh"), PSSESSION("guide/pssession"), RDP("guide/rdp"), + TUNNELS("guide/ssh-tunnels"), HYPERV("guide/hyperv"), SSH_MACS("guide/ssh#no-matching-mac-found"), KEEPASSXC("guide/password-manager#keepassxc"), diff --git a/core/src/main/java/io/xpipe/core/store/NetworkTunnelSessionChain.java b/core/src/main/java/io/xpipe/core/store/NetworkTunnelSessionChain.java deleted file mode 100644 index db4cf34c3..000000000 --- a/core/src/main/java/io/xpipe/core/store/NetworkTunnelSessionChain.java +++ /dev/null @@ -1,76 +0,0 @@ -package io.xpipe.core.store; - -import io.xpipe.core.process.ShellControl; - -import java.util.List; - -public class NetworkTunnelSessionChain extends NetworkTunnelSession { - - private final List sessions; - - public NetworkTunnelSessionChain(SessionListener listener, List sessions) { - super(listener); - this.sessions = sessions; - } - - public ShellControl getShellControl() { - return sessions.getLast().getShellControl(); - } - - public int getLocalPort() { - return sessions.getFirst().getLocalPort(); - } - - @Override - public int getRemotePort() { - return sessions.getLast().getRemotePort(); - } - - @Override - public boolean isRunning() throws Exception { - for (NetworkTunnelSession session : sessions) { - if (!session.isRunning()) { - return false; - } - } - return true; - } - - @Override - public void start() throws Exception { - for (var i = 0; i < sessions.size(); i++) { - try { - sessions.get(i).start(); - } catch (Exception e) { - for (var j = 0; j < i; j++) { - var started = sessions.get(j); - try { - started.stop(); - } catch (Exception stopEx) { - e.addSuppressed(stopEx); - } - } - throw e; - } - } - } - - @Override - public void stop() throws Exception { - Exception ex = null; - for (var i = sessions.size() - 1; i >= 0; i--) { - try { - sessions.get(i).stop(); - } catch (Exception e) { - if (ex == null) { - ex = e; - } else { - ex.addSuppressed(e); - } - } - } - if (ex != null) { - throw ex; - } - } -} diff --git a/dist/changelogs/16.0.md b/dist/changelogs/16.0.md index d99c87587..0ec8326ef 100644 --- a/dist/changelogs/16.0.md +++ b/dist/changelogs/16.0.md @@ -36,7 +36,7 @@ Various improvements were made to the SSH implementation: - When the SSH password is set to none, XPipe will no longer prompt for it anyway if the preferred auth failed - The VSCode SSH remote integration has been reworked to allow more connections it to be opened in vscode. It now supports essentially all simple SSH connections, custom SSH connections, SSH config connections, and VM SSH connections. This support includes gateways - There is now the option to enable verbose ssh output to diagnose connection issues better -- For VMs, you can now choose to not use hypervisor host as SSH gateway and instead directly connect to the VM IP +- For VMs, you can now choose to not use the hypervisor host as SSH gateway and instead directly connect to the VM IP ## Category configuration @@ -81,7 +81,6 @@ The available configuration options will also be expanded in future updates. - Fix custom service commands not launching properly with PowerShell as the local shell - Fix update check being influenced by the local GitHub rate limiting - Fix some file browser terminal dock window ordering issues -- Fix repeated file browser errors when remote system did not have the stat command - Fix Windows terminal launch failing if default profile was set to launch as admin - Fix tailscale login check not opening website on Linux - Fix terminal connections failing to launch for some systems with a read-only file system @@ -89,5 +88,5 @@ The available configuration options will also be expanded in future updates. - Fix some launched applications exiting on Windows if XPipe is closed - Fix powershell profile modules potentially breaking powershell shell environments - Fix terminal launch failing on Windows when connection name contained some special characters -- Fix selfhst icons not reliably working for chinese users +- Fix selfhst icons git clone not reliably working for chinese users - Fix application restart after update not applying current workspace directory