Compare commits
3 Commits
codex/fetc
...
codex/fetc
| Author | SHA1 | Date | |
|---|---|---|---|
| e83f1323cd | |||
| 194b16e09c | |||
| 423e8e28ec |
@@ -1019,7 +1019,6 @@ def render_proxies_page(
|
|||||||
message: str = "",
|
message: str = "",
|
||||||
socks5_in: str = "",
|
socks5_in: str = "",
|
||||||
socks4_in: str = "",
|
socks4_in: str = "",
|
||||||
http_in: str = "",
|
|
||||||
out_text: str = "",
|
out_text: str = "",
|
||||||
export_path: str = "",
|
export_path: str = "",
|
||||||
) -> str:
|
) -> str:
|
||||||
@@ -1049,16 +1048,11 @@ def render_proxies_page(
|
|||||||
<textarea name="socks4_in" rows="6" style="width:100%; max-width:860px; padding:10px; border:1px solid #ccc; border-radius:8px;">{socks4_in}</textarea>
|
<textarea name="socks4_in" rows="6" style="width:100%; max-width:860px; padding:10px; border:1px solid #ccc; border-radius:8px;">{socks4_in}</textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<label>HTTP (ein Proxy pro Zeile, z. B. IP:PORT)</label><br/>
|
|
||||||
<textarea name="http_in" rows="6" style="width:100%; max-width:860px; padding:10px; border:1px solid #ccc; border-radius:8px;">{http_in}</textarea>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<button type="submit">In JDownloader-Format umwandeln</button>
|
<button type="submit">In JDownloader-Format umwandeln</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<h2 style="margin-top:18px;">JDownloader Import-Liste</h2>
|
<h2 style="margin-top:18px;">JDownloader Import-Liste</h2>
|
||||||
<p class="hint">Format: <code>socks5://IP:PORT</code>, <code>socks4://IP:PORT</code>, <code>http://IP:PORT</code>. Keine Prüfung/Validierung.</p>
|
<p class="hint">Format: <code>socks5://IP:PORT</code>, <code>socks4://IP:PORT</code>. Keine Prüfung/Validierung.</p>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<textarea id="out" rows="12" readonly style="width:100%; max-width:860px; padding:10px; border:1px solid #ccc; border-radius:8px;">{out_text}</textarea>
|
<textarea id="out" rows="12" readonly style="width:100%; max-width:860px; padding:10px; border:1px solid #ccc; border-radius:8px;">{out_text}</textarea>
|
||||||
@@ -1072,7 +1066,6 @@ def render_proxies_page(
|
|||||||
<form method="post" action="/proxies/save">
|
<form method="post" action="/proxies/save">
|
||||||
<textarea name="socks5_in" style="display:none;">{socks5_in}</textarea>
|
<textarea name="socks5_in" style="display:none;">{socks5_in}</textarea>
|
||||||
<textarea name="socks4_in" style="display:none;">{socks4_in}</textarea>
|
<textarea name="socks4_in" style="display:none;">{socks4_in}</textarea>
|
||||||
<textarea name="http_in" style="display:none;">{http_in}</textarea>
|
|
||||||
<button type="submit">Liste als JDProxies speichern</button>
|
<button type="submit">Liste als JDProxies speichern</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
@@ -1152,12 +1145,10 @@ def proxies_get():
|
|||||||
|
|
||||||
s5 = format_proxy_lines(socks5_in, "socks5")
|
s5 = format_proxy_lines(socks5_in, "socks5")
|
||||||
s4 = format_proxy_lines(socks4_in, "socks4")
|
s4 = format_proxy_lines(socks4_in, "socks4")
|
||||||
hp = format_proxy_lines(http_in, "http")
|
combined = "\n".join([x for x in [s5, s4] if x.strip()])
|
||||||
combined = "\n".join([x for x in [s5, s4, hp] if x.strip()])
|
|
||||||
return HTMLResponse(render_proxies_page(
|
return HTMLResponse(render_proxies_page(
|
||||||
socks5_in=socks5_in,
|
socks5_in=socks5_in,
|
||||||
socks4_in=socks4_in,
|
socks4_in=socks4_in,
|
||||||
http_in=http_in,
|
|
||||||
out_text=combined,
|
out_text=combined,
|
||||||
export_path=PROXY_EXPORT_PATH,
|
export_path=PROXY_EXPORT_PATH,
|
||||||
))
|
))
|
||||||
@@ -1168,18 +1159,15 @@ def proxies_get():
|
|||||||
def proxies_post(
|
def proxies_post(
|
||||||
socks5_in: str = Form(""),
|
socks5_in: str = Form(""),
|
||||||
socks4_in: str = Form(""),
|
socks4_in: str = Form(""),
|
||||||
http_in: str = Form(""),
|
|
||||||
):
|
):
|
||||||
try:
|
try:
|
||||||
s5 = format_proxy_lines(socks5_in, "socks5")
|
s5 = format_proxy_lines(socks5_in, "socks5")
|
||||||
s4 = format_proxy_lines(socks4_in, "socks4")
|
s4 = format_proxy_lines(socks4_in, "socks4")
|
||||||
hp = format_proxy_lines(http_in, "http")
|
|
||||||
|
|
||||||
combined = "\n".join([x for x in [s5, s4, hp] if x.strip()])
|
combined = "\n".join([x for x in [s5, s4] if x.strip()])
|
||||||
return HTMLResponse(render_proxies_page(
|
return HTMLResponse(render_proxies_page(
|
||||||
socks5_in=socks5_in,
|
socks5_in=socks5_in,
|
||||||
socks4_in=socks4_in,
|
socks4_in=socks4_in,
|
||||||
http_in=http_in,
|
|
||||||
out_text=combined,
|
out_text=combined,
|
||||||
export_path=PROXY_EXPORT_PATH,
|
export_path=PROXY_EXPORT_PATH,
|
||||||
))
|
))
|
||||||
@@ -1188,7 +1176,6 @@ def proxies_post(
|
|||||||
error=str(e),
|
error=str(e),
|
||||||
socks5_in=socks5_in,
|
socks5_in=socks5_in,
|
||||||
socks4_in=socks4_in,
|
socks4_in=socks4_in,
|
||||||
http_in=http_in,
|
|
||||||
out_text="",
|
out_text="",
|
||||||
export_path=PROXY_EXPORT_PATH,
|
export_path=PROXY_EXPORT_PATH,
|
||||||
), status_code=400)
|
), status_code=400)
|
||||||
@@ -1197,19 +1184,16 @@ def proxies_post(
|
|||||||
def proxies_save(
|
def proxies_save(
|
||||||
socks5_in: str = Form(""),
|
socks5_in: str = Form(""),
|
||||||
socks4_in: str = Form(""),
|
socks4_in: str = Form(""),
|
||||||
http_in: str = Form(""),
|
|
||||||
):
|
):
|
||||||
try:
|
try:
|
||||||
s5 = format_proxy_lines(socks5_in, "socks5")
|
s5 = format_proxy_lines(socks5_in, "socks5")
|
||||||
s4 = format_proxy_lines(socks4_in, "socks4")
|
s4 = format_proxy_lines(socks4_in, "socks4")
|
||||||
hp = format_proxy_lines(http_in, "http")
|
combined = "\n".join([x for x in [s5, s4] if x.strip()])
|
||||||
combined = "\n".join([x for x in [s5, s4, hp] if x.strip()])
|
|
||||||
export_path = save_proxy_export(combined)
|
export_path = save_proxy_export(combined)
|
||||||
return HTMLResponse(render_proxies_page(
|
return HTMLResponse(render_proxies_page(
|
||||||
message=f"Proxy-Liste gespeichert: {export_path}",
|
message=f"Proxy-Liste gespeichert: {export_path}",
|
||||||
socks5_in=socks5_in,
|
socks5_in=socks5_in,
|
||||||
socks4_in=socks4_in,
|
socks4_in=socks4_in,
|
||||||
http_in=http_in,
|
|
||||||
out_text=combined,
|
out_text=combined,
|
||||||
export_path=export_path,
|
export_path=export_path,
|
||||||
))
|
))
|
||||||
@@ -1218,7 +1202,6 @@ def proxies_save(
|
|||||||
error=str(e),
|
error=str(e),
|
||||||
socks5_in=socks5_in,
|
socks5_in=socks5_in,
|
||||||
socks4_in=socks4_in,
|
socks4_in=socks4_in,
|
||||||
http_in=http_in,
|
|
||||||
out_text="",
|
out_text="",
|
||||||
export_path=PROXY_EXPORT_PATH,
|
export_path=PROXY_EXPORT_PATH,
|
||||||
), status_code=400)
|
), status_code=400)
|
||||||
|
|||||||
Reference in New Issue
Block a user