mirror of
https://github.com/hyb-oyqq/FRAISEMOE-Addons-Installer-NEXT.git
synced 2025-12-17 20:40:29 +00:00
feat(core): 增强IPv6支持和优化功能
- 添加IPv6可用性检查,优化用户界面反馈。 - 实现IPv6检测方法,确保用户在启用IPv6时获得准确提示。 - 更新下载线程设置,修正aria2c参数以提高兼容性。
This commit is contained in:
@@ -333,7 +333,7 @@ class HostsManager:
|
||||
print(f"清理hosts文件失败: {e}")
|
||||
return False
|
||||
|
||||
def apply_ip(self, hostname, ip_address):
|
||||
def apply_ip(self, hostname, ip_address, clean=True):
|
||||
if not self.original_content:
|
||||
if not self.backup():
|
||||
return False
|
||||
@@ -347,8 +347,9 @@ class HostsManager:
|
||||
return False
|
||||
|
||||
try:
|
||||
# 首先清理已有的同域名记录
|
||||
self.clean_hostname_entries(hostname)
|
||||
# 首先清理已有的同域名记录(如果需要)
|
||||
if clean:
|
||||
self.clean_hostname_entries(hostname)
|
||||
|
||||
# 然后添加新记录
|
||||
lines = self.original_content.splitlines()
|
||||
|
||||
Reference in New Issue
Block a user