Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

build you own DNS server to bypass geographic sanctions.

NotificationsYou must be signed in to change notification settings

yjavaherian/shecanak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

build your personalshecan.

ورژن فارسیREADME-fa.md

You can use this project to set up your own personal DNS with anti-sanctions capabilities by proxying specific domains.

Note: This project provides configuration and installation scripts (including Docker setup) to simplify the deployment ofmosajjal/sniproxy. All Credit should go toAli Mosajjal.

Note: Do not use this as a VPN, your IP will getblocked;only use this with domains that are not available due tosanctions (e.g. npm packages, pytorch, tensorflow, etc...).

Setup

Choose one of the following methods to set up Shecanak:

Method 1: Using Docker (Recommended)

This is the recommended method as it bundles all dependencies.

  1. Ensure you have Docker and Docker Compose installed.
  2. Clone this repository:
    git clone https://github.com/yjavaherian/shecanak --depth 1cd shecanak
  3. Add the domains you would like to proxy to thedomains.csv file, one domain per line.
  4. Build and run the containers in detached mode:
    docker compose up -d --build
    Your DNS server will be running on port 53.

Method 2: Using Installation Script (Debian-based)

This method uses a script to installsniproxy.

Note: This script is primarily designed for Debian-based Linux distributions (like Ubuntu, Debian). It may require modifications for other systems.

  1. Clone this repository:
    git clone https://github.com/yjavaherian/shecanak --depth 1cd shecanak
  2. Add the domains you would like to proxy to thedomains.csv file, one domain per line.
  3. Make the installation script executable:
    chmod +x install_sniproxy.sh
  4. Run the installation script with root privileges:
    sudo ./install_sniproxy.sh
    Your DNS server will be running on port 53.

Troubleshooting: Port 53 Conflict with systemd-resolved

On some Linux distributions (like Ubuntu 18.04 and later), thesystemd-resolved service runs a local DNS stub listener on127.0.0.53:53. This can conflict with Shecanak if it tries to bind to port 53 (either directly via the script method or through Docker).

If you encounter errors like "port already in use" or "address already in use" for port 53 when starting the service or the Docker container, follow these steps to disable thesystemd-resolved stub listener:

  1. Check if systemd-resolved is using port 53:

    sudo ss -lp'sport = :53'# Or using lsof# sudo lsof -i :53

    If you seesystemd-resolve listed, it's occupying the port.

  2. Edit the resolved configuration file:Open the configuration file using a text editor with root privileges:

    sudo nano /etc/systemd/resolved.conf
  3. Disable the stub listener:Find the line#DNSStubListener=yes (it might be commented out). Uncomment it (remove the#) and changeyes tono:

    [Resolve]#DNS=#FallbackDNS=#Domains=#LLMNR=no#MulticastDNS=no#DNSSEC=no#DNSOverTLS=no#Cache=no-negativeDNSStubListener=no # <-- Change this line#ReadEtcHosts=yes

    Save the file and exit the editor (Ctrl+X, then Y, then Enter innano).

  4. Restart systemd-resolved:Apply the changes by restarting the service:

    sudo systemctl restart systemd-resolved
  5. Verify port 53 is free:Run the check command again:

    sudo ss -lp'sport = :53'# Or# sudo lsof -i :53

    You should no longer seesystemd-resolve listening on port 53.

  6. Update/etc/resolv.conf (Important):Disabling the stub listener means your system might lose its DNS configuration, as/etc/resolv.conf often points to the stub listener (127.0.0.53). You need to configure your system's DNS manually or ensure your network manager (like NetworkManager or systemd-networkd) correctly updates/etc/resolv.conf.

    • Option A (Recommended if using NetworkManager): Ensure NetworkManager is configured to manage/etc/resolv.conf. Often, restarting NetworkManager helps:sudo systemctl restart NetworkManager. Check/etc/resolv.conf afterwards. It should now point to your actual upstream DNS servers (e.g., your router or public DNS like 1.1.1.1).
    • Option B (Manual): You might need to manually edit/etc/resolv.conf or configure your network interface settings to use specific DNS servers.Be cautious with this, as incorrect settings can break DNS resolution. A common temporary fix is:
      # Example: Using Cloudflare DNSecho"nameserver 1.1.1.1"| sudo tee /etc/resolv.confecho"nameserver 1.0.0.1"| sudo tee -a /etc/resolv.conf
      Note that this file might be overwritten by network management tools.

After completing these steps, port 53 should be available for Shecanak. You can now try starting the service or runningdocker compose up -d again.

About

build you own DNS server to bypass geographic sanctions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp