{"id":13700894,"url":"https://github.com/mohanson/daze","last_synced_at":"2025-04-12T03:13:45.727Z","repository":{"id":28301044,"uuid":"110637302","full_name":"mohanson/daze","owner":"mohanson","description":"Daze is a tool to help you link to the Internet.","archived":false,"fork":false,"pushed_at":"2025-03-27T01:52:25.000Z","size":787,"stargazers_count":29,"open_issues_count":5,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T03:13:39.638Z","etag":null,"topics":["gfw","gfw-breaker","go","golang","proxy","socks","socks4","socks5"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mohanson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-14T03:46:39.000Z","updated_at":"2025-03-27T01:52:29.000Z","dependencies_parsed_at":"2023-10-15T03:27:18.773Z","dependency_job_id":"66cd600e-c9a2-4a28-8da1-f168ffdb453f","html_url":"https://github.com/mohanson/daze","commit_stats":{"total_commits":171,"total_committers":1,"mean_commits":171.0,"dds":0.0,"last_synced_commit":"4d4d7c234d4299698f2e9c6b886eaccd17499cbd"},"previous_names":["godump/daze"],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohanson%2Fdaze","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohanson%2Fdaze/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohanson%2Fdaze/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohanson%2Fdaze/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohanson","download_url":"https://codeload.github.com/mohanson/daze/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248510002,"owners_count":21116130,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gfw","gfw-breaker","go","golang","proxy","socks","socks4","socks5"],"created_at":"2024-08-02T20:01:05.581Z","updated_at":"2025-04-12T03:13:45.721Z","avatar_url":"https://github.com/mohanson.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Daze\n\nDaze is a software that helps you pass through firewalls, in other words, a proxy. It uses a simple yet efficient protocol, ensuring that you never get detected or blocked.\n\n# Getting Started\n\nDaze is designed as a single-file application. First, compile or [download](https://github.com/mohanson/daze/releases) daze:\n\n```sh\n$ git clone https://github.com/mohanson/daze\n$ cd daze\n\n# On Linux or macOS\n$ cmd/develop.sh\n# On Windows\n$ cmd/develop.ps1\n```\n\nThe build results will be saved in the bin directory. You can keep this directory, and all other files are not required.\n\nDaze is dead simple to use:\n\n```sh\n# Server side\n# You need a machine that can access the Internet, and enter the following command:\n$ daze server -l 0.0.0.0:1081 -k $PASSWORD\n\n# Client side\n# Use the following command to link your server(replace $SERVER with your server IP):\n$ daze client -s $SERVER:1081 -k $PASSWORD\n# Now, you are free to visit the Internet\n$ curl -x socks5://127.0.0.1:1080 google.com\n```\n\nDaze is still under development. You should make sure that the server and client have the same version number (check with the `daze ver` command) or commit hash.\n\n# Using Daze for Different Platforms\n\nDaze is implemented in pure Go language, so it can run on almost any operating system. The following are some of the browsers/operating systems commonly used by me:\n\n## Android\n\n0. Cross-compile daze for Android: `GOOS=android GOARCH=arm64 go build -o daze github.com/mohanson/daze/cmd/daze`\n0. Push the compiled file to the phone. You can use [adb](https://developer.android.com/studio/command-line/adb) or create an HTTP server and download daze with `wget` in [termux](https://play.google.com/store/apps/details?id=com.termux\u0026hl=en).\n0. Run `daze client -l 127.0.0.1:1080 ...` in the termux.\n0. Set the proxy for phone: WLAN -\u003e Settings -\u003e Proxy -\u003e Fill in `127.0.0.1:1080`\n\n## Chrome\n\nChrome does not support setting proxies, so a third-party plugin must be used. [Proxy SwitchyOmega](https://chrome.google.com/webstore/detail/proxy-switchyomega/padekgcemlokbadohgkifijomclgjgif?hl=en) works very well.\n\n## Firefox\n\nFirefox can configure a proxy in `Connection Settings` -\u003e `Manual proxy configuration` -\u003e `SOCKSv5 Host=127.0.0.1` and `Port=1080`. If you see an option `Use remote DNS` on the page, check it.\n\n# Network Model And Concepts\n\nDaze's network model consists of 7 components:\n\n```text\n+-------------+        +-------------+        +----------+        +-------------+        +-----------+\n| Destination | \u003c----\u003e | Daze server | \u003c----\u003e | Firewall | \u003c----\u003e | Daze client | \u003c----\u003e |    User   |\n+-------------+        +------+------+        +----------+        +-------------+        +-----------+\n                              |                                          |                     |\n                              +------------- Middle Protocol ------------+-- Client Protocol --+\n```\n\n- Destination: The destination is an internet service provider, for example, google.com.\n- Daze Server: A daze server is an instance that runs using the command `daze server`.\n- Firewall: A firewall is a network security system that monitors and controls incoming and outgoing network traffic based on pre-determined security rules.\n- Daze Client: A daze client is an instance that runs using the command `daze client`.\n- User: A user is a browser or any other application attempting to access the destination.\n- Middle Protocol: The middle protocol is the communication protocol between the daze server and daze client. Data is encrypted and obfuscated to bypass firewalls.\n- Client Protocol: The client protocol is the communication protocol between the daze client and the user.\n\n# Protocols\n\n## Client Protocols\n\nThe daze client implements 6 different proxy protocols in one port. These protocols are http proxy, https tunnel, socks4, socks4a, socks5 and socks5h.\n\n```sh\n# Protocol http proxy\n$ curl -x http://127.0.0.1:1080    http://google.com\n# Protocol https tunnel\n$ curl -x http://127.0.0.1:1080    https://google.com\n# Protocol socks4\n$ curl -x socks4://127.0.0.1:1080  https://google.com\n# Protocol socks4a\n$ curl -x socks4a://127.0.0.1:1080 https://google.com\n# Protocol socks5\n$ curl -x socks5://127.0.0.1:1080  https://google.com\n# Protocol socks5h\n$ curl -x socks5h://127.0.0.1:1080 https://google.com\n```\n\nWhy can one port support so many protocols? Because it's magic!\n\n## Middle Protocols\n\nDaze currently has 4 middle protocols.\n\n### Ashe\n\nThe default protocol used by daze is called ashe. Ashe is a TCP-based cryptographic proxy protocol designed to bypass firewalls while providing a good user experience.\n\nPlease note that **it is the user's responsibility to ensure that the date and time on both the server and client are consistent**. The ashe protocol allows for a deviation of up to two minutes.\n\n### Baboon\n\nProtocol baboon is a variant of the ashe protocol that operates over HTTP. In this protocol, the daze server masquerades as an HTTP service and requires the user to provide the correct password in order to gain access to the proxy service. If the password is not provided, the daze server will behave as a normal HTTP service. To use the baboon protocol, you must specify the protocol name and a fake site:\n\n```sh\n$ daze server ... -p baboon -e https://github.com\n$ daze client ... -p baboon\n```\n\n### Czar\n\nProtocol czar is an implementation of the ashe protocol based on TCP multiplexing. Multiplexing involves reusing a single TCP connection for multiple ashe protocols, which saves time on the TCP three-way handshake. However, this may result in a slight decrease in data transfer rate (approximately 0.19%). In most cases, using Protocol czar provides a better user experience compared to using the ashe protocol directly.\n\n```sh\n$ daze server ... -p czar\n$ daze client ... -p czar\n```\n\n### Dahlia\n\nDahlia is a protocol used for encrypted port forwarding. Unlike many common port forwarding tools, it requires both a server and a client to be configured. Communication between the server and client is encrypted in order to bypass detection by firewalls.\n\n```sh\n# Port forwarding from 20002 to 20000:\n$ daze server -l :20001 -e 127.0.0.1:20000 -p dahlia\n$ daze client -l :20002 -s 127.0.0.1:20001 -p dahlia\n```\n\nReminder again: Dahlia is not a proxy protocol but a port forwarding protocol.\n\n# Proxy Control\n\nProxy 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.\n\n- Use local network for all requests.\n- Use remote server for all requests.\n- Use both local and remote server (default).\n\n## File rule.ls\n\nDaze 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.\n\n```text\nL a.com\nR b.com\nB c.com\n```\n\n- L(ocale) means using local network\n- R(emote) means using proxy\n- B(anned) means to block it, often used to block ads\n\nGlob is supported, such as `R *.google.com`.\n\n## File rule.cidr\n\nDaze 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\".\n\nBy default, daze has configured rule.cidr for China's mainland. You can update it manually via `daze gen cn`, this will pull the latest data from [http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest](http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest).\n\n# DNS resolver\n\nThe DNS server and DNS protocol used by daze can be specified through command line parameters.\n\n- `DNS: daze ... -dns 1.1.1.1:53`\n- `DoT: daze ... -dns 1.1.1.1:853`\n- `DoH: daze ... -dns https://1.1.1.1/dns-query`\n\nThis [article](https://www.cloudflare.com/learning/dns/dns-over-tls/) briefly describes the difference between them. I know many people don't like to read articles, so I just suggest that add `-dns 1.1.1.1:853` in daze.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohanson%2Fdaze","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohanson%2Fdaze","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohanson%2Fdaze/lists"}