From bb4089af6dd5a5bb05473edf3e188f9da5df50c2 Mon Sep 17 00:00:00 2001 From: Oleksander Piskun Date: Mon, 3 Mar 2025 10:07:17 +0200 Subject: [PATCH 1/2] after migrating the HaRP repository - changing the org Signed-off-by: Oleksander Piskun --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c3bac56..7ac5311 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,9 +20,9 @@ COPY --chmod=775 start.sh / RUN set -ex; \ ARCH=$(uname -m); \ if [ "$ARCH" = "aarch64" ]; then \ - FRP_URL="https://raw.githubusercontent.com/cloud-py-api/HaRP/main/exapps_dev/frp_0.61.1_linux_arm64.tar.gz"; \ + FRP_URL="https://raw.githubusercontent.com/nextcloud/HaRP/main/exapps_dev/frp_0.61.1_linux_arm64.tar.gz"; \ else \ - FRP_URL="https://raw.githubusercontent.com/cloud-py-api/HaRP/main/exapps_dev/frp_0.61.1_linux_amd64.tar.gz"; \ + FRP_URL="https://raw.githubusercontent.com/nextcloud/HaRP/main/exapps_dev/frp_0.61.1_linux_amd64.tar.gz"; \ fi; \ echo "Downloading FRP client from $FRP_URL"; \ curl -L "$FRP_URL" -o /tmp/frp.tar.gz; \ From d1f5cf8e660ae7a6e97481447a49516ada179be8 Mon Sep 17 00:00:00 2001 From: Oleksander Piskun Date: Sat, 8 Mar 2025 21:28:00 +0200 Subject: [PATCH 2/2] updated "start.sh" script with fix for "host" network mode Signed-off-by: Oleksander Piskun --- appinfo/info-latest.xml | 2 +- requirements.txt | 2 +- start.sh | 23 ++++++++++++++--------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/appinfo/info-latest.xml b/appinfo/info-latest.xml index b323255..8e62008 100644 --- a/appinfo/info-latest.xml +++ b/appinfo/info-latest.xml @@ -6,7 +6,7 @@ - 2.0.0 + 2.0.1 MIT Andrey Borysenko Alexander Piskun 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