rethink-app README

项目的 README,来自 github.com/celzero/rethink-app。合并为一个 markdown 文件:README.md。

Rethink DNS + Firewall + VPN for Android

A multi-hop WireGuard client, an OpenSnitch-inspired firewall and network monitor + a pi-hole-inspired DNS over HTTPS (DoH), Oblivious DoH, DNS over TLS (DoT), DNSCrypt client with blocklists.

Get it on F-Droid Get it on Google Play Get it with Obtainium

Release certificate SHA-256 digests:
Prod flavour on the Play Store & Website: 1f32d432e81a1dc5c00aafeb0c6636cd7819965d174420e59db9675dff7a88e9.
Izzy flavour: 80e15f1ed5a1ec512c51E14aa29b18c7befe13c1acb6cfec4b87bd31d171fe7f.
Alpha flavour on GitHub: 014da2d3c66439105d1238f3bcf5705d63a7ce2da2f54005f72066cf8717bbbf.

In other words, Rethink DNS + Firewall + VPN has three primary modes, VPN, DNS, and Firewall. The VPN (proxifier) mode supports multiple WireGuard upstreams in a split-tunnel configuration. The DNS mode routes all DNS traffic generated by apps to any user-chosen DNS-over-HTTPS / Oblivious DNS-over-HTTPS / DNS-over-TLS / DNSCrypt resolver, or to WireGuard-configured DNS in a split-tunnel configuration. The Firewall mode lets the user deny internet-access to entire applications based on events like screen-on / screen-off, app-foreground / app-background, unmetered-connection / metered-connection; or based on play-store defined categories like Social, Games, Utility, Productivity; or additionally, based on user-defined domain & IP denylists.

2 3 4 5

screenshots from v055e.

VPN / Proxifier

Rethink supports forwarding TCP & UDP over SOCKS5, HTTP CONNECT, and WireGuard tunnels. Split-tunneling further helps run multiple such tunnels at the same time and lets users route different apps over different tunnels. For example, one could route Firefox over SOCKS5 connecting to Tor, Netflix over WireGuard connecting through any popular VPN provider, and Telegram or WhatsApp over censorship-resistant HTTP CONNECT endpoints at the same time.

Firewall

The firewall doesn't really care about the connections per se rather what's making those connections. This is different from the traditional firewalls but in-line with Little Snitch, LuLu, Glasswire and others.

Currently, per-app connection mapping is implemented by capturing udp and tcp flows managed by firestack (written in Go) and asking ConnectivityService for the owner, an API available only on Android 10+. procfs (/proc/net/tcp and /proc/net/udp) is read on-demand to track per-app connections like NetGuard or OpenSnitch do, on Android 9 & below.

Network Monitor

A network monitor is a per-app report-card of sorts on when connections were made, how many were made, and to where. Tracking UDP / TCP (and DNS on Android 12+) is straight-forward. DNS requests are trickier to track on Android 11 & below, and so a rough heuristic is used for now, which may not hold good in all cases.

DNS over HTTPS client

Almost all of the network related code (firestack), including DNS over HTTPS split-tunnel, is a hard fork of Jigsaw-Code/outline-go-tun2socks written in golang. The UI is vastly different but borrows minimally from Jigsaw-Code/Intra. A split-tunnel traps requests sent to the VPN's DNS endpoint and relays it to a DNS-over-HTTPS / DNS-over-TLS / DNSCrypt / Oblivious DNS-over-HTTPS endpoint of the user's choosing, logging the end-to-end latency, time of request, the DNS request query itself, and its answer.

The Rethink DNS Resolver

A malware and ad-blocking DNS over HTTPS resolver at https://sky.rethinkdns.com/rs (deployed to 300+ locations world-wide via Cloudflare Workers) is the default DNS endpoint on the app, though the user is free to change that. A configurable DNS resolver that lets users add or remove denylists and allowlists, add rewrites, analyse DNS requests is launching late 2026. Right now, a free-to-use DNS over HTTPS endpoint with custom blocklists can be setup here: rethinkdns.com/configure.

The resolver, sponsored by FLOSS/fund, is deployed to Fly.io at max.rethinkdns.com, and Deno Deploy at rdns.deno.dev too, apart from the default deployment on Cloudflare Workers. The resolver is open source software: serverless-dns.

The Rethink Proxy Network

RPN is a multi-party relay, with packets exiting over serverless proxy (hosted on Cloudflare Workers) hopping over Windscribe. Users are able to self-host serverless proxy or use the ones run by us. RPN starts at $1.75/month for unlimited bandwidth and supports activating 5 locations (out of 80+) in parallel, per-device.

The proxy is open source software: serverless-proxy.

Community

GitHub Sponsors

Translation

Help translate Rethink DNS + Firewall + VPN on Weblate:

What Rethink DNS + Firewall + VPN is not

Rethink is not an anonymity tool: It helps users tackle unabated censorship and surveillance but doesn't lay claim to protecting a user's identity at all times, if ever.

Rethink does not aim to be a feature-rich traditional firewall: It is more in-line with Little Snitch than IP tables, say.

Rethink is not an anti-virus: Rethink may stop users from phishing attacks, malware, scareware websites through its DNS-based blocklists, but it doesn't actively mitigate threats or even look for them or act on them, otherwise.

What Rethink DNS + Firewall + VPN aspires to be

To turn Android devices into user-agents: Something that users can control as they please without requiring root-access. A big part of this, for an always-on, always-connected devices, is capturing network traffic and reporting it in a way that makes sense to the end-users who can then take a series of actions to limit their exposure but not necessarily eliminate it. Take DNS for example-- for most if not all connections, apps send out a DNS request first, and by tracking just those one can glean a lot of intelligence about what's happening on their Androids and which app's responsible.

To deliver the promise of open-internet for all: With the inevitable ECH (encrypted client hello) standardization and the imminent adoption of DNS-over-HTTPS and DNS-over-TLS across operating systems and browsers, we're that much closer to an open internet. Of course, Deep Packet Inspection remains a credible threat that can't be mitigated with just encrypted DNS, but it is one example of delivering maximum impact (circumvent internet censorship in most countries) with minimal effort (not requiring use of a VPN or access via IPFS, for example). Rethink would continue to make these technologies accessible in the simplest way possible, especially the ones that get 90% of the way there with 10% effort.

Development

Release   CI   License: Apache-2.0   OpenSSF Scorecard   Ask DeepWiki

  1. Feel free to fork and send a pull request for any reproducible bug fixes.
    1. The codebase is raw and is lacking documentation and comprehensive tests. If you need help, feel free to create a Wikipage to highlight the pain with building, testing, writing, committing code. DeepWiki and Copilot may also help, but they do hallucinate.
    2. Write descriptive commit messages that explain concisely the changes made.
    3. Each commit must reference an open issue on the project to make sure there isn't duplicated effort and prior discussion to refer to.
    4. If you plan to work on a feature, please create a github issue on the project first to kickstart the discussion before committing to doing any work.
    5. Prod releases are usually once every few months, while alpha is released monthly.

Tenets (unless you know better ones)

We aren't there yet, may never will be but these are some tenets for the project for the foreseeable future.

Backstory

FOSS United  Mozilla Builders  FLOSS/fund by Zerodha 

Internet censorship (sometimes ISP-enforced and often times government-enforced), unabated dragnet surveillance (by pretty much every company and app) stirred us upon this path. The three of us university classmates, Mohammed, Murtaza, Santhosh got together in late 2019 in the sleepy town of Coimbatore, India to do something about it. Our main gripe was there were all these wonderful tools that people could use but couldn't, either due to cost or due to inability to grok Computer-specific jargon. A lot has happened since we started and a lot has changed but our focus has always been on Android and its 3B+ unsuspecting users. The current idea has been in the works since May 2020, with the pandemic derailing a bit of progress, and a bit of snafu with abandoning our previous version in favour of the current fork, which we aren't proud of yet, but it is a start. All is good now that we've won a grant from the Mozilla Builders MVP program to go ahead and build this thing that we wanted to... do so faster... and not simply sleep our way through the execution. I hope you're excited but not as much as us that you quit your jobs for this like we did.

rethink-app (celzero/rethink-app)

正在搜索数据库…

这是什么?Rethink 是一款 Android 应用,集成了 DNS over HTTPS/DoT/DNSCrypt 解析器、多跳 WireGuard VPN 代理转发工具,以及无需 root 的防火墙,并支持按应用追踪连接,旨在对抗审查和监控。
这是一个应用还是三个独立的工具?这是一款 Android 应用,包含三种主要模式:VPN、DNS 和防火墙。三者可以一起使用,也可以单独使用,并不是三个独立的应用。
我需要 root 手机才能使用吗?不需要。Rethink 的所有功能,包括防火墙和连接追踪,都可以在无需 root 权限的情况下使用。
它能像 VPN 或 Tor 那样保护我的匿名性吗?不能。应用明确表示它不是匿名工具,也不能保证任何时候都隐藏你的身份,它也不是杀毒软件。
我的 DNS 流量默认在哪里解析?默认情况下,查询会发送到 Rethink 自有的、可屏蔽广告和恶意软件的 DNS over HTTPS 解析器。该解析器部署在 300 多个 Cloudflare Workers 节点上(另外还有 Fly.io 和 Deno Deploy)。你也可以将其指向任何 DoH、DoT、DNSCrypt 或 ODoH 解析器。
什么是 Rethink 代理网络(RPN)?RPN 是一项可选的付费中继服务,流量通过 Cloudflare Workers 上的无服务器代理出口,并经由 Windscribe 跳转。起价为每月 $1.75,可享无限流量,并可在 80 多个地点中同时使用 5 个节点。底层代理软件是开源的,可以自行托管。
我能否让不同的应用通过不同的隧道路由?可以。分应用隧道(split-tunneling)允许你同时让不同应用走不同的路径。例如,一个应用通过 SOCKS5 连接到 Tor,另一个通过 WireGuard 连接到 VPN 服务商,还有一个通过 HTTP CONNECT 代理。
防火墙如何决定拦截什么?它不像传统防火墙那样按 IP 或端口过滤,而是根据是哪个应用在发起连接来决定是否拦截。触发规则包括:亮屏/熄屏、前台/后台、按流量计费的网络、Play Store 应用分类,或自定义的域名/IP 拒绝列表。
作者
celzero
大小
78.5 MB
星标
5.9K
时长
6年
提交 · 90 天