diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 654a0e8..30eb892 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,14 +3,8 @@ name: CI on: push: branches: [master] - paths-ignore: - - 'android/**' - - '.github/workflows/android-ci.yml' pull_request: branches: [master] - paths-ignore: - - 'android/**' - - '.github/workflows/android-ci.yml' jobs: check: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index a994ba9..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: Release - -on: - push: - tags: - - 'v*' - -jobs: - build-android: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'temurin' - - - name: Setup Android SDK - uses: android-actions/setup-android@v3 - - - name: Decode keystore - env: - KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }} - run: | - echo "$KEYSTORE_BASE64" | base64 -d > android/release.keystore - - - name: Build Android APK - env: - KEYSTORE_FILE: ${{ github.workspace }}/android/release.keystore - KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} - KEY_ALIAS: sup-release - run: | - cd android - chmod +x gradlew - ./gradlew assembleRelease --no-daemon - - - name: Calculate checksums - id: checksums - run: | - APK_PATH="android/app/build/outputs/apk/release/app-release.apk" - SHA256=$(sha256sum "$APK_PATH" | awk '{print $1}') - echo "sha256=$SHA256" >> $GITHUB_OUTPUT - echo "apk_path=$APK_PATH" >> $GITHUB_OUTPUT - - - name: Create Release - uses: softprops/action-gh-release@v1 - with: - files: ${{ steps.checksums.outputs.apk_path }} - body: | - ## Android App - - **SHA256:** `${{ steps.checksums.outputs.sha256 }}` - - **Certificate Fingerprint:** - ``` - 0D:3C:99:15:0E:12:1A:DE:0D:AE:05:CB:16:46:5E:65:31:56:DC:D6:98:87:59:4E:79:B1:0D:AE:1E:56:F2:E8 - ``` - - Verify the certificate fingerprint in Obtainium before installing. - draft: false - prerelease: false - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 3b33244..ee5f2e3 100644 --- a/.gitignore +++ b/.gitignore @@ -2,11 +2,3 @@ node_modules/ signal-cli .env sup-server - -android/.gradle -android/.kotlin -android/local.properties -android/build/ -android/*/build/ -android/*.keystore -android/*.jks diff --git a/.vscode/extensions.json b/.vscode/extensions.json index d4cb04b..dbc0377 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,8 +1,3 @@ { - "recommendations": [ - "biomejs.biome", - "mathiasfrohlich.kotlin", - "vscjava.vscode-gradle", - "adelphes.android-dev-ext" - ] + "recommendations": ["biomejs.biome", "mathiasfrohlich.kotlin", "vscjava.vscode-gradle"] } diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index d5fa439..0000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "version": "2.0.0", - "tasks": [ - { - "label": "Android: Build Debug APK", - "type": "shell", - "command": "./gradlew", - "args": ["assembleDebug"], - "options": { - "cwd": "${workspaceFolder}/android" - }, - "group": { - "kind": "build", - "isDefault": true - }, - "presentation": { - "reveal": "always", - "panel": "new" - } - }, - { - "label": "Android: Install Debug APK", - "type": "shell", - "command": "./gradlew", - "args": ["installDebug"], - "options": { - "cwd": "${workspaceFolder}/android" - }, - "group": "build", - "presentation": { - "reveal": "always", - "panel": "new" - } - }, - { - "label": "Android: Clean Build", - "type": "shell", - "command": "./gradlew", - "args": ["clean", "assembleDebug"], - "options": { - "cwd": "${workspaceFolder}/android" - }, - "group": "build", - "presentation": { - "reveal": "always", - "panel": "new" - } - }, - { - "label": "Android: View Logs (Logcat)", - "type": "shell", - "command": "adb", - "args": ["logcat", "-s", "SUP:*"], - "options": { - "cwd": "${workspaceFolder}/android" - }, - "isBackground": true, - "presentation": { - "reveal": "always", - "panel": "dedicated" - } - } - ] -} diff --git a/NOTICE b/NOTICE deleted file mode 100644 index dba9421..0000000 --- a/NOTICE +++ /dev/null @@ -1,34 +0,0 @@ -# SUP - Signal Unified Push - -Copyright (c) 2026 LoneCloud - -This product includes software developed by Philipp C. Heckel (ntfy) -Licensed under the Apache License 2.0 - -The Android application (android/) contains modified code from: - ntfy-android (https://github.com/binwiederhier/ntfy-android) - Copyright (c) 2021-2024 Philipp C. Heckel - Licensed under Apache License 2.0 - -Major modifications: - -- Completely replaced HTTP/WebSocket polling with Signal-based push delivery -- Removed all user authentication, attachment downloads, and action buttons -- Removed Firebase, certificate pinning, and instant delivery features -- Simplified database schema (removed 4 tables, 17 fields) -- Removed ~1000+ lines of code for unused features -- Changed theme and branding -- Designed for privacy-focused, self-hosted personal use only - -The original ntfy-android license is included below: - -================================================================================ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - [Full Apache 2.0 license text would go here] - -================================================================================ diff --git a/README.md b/README.md index a891f6a..3f68254 100644 --- a/README.md +++ b/README.md @@ -162,8 +162,6 @@ notify: name: SUP resource: "http:///Home Assistant" method: POST - data: - package: "io.homeassistant.companion.android" headers: Authorization: !secret sup_basic_auth ``` diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 0cb00bb..c34d29b 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -10,7 +10,6 @@ services: - API_KEY=${API_KEY:-} - VERBOSE_LOGGING=${VERBOSE_LOGGING:-false} - ALLOW_INSECURE_HTTP=${ALLOW_INSECURE_HTTP:-false} - - ENABLE_ANDROID_INTEGRATION=${ENABLE_ANDROID_INTEGRATION:-false} - PROTON_IMAP_USERNAME=${PROTON_IMAP_USERNAME:-} - PROTON_IMAP_PASSWORD=${PROTON_IMAP_PASSWORD:-} - PROTON_BRIDGE_HOST=protonmail-bridge diff --git a/docker-compose.yml b/docker-compose.yml index 0e7839a..07815c3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,7 +9,6 @@ services: - VERBOSE_LOGGING=${VERBOSE_LOGGING:-false} - ALLOW_INSECURE_HTTP=${ALLOW_INSECURE_HTTP:-false} - RATE_LIMIT=${RATE_LIMIT:-100} - - ENABLE_ANDROID_INTEGRATION=${ENABLE_ANDROID_INTEGRATION:-false} - PROTON_IMAP_USERNAME=${PROTON_IMAP_USERNAME:-} - PROTON_IMAP_PASSWORD=${PROTON_IMAP_PASSWORD:-} - PROTON_BRIDGE_HOST=protonmail-bridge diff --git a/server/modules/proton-mail.ts b/server/modules/proton-mail.ts index 7d43597..df0c58c 100644 --- a/server/modules/proton-mail.ts +++ b/server/modules/proton-mail.ts @@ -35,7 +35,6 @@ async function sendNotification(from: string, subject: string) { const groupId = await getOrCreateGroup(`proton-${PROTON_SUP_TOPIC}`, PROTON_SUP_TOPIC); await sendGroupMessage(groupId, subject, { - androidPackage: 'ch.protonmail.android', title: from, }); diff --git a/server/modules/signal.ts b/server/modules/signal.ts index a84b51c..d54b283 100644 --- a/server/modules/signal.ts +++ b/server/modules/signal.ts @@ -142,7 +142,7 @@ export async function createGroup(name: string, members: string[] = []) { export async function sendGroupMessage( groupId: string, message: string, - options?: { androidPackage?: string; title?: string }, + options?: { title?: string }, ) { let formattedMessage = message; diff --git a/server/routes/ntfy.ts b/server/routes/ntfy.ts index a2c68f9..975d752 100644 --- a/server/routes/ntfy.ts +++ b/server/routes/ntfy.ts @@ -31,14 +31,11 @@ ntfy.post('/:topic', async (c) => { const contentType = c.req.header('content-type') || ''; let title: string | undefined = c.req.header('X-Title') || c.req.header('Title') || c.req.header('t') || undefined; - let androidPackage: string | undefined = - c.req.header('X-Package') || c.req.header('Package') || c.req.header('p') || undefined; if (contentType.includes('application/x-www-form-urlencoded')) { const params = new URLSearchParams(message); message = params.get('message') || message; title = title || params.get('title') || params.get('t') || undefined; - androidPackage = androidPackage || params.get('package') || params.get('p') || undefined; } if (title === topic) title = undefined; @@ -46,7 +43,6 @@ ntfy.post('/:topic', async (c) => { const groupId = await getOrCreateGroup(`ntfy-${topic}`, topic); await sendGroupMessage(groupId, message, { - androidPackage: androidPackage || undefined, title: title || undefined, });