Updated links to captcha service.

This commit is contained in:
Alexander Andreev 2022-08-23 01:05:37 +04:00
parent 0c9b295bfe
commit 9c2a1506d2
Signed by: Arav
GPG Key ID: 0388CC8FAA51063F

View File

@ -47,9 +47,10 @@ async function getProcesses() {
} }
} }
// 127.0.0.1:19322
async function getNewCaptcha() { async function getNewCaptcha() {
try { try {
return await fetch("http://127.0.0.1:19322/").then(r => r.text()); return await fetch("http://startpage.arav.home.arpa/captcha/").then(r => r.text());
} catch { } catch {
return null; return null;
} }
@ -59,7 +60,7 @@ async function solveCaptcha(id, answer) {
try { try {
let body = new URLSearchParams(); let body = new URLSearchParams();
body.append('answer', answer); body.append('answer', answer);
let result = fetch(`http://127.0.0.1:19322/${id}`, { method: "POST", body: body } ); let result = fetch(`http://startpage.arav.home.arpa/captcha/${id}`, { method: "POST", body: body } );
return await result.then(r => { return await result.then(r => {
return r.status == 200; return r.status == 200;
}); });