Add proxy export file support for JDownloader #7

Merged
DasPoschi merged 1 commits from codex/add-proxy-list-import-function into main 2026-01-01 19:57:12 +00:00
DasPoschi commented 2026-01-01 19:56:55 +00:00 (Migrated from github.com)

Motivation

  • Provide an easy way to import a proxy list into JDownloader's Connection Manager by exporting a TXT file inside the container.
  • Let users fetch and normalize public proxy lists and save them in a JDownloader-compatible format for offline import.
  • Surface the export path and a success/error notification in the web UI so users know where to import from.

Description

  • Introduces PROXY_EXPORT_PATH (env var, default /output/jd-proxies.txt) and a save_proxy_export helper to write the normalized list to disk.
  • Extends the Proxies UI with a "Liste als TXT speichern" button and displays a success message and the current export path in the page via render_proxies_page.
  • Adds a new POST endpoint @app.post("/proxies/save") that formats proxies using existing format_proxy_lines and persists the combined list.
  • Adds .success CSS styling and wires the existing /proxies GET/POST flows to include the export path in the rendered page.

Testing

  • Attempted to start the web app with python -m uvicorn app:app --host 0.0.0.0 --port 8080 as a smoke test, but it failed because uvicorn is not installed in the environment.
  • No automated tests were run beyond the attempted startup, so no automated test results are available.

Codex Task

### Motivation - Provide an easy way to import a proxy list into JDownloader's Connection Manager by exporting a TXT file inside the container. - Let users fetch and normalize public proxy lists and save them in a JDownloader-compatible format for offline import. - Surface the export path and a success/error notification in the web UI so users know where to import from. ### Description - Introduces `PROXY_EXPORT_PATH` (env var, default `/output/jd-proxies.txt`) and a `save_proxy_export` helper to write the normalized list to disk. - Extends the Proxies UI with a "Liste als TXT speichern" button and displays a success message and the current export path in the page via `render_proxies_page`. - Adds a new POST endpoint `@app.post("/proxies/save")` that formats proxies using existing `format_proxy_lines` and persists the combined list. - Adds `.success` CSS styling and wires the existing `/proxies` GET/POST flows to include the export path in the rendered page. ### Testing - Attempted to start the web app with `python -m uvicorn app:app --host 0.0.0.0 --port 8080` as a smoke test, but it failed because `uvicorn` is not installed in the environment. - No automated tests were run beyond the attempted startup, so no automated test results are available. ------ [Codex Task](https://chatgpt.com/codex/tasks/task_e_6956d0cecb448327a0e08df8a3137175)
chatgpt-codex-connector[bot] (Migrated from github.com) reviewed 2026-01-01 19:58:05 +00:00
chatgpt-codex-connector[bot] (Migrated from github.com) left a comment

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

### 💡 Codex Review Here are some automated review suggestions for this pull request. <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](http://chatgpt.com/codex/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". </details>
chatgpt-codex-connector[bot] (Migrated from github.com) commented 2026-01-01 19:58:05 +00:00

P2 Badge Submit stale proxy inputs on export save

The export form posts its own hidden socks*_in fields that are populated at render time, so any edits a user makes in the visible textareas (the /proxies form above) are ignored when clicking “Liste als TXT speichern.” This means the saved TXT can differ from what the user sees/edited, which is a functional bug for the export flow; consider reusing the visible inputs (same form) or copying their current values before submit.

Useful? React with 👍 / 👎.

**<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Submit stale proxy inputs on export save** The export form posts its own hidden `socks*_in` fields that are populated at render time, so any edits a user makes in the visible textareas (the `/proxies` form above) are ignored when clicking “Liste als TXT speichern.” This means the saved TXT can differ from what the user sees/edited, which is a functional bug for the export flow; consider reusing the visible inputs (same form) or copying their current values before submit. Useful? React with 👍 / 👎.
Sign in to join this conversation.