Repository navigation
feat: Add discreet AYCD JSON export #14
Description
Problem
As an advanced workflow, proxybench inventories need to be exportable as an AYCD-compatible JSON file. The normal per-subnet .txt export must remain the default and the AYCD option should be discreet in the UI.
Proposed change
Add a secondary Export for AYCD (.json) action under the existing Export control (and in the row context menu). Do not add another permanent toolbar button. The action should support the same scope as normal export: the whole inventory or one subnet, and selected subnets once multi-selection is available.
Write one JSON array containing every proxy in scope. Each proxy must have this exact shape:
{
"id": "new UUID v4",
"allIndex": -1,
"categoryIndex": -1,
"category": "FR_192.0.2.0_24_25",
"url": "192.0.2.10",
"port": "8080",
"user": "username",
"pass": "password",
"type": "HTTP"
}Format rules:
id: a newly generated, unique UUID v4 for each exported proxy.allIndexandcategoryIndex: numeric-1.category: the exact filename stem that proxybench's normal TXT export would use for that subnet, including tags, country, network,/24marker, and quantity, but without.txt. Example: a normalresidential_FR_192.0.2.0_24_25.txtfile becomes categoryresidential_FR_192.0.2.0_24_25.url: IPv4 host only, with no scheme, credentials, or port.port: decimal port encoded as a JSON string.userandpass: parsed proxy credentials.type: always uppercaseHTTP.- Multiple subnets belong in the same JSON array; their
categoryvalues keep them separated when imported into AYCD. - Save as a
.jsonfile selected by the user. Compact or pretty JSON is acceptable as long as AYCD imports it correctly.
Keep all conversion and serialization in Rust. Never show or log credentials. Preserve the current TXT export behavior unchanged.
Acceptance checks:
- AYCD imports the generated JSON without manual edits.
- Imported AYCD category names match the TXT filenames proxybench would have produced, minus
.txt. - Whole-inventory, one-subnet, and later multi-selected-subnet exports produce the correct set of entries.
- Tests cover the exact JSON field values/types, unique UUIDs, category naming with and without tags/country, and credentials containing colons.
Alternatives considered
Manually importing each generated TXT file into AYCD works, but is repetitive and loses the convenience of one categorized import.
Scope
- This request fits proxybench's single-window proxy subnet workflow.
Activity
Mathious6 commentedon Aug 31, 2026
Implemented in #18. This PR is stacked after #17.
feat(export): add AYCD JSON format (#18)