所有匹配主题的 Gist dns

timmy / Dnsmasq 設定與網路管理

0 喜欢
0 派生
1 文件
最后活跃于 10 months ago
這份 dnsmasq 設定檔 用於 管理 DNS 和 DHCP 服務,提供 本機網路名稱解析、靜態 IP 配置、DNS 轉發、快取與封鎖特定域名。它設定了 Google、Hinet 作為上游 DNS,開啟 DNS 查詢日誌,並定義 DHCP 位址範圍、靜態 IP 綁定與特定域名解析。適用於 內部網路架構、加速 DNS 解析、提升隱私安全及廣告封鎖 等場景。
1 bogus-priv # Block fake private IP responses
2 no-resolv # Ignore /etc/resolv.conf for upstream DNS
3 dns-forward-max=150 # Limit parallel DNS queries to 150
4 clear-on-reload # Clear cache when dnsmasq reloads
5 domain-needed # Ignore queries without a domain name
6 no-negcache # Do not cache negative (non-existent) DNS responses
7 no-poll # Do not poll /etc/resolv.conf for changes
8 strict-order # Use upstream DNS servers in the order they are listed
9
10 # AdGuard DNS 封鎖廣告和追蹤器。

timmy / DNSBL 黑名單查詢工具

0 喜欢
0 派生
1 文件
最后活跃于 10 months ago
這段程式碼是一個 DNSBLChecker 工具,用於檢查指定的 IP 是否被列入常見的 DNS 黑名單(DNSBL)。支持動態添加或移除 DNSBL 提供者,並顯示檢查結果,包括列入的黑名單列表。
1 import dns.resolver
2
3 class DNSBLChecker:
4 def __init__(self, providers=None):
5 """
6 初始化 DNSBLChecker,允許自定義 DNSBL 提供者列表。
7 :param providers: DNSBL 提供者列表 (可選,默認為常用黑名單提供者)
8 """
9 self.providers = providers or [
10 "zen.spamhaus.org",
上一页 下一页