{"id":13397549,"url":"https://github.com/getlantern/lantern","last_synced_at":"2026-04-02T23:53:30.774Z","repository":{"id":37725569,"uuid":"1380117","full_name":"getlantern/lantern","owner":"getlantern","description":"Open-source VPN for speed, privacy, and censorship circumvention. Free to download on Android, iOS, Windows, macOS, and Linux.","archived":false,"fork":false,"pushed_at":"2026-03-04T05:09:20.000Z","size":1014926,"stargazers_count":15259,"open_issues_count":12,"forks_count":11132,"subscribers_count":470,"default_branch":"main","last_synced_at":"2026-03-04T12:26:29.079Z","etag":null,"topics":["accelerator","censorship","circumvention","gfw","lantern","router","vpn"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getlantern.png","metadata":{"files":{"readme":"README-dev.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["getlantern"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":["https://lantern.io/donate"]}},"created_at":"2011-02-17T22:12:29.000Z","updated_at":"2026-03-04T11:06:31.000Z","dependencies_parsed_at":"2026-02-26T11:03:33.021Z","dependency_job_id":null,"html_url":"https://github.com/getlantern/lantern","commit_stats":{"total_commits":4916,"total_committers":75,"mean_commits":65.54666666666667,"dds":0.7691212367778681,"last_synced_commit":"e8b859953cbd37547eef4bc1517c7020b9321cfb"},"previous_names":[],"tags_count":461,"template":false,"template_full_name":null,"purl":"pkg:github/getlantern/lantern","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlantern%2Flantern","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlantern%2Flantern/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlantern%2Flantern/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlantern%2Flantern/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getlantern","download_url":"https://codeload.github.com/getlantern/lantern/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlantern%2Flantern/sbom","scorecard":{"id":424365,"data":{"date":"2025-08-11","repo":{"name":"github.com/getlantern/lantern","commit":"8e3101c5c97ff78eb5e6642716c3d726b6f12570"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/26 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/mirror.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 8.2.6 not signed: https://api.github.com/repos/getlantern/lantern/releases/221622720","Warn: release artifact 7.9.5 not signed: https://api.github.com/repos/getlantern/lantern/releases/172164165","Warn: release artifact 7.8.6 not signed: https://api.github.com/repos/getlantern/lantern/releases/164444810","Warn: release artifact 7.8.5 not signed: https://api.github.com/repos/getlantern/lantern/releases/150826742","Warn: release artifact 7.8.4 not signed: https://api.github.com/repos/getlantern/lantern/releases/150257688","Warn: release artifact 8.2.6 does not have provenance: https://api.github.com/repos/getlantern/lantern/releases/221622720","Warn: release artifact 7.9.5 does not have provenance: https://api.github.com/repos/getlantern/lantern/releases/172164165","Warn: release artifact 7.8.6 does not have provenance: https://api.github.com/repos/getlantern/lantern/releases/164444810","Warn: release artifact 7.8.5 does not have provenance: https://api.github.com/repos/getlantern/lantern/releases/150826742","Warn: release artifact 7.8.4 does not have provenance: https://api.github.com/repos/getlantern/lantern/releases/150257688"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'devel'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Binary-Artifacts","score":0,"reason":"binaries present in source code","details":["Warn: binary detected: archive/LanternMobileTestbed/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: archive/MobileSDK/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: archive/PubSub/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: archive/installer-resources/windows/nsis_plugins/ShellExecAsUser.dll:1","Warn: binary detected: archive/installer-resources/windows/nsis_plugins/nsProcess.dll:1","Warn: binary detected: archive/installer-resources/windows/nsis_plugins/nsProcessW.dll:1","Warn: binary detected: archive/pubsub-java/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: archive/src/github.com/getlantern/elevate/binaries/osx/cocoasudo:1","Warn: binary detected: archive/src/github.com/getlantern/keyman/certimporter/Release/certimporter.exe:1","Warn: binary detected: archive/src/github.com/getlantern/lantern-mobile/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: archive/src/github.com/getlantern/lantern-mobile/libs/x86/libtun2socks.so:1","Warn: binary detected: archive/src/github.com/getlantern/pac-cmd/binaries/darwin/pac:1","Warn: binary detected: archive/src/github.com/getlantern/pac-cmd/binaries/linux_386/pac:1","Warn: binary detected: archive/src/github.com/getlantern/pac-cmd/binaries/linux_amd64/pac:1","Warn: binary detected: archive/src/github.com/getlantern/pac-cmd/binaries/windows/pac.exe:1","Warn: binary detected: archive/src/github.com/getlantern/systray/dll/systray.dll:1","Warn: binary detected: archive/src/github.com/getlantern/systray/example/example_windows_386.exe:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/mirror.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/getlantern/lantern/mirror.yml/devel?enable=pin","Warn: containerImage not pinned by hash: archive/Dockerfile:4: pin your Docker image by updating fedora:21 to fedora:21@sha256:a268e5e12257c7770eb44c24041baf5e728fba2eed1a84f007b81845ded0a485","Warn: containerImage not pinned by hash: archive/src/golang.org/x/net/http2/Dockerfile:9: pin your Docker image by updating ubuntu:trusty to ubuntu:trusty@sha256:64483f3496c1373bfd55348e88694d1c4d0c9b660dee6bfef5e12f43b9933b30","Warn: downloadThenRun not pinned by hash: archive/Dockerfile:56","Warn: npmCommand not pinned by hash: archive/Dockerfile:58","Warn: goCommand not pinned by hash: archive/src/github.com/getlantern/flashlight/genconfig/genglobal.bash:23","Warn: goCommand not pinned by hash: archive/src/github.com/getlantern/flashlight/genconfig/genproxies.bash:29","Warn: goCommand not pinned by hash: archive/src/github.com/getlantern/systray/embeddll.bash:9","Warn: goCommand not pinned by hash: archive/src/github.com/getlantern/systray/example/icon/make_icon.sh:10","Warn: goCommand not pinned by hash: archive/src/github.com/getlantern/tarfs/demo/build.bash:3","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 containerImage dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned","Info:   0 out of   5 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T01:56:26.350Z","repository_id":37725569,"created_at":"2025-08-19T01:56:26.350Z","updated_at":"2025-08-19T01:56:26.350Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30192917,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"ssl_error","status_checked_at":"2026-03-06T18:57:34.882Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["accelerator","censorship","circumvention","gfw","lantern","router","vpn"],"created_at":"2024-07-30T18:01:30.360Z","updated_at":"2026-04-02T23:53:30.764Z","avatar_url":"https://github.com/getlantern.png","language":"Dart","readme":"# Lantern — Developer Guide\n\nCensorship circumvention tool available for free download on any operating system\n\n![cover page](https://github.com/getlantern/.github/blob/main/resources/cover_page.png)\n\n\n---\n\n## Table of Contents\n\n1. [Overview](#1-overview)\n2. [Prerequisites](#2-prerequisites)\n3. [Getting Started](#3-getting-started)\n4. [Lantern Core](#4-lantern-core)\n5. [Building \u0026 Running](#5-building--running)\n   - [macOS](#51-macos)\n   - [iOS](#52-ios)\n   - [Android](#53-android)\n   - [Windows](#54-windows)\n   - [Linux](#55-linux)\n6. [Building Your Changes in CI](#6-building-your-changes-in-ci)\n7. [Testing](#7-testing)\n   - [Unit \u0026 Widget Tests](#71-unit--widget-tests)\n   - [Integration Tests](#72-integration-tests)\n   - [Linux VPN Smoke Test](#73-linux-vpn-smoke-test)\n8. [Release \u0026 Publishing](#8-release--publishing)\n   - [Tag format](#tag-format)\n   - [How to release](#how-to-release)\n   - [Nightly builds](#nightly-builds)\n9. [Auto-Updater](#9-auto-updater)\n\n---\n\n## 1. Overview\n\nLantern is a censorship circumvention tool built with Flutter on the frontend and Go on the backend. The two layers communicate through a bridge that uses either FFI (macOS, Windows, Linux) or platform channels (iOS, Android).\n\n**Core stack:**\n\n| Layer | Technology |\n|---|---|\n| UI | Flutter + Dart |\n| State management | Riverpod |\n| Navigation | AutoRoute |\n| Dependency injection | GetIt |\n| Native bridge | Go via gomobile (FFI / platform channels) |\n| Wire protocol | Protobuf |\n\n---\n\n## 2. Prerequisites\n\nThe following tools must be installed and available on your `PATH` before building any platform target.\n\n| Tool | Required Version | Notes |\n|---|---|---|\n| Flutter | 3.41.0 (stable) | [flutter.dev](https://flutter.dev) or [fvm](https://fvm.app) |\n| Go | 1.25.4 | [go.dev/dl](https://go.dev/dl) or [mise](https://mise.jdx.dev) |\n| Git | any recent | system package manager |\n| IDE | — | [Android Studio](https://developer.android.com/studio) or [VS Code](https://code.visualstudio.com) with the [Flutter extension](https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter) |\n| Xcode | 26.x | Required only for iOS and macOS targets. Install from the Mac App Store. |\n| gomobile | latest | Required for all platforms. Install via `make install-gomobile`. |\n\n\u003e The Flutter version is pinned in `pubspec.yaml` and the Go version is declared in `go.mod`. Using mismatched versions will cause build errors.\n\nVerify your setup:\n\n```bash\nflutter doctor\ngo version\n```\n\nPlatform-specific dependencies (Xcode, Android SDK, Visual Studio, etc.) are listed in each platform section below.\n\n---\n\n## 3. Getting Started\n\nAfter cloning the repository, install Flutter package dependencies:\n\n```bash\nflutter pub get\n```\n\n\n\u003e [!IMPORTANT]\n\u003e The app requires an `app.env` file at the repo root to configure API keys and environment-specific settings. Obtain `app.env` from **1Password** and place it at the root of the repository before building.\n\nThis resolves the Dart/Flutter packages declared in `pubspec.yaml` and writes dependency metadata to `.dart_tool/`. It must be run at least once before any build, and re-run whenever `pubspec.yaml` or `pubspec.lock` changes (e.g. after pulling commits that add or update packages).\n\n---\n\n## 4. Lantern Core\n\n`lantern-core/` is the Go backend that powers all VPN and networking functionality. It is compiled into a native library and embedded into each platform target — as an `.xcframework` on Apple platforms, an `.aar` on Android, and a shared `.so`/`.dll` on desktop.\n\n### How the bridge works\n\nThe Go backend is compiled into a platform-native library using `gomobile`. Dart communicates with it through one of two mechanisms depending on the platform:\n\n- **FFI** (`dart:ffi`) — used on desktop platforms (macOS, Windows, Linux). Dart calls C-exported Go functions directly in-process. Lower overhead, synchronous call support.\n- **Platform channels** (gomobile bindings) — used on mobile platforms (iOS, Android). Dart sends messages over a named channel; the native side invokes the Go library and returns the result asynchronously.\n\nBoth paths go through `LanternService` in Dart, which delegates to either `LanternFFIService` (desktop) or `LanternPlatformService` (mobile) based on the current platform.\n\n| Platform | Bridge mechanism | Output artifact |\n|---|---|---|\n| macOS | FFI via `dart:ffi` | `Liblantern.xcframework` |\n| iOS | Platform channels (gomobile) | `Lantern.xcframework` |\n| Android | Platform channels (gomobile) | `liblantern.aar` |\n| Windows | FFI via `dart:ffi` | `liblantern.dll` |\n| Linux | FFI via `dart:ffi` | `liblantern.so` |\n\n### Key packages inside `lantern-core/`\n\n| Directory | Purpose |\n|---|---|\n| `core.go` | Entry point — initialises Radiance and wires up subsystems |\n| `ffi/` | FFI entry points exposed to Dart on desktop platforms |\n| `mobile/` | gomobile bindings for iOS and Android |\n| `vpn_tunnel/` | Cross-platform VPN tunnel management |\n| `private-server/` | Private server provisioning and management |\n| `apps/` | Per-platform app-level helpers |\n| `cmd/` | CLI entry points (service binaries) |\n| `stub/` | Stub implementations used in tests |\n\n### Updating the Go backend\n\nAfter making changes inside `lantern-core/`, rebuild the native library for your target platform before running the Flutter app:\n\n```bash\n# macOS\nmake macos\n\n# iOS\nmake ios\n\n# Android\nmake android-debug\n\n# Windows\nmake windows\n\n# Linux\nmake linux\n```\n\n---\n\n## 5. Building \u0026 Running\n\n---\n\n### 5.1 macOS\n\n#### Prerequisites\n\n- **Xcode 26.x** with macOS platform components installed\n- After installing or updating Xcode, initialize the command-line tools once:\n\n  ```bash\n  sudo xcodebuild -runFirstLaunch\n  ```\n\n#### Provisioning profile\n\n\u003e [!IMPORTANT]\n\u003e A valid provisioning profile is required to build and sign the macOS app. Find the credentials in **1Password** under **BNS Apple Developer ID**, then download and import the profile to Xcode (by going to **Signing \u0026 Capabilities**).\n\n#### Build and run\n\nBuild the native Go framework (outputs to `macos/Frameworks/`):\n\n```bash\nmake macos\n```\n\nRun the Flutter desktop app:\n\n```bash\nflutter run -d macos\n```\n\n\u003e **Xcode alternative:** Open `macos/Runner.xcworkspace` directly in Xcode to build and run without the CLI.\n\n---\n\n### 5.2 iOS\n\n#### Prerequisites\n\n- **Xcode 26.x** with the iOS Simulator or a physical iOS device\n\n#### Provisioning profile\n\n\u003e [!IMPORTANT]\n\u003e A valid provisioning profile is required to build and run on a physical device. Find the credentials in **1Password** under **BNS Apple Developer ID**, then download and import the profile to Xcode (by going to **Signing \u0026 Capabilities**).\n\n#### Build and run\n\nBuild the native iOS framework (outputs to `ios/Frameworks/`):\n\n```bash\nmake ios\n```\n\nList available devices and simulators:\n\n```bash\nflutter devices\n```\n\nRun on a specific device using its ID:\n\n```bash\nflutter run -d \u003cdeviceID\u003e\n```\n\n\u003e **Xcode alternative:** Open `ios/Runner.xcworkspace` directly in Xcode to build and run without the CLI.\n\n---\n\n### 5.3 Android\n\n#### Prerequisites\n\n- **Java 17 or newer** — Required by Gradle. Install a JDK distribution such as [Eclipse Temurin](https://adoptium.net) and ensure `JAVA_HOME` points to it.\n\n  ```bash\n  java -version   # should print 17.x or higher\n  ```\n\n- **Android Studio** (or the standalone [Android command-line tools](https://developer.android.com/studio#command-line-tools-only)) — provides the `sdkmanager` utility used in the next step.\n\n#### Install Android SDK components\n\n```bash\nmake install-android-sdk\n```\n\nThis installs the following components and accepts all SDK licenses automatically:\n\n| Component | Version |\n|---|---|\n| Platform | android-35 (API 35) |\n| Build tools | 35.0.0 |\n| NDK | 27.0.12077973 |\n| CMake | 3.22.1 |\n\nAfter the NDK is installed, set the following environment variables so the build tools can locate it:\n\n```bash\nexport ANDROID_NDK_HOME=$ANDROID_SDK_ROOT/ndk/27.0.12077973\nexport ANDROID_NDK_ROOT=$ANDROID_NDK_HOME\nexport NDK_HOME=$ANDROID_NDK_HOME\n```\n\n\u003e Rather than adding these to your global shell profile, manage them with a repo-local config file:\n\u003e - **[direnv](https://direnv.net)**: place the `export` lines in a `.envrc` file at the repo root, then run `direnv allow`. Add `.envrc` to `.git/info/exclude` to keep it untracked.\n\u003e - **[mise](https://mise.jdx.dev)**: add an `[env]` block to a `.mise.local.toml` file at the repo root (`*.local.toml` files are intended for personal overrides and are not committed).\n\n#### Install build dependencies\n\nInstalls the necessary libraries and packages required for Android development:\n\n```bash\nmake install-android-deps\n```\n\n#### Build and run\n\nBuild the native Go AAR library (outputs to `android/app/libs/`):\n\n```bash\nmake android\n```\n\nList connected devices:\n\n```bash\nflutter devices\n```\n\nRun on a connected Android device or emulator:\n\n```bash\nflutter run -d \u003cdeviceID\u003e\n```\n\n#### Debug build\n\nTo build a debug APK directly:\n\n```bash\nmake android-debug\n```\n\nOutput APK location:\n\n```\nbuild/app/outputs/flutter-apk/app-debug.apk\n```\n\n---\n\n### 5.4 Windows\n\nThe Windows build separates the backend (a Windows Service binary) from the Flutter UI. During development you can run the backend in console mode instead of registering it as a real service, which makes for a faster iteration loop.\n\n#### Prerequisites\n\n- **Windows 10** or newer\n- **Visual Studio 2022** with the **Desktop development with C++** workload (required by Flutter Windows)\n- **PowerShell 5.1+** (included with Windows 10)\n- **Go** and **Flutter** as listed in [Prerequisites](#2-prerequisites)\n\n#### Quick dev loop\n\n1. Build the Windows service binary (from an elevated PowerShell):\n\n   ```powershell\n   make windows-service-build\n   ```\n\n2. Start the backend in console mode:\n\n   ```powershell\n   .\\bin\\windows-amd64\\lanternsvc.exe --console\n   ```\n\n3. Build the native shared library:\n\n   ```bash\n   make windows\n   ```\n\n4. Run the Flutter desktop app:\n\n   ```bash\n   flutter run -d windows\n   ```\n\nThe Flutter app communicates with the service via a named pipe.\n\n#### Running as a real Windows Service\n\nTo run the backend as a real Windows Service during development, use the [helper scripts](scripts/windows) from an elevated PowerShell:\n\n| Script | Purpose |\n|---|---|\n| `service_install.ps1` | Install and start the service |\n| `service_stop.ps1` | Stop the service |\n| `service_remove.ps1` | Remove the service |\n\n---\n\n### 5.5 Linux\n\n#### Prerequisites\n\n- **Ubuntu 20.04+ or Debian 11+** (other systemd-based distros should work)\n- **systemd** — the backend runs as a systemd daemon\n- `apt` package manager for the install step\n- **Go** and **Flutter** as listed in [Prerequisites](#2-prerequisites)\n\n#### Install build dependencies\n\n```bash\nmake install-linux-deps\n```\n\n#### Build\n\nBuild the Linux release artifacts (`.deb` package):\n\n```bash\nmake linux-release\n```\n\n#### Install and run\n\n1. Install the `.deb` package (requires root only for this step):\n\n   ```bash\n   sudo apt install ./lantern-installer-*.deb\n   ```\n\n2. Check the daemon is running:\n\n   ```bash\n   systemctl status lanternd.service\n   ```\n\n3. Run the Flutter app as your normal user:\n\n   ```bash\n   flutter run -d linux\n   ```\n\n#### Troubleshooting\n\nView daemon logs:\n\n```bash\njournalctl -u lanternd.service -n 200 --no-pager\n```\n\n#### Uninstall\n\n```bash\nsudo systemctl disable --now lanternd.service\nsudo apt remove lantern\nsudo rm -f /usr/lib/systemd/system/lanternd.service /usr/lib/lantern/lanternd\nsudo systemctl daemon-reload\n```\n\n---\n\n## 6. Building Your Changes in CI\n\nIf you want to generate a build for your changes to test, you can trigger a nightly build manually from GitHub Actions against your branch.\n\n1. Go to **Actions** → **Build and Release** in the GitHub repository\n2. Click **Run workflow**\n3. Select your branch from the branch dropdown\n4. Set **Build type** to `nightly`\n5. Set **Platforms** to the platform(s) you want to build (e.g. `android`, `ios`, or `all`)\n6. Click **Run workflow**\n\n\u003e **Note:** Triggering from a non-default branch creates a draft release that is automatically deleted after the artifacts are uploaded. You can download the artifacts directly from the workflow run summary before they are cleaned up.\n\n---\n\n## 7. Testing\n\n---\n\n### 7.1 Unit \u0026 Widget Tests\n\nRun all unit and widget tests:\n\n```bash\nflutter test test/\n```\n\nRun a single test file:\n\n```bash\nflutter test test/features/vpn/vpn_test.dart\n```\n\nRun with coverage:\n\n```bash\nflutter test --coverage\n```\n\n---\n\n### 7.2 Integration Tests\n\nIntegration tests use the `integration_test` package with headless widget tests and in-memory fakes.\n\nRun all integration tests:\n\n```bash\nflutter test integration_test\n```\n\nRun a single integration test file:\n\n```bash\nflutter test integration_test/private_server_flow_test.dart\n```\n\n---\n\n### 7.3 Linux VPN Smoke Test\n\nEnd-to-end VPN connect/disconnect test on Linux:\n\n```bash\nflutter test integration_test/vpn/linux_connect_smoke_test.dart \\\n  -d linux \\\n  --dart-define=DISABLE_SYSTEM_TRAY=true \\\n  --dart-define=ENABLE_IP_CHECK=true\n```\n\n---\n\n## 8. Release \u0026 Publishing\n\nReleases are triggered by pushing a Git tag. CI picks up the tag, determines the build type and target platforms from the tag format, builds all relevant platform artifacts, and publishes a GitHub release.\n\n### Tag format\n\n| Tag | Build type | Platforms |\n|---|---|---|\n| `v1.2.3` | Production | All |\n| `v1.2.3-beta` | Beta | All |\n| `v1.2.3-android` | Production | Android only |\n| `v1.2.3-macos` | Production | macOS only |\n| `v1.2.3-ios` | Production | iOS only |\n| `v1.2.3-windows` | Production | Windows only |\n| `v1.2.3-linux` | Production | Linux only |\n\n### How to release\n\n**All platforms — production:**\n\n```bash\ngit tag v1.2.3\ngit push origin v1.2.3\n```\n\n**All platforms — beta:**\n\n```bash\ngit tag v1.2.3-beta\ngit push origin v1.2.3-beta\n```\n\n**Single platform:**\n\n```bash\ngit tag v1.2.3-android\ngit push origin v1.2.3-android\n```\n\n### Nightly builds\n\nA nightly build runs automatically every day at 04:00 UTC from the default branch, building all platforms with `BUILD_TYPE=nightly`. No tag is required. The draft release is deleted after artifacts are uploaded to S3.\n\n---\n\n## 9. Auto-Updater\n\nThe app supports automatic updates on macOS and Windows using the [auto_updater](https://pub.dev/packages/auto_updater) package, which is a Flutter-friendly wrapper around the Sparkle update framework.\n\n### How it works\n\nOn startup, the app downloads the `appcast.xml` feed hosted [in the repo](appcast.xml) 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.\n\n### Generating the appcast\n\nThe `appcast.xml` is generated dynamically as part of the release process using a [Python script](scripts/generate_appcast.py):\n\n```bash\npython3 scripts/generate_appcast.py\n```\n\nThe script:\n1. Fetches releases and their associated `.dmg` and `.exe` files via the GitHub API\n2. Signs each asset using the `auto_updater:sign_update` Dart CLI tool\n3. Emits an [appcast.xml](appcast.xml) with signature, size, and version metadata\n","funding_links":["https://github.com/sponsors/getlantern","https://lantern.io/donate"],"categories":["Uncategorized","Go","工具","\u003ca id=\"af9d2b4988d35a2a634c042a1c66bb8c\"\u003e\u003c/a\u003e工具","视频资料","Proxy and VPN Tools","应用","综合","Bypass Censorship","Categories"],"sub_categories":["Uncategorized","\u003ca id=\"6e28befd418dc5b22fb3fd234db322d3\"\u003e\u003c/a\u003e翻墙","技术细节","Utils","实用工具","Other applications","Network tunnels"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetlantern%2Flantern","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetlantern%2Flantern","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetlantern%2Flantern/lists"}