|
33 | 33 | SHOW_TRENDING = config_manager.get_bool('DEFAULT', 'show_trending') |
34 | 34 | NOT_CLOSE_CONSOLE = config_manager.get_bool('DEFAULT', 'not_close') |
35 | 35 | TELEGRAM_BOT = config_manager.get_bool('DEFAULT', 'telegram_bot') |
| 36 | +BYPASS_DNS = config_manager.get_bool('DEFAULT', 'bypass_dns') |
36 | 37 |
|
37 | 38 |
|
38 | 39 | # Variable |
@@ -227,16 +228,16 @@ def main(script_id = 0): |
227 | 228 | # Get all site hostname |
228 | 229 | hostname_list = [hostname for site_info in config_manager.configSite.values() if (hostname := _extract_hostname(site_info.get('full_url')))] |
229 | 230 |
|
230 | | - if not internet_manager.check_dns_resolve(hostname_list): |
231 | | - print() |
232 | | - console.print("[red] ERROR: DNS configuration is required!") |
233 | | - console.print("[red]The program cannot function correctly without proper DNS settings.") |
234 | | - console.print("[yellow]Please configure one of these DNS servers:") |
235 | | - console.print("[blue]• Cloudflare (1.1.1.1) 'https://developers.cloudflare.com/1.1.1.1/setup/windows/'") |
236 | | - console.print("[blue]• Quad9 (9.9.9.9) 'https://docs.quad9.net/Setup_Guides/Windows/Windows_10/'") |
237 | | - console.print("\n[yellow]⚠️ The program will not work until you configure your DNS settings.") |
238 | | - |
239 | | - os._exit(0) |
| 231 | + if not BYPASS_DNS: |
| 232 | + if not internet_manager.check_dns_resolve(hostname_list): |
| 233 | + console.print("[red] ERROR: DNS configuration is required!") |
| 234 | + console.print("[red]The program cannot function correctly without proper DNS settings.") |
| 235 | + console.print("[yellow]Please configure one of these DNS servers:") |
| 236 | + console.print("[red]• Cloudflare (1.1.1.1) 'https://developers.cloudflare.com/1.1.1.1/setup/windows/'") |
| 237 | + console.print("[red]• Quad9 (9.9.9.9) 'https://docs.quad9.net/Setup_Guides/Windows/Windows_10/'") |
| 238 | + console.print("\n[yellow]⚠️ The program will not work until you configure your DNS settings.") |
| 239 | + |
| 240 | + os._exit(0) |
240 | 241 |
|
241 | 242 | # Load search functions |
242 | 243 | search_functions = load_search_functions() |
|
0 commit comments