registry

package
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2026 License: Apache-2.0 Imports: 36 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package registry 集中创建全部功能模块,供主程序、文档导出与测试共用。

可选模块各自放在带 build tag 的文件中(例如 mod_waf.go 带 //go:build !no_waf), 默认构建包含全部模块;定制构建通过 -tags no_waf,no_smb 等去掉不需要的模块。 端口转发、Web 服务与 SSL 证书是核心模块,始终编译。

Index

Constants

This section is empty.

Variables

View Source
var Catalog = []Info{
	{ID: "portforward", Title: "端口转发"},
	{ID: "protoroute", Title: "协议分流"},
	{ID: "ddns", Title: "动态域名"},
	{ID: "stun", Title: "STUN 穿透"},
	{ID: "tailscale", Title: "Tailscale 组网"},
	{ID: "netbird", Title: "NetBird 组网"},
	{ID: "easytier", Title: "EasyTier 组网"},
	{ID: "frp", Title: "frp 内网穿透"},
	{ID: "cloudflared", Title: "Cloudflare 隧道"},
	{ID: "ssl", Title: "SSL 证书"},
	{ID: "waf", Title: "WAF 防火墙"},
	{ID: "webservice", Title: "Web 服务"},
	{ID: "guard", Title: "入侵防护"},
	{ID: "knock", Title: "端口敲门"},
	{ID: "wol", Title: "网络唤醒"},
	{ID: "webterminal", Title: "Web 终端"},
	{ID: "cron", Title: "计划任务"},
	{ID: "docker", Title: "Docker 管理"},
	{ID: "webdav", Title: "WebDAV 服务"},
	{ID: "ftp", Title: "FTP 服务"},
	{ID: "smb", Title: "SMB 服务"},
	{ID: "filebrowser", Title: "File Browser"},
	{ID: "storage", Title: "存储挂载"},
	{ID: "notify", Title: "通知中心"},
	{ID: "ntfy", Title: "ntfy"},
	{ID: "perf", Title: "性能监控"},
	{ID: "nettools", Title: "网络诊断"},
	{ID: "backup", Title: "配置备份"},
}

Catalog 是 Gately 全部功能模块(含没有编译进本程序的),按显示顺序排列。 新增模块时同步这里、对应的 mod_<ID>.go 与仓库根目录的 modules.json,registry 的测试会校验三者一致。

Functions

func Built added in v0.6.4

func Built() []string

Built 返回本次编译包含的模块 ID,按显示顺序排列。

func New

func New() (mods []module.Module, certs *ssl.Module)

New 创建本次编译包含的全部模块。Web 服务使用证书模块按 SNI 提供 HTTPS 证书,并按站点引用 WAF 实例, 因此一并返回证书模块供管理界面 HTTPS 复用。

func Requires added in v0.5.3

func Requires() map[string][]string

Requires 返回模块间的依赖关系:键为模块 ID,值为它依赖的模块 ID。 与 New 中的装配关系一一对应;依赖方开启期间,被依赖的模块不能关闭。只包含本次编译的模块。

func Subcommand added in v0.6.4

func Subcommand(name string) (func(args []string, out io.Writer) int, bool)

Subcommand 按名称查找模块提供的子命令。

Types

type Info added in v0.6.4

type Info = module.Info

Info 描述一个功能模块。

func Absent added in v0.6.4

func Absent() []Info

Absent 返回已知但没有编译进本程序的模块。它们的配置文件原样保留,换回包含它们的构建后继续生效。

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL