Repository navigation
feat(support): "Support-Paket senden" in Settings → Help - #31
Merged
Merged
Conversation
- SupportRedactor (core/common): same rules as the desktop/server
redaction — WireGuard PrivateKey/PresharedKey, Authorization /
X-API-Token / Cookie values, secret-named keys, gc_ tokens, JWTs, PEM
keys, key-like base64/hex, setup codes; unsafe keys dropped
- SupportBundleCollector (app): app/Android version, device, tunnel state
+ handshake age, settings without the API token, WireGuard config
without keys, interfaces / active network (DNS, routes), last 2000 log
lines from cacheDir/logs, recent W/E lines
- SupportBundleUploader + Retrofit endpoint (core/network): final
redaction pass, gzip JSON to POST /api/v1/client/support-bundle
- Settings: row "Support-Paket senden", confirmation dialog
("Diagnosedaten an <server> senden?" with what is included),
toast with the result; an admin request reported by the heartbeat is
highlighted in the row and sent as reason admin_request
- de/en strings, unit tests for redaction, collector, uploader and the
view model flow
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016xX1efcZF1f6G9rhmaJNLD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Android part of "Support-Paket per Knopfdruck". Server side: CallMeTechie/gatecontrol#257, contract in
docs/feature-support-bundle.mdthere. Desktop: gatecontrol-client-core#15.Changes
core/commonSupportRedactor: the same rule set as client-core and the server pass.PrivateKey/PresharedKeylines.key=value/ JSON pairs with a secret-like key.gc_…tokens, JWTs, PEM private keys, 44-char base64 keys, hex strings of 32+ chars, setup codes.redactValuemasks secret-named keys at any depth and drops__proto__/constructor/prototype. All regexes run in linear time.core/network:ApiClient.uploadSupportBundle(peerId, RequestBody)→POST api/v1/client/support-bundle.SupportBundleUploaderruns a final redaction pass, then Gson (no HTML escaping), then gzip asapplication/gzip.HeartbeatResponsegainssupportBundleRequestedandsupportBundleRequestedAt.appSupportBundleCollectorbuilds a schema 1 bundle with:client: productandroid, app version, Android version/API, device, ABI, locale;tunnel: state, connected since, last handshake age, rx/tx;settings: snapshot without the API token;network: interfaces (no MAC addresses) plus the active network's transports, DNS servers and routes;cacheDir/logs(rotated file included) and recent W/E lines.UiText, so it uses the app language).TunnelSupervisorputs the heartbeat flag intoSupportRequestHolder. The Settings row then shows "Dein Administrator hat ein Support-Paket angefordert" in the accent colour, and the dialog says so too. The upload is sent withreason: admin_requestand clears the flag. Nothing is sent without confirmation.Tests
SupportRedactorTest(8),SupportBundleUploaderTest(3, MockWebServer: path, peerId, gzip, redaction, 429 → HttpException, heartbeat model),SupportBundleCollectorTest(4: all sections, no leak of the WG key, PSK or token in the serialized JSON, log tail across rotation, request holder),SettingsViewModelTest(+5: dialog before upload, settings without the token, 429 mapping, admin request flow, not configured)../gradlew testDebugUnitTest lintDebug assembleDebug./gradlew lintRelease testFollow-up (not in this PR)
The admin request is shown only in Settings. A system notification that leads there would make it visible without opening the app.
🤖 Generated with Claude Code
https://claude.ai/code/session_016xX1efcZF1f6G9rhmaJNLD
Generated by Claude Code