feat(fronting-groups): bundle curated edges + UI loaders#1033
Open
dazzling-no-more wants to merge 1 commit into
Open
feat(fronting-groups): bundle curated edges + UI loaders#1033dazzling-no-more wants to merge 1 commit into
dazzling-no-more wants to merge 1 commit into
Conversation
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.
Summary
Ships a curated
fronting_groupsbundle derived frompatterniha/MITM-DomainFronting,
plus one-click loaders on the desktop and Android UIs. Coverage:
react.devSNI, 29 domains incl.vercel.*,nextjs.org,cursor.com,zeit.*)pypi.orgSNI, 40 domains incl. reddit, cnn, pinterest, buzzfeed, python, github-content)kubernetes.ioSNI, netlify)github.comSNI forgist.github.com)central.github.comSNI forobjects-origin.githubusercontent.com)Single source of truth:
assets/fronting-groups/curated.json. The desktop binaryembeds it via
include_str!; the Android APK pulls it through a Gradle Copy taskinto
build/generated/curatedAssets/(wired viasourceSets.main.assets.srcDir,so a
gradlew cleanwipes stale copies — no.gitignorecarve-out undersrc/).The example file
config.fronting-groups.example.jsonmirrors the same payloadfor CLI users; a test pins the two against drift.
The merge semantics are deliberately conservative: groups whose
namealreadyexists in the user's config are skipped (case-insensitive, trimmed). Hand-edited
entries are never overwritten.
Drive-by: Android silent-drop fix
ConfigStore.ktdidn't model
fronting_groupsat all — the Kotlin Save path silently droppedthe field on round-trip, wiping any hand-edited or imported groups when the
user hit Save. Added a
FrontingGroupdata class, thefrontingGroupsfieldon
MhrvConfig, and round-trip intoJson()/loadFromJson()/encode().Test plan
cargo test --lib curated_groups— 5/5 (parse, merge × 2, validate-curated-via-Config::load, example-mirrors-curated)gradlew :app:testDebugUnitTest— 8/8 (round-trip, empty-omitted, malformed-skipped, unknown-keys-ignored, empty-existing, name-collision, case-insensitive-with-trim, merge-is-pure)gradlew :app:compileDebugKotlincleangradlew :app:clean :app:mergeDebugAssets— confirms generated asset reaches APK atfronting-groups/curated.json(matchesCuratedGroups.ASSET_PATH)cargo check --features uiclean (lib + both binaries)Notes for reviewers
sni. Documented indocs/fronting-groups.mdand inline incurated.json's_comment.config.fronting-groups.example.jsonandassets/fronting-groups/curated.jsoncarry duplicate payloads by design — the example is for CLI users, the asset is for the embedded loader. Theexample_file_mirrors_curated_bundleRust test enforces they stay identical.android.util.Base64is stubbed in JVM unit tests; the JSON payload it wraps is the same code path the round-trip test covers.