From d10397495e7a537f2378ff0b089dba08c3fa76a9 Mon Sep 17 00:00:00 2001 From: crschnick Date: Sat, 29 Jun 2024 06:50:01 +0000 Subject: [PATCH] Final fixes [release] [noannounce] --- README.md | 7 +- .../io/xpipe/app/resources/misc/api.md | 112 +++++++++--------- dist/changelogs/10.0.md | 28 ++--- version | 2 +- 4 files changed, 70 insertions(+), 79 deletions(-) diff --git a/README.md b/README.md index 55ae55d81..697ad15fe 100644 --- a/README.md +++ b/README.md @@ -144,7 +144,12 @@ In case you prefer to use an archive version that you can extract anywhere, you - [Linux .tar.gz Portable (x86-64)](https://github.com/xpipe-io/xpipe/releases/latest/download/xpipe-portable-linux-x86_64.tar.gz) - [Linux .tar.gz Portable (ARM 64)](https://github.com/xpipe-io/xpipe/releases/latest/download/xpipe-portable-linux-arm64.tar.gz) -Note that this assumes that you have some basic packages for graphical systems already installed +Alternatively, they are also AppImages available: + +- [Linux .AppImage Portable (x86-64)](https://github.com/xpipe-io/xpipe/releases/latest/download/xpipe-portable-linux-x86_64.AppImage) +- [Linux .AppImage Portable (ARM 64)](https://github.com/xpipe-io/xpipe/releases/latest/download/xpipe-portable-linux-arm64.AppImage) + +Note that the portable version assumes that you have some basic packages for graphical systems already installed as it is not a perfect standalone version. It should however run on most systems. ## macOS diff --git a/app/src/main/resources/io/xpipe/app/resources/misc/api.md b/app/src/main/resources/io/xpipe/app/resources/misc/api.md index 073efb50c..39bf21ae9 100644 --- a/app/src/main/resources/io/xpipe/app/resources/misc/api.md +++ b/app/src/main/resources/io/xpipe/app/resources/misc/api.md @@ -43,7 +43,7 @@ For development you can also skip the authentication step by disabling it in the Base URLs: -* http://localhost:21723 +* http://localhost:21721 Table of contents: [TOC] @@ -132,7 +132,7 @@ const headers = { 'Accept':'application/json' }; -fetch('http://localhost:21723/handshake', +fetch('http://localhost:21721/handshake', { method: 'POST', body: inputBody, @@ -165,14 +165,14 @@ data = """ } } """ -r = requests.post('http://localhost:21723/handshake', headers = headers, data = data) +r = requests.post('http://localhost:21721/handshake', headers = headers, data = data) print(r.json()) ``` ```java -var uri = URI.create("http://localhost:21723/handshake"); +var uri = URI.create("http://localhost:21721/handshake"); var client = HttpClient.newHttpClient(); var request = HttpRequest .newBuilder() @@ -214,7 +214,7 @@ func main() { } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("POST", "http://localhost:21723/handshake", data) + req, err := http.NewRequest("POST", "http://localhost:21721/handshake", data) req.Header = headers client := &http.Client{} @@ -226,7 +226,7 @@ func main() { ```shell # You can also use wget -curl -X POST http://localhost:21723/handshake \ +curl -X POST http://localhost:21721/handshake \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ --data ' { @@ -324,7 +324,7 @@ const headers = { 'Authorization':'Bearer {access-token}' }; -fetch('http://localhost:21723/connection/query', +fetch('http://localhost:21721/connection/query', { method: 'POST', body: inputBody, @@ -353,14 +353,14 @@ data = """ "typeFilter": "*" } """ -r = requests.post('http://localhost:21723/connection/query', headers = headers, data = data) +r = requests.post('http://localhost:21721/connection/query', headers = headers, data = data) print(r.json()) ``` ```java -var uri = URI.create("http://localhost:21723/connection/query"); +var uri = URI.create("http://localhost:21721/connection/query"); var client = HttpClient.newHttpClient(); var request = HttpRequest .newBuilder() @@ -399,7 +399,7 @@ func main() { } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("POST", "http://localhost:21723/connection/query", data) + req, err := http.NewRequest("POST", "http://localhost:21721/connection/query", data) req.Header = headers client := &http.Client{} @@ -411,7 +411,7 @@ func main() { ```shell # You can also use wget -curl -X POST http://localhost:21723/connection/query \ +curl -X POST http://localhost:21721/connection/query \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}' \ --data ' { @@ -515,7 +515,7 @@ const headers = { 'Authorization':'Bearer {access-token}' }; -fetch('http://localhost:21723/connection/info', +fetch('http://localhost:21721/connection/info', { method: 'POST', body: inputBody, @@ -544,14 +544,14 @@ data = """ ] } """ -r = requests.post('http://localhost:21723/connection/info', headers = headers, data = data) +r = requests.post('http://localhost:21721/connection/info', headers = headers, data = data) print(r.json()) ``` ```java -var uri = URI.create("http://localhost:21723/connection/info"); +var uri = URI.create("http://localhost:21721/connection/info"); var client = HttpClient.newHttpClient(); var request = HttpRequest .newBuilder() @@ -590,7 +590,7 @@ func main() { } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("POST", "http://localhost:21723/connection/info", data) + req, err := http.NewRequest("POST", "http://localhost:21721/connection/info", data) req.Header = headers client := &http.Client{} @@ -602,7 +602,7 @@ func main() { ```shell # You can also use wget -curl -X POST http://localhost:21723/connection/info \ +curl -X POST http://localhost:21721/connection/info \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}' \ --data ' { @@ -681,7 +681,7 @@ const headers = { 'Authorization':'Bearer {access-token}' }; -fetch('http://localhost:21723/shell/start', +fetch('http://localhost:21721/shell/start', { method: 'POST', body: inputBody, @@ -708,14 +708,14 @@ data = """ "connection": "f0ec68aa-63f5-405c-b178-9a4454556d6b" } """ -r = requests.post('http://localhost:21723/shell/start', headers = headers, data = data) +r = requests.post('http://localhost:21721/shell/start', headers = headers, data = data) print(r.json()) ``` ```java -var uri = URI.create("http://localhost:21723/shell/start"); +var uri = URI.create("http://localhost:21721/shell/start"); var client = HttpClient.newHttpClient(); var request = HttpRequest .newBuilder() @@ -752,7 +752,7 @@ func main() { } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("POST", "http://localhost:21723/shell/start", data) + req, err := http.NewRequest("POST", "http://localhost:21721/shell/start", data) req.Header = headers client := &http.Client{} @@ -764,7 +764,7 @@ func main() { ```shell # You can also use wget -curl -X POST http://localhost:21723/shell/start \ +curl -X POST http://localhost:21721/shell/start \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}' \ --data ' { @@ -841,7 +841,7 @@ const headers = { 'Authorization':'Bearer {access-token}' }; -fetch('http://localhost:21723/shell/stop', +fetch('http://localhost:21721/shell/stop', { method: 'POST', body: inputBody, @@ -868,14 +868,14 @@ data = """ "connection": "f0ec68aa-63f5-405c-b178-9a4454556d6b" } """ -r = requests.post('http://localhost:21723/shell/stop', headers = headers, data = data) +r = requests.post('http://localhost:21721/shell/stop', headers = headers, data = data) print(r.json()) ``` ```java -var uri = URI.create("http://localhost:21723/shell/stop"); +var uri = URI.create("http://localhost:21721/shell/stop"); var client = HttpClient.newHttpClient(); var request = HttpRequest .newBuilder() @@ -912,7 +912,7 @@ func main() { } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("POST", "http://localhost:21723/shell/stop", data) + req, err := http.NewRequest("POST", "http://localhost:21721/shell/stop", data) req.Header = headers client := &http.Client{} @@ -924,7 +924,7 @@ func main() { ```shell # You can also use wget -curl -X POST http://localhost:21723/shell/stop \ +curl -X POST http://localhost:21721/shell/stop \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}' \ --data ' { @@ -1022,7 +1022,7 @@ const headers = { 'Authorization':'Bearer {access-token}' }; -fetch('http://localhost:21723/shell/exec', +fetch('http://localhost:21721/shell/exec', { method: 'POST', body: inputBody, @@ -1050,14 +1050,14 @@ data = """ "command": "echo $USER" } """ -r = requests.post('http://localhost:21723/shell/exec', headers = headers, data = data) +r = requests.post('http://localhost:21721/shell/exec', headers = headers, data = data) print(r.json()) ``` ```java -var uri = URI.create("http://localhost:21723/shell/exec"); +var uri = URI.create("http://localhost:21721/shell/exec"); var client = HttpClient.newHttpClient(); var request = HttpRequest .newBuilder() @@ -1095,7 +1095,7 @@ func main() { } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("POST", "http://localhost:21723/shell/exec", data) + req, err := http.NewRequest("POST", "http://localhost:21721/shell/exec", data) req.Header = headers client := &http.Client{} @@ -1107,7 +1107,7 @@ func main() { ```shell # You can also use wget -curl -X POST http://localhost:21723/shell/exec \ +curl -X POST http://localhost:21721/shell/exec \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}' \ --data ' { @@ -1190,7 +1190,7 @@ const headers = { 'Authorization':'Bearer {access-token}' }; -fetch('http://localhost:21723/fs/blob', +fetch('http://localhost:21721/fs/blob', { method: 'POST', body: inputBody, @@ -1215,14 +1215,14 @@ headers = { data = """ string """ -r = requests.post('http://localhost:21723/fs/blob', headers = headers, data = data) +r = requests.post('http://localhost:21721/fs/blob', headers = headers, data = data) print(r.json()) ``` ```java -var uri = URI.create("http://localhost:21723/fs/blob"); +var uri = URI.create("http://localhost:21721/fs/blob"); var client = HttpClient.newHttpClient(); var request = HttpRequest .newBuilder() @@ -1257,7 +1257,7 @@ func main() { } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("POST", "http://localhost:21723/fs/blob", data) + req, err := http.NewRequest("POST", "http://localhost:21721/fs/blob", data) req.Header = headers client := &http.Client{} @@ -1269,7 +1269,7 @@ func main() { ```shell # You can also use wget -curl -X POST http://localhost:21723/fs/blob \ +curl -X POST http://localhost:21721/fs/blob \ -H 'Content-Type: application/octet-stream' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}' \ --data ' string @@ -1345,7 +1345,7 @@ const headers = { 'Authorization':'Bearer {access-token}' }; -fetch('http://localhost:21723/fs/read', +fetch('http://localhost:21721/fs/read', { method: 'POST', body: inputBody, @@ -1373,14 +1373,14 @@ data = """ "path": "/home/user/myfile.txt" } """ -r = requests.post('http://localhost:21723/fs/read', headers = headers, data = data) +r = requests.post('http://localhost:21721/fs/read', headers = headers, data = data) print(r.json()) ``` ```java -var uri = URI.create("http://localhost:21723/fs/read"); +var uri = URI.create("http://localhost:21721/fs/read"); var client = HttpClient.newHttpClient(); var request = HttpRequest .newBuilder() @@ -1418,7 +1418,7 @@ func main() { } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("POST", "http://localhost:21723/fs/read", data) + req, err := http.NewRequest("POST", "http://localhost:21721/fs/read", data) req.Header = headers client := &http.Client{} @@ -1430,7 +1430,7 @@ func main() { ```shell # You can also use wget -curl -X POST http://localhost:21723/fs/read \ +curl -X POST http://localhost:21721/fs/read \ -H 'Content-Type: application/json' \ -H 'Accept: application/octet-stream' \ -H 'Authorization: Bearer {access-token}' \ --data ' { @@ -1509,7 +1509,7 @@ const headers = { 'Authorization':'Bearer {access-token}' }; -fetch('http://localhost:21723/fs/write', +fetch('http://localhost:21721/fs/write', { method: 'POST', body: inputBody, @@ -1538,14 +1538,14 @@ data = """ "path": "/home/user/myfile.txt" } """ -r = requests.post('http://localhost:21723/fs/write', headers = headers, data = data) +r = requests.post('http://localhost:21721/fs/write', headers = headers, data = data) print(r.json()) ``` ```java -var uri = URI.create("http://localhost:21723/fs/write"); +var uri = URI.create("http://localhost:21721/fs/write"); var client = HttpClient.newHttpClient(); var request = HttpRequest .newBuilder() @@ -1584,7 +1584,7 @@ func main() { } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("POST", "http://localhost:21723/fs/write", data) + req, err := http.NewRequest("POST", "http://localhost:21721/fs/write", data) req.Header = headers client := &http.Client{} @@ -1596,7 +1596,7 @@ func main() { ```shell # You can also use wget -curl -X POST http://localhost:21723/fs/write \ +curl -X POST http://localhost:21721/fs/write \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}' \ --data ' { @@ -1684,7 +1684,7 @@ const headers = { 'Authorization':'Bearer {access-token}' }; -fetch('http://localhost:21723/fs/script', +fetch('http://localhost:21721/fs/script', { method: 'POST', body: inputBody, @@ -1712,14 +1712,14 @@ data = """ "blob": "854afc45-eadc-49a0-a45d-9fb76a484304" } """ -r = requests.post('http://localhost:21723/fs/script', headers = headers, data = data) +r = requests.post('http://localhost:21721/fs/script', headers = headers, data = data) print(r.json()) ``` ```java -var uri = URI.create("http://localhost:21723/fs/script"); +var uri = URI.create("http://localhost:21721/fs/script"); var client = HttpClient.newHttpClient(); var request = HttpRequest .newBuilder() @@ -1757,7 +1757,7 @@ func main() { } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("POST", "http://localhost:21723/fs/script", data) + req, err := http.NewRequest("POST", "http://localhost:21721/fs/script", data) req.Header = headers client := &http.Client{} @@ -1769,7 +1769,7 @@ func main() { ```shell # You can also use wget -curl -X POST http://localhost:21723/fs/script \ +curl -X POST http://localhost:21721/fs/script \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}' \ --data ' { @@ -1830,7 +1830,7 @@ const headers = { 'Authorization':'Bearer {access-token}' }; -fetch('http://localhost:21723/daemon/version', +fetch('http://localhost:21721/daemon/version', { method: 'POST', @@ -1854,14 +1854,14 @@ headers = { data = """ undefined """ -r = requests.post('http://localhost:21723/daemon/version', headers = headers, data = data) +r = requests.post('http://localhost:21721/daemon/version', headers = headers, data = data) print(r.json()) ``` ```java -var uri = URI.create("http://localhost:21723/daemon/version"); +var uri = URI.create("http://localhost:21721/daemon/version"); var client = HttpClient.newHttpClient(); var request = HttpRequest .newBuilder() @@ -1894,7 +1894,7 @@ func main() { } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("POST", "http://localhost:21723/daemon/version", data) + req, err := http.NewRequest("POST", "http://localhost:21721/daemon/version", data) req.Header = headers client := &http.Client{} @@ -1906,7 +1906,7 @@ func main() { ```shell # You can also use wget -curl -X POST http://localhost:21723/daemon/version \ +curl -X POST http://localhost:21721/daemon/version \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}' \ --data ' undefined diff --git a/dist/changelogs/10.0.md b/dist/changelogs/10.0.md index d268c2027..25037ee47 100644 --- a/dist/changelogs/10.0.md +++ b/dist/changelogs/10.0.md @@ -1,27 +1,14 @@ ## A new HTTP API -There is now a new HTTP API for the XPipe daemon, which allows you to programmatically manage remote systems. -You can find details and an OpenAPI spec at the new API button in the sidebar. -The API page contains everything you need to get started, including code samples for various different programming languages. +There is now a new HTTP API for the XPipe daemon, which allows you to programmatically manage remote systems. You can find details and an OpenAPI specification at the new API button in the sidebar. The API page contains everything you need to get started, including code samples for various different programming languages. -To start off, you can query connections based on various filters. -With the matched connections, you can start remote shell sessions for each one and run arbitrary commands in them. -You get the command exit code and output as a response, allowing you to adapt your control flow based on command outputs. -Any kind of passwords and other secrets are automatically provided by XPipe when establishing a shell connection. -You can also access the file systems via these shell connections to read and write remote files. +To start off, you can query connections based on various filters. With the matched connections, you can start remote shell sessions for each one and run arbitrary commands in them. You get the command exit code and output as a response, allowing you to adapt your control flow based on command outputs. Any kind of passwords and other secrets are automatically provided by XPipe when establishing a shell connection. You can also access the file systems via these shell connections to read and write remote files. -There already exists a community made XPipe API client for python at https://github.com/coandco/python_xpipe_client. -It allows you to interact with the API more ergonomically and can also serve as an inspiration of what you can do with the new API. +There already exists a community made [XPipe API library for python](https://github.com/coandco/python_xpipe_client) and a [python CLI client](https://github.com/coandco/xpipe_cli). These tools allow you to interact with the API more ergonomically and can also serve as an inspiration of what you can do with the new API. If you also built a tool to interact with the XPipe API, you can let me know and I can compile a list of community development projects. ## Service integration -Many systems run a variety of different services such as web services and others. -There is now support to detect, forward, and open the services. -For example, if you are running a web service on a remote container, you can automatically forward the service port via SSH tunnels, allowing you to access these services from your local machine, e.g. in a web browser. -These service tunnels can be toggled at any time. -The port forwarding supports specifying a custom local target port and also works for connections with multiple intermediate systems through chained tunnels. -For containers, services are automatically detected via their exposed mapped ports. -For other systems, you can manually add services via their port. +Many systems run a variety of different services such as web services and others. There is now support to detect, forward, and open the services. For example, if you are running a web service on a remote container, you can automatically forward the service port via SSH tunnels, allowing you to access these services from your local machine, e.g. in a web browser. These service tunnels can be toggled at any time. The port forwarding supports specifying a custom local target port and also works for connections with multiple intermediate systems through chained tunnels. For containers, services are automatically detected via their exposed mapped ports. For other systems, you can manually add services via their port. You can use an unlimited amount of local services and one active tunneled service in the community edition. @@ -38,10 +25,10 @@ If you have existing scripts, they will have to be manually adjusted by setting The docker integration has been updated to support docker contexts. You can use the default context in the community edition, essentially being the same as before as XPipe previously only used the default context. Support for using multiple contexts is included in the professional edition. -Note that old docker container connections will be removed as they are incompatible with the new version. Any other subconnections like shell environments in docker containers will persist, although they might get invalidated and will show up on the bottom of the connection list. - There's now support for Windows docker containers running on HyperV. +Note that old docker container connections will be removed as they are incompatible with the new version. + ## Proxmox improvements You can now automatically open the Proxmox dashboard website through the new service integration. This will also work with the service tunneling feature for remote servers. @@ -52,8 +39,7 @@ The Proxmox professional license requirement has been reworked to support one no ## Better connection organization -The toggle to show only running connections will now no longer actually remove the connections internally and instead just not display them. -This will reduce git vault updates and is faster in general. +The toggle to show only running connections will now no longer actually remove the connections internally and instead just not display them. This will reduce git vault updates and is faster in general. You can now order connections relative to other sibling connections. This ordering will also persist when changing the global order in the top left. diff --git a/version b/version index e490ae154..2f52450b3 100644 --- a/version +++ b/version @@ -1 +1 @@ -10.0-26 +10.0