mirror of
https://github.com/NewFuture/DDNS.git
synced 2026-10-20 00:16:45 +00:00
* Initial plan * feat: replace flake8 and black with ruff for unified linting and formatting Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com> * refactor: use astral-sh/ruff-action@v3 for cleaner CI workflow Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com> * run format * use fmt skip * fix cloudflare * fix cron * fix cron * fix fileio tests * fix fileio tests * fix cron --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com> Co-authored-by: New Future <NewFuture@users.noreply.github.com>
20 lines
586 B
Python
20 lines
586 B
Python
# coding=utf-8
|
|
"""
|
|
DebugProvider
|
|
仅打印出 IP 地址,不进行任何实际 DNS 更新。
|
|
"""
|
|
|
|
from ._base import SimpleProvider
|
|
|
|
|
|
class DebugProvider(SimpleProvider):
|
|
def _validate(self):
|
|
"""无需任何验证"""
|
|
pass
|
|
|
|
def set_record(self, domain, value, record_type="A", ttl=None, line=None, **extra):
|
|
self.logger.debug("DebugProvider: %s(%s) => %s", domain, record_type, value)
|
|
ip_type = "IPv4" if record_type == "A" else "IPv6" if record_type == "AAAA" else record_type
|
|
print("[{}] {}".format(ip_type, value))
|
|
return True
|