容器启动

可通过docker的特性绑定网卡实现在多WAN环境下定向下载

默认工作时间区间

docker run -tid  --net=host --restart=always --name kill   ccr.ccs.tencentyun.com/liumou/ubuntu-kill

自定义工作时间区间

docker run -tid  --net=host --restart=always --name kill -e morning=0 -e night=24 ccr.ccs.tencentyun.com/liumou/ubuntu-kill
  • morning: 设置早上开始的时间(小时)默认: 7
  • night: 设置晚上结束的时间(小时)默认: 23

如果是Nas之类的无法使用Cli方式创建容器,可以使用Docker镜像liuyi778/ubuntu-kill

自定义URL清单

docker run -tid -v /data/config/url.txt:/root/URLS.txt:rw --net=host --restart=always --name kill -e morning=0 -e night=24 ccr.ccs.tencentyun.com/liumou/ubuntu-kill
  • /data/config/url.txt改成宿主机实际的URL清单文本文件绝对路径

更多参数

变量 说明 默认值
Time_max 每次任务间隔最大时间(秒) -e Time_max=1000
Time_mini 每次任务间隔最小时间(秒) -e Time_mini=100
TXT 下载链接清单记录文本,建议根据自己的带宽设置合适的URL清单,避免影响网络使用 -e TXT=/root/URLS.txt
TMP 文件保存路径 -e TMP=/tmp/docker/
Concurrency 同时下载任务数量(切勿贪杯) -e Concurrency=5

建议使用默认参数即可

效果

查询运行日志

docker logs -f kill
2023-11-02 11:22:20.273 | INFO     | __main__:wget:77 - 开始下载: [ http://dubapkg.cmcmcdn.com/cs/166nsoft/WIFI%E5%85%B1%E4%BA%AB%E5%A4%A7%E5%B8%88.exe -> [ file_5 ]
2023-11-02 11:22:20.274 | INFO     | __main__:wget:77 - 开始下载: [ https://file1.updrv.com/soft/DriveTheLife/8_16_19_56/DriveTheLife_36906_S_8_16_19_56.exe -> [ file_2 ]
2023-11-02 11:22:20.274 | INFO     | __main__:wget:77 - 开始下载: [ https://ergu.nvcung.cn/download/%E7%8C%8E%E8%B1%B9%E5%85%8D%E8%B4%B9WIFI_18_415132.exe -> [ file_4 ]
2023-11-02 11:22:20.274 | INFO     | __main__:wget:77 - 开始下载: [ http://file.drivergenius.com/DGSetup_Home_BZ.exe -> [ file_3 ]
2023-11-02 11:22:20.274 | INFO     | __main__:wget:77 - 开始下载: [ https://ergu.nvcung.cn/download/%E7%8C%8E%E8%B1%B9%E5%85%8D%E8%B4%B9WIFI_18_415132.exe -> [ file_4 ]
Downloading: 100%|██████████| 3080888/3080888 [00:00<00:00, 26522270.97it/s]
2023-11-02 11:22:20.490 | INFO     | __main__:wget:122 - 下载成功: [ http://dubapkg.cmcmcdn.com/cs/166nsoft/WIFI%E5%85%B1%E4%BA%AB%E5%A4%A7%E5%B8%88.exe -> [ file_5 ]
Downloading: 100%|██████████| 99929208/99929208 [00:02<00:00, 36130645.15it/s]
2023-11-02 11:22:23.220 | INFO     | __main__:wget:122 - 下载成功: [ http://file.drivergenius.com/DGSetup_Home_BZ.exe -> [ file_3 ]
2023-11-02 11:22:26.235 | DEBUG    | __main__:<module>:236 - 当前时间[ 19 ]符合设置区间[ 7 -> 23 ],任务执行...
2023-11-02 11:22:26.251 | DEBUG    | __main__:start:133 - 当前设置最小间隔时间: 20
2023-11-02 11:22:26.251 | DEBUG    | __main__:start:134 - 当前设置最大间隔时间: 100
2023-11-02 11:22:26.251 | DEBUG    | __main__:start:135 - 当前设置URL文件路径: /root/URLS.txt
2023-11-02 11:22:26.251 | DEBUG    | __main__:start:136 - 当前设置文件下载路径: /tmp/docker/
2023-11-02 11:22:26.252 | DEBUG    | __main__:init_read_txt:34 - 正在判断文件: /root/URLS.txt
2023-11-02 11:22:26.252 | DEBUG    | __main__:init_read_txt:36 - 正在读取文件: /root/URLS.txt
2023-11-02 11:22:26.253 | INFO     | __main__:init_read_txt:53 - 当前获取URL总数: 8
2023-11-02 11:22:26.253 | DEBUG    | __main__:start:138 - 当前设置任务数量: 5
2023-11-02 11:22:26.254 | DEBUG    | __main__:start:144 - 正在执行第[ 1 ]个任务
2023-11-02 11:22:26.254 | DEBUG    | __main__:start:144 - 正在执行第[ 2 ]个任务
2023-11-02 11:22:26.254 | DEBUG    | __main__:start:144 - 正在执行第[ 3 ]个任务
2023-11-02 11:22:26.254 | DEBUG    | __main__:start:144 - 正在执行第[ 4 ]个任务
2023-11-02 11:22:26.255 | DEBUG    | __main__:start:144 - 正在执行第[ 5 ]个任务
2023-11-02 11:22:26.255 | INFO     | __main__:wget:77 - 开始下载: [ http://dubapkg.cmcmcdn.com/cs/166nsoft/WIFI%E5%85%B1%E4%BA%AB%E5%A4%A7%E5%B8%88.exe -> [ file_5 ]
2023-11-02 11:22:26.256 | INFO     | __main__:wget:77 - 开始下载: [ http://dubapkg.cmcmcdn.com/cs/166nsoft/WIFI%E5%85%B1%E4%BA%AB%E5%A4%A7%E5%B8%88.exe -> [ file_5 ]
2023-11-02 11:22:26.256 | INFO     | __main__:wget:77 - 开始下载: [ https://file1.updrv.com/soft/DriveTheLife/8_16_19_56/DriveTheLife_36906_S_8_16_19_56.exe -> [ file_2 ]
2023-11-02 11:22:26.256 | INFO     | __main__:wget:77 - 开始下载: [ https://mksoftcdnhp.mydown.com/652ff27e/326dd26091def44c795c5fbc526776a0/uploadsoft/TSBrowser_842_6.0.3.8.exe -> [ file_1 ]
2023-11-02 11:22:26.256 | INFO     | __main__:wget:77 - 开始下载: [ http://file.drivergenius.com/DGSetup_Home_BZ.exe -> [ file_3 ]
Downloading: 100%|██████████| 3080888/3080888 [00:00<00:00, 17456886.42it/s]
2023-11-02 11:22:26.453 | INFO     | __main__:wget:122 - 下载成功: [ http://dubapkg.cmcmcdn.com/cs/166nsoft/WIFI%E5%85%B1%E4%BA%AB%E5%A4%A7%E5%B8%88.exe -> [ file_5 ]
Downloading: 100%|██████████| 99929208/99929208 [00:03<00:00, 30596574.36it/s]
2023-11-02 11:22:29.686 | INFO     | __main__:wget:122 - 下载成功: [ http://file.drivergenius.com/DGSetup_Home_BZ.exe -> [ file_3 ]
Downloading: 100%|██████████| 3080888/3080888 [00:03<00:00, 845688.15it/s]
2023-11-02 11:22:29.922 | INFO     | __main__:wget:122 - 下载成功: [ http://dubapkg.cmcmcdn.com/cs/166nsoft/WIFI%E5%85%B1%E4%BA%AB%E5%A4%A7%E5%B8%88.exe -> [ file_5 ]


非区间日志

2023-10-29 02:32:03.832 | DEBUG    | __main__:<module>:215 - [ 1.17 ]当前时间[ 2 ]不在设定任务时间内[ 7 -> 24 ],等待十秒后继续...
2023-10-29 02:32:13.843 | DEBUG    | __main__:<module>:215 - [ 1.17 ]当前时间[ 2 ]不在设定任务时间内[ 7 -> 24 ],等待十秒后继续...
2023-10-29 02:32:23.854 | DEBUG    | __main__:<module>:215 - [ 1.17 ]当前时间[ 2 ]不在设定任务时间内[ 7 -> 24 ],等待十秒后继续...
2023-10-29 02:32:33.865 | DEBUG    | __main__:<module>:215 - [ 1.17 ]当前时间[ 2 ]不在设定任务时间内[ 7 -> 24 ],等待十秒后继续...
2023-10-29 02:32:43.875 | DEBUG    | __main__:<module>:215 - [ 1.17 ]当前时间[ 2 ]不在设定任务时间内[ 7 -> 24 ],等待十秒后继续...
2023-10-29 02:32:53.886 | DEBUG    | __main__:<module>:215 - [ 1.17 ]当前时间[ 2 ]不在设定任务时间内[ 7 -> 24 ],等待十秒后继续...
2023-10-29 02:33:03.897 | DEBUG    | __main__:<module>:215 - [ 1.17 ]当前时间[ 2 ]不在设定任务时间内[ 7 -> 24 ],等待十秒后继续...
2023-10-29 02:33:13.907 | DEBUG    | __main__:<module>:215 - [ 1.17 ]当前时间[ 2 ]不在设定任务时间内[ 7 -> 24 ],等待十秒后继续...
2023-10-29 02:33:23.918 | DEBUG    | __main__:<module>:215 - [ 1.17 ]当前时间[ 2 ]不在设定任务时间内[ 7 -> 24 ],等待十秒后继续...
2023-10-29 02:33:33.929 | DEBUG    | __main__:<module>:215 - [ 1.17 ]当前时间[ 2 ]不在设定任务时间内[ 7 -> 24 ],等待十秒后继续...
2023-10-29 02:33:43.940 | DEBUG    | __main__:<module>:215 - [ 1.17 ]当前时间[ 2 ]不在设定任务时间内[ 7 -> 24 ],等待十秒后继续...
2023-10-29 02:33:53.951 | DEBUG    | __main__:<module>:215 - [ 1.17 ]当前时间[ 2 ]不在设定任务时间内[ 7 -> 24 ],等待十秒后继续...
2023-10-29 02:34:03.961 | DEBUG    | __main__:<module>:215 - [ 1.17 ]当前时间[ 2 ]不在设定任务时间内[ 7 -> 24 ],等待十秒后继续...
2023-10-29 02:34:13.972 | DEBUG    | __main__:<module>:215 - [ 1.17 ]当前时间[ 2 ]不在设定任务时间内[ 7 -> 24 ],等待十秒后继续...
2023-10-29 02:34:23.983 | DEBUG    | __main__:<module>:215 - [ 1.17 ]当前时间[ 2 ]不在设定任务时间内[ 7 -> 24 ],等待十秒后继续...
2023-10-29 02:34:33.994 | DEBUG    | __main__:<module>:215 - [ 1.17 ]当前时间[ 2 ]不在设定任务时间内[ 7 -> 24 ],等待十秒后继续...
2023-10-29 02:34:44.004 | DEBUG    | __main__:<module>:215 - [ 1.17 ]当前时间[ 2 ]不在设定任务时间内[ 7 -> 24 ],等待十秒后继续...
2023-10-29 02:34:54.015 | DEBUG    | __main__:<module>:215 - [ 1.17 ]当前时间[ 2 ]不在设定任务时间内[ 7 -> 24 ],等待十秒后继续...
2023-10-29 02:35:04.026 | DEBUG    | __main__:<module>:215 - [ 1.17 ]当前时间[ 2 ]不在设定任务时间内[ 7 -> 24 ],等待十秒后继续...
2023-10-29 02:35:14.035 | DEBUG    | __main__:<module>:215 - [ 1.17 ]当前时间[ 2 ]不在设定任务时间内[ 7 -> 24 ],等待十秒后继续...
2023-10-29 02:35:24.041 | DEBUG    | __main__:<module>:215 - [ 1.17 ]当前时间[ 2 ]不在设定任务时间内[ 7 -> 24 ],等待十秒后继续...
2023-10-29 02:35:34.052 | DEBUG    | __main__:<module>:215 - [ 1.17 ]当前时间[ 2 ]不在设定任务时间内[ 7 -> 24 ],等待十秒后继续...
2023-10-29 02:35:44.063 | DEBUG    | __main__:<module>:215 - [ 1.17 ]当前时间[ 2 ]不在设定任务时间内[ 7 -> 24 ],等待十秒后继续...
2023-10-29 02:35:54.074 | DEBUG    | __main__:<module>:215 - [ 1.17 ]当前时间[ 2 ]不在设定任务时间内[ 7 -> 24 ],等待十秒后继续...
2023-10-29 02:36:04.085 | DEBUG    | __main__:<module>:215 - [ 1.17 ]当前时间[ 2 ]不在设定任务时间内[ 7 -> 24 ],等待十秒后继续...
2023-10-29 02:36:14.096 | DEBUG    | __main__:<module>:215 - [ 1.17 ]当前时间[ 2 ]不在设定任务时间内[ 7 -> 24 ],等待十秒后继续...

URL清单模板内容

https://mksoftcdnhp.mydown.com/652ff27e/326dd26091def44c795c5fbc526776a0/uploadsoft/TSBrowser_842_6.0.3.8.exe
https://file1.updrv.com/soft/DriveTheLife/8_16_19_56/DriveTheLife_36906_S_8_16_19_56.exe
http://file.drivergenius.com/DGSetup_Home_BZ.exe
https://ergu.nvcung.cn/download/%E7%8C%8E%E8%B1%B9%E5%85%8D%E8%B4%B9WIFI_18_415132.exe
http://dubapkg.cmcmcdn.com/cs/166nsoft/WIFI%E5%85%B1%E4%BA%AB%E5%A4%A7%E5%B8%88.exe
https://pcclient.download.youku.com/iku-win-release/51/youkuclient_setup_9.2.17.1002.exe
https://dl.2345.cc/pinyin/2345pinyin_v7.9.1.8332.exe
https://dl.2345.com/pdfcvt/2345PdfConverter_v2.9.0.809.exe

一行一个直链即可