[agent-wdd] 小小新增部分内容

This commit is contained in:
zeaslity
2025-02-27 17:19:36 +08:00
parent b6cc5abc63
commit c10554c218
7 changed files with 15 additions and 46 deletions

View File

@@ -18,7 +18,7 @@ import (
func addDownloadSubcommands(cmd *cobra.Command) {
proxyCmd := &cobra.Command{
Use: "proxy [proxyUrl] [url] [dest]",
Short: "使用代理下载 支持socks5代理 http代理",
Short: "使用代理下载 socks5://[username]:[password]@ip:port http://[username]:[password]@ip:port",
Args: cobra.ExactArgs(3),
Run: func(cmd *cobra.Command, args []string) {
proxyURL := args[0]
@@ -50,7 +50,8 @@ func addDownloadSubcommands(cmd *cobra.Command) {
log.Error("请输入下载地址")
return
} else if len(args) == 1 {
args = append(args, ".")
timeString := utils.CurrentTimeString()
args = append(args, "./"+timeString+".txt")
}
log.Info("Downloading without proxy: %s -> %s\n", args[0], args[1])