- Add user-docs/ VitePress site with Nothing-Inspired theme (purple brand), Space Grotesk/Mono fonts, interactive Vue Flow architecture diagrams, clean SVG feature icons (replacing emojis), and doc footer CTAs - Rewrite README with centered header, shields.io badges, feature table, Axiom-Labs attribution, and Ko-Fi support link - Add relay_server/ (renamed from companion_relay/) with updated references - Update all docs (spec, decisions, CLAUDE.md, AGENTS.md, DEVLOG.md) for Hermes Relay rename and direct API architecture - Add HERMES-WEBAPI-REFERENCE.md with full SSE event documentation - Add CHANGELOG.md, RELEASE_NOTES.md, PR template, dependabot config - Fix stale references: companion_relay → relay_server, API key now optional, SSE events updated to Hermes-native names, token field names corrected Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
37 lines
1.1 KiB
Bash
37 lines
1.1 KiB
Bash
#!/usr/bin/env bash
|
|
# Generate a self-signed TLS certificate for dev use with the relay server.
|
|
# Outputs: certs/dev.crt and certs/dev.key
|
|
# Usage: ./scripts/gen-dev-cert.sh [hostname]
|
|
|
|
set -euo pipefail
|
|
|
|
HOSTNAME="${1:-localhost}"
|
|
CERT_DIR="$(dirname "$0")/../certs"
|
|
DAYS=365
|
|
|
|
mkdir -p "$CERT_DIR"
|
|
|
|
echo "Generating self-signed cert for: $HOSTNAME"
|
|
|
|
openssl req -x509 -newkey rsa:2048 \
|
|
-keyout "$CERT_DIR/dev.key" \
|
|
-out "$CERT_DIR/dev.crt" \
|
|
-days "$DAYS" \
|
|
-nodes \
|
|
-subj "/CN=$HOSTNAME" \
|
|
-addext "subjectAltName=DNS:$HOSTNAME,DNS:localhost,IP:127.0.0.1,IP:10.0.2.2"
|
|
|
|
echo ""
|
|
echo "Certificate generated:"
|
|
echo " Cert: $CERT_DIR/dev.crt"
|
|
echo " Key: $CERT_DIR/dev.key"
|
|
echo " Valid for: $DAYS days"
|
|
echo " SANs: $HOSTNAME, localhost, 127.0.0.1, 10.0.2.2 (Android emulator host)"
|
|
echo ""
|
|
echo "Start relay with TLS:"
|
|
echo " python -m relay_server --ssl-cert certs/dev.crt --ssl-key certs/dev.key"
|
|
echo ""
|
|
echo "To trust on Android emulator:"
|
|
echo " adb push certs/dev.crt /sdcard/dev.crt"
|
|
echo " Then: Settings > Security > Install from storage"
|