Files
thepraandClaude Opus 5.5 0dffbc27d6 The checks engine, the path and the cards: me-web? 0.1 reads the connection
MeWeb.Core runs seven checks concurrently and reports each as it settles:
online or behind a login page, this connection, the public IPv4 and IPv6
seen from v4./v6.meweb, the provider from a built-in map, the router
(UPnP IGD, NAT-PMP and PCP, read-only), address sharing (router WAN
against the echo, TTL hops only as a hint), and the history kept on the
device. The app draws the path from this device to the internet and lights
it node by node, with a card per check and a sheet listing every host it
contacts.

The provider map is iptoasn's table compressed to 2.1 MB by
tools/knowledge.cs and built before every app release; eleven Italian
provider profiles carry each fact with who said it, the source and the
month. The server gains a download page (en, it) and /download/{platform}
from the latest Gitea release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012CzABvBkbcFqoHdmi8b9WB
2026-10-15 04:39:03 +02:00

25 lines
1.3 KiB
Bash
Executable File

#!/bin/sh
set -eu
tag=$1; shift
api="${GITHUB_SERVER_URL:-https://git.thepra.dev}/api/v1/repos/$GITHUB_REPOSITORY"
call() { printf 'header = "Authorization: token %s"\n' "$RELEASE_TOKEN" | curl -K - -fsS "$@"; }
json() { python3 -c "import json,sys; d=json.load(sys.stdin); print($1)"; }
if id=$(call "$api/releases/tags/$tag" 2>/dev/null | json 'd["id"]'); then
echo "release $tag exists (id $id)"
else
notes=artifacts/release-notes.md
body=$(python3 -c 'import json,os,sys; notes=open(sys.argv[2]).read() if os.path.exists(sys.argv[2]) else ""; print(json.dumps({"tag_name": sys.argv[1], "name": sys.argv[1], "body": notes, "draft": False, "prerelease": sys.argv[1].startswith("v0.")}))' "$tag" "$notes")
id=$(call -X POST -H 'Content-Type: application/json' -d "$body" "$api/releases" | json 'd["id"]')
echo "created release $tag (id $id)"
fi
for file in "$@"; do
name=$(basename "$file")
call "$api/releases/$id/assets" | python3 -c 'import json,sys; [print(a["id"]) for a in json.load(sys.stdin) if a["name"] == sys.argv[1]]' "$name" | while read -r old; do
call -o /dev/null -X DELETE "$api/releases/$id/assets/$old"
done
call -o /dev/null -F "attachment=@$file" "$api/releases/$id/assets?name=$name"
echo "attached $name ($(du -h "$file" | cut -f1))"
done