Port 4ducky to Rust (Axum + SQLite)

Same design, layout, URLs and features as the PHP version: browse grid,
image view with AJAX comments, BBCode, likes, uploads (file, URL and
bookmarklet), quicktagger, profile, block list, inbox, invites, Hall of
Ducks, Truhe, abuse reports and the admin tools.

- Parameterized SQL, escaped templates (askama), argon2 passwords,
  server-side sessions, CSRF tokens on every write, strict script CSP
- SSRF-safe remote image fetching, magic-byte upload checks
- Self-hosted captcha replaces reCAPTCHA v1; analytics/social widgets removed
- Vanilla JS replaces jQuery and its plugins with the same DOM behaviour
- Reverse proxy support (frontend_path, trust_proxy, secure_cookies)
- Admin CLI: admin, settings, invites

See README.md for running it and the full list of changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-17 02:15:05 +02:00
co-authored by Claude Opus 5.5
parent 664d8c6117
commit d0f2d526df
56 changed files with 11133 additions and 0 deletions
+70
View File
@@ -0,0 +1,70 @@
{% include "header.html" %}
<br/><br/>
<table class="duckytable" align="center" width="800px" border="0" cellspacing="0" cellpadding="0">
<caption>Conversation with:</caption>
<tr>
<td width="400px" style="border-bottom: 0;">
<div class="userInfo" style=" {{ border }}">
<img class="avatar" width="60" height="60" src="/{{ avatar }}"/>
<div class="name">
<strong>
<a href="/user/{{ name_enc }}">{{ name }}</a>
</strong>
</div>
<div class="info">
ID: <strong>{{ id }}</strong> /
Images: <strong>{{ images }}</strong>
{%- if let Some(w) = website %}/
<strong><a href="{{ w }}" target="_blank">
Website
</a></strong>
{%- endif %}
<br /><br />
</div>
</div>
</td>
</tr>
</table>
<div align="center">
<div class="comment" style=" {{ border }}margin:5px; text-align:left;width:700px;color:#333">
<strong>Message to {{ name }}:</strong>
<form method="post" class="addComment" action="/inbox/{{ name_enc }}">
<div>
<input type="hidden" name="_csrf" value="{{ l.csrf }}"/>
<textarea name="content" rows="6" cols="93"></textarea><br />
<input class="submit" type="submit" name="addComment" value="Submit Message"/>
</div>
</form>
</div>
{%- for s in messages %}
<div class="comment" style=" margin:5px; text-align:left;width:700px;{{ s.border }}">
<div class="commentHead">
<a href="/user/{{ s.from_enc }}">{{ s.from_name }}</a>
at {{ s.date }}
</div>
<hr style=" {{ s.border }} width: 99%;">
{{ s.body|safe }}
</div>
{%- else %}
No messages found. <hr style="background-color:#d2d9e7;">
{%- endfor %}
</div> <br/>
{% include "footer.html" %}