mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[PR #5004] [CLOSED] 添加Windows服务管理和事件日志集成 #5101
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#5101
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/fatedier/frp/pull/5004
Author: @donmor
Created: 9/29/2025
Status: ❌ Closed
Base:
dev← Head:patch-2📝 Commits (10+)
e97300badd basic supports to run as a windows servicebeeecfdadd support for changing parameters on service startf9469edadd support for windows eventlog0ededf6fix broken compilation on non-windows platforms745ba2bimplements wait-for-startup and frpc pause/continue/reload7eb755afix broken isWinSvc()dcee282fix broken dummy eventlog.go3974382fix broken dummy system.go and system_android.go83738f9fix broken dummy eventlog.goa09ac18now checks existence of event source using powershell;event source added automatically if run as privileged user📊 Changes
244 files changed (+22264 additions, -6542 deletions)
View changed files
📝
.circleci/config.yml(+1 -1)📝
.github/workflows/golangci-lint.yml(+5 -5)📝
.github/workflows/goreleaser.yml(+3 -3)📝
.gitignore(+2 -12)📝
.golangci.yml(+8 -7)📝
Makefile(+11 -10)📝
README.md(+18 -9)📝
README_zh.md(+10 -9)📝
Release.md(+5 -4)📝
assets/assets.go(+11 -2)➖
client/api/controller.go(+0 -189)📝
client/api_router.go(+20 -9)➕
client/config_manager.go(+422 -0)➕
client/config_manager_test.go(+137 -0)➕
client/configmgmt/types.go(+42 -0)📝
client/control.go(+7 -3)➕
client/http/controller.go(+395 -0)➕
client/http/controller_test.go(+531 -0)➕
client/http/model/proxy_definition.go(+148 -0)📝
client/http/model/types.go(+14 -1)...and 80 more files
📄 Description
实现 #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那边)暂时搁置-c的参数和install命令间需插入--;使用uninstall命令以卸载;会同时注册/移除事件源;需在管理员cmd/powershell中执行;默认使用LocalSystem身份,restricted模式使用NT AUTHORITY\LocalService和受限SID)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.