{"id":14561855,"url":"https://github.com/celzero/firestack","last_synced_at":"2025-10-05T13:32:14.832Z","repository":{"id":43345916,"uuid":"342821317","full_name":"celzero/firestack","owner":"celzero","description":"Userspace wireguard and network monitor","archived":false,"fork":false,"pushed_at":"2024-05-19T13:20:44.000Z","size":63899,"stargazers_count":66,"open_issues_count":15,"forks_count":14,"subscribers_count":7,"default_branch":"n2","last_synced_at":"2024-05-19T14:21:51.639Z","etag":null,"topics":["android","firewall","networkmonitor","proxy","vpn","wireguard"],"latest_commit_sha":null,"homepage":"https://rethinkdns.com/app","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/celzero.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-27T09:45:34.000Z","updated_at":"2024-05-22T17:52:44.075Z","dependencies_parsed_at":"2023-02-18T18:46:16.488Z","dependency_job_id":"c5e02b08-ad22-4cb5-9b50-ea6ec43eae71","html_url":"https://github.com/celzero/firestack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celzero%2Ffirestack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celzero%2Ffirestack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celzero%2Ffirestack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celzero%2Ffirestack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/celzero","download_url":"https://codeload.github.com/celzero/firestack/tar.gz/refs/heads/n2","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248290033,"owners_count":21078923,"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":["android","firewall","networkmonitor","proxy","vpn","wireguard"],"created_at":"2024-09-07T02:01:01.603Z","updated_at":"2025-10-05T13:32:14.814Z","avatar_url":"https://github.com/celzero.png","language":"Go","funding_links":[],"categories":["android"],"sub_categories":[],"readme":"# Firestack\n\nA userspace TCP/UDP connection monitor, firewall, DNS resolver, and [WireGuard](https://github.com/wireguard/wireguard-go) client for Android.\n\nFirestack is built specifically for [Rethink DNS + Firewall + VPN](https://github.com/celzero/rethink-app). [gVisor/netstack](https://github.com/google/gvisor/tree/go/pkg/tcpip) provides a SOCKS-like interface (similar to [badvpn's tun2socks](https://github.com/ambrop72/badvpn)) for TCP and UDP connections over a tun-device.\n\nFirestack is a hard-fork of Google's [outline-go-tun2socks](https://github.com/Jigsaw-Code/outline-go-tun2socks) project.\n\n## DNS\n\nFirestack supports DNS over HTTPS, DNS over TLS, Oblivious DNS over HTTPS, DNSCrypt v3, and plain old DNS upstreams.\n\n## WireGuard\n\nFirestack runs WireGuard in userspace. When running *multiple* WireGuard tunnels at once, only TCP and UDP are forwarded to the tunnels; but otherwise\nICMP and DNS are as well. ARP / IGMP / SCTP / RTP and other IP protocols are *not* forwarded to WireGuard tunnels.\n\n[\u003cimg src=\"https://fossunited.org/files/fossunited-white.svg\"\n     alt=\"FOSS United\"\n     height=\"40\"\u003e](https://fossunited.org/grants)\u0026emsp;\n\nWireGuard integration was sponsored by [FOSS United](https://fossunited.org/grants).\n\n## Releases\n\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/celzero/firestack/badge)](https://securityscorecards.dev/viewer/?uri=github.com/celzero/firestack)\n\nFirestack is released as an Android Library (`aar`) and can be integrated into\nyour Android builds via [Jitpack](https://jitpack.io/#celzero/firestack) ([ref](https://github.com/celzero/rethink-app/commit/a6e2abca7)) or [Maven Central (OSSRH)](https://central.sonatype.com/artifact/com.celzero/firestack/overview).\n\n```gradle\n    // add this to your project's build.gradle\n    allprojects {\n        repositories {\n            ...\n            // if consuming from maven central\n            // ref: central.sonatype.org/consume\n            mavenCentral()\n            ...\n            // if consuming from jitpack\n            // ref: docs.jitpack.io/android/#installing\n            maven { url 'https://jitpack.io' }\n            ...\n        }\n    }\n\n    // add the dep to your app's build.gradle\n    dependencies {\n        ...\n        // maven central (stripped)\n        implementation 'com.celzero:firestack:Tag@aar'\n        ...\n        // jitpack (stripped)\n        implementation 'com.github.celzero:firestack:Tag@aar'\n        // jitpack (debug symbols)\n        implementation 'com.github.celzero:firestack:Tag:debug@aar'\n        ...\n    }\n```\n\n## API\n\nThe APIs aren't stable and hence left undocumented, but you can look at\nRethink DNS + Firewall + VPN codebase: ([GoVpnAdapter](https://github.com/celzero/rethink-app/blob/982849564/app/src/main/java/com/celzero/bravedns/net/go/GoVpnAdapter.java#L164-L232),\n [BraveVpnService](https://github.com/celzero/rethink-app/blob/982849564/app/src/main/java/com/celzero/bravedns/service/BraveVPNService.kt#L130-L137)) to see how to integrate with Firestack on Android.\n\n## Build\n\nFirestack only supports Android. Instructions for other platforms are left as-is, but they may or may not work.\n\n### Prerequisites\n\n- macOS host (iOS, macOS)\n- make\n- Go \u003e= 1.22\n- A C compiler (e.g.: clang, gcc)\n\nFirestack APIs are available only on Android builds for now. iOS and Linux support planned but nothing concrete yet.\n\n### Android\n\n- [sdkmanager](https://developer.android.com/studio/command-line/sdkmanager)\n  1. Download the command line tools from [developer.android.com](https://developer.android.com/studio).\n  1. Unzip the pacakge as `~/Android/Sdk/cmdline-tools/latest/`. Make sure `sdkmanager` is located at `~/Android/Sdk/cmdline-tools/latest/bin/sdkmanager`\n- Android NDK 28+\n  ```bash\n  # Install the NDK (exact NDK version obtained from `sdkmanager --list`)\n  ~/Android/Sdk/cmdline-tools/latest/bin/sdkmanager \"platforms;android-36\" \"ndk;28.2.13676358\"\n  # Set up the environment variables:\n  export ANDROID_NDK_HOME=~/Android/Sdk/ndk/28.2.13676358 ANDROID_HOME=~/Android/Sdk\n  ```\n- [gomobile](https://pkg.go.dev/golang.org/x/mobile/cmd/gobind) (installed as needed by `make`)\n\n### Apple (iOS and macOS)\n\n- Xcode\n- [gomobile](https://pkg.go.dev/golang.org/x/mobile/cmd/gobind) (installed as needed by `make`)\n\n### Linux and Windows\n\nWe build binaries for Linux and Windows from source without any custom integrations.\n`xgo` and Docker are required to support cross-compilation.\n\n- [Docker](https://docs.docker.com/get-docker/) (for XGO)\n- [xgo](https://github.com/crazy-max/xgo) (installed as needed by `make`)\n- [ghcr.io/crazy-max/xgo Docker image](https://github.com/crazy-max/xgo/pkgs/container/xgo) (~6.8GB pulled by `xgo`).\n\n## Make\n\n```\n# creates build/intra/{tun2socks.aar,tun2socks-sources.jar}\nmake clean \u0026\u0026 make intra\n\n```\nIf needed, you can extract the jni files into `build/android/jni` with:\n```bash\nunzip build/android/tun2socks.aar 'jni/*' -d build/android\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcelzero%2Ffirestack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcelzero%2Ffirestack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcelzero%2Ffirestack/lists"}