Skip to content

Latest commit

 

History

History
138 lines (92 loc) · 4.05 KB

File metadata and controls

138 lines (92 loc) · 4.05 KB

Lantern

en zh ru ar fa my

Censorship circumvention tool available for free download on any operating system

cover page

Setup project

Build and run the app on macOS

make macos
flutter run -d macos

Build and run the app on Windows

Quick dev loop (run backend in a console)

  1. Build the Windows service binary
# In an elevated PowerShell
make windows-service-build
  1. Start the backend
.\bin\windows-amd64\lanternsvc.exe --console
  1. Build the windows shared library
make windows
  1. Run the Flutter desktop app
flutter run -d windows

That's it! The Flutter app will talk to the service via the named pipe.

If you prefer running the backend as a real Windows Service during development, use the helper scripts from an elevated PowerShell

Build and run the app on iOS

  1. Install Go and gomobile
go install golang.org/x/mobile/cmd/gomobile@latest
gomobile init
  1. Build and run on an emulator or physical device
make ios
flutter devices
flutter run -d deviceID

Build and run the Android app

  1. Install Go and gomobile
go install golang.org/x/mobile/cmd/gomobile@latest
gomobile init
  1. Install Android SDK and NDK
sdkmanager "ndk;23.1.7779620" "cmake;3.18.1" "platform-tools"
  1. Build the Android app
make android-debug

After running make android-debug, you’ll find the APK here:

build/app/outputs/flutter-apk/app-debug.apk

Running integration tests

We use integration_test with headless widget tests and in-memory fakes

Run all integration tests (headless)

flutter test integration_test

Run a single test

flutter test integration_test/private_server_flow_test.dart

Auto-Updater Integration

The app supports automatic updates on macOS and Windows, using the auto_updater package, which is a Flutter-friendly wrapper around the Sparkle update framework.

On startup, the app downloads the appcast.xml feed, hosted in the repo and on S3. This file lists the latest version and the signed .dmg or .zip update files. The updater downloads the update and installs it via Sparkle.

We generate the appcast.xml dynamically using a Python script as part of our release process:

python3 scripts/generate_appcast.py

The script works by fetching releases, the associated .dmg and .exe files, via the GitHub API, signing each asset using the auto_updater:sign_update Dart CLI tool, and emitting an appcast.xml with signature, size, and version metadata.