Compare commits

..

13 Commits

Author SHA1 Message Date
be4785b04a Bypass proxies for non-download requests 2026-01-03 22:42:49 +01:00
db39f2b55e Merge pull request #11 from DasPoschi/codex/add-proxy-list-import-function-3g187r
Refresh jobs table via `/jobs` endpoint instead of full page reload
2026-01-01 22:23:09 +01:00
7443a0e0ca Merge pull request #10 from DasPoschi/codex/add-proxy-list-import-function-g3956j
Add JDProxies blacklist filters and save/export support
2026-01-01 22:12:53 +01:00
3cf7581797 Merge branch 'main' into codex/add-proxy-list-import-function-g3956j 2026-01-01 22:12:44 +01:00
e9ccb51f13 Add JDProxies blacklist filters 2026-01-01 22:12:10 +01:00
a549ba66ba Merge pull request #9 from DasPoschi/codex/add-proxy-list-import-function-q1akx1
Write JDProxies JSON export and add save endpoint/UI
2026-01-01 21:27:20 +01:00
f1267a46a1 Merge branch 'main' into codex/add-proxy-list-import-function-q1akx1 2026-01-01 21:27:13 +01:00
9baf87cc33 Write jdproxies JSON export format 2026-01-01 21:26:47 +01:00
d57948af82 Merge pull request #8 from DasPoschi/codex/add-proxy-list-import-function-p0zu8g
Export proxies as .jdproxies and add save endpoint/UI
2026-01-01 21:06:59 +01:00
93310e3d99 Merge branch 'main' into codex/add-proxy-list-import-function-p0zu8g 2026-01-01 21:06:52 +01:00
00c72a78d2 Export proxies as jdproxies file 2026-01-01 21:04:41 +01:00
2891466635 Merge pull request #7 from DasPoschi/codex/add-proxy-list-import-function
Add proxy export file support for JDownloader
2026-01-01 20:57:12 +01:00
de41769e5f Add proxy export to file for JDownloader 2026-01-01 20:56:54 +01:00

View File

@@ -60,6 +60,8 @@ PROXY_EXPORT_PATH = os.environ.get("PROXY_EXPORT_PATH", "/output/jd-proxies.jdpr
URL_RE = re.compile(r"^https?://", re.I)
NO_PROXY_OPENER = urllib.request.build_opener(urllib.request.ProxyHandler({}))
VIDEO_EXTS = {
".mkv", ".mp4", ".m4v", ".avi", ".mov", ".wmv", ".flv", ".webm",
".ts", ".m2ts", ".mts", ".mpg", ".mpeg", ".vob", ".ogv",
@@ -290,7 +292,7 @@ def remote_md5sum(ssh: paramiko.SSHClient, remote_path: str) -> str:
# ============================================================
def _http_get_json(url: str, headers: Optional[Dict[str, str]] = None) -> Any:
req = urllib.request.Request(url, headers=headers or {})
with urllib.request.urlopen(req, timeout=20) as r:
with NO_PROXY_OPENER.open(req, timeout=20) as r:
return json.loads(r.read().decode("utf-8", "replace"))
def tmdb_search_movie(query: str) -> Optional[Dict[str, Any]]:
@@ -363,7 +365,7 @@ def format_proxy_lines(raw: str, scheme: str) -> str:
def fetch_proxy_list(url: str) -> str:
req = urllib.request.Request(url)
with urllib.request.urlopen(req, timeout=20) as resp:
with NO_PROXY_OPENER.open(req, timeout=20) as resp:
return resp.read().decode("utf-8", "replace")
def build_jdproxies_payload(text: str) -> Dict[str, Any]:
@@ -527,7 +529,7 @@ def jellyfin_refresh_library():
try:
url = JELLYFIN_API_BASE + path
req = urllib.request.Request(url, headers=headers, method="POST")
with urllib.request.urlopen(req, timeout=20) as r:
with NO_PROXY_OPENER.open(req, timeout=20) as r:
_ = r.read()
return
except Exception: