Skip to content

Commit

Permalink
Squash merge branch 15-release into master
Browse files Browse the repository at this point in the history
  • Loading branch information
crschnick committed Feb 11, 2025
1 parent c7171ce commit b494c69
Show file tree
Hide file tree
Showing 4,295 changed files with 5,439 additions and 64,654 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dev.properties
extensions.txt
dev_storage
local/
local*/
local_*/
.vs
.vscode
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ It currently supports:
- [Kubernetes](https://kubernetes.io/) clusters, pods, and containers
- [Windows Subsystem for Linux](https://ubuntu.com/wsl), [Cygwin](https://www.cygwin.com/), and [MSYS2](https://www.msys2.org/) instances
- [Powershell Remote Sessions](https://learn.microsoft.com/en-us/powershell/scripting/learn/remoting/running-remote-commands?view=powershell-7.3)
- [Teleport tsh connections](https://goteleport.com/)
- VNC connections
- Any other custom remote connection methods that work through the command-line
- [Tailscale SSH](https://tailscale.com/kb/1193/tailscale-ssh) and [Teleport](https://goteleport.com/) connections
- RDP and VNC connections

## Connection hub

Expand Down
9 changes: 7 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ dependencies {
api 'com.vladsch.flexmark:flexmark-ext-yaml-front-matter:0.64.8'
api 'com.vladsch.flexmark:flexmark-ext-toc:0.64.8'

api("com.github.weisj:jsvg:1.7.0")
api files("$rootDir/gradle/gradle_scripts/markdowngenerator-1.3.1.1.jar")
api files("$rootDir/gradle/gradle_scripts/vernacular-1.16.jar")
api 'org.bouncycastle:bcprov-jdk18on:1.79'
api 'org.bouncycastle:bcprov-jdk18on:1.80'
api 'info.picocli:picocli:4.7.6'
api ('org.kohsuke:github-api:1.326') {
exclude group: 'org.apache.commons', module: 'commons-lang3'
Expand Down Expand Up @@ -108,6 +109,8 @@ run {

def exts = files(project.allExtensions.stream().map(p -> p.getTasksByName('jar', true)[0].outputs.files.singleFile).toList());
classpath += exts

dependsOn(project.allExtensions.stream().map(p -> p.getTasksByName('jar', true)[0]).toList())
}

task runAttachedDebugger(type: JavaExec) {
Expand All @@ -118,14 +121,16 @@ task runAttachedDebugger(type: JavaExec) {
modularity.inferModulePath = true
jvmArgs += jvmRunArgs
jvmArgs += List.of(
"-javaagent:${System.getProperty("user.home")}/.attachme/attachme-agent-1.2.4.jar=port:7857,host:localhost".toString(),
"-javaagent:${System.getProperty("user.home")}/.attachme/attachme-agent-1.2.9.jar=port:7857,host:localhost".toString(),
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=127.0.0.1:0"
)
jvmArgs += ['-XX:+EnableDynamicAgentLoading']
systemProperties run.systemProperties

def exts = files(project.allExtensions.stream().map(p -> p.getTasksByName('jar', true)[0].outputs.files.singleFile).toList());
classpath += exts
dependsOn(project.allExtensions.stream().map(p -> p.getTasksByName('jar', true)[0]).toList())

}

processResources {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/io/xpipe/app/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static void main(String[] args) {
"""
The daemon executable xpiped does not accept any command-line arguments.
For a reference on what you can do from the CLI, take a look at the xpipe CLI executable instead.
For a reference on how to use xpipe from the command-line, take a look at https://docs.xpipe.io/cli.
""");
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ public Object handle(HttpExchange exchange, Request msg) throws Throwable {
throw new BeaconClientException("Parent category with id " + msg.getParent() + " does not exist");
}

var found = DataStorage.get().getStoreCategories().stream().filter(
dataStoreCategory -> msg.getParent().equals(dataStoreCategory.getParentCategory()) &&
msg.getName().equals(dataStoreCategory.getName())).findAny();
var found = DataStorage.get().getStoreCategories().stream()
.filter(dataStoreCategory -> msg.getParent().equals(dataStoreCategory.getParentCategory())
&& msg.getName().equals(dataStoreCategory.getName()))
.findAny();
if (found.isPresent()) {
return Response.builder().category(found.get().getUuid()).build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import io.xpipe.app.beacon.AppBeaconServer;
import io.xpipe.app.beacon.BlobManager;
import io.xpipe.app.ext.ConnectionFileSystem;
import io.xpipe.app.util.FixedSizeInputStream;
import io.xpipe.beacon.BeaconClientException;
import io.xpipe.beacon.api.FsReadExchange;
import io.xpipe.core.store.ConnectionFileSystem;

import com.sun.net.httpserver.HttpExchange;
import lombok.SneakyThrows;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import io.xpipe.app.beacon.AppBeaconServer;
import io.xpipe.app.beacon.BlobManager;
import io.xpipe.app.ext.ConnectionFileSystem;
import io.xpipe.beacon.api.FsWriteExchange;
import io.xpipe.core.store.ConnectionFileSystem;

import com.sun.net.httpserver.HttpExchange;
import lombok.SneakyThrows;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package io.xpipe.app.beacon.impl;

import io.xpipe.app.prefs.AppPrefs;
import io.xpipe.app.terminal.TerminalLauncherManager;
import io.xpipe.app.terminal.TerminalView;
import io.xpipe.beacon.BeaconClientException;
import io.xpipe.beacon.api.TerminalPrepareExchange;

import com.sun.net.httpserver.HttpExchange;

public class TerminalPrepareExchangeImpl extends TerminalPrepareExchange {

@Override
public Object handle(HttpExchange exchange, Request msg) throws BeaconClientException {
TerminalView.get().open(msg.getRequest(), msg.getPid());
TerminalLauncherManager.registerPid(msg.getRequest(), msg.getPid());
var term = AppPrefs.get().terminalType().getValue();
var unicode = term.supportsUnicode();
var escapes = term.supportsEscapes();
var finished = TerminalLauncherManager.isCompletedSuccessfully(msg.getRequest());
return Response.builder()
.supportsUnicode(unicode)
.supportsEscapeSequences(escapes)
.alreadyFinished(finished)
.build();
}

@Override
public boolean requiresEnabledApi() {
return false;
}
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
package io.xpipe.app.beacon.impl;

import io.xpipe.app.terminal.TerminalLauncherManager;
import io.xpipe.app.terminal.TerminalView;
import io.xpipe.beacon.BeaconClientException;
import io.xpipe.beacon.BeaconServerException;
import io.xpipe.beacon.api.TerminalWaitExchange;

import com.sun.net.httpserver.HttpExchange;

public class TerminalWaitExchangeImpl extends TerminalWaitExchange {

@Override
public Object handle(HttpExchange exchange, Request msg) throws BeaconClientException, BeaconServerException {
TerminalView.get().open(msg.getRequest(), msg.getPid());
TerminalLauncherManager.waitExchange(msg.getRequest(), msg.getPid());
TerminalLauncherManager.waitExchange(msg.getRequest());
return Response.builder().build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import io.xpipe.app.comp.base.StackComp;
import io.xpipe.app.comp.base.VerticalComp;
import io.xpipe.app.comp.store.StoreEntryWrapper;
import io.xpipe.app.core.AppFont;
import io.xpipe.app.core.AppLayoutModel;
import io.xpipe.app.ext.ShellStore;
import io.xpipe.app.storage.DataStoreEntryRef;
Expand Down Expand Up @@ -62,7 +61,6 @@ public static void openSingleFile(
});
var comp = new BrowserFileChooserSessionComp(stage, model);
comp.apply(struc -> struc.get().setPrefSize(1200, 700))
.apply(struc -> AppFont.normal(struc.get()))
.styleClass("browser")
.styleClass("chooser");
return comp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,14 @@ protected Region createSimple() {
node.setClip(null);
node.setPickOnBounds(false);
});
struc.get().lookupAll(".split-pane-divider").forEach(node -> node.setViewOrder(1));
struc.get().lookupAll(".split-pane-divider").forEach(node -> node.setViewOrder(-1));
});
}
});
});
splitPane.styleClass("browser");
return splitPane.createRegion();
var r = splitPane.createRegion();
return r;
}

private Comp<CompStructure<VBox>> createLeftSide() {
Expand Down Expand Up @@ -194,15 +195,13 @@ private StackComp createSplitStack(SimpleDoubleProperty rightSplit, BrowserSessi
struc.get().setMinWidth(rightSplit.get());
struc.get().setPrefWidth(rightSplit.get());
struc.get().setMaxWidth(rightSplit.get());
struc.get().getParent().requestLayout();
});
});

rightSplit.addListener((observable, oldValue, newValue) -> {
struc.get().setMinWidth(newValue.doubleValue());
struc.get().setPrefWidth(newValue.doubleValue());
struc.get().setMaxWidth(newValue.doubleValue());
struc.get().getParent().requestLayout();
});

AnchorPane.setBottomAnchor(struc.get(), 0.0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import io.xpipe.app.browser.file.BrowserFileSystemTabModel;
import io.xpipe.app.browser.file.BrowserHistorySavedState;
import io.xpipe.app.browser.file.BrowserHistorySavedStateImpl;
import io.xpipe.app.browser.file.BrowserHistoryTabModel;
import io.xpipe.app.browser.file.BrowserTransferModel;
import io.xpipe.app.prefs.AppPrefs;
Expand Down Expand Up @@ -189,7 +188,9 @@ public void reset() {
// Prevent blocking of shutdown
closeAsync(o);
}
BrowserHistorySavedStateImpl.get().save();
if (all.size() > 0) {
ThreadHelper.sleep(1000);
}
}

// Delete all files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public Region createSimple() {
var tabs = createTabPane();
var topBackground = Comp.hspacer().styleClass("top-spacer").createRegion();
leftPadding.subscribe(number -> {
StackPane.setMargin(topBackground, new Insets(0, 0, 0, -number.doubleValue() - 6));
StackPane.setMargin(topBackground, new Insets(0, 0, 0, -number.doubleValue() - 3));
});
var stack = new StackPane(topBackground, tabs);
stack.setAlignment(Pos.TOP_CENTER);
Expand Down Expand Up @@ -217,7 +217,8 @@ private void setupCustomStyle(TabPane tabs) {
headerArea
.paddingProperty()
.bind(Bindings.createObjectBinding(
() -> new Insets(2, 0, 4, -leftPadding.get() + 2), leftPadding));
() -> new Insets(2, 0, 4, -leftPadding.get() + 3), leftPadding));
tabs.setPadding(new Insets(0, 0, 0, -5));
headerHeight.bind(headerArea.heightProperty());
});
}
Expand Down Expand Up @@ -431,7 +432,7 @@ private Tab createTab(TabPane tabs, BrowserSessionTab tabModel) {
},
tabModel.getName(),
global,
AppPrefs.get().language(),
AppI18n.activeLanguage(),
AppPrefs.get().censorMode()));
} else {
tab.textProperty().bind(tabModel.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ public void run() {
}

List<File> data = (List<File>) clipboard.getData(DataFlavor.javaFileListFlavor);
var files = data.stream().map(f -> f.toPath()).toList();
// Sometimes file data can contain invalid chars. Why?
var files = data.stream()
.filter(file ->
file.toString().chars().noneMatch(value -> Character.isISOControl(value)))
.map(f -> f.toPath())
.toList();
if (files.size() == 0) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import io.xpipe.app.comp.base.HorizontalComp;
import io.xpipe.app.comp.store.StoreCategoryWrapper;
import io.xpipe.app.comp.store.StoreViewState;
import io.xpipe.app.core.AppFont;
import io.xpipe.app.core.AppFontSizes;
import io.xpipe.app.util.DataStoreCategoryChoiceComp;

import javafx.beans.property.Property;
Expand Down Expand Up @@ -33,14 +33,14 @@ protected Region createSimple() {
this.category)
.styleClass(Styles.LEFT_PILL)
.apply(struc -> {
AppFont.medium(struc.get());
AppFontSizes.base(struc.get());
});
var filter = new FilterComp(this.filter)
.styleClass(Styles.RIGHT_PILL)
.minWidth(0)
.hgrow()
.apply(struc -> {
AppFont.medium(struc.get());
AppFontSizes.base(struc.get());
});

var top = new HorizontalComp(List.of(category, filter))
Expand All @@ -51,6 +51,7 @@ protected Region createSimple() {
first.prefHeightProperty().bind(second.heightProperty());
first.minHeightProperty().bind(second.heightProperty());
first.maxHeightProperty().bind(second.heightProperty());
AppFontSizes.xl(struc.get());
})
.styleClass("bookmarks-header")
.createRegion();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.xpipe.app.browser.file;

import io.xpipe.app.browser.action.BrowserAction;
import io.xpipe.app.core.AppFont;
import io.xpipe.app.core.AppFontSizes;
import io.xpipe.app.util.InputHelper;

import javafx.scene.control.ContextMenu;
Expand All @@ -24,13 +24,13 @@ public BrowserContextMenu(BrowserFileSystemTabModel model, BrowserEntry source,
}

private void createMenu() {
AppFontSizes.lg(getStyleableNode());

InputHelper.onLeft(this, false, e -> {
hide();
e.consume();
});

AppFont.normal(this.getStyleableNode());

var empty = source == null;
var selected = new ArrayList<>(
empty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ private TableView<BrowserEntry> createTable() {
fileList.setComparator(table.getComparator());
return true;
});
table.setFixedCellSize(32.0);
table.setFixedCellSize(30.0);

prepareColumnVisibility(table, ownerCol, filenameCol);
prepareTableScrollFix(table);
Expand All @@ -134,7 +134,6 @@ private TableView<BrowserEntry> createTable() {
prepareTableEntries(table);
prepareTableChanges(table, filenameCol, mtimeCol, modeCol, ownerCol);
prepareTypedSelectionModel(table);

return table;
}

Expand Down Expand Up @@ -291,7 +290,7 @@ private void prepareTableSelectionModel(TableView<BrowserEntry> table) {
});

fileList.getSelection().addListener((ListChangeListener<? super BrowserEntry>) c -> {
var existing = new HashSet<>(fileList.getSelection());
var existing = new HashSet<>(table.getSelectionModel().getSelectedItems());
var toApply = new HashSet<>(c.getList());
if (existing.equals(toApply)) {
return;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package io.xpipe.app.browser.file;

import io.xpipe.app.core.window.AppWindowHelper;
import io.xpipe.app.ext.ConnectionFileSystem;
import io.xpipe.app.prefs.AppPrefs;
import io.xpipe.app.util.BooleanScope;
import io.xpipe.app.util.FileBridge;
import io.xpipe.app.util.FileOpener;
import io.xpipe.core.process.ElevationFunction;
import io.xpipe.core.process.OsType;
import io.xpipe.core.store.ConnectionFileSystem;
import io.xpipe.core.store.FileEntry;
import io.xpipe.core.store.FileInfo;
import io.xpipe.core.store.FileNames;
Expand Down Expand Up @@ -45,8 +45,8 @@ private static OutputStream openFileOutput(BrowserFileSystemTabModel model, File
return fileSystem.openOutput(file.getPath(), totalBytes);
}

var rootSc = sc.identicalSubShell()
.elevated(ElevationFunction.elevated("sudo"))
var rootSc = sc.identicalDialectSubShell()
.elevated(ElevationFunction.elevated(null))
.start();
var rootFs = new ConnectionFileSystem(rootSc);
try {
Expand Down
Loading

0 comments on commit b494c69

Please sign in to comment.