以下是一些常见的 PassWall2 路径配置示例,供你参考:
默认路由
default_path: /nodes path: "/nodes"
default_path:指定默认路由的路径,此配置默认为/nodes。path:指定路由的路径,此配置默认为/nodes。
消息路由
route: events pattern: /auth path: [events/auth]
route:指定路由规则的名称,如events。pattern:指定路由规则的模式,如/auth。path:指定路由的路径,此配置默认为[^/auth](即不匹配/auth末尾)。
路由管理
route: router pattern: root path: [router/root]
route:指定路由规则的名称,如router。pattern:指定路由规则的模式,如root。path:指定路由的路径,此配置默认为/root。
路由规则管理
route: rules pattern: [rules/] path: [rules/]
route:指定路由规则的名称,如rules。pattern:指定路由规则的模式,如[rules/]。path:指定路由的路径,此配置默认为/rules。
路由路径
route: rules pattern: [rules/] path: [rules/]
route:指定路由规则的名称,如rules。pattern:指定路由规则的模式,如[rules/]。path:指定路由的路径,此配置默认为/rules。
路由规则的子路由
route: router pattern: root path: [router/root]
route:指定路由规则的名称,如router。pattern:指定路由规则的模式,如root。path:指定路由的路径,此配置默认为/root。
注意事项
- 路径:确保路由路径与 Nagios 的节点配置一致。
- 规则:根据你的需求选择合适的路由规则,如
default,events,router, 等。 - 子路由:通过复合路径如
[router/root]来实现子路由。







京公网安备11000000000001号
京ICP备11000001号