this has taken quite a while (8 ish hours) but reports and proof of work challenges are completely implemented the proof of work challenges are bit iffy and could be gpu accelerated which is bad, so i plan to eventually switch to something memory hard like argon2id references used for pow: https://dev.to/ratmd/simple-proof-of-work-in-javascript-3kgm https://anubis.techaro.lol/docs/design/how-anubis-works https://anubis.techaro.lol/docs/design/why-proof-of-work as well as some other posts or repos found when searching
51 lines
1.8 KiB
HTML
51 lines
1.8 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>report | minibin</title>
|
|
<link rel="stylesheet" href="/css/main.css" />
|
|
<script defer src="/js/report.js"></script>
|
|
{{if .Qt}}
|
|
<style>
|
|
:root {
|
|
--qt-url: url("{{.Qt}}");
|
|
}
|
|
</style>
|
|
{{end}}
|
|
</head>
|
|
<body>
|
|
{{template "site-header"}}
|
|
|
|
<main>
|
|
<noscript class="noscript">
|
|
Javascript is required when reporting to compute a proof-of-work challenge. Without solving the challenge you cannot submit a report.
|
|
</noscript>
|
|
<form
|
|
method="post"
|
|
id="report-form"
|
|
data-challenge-difficulty="{{.Challenge.Difficulty}}"
|
|
data-challenge-expires-at="{{.Challenge.ExpiresAt}}"
|
|
data-challenge-data="{{.Challenge.Data}}"
|
|
>
|
|
<input id="pow-result" type="hidden" name="pow_result">
|
|
<input id="pow-nonce" type="hidden" name="pow_nonce">
|
|
<input type="hidden" name="pow_challenge_id" value="{{.Challenge.Id}}">
|
|
<label class="muted" for="upload_id">upload id</label>
|
|
<input type="text" name="upload_id" required>
|
|
<label class="muted" for="report_reason">reason</label>
|
|
<select class="full-dropdown" id="report-reason" name="report_reason">
|
|
{{range .ReportOptions}}
|
|
<option value="{{.}}">{{.}}</option>
|
|
{{end}}
|
|
<option value="test">test</option>
|
|
</select>
|
|
<div class="submit-container">
|
|
<button id="submit-btn" type="submit" class="btn loading" disabled>submit</button>
|
|
<span id="pow-label">computing proof of work</span>
|
|
</div>
|
|
</form>
|
|
</main>
|
|
</body>
|
|
</html>
|