8000 feat: add --check flag for dns by shayan0v0n · Pull Request #27 · 403unlocker/403Unlocker-cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: add --check flag for dns #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jan 18, 2025

Conversation

shayan0v0n
Copy link
Member
@shayan0v0n shayan0v0n commented Jan 17, 2025

Added --check Flag for DNS

Purpose
Allows users to update the DNS cache before running the DNS performance check.

Command

./403unlocker dns -c "https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-16.8.0-ce.0.el7.x86_64.rpm/download.rpm"

or

./403unlocker dns --check "https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-16.8.0-ce.0.el7.x86_64.rpm/download.rpm"

Behavior

If --check (or -c) is specified:
    Executes CheckAndCacheDNS(fileToDownload) to validate and cache working DNS servers into common.DNS_CONFIG_FILE_CACHED.
    Reads the DNS list from common.DNS_CONFIG_FILE_CACHED.

If --check is not specified:
    Reads the DNS list directly from common.DNS_CONFIG_FILE.

Modified CheckWithURL

Changes

  • Dynamically selects the DNS list file based on the presence of the --check flag:
if c.Bool("check") {
        CheckAndCacheDNS(fileToDownload)
        dnsFile = common.DNS_CONFIG_FILE_CACHED
    } else {
        dnsFile = common.DNS_CONFIG_FILE
    }

@shayan0v0n shayan0v0n changed the title perf: add wg for dns list check feat: add --check flag for dns Jan 17, 2025
@SalehBorhani SalehBorhani merged commit 69600b7 into 403unlocker:main Jan 18, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0