An open API service indexing awesome lists of open source software.

https://github.com/getlantern/lantern

Open-source VPN for speed, privacy, and censorship circumvention. Free to download on Android, iOS, Windows, macOS, and Linux.
https://github.com/getlantern/lantern

accelerator censorship circumvention gfw lantern router vpn

Last synced: about 8 hours ago
JSON representation

Open-source VPN for speed, privacy, and censorship circumvention. Free to download on Android, iOS, Windows, macOS, and Linux.

Awesome Lists containing this project

README

          

# Lantern
[![en](https://github.com/getlantern/.github/blob/main/resources/English.svg)](https://github.com/getlantern/.github/blob/main/profile/README.md)
[![zh](https://github.com/getlantern/.github/blob/main/resources/Chinese.svg)](https://github.com/getlantern/.github/blob/main/profile/README.zh.md)
[![ru](https://github.com/getlantern/.github/blob/main/resources/Russian.svg)](https://github.com/getlantern/.github/blob/main/profile/README.ru.md)
[![ar](https://github.com/getlantern/.github/blob/main/resources/Arabic.svg)](https://github.com/getlantern/.github/blob/main/profile/README.ar.md)
[![fa](https://github.com/getlantern/.github/blob/main/resources/Farsi.svg)](https://github.com/getlantern/.github/blob/main/profile/README.fa.md)
[![my](https://github.com/getlantern/.github/blob/main/resources/Burmese.svg)](https://github.com/getlantern/.github/blob/main/profile/README.my.md)
---
Censorship circumvention tool available for free download on any operating system

![cover page](https://github.com/getlantern/.github/blob/main/resources/cover_page.png)

# Setup project

* [Flutter (3.32.XX)](https://flutter.dev)
* [Android Studio](https://developer.android.com/studio?_gl=1*1wowe6v*_up*MQ..&gclid=Cj0KCQjw6auyBhDzARIsALIo6v-bn0juONfkfmQAJtwssRCQWADJMgGfRBisMNTSXHt5CZnyZVSK2Y8aAgCmEALw_wcB&gclsrc=aw.ds) (Android Studio Jellyfish | 2023.3.1 Patch 1)
* [gomobile](https://github.com/golang/go/wiki/Mobile#tools)
* [Xcode](https://developer.apple.com/xcode/resources/)
* [Git](https://git-scm.com/downloads)
* [Android NDK](#steps-to-run-the-project)
* NDK should be version 26.x, for example 26.0.10792818.

# Build and run the app on macOS

```
make macos
flutter run -d macos
```

# Build and run the app on Linux (systemd daemon, no sudo)

1. Build Linux artifacts

```bash
make linux-release
```

2. Install the `.deb` (requires root only for install)

```bash
sudo apt install ./lantern-installer-*.deb
```

3. Check daemon status

```bash
systemctl status lanternd.service
```

4. Run Lantern app as your normal user

```bash
flutter run -d linux
```

Troubleshooting:

```bash
journalctl -u lanternd.service -n 200 --no-pager
```

Uninstall / cleanup:

```bash
sudo systemctl disable --now lanternd.service
sudo apt remove lantern
sudo rm -f /usr/lib/systemd/system/lanternd.service /usr/lib/lantern/lanternd
sudo systemctl daemon-reload
```

# 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
```

2. Start the backend

```
.\bin\windows-amd64\lanternsvc.exe --console
```

3. Build the windows shared library

```
make windows
```

4. 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](scripts/windows) 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
```

2. 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
```

2. Install Android SDK and NDK

```
sdkmanager "ndk;23.1.7779620" "cmake;3.18.1" "platform-tools"
```

3. 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)

```bash
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](https://pub.dev/packages/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](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.

We generate the appcast.xml dynamically using a [Python script](scripts/generate_appcast.py) 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](appcast.xml) with signature, size, and version metadata.