Files
secgate-vpn-docker/Makefile
T
yuez 150c33ea85 refactor: 移除命令行版镜像(过不了二次认证)
CLI 端在开启二次认证的网关上没有输入入口,认证必被拒绝,镜像没有保留价值,
只留图形端。

- 删除 Dockerfile.cli、log-cli/、runtime-cli/、vendor/Ubuntu_SDWANClient_Setup.deb(.sha256)
- docker-compose.yml: 去掉 secgate-cli service 与 cli profile
- Makefile: 去掉 cli-fetch/cli-build/cli-up/cli-login/cli-quick/cli-info/cli-stop-login/cli-log,
  clean 不再引用 CLI 镜像;fetch 直接调用脚本(脚本已无参数)
- scripts/fetch-client-deb.sh: 收敛为单一 GUI 目标,去掉 gui()/cli() 分支与 Ubuntu CDN
- README/vendor/README/SECURITY: 同步删除 CLI 相关说明,「为什么用图形端」保留作背景
2026-11-13 15:34:48 +08:00

63 lines
2.0 KiB
Makefile
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
SERVICE := secgate-gui
IMAGE := local/secgate-gui:1.1.3.1010701
GUI := /opt/sslvpnclient/files/bin/sslvpn
URL := http://127.0.0.1:6080/vnc.html
.PHONY: help build up down restart ps logs url shot verify shell window ruleset nas-deploy fetch rebuild clean
help: ## 显示所有可用命令
@grep -hE '^[a-zA-Z_-]+:.*?## ' $(MAKEFILE_LIST) | awk 'BEGIN{FS=":.*?## "}{printf " \033[36m%-14s\033[0m %s\n", $$1, $$2}'
build: ## 构建图形端镜像(官方海光麒麟 deb)
docker compose build
rebuild: ## 无缓存重建图形端镜像
docker compose build --no-cache secgate-gui
up: ## 启动图形端容器
docker compose up -d secgate-gui
@sleep 2; docker compose ps; echo; echo "浏览器打开: $(URL)"
down: ## 停止并删除图形端容器
docker compose down
restart: ## 重启图形端容器
docker compose restart secgate-gui
ps: ## 查看容器状态
docker compose ps
logs: ## 跟随容器内各服务日志(entrypoint/Xvfb/websockify)
docker compose logs -f --tail=80 $(SERVICE)
url: ## 打印 noVNC 地址
@echo $(URL)
shot: ## 截图当前桌面 → ./screenshots/(自检 GUI 是否正常渲染)
@mkdir -p screenshots
@docker exec $(SERVICE) scrot -o /tmp/screen.png
@docker cp $(SERVICE):/tmp/screen.png screenshots/gui-$$(date +%H%M%S).png >/dev/null
@ls -t screenshots/*.png | head -1
window: ## 列出 X 里的窗口(确认客户端窗口存在)
@docker exec $(SERVICE) xwininfo -root -tree | head -30
verify: ## 自检:X / noVNC / SOCKS5 / 客户端进程 / 窗口 / 隧道
@./scripts/verify.sh
ruleset: ## 导出 tun0 路由为 clash ipcidr ruleset(需已登录)
@./scripts/export-clash-ruleset.sh
fetch: ## 从官方下载站取图形端安装包到 vendor/(不入库)
@./scripts/fetch-client-deb.sh
nas-deploy: ## 部署/更新到 NAS(NAS_HOST=...,端口可用 SOCKS_PORT/VNC_PORT 覆盖)
@./scripts/deploy-nas.sh
shell: ## 进入容器
docker exec -it $(SERVICE) bash
clean: ## 停容器并删除本地镜像
docker compose down
docker rmi $(IMAGE) 2>/dev/null || true