- Notifications
You must be signed in to change notification settings - Fork1
yjavaherian/shecanak
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
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...).
Choose one of the following methods to set up Shecanak:
This is the recommended method as it bundles all dependencies.
- Ensure you have Docker and Docker Compose installed.
- Clone this repository:
git clone https://github.com/yjavaherian/shecanak --depth 1cd shecanak - Add the domains you would like to proxy to the
domains.csvfile, one domain per line. - Build and run the containers in detached mode:Your DNS server will be running on port 53.
docker compose up -d --build
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.
- Clone this repository:
git clone https://github.com/yjavaherian/shecanak --depth 1cd shecanak - Add the domains you would like to proxy to the
domains.csvfile, one domain per line. - Make the installation script executable:
chmod +x install_sniproxy.sh
- Run the installation script with root privileges:Your DNS server will be running on port 53.
sudo ./install_sniproxy.sh
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:
Check if systemd-resolved is using port 53:
sudo ss -lp'sport = :53'# Or using lsof# sudo lsof -i :53
If you see
systemd-resolvelisted, it's occupying the port.Edit the resolved configuration file:Open the configuration file using a text editor with root privileges:
sudo nano /etc/systemd/resolved.conf
Disable the stub listener:Find the line
#DNSStubListener=yes(it might be commented out). Uncomment it (remove the#) and changeyestono:[Resolve]#DNS=#FallbackDNS=#Domains=#LLMNR=no#MulticastDNS=no#DNSSEC=no#DNSOverTLS=no#Cache=no-negativeDNSStubListener=no # <-- Change this line#ReadEtcHosts=yesSave the file and exit the editor (Ctrl+X, then Y, then Enter in
nano).Restart systemd-resolved:Apply the changes by restarting the service:
sudo systemctl restart systemd-resolved
Verify port 53 is free:Run the check command again:
sudo ss -lp'sport = :53'# Or# sudo lsof -i :53
You should no longer see
systemd-resolvelistening on port 53.Update
/etc/resolv.conf(Important):Disabling the stub listener means your system might lose its DNS configuration, as/etc/resolv.confoften 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.confafterwards. 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.confor 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:Note that this file might be overwritten by network management tools.# 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
- Option A (Recommended if using NetworkManager): Ensure NetworkManager is configured to manage
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
Uh oh!
There was an error while loading.Please reload this page.