Repository navigation
添加了内网穿透FRPC插件 - #3
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
该 PR 新增一个 frpc-connector 插件,用于根据用户填写的 callsign 从 websdr.bd8ftc.de 下载专属 frpc.toml,并在本机启动/守护 frpc 客户端以接入 FRP 穿透服务。
Changes:
- 新增
frpc-connector插件实现:下载配置、生成启动脚本、启动/停止与状态协调逻辑 - 新增插件 README 与打包元数据(package.json / package-lock.json)
- 更新根
.gitignore忽略本插件本地运行生成的部分文件
Reviewed changes
Copilot reviewed 3 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| frpc-connector/src/index.js | 插件核心逻辑:平台选择、下载 frpc.toml、生成脚本、启动/停止与状态协调 |
| frpc-connector/README.md | 插件用途、平台支持、使用方法与排错说明 |
| frpc-connector/package.json | 插件打包/发布元数据与 include 清单 |
| frpc-connector/package-lock.json | 插件依赖锁定文件(当前基本为空锁) |
| .gitignore | 忽略 frpc-connector 本地测试运行生成文件 |
Files not reviewed (1)
- frpc-connector/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const VERSION = '1.0.0'; | ||
| const FRPC_VERSION = '0.68.1'; | ||
| const SUPPORT_EMAIL = 'bd8ftc@bd8ftc.de'; | ||
| const API = 'http://websdr.bd8ftc.de/?callsign='; |
Comment on lines
+284
to
+295
| if (pid) { | ||
| log(ctx, `尝试按 PID 停止 Windows FRPC:pid=${pid}`); | ||
| const stoppedByPid = await taskkill(['/f', '/t', '/pid', String(pid)]); | ||
| if (stoppedByPid) { | ||
| log(ctx, `已停止 FRPC 进程树 PID=${pid}`); | ||
| return; | ||
| } | ||
| warn(ctx, `按 PID 停止 FRPC 失败,尝试按进程名清理:PID=${pid}`); | ||
| } | ||
|
|
||
| await taskkill(['/f', '/im', 'frpc.exe']); | ||
| log(ctx, '已尝试停止 FRPC'); |
Comment on lines
+298
to
+302
| function killUnix(pid, signal) { | ||
| try { | ||
| process.kill(-pid, signal); | ||
| return true; | ||
| } catch { |
| "minHostVersion": "1.0.0", | ||
| "entry": "src/index.js", | ||
| "include": [ | ||
| { "from": "src/index.js", "to": "plugin.js" }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.