本地开发
前置:Go 1.27+、Node 18+(仅 web 构建需要)。
git clone https://github.com/yunqilee69/OmniGate
cd OmniGate
./start.sh # 开发模式:后端 :27777 + Vite 热更新 :27778
./start.sh --prod # 生产模式:后端 + 内嵌前端 :27777
./start.sh 与用户实例完全隔离:数据库落在仓库内 data/,端口固定为 27777 / 27778,不读 ~/.omnigate。开发模式管理台走 http://localhost:27778/manage。
只编后端:
go build -o omnigate ./cmd/omnigate
只编前端(产物落到 internal/webui/dist/,由 Go 嵌入):
cd web && npm ci && npm run build
跑测试:
go test ./...
internal/webui/dist/ 不要进特性 commit——它由 npm run build 重新生成。