- Kotlin 99.3%
- Shell 0.7%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .woodpecker | ||
| app | ||
| fastlane/metadata/android | ||
| gradle | ||
| scripts | ||
| .editorconfig | ||
| .gitignore | ||
| build.gradle.kts | ||
| distributor | ||
| distributor_ui | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| LICENSE | ||
| README.md | ||
| settings.gradle.kts | ||
Sunup - Android
UnifiedPush provider using Autopush
Usage
- Install this application
- Open it, and grant background usage without restrictions permission
- Register your application compatible with UnifiedPush (may be transparently done)
Self-host
It is possible to host your own Autopush server. Autopush is designed to work with Google BigTable but it is also possible to use it with redis.
For this:
- Clone Autopush
- Generate Fernet keys:
- Set a python virtual env, for instance:
venv .venv && . .venv/bin/activate - Install cryptography
python -m pip install cryptography - Run the generation script:
python scripts/fernet_key.py
- Set a python virtual env, for instance:
- Replace the following values in
redis-docker-compose.yml:AUTOCONNECT__CRYPTO_KEYAUTOCONNECT__ENDPOINT_SCHEMEAUTOCONNECT__ENDPOINT_HOSTNAMEAUTOCONNECT__ENDPOINT_PORTAUTOEND__CRYPTO_KEYSAUTOEND__ENDPOINT_URL
- Setup a reverse proxy to add TLS support, for instance with caddy:
# Autoconnect endpoint
push.domain.tld {
reverse_proxy 127.0.0.1:8080
}
# Autoend endpoint
updates.push.domain.tld {
reverse_proxy 127.0.0.1:8000
}
- In the android app, change server to the autoconnect endpoint (here
push.domain.tld).
Signing certificate hash
The package name along with the SHA-256 hash can be found below.
To verify the APK use the AppVerifier Android application or the apksigner tool.
org.unifiedpush.distributor.sunup
3B:33:D7:8A:5B:CA:C1:B9:52:75:6B:08:FE:88:30:CE:D3:87:AB:B6:B9:56:B0:2A:47:EF:80:32:1D:4A:2B:88
Developers
It is possible to configure a few things with build config:
| Name | Description | Default |
|---|---|---|
| DEFAULT_API_URL | Define the API Url used by default | "https://push.services.mozilla.com" |
| URGENCY | To add support for urgency requirement depending on the battery level | false until this is supported by the main server |
Debug Websocket connection
To debug the websocket connection with Autopush server, it's possible to use websocat
$ # Create reverse tcp connection from test device to our pc
$ adb reverse tcp:8081 tcp:8081
$ adb reverse tcp:8081 tcp:8081
$ # MITM the connection, and log messages
$ websocat -t log:ws-l:127.0.0.1:8081 wss://push.services.mozilla.com/
Then change <app/build.gradle.kts> DEFAULT_API_URL to http://127.0.0.1:8081.
Dependency verification
To update dependency verification:
./gradlew --write-verification-metadata pgp,sha256 --export-keys --refresh-keys help.
If some keys are ignored because they couldn't be fetched,
remove them from <ignored-keys> in <gradle/verification-metadata.xml>,
and run the previous command again.
Translations
You can contribute to translations on Weblate


