56 Commits
Author SHA1 Message Date
kevin 04d2e6e429 fix: correct connect/disconnect button state on connection lifecycle
- Enable disconnect button immediately when connect is clicked, so the
  user can cancel without waiting for the StateConnecting IPC event.
- Disable disconnect button on all error paths in the connect goroutine
  to restore the default disconnected button state.
- Capture ipcClient once at eventLoop start instead of re-reading every
  iteration, preventing a second onConnect call from making the old
  event loop jump to the new client and consume events concurrently.
- In eventLoop recv error recovery, only reset button states if the
  current ipcClient still matches the captured one, so a stale
  disconnection does not clobber the state of a newer session.
- Disable connect button in StateReconnecting case (was missing).
- Remove WriteOK from daemon startSession: the StateConnecting event
  already serves as the implicit acknowledgment; the OK response was
  being read by eventLoop as a no-op event, adding unnecessary noise.
2026-07-06 19:34:29 +08:00
kevin b0aa386ee2 修复 daemon 启动问题,分离 GUI 和 daemon 二进制
- 分离二进制: cmd/lmvpn (GUI+Fyne) 和 cmd/lmvpnd (daemon, 无 Fyne)
  消除 daemon 启动时的 Fyne locale 初始化错误
- 新增 daemon-launch 子命令: 用 syscall.SysProcAttr{Setsid: true}
  替代 nohup, 解决 osascript 无 TTY 时的 'Inappropriate ioctl' 错误
- daemon 日志写到用户家目录: paths.SetUserHome() 覆盖 root 默认路径
- IPC socket chown 给用户: 解决 root:wheel 0660 导致 GUI 无法连接
- 修复 JWT→密码认证回退: 捕获 ServerError{auth_err} 而非仅 AuthError
- 修复 token URL 编码: 用 url.QueryEscape 替代裸拼接
- 日志去重: LMVPN_DAEMON=1 时 daemon 不再 stderr 镜像到文件
- Makefile 构建双二进制并打包到 .app bundle
2026-07-06 17:46:36 +08:00
kevin 124d6ad363 up 2026-07-06 16:53:24 +08:00
kevin 1f1794fcc7 增加多语言支持 2026-07-06 16:52:04 +08:00
kevin 1e3db0a724 up 2026-07-06 16:26:22 +08:00
kevin bb9f685221 init 2026-07-06 16:21:06 +08:00