Total Pageviews

Wednesday 11 November 2015

ShadowDNS

A DNS forwarder using Shadowsocks as the server.
ShadowDNS creates a DNS server at localhost.
Experimental; use with caution.

Install

OS X:

brew install swig
git clone https://github.com/mcepl/M2Crypto
cd M2Crypto
pip3 install -r dev-requirements.txt
sudo python3 setup.py install
cd ~
sudo pip3 install shadowdns
(得到的可执行文件是ssdns,位置:/usr/local/bin/ssdns)

Windows:

Install M2Crypto (Google an M2Crypto Windows installer for your python version and install it. Might be complicated, need someone to write a help here).
easy_install pip
pip install shadowdns

Debian / Ubuntu:

apt-get install python-pip python-m2crypto
pip install shadowdns

CentOS:

yum install m2crypto python-setuptools
easy_install pip
pip install shadowdns

Usage

Create a config file /etc/shadowdns.json (or put it in other path). Example:
{
    "server":"my_server_ip",
    "server_port":8388,
    "local_address": "127.0.0.1",
    "password":"mypassword",
    "method":"aes-256-cfb",
    "dns":"8.8.8.8"
}
Explanation of the fields:
NameExplanation
serverthe address your server listens
server_portserver port
local_addressthe address your local listens
passwordpassword used for encryption
methodencryption method, "aes-256-cfb" is recommended
dnsDNS server to use
Run sudo ssdns -c /etc/shadowdns.json on your local machine.
Set your DNS to 127.0.0.1
from https://github.com/Long-live-shadowsocks/ShadowDNS
shadowsocks/ShadowDNS
---------------
我在mac上安装成功,但是运行此程序遇错。