Use ProxyScrape API for SOCKS lists and normalize single-line responses #14

Merged
DasPoschi merged 1 commits from codex/fetch-proxies-from-proxyscrape-api into main 2026-01-04 13:20:54 +00:00
DasPoschi commented 2026-01-04 13:20:40 +00:00 (Migrated from github.com)

Motivation

  • Replace brittle raw-GitHub SOCKS sources with the ProxyScrape API endpoints to improve availability and filtering.
  • Handle proxy API responses that may come back as a single whitespace-separated line by converting whitespace to newline-separated entries.

Description

  • Updated proxies_get to fetch SOCKS5 and SOCKS4 lists from the ProxyScrape API endpoints instead of the previous GitHub raw URLs.
  • Changed fetch_proxy_list to decode the response into text and normalize single-line responses by converting runs of whitespace into \n using re.sub(r"\s+", "\n", ...) when no existing newlines are present.
  • Left the HTTP proxy source and the downstream format_proxy_lines/save_proxy_export logic intact, and the changes are confined to jd-webgui/app.py.

Testing

  • No automated tests were run.

Codex Task

### Motivation - Replace brittle raw-GitHub SOCKS sources with the ProxyScrape API endpoints to improve availability and filtering. - Handle proxy API responses that may come back as a single whitespace-separated line by converting whitespace to newline-separated entries. ### Description - Updated `proxies_get` to fetch SOCKS5 and SOCKS4 lists from the ProxyScrape API endpoints instead of the previous GitHub raw URLs. - Changed `fetch_proxy_list` to decode the response into `text` and normalize single-line responses by converting runs of whitespace into `\n` using `re.sub(r"\s+", "\n", ...)` when no existing newlines are present. - Left the HTTP proxy source and the downstream `format_proxy_lines`/`save_proxy_export` logic intact, and the changes are confined to `jd-webgui/app.py`. ### Testing - No automated tests were run. ------ [Codex Task](https://chatgpt.com/codex/tasks/task_e_695a689ec3e08327b712d6f2c142fd4e)
Sign in to join this conversation.