OnionBurn is a Flutter-based ephemeral chat app that leverages Tor hidden services to create a peer-to-peer connection between your phone and a browser over the Tor network. This enables highly private, throwaway chat sessions. The app launches a temporary Tor hidden service on your device, exposes a local chat web interface, and allows direct, encrypted WebSocket chatting between your phone and any web browser accessing the Onion URL.
- Ephemeral Tor Hidden Service: Starts a Tor hidden service for your device with single-tap bootstrapping.
- Peer-to-Peer Chat: Secure messaging between your phone and a browser via Tor (uses WebSocket).
- No Registration, No History: Deletes chat and keys on session shutdown, maximizing privacy.
- Web Browser Friendly: The chat interface is an HTML+JavaScript page with modern UX.
- Status Logging: In-app logs keep you aware of Tor and session status.
- Start the App: Launch the Flutter app. It automatically actions Tor startup and waits for it to be ready.
- Hidden Service Creation: Once Tor is ready, the app spins up a local HTTP server and exposes it as a Tor hidden service.
- Share Onion URL: The generated
.onionaddress is displayed; share this with your intended peer. They can use Tor Browser or similar. - P2P WebSocket Chat: When your peer accesses the link, they get a browser-based chat interface. Messages are exchanged end-to-end using WebSockets (even if both peers are remote).
- Session Destroy: When done, close the session; this will cleanly shut down Tor and purge hidden service keys.
- Flutter SDK (3.x or newer recommended)
- Dart (compatible with your selected Flutter)
- Tor app or binary: The
tor_hidden_serviceplugin manages Tor on your device. - A Tor-supporting phone or emulator (Android preferred; iOS support is experimental and may require additional setup)
- Package dependencies:
fluttertor_hidden_service
-
Clone or Download:
Grab the source for this project and place the Dart code into your Flutter project'slib/main.dart. -
Add Dependencies:
Add dependencies in yourpubspec.yaml:dependencies: flutter: sdk: flutter tor_hidden_service: ^latest_version
-
Android Extra Setup:
- Android:
Ensure internet permission is granted in yourAndroidManifest.xml:<uses-permission android:name="android.permission.INTERNET" />
- For Tor binary, the
tor_hidden_servicepackage will install it automatically.
- Android:
-
iOS Extra Setup:
- iOS requires additional configuration to run Tor and bind local ports. See package documentation.
-
Run The App:
flutter run
Boot the app on your device/emulator.
Once Tor finishes bootstrapping, you’ll get an Onion URL. -
Connect a Browser Peer:
Send the Onion link (http://xyz.onion) to a friend.
The peer should open it in Tor Browser on desktop or mobile.
The browser will show the chat interface and connect via WebSocket.
- Ephemeral keys: Onion service keys are deleted at session end.
- Single peer: Only one browser can connect per chat session.
- Tor Isolation: All traffic traverses Tor for privacy.
- No message retention: Messages are never stored on disk.
main.dart: Contains all code (Flutter UI, Tor logic, local server, chat protocol).- HTML+JS for the browser interface is embedded as a constant inside
main.dart.
- Uses tor_hidden_service for simple Tor lifecycle management.
- The chat interface uses HTML and browser-native WebSockets for instant messaging.
- Automatically detects Tor’s bootstrap status and Onion readiness.
- UI for sharing Onion address & live message logs.
- Start the app (
flutter run). - Wait for "Tor Ready" and Onion address display.
- Share the Onion address.
- Peer connects via Tor Browser, enters chat, can send/receive messages.
- End session by clicking the 'trash' button to destroy chat and keys.
- Tor not bootstrapping? Ensure you have a working internet connection and the Tor binary is installed.
- Browser cannot connect? Verify the peer uses a full Tor Browser. Plain browsers cannot open .onion links.
- Session ends unexpectedly? Only one browser peer is allowed per session to keep keys ephemeral.
MIT License.
See LICENSE file for details.
- Tor Project
- tor_hidden_service Dart package
- Flutter, Dart, and the open source community.
Screen images and GIFs (Add here for full walkthrough if needed)
This is an educational privacy-focused chat demo app. Use at your own risk and for learning purposes only.