refactor: authenticate service websocket transport

This commit is contained in:
Kevin Yue committed 2026-07-16 20:35:46 +08:00
1 parent 3817227942
commit ce97729984
31 files changed
+3304 -441

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
#!/bin/sh
set -eu
repo=$(CDPATH= cd "$(dirname "$0")/.." && pwd)
cd "$repo"
if [ "$(id -u)" -eq 0 ]; then
echo "Run this script as the desktop user; it invokes sudo only for gpservice." >&2
exit 1
fi
uid=$(id -u)
if [ -n "${GP_DEV_BOOTSTRAP_SOCKET:-}" ]; then
socket=$GP_DEV_BOOTSTRAP_SOCKET
else
socket=/var/run/gpservice-dev-$uid/dev-bootstrap.sock
fi
cargo build -p gpservice
echo "Debug credential socket: $socket"
exec sudo target/debug/gpservice \
--dev-standalone \
--dev-uid "$uid" \
--dev-bootstrap-socket "$socket" \
"$@"