Merge pull request #32 from thsrite/main
This commit is contained in:
commit
8d01630d03
@ -40,6 +40,7 @@ RUN apt-get update \
|
||||
procps \
|
||||
gosu \
|
||||
bash \
|
||||
wget \
|
||||
&& mkdir -p /etc/nginx ${HOME} \
|
||||
&& cp -f nginx.conf /etc/nginx/nginx.template.conf \
|
||||
&& mv ./public / \
|
||||
|
@ -11,7 +11,7 @@ from python_hosts import Hosts, HostsEntry
|
||||
from app.core.config import settings
|
||||
from app.log import logger
|
||||
from app.plugins import _PluginBase
|
||||
from app.schemas.types import EventType
|
||||
from app.schemas.types import EventType, NotificationType
|
||||
from app.utils.http import RequestUtils
|
||||
from app.utils.ip import IpUtils
|
||||
from app.utils.system import SystemUtils
|
||||
@ -192,7 +192,8 @@ class CloudflareSpeedTest(_PluginBase):
|
||||
"plugin_id": "CustomHosts"
|
||||
})
|
||||
if self._notify:
|
||||
logger.send_message(
|
||||
self.post_message(
|
||||
mtype=NotificationType.SiteMessage,
|
||||
title="【Cloudflare优选任务完成】",
|
||||
text=f"原ip:{old_ip}\n"
|
||||
f"新ip:{best_ip}"
|
||||
|
@ -54,7 +54,7 @@ class CustomHosts(_PluginBase):
|
||||
|
||||
# 更新错误Hosts
|
||||
self.update_config({
|
||||
"hosts": self._hosts,
|
||||
"hosts": ''.join(self._hosts),
|
||||
"err_hosts": error_hosts,
|
||||
"enabled": self._enabled
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user