From 177fc87fa00e41af584eaa48b1a909403b93bcb4 Mon Sep 17 00:00:00 2001 From: Oleksander Piskun Date: Fri, 7 Mar 2025 13:43:47 +0200 Subject: [PATCH] updated "start.sh" with fix for "host" network mode Signed-off-by: Oleksander Piskun --- appinfo/info.xml | 2 +- requirements.txt | 2 +- start.sh | 23 ++++++++++++++--------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index 8d4e497..7e8ae5d 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -6,7 +6,7 @@ - 3.0.0 + 3.0.1 MIT Alexander Piskun PyAppV2_skeleton diff --git a/requirements.txt b/requirements.txt index 1d9028d..caac5a9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -nc_py_api[app]>=0.19.0 +nc_py_api[app]>=0.19.1 diff --git a/start.sh b/start.sh index e80ec05..2f2ed53 100644 --- a/start.sh +++ b/start.sh @@ -1,4 +1,7 @@ #!/bin/bash +# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: AGPL-3.0-or-later + set -e # Only create a config file if HP_SHARED_KEY is set. @@ -19,11 +22,12 @@ transport.tls.serverName = "harp.nc" metadatas.token = "$HP_SHARED_KEY" [[proxies]] -name = "$APP_ID" -type = "tcp" -localIP = "127.0.0.1" -localPort = $APP_PORT remotePort = $APP_PORT +type = "tcp" +name = "$APP_ID" +[proxies.plugin] +type = "unix_domain_socket" +unixPath = "/tmp/exapp.sock" EOF else echo "Directory /certs/frp not found. Creating configuration without TLS certificates." @@ -36,11 +40,12 @@ transport.tls.enable = false metadatas.token = "$HP_SHARED_KEY" [[proxies]] -name = "$APP_ID" -type = "tcp" -localIP = "127.0.0.1" -localPort = $APP_PORT remotePort = $APP_PORT +type = "tcp" +name = "$APP_ID" +[proxies.plugin] +type = "unix_domain_socket" +unixPath = "/tmp/exapp.sock" EOF fi else @@ -53,6 +58,6 @@ if [ -f /frpc.toml ] && [ -n "$HP_SHARED_KEY" ]; then frpc -c /frpc.toml & fi -# Start the main Python application +# Start the main application (adjust it for your ExApp) echo "Starting main application..." exec python3 main.py