shaw
4eaa0cf14a
fix: 使用完整路径执行 sudo 和 systemctl 命令
...
问题原因:
- systemd 服务的 PATH 环境变量可能受限
- 直接使用 "sudo" 可能找不到可执行文件
修复内容:
- 添加 findExecutable 函数动态查找可执行文件路径
- 先尝试 exec.LookPath,再检查常见系统路径
- 添加日志显示实际使用的路径,方便调试
- 兼容不同 Linux 发行版的路径差异
2025-12-18 19:58:25 +08:00
shaw
e9ec2280ec
fix: 修复 sudo 在非交互模式下无法执行的问题
...
问题原因:
- sudo 命令没有 -n 选项
- 在后台服务中,sudo 会尝试从终端读取密码
- 由于没有终端,命令静默失败
修复内容:
- 添加 sudo -n 选项强制非交互模式
- 如果需要密码会立即失败并返回错误,而不是挂起
2025-12-18 19:37:41 +08:00
Wesley Liddick
bb7bfb6980
Merge pull request #1 from 7836246/fix/concurrent-proxy-race-condition
...
fix: 修复并发请求时共享httpClient.Transport导致的竞态条件
2025-12-18 06:37:22 -05:00
shaw
b66f97c100
fix: 修复 install.sh 优先使用旧 sudoers 文件的问题
...
问题原因:
- install.sh 优先从 tar.gz 复制 sudoers 文件
- 旧版 Release 中的 sudoers 文件没有 /usr/bin/systemctl 路径
- 即使脚本更新了,仍然会使用旧的配置
修复内容:
- 移除对 tar.gz 中 sudoers 文件的依赖
- 总是使用脚本中内嵌的最新配置
- 确保新版脚本立即生效,无需等待新 Release
2025-12-18 19:27:47 +08:00
shaw
b51ad0d893
fix: 修复 sudoers 中 systemctl 路径不兼容的问题
...
问题原因:
- sudoers 只配置了 /bin/systemctl 路径
- 部分系统(如 Ubuntu 22.04+)的 systemctl 位于 /usr/bin/systemctl
- 路径不匹配导致 sudo 仍然需要密码
修复内容:
- 同时支持 /bin/systemctl 和 /usr/bin/systemctl 两个路径
- 兼容 Debian/Ubuntu 和 RHEL/CentOS 等不同发行版
2025-12-18 19:17:05 +08:00
shaw
4eb22d8ee9
fix: 修复服务用户 shell 导致无法执行 sudo 重启的问题
...
问题原因:
- 服务用户 sub2api 的 shell 被设置为 /bin/false
- 导致无法执行 sudo systemctl restart 命令
- 安装/升级后服务无法自动重启
修复内容:
- 新安装时使用 /bin/sh 替代 /bin/false
- 升级时自动检测并修复旧版本用户的 shell 配置
- 修复失败时给出警告和手动修复命令,不中断安装流程
2025-12-18 19:07:33 +08:00
江西小徐
2392e7cf99
fix: 修复并发请求时共享httpClient.Transport导致的竞态条件
...
问题描述:
当多个请求并发执行且使用不同代理配置时,它们会同时修改共享的
s.httpClient.Transport,导致请求可能使用错误的代理(数据泄露风险)
或意外失败。
修复方案:
为需要代理的请求创建独立的http.Client,而不是修改共享的httpClient.Transport。
改动内容:
- 新增 buildUpstreamRequestResult 结构体,返回请求和可选的独立client
- 修改 buildUpstreamRequest 方法,配置代理时创建独立client
- 更新 Forward 方法,根据是否有代理选择合适的client
2025-12-18 18:14:48 +08:00
shaw
8e4bd42e8c
fix: 修复安装/升级无法重启服务的问题
2025-12-18 17:44:49 +08:00
shaw
ef3199f0ca
fix: 修复脚本的一些参数问题
2025-12-18 17:25:26 +08:00
shaw
e440530acc
fix: release error
2025-12-18 17:12:57 +08:00
shaw
e2ae9fe50b
fix: release error
2025-12-18 17:02:21 +08:00
shaw
20aee89dcc
fix: Fixed installation issues with the install.sh script.
2025-12-18 16:00:57 +08:00
shaw
6cf60176c3
fix: release error
2025-12-18 15:56:13 +08:00
shaw
268f4d28fb
fix: add missing deploy/DOCKER.md for Docker workflow
...
The release workflow references ./deploy/DOCKER.md to update DockerHub
description, but the file was missing causing ENOENT error.
2025-12-18 15:46:43 +08:00
shaw
882c2e1eef
fix: use environment variable to pass full tag message to GoReleaser
...
- Extract complete tag message body in workflow using git format
- Pass tag message via TAG_MESSAGE environment variable
- Update goreleaser config to use .Env.TAG_MESSAGE instead of .TagBody
- Fix release notes being truncated to first paragraph only
2025-12-18 15:30:35 +08:00
shaw
e63d95122a
fix: release error
2025-12-18 15:08:50 +08:00
shaw
3d05e50335
fix: frontend build error
2025-12-18 14:26:55 +08:00
shaw
642842c29e
First commit
2025-12-18 13:50:39 +08:00
Wesley Liddick
569f4882e5
Initial commit
2025-12-18 10:26:18 +08:00