The Outline Client is a cross-platform VPN or proxy client for Windows, macOS, iOS, Android, and ChromeOS. The Outline Client is designed for use with the Outline Server software, but it is fully compatible with any Shadowsocks server.
The client's user interface is implemented in Polymer 2.0. Platform support is provided by Cordova and Electron, with additional native components in this repository.
All builds require npm, in addition to other per-platform requirements. After cloning this repo install all dependencies with the command.
npm ci
Outline clients share the same web app across all platforms. This code is located in the src/www directory. If you are making changes to the shared web app and do not need to test platform-specific functionality, you can test in a desktop browser by running:
npx gulp build --platform=browser
npx cordova run browser
The latter command will open a browser instance running the app. Browser platform development will use fake servers to test successful and unsuccessful connections.
UI components are located in src/www/ui_components. The app logic is located in src/www/app.
Tip: Build with (export BUILD_ENV=development; npx gulp build --platform=browser)
to enable source maps.
Additional requirements for Android:
- Android Studio 4+
- Android SDK 29
To build for android, run:
npx gulp build --platform=android
To rebuild after modifying platform dependent files, run:
npx cordova platform rm android && npx gulp build --platform=android
If this gives you unexpected Cordova errors, run:
npm run clean && npm ci && npx gulp build --platform=android
Cordova will generate a new Android project in the platforms/android directory. Install the built apk by platforms/android/build/outputs/apk/android-armv7-debug.apk
To learn more about developing for Android, see docs/android-development.
A Docker image with all pre-requisites for Android builds is included. To build:
- Install dependencies with
./tools/build/build.sh npm ci
- Then build with
./tools/build/build.sh npx gulp build --platform=android
Additional requirements for Apple:
- An Apple Developer Account. You will need to be invited to join the "Jigsaw Operations LLC" team
- XCode 11+ (download)
- XCode command line tools:
xcode-select --install
To open the macOS project on XCode:
open ./platforms/ios/Outline.xcodeproj
To open the iOS project on XCode:
open ./platforms/osx/Outline.xcodeproj
To build for macOS (OS X), run:
npx gulp build --platform=osx
To build for iOS, run:
npx gulp build --platform=ios
To learn more about developing for Apple, see docs/apple-development
Unlike the Android and Apple clients, the Windows and Linux clients use the Electron framework, rather than Cordova.
Additional requirements for building on Windows:
- Cygwin. It provides the "missing Unix pieces" required by build system such as rsync (and many others). It may be necessary to manually choose to install
rsync
in the Cygwin installer.
To build the Electron clients, run:
npm run do src/electron/build
To run the Electron clients, run:
npm run do src/electron/run
To package the Electron clients into an installer executable, run:
npm run do src/electron/package_[linux|windows]
To enable error reporting through Sentry for local builds, run:
export SENTRY_DSN=[Sentry development API key]
[platform-specific build command]
Release builds on CI are configured with a production Sentry API key.