mirror of
https://github.com/hyb-oyqq/FRAISEMOE-Addons-Installer-NEXT.git
synced 2025-12-17 04:20:28 +00:00
feat(core): 增强IPv6支持和优化功能
- 添加IPv6可用性检查,优化用户界面反馈。 - 实现IPv6检测方法,确保用户在启用IPv6时获得准确提示。 - 更新下载线程设置,修正aria2c参数以提高兼容性。
This commit is contained in:
@@ -319,18 +319,18 @@ class CloudflareOptimizer:
|
||||
success_message += f"IPv6: {self.optimized_ipv6}\n"
|
||||
|
||||
if hostname:
|
||||
# 先清理可能存在的旧记录
|
||||
# 先清理可能存在的旧记录(只清理一次)
|
||||
self.hosts_manager.clean_hostname_entries(hostname)
|
||||
|
||||
success = False
|
||||
|
||||
# 应用优选IP到hosts文件
|
||||
if ipv4_success:
|
||||
success = self.hosts_manager.apply_ip(hostname, self.optimized_ip) or success
|
||||
success = self.hosts_manager.apply_ip(hostname, self.optimized_ip, clean=False) or success
|
||||
|
||||
# 如果启用IPv6并且找到了IPv6地址,也应用到hosts
|
||||
if ipv6_success:
|
||||
success = self.hosts_manager.apply_ip(hostname, self.optimized_ipv6) or success
|
||||
success = self.hosts_manager.apply_ip(hostname, self.optimized_ipv6, clean=False) or success
|
||||
|
||||
if success:
|
||||
msg_box = QtWidgets.QMessageBox(self.main_window)
|
||||
|
||||
Reference in New Issue
Block a user