-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 大幅提高性能; - 全面解锁Github; - 解锁Google翻译、chrome浏览器翻译; - 解锁tinyMediaManager刮削
- Loading branch information
Showing
7 changed files
with
1,297 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -274,7 +274,7 @@ def set_dns_servers(ipv4_dns_list: list[str], ipv6_dns_list: list[str]): | |
"static", | ||
ipv4_dns_list[0], | ||
], | ||
check=True | ||
check=True, | ||
) | ||
for dns in ipv4_dns_list[1:]: | ||
subprocess.run( | ||
|
@@ -288,7 +288,7 @@ def set_dns_servers(ipv4_dns_list: list[str], ipv6_dns_list: list[str]): | |
dns, | ||
"index=2", | ||
], | ||
check=True | ||
check=True, | ||
) | ||
except subprocess.CalledProcessError as e: | ||
logger.error(f"设置IPv4 DNS for {interface}失败: {e}") | ||
|
@@ -308,7 +308,7 @@ def set_dns_servers(ipv4_dns_list: list[str], ipv6_dns_list: list[str]): | |
"static", | ||
ipv6_dns_list[0], | ||
], | ||
check=True | ||
check=True, | ||
) | ||
for dns in ipv6_dns_list[1:]: | ||
subprocess.run( | ||
|
@@ -322,7 +322,7 @@ def set_dns_servers(ipv4_dns_list: list[str], ipv6_dns_list: list[str]): | |
dns, | ||
"index=2", | ||
], | ||
check=True | ||
check=True, | ||
) | ||
except subprocess.CalledProcessError as e: | ||
logger.error(f"设置IPv6 DNS for {interface}失败: {e}") | ||
|
@@ -583,7 +583,19 @@ def run_as_admin(): | |
|
||
if __name__ == "__main__": | ||
parser = argparse.ArgumentParser( | ||
description="DNS解析器和设置工具,请使用管理员权限运行" | ||
description=( | ||
"------------------------------------------------------------\n" | ||
"DNS解析器和设置工具,请使用管理员权限运行,自动设置最佳 DNS 服务器。\n" | ||
"------------------------------------------------------------\n" | ||
), | ||
epilog=( | ||
"------------------------------------------------------------\n" | ||
"项目: https://github.com/sinspired/cnNetTool\n" | ||
"作者: Sinspired\n" | ||
"邮箱: [email protected]\n" | ||
"发布: 2024-11-11\n" | ||
), | ||
formatter_class=argparse.RawTextHelpFormatter, # 允许换行格式 | ||
) | ||
parser.add_argument("--debug", action="store_true", help="启用调试日志") | ||
parser.add_argument( | ||
|
Oops, something went wrong.