[agent][wdd] - 初始化项目

This commit is contained in:
zeaslity
2025-02-10 15:07:44 +08:00
parent a0811d62e7
commit b8f0b14852
12 changed files with 455 additions and 0 deletions

38
agent-wdd/cmd/Proxy.go Normal file
View File

@@ -0,0 +1,38 @@
package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
// 添加proxy子命令
func addProxySubcommands(cmd *cobra.Command) {
xrayCmd := &cobra.Command{
Use: "xray",
Short: "Xray相关操作",
}
xrayCmd.AddCommand(
&cobra.Command{
Use: "install",
Short: "安装Xray",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("Installing Xray...")
},
},
// 其他xray子命令...
)
cmd.AddCommand(
xrayCmd,
&cobra.Command{
Use: "vmess",
Short: "设置VMESS代理",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("Setting up VMESS proxy...")
},
},
// 其他proxy子命令...
)
}
// 其他命令结构类似,根据需求补充完整...