mirror of
https://github.com/qingchencloud/cftunnel.git
synced 2026-08-28 18:20:34 +08:00
b4da59cb07
- cfapi: 基于 cloudflare-go/v6 SDK 封装隧道 CRUD、DNS CNAME、Zone 查询 - config: YAML 配置读写 (~/.cftunnel/config.yml) - daemon: cloudflared 自动下载 + 进程管理 - service: macOS launchd 系统服务注册 - CLI: init/add/remove/list/up/down/status/install/uninstall/logs
19 lines
304 B
Go
19 lines
304 B
Go
package cmd
|
|
|
|
import (
|
|
"github.com/qingchencloud/cftunnel/internal/daemon"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(downCmd)
|
|
}
|
|
|
|
var downCmd = &cobra.Command{
|
|
Use: "down",
|
|
Short: "停止隧道",
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
return daemon.Stop()
|
|
},
|
|
}
|