Skip to content

Conversation

@donmor
Copy link

@donmor donmor commented Sep 29, 2025

实现 #2468 ,可直接使用sc.exe(cmd)/New-Service(powershell)/注册表将frps或frpc注册为服务(可使用LocalService、服务账户等提高安全性)

计划实现:

  • 加入golang.org/x/sys/windows/svc包,使frps和frpc符合Windows服务程序规范
  • 加入golang.org/x/sys/windows/svc/eventlog包,为Logger添加Windows事件日志后端(可使用Windows事件查看器查看)
  • 为每种日志输出添加独有的event ID(需要定义更多eid;需要改golib那边) 暂时搁置
  • 为frpc添加pause/continue支持(并同时reload代理配置)
  • 日志事件源存在检测和自动安装(使用powershell命令,自动添加需要UAC提权)
  • 服务安装/卸载命令(在启动参数前插入install以安装,非-c的参数和install命令间需插入--;使用uninstall命令以卸载;会同时注册/移除事件源;需UAC提权;默认使用LocalSystem身份,restricted模式使用NT AUTHORITY\LocalService和受限SID;这些命令以后也许会用于Systemd/Launchd服务安装功能?)

@github-actions
Copy link

PRs go stale after 14d of inactivity. Stale PRs rot after an additional 3d of inactivity and eventually close.

@donmor
Copy link
Author

donmor commented Oct 20, 2025

自顶

@wuai1024
Copy link

wuai1024 commented Oct 23, 2025

这个不需要frp来程序实现, win 可以用 winsw , linux 可以使用 systemd 来管理。

例如这样:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants