[agent-wdd] 小小新增部分内容
This commit is contained in:
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user