MCPcopy Index your code
hub / github.com/0xUnixIO/pulse

github.com/0xUnixIO/pulse @v0.3.15

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.3.15 ↗ · + Follow
3,035 symbols 9,568 edges 281 files 905 documented · 30%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Pulse

分布式边缘节点编排与管理平台。pulse-server + pulse-node 双进程,节点通过 mTLS gRPC 长连接被控制面纳管,配置 push 秒级生效。

功能

  • 多节点 mTLS 编排,配置 push 下发
  • 用户额度 / 有效期 / 状态机 / 流量倍率
  • 标准订阅链接生成
  • 节点内置 TLS 网关(NodeGate)+ ACME(Cloudflare DNS-01)
  • 多级出站路由 / GeoIP 分流
  • 套餐 + Stripe 付款 / 用户分组 / 工单 / 审计日志 / IP 限频

安装

Server

bash <(curl -fsSL https://raw.githubusercontent.com/0xUnixIO/pulse/main/scripts/install.sh) server

Node

面板「节点」→「添加节点」复制安装命令到节点机器运行。节点主动外连,NAT 机器可用。

详见 INSTALL.md · 开发参见 DEVELOPMENT.md

License

AGPL-3.0

Extension points exported contracts — how you extend this code

HubCaller (Interface)
HubCaller 是 self-sync 调用 node 的最小接口。 真实实现是 *nodehub.Hub.Call;用接口包装是为了避免 jobs 反向依赖 nodehub 形成循环 import,并方便测试 mock。 [8 implementers]
internal/jobs/selfsync.go
HubCaller (Interface)
HubCaller 抽象 nodehub.Hub.Call,便于测试时注入 mock。 生产环境由 *nodehub.Hub 实现。 [8 implementers]
internal/nodes/client.go
Dispatcher (Interface)
Dispatcher 处理 server 下发的 method 调用。Handle 必须支持 ctx 取消: 当 server 发送对应的 cancel_id 帧时,agent 会取消传入的 ctx。 [5 implementers]
internal/nodeagent/agent.go
PushHandler (Interface)
PushHandler 处理 node 主动推送的事件。 实现可注入到 Hub.Options,用于解耦 hub 与业务逻辑(usage 入库、SSE 转发等)。 [5 implementers]
internal/nodehub/hub.go
AdminStore (Interface)
AdminStore 从数据库读取管理员凭证。 [4 implementers]
internal/auth/auth.go
SettingsReader (Interface)
SettingsReader 从持久化存储读取配置项的最小接口。 [2 implementers]
internal/alert/bark.go
SettingsGetter (Interface)
SettingsGetter 从持久化存储读取键值配置。 [2 implementers]
internal/payment/shop.go
SettingsReader (Interface)
SettingsReader 从 KV 存储读取配置值。 [2 implementers]
internal/backup/backup.go

Core symbols most depended-on inside this repo

writeJSON
called by 395
internal/serverapi/api.go
Close
called by 212
internal/nodes/client.go
Add
called by 181
internal/jobs/scheduler.go
New
called by 139
internal/store/postgres/sqlcgen/db.go
writeJSON
called by 114
internal/server/server.go
Get
called by 99
internal/announcements/announcement.go
Exec
called by 96
internal/store/postgres/sqlcgen/db.go
internalError
called by 87
internal/serverapi/api.go

Shape

Method 1,279
Function 1,116
Struct 426
Interface 203
FuncType 5
TypeAlias 4
Class 2

Languages

Go79%
TypeScript21%

Modules by API surface

internal/store/postgres/sqlcgen/querier.go148 symbols
web/panel/src/routes/nodes.tsx78 symbols
internal/nodes/client.go63 symbols
web/panel/src/routes/inbounds.tsx57 symbols
internal/store/postgres/sqlcgen/users.sql.go54 symbols
internal/users/store.go53 symbols
web/panel/src/lib/types.ts50 symbols
internal/store/postgres/users.go47 symbols
internal/users/memory.go46 symbols
internal/serverapi/api.go44 symbols
web/panel/src/routes/users.tsx42 symbols
web/panel/src/routes/stat.tsx41 symbols

Datastores touched

dbDatabase · 1 repos
pulseDatabase · 1 repos

For agents

$ claude mcp add pulse \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact