Daze is software to help you pass through the firewalls, in other words, proxy. Daze uses a simple but efficient protocol, making sure you never get detected or blocked.
Daze is designed as a single-file application. First of all, compile or download daze:
$ git clone https://github.com/mohanson/daze $ cd daze # On Linux or macOS $ ./cmd/develop.sh # On Windows $ ./cmd/develop.ps1
Build results will be saved in the directory
bin. You can just keep this directory, and all other files are not required.
Daze is dead simple to use:
# server port # you need a machine that can access the Internet, and enter the following command: $ daze server -l 0.0.0.0:1081 -k $PASSWORD # client port # use the following command to link your server(replace $SERVER with your server IP): $ daze client -s $SERVER:1081 -k $PASSWORD # now, you are free to visit the Internet $ curl -x socks5://127.0.0.1:1080 google.com
For users who have already finished tutorials, here is an advanced guide.
daze is implemented in pure Go language, so it can run on almost any operating system. The following are only the browsers/operating system commonly used by me:
GOOS=android GOARCH=arm64 go build -o daze github.com/mohanson/daze/cmd/daze
daze client -l 127.0.0.1:1080 ...in the termux.
Chrome does not support setting proxies, so a third-party plugin must be used. Proxy SwitchyOmega works very well.
Firefox can configure a proxy in
Connection Settings ->
Manual proxy configuration ->
SOCKSv5 Host=127.0.0.1 and
Port=1080. If you see an option
Use remote DNS on the page, check it boldly.
Daze's network model consists of 5 characters:
+-------------+ +-------------+ +----------+ +-------------+ +-----------+ | Destination | <----> | Daze server | <----> | Firewall | <----> | Daze client | <----> | User | +-------------+ +------+------+ +----------+ +-------------+ +-----------+ | | | +------------- Middle Protocol ------------+-- Client Protocol --+
Daze client implements 5 different proxy protocols in one port, they are HTTP Proxy, HTTPS Tunnel, SOCKS4, SOCKS4a, and SOCKS5.
# HTTP Proxy $ curl -x http://127.0.0.1:1080 http(s)://google.com # HTTPS Tunnel $ curl -x http://127.0.0.1:1080 http(s)://google.com # SOCKS4 $ curl -x socks4://127.0.0.1:1080 http(s)://google.com # SOCKS4a $ curl -x socks4a://127.0.0.1:1080 http(s)://google.com # SOCKS5 $ curl -x socks5://127.0.0.1:1080 http(s)://google.com
Why can one port support so many protocols? Because it's magic!
Daze currently has 4 middle protocols.
Default protocol. Ashe is a TCP-based cryptographic proxy protocol. The main purpose of this protocol is to bypass firewalls while providing a good user experience, so it only provides minimal security, which is one of the reasons for choosing the RC4 algorithm.
Note that it is your responsibility to ensure that the server and client's date and time are consistent, the ashe protocol allows a deviation of two minutes.
Protocol baboon is the ashe protocol based on HTTP. The daze server will pretend to be an HTTP service. If the user sends the correct password, the daze server will provide the proxy service, otherwise, it will behave as a normal HTTP service. To use the baboon protocol, you need to specify the protocol name and a fake site:
$ daze server ... -p baboon -e https://github.com $ daze client ... -p baboon
Protocol czar is the ashe protocol base on TCP multiplexing. For the uninitiated, multiplexing is the practice of reusing a single TCP connection for multiple ashe protocols. This practice saves the time of the TCP three-way handshake, but on the other hand, there is a small impairment to the data transfer rate (about 0.19%). In most cases, it has a better user experience than using the ashe protocol directly.
$ daze server ... -p czar $ daze client ... -p czar
Dahlia is an encrypted port forwarding protocol. Unlike common port forwarding tools, it needs to configure a server and a client, and the communication between the server and the client is encrypted to bypass firewall detection.
# Port forwarding from 20002 to 20000: $ daze server -l :20001 -e 127.0.0.1:20000 -p dahlia $ daze client -l :20002 -s 127.0.0.1:20001 -p dahlia
Proxy control is a rule that determines whether network requests (TCP and UDP) go directly to the destination or are forwarded to the daze server. Use the
-f option in the daze client to adjust the proxy configuration, you can choose
Daze uses a "rule.ls" file to customize your own rules(optional). "rule.ls" has the highest priority in routers so you should carefully maintain it. The "rule.ls" is located on the "./rule.ls" by default, or you can use
daze client -r path/to/rule.ls to apply it.
L a.com R b.com B c.com
Glob is supported, such as
Daze also uses a CIDR(Classless Inter-Domain Routing) file to route addresses. The CIDR file is located at "./rule.cidr", and has a lower priority than "rule.ls". When an IP address is in the CIDR file, daze will use the local network to establish the connection instead of a proxy.