
Lazycat Advanced Routing
If you're deploying apps on Lazycat MicroServer and need more than basic HTTP routing, this skill walks you through the platform's three-tier networking setup. It covers standard routes that strip URL prefixes by default, advanced upstreams for domain-based routing and header manipulation, and TCP/UDP ingress for non-HTTP services like databases or game servers. The real utility is knowing when to reach for app-proxy, an OpenResty container that lets you write custom Nginx configs for complex multi-domain setups. The guide is in Chinese but structured clearly around concrete examples, so you can pattern-match even if you're reading through translation.
- skills.sh installs
- 240
- GitHub stars
- 61
- last updated
- Aug 21, 2026
Install
$ npx -y skills add whoamihappyhacking/lazycat-skills --skill lazycat-advanced-routing --agent claude-codeInstalls into .claude/skills of the current project.
Files
懒猫微服高级路由
按下面顺序工作,不要直接套用旧版清单或旧镜像示例。
1. 先校准官方规范
任何打包、构建或路由配置任务,先读取 references/spec-sync.md,按其中流程核对当前官方原文,并确认目标 lzcos 与 lzc-cli 版本。仓库参考文档是快照;若与当前官方冲突,以官方为准。
LPK V2 必须拆分配置:
package.yml:package、version、name、description、权限等静态包信息。lzc-manifest.yml:application、services等运行结构。- 不要在 V2 manifest 顶层继续写旧元数据,也不要添加不存在的
application.secondary_domains。
2. 选择正确的流量机制
| 需求 | 使用 | 关键规则 |
|---|---|---|
| 简单 HTTP/HTTPS、静态文件或启动本地程序 | application.routes | URL_PATH=UPSTREAM;默认移除匹配的路径前缀 |
| 保留路径、按域名前缀分流、控制 Host/Header/TLS 校验 | application.upstreams | backend 只支持 http、https、file |
| TCP/UDP、数据库或其他非 HTTP 协议 | application.ingress | L4 直通,不经过平台 HTTP 鉴权 |
| 内置能力无法表达的复杂重写 | 应用内反向代理 | 优先用已核验的当前镜像,不复制过时 app-proxy 标签 |
协议边界必须明确:
routes支持http(s)://、file:///、exec://端口,程序路径。upstreams[].backend支持http、https、file,不支持exec://;需要启动程序时使用backend_launch_command。ingress只声明tcp或udp,不要用它代替普通 HTTP 路由。
3. 域名与服务发现硬规则
Sponsors
Details
- Repository
- github.com/whoamihappyhacking/lazycat-skills
- Category
- Backend & APIs
- First seen
- Jun 3, 2026