diff --git a/.gitignore b/.gitignore index db795c141db..e8b0750fe41 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +node_modules .idea .vs/ .vscode @@ -5,24 +6,3 @@ *.env *.pdb *.sw? -/node_modules -/build -/output -/platforms -/plugins -/third_party/Potatso/Pods -/www -coverage -info.txt -keystore.p12 -obj/ -Outline.apk -Outline.apks -packages/ -toc.pb -tools/OutlineService/OutlineService/bin/* -tools/smartdnsblock/bin/* -!tools/OutlineService/OutlineService/bin/*.exe -!tools/smartdnsblock/bin/*.exe -universal.apk -xcuserdata/ diff --git a/Makefile b/Makefile index ac8d75adcf8..a5b6886fbf5 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,17 @@ -BUILDDIR=$(CURDIR)/output/build -GOBIN=$(CURDIR)/output/bin +BUILDDIR=$(CURDIR)/client/output/build +GOBIN=$(CURDIR)/client/output/bin GOMOBILE=$(GOBIN)/gomobile # Add GOBIN to $PATH so `gomobile` can find `gobind`. GOBIND=env PATH="$(GOBIN):$(PATH)" "$(GOMOBILE)" bind IMPORT_HOST=github.com -IMPORT_PATH=$(IMPORT_HOST)/Jigsaw-Code/outline-client +IMPORT_PATH=$(IMPORT_HOST)/Jigsaw-Code/outline-apps .PHONY: android apple linux windows all: android apple linux windows -ROOT_PKG=src/tun2socks +ROOT_PKG=client/src/tun2socks # Don't strip Android debug symbols so we can upload them to crash reporting tools. ANDROID_BUILD_CMD=$(GOBIND) -a -ldflags '-w' -target=android -androidapi 19 -tags android -work diff --git a/README.md b/README.md index 92ab8b7146e..83ad7cfaf1e 100644 --- a/README.md +++ b/README.md @@ -1,93 +1,3 @@ -# Outline Client +# Outline Apps -![Build and Test](https://github.com/Jigsaw-Code/outline-client/actions/workflows/build_and_test_debug.yml/badge.svg?branch=master) [![Mattermost](https://badgen.net/badge/Mattermost/Outline%20Community/blue)](https://community.internetfreedomfestival.org/community/channels/outline-community) [![Reddit](https://badgen.net/badge/Reddit/r%2Foutlinevpn/orange)](https://www.reddit.com/r/outlinevpn/) - -> **Test coverage currently only tracks the Apple Libraries and core web view code:** -> -> [![codecov](https://codecov.io/gh/Jigsaw-Code/outline-client/branch/master/graph/badge.svg?token=gasD8v5tjn)](https://codecov.io/gh/Jigsaw-Code/outline-client) - -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](https://github.com/Jigsaw-Code/outline-server) software, but it is fully compatible with any [Shadowsocks](https://shadowsocks.org/) server. - -The client's user interface is implemented in [Polymer](https://www.polymer-project.org/) 2.0. Platform support is provided by [Cordova](https://cordova.apache.org/) and [Electron](https://electronjs.org/), with additional native components in this repository. - -To join our Outline Community, [sign up for the IFF Mattermost](https://internetfreedomfestival.org/wiki/index.php/IFF_Mattermost). - -## Requirements for all builds - -All builds require [Node](https://nodejs.org/) 18 (lts/hydrogen), and [Go](https://golang.org/) 1.20 installed in addition to other per-platform requirements. - -> 💡 NOTE: if you have `nvm` installed, run `nvm use` to switch to the correct node version! - -After cloning this repo, install all node dependencies: - -```sh -npm install -``` - -## Building the shared web app - -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: - -```sh -npm run action src/www/start -``` - -The latter command will open a browser instance running the app. Browser platform development will use fake servers to test successful and unsuccessful connections. - -The app logic is located in [src/www/app](src/www/app). UI components are located in [src/www/ui_components](src/www/ui_components). If you want to work specifically on an individual UI element, try the storybook!: - -```sh -npm run action src/www/storybook -``` - -> 💡 NOTE: the `src` part of the path is optional. `npm run action www/start` resolves to the same script. - -> 💡 NOTE: every script in this repository can be run with `npm run action` - -> for a CLI-like experience, add something like -> -> ```sh -> alias outline="npm run action" -> ``` -> -> _(you can call it whatever you like)_ -> -> to your shell, then try `outline www/start`! - -## Passing configuration flags to actions - -Certain actions take configuration flags - but since we're running them through `npm`, you'll have to use the `--` seperator to funnel them through to the underlying process. For example, to set up a MacOS project in release mode, you'd run: - -```sh -SENTRY_DSN= npm run action cordova/setup macos -- --buildMode=release --versionName= -``` - -## Life of a Packet - -[How does the Outline Client work?](docs/life_of_a_packet.md) - -## Accepting a server invite - -[Looking for instructions on how to accept a server invite?](docs/invitation_instructions.md) - -## Platform-specific development - -Each platform is handled differently: - -1. [Developing for Apple **(MacOS and iOS)**](src/cordova/apple) -2. [Developing for **Android**](src/cordova/android) -3. [Developing for Electron **(Windows and Linux)**](src/electron) - -## Error reporting - -To enable error reporting through [Sentry](https://sentry.io/) for local builds, run: - -```bash -export SENTRY_DSN=[Sentry development API key] -[platform-specific build command] -``` - -Release builds on CI are configured with a production Sentry API key. - -## Support - -For support and to contact us, see: https://support.getoutline.org. +TODO diff --git a/.browserslistrc b/client/.browserslistrc similarity index 100% rename from .browserslistrc rename to client/.browserslistrc diff --git a/client/.gitignore b/client/.gitignore new file mode 100644 index 00000000000..bee49f27f81 --- /dev/null +++ b/client/.gitignore @@ -0,0 +1,21 @@ +/node_modules +/build +/output +/platforms +/plugins +/third_party/Potatso/Pods +/www +coverage +info.txt +keystore.p12 +obj/ +Outline.apk +Outline.apks +packages/ +toc.pb +tools/OutlineService/OutlineService/bin/* +tools/smartdnsblock/bin/* +!tools/OutlineService/OutlineService/bin/*.exe +!tools/smartdnsblock/bin/*.exe +universal.apk +xcuserdata/ diff --git a/LICENSE b/client/LICENSE similarity index 100% rename from LICENSE rename to client/LICENSE diff --git a/client/README.md b/client/README.md new file mode 100644 index 00000000000..36e7bc18783 --- /dev/null +++ b/client/README.md @@ -0,0 +1,93 @@ +# Outline Client + +![Build and Test](https://github.com/Jigsaw-Code/outline-apps/actions/workflows/build_and_test_debug.yml/badge.svg?branch=master) [![Mattermost](https://badgen.net/badge/Mattermost/Outline%20Community/blue)](https://community.internetfreedomfestival.org/community/channels/outline-community) [![Reddit](https://badgen.net/badge/Reddit/r%2Foutlinevpn/orange)](https://www.reddit.com/r/outlinevpn/) + +> **Test coverage currently only tracks the Apple Libraries and core web view code:** +> +> [![codecov](https://codecov.io/gh/Jigsaw-Code/outline-apps/branch/master/graph/badge.svg?token=gasD8v5tjn)](https://codecov.io/gh/Jigsaw-Code/outline-apps) + +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](https://github.com/Jigsaw-Code/outline-server) software, but it is fully compatible with any [Shadowsocks](https://shadowsocks.org/) server. + +The client's user interface is implemented in [Polymer](https://www.polymer-project.org/) 2.0. Platform support is provided by [Cordova](https://cordova.apache.org/) and [Electron](https://electronjs.org/), with additional native components in this repository. + +To join our Outline Community, [sign up for the IFF Mattermost](https://internetfreedomfestival.org/wiki/index.php/IFF_Mattermost). + +## Requirements for all builds + +All builds require [Node](https://nodejs.org/) 18 (lts/hydrogen), and [Go](https://golang.org/) 1.20 installed in addition to other per-platform requirements. + +> 💡 NOTE: if you have `nvm` installed, run `nvm use` to switch to the correct node version! + +After cloning this repo, install all node dependencies: + +```sh +npm install +``` + +## Building the shared web app + +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: + +```sh +npm run action src/www/start +``` + +The latter command will open a browser instance running the app. Browser platform development will use fake servers to test successful and unsuccessful connections. + +The app logic is located in [src/www/app](src/www/app). UI components are located in [src/www/ui_components](src/www/ui_components). If you want to work specifically on an individual UI element, try the storybook!: + +```sh +npm run action src/www/storybook +``` + +> 💡 NOTE: the `src` part of the path is optional. `npm run action www/start` resolves to the same script. + +> 💡 NOTE: every script in this repository can be run with `npm run action` - +> for a CLI-like experience, add something like +> +> ```sh +> alias outline="npm run action" +> ``` +> +> _(you can call it whatever you like)_ +> +> to your shell, then try `outline www/start`! + +## Passing configuration flags to actions + +Certain actions take configuration flags - but since we're running them through `npm`, you'll have to use the `--` seperator to funnel them through to the underlying process. For example, to set up a MacOS project in release mode, you'd run: + +```sh +SENTRY_DSN= npm run action cordova/setup macos -- --buildMode=release --versionName= +``` + +## Life of a Packet + +[How does the Outline Client work?](docs/life_of_a_packet.md) + +## Accepting a server invite + +[Looking for instructions on how to accept a server invite?](docs/invitation_instructions.md) + +## Platform-specific development + +Each platform is handled differently: + +1. [Developing for Apple **(MacOS and iOS)**](src/cordova/apple) +2. [Developing for **Android**](src/cordova/android) +3. [Developing for Electron **(Windows and Linux)**](src/electron) + +## Error reporting + +To enable error reporting through [Sentry](https://sentry.io/) for local builds, run: + +```bash +export SENTRY_DSN=[Sentry development API key] +[platform-specific build command] +``` + +Release builds on CI are configured with a production Sentry API key. + +## Support + +For support and to contact us, see: https://support.getoutline.org. diff --git a/config.xml b/client/config.xml similarity index 100% rename from config.xml rename to client/config.xml diff --git a/client/package.json b/client/package.json new file mode 100644 index 00000000000..0e4af7666da --- /dev/null +++ b/client/package.json @@ -0,0 +1,149 @@ +{ + "name": "outline-client", + "version": "0.0.0", + "comments": { + "version": "The 'version' in this file is just a placeholder for 'npx generate-license-file', please do not change it.", + "codrova-osx": "Version-controlled platform config files at src/cordova/apple/xcode/osx/Outline/config.xml, src/cordova/apple/xcode/osx/osx.json, and src/cordova/apple/xcode/osx/www/cordova_plugins.js as a workaround for https://github.com/apache/cordova-osx/issues/106. Delete these files when the issue is fixed." + }, + "dependencies": { + "@material/mwc-button": "^0.25.3", + "@material/mwc-circular-progress": "^0.27.0", + "@material/mwc-formfield": "^0.25.3", + "@material/mwc-icon-button": "^0.25.3", + "@material/mwc-menu": "^0.25.3", + "@material/mwc-radio": "^0.25.3", + "@material/mwc-select": "^0.25.3", + "@material/mwc-textarea": "^0.25.3", + "@material/mwc-textfield": "^0.25.3", + "@polymer/app-layout": "^3.1.0", + "@polymer/app-localize-behavior": "^3.0.1", + "@polymer/app-route": "^3.0.2", + "@polymer/decorators": "^3.0.0", + "@polymer/font-roboto": "^3.0.2", + "@polymer/iron-icons": "^3.0.1", + "@polymer/iron-iconset-svg": "^3.0.1", + "@polymer/iron-pages": "^3.0.1", + "@polymer/paper-behaviors": "^3.0.1", + "@polymer/paper-button": "^3.0.1", + "@polymer/paper-card": "^3.0.1", + "@polymer/paper-dialog": "^3.0.1", + "@polymer/paper-dropdown-menu": "^3.1.0", + "@polymer/paper-icon-button": "^3.0.2", + "@polymer/paper-input": "^3.2.1", + "@polymer/paper-item": "^3.0.1", + "@polymer/paper-listbox": "^3.0.1", + "@polymer/paper-menu-button": "^3.0.1", + "@polymer/paper-ripple": "^3.0.2", + "@polymer/paper-styles": "^3.0.1", + "@polymer/paper-toast": "^3.0.1", + "@sentry/browser": "^7.31.1", + "@sentry/electron": "^4.2.0", + "@webcomponents/webcomponentsjs": "^2.4.4", + "auto-launch": "^5.0.5", + "browserslist": "^4.20.3", + "cordova-plugin-splashscreen": "^6.0.0", + "cordova-plugin-statusbar": "^2.2.3", + "electron-updater": "^5.0.5", + "lit": "^2.2.2", + "ShadowsocksConfig": "github:Jigsaw-Code/outline-shadowsocksconfig#v0.2.1", + "socks": "^1.1.10", + "sudo-prompt": "^9.2.1", + "uuidv4": "^4.0.0", + "web-animations-js": "^2.3.2" + }, + "devDependencies": { + "@babel/core": "^7.12.10", + "@babel/polyfill": "^7.12.1", + "@babel/preset-env": "^7.12.11", + "@commitlint/config-conventional": "^16.2.4", + "@jsdevtools/coverage-istanbul-loader": "^3.0.5", + "@open-wc/testing": "^3.2.0", + "@open-wc/testing-karma": "^4.0.9", + "@rollup/plugin-image": "^2.1.1", + "@types/auto-launch": "^5.0.0", + "@types/cordova": "^0.0.34", + "@types/jasmine": "^4.3.6", + "@types/node": "^14.14.7", + "@types/polymer": "^1.2.9", + "@types/uuidv4": "^2.0.0", + "@typescript-eslint/eslint-plugin": "^5.32.0", + "@typescript-eslint/parser": "^5.32.0", + "@web/dev-server": "^0.1.35", + "@web/dev-server-esbuild": "^0.3.3", + "@web/dev-server-storybook": "^0.5.4", + "babel-loader": "^8.2.2", + "chalk": "^5.0.1", + "copy-dir": "^1.3.0", + "copy-webpack-plugin": "^5.1.1", + "cordova-android": "^11.0.0", + "cordova-browser": "~6.0.0", + "cordova-ios": "github:apache/cordova-ios#1a5cd45e2243b239b5045a0ade9d2da1d779b72a", + "cordova-lib": "^11.0.0", + "cordova-osx": "github:apache/cordova-osx", + "cordova-plugin-clipboard": "github:Jigsaw-Code/outline-cordova-plugin-clipboard#v2.0.0", + "cordova-plugin-outline": "file:src/cordova/plugin", + "cordova-webintent": "github:cordova-misc/cordova-webintent#v2.0.0", + "css-loader": "^5.0.1", + "deepmerge": "^4.3.1", + "electron": "^19.1.9", + "electron-builder": "^23.6.0", + "electron-icon-maker": "^0.0.5", + "eslint": "^8.15.0", + "eslint-import-resolver-typescript": "^3.4.0", + "eslint-plugin-compat": "^4.0.2", + "eslint-plugin-import": "^2.26.0", + "esm": "^3.2.25", + "file-loader": "^6.2.0", + "html-webpack-plugin": "^5.1.0", + "husky": "^1.3.1", + "i18n-strings-files": "^2.0.0", + "intl-messageformat": "^9.12.0", + "istanbul": "^0.4.5", + "karma": "^6.4.2", + "karma-chrome-launcher": "^3.1.0", + "karma-coverage-istanbul-reporter": "^3.0.3", + "karma-jasmine": "^4.0.1", + "karma-webpack": "^5.0.0", + "minimist": "^1.2.6", + "node-fetch": "^3.3.0", + "node-gyp": "^10.0.1", + "outline-i18n": "Jigsaw-Code/outline-i18n#v0.0.7", + "postcss": "^7.0.39", + "postcss-rtl": "^1.7.3", + "prettier": "^2.8.0", + "pretty-quick": "^2.0.1", + "puppeteer": "^13.1.2", + "replace-in-file": "^6.3.5", + "rimraf": "^2.7.1", + "rmfr": "^2.0.0", + "style-loader": "^2.0.0", + "ts-loader": "^9.3.1", + "typescript": "^4.7.4", + "url": "^0.11.0", + "webpack": "^5.16.0", + "webpack-cli": "^4.4.0", + "webpack-dev-server": "^4.5.0", + "webpack-merge": "^5.8.0", + "webpack-shell-plugin-next": "^2.1.1", + "xmlbuilder2": "^3.1.1" + }, + "optionalDependencies": { + "ios-deploy": "^1.11.4" + }, + "main": "build/electron/electron/index.js", + "cordova": { + "plugins": { + "cordova-plugin-outline": {}, + "cordova-plugin-splashscreen": {}, + "cordova-plugin-statusbar": {}, + "cordova-plugin-clipboard": {}, + "cordova-webintent": {} + }, + "platforms": [ + "browser", + "android", + "ios", + "osx" + ] + } +} diff --git a/resources/electron/icon.png b/client/resources/electron/icon.png similarity index 100% rename from resources/electron/icon.png rename to client/resources/electron/icon.png diff --git a/resources/icons/android/icon_hdpi.png b/client/resources/icons/android/icon_hdpi.png similarity index 100% rename from resources/icons/android/icon_hdpi.png rename to client/resources/icons/android/icon_hdpi.png diff --git a/resources/icons/android/icon_mdpi.png b/client/resources/icons/android/icon_mdpi.png similarity index 100% rename from resources/icons/android/icon_mdpi.png rename to client/resources/icons/android/icon_mdpi.png diff --git a/resources/icons/android/icon_xhdpi.png b/client/resources/icons/android/icon_xhdpi.png similarity index 100% rename from resources/icons/android/icon_xhdpi.png rename to client/resources/icons/android/icon_xhdpi.png diff --git a/resources/icons/android/icon_xxhdpi.png b/client/resources/icons/android/icon_xxhdpi.png similarity index 100% rename from resources/icons/android/icon_xxhdpi.png rename to client/resources/icons/android/icon_xxhdpi.png diff --git a/resources/icons/android/icon_xxxhdpi.png b/client/resources/icons/android/icon_xxxhdpi.png similarity index 100% rename from resources/icons/android/icon_xxxhdpi.png rename to client/resources/icons/android/icon_xxxhdpi.png diff --git a/resources/icons/ios/Icon-1024.png b/client/resources/icons/ios/Icon-1024.png similarity index 100% rename from resources/icons/ios/Icon-1024.png rename to client/resources/icons/ios/Icon-1024.png diff --git a/resources/icons/ios/Icon-128.png b/client/resources/icons/ios/Icon-128.png similarity index 100% rename from resources/icons/ios/Icon-128.png rename to client/resources/icons/ios/Icon-128.png diff --git a/resources/icons/ios/Icon-128@2x.png b/client/resources/icons/ios/Icon-128@2x.png similarity index 100% rename from resources/icons/ios/Icon-128@2x.png rename to client/resources/icons/ios/Icon-128@2x.png diff --git a/resources/icons/ios/Icon-16.png b/client/resources/icons/ios/Icon-16.png similarity index 100% rename from resources/icons/ios/Icon-16.png rename to client/resources/icons/ios/Icon-16.png diff --git a/resources/icons/ios/Icon-16@2x.png b/client/resources/icons/ios/Icon-16@2x.png similarity index 100% rename from resources/icons/ios/Icon-16@2x.png rename to client/resources/icons/ios/Icon-16@2x.png diff --git a/resources/icons/ios/Icon-20.png b/client/resources/icons/ios/Icon-20.png similarity index 100% rename from resources/icons/ios/Icon-20.png rename to client/resources/icons/ios/Icon-20.png diff --git a/resources/icons/ios/Icon-20@2x.png b/client/resources/icons/ios/Icon-20@2x.png similarity index 100% rename from resources/icons/ios/Icon-20@2x.png rename to client/resources/icons/ios/Icon-20@2x.png diff --git a/resources/icons/ios/Icon-20@3x.png b/client/resources/icons/ios/Icon-20@3x.png similarity index 100% rename from resources/icons/ios/Icon-20@3x.png rename to client/resources/icons/ios/Icon-20@3x.png diff --git a/resources/icons/ios/Icon-24.png b/client/resources/icons/ios/Icon-24.png similarity index 100% rename from resources/icons/ios/Icon-24.png rename to client/resources/icons/ios/Icon-24.png diff --git a/resources/icons/ios/Icon-24@2x.png b/client/resources/icons/ios/Icon-24@2x.png similarity index 100% rename from resources/icons/ios/Icon-24@2x.png rename to client/resources/icons/ios/Icon-24@2x.png diff --git a/resources/icons/ios/Icon-29.png b/client/resources/icons/ios/Icon-29.png similarity index 100% rename from resources/icons/ios/Icon-29.png rename to client/resources/icons/ios/Icon-29.png diff --git a/resources/icons/ios/Icon-29@2x.png b/client/resources/icons/ios/Icon-29@2x.png similarity index 100% rename from resources/icons/ios/Icon-29@2x.png rename to client/resources/icons/ios/Icon-29@2x.png diff --git a/resources/icons/ios/Icon-29@3x.png b/client/resources/icons/ios/Icon-29@3x.png similarity index 100% rename from resources/icons/ios/Icon-29@3x.png rename to client/resources/icons/ios/Icon-29@3x.png diff --git a/resources/icons/ios/Icon-32@2x.png b/client/resources/icons/ios/Icon-32@2x.png similarity index 100% rename from resources/icons/ios/Icon-32@2x.png rename to client/resources/icons/ios/Icon-32@2x.png diff --git a/resources/icons/ios/Icon-40@2x.png b/client/resources/icons/ios/Icon-40@2x.png similarity index 100% rename from resources/icons/ios/Icon-40@2x.png rename to client/resources/icons/ios/Icon-40@2x.png diff --git a/resources/icons/ios/Icon-40@3x.png b/client/resources/icons/ios/Icon-40@3x.png similarity index 100% rename from resources/icons/ios/Icon-40@3x.png rename to client/resources/icons/ios/Icon-40@3x.png diff --git a/resources/icons/ios/Icon-50.png b/client/resources/icons/ios/Icon-50.png similarity index 100% rename from resources/icons/ios/Icon-50.png rename to client/resources/icons/ios/Icon-50.png diff --git a/resources/icons/ios/Icon-50@2x.png b/client/resources/icons/ios/Icon-50@2x.png similarity index 100% rename from resources/icons/ios/Icon-50@2x.png rename to client/resources/icons/ios/Icon-50@2x.png diff --git a/resources/icons/ios/Icon-512.png b/client/resources/icons/ios/Icon-512.png similarity index 100% rename from resources/icons/ios/Icon-512.png rename to client/resources/icons/ios/Icon-512.png diff --git a/resources/icons/ios/Icon-57.png b/client/resources/icons/ios/Icon-57.png similarity index 100% rename from resources/icons/ios/Icon-57.png rename to client/resources/icons/ios/Icon-57.png diff --git a/resources/icons/ios/Icon-57@2x.png b/client/resources/icons/ios/Icon-57@2x.png similarity index 100% rename from resources/icons/ios/Icon-57@2x.png rename to client/resources/icons/ios/Icon-57@2x.png diff --git a/resources/icons/ios/Icon-60@2x.png b/client/resources/icons/ios/Icon-60@2x.png similarity index 100% rename from resources/icons/ios/Icon-60@2x.png rename to client/resources/icons/ios/Icon-60@2x.png diff --git a/resources/icons/ios/Icon-60@3x.png b/client/resources/icons/ios/Icon-60@3x.png similarity index 100% rename from resources/icons/ios/Icon-60@3x.png rename to client/resources/icons/ios/Icon-60@3x.png diff --git a/resources/icons/ios/Icon-72.png b/client/resources/icons/ios/Icon-72.png similarity index 100% rename from resources/icons/ios/Icon-72.png rename to client/resources/icons/ios/Icon-72.png diff --git a/resources/icons/ios/Icon-72@2x.png b/client/resources/icons/ios/Icon-72@2x.png similarity index 100% rename from resources/icons/ios/Icon-72@2x.png rename to client/resources/icons/ios/Icon-72@2x.png diff --git a/resources/icons/ios/Icon-76.png b/client/resources/icons/ios/Icon-76.png similarity index 100% rename from resources/icons/ios/Icon-76.png rename to client/resources/icons/ios/Icon-76.png diff --git a/resources/icons/ios/Icon-76@2x.png b/client/resources/icons/ios/Icon-76@2x.png similarity index 100% rename from resources/icons/ios/Icon-76@2x.png rename to client/resources/icons/ios/Icon-76@2x.png diff --git a/resources/icons/ios/Icon-83.5@2x.png b/client/resources/icons/ios/Icon-83.5@2x.png similarity index 100% rename from resources/icons/ios/Icon-83.5@2x.png rename to client/resources/icons/ios/Icon-83.5@2x.png diff --git a/resources/icons/ios/icon-256.png b/client/resources/icons/ios/icon-256.png similarity index 100% rename from resources/icons/ios/icon-256.png rename to client/resources/icons/ios/icon-256.png diff --git a/resources/icons/ios/icon-256@2x.png b/client/resources/icons/ios/icon-256@2x.png similarity index 100% rename from resources/icons/ios/icon-256@2x.png rename to client/resources/icons/ios/icon-256@2x.png diff --git a/resources/icons/ios/icon-32.png b/client/resources/icons/ios/icon-32.png similarity index 100% rename from resources/icons/ios/icon-32.png rename to client/resources/icons/ios/icon-32.png diff --git a/resources/icons/ios/icon-512@2x.png b/client/resources/icons/ios/icon-512@2x.png similarity index 100% rename from resources/icons/ios/icon-512@2x.png rename to client/resources/icons/ios/icon-512@2x.png diff --git a/resources/icons/osx/icon-1024.png b/client/resources/icons/osx/icon-1024.png similarity index 100% rename from resources/icons/osx/icon-1024.png rename to client/resources/icons/osx/icon-1024.png diff --git a/resources/icons/osx/icon-128.png b/client/resources/icons/osx/icon-128.png similarity index 100% rename from resources/icons/osx/icon-128.png rename to client/resources/icons/osx/icon-128.png diff --git a/resources/icons/osx/icon-16.png b/client/resources/icons/osx/icon-16.png similarity index 100% rename from resources/icons/osx/icon-16.png rename to client/resources/icons/osx/icon-16.png diff --git a/resources/icons/osx/icon-256.png b/client/resources/icons/osx/icon-256.png similarity index 100% rename from resources/icons/osx/icon-256.png rename to client/resources/icons/osx/icon-256.png diff --git a/resources/icons/osx/icon-32.png b/client/resources/icons/osx/icon-32.png similarity index 100% rename from resources/icons/osx/icon-32.png rename to client/resources/icons/osx/icon-32.png diff --git a/resources/icons/osx/icon-512.png b/client/resources/icons/osx/icon-512.png similarity index 100% rename from resources/icons/osx/icon-512.png rename to client/resources/icons/osx/icon-512.png diff --git a/resources/icons/osx/icon-64.png b/client/resources/icons/osx/icon-64.png similarity index 100% rename from resources/icons/osx/icon-64.png rename to client/resources/icons/osx/icon-64.png diff --git a/resources/original_messages.json b/client/resources/original_messages.json similarity index 100% rename from resources/original_messages.json rename to client/resources/original_messages.json diff --git a/resources/splashscreen/android/splashscreen_hdpi.png b/client/resources/splashscreen/android/splashscreen_hdpi.png similarity index 100% rename from resources/splashscreen/android/splashscreen_hdpi.png rename to client/resources/splashscreen/android/splashscreen_hdpi.png diff --git a/resources/splashscreen/android/splashscreen_xhdpi.png b/client/resources/splashscreen/android/splashscreen_xhdpi.png similarity index 100% rename from resources/splashscreen/android/splashscreen_xhdpi.png rename to client/resources/splashscreen/android/splashscreen_xhdpi.png diff --git a/resources/splashscreen/android/splashscreen_xxhdpi.png b/client/resources/splashscreen/android/splashscreen_xxhdpi.png similarity index 100% rename from resources/splashscreen/android/splashscreen_xxhdpi.png rename to client/resources/splashscreen/android/splashscreen_xxhdpi.png diff --git a/resources/splashscreen/android/splashscreen_xxxhdpi.png b/client/resources/splashscreen/android/splashscreen_xxxhdpi.png similarity index 100% rename from resources/splashscreen/android/splashscreen_xxxhdpi.png rename to client/resources/splashscreen/android/splashscreen_xxxhdpi.png diff --git a/resources/splashscreen/ios/splashscreen@2x~universal~anyany.png b/client/resources/splashscreen/ios/splashscreen@2x~universal~anyany.png similarity index 100% rename from resources/splashscreen/ios/splashscreen@2x~universal~anyany.png rename to client/resources/splashscreen/ios/splashscreen@2x~universal~anyany.png diff --git a/resources/tray/connected.png b/client/resources/tray/connected.png similarity index 100% rename from resources/tray/connected.png rename to client/resources/tray/connected.png diff --git a/resources/tray/disconnected.png b/client/resources/tray/disconnected.png similarity index 100% rename from resources/tray/disconnected.png rename to client/resources/tray/disconnected.png diff --git a/src/build/download_file.mjs b/client/src/build/download_file.mjs similarity index 100% rename from src/build/download_file.mjs rename to client/src/build/download_file.mjs diff --git a/src/build/get_build_parameters.mjs b/client/src/build/get_build_parameters.mjs similarity index 100% rename from src/build/get_build_parameters.mjs rename to client/src/build/get_build_parameters.mjs diff --git a/src/build/get_file_checksum.mjs b/client/src/build/get_file_checksum.mjs similarity index 100% rename from src/build/get_file_checksum.mjs rename to client/src/build/get_file_checksum.mjs diff --git a/src/build/get_root_dir.mjs b/client/src/build/get_root_dir.mjs similarity index 88% rename from src/build/get_root_dir.mjs rename to client/src/build/get_root_dir.mjs index 646edc8ba2f..f0e0e10bce5 100644 --- a/src/build/get_root_dir.mjs +++ b/client/src/build/get_root_dir.mjs @@ -16,8 +16,7 @@ import path from 'path'; import url from 'url'; // WARNING: if you move this file, you MUST update this file path -const ROOT_DIR = path.resolve( - path.dirname(url.fileURLToPath(import.meta.url)), '..', '..'); +const ROOT_DIR = path.resolve(path.dirname(url.fileURLToPath(import.meta.url)), '..', '..'); export function getRootDir() { return ROOT_DIR; diff --git a/src/build/get_webpack_build_mode.mjs b/client/src/build/get_webpack_build_mode.mjs similarity index 100% rename from src/build/get_webpack_build_mode.mjs rename to client/src/build/get_webpack_build_mode.mjs diff --git a/src/build/run_action.mjs b/client/src/build/run_action.mjs similarity index 95% rename from src/build/run_action.mjs rename to client/src/build/run_action.mjs index 8189833c28d..a98661d0876 100644 --- a/src/build/run_action.mjs +++ b/client/src/build/run_action.mjs @@ -27,11 +27,11 @@ import {spawnStream} from './spawn_stream.mjs'; const resolveActionPath = async actionPath => { if (!actionPath) return ''; - if (actionPath in JSON.parse(await readFile(path.join(getRootDir(), 'package.json'))).scripts) { + if (actionPath in JSON.parse(await readFile(path.resolve(getRootDir(), '../package.json'))).scripts) { return actionPath; } - const roots = [getRootDir(), path.join(getRootDir(), 'src')]; + const roots = [getRootDir(), path.join(getRootDir(), 'src'), path.resolve(getRootDir(), '..')]; const extensions = ['sh', 'mjs']; for (const root of roots) { diff --git a/src/build/run_webpack.mjs b/client/src/build/run_webpack.mjs similarity index 100% rename from src/build/run_webpack.mjs rename to client/src/build/run_webpack.mjs diff --git a/src/build/spawn_stream.mjs b/client/src/build/spawn_stream.mjs similarity index 100% rename from src/build/spawn_stream.mjs rename to client/src/build/spawn_stream.mjs diff --git a/src/cordova/android/OutlineAndroidLib/.gitignore b/client/src/cordova/android/OutlineAndroidLib/.gitignore similarity index 100% rename from src/cordova/android/OutlineAndroidLib/.gitignore rename to client/src/cordova/android/OutlineAndroidLib/.gitignore diff --git a/src/cordova/android/OutlineAndroidLib/build.gradle b/client/src/cordova/android/OutlineAndroidLib/build.gradle similarity index 100% rename from src/cordova/android/OutlineAndroidLib/build.gradle rename to client/src/cordova/android/OutlineAndroidLib/build.gradle diff --git a/src/cordova/android/OutlineAndroidLib/gradle.properties b/client/src/cordova/android/OutlineAndroidLib/gradle.properties similarity index 100% rename from src/cordova/android/OutlineAndroidLib/gradle.properties rename to client/src/cordova/android/OutlineAndroidLib/gradle.properties diff --git a/src/cordova/android/OutlineAndroidLib/gradle/wrapper/gradle-wrapper.jar b/client/src/cordova/android/OutlineAndroidLib/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from src/cordova/android/OutlineAndroidLib/gradle/wrapper/gradle-wrapper.jar rename to client/src/cordova/android/OutlineAndroidLib/gradle/wrapper/gradle-wrapper.jar diff --git a/src/cordova/android/OutlineAndroidLib/gradle/wrapper/gradle-wrapper.properties b/client/src/cordova/android/OutlineAndroidLib/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from src/cordova/android/OutlineAndroidLib/gradle/wrapper/gradle-wrapper.properties rename to client/src/cordova/android/OutlineAndroidLib/gradle/wrapper/gradle-wrapper.properties diff --git a/src/cordova/android/OutlineAndroidLib/gradlew b/client/src/cordova/android/OutlineAndroidLib/gradlew similarity index 100% rename from src/cordova/android/OutlineAndroidLib/gradlew rename to client/src/cordova/android/OutlineAndroidLib/gradlew diff --git a/src/cordova/android/OutlineAndroidLib/gradlew.bat b/client/src/cordova/android/OutlineAndroidLib/gradlew.bat similarity index 100% rename from src/cordova/android/OutlineAndroidLib/gradlew.bat rename to client/src/cordova/android/OutlineAndroidLib/gradlew.bat diff --git a/src/cordova/android/OutlineAndroidLib/outline/.gitignore b/client/src/cordova/android/OutlineAndroidLib/outline/.gitignore similarity index 100% rename from src/cordova/android/OutlineAndroidLib/outline/.gitignore rename to client/src/cordova/android/OutlineAndroidLib/outline/.gitignore diff --git a/src/cordova/android/OutlineAndroidLib/outline/build.gradle b/client/src/cordova/android/OutlineAndroidLib/outline/build.gradle similarity index 100% rename from src/cordova/android/OutlineAndroidLib/outline/build.gradle rename to client/src/cordova/android/OutlineAndroidLib/outline/build.gradle diff --git a/src/cordova/android/OutlineAndroidLib/outline/consumer-rules.pro b/client/src/cordova/android/OutlineAndroidLib/outline/consumer-rules.pro similarity index 100% rename from src/cordova/android/OutlineAndroidLib/outline/consumer-rules.pro rename to client/src/cordova/android/OutlineAndroidLib/outline/consumer-rules.pro diff --git a/src/cordova/android/OutlineAndroidLib/outline/proguard-rules.pro b/client/src/cordova/android/OutlineAndroidLib/outline/proguard-rules.pro similarity index 100% rename from src/cordova/android/OutlineAndroidLib/outline/proguard-rules.pro rename to client/src/cordova/android/OutlineAndroidLib/outline/proguard-rules.pro diff --git a/src/cordova/android/OutlineAndroidLib/outline/src/androidTest/java/org/outline/vpn/VpnTunnelStoreTest.java b/client/src/cordova/android/OutlineAndroidLib/outline/src/androidTest/java/org/outline/vpn/VpnTunnelStoreTest.java similarity index 100% rename from src/cordova/android/OutlineAndroidLib/outline/src/androidTest/java/org/outline/vpn/VpnTunnelStoreTest.java rename to client/src/cordova/android/OutlineAndroidLib/outline/src/androidTest/java/org/outline/vpn/VpnTunnelStoreTest.java diff --git a/src/cordova/android/OutlineAndroidLib/outline/src/main/AndroidManifest.xml b/client/src/cordova/android/OutlineAndroidLib/outline/src/main/AndroidManifest.xml similarity index 100% rename from src/cordova/android/OutlineAndroidLib/outline/src/main/AndroidManifest.xml rename to client/src/cordova/android/OutlineAndroidLib/outline/src/main/AndroidManifest.xml diff --git a/src/cordova/android/OutlineAndroidLib/outline/src/main/aidl/org/outline/IVpnTunnelService.aidl b/client/src/cordova/android/OutlineAndroidLib/outline/src/main/aidl/org/outline/IVpnTunnelService.aidl similarity index 100% rename from src/cordova/android/OutlineAndroidLib/outline/src/main/aidl/org/outline/IVpnTunnelService.aidl rename to client/src/cordova/android/OutlineAndroidLib/outline/src/main/aidl/org/outline/IVpnTunnelService.aidl diff --git a/src/cordova/android/OutlineAndroidLib/outline/src/main/aidl/org/outline/TunnelConfig.aidl b/client/src/cordova/android/OutlineAndroidLib/outline/src/main/aidl/org/outline/TunnelConfig.aidl similarity index 100% rename from src/cordova/android/OutlineAndroidLib/outline/src/main/aidl/org/outline/TunnelConfig.aidl rename to client/src/cordova/android/OutlineAndroidLib/outline/src/main/aidl/org/outline/TunnelConfig.aidl diff --git a/src/cordova/android/OutlineAndroidLib/outline/src/main/aidl/org/outline/shadowsocks/ShadowsocksConfig.aidl b/client/src/cordova/android/OutlineAndroidLib/outline/src/main/aidl/org/outline/shadowsocks/ShadowsocksConfig.aidl similarity index 100% rename from src/cordova/android/OutlineAndroidLib/outline/src/main/aidl/org/outline/shadowsocks/ShadowsocksConfig.aidl rename to client/src/cordova/android/OutlineAndroidLib/outline/src/main/aidl/org/outline/shadowsocks/ShadowsocksConfig.aidl diff --git a/src/cordova/android/OutlineAndroidLib/outline/src/main/java/org/outline/log/OutlineLogger.java b/client/src/cordova/android/OutlineAndroidLib/outline/src/main/java/org/outline/log/OutlineLogger.java similarity index 100% rename from src/cordova/android/OutlineAndroidLib/outline/src/main/java/org/outline/log/OutlineLogger.java rename to client/src/cordova/android/OutlineAndroidLib/outline/src/main/java/org/outline/log/OutlineLogger.java diff --git a/src/cordova/android/OutlineAndroidLib/outline/src/main/java/org/outline/log/SentryErrorReporter.java b/client/src/cordova/android/OutlineAndroidLib/outline/src/main/java/org/outline/log/SentryErrorReporter.java similarity index 100% rename from src/cordova/android/OutlineAndroidLib/outline/src/main/java/org/outline/log/SentryErrorReporter.java rename to client/src/cordova/android/OutlineAndroidLib/outline/src/main/java/org/outline/log/SentryErrorReporter.java diff --git a/src/cordova/android/OutlineAndroidLib/outline/src/main/java/org/outline/vpn/VpnServiceStarter.java b/client/src/cordova/android/OutlineAndroidLib/outline/src/main/java/org/outline/vpn/VpnServiceStarter.java similarity index 100% rename from src/cordova/android/OutlineAndroidLib/outline/src/main/java/org/outline/vpn/VpnServiceStarter.java rename to client/src/cordova/android/OutlineAndroidLib/outline/src/main/java/org/outline/vpn/VpnServiceStarter.java diff --git a/src/cordova/android/OutlineAndroidLib/outline/src/main/java/org/outline/vpn/VpnTunnel.java b/client/src/cordova/android/OutlineAndroidLib/outline/src/main/java/org/outline/vpn/VpnTunnel.java similarity index 100% rename from src/cordova/android/OutlineAndroidLib/outline/src/main/java/org/outline/vpn/VpnTunnel.java rename to client/src/cordova/android/OutlineAndroidLib/outline/src/main/java/org/outline/vpn/VpnTunnel.java diff --git a/src/cordova/android/OutlineAndroidLib/outline/src/main/java/org/outline/vpn/VpnTunnelService.java b/client/src/cordova/android/OutlineAndroidLib/outline/src/main/java/org/outline/vpn/VpnTunnelService.java similarity index 100% rename from src/cordova/android/OutlineAndroidLib/outline/src/main/java/org/outline/vpn/VpnTunnelService.java rename to client/src/cordova/android/OutlineAndroidLib/outline/src/main/java/org/outline/vpn/VpnTunnelService.java diff --git a/src/cordova/android/OutlineAndroidLib/outline/src/main/java/org/outline/vpn/VpnTunnelStore.java b/client/src/cordova/android/OutlineAndroidLib/outline/src/main/java/org/outline/vpn/VpnTunnelStore.java similarity index 100% rename from src/cordova/android/OutlineAndroidLib/outline/src/main/java/org/outline/vpn/VpnTunnelStore.java rename to client/src/cordova/android/OutlineAndroidLib/outline/src/main/java/org/outline/vpn/VpnTunnelStore.java diff --git a/src/cordova/android/OutlineAndroidLib/outline/src/test/java/org/outline/vpn/VpnTunnelTest.java b/client/src/cordova/android/OutlineAndroidLib/outline/src/test/java/org/outline/vpn/VpnTunnelTest.java similarity index 100% rename from src/cordova/android/OutlineAndroidLib/outline/src/test/java/org/outline/vpn/VpnTunnelTest.java rename to client/src/cordova/android/OutlineAndroidLib/outline/src/test/java/org/outline/vpn/VpnTunnelTest.java diff --git a/src/cordova/android/OutlineAndroidLib/settings.gradle b/client/src/cordova/android/OutlineAndroidLib/settings.gradle similarity index 100% rename from src/cordova/android/OutlineAndroidLib/settings.gradle rename to client/src/cordova/android/OutlineAndroidLib/settings.gradle diff --git a/src/cordova/android/README.md b/client/src/cordova/android/README.md similarity index 100% rename from src/cordova/android/README.md rename to client/src/cordova/android/README.md diff --git a/src/cordova/android/import_messages.mjs b/client/src/cordova/android/import_messages.mjs similarity index 94% rename from src/cordova/android/import_messages.mjs rename to client/src/cordova/android/import_messages.mjs index 14faab98f47..3cbdf7ae926 100644 --- a/src/cordova/android/import_messages.mjs +++ b/client/src/cordova/android/import_messages.mjs @@ -22,12 +22,7 @@ const XML_STRING_ID_PROPERTY = '@name'; const XML_TEXT_CONTENT = '#'; function escapeXmlCharacters(str) { - return str - .replace(/"/g, '\\"') - .replace(/'/g, "\\'") - .replace(//g, '\\>;') - .replace(/&/g, '\\&'); + return str.replace(/"/g, '\\"').replace(/'/g, "\\'").replace(//g, '\\>;').replace(/&/g, '\\&'); } function getNativeLocale(locale) { diff --git a/src/cordova/apple/OutlineAppleLib/.gitignore b/client/src/cordova/apple/OutlineAppleLib/.gitignore similarity index 100% rename from src/cordova/apple/OutlineAppleLib/.gitignore rename to client/src/cordova/apple/OutlineAppleLib/.gitignore diff --git a/src/cordova/apple/OutlineAppleLib/Package.swift b/client/src/cordova/apple/OutlineAppleLib/Package.swift similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Package.swift rename to client/src/cordova/apple/OutlineAppleLib/Package.swift diff --git a/src/cordova/apple/OutlineAppleLib/README.md b/client/src/cordova/apple/OutlineAppleLib/README.md similarity index 100% rename from src/cordova/apple/OutlineAppleLib/README.md rename to client/src/cordova/apple/OutlineAppleLib/README.md diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift b/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift rename to client/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/NSObject+Outline.swift b/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/NSObject+Outline.swift similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/NSObject+Outline.swift rename to client/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/NSObject+Outline.swift diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineLauncher/AppDelegate.swift b/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineLauncher/AppDelegate.swift similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineLauncher/AppDelegate.swift rename to client/src/cordova/apple/OutlineAppleLib/Sources/OutlineLauncher/AppDelegate.swift diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineNotification/NSNotification+Outline.swift b/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineNotification/NSNotification+Outline.swift similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineNotification/NSNotification+Outline.swift rename to client/src/cordova/apple/OutlineAppleLib/Sources/OutlineNotification/NSNotification+Outline.swift diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineSentryLogger/OutlineSentryLogger.swift b/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineSentryLogger/OutlineSentryLogger.swift similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineSentryLogger/OutlineSentryLogger.swift rename to client/src/cordova/apple/OutlineAppleLib/Sources/OutlineSentryLogger/OutlineSentryLogger.swift diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineTunnel/OutlineTunnel.swift b/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineTunnel/OutlineTunnel.swift similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineTunnel/OutlineTunnel.swift rename to client/src/cordova/apple/OutlineAppleLib/Sources/OutlineTunnel/OutlineTunnel.swift diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineTunnel/OutlineTunnelStore.swift b/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineTunnel/OutlineTunnelStore.swift similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineTunnel/OutlineTunnelStore.swift rename to client/src/cordova/apple/OutlineAppleLib/Sources/OutlineTunnel/OutlineTunnelStore.swift diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineTunnel/OutlineVpn.swift b/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineTunnel/OutlineVpn.swift similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineTunnel/OutlineVpn.swift rename to client/src/cordova/apple/OutlineAppleLib/Sources/OutlineTunnel/OutlineVpn.swift diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineTunnel/Subnet.swift b/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineTunnel/Subnet.swift similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineTunnel/Subnet.swift rename to client/src/cordova/apple/OutlineAppleLib/Sources/OutlineTunnel/Subnet.swift diff --git a/src/cordova/apple/OutlineAppleLib/Sources/PacketTunnelProvider/PacketTunnelProvider.m b/client/src/cordova/apple/OutlineAppleLib/Sources/PacketTunnelProvider/PacketTunnelProvider.m similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/PacketTunnelProvider/PacketTunnelProvider.m rename to client/src/cordova/apple/OutlineAppleLib/Sources/PacketTunnelProvider/PacketTunnelProvider.m diff --git a/src/cordova/apple/OutlineAppleLib/Sources/PacketTunnelProvider/include/PacketTunnelProvider.h b/client/src/cordova/apple/OutlineAppleLib/Sources/PacketTunnelProvider/include/PacketTunnelProvider.h similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/PacketTunnelProvider/include/PacketTunnelProvider.h rename to client/src/cordova/apple/OutlineAppleLib/Sources/PacketTunnelProvider/include/PacketTunnelProvider.h diff --git a/src/cordova/apple/OutlineAppleLib/Tests/OutlineTunnelTest/OutlineTunnelTest.swift b/client/src/cordova/apple/OutlineAppleLib/Tests/OutlineTunnelTest/OutlineTunnelTest.swift similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Tests/OutlineTunnelTest/OutlineTunnelTest.swift rename to client/src/cordova/apple/OutlineAppleLib/Tests/OutlineTunnelTest/OutlineTunnelTest.swift diff --git a/src/cordova/apple/README.md b/client/src/cordova/apple/README.md similarity index 98% rename from src/cordova/apple/README.md rename to client/src/cordova/apple/README.md index dee5592a7a2..75b65d56b84 100644 --- a/src/cordova/apple/README.md +++ b/client/src/cordova/apple/README.md @@ -94,7 +94,7 @@ log stream --info --predicate 'senderImagePath contains "Outline.app"' In the Console app, select the **Action > Include Info Messages** manu, and set the filter to "Library Path" "contains" "Outline.app": -image +image > 💡 Tip: You can **save searches** in the MacOS Console app. @@ -126,7 +126,7 @@ For more info, see [Debug, Profile, and Test Your App Extension](https://develop Sometimes the app will refuse to connect, with a `VpnStartFailure` error: -image +image If that happens, there are some things you can try. diff --git a/src/cordova/apple/import_messages.mjs b/client/src/cordova/apple/import_messages.mjs similarity index 100% rename from src/cordova/apple/import_messages.mjs rename to client/src/cordova/apple/import_messages.mjs diff --git a/src/cordova/apple/ios.xcworkspace/contents.xcworkspacedata b/client/src/cordova/apple/ios.xcworkspace/contents.xcworkspacedata similarity index 100% rename from src/cordova/apple/ios.xcworkspace/contents.xcworkspacedata rename to client/src/cordova/apple/ios.xcworkspace/contents.xcworkspacedata diff --git a/src/cordova/apple/ios.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/client/src/cordova/apple/ios.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from src/cordova/apple/ios.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to client/src/cordova/apple/ios.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/src/cordova/apple/ios.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/client/src/cordova/apple/ios.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from src/cordova/apple/ios.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to client/src/cordova/apple/ios.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/src/cordova/apple/ios.xcworkspace/xcshareddata/swiftpm/Package.resolved b/client/src/cordova/apple/ios.xcworkspace/xcshareddata/swiftpm/Package.resolved similarity index 100% rename from src/cordova/apple/ios.xcworkspace/xcshareddata/swiftpm/Package.resolved rename to client/src/cordova/apple/ios.xcworkspace/xcshareddata/swiftpm/Package.resolved diff --git a/src/cordova/apple/macos.xcworkspace/contents.xcworkspacedata b/client/src/cordova/apple/macos.xcworkspace/contents.xcworkspacedata similarity index 100% rename from src/cordova/apple/macos.xcworkspace/contents.xcworkspacedata rename to client/src/cordova/apple/macos.xcworkspace/contents.xcworkspacedata diff --git a/src/cordova/apple/macos.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/client/src/cordova/apple/macos.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from src/cordova/apple/macos.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to client/src/cordova/apple/macos.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/src/cordova/apple/macos.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/client/src/cordova/apple/macos.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from src/cordova/apple/macos.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to client/src/cordova/apple/macos.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/src/cordova/apple/macos.xcworkspace/xcshareddata/swiftpm/Package.resolved b/client/src/cordova/apple/macos.xcworkspace/xcshareddata/swiftpm/Package.resolved similarity index 100% rename from src/cordova/apple/macos.xcworkspace/xcshareddata/swiftpm/Package.resolved rename to client/src/cordova/apple/macos.xcworkspace/xcshareddata/swiftpm/Package.resolved diff --git a/src/cordova/apple/scripts/xconfig.sh b/client/src/cordova/apple/scripts/xconfig.sh similarity index 100% rename from src/cordova/apple/scripts/xconfig.sh rename to client/src/cordova/apple/scripts/xconfig.sh diff --git a/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj b/client/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj similarity index 100% rename from src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj rename to client/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj diff --git a/src/cordova/apple/xcode/ios/Outline.xcodeproj/xcshareddata/xcschemes/Outline.xcscheme b/client/src/cordova/apple/xcode/ios/Outline.xcodeproj/xcshareddata/xcschemes/Outline.xcscheme similarity index 100% rename from src/cordova/apple/xcode/ios/Outline.xcodeproj/xcshareddata/xcschemes/Outline.xcscheme rename to client/src/cordova/apple/xcode/ios/Outline.xcodeproj/xcshareddata/xcschemes/Outline.xcscheme diff --git a/src/cordova/apple/xcode/ios/Outline.xcodeproj/xcshareddata/xcschemes/VpnExtension.xcscheme b/client/src/cordova/apple/xcode/ios/Outline.xcodeproj/xcshareddata/xcschemes/VpnExtension.xcscheme similarity index 100% rename from src/cordova/apple/xcode/ios/Outline.xcodeproj/xcshareddata/xcschemes/VpnExtension.xcscheme rename to client/src/cordova/apple/xcode/ios/Outline.xcodeproj/xcshareddata/xcschemes/VpnExtension.xcscheme diff --git a/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/Contents.json b/client/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/Contents.json rename to client/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-1024.png b/client/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-1024.png similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-1024.png rename to client/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-1024.png diff --git a/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-128.png b/client/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-128.png similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-128.png rename to client/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-128.png diff --git a/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-128@2x.png b/client/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-128@2x.png similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-128@2x.png rename to client/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-128@2x.png diff --git a/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-16.png b/client/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-16.png similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-16.png rename to client/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-16.png diff --git a/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-16@2x.png b/client/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-16@2x.png similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-16@2x.png rename to client/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-16@2x.png diff --git a/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-256.png b/client/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-256.png similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-256.png rename to client/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-256.png diff --git a/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-256@2x.png b/client/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-256@2x.png similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-256@2x.png rename to client/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-256@2x.png diff --git a/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-32.png b/client/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-32.png similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-32.png rename to client/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-32.png diff --git a/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-32@2x.png b/client/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-32@2x.png similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-32@2x.png rename to client/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-32@2x.png diff --git a/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-512.png b/client/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-512.png similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-512.png rename to client/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-512.png diff --git a/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-512@2x.png b/client/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-512@2x.png similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-512@2x.png rename to client/src/cordova/apple/xcode/ios/Outline/Assets.xcassets/AppIcon.appiconset/icon-512@2x.png diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppDelegate+Outline.h b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppDelegate+Outline.h similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppDelegate+Outline.h rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppDelegate+Outline.h diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppDelegate+Outline.m b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppDelegate+Outline.m similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppDelegate+Outline.m rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppDelegate+Outline.m diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/AppKitController.swift b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/AppKitController.swift similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/AppKitController.swift rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/AppKitController.swift diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/AppKitIntegration.h b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/AppKitIntegration.h similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/AppKitIntegration.h rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/AppKitIntegration.h diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/Contents.json b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/Contents.json similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/Contents.json rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/Contents.json diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/status_bar_button_image.imageset/Contents.json b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/status_bar_button_image.imageset/Contents.json similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/status_bar_button_image.imageset/Contents.json rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/status_bar_button_image.imageset/Contents.json diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/status_bar_button_image.imageset/outline-black-off-2x.png b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/status_bar_button_image.imageset/outline-black-off-2x.png similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/status_bar_button_image.imageset/outline-black-off-2x.png rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/status_bar_button_image.imageset/outline-black-off-2x.png diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/status_bar_button_image_connected.imageset/Contents.json b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/status_bar_button_image_connected.imageset/Contents.json similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/status_bar_button_image_connected.imageset/Contents.json rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/status_bar_button_image_connected.imageset/Contents.json diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/status_bar_button_image_connected.imageset/outline-black-on-2x.png b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/status_bar_button_image_connected.imageset/outline-black-on-2x.png similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/status_bar_button_image_connected.imageset/outline-black-on-2x.png rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/status_bar_button_image_connected.imageset/outline-black-on-2x.png diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/af.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/af.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/af.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/af.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/am.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/am.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/am.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/am.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ar.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ar.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ar.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ar.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/az.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/az.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/az.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/az.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/bg.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/bg.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/bg.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/bg.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/bn.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/bn.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/bn.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/bn.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/bs.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/bs.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/bs.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/bs.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ca.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ca.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ca.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ca.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/cs.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/cs.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/cs.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/cs.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/da.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/da.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/da.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/da.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/de.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/de.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/de.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/de.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/el.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/el.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/el.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/el.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/en-GB.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/en-GB.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/en-GB.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/en-GB.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/en.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/en.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/en.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/en.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/es-419.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/es-419.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/es-419.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/es-419.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/es.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/es.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/es.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/es.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/et.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/et.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/et.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/et.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/fa.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/fa.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/fa.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/fa.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/fi.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/fi.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/fi.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/fi.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/fil.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/fil.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/fil.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/fil.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/fr.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/fr.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/fr.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/fr.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/he.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/he.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/he.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/he.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/hi.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/hi.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/hi.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/hi.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/hr.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/hr.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/hr.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/hr.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/hu.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/hu.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/hu.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/hu.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/hy.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/hy.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/hy.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/hy.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/id.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/id.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/id.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/id.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/is.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/is.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/is.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/is.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/it.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/it.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/it.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/it.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ja.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ja.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ja.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ja.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ka.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ka.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ka.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ka.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/kk.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/kk.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/kk.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/kk.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/km.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/km.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/km.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/km.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ko.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ko.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ko.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ko.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/lo.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/lo.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/lo.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/lo.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/lt.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/lt.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/lt.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/lt.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/lv.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/lv.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/lv.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/lv.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/mk.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/mk.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/mk.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/mk.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/mn.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/mn.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/mn.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/mn.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/mr.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/mr.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/mr.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/mr.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ms.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ms.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ms.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ms.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/my.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/my.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/my.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/my.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ne.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ne.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ne.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ne.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/nl.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/nl.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/nl.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/nl.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/no.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/no.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/no.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/no.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/pl.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/pl.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/pl.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/pl.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/pt-BR.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/pt-BR.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/pt-BR.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/pt-BR.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/pt-PT.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/pt-PT.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/pt-PT.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/pt-PT.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ro.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ro.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ro.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ro.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ru.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ru.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ru.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ru.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/si.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/si.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/si.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/si.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sk.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sk.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sk.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sk.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sl.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sl.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sl.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sl.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sq.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sq.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sq.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sq.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sr-Latn.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sr-Latn.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sr-Latn.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sr-Latn.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sr.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sr.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sr.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sr.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sv.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sv.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sv.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sv.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sw.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sw.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sw.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sw.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ta.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ta.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ta.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ta.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/th.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/th.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/th.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/th.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/tr.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/tr.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/tr.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/tr.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/uk.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/uk.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/uk.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/uk.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ur.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ur.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ur.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ur.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/vi.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/vi.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/vi.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/vi.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/zh-Hans.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/zh-Hans.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/zh-Hans.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/zh-Hans.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/zh-Hant.lproj/Localizable.strings b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/zh-Hant.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/zh-Hant.lproj/Localizable.strings rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/zh-Hant.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/StatusItemController.swift b/client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/StatusItemController.swift similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/StatusItemController.swift rename to client/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/StatusItemController.swift diff --git a/src/cordova/apple/xcode/ios/Outline/Outline-Info.plist b/client/src/cordova/apple/xcode/ios/Outline/Outline-Info.plist similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Outline-Info.plist rename to client/src/cordova/apple/xcode/ios/Outline/Outline-Info.plist diff --git a/src/cordova/apple/xcode/ios/Outline/Outline.entitlements b/client/src/cordova/apple/xcode/ios/Outline/Outline.entitlements similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/Outline.entitlements rename to client/src/cordova/apple/xcode/ios/Outline/Outline.entitlements diff --git a/src/cordova/apple/xcode/ios/Outline/VpnExtension-Info.plist b/client/src/cordova/apple/xcode/ios/Outline/VpnExtension-Info.plist similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/VpnExtension-Info.plist rename to client/src/cordova/apple/xcode/ios/Outline/VpnExtension-Info.plist diff --git a/src/cordova/apple/xcode/ios/Outline/VpnExtension.entitlements b/client/src/cordova/apple/xcode/ios/Outline/VpnExtension.entitlements similarity index 100% rename from src/cordova/apple/xcode/ios/Outline/VpnExtension.entitlements rename to client/src/cordova/apple/xcode/ios/Outline/VpnExtension.entitlements diff --git a/src/cordova/apple/xcode/ios/OutlineLauncher/OutlineLauncher.entitlements b/client/src/cordova/apple/xcode/ios/OutlineLauncher/OutlineLauncher.entitlements similarity index 100% rename from src/cordova/apple/xcode/ios/OutlineLauncher/OutlineLauncher.entitlements rename to client/src/cordova/apple/xcode/ios/OutlineLauncher/OutlineLauncher.entitlements diff --git a/src/cordova/apple/xcode/macos/Outline.xcodeproj/project.pbxproj b/client/src/cordova/apple/xcode/macos/Outline.xcodeproj/project.pbxproj similarity index 100% rename from src/cordova/apple/xcode/macos/Outline.xcodeproj/project.pbxproj rename to client/src/cordova/apple/xcode/macos/Outline.xcodeproj/project.pbxproj diff --git a/src/cordova/apple/xcode/macos/Outline.xcodeproj/xcshareddata/xcschemes/Outline.xcscheme b/client/src/cordova/apple/xcode/macos/Outline.xcodeproj/xcshareddata/xcschemes/Outline.xcscheme similarity index 100% rename from src/cordova/apple/xcode/macos/Outline.xcodeproj/xcshareddata/xcschemes/Outline.xcscheme rename to client/src/cordova/apple/xcode/macos/Outline.xcodeproj/xcshareddata/xcschemes/Outline.xcscheme diff --git a/src/cordova/apple/xcode/macos/Outline.xcodeproj/xcshareddata/xcschemes/OutlineLauncher.xcscheme b/client/src/cordova/apple/xcode/macos/Outline.xcodeproj/xcshareddata/xcschemes/OutlineLauncher.xcscheme similarity index 100% rename from src/cordova/apple/xcode/macos/Outline.xcodeproj/xcshareddata/xcschemes/OutlineLauncher.xcscheme rename to client/src/cordova/apple/xcode/macos/Outline.xcodeproj/xcshareddata/xcschemes/OutlineLauncher.xcscheme diff --git a/src/cordova/apple/xcode/macos/Outline.xcodeproj/xcshareddata/xcschemes/VpnExtension.xcscheme b/client/src/cordova/apple/xcode/macos/Outline.xcodeproj/xcshareddata/xcschemes/VpnExtension.xcscheme similarity index 100% rename from src/cordova/apple/xcode/macos/Outline.xcodeproj/xcshareddata/xcschemes/VpnExtension.xcscheme rename to client/src/cordova/apple/xcode/macos/Outline.xcodeproj/xcshareddata/xcschemes/VpnExtension.xcscheme diff --git a/src/cordova/apple/xcode/macos/Outline/Classes/AppDelegate.m b/client/src/cordova/apple/xcode/macos/Outline/Classes/AppDelegate.m similarity index 100% rename from src/cordova/apple/xcode/macos/Outline/Classes/AppDelegate.m rename to client/src/cordova/apple/xcode/macos/Outline/Classes/AppDelegate.m diff --git a/src/cordova/apple/xcode/macos/Outline/Classes/CDVMacOsUrlHandler.swift b/client/src/cordova/apple/xcode/macos/Outline/Classes/CDVMacOsUrlHandler.swift similarity index 100% rename from src/cordova/apple/xcode/macos/Outline/Classes/CDVMacOsUrlHandler.swift rename to client/src/cordova/apple/xcode/macos/Outline/Classes/CDVMacOsUrlHandler.swift diff --git a/src/cordova/apple/xcode/macos/Outline/Classes/EventMonitor.swift b/client/src/cordova/apple/xcode/macos/Outline/Classes/EventMonitor.swift similarity index 100% rename from src/cordova/apple/xcode/macos/Outline/Classes/EventMonitor.swift rename to client/src/cordova/apple/xcode/macos/Outline/Classes/EventMonitor.swift diff --git a/src/cordova/apple/xcode/macos/Outline/Images.xcassets/StatusBarButtonImage.imageset/Contents.json b/client/src/cordova/apple/xcode/macos/Outline/Images.xcassets/StatusBarButtonImage.imageset/Contents.json similarity index 100% rename from src/cordova/apple/xcode/macos/Outline/Images.xcassets/StatusBarButtonImage.imageset/Contents.json rename to client/src/cordova/apple/xcode/macos/Outline/Images.xcassets/StatusBarButtonImage.imageset/Contents.json diff --git a/src/cordova/apple/xcode/macos/Outline/Images.xcassets/StatusBarButtonImage.imageset/outline-black-off-2x.png b/client/src/cordova/apple/xcode/macos/Outline/Images.xcassets/StatusBarButtonImage.imageset/outline-black-off-2x.png similarity index 100% rename from src/cordova/apple/xcode/macos/Outline/Images.xcassets/StatusBarButtonImage.imageset/outline-black-off-2x.png rename to client/src/cordova/apple/xcode/macos/Outline/Images.xcassets/StatusBarButtonImage.imageset/outline-black-off-2x.png diff --git a/src/cordova/apple/xcode/macos/Outline/Images.xcassets/StatusBarButtonImageConnected.imageset/Contents.json b/client/src/cordova/apple/xcode/macos/Outline/Images.xcassets/StatusBarButtonImageConnected.imageset/Contents.json similarity index 100% rename from src/cordova/apple/xcode/macos/Outline/Images.xcassets/StatusBarButtonImageConnected.imageset/Contents.json rename to client/src/cordova/apple/xcode/macos/Outline/Images.xcassets/StatusBarButtonImageConnected.imageset/Contents.json diff --git a/src/cordova/apple/xcode/macos/Outline/Images.xcassets/StatusBarButtonImageConnected.imageset/outline-black-on-2x.png b/client/src/cordova/apple/xcode/macos/Outline/Images.xcassets/StatusBarButtonImageConnected.imageset/outline-black-on-2x.png similarity index 100% rename from src/cordova/apple/xcode/macos/Outline/Images.xcassets/StatusBarButtonImageConnected.imageset/outline-black-on-2x.png rename to client/src/cordova/apple/xcode/macos/Outline/Images.xcassets/StatusBarButtonImageConnected.imageset/outline-black-on-2x.png diff --git a/src/cordova/apple/xcode/macos/Outline/MainViewController.xib b/client/src/cordova/apple/xcode/macos/Outline/MainViewController.xib similarity index 100% rename from src/cordova/apple/xcode/macos/Outline/MainViewController.xib rename to client/src/cordova/apple/xcode/macos/Outline/MainViewController.xib diff --git a/src/cordova/apple/xcode/macos/Outline/Outline-Info.plist b/client/src/cordova/apple/xcode/macos/Outline/Outline-Info.plist similarity index 100% rename from src/cordova/apple/xcode/macos/Outline/Outline-Info.plist rename to client/src/cordova/apple/xcode/macos/Outline/Outline-Info.plist diff --git a/src/cordova/apple/xcode/macos/Outline/Outline.entitlements b/client/src/cordova/apple/xcode/macos/Outline/Outline.entitlements similarity index 100% rename from src/cordova/apple/xcode/macos/Outline/Outline.entitlements rename to client/src/cordova/apple/xcode/macos/Outline/Outline.entitlements diff --git a/src/cordova/apple/xcode/macos/Outline/VpnExtension-Info.plist b/client/src/cordova/apple/xcode/macos/Outline/VpnExtension-Info.plist similarity index 100% rename from src/cordova/apple/xcode/macos/Outline/VpnExtension-Info.plist rename to client/src/cordova/apple/xcode/macos/Outline/VpnExtension-Info.plist diff --git a/src/cordova/apple/xcode/macos/Outline/VpnExtension.entitlements b/client/src/cordova/apple/xcode/macos/Outline/VpnExtension.entitlements similarity index 100% rename from src/cordova/apple/xcode/macos/Outline/VpnExtension.entitlements rename to client/src/cordova/apple/xcode/macos/Outline/VpnExtension.entitlements diff --git a/src/cordova/apple/xcode/macos/Outline/config.xml b/client/src/cordova/apple/xcode/macos/Outline/config.xml similarity index 100% rename from src/cordova/apple/xcode/macos/Outline/config.xml rename to client/src/cordova/apple/xcode/macos/Outline/config.xml diff --git a/src/cordova/apple/xcode/macos/OutlineLauncher/AppDelegate.swift b/client/src/cordova/apple/xcode/macos/OutlineLauncher/AppDelegate.swift similarity index 100% rename from src/cordova/apple/xcode/macos/OutlineLauncher/AppDelegate.swift rename to client/src/cordova/apple/xcode/macos/OutlineLauncher/AppDelegate.swift diff --git a/src/cordova/apple/xcode/macos/OutlineLauncher/Base.lproj/Main.storyboard b/client/src/cordova/apple/xcode/macos/OutlineLauncher/Base.lproj/Main.storyboard similarity index 100% rename from src/cordova/apple/xcode/macos/OutlineLauncher/Base.lproj/Main.storyboard rename to client/src/cordova/apple/xcode/macos/OutlineLauncher/Base.lproj/Main.storyboard diff --git a/src/cordova/apple/xcode/macos/OutlineLauncher/Info.plist b/client/src/cordova/apple/xcode/macos/OutlineLauncher/Info.plist similarity index 100% rename from src/cordova/apple/xcode/macos/OutlineLauncher/Info.plist rename to client/src/cordova/apple/xcode/macos/OutlineLauncher/Info.plist diff --git a/src/cordova/apple/xcode/macos/OutlineLauncher/OutlineLauncher.entitlements b/client/src/cordova/apple/xcode/macos/OutlineLauncher/OutlineLauncher.entitlements similarity index 100% rename from src/cordova/apple/xcode/macos/OutlineLauncher/OutlineLauncher.entitlements rename to client/src/cordova/apple/xcode/macos/OutlineLauncher/OutlineLauncher.entitlements diff --git a/src/cordova/apple/xcode/macos/osx.json b/client/src/cordova/apple/xcode/macos/osx.json similarity index 100% rename from src/cordova/apple/xcode/macos/osx.json rename to client/src/cordova/apple/xcode/macos/osx.json diff --git a/src/cordova/apple/xcode/macos/www/cordova_plugins.js b/client/src/cordova/apple/xcode/macos/www/cordova_plugins.js similarity index 100% rename from src/cordova/apple/xcode/macos/www/cordova_plugins.js rename to client/src/cordova/apple/xcode/macos/www/cordova_plugins.js diff --git a/src/cordova/build.action.mjs b/client/src/cordova/build.action.mjs similarity index 100% rename from src/cordova/build.action.mjs rename to client/src/cordova/build.action.mjs diff --git a/src/cordova/import_messages.action.mjs b/client/src/cordova/import_messages.action.mjs similarity index 100% rename from src/cordova/import_messages.action.mjs rename to client/src/cordova/import_messages.action.mjs diff --git a/src/cordova/plugin/README.md b/client/src/cordova/plugin/README.md similarity index 83% rename from src/cordova/plugin/README.md rename to client/src/cordova/plugin/README.md index 0936fc13a6e..a79b6eb340d 100644 --- a/src/cordova/plugin/README.md +++ b/client/src/cordova/plugin/README.md @@ -22,6 +22,6 @@ Native platforms consume [outline-go-tun2socks](https://github.com/Jigsaw-Code/o We use [Swift Packages](https://developer.apple.com/documentation/xcode/swift-packages) for third party dependencies: sentry-cocoa and CocoaLumberjack. -To upgrade the Swift Package dependencies, update the `version` field for the corresponding package under the `XCRemoteSwiftPackageReference` section in the Outline.pbxproj file for [macOS](https://github.com/Jigsaw-Code/outline-client/blob/master/src/cordova/apple/xcode/macos/Outline.xcodeproj/project.pbxproj) or [iOS](https://github.com/Jigsaw-Code/outline-client/blob/master/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj). +To upgrade the Swift Package dependencies, update the `version` field for the corresponding package under the `XCRemoteSwiftPackageReference` section in the Outline.pbxproj file for [macOS](https://github.com/Jigsaw-Code/outline-apps/blob/master/src/cordova/apple/xcode/macos/Outline.xcodeproj/project.pbxproj) or [iOS](https://github.com/Jigsaw-Code/outline-apps/blob/master/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj). Alternatively, open the xcworkspace file for the curresponding OS, and update the packages via the XCode UI. diff --git a/src/cordova/plugin/android/java/build-extras.gradle b/client/src/cordova/plugin/android/java/build-extras.gradle similarity index 100% rename from src/cordova/plugin/android/java/build-extras.gradle rename to client/src/cordova/plugin/android/java/build-extras.gradle diff --git a/src/cordova/plugin/android/java/org/outline/OutlinePlugin.java b/client/src/cordova/plugin/android/java/org/outline/OutlinePlugin.java similarity index 100% rename from src/cordova/plugin/android/java/org/outline/OutlinePlugin.java rename to client/src/cordova/plugin/android/java/org/outline/OutlinePlugin.java diff --git a/src/cordova/plugin/android/resources/bypass_subnets.xml b/client/src/cordova/plugin/android/resources/bypass_subnets.xml similarity index 100% rename from src/cordova/plugin/android/resources/bypass_subnets.xml rename to client/src/cordova/plugin/android/resources/bypass_subnets.xml diff --git a/src/cordova/plugin/android/resources/small_icon.png b/client/src/cordova/plugin/android/resources/small_icon.png similarity index 100% rename from src/cordova/plugin/android/resources/small_icon.png rename to client/src/cordova/plugin/android/resources/small_icon.png diff --git a/src/cordova/plugin/android/resources/strings/values-af/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-af/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-af/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-af/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-am/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-am/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-am/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-am/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-ar/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-ar/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-ar/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-ar/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-az/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-az/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-az/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-az/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-b+sr+Latn/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-b+sr+Latn/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-b+sr+Latn/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-b+sr+Latn/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-bg/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-bg/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-bg/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-bg/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-bn/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-bn/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-bn/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-bn/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-bs/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-bs/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-bs/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-bs/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-ca/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-ca/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-ca/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-ca/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-cs/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-cs/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-cs/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-cs/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-da/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-da/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-da/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-da/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-de/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-de/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-de/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-de/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-el/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-el/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-el/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-el/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-en-rGB/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-en-rGB/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-en-rGB/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-en-rGB/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-en/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-en/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-en/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-en/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-es/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-es/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-es/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-es/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-et/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-et/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-et/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-et/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-fa/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-fa/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-fa/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-fa/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-fi/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-fi/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-fi/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-fi/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-fil/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-fil/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-fil/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-fil/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-fr/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-fr/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-fr/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-fr/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-he/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-he/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-he/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-he/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-hi/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-hi/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-hi/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-hi/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-hr/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-hr/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-hr/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-hr/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-hu/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-hu/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-hu/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-hu/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-hy/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-hy/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-hy/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-hy/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-id/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-id/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-id/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-id/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-is/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-is/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-is/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-is/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-it/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-it/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-it/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-it/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-ja/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-ja/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-ja/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-ja/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-ka/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-ka/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-ka/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-ka/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-kk/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-kk/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-kk/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-kk/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-km/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-km/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-km/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-km/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-ko/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-ko/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-ko/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-ko/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-lo/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-lo/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-lo/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-lo/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-lt/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-lt/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-lt/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-lt/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-lv/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-lv/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-lv/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-lv/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-mk/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-mk/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-mk/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-mk/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-mn/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-mn/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-mn/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-mn/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-mr/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-mr/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-mr/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-mr/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-ms/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-ms/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-ms/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-ms/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-my/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-my/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-my/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-my/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-ne/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-ne/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-ne/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-ne/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-nl/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-nl/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-nl/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-nl/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-no/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-no/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-no/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-no/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-pl/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-pl/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-pl/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-pl/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-pt-rBR/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-pt-rBR/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-pt-rBR/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-pt-rBR/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-pt-rPT/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-pt-rPT/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-pt-rPT/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-pt-rPT/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-ro/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-ro/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-ro/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-ro/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-ru/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-ru/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-ru/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-ru/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-si/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-si/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-si/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-si/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-sk/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-sk/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-sk/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-sk/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-sl/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-sl/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-sl/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-sl/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-sq/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-sq/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-sq/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-sq/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-sr/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-sr/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-sr/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-sr/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-sv/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-sv/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-sv/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-sv/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-sw/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-sw/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-sw/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-sw/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-ta/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-ta/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-ta/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-ta/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-th/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-th/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-th/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-th/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-tr/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-tr/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-tr/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-tr/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-uk/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-uk/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-uk/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-uk/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-ur/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-ur/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-ur/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-ur/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-vi/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-vi/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-vi/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-vi/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-zh-rCN/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-zh-rCN/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-zh-rCN/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-zh-rCN/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values-zh-rTW/strings.xml b/client/src/cordova/plugin/android/resources/strings/values-zh-rTW/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values-zh-rTW/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values-zh-rTW/strings.xml diff --git a/src/cordova/plugin/android/resources/strings/values/strings.xml b/client/src/cordova/plugin/android/resources/strings/values/strings.xml similarity index 100% rename from src/cordova/plugin/android/resources/strings/values/strings.xml rename to client/src/cordova/plugin/android/resources/strings/values/strings.xml diff --git a/src/cordova/plugin/android/scripts/copy_third_party.js b/client/src/cordova/plugin/android/scripts/copy_third_party.js similarity index 100% rename from src/cordova/plugin/android/scripts/copy_third_party.js rename to client/src/cordova/plugin/android/scripts/copy_third_party.js diff --git a/src/cordova/plugin/apple/src/OutlinePlugin.swift b/client/src/cordova/plugin/apple/src/OutlinePlugin.swift similarity index 100% rename from src/cordova/plugin/apple/src/OutlinePlugin.swift rename to client/src/cordova/plugin/apple/src/OutlinePlugin.swift diff --git a/src/cordova/plugin/apple/src/macos/Outline-Bridging-Header.h b/client/src/cordova/plugin/apple/src/macos/Outline-Bridging-Header.h similarity index 100% rename from src/cordova/plugin/apple/src/macos/Outline-Bridging-Header.h rename to client/src/cordova/plugin/apple/src/macos/Outline-Bridging-Header.h diff --git a/src/cordova/plugin/package.json b/client/src/cordova/plugin/package.json similarity index 100% rename from src/cordova/plugin/package.json rename to client/src/cordova/plugin/package.json diff --git a/src/cordova/plugin/plugin.xml b/client/src/cordova/plugin/plugin.xml similarity index 100% rename from src/cordova/plugin/plugin.xml rename to client/src/cordova/plugin/plugin.xml diff --git a/src/cordova/setup.action.mjs b/client/src/cordova/setup.action.mjs similarity index 98% rename from src/cordova/setup.action.mjs rename to client/src/cordova/setup.action.mjs index b12713fbe21..8f615d690e0 100644 --- a/src/cordova/setup.action.mjs +++ b/client/src/cordova/setup.action.mjs @@ -49,6 +49,9 @@ export async function main(...parameters) { cordova.on('verbose', message => console.debug(`[cordova:verbose] ${message}`)); } + // this is so cordova doesn't complain about not being in a cordova project + process.env.PWD = getRootDir(); + switch (platform + buildMode) { case 'android' + 'debug': return androidDebug(verbose); diff --git a/src/cordova/test.action.mjs b/client/src/cordova/test.action.mjs similarity index 100% rename from src/cordova/test.action.mjs rename to client/src/cordova/test.action.mjs diff --git a/src/electron/README.md b/client/src/electron/README.md similarity index 100% rename from src/electron/README.md rename to client/src/electron/README.md diff --git a/src/electron/add_tap_device.bat b/client/src/electron/add_tap_device.bat similarity index 100% rename from src/electron/add_tap_device.bat rename to client/src/electron/add_tap_device.bat diff --git a/src/electron/build.action.mjs b/client/src/electron/build.action.mjs similarity index 100% rename from src/electron/build.action.mjs rename to client/src/electron/build.action.mjs diff --git a/src/electron/build_main.action.mjs b/client/src/electron/build_main.action.mjs similarity index 100% rename from src/electron/build_main.action.mjs rename to client/src/electron/build_main.action.mjs diff --git a/src/electron/connectivity.ts b/client/src/electron/connectivity.ts similarity index 100% rename from src/electron/connectivity.ts rename to client/src/electron/connectivity.ts diff --git a/src/electron/custom_install_steps.nsh b/client/src/electron/custom_install_steps.nsh similarity index 97% rename from src/electron/custom_install_steps.nsh rename to client/src/electron/custom_install_steps.nsh index 4ca378065d6..3f106efcd60 100755 --- a/src/electron/custom_install_steps.nsh +++ b/client/src/electron/custom_install_steps.nsh @@ -1,170 +1,170 @@ -; Copyright 2018 The Outline Authors -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - -!include StrFunc.nsh -!include WinVer.nsh -!include x64.nsh - -!include env.nsh - -; StrFunc weirdness; this fix suggested here: -; https://github.com/electron-userland/electron-builder/issues/888 -!ifndef BUILD_UNINSTALLER -${StrLoc} -${StrNSISToIO} -${StrRep} -!endif - -!macro customInstall - ; Normally, because we mark the installer binary as requiring administrator permissions, the - ; installer will be running with administrator permissions at this point. The exception is when - ; the system is running with the *lowest* (least safe) UAC setting in which case the installer - ; can progress to this point without administrator permissions. - ; - ; If that's the case, exit now so we don't waste time to trying to install the TAP device, etc. - ; Additionally, the client can detect their absence and prompt the user to reinstall. - ; - ; The returned value does *not* seem to be based on the user's current diaplay language. - UserInfo::GetAccountType - Pop $0 - StrCmp $0 "Admin" isadmin - MessageBox MB_OK "Sorry, Outline requires administrator permissions." - Quit - - isadmin: - - ; TAP device files. - SetOutPath "$INSTDIR\tap-windows6" - ${If} ${RunningX64} - File /r "${PROJECT_DIR}\third_party\tap-windows6\bin\amd64\*" - ${Else} - File /r "${PROJECT_DIR}\third_party\tap-windows6\bin\i386\*" - ${EndIf} - SetOutPath - - File "${PROJECT_DIR}\src\electron\add_tap_device.bat" - File "${PROJECT_DIR}\src\electron\find_tap_device_name.bat" - - ; OutlineService files, stopping the service first in case it's still running. - nsExec::Exec "$SYSDIR\net stop OutlineService" - File "${PROJECT_DIR}\tools\OutlineService\OutlineService\bin\OutlineService.exe" - File "${PROJECT_DIR}\tools\smartdnsblock\bin\smartdnsblock.exe" - File "${PROJECT_DIR}\third_party\newtonsoft\Newtonsoft.Json.dll" - File "${PROJECT_DIR}\src\electron\install_windows_service.bat" - - ; ExecToStack captures both stdout and stderr from the script, in the order output. - ; Set a (long) timeout in case the device never becomes visible to netsh. - ReadEnvStr $0 COMSPEC - nsExec::ExecToStack /timeout=180000 '$0 /c add_tap_device.bat' - - Pop $0 - Pop $1 - StrCmp $0 0 installservice - - ; The TAP device may have failed to install because the user did not want to - ; install the device driver. If so: - ; - tell the user that they need to install the driver - ; - skip the Sentry report - ; - quit - ; - ; When this happens, tapinstall.exe prints an error message like this: - ; UpdateDriverForPlugAndPlayDevices failed, GetLastError=-536870333 - ; - ; We can use the presence of that magic number to detect this case. - Var /GLOBAL DRIVER_FAILURE_MAGIC_NUMBER_INDEX - ${StrLoc} $DRIVER_FAILURE_MAGIC_NUMBER_INDEX $1 "536870333" ">" - - StrCmp $DRIVER_FAILURE_MAGIC_NUMBER_INDEX "" submitsentryreport - ; The term "device software" is the same as that used by the prompt, at least on Windows 7. - MessageBox MB_OK "Sorry, you must install the device software in order to use Outline. Please try \ - running the installer again." - Quit - - submitsentryreport: - MessageBox MB_OK "Sorry, we could not configure your system to connect to Outline. Please try \ - running the installer again. If you still cannot install Outline, please get in \ - touch with us and let us know that the TAP device failed to install with error code $0." - - ; Submit a Sentry error event. - ; - ; This will get bundled into an issue named "could not install TAP device" with the following - ; attributes: - ; - a single breadcrumb containing the output of add_tap_device.bat - ; - Windows version, as a tag named "os" with a value identical in most cases to what the - ; JavaScript Sentry client produces, e.g. "Windows 10.0.17134" - ; - client version - ; - ; Note: - ; - Sentry won't accept a breadcrumbs without a timestamp; fortunately, it accepts obviously - ; bogus values so we don't have to fetch the real time. - ; - Because nsExec::ExecToStack yields "NSIS strings" strings suitable for inclusion in, for - ; example, a MessageBox, e.g. "device not found$\ncommand failed", we must convert it to a - ; string that Sentry will like *and* can fit on one line, e.g. - ; "device not found\ncommand failed"; fortunately, StrFunc.nsh's StrNSISToIO does precisely - ; this. - ; - RELEASE and SENTRY_URL are defined in env.nsh which is generated at build time by - ; {package,release}_action.sh. - - ; TODO: Remove this once we figure out why/if breadcrumbs are being truncated. - Var /GLOBAL FAILURE_MESSAGE_LENGTH - StrLen $FAILURE_MESSAGE_LENGTH $1 - - ; http://nsis.sourceforge.net/Docs/StrFunc/StrFunc.txt - Var /GLOBAL FAILURE_MESSAGE - ${StrNSISToIO} $FAILURE_MESSAGE $1 - ${StrRep} $FAILURE_MESSAGE $FAILURE_MESSAGE '"' '\"' - - ${WinVerGetMajor} $R0 - ${WinVerGetMinor} $R1 - ${WinVerGetBuild} $R2 - - ; http://nsis.sourceforge.net/Inetc_plug-in#post - inetc::post '{\ - "message":"could not install TAP device ($0)",\ - "release":"${RELEASE}",\ - "tags":[\ - ["os", "Windows $R0.$R1.$R2"],\ - ["error_message_length", "$FAILURE_MESSAGE_LENGTH"]\ - ],\ - "breadcrumbs":[\ - {"timestamp":1, "message":"$FAILURE_MESSAGE"}\ - ]\ - }' /TOSTACK ${SENTRY_URL} /END - - Quit - - installservice: - - nsExec::Exec install_windows_service.bat - - nsExec::Exec "$SYSDIR\sc query OutlineService" - Pop $0 - StrCmp $0 0 success - ; TODO: Trigger a Sentry report for service installation failure, too, and revisit - ; the restart stuff in the TypeScript code. - MessageBox MB_OK "Sorry, we could not configure your system to connect to Outline. Please try \ - running the installer again. If you still cannot install Outline, please get in touch with us \ - and let us know that OutlineService failed to install." - Quit - - success: - -!macroend - -; TODO: Remove the TAP device on uninstall. This is impossible to implement safely -; with the bundled tapinstall.exe because it can only remove *all* devices -; having hwid tap0901 and these may include non-Outline devices. -!macro customUnInstall - nsExec::Exec "$SYSDIR\net stop OutlineService" - nsExec::Exec "$SYSDIR\sc delete OutlineService" -!macroend +; Copyright 2018 The Outline Authors +; +; Licensed under the Apache License, Version 2.0 (the "License"); +; you may not use this file except in compliance with the License. +; You may obtain a copy of the License at +; +; http://www.apache.org/licenses/LICENSE-2.0 +; +; Unless required by applicable law or agreed to in writing, software +; distributed under the License is distributed on an "AS IS" BASIS, +; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +; See the License for the specific language governing permissions and +; limitations under the License. + +!include StrFunc.nsh +!include WinVer.nsh +!include x64.nsh + +!include env.nsh + +; StrFunc weirdness; this fix suggested here: +; https://github.com/electron-userland/electron-builder/issues/888 +!ifndef BUILD_UNINSTALLER +${StrLoc} +${StrNSISToIO} +${StrRep} +!endif + +!macro customInstall + ; Normally, because we mark the installer binary as requiring administrator permissions, the + ; installer will be running with administrator permissions at this point. The exception is when + ; the system is running with the *lowest* (least safe) UAC setting in which case the installer + ; can progress to this point without administrator permissions. + ; + ; If that's the case, exit now so we don't waste time to trying to install the TAP device, etc. + ; Additionally, the client can detect their absence and prompt the user to reinstall. + ; + ; The returned value does *not* seem to be based on the user's current diaplay language. + UserInfo::GetAccountType + Pop $0 + StrCmp $0 "Admin" isadmin + MessageBox MB_OK "Sorry, Outline requires administrator permissions." + Quit + + isadmin: + + ; TAP device files. + SetOutPath "$INSTDIR\tap-windows6" + ${If} ${RunningX64} + File /r "${PROJECT_DIR}\third_party\tap-windows6\bin\amd64\*" + ${Else} + File /r "${PROJECT_DIR}\third_party\tap-windows6\bin\i386\*" + ${EndIf} + SetOutPath - + File "${PROJECT_DIR}\src\electron\add_tap_device.bat" + File "${PROJECT_DIR}\src\electron\find_tap_device_name.bat" + + ; OutlineService files, stopping the service first in case it's still running. + nsExec::Exec "$SYSDIR\net stop OutlineService" + File "${PROJECT_DIR}\tools\OutlineService\OutlineService\bin\OutlineService.exe" + File "${PROJECT_DIR}\tools\smartdnsblock\bin\smartdnsblock.exe" + File "${PROJECT_DIR}\third_party\newtonsoft\Newtonsoft.Json.dll" + File "${PROJECT_DIR}\src\electron\install_windows_service.bat" + + ; ExecToStack captures both stdout and stderr from the script, in the order output. + ; Set a (long) timeout in case the device never becomes visible to netsh. + ReadEnvStr $0 COMSPEC + nsExec::ExecToStack /timeout=180000 '$0 /c add_tap_device.bat' + + Pop $0 + Pop $1 + StrCmp $0 0 installservice + + ; The TAP device may have failed to install because the user did not want to + ; install the device driver. If so: + ; - tell the user that they need to install the driver + ; - skip the Sentry report + ; - quit + ; + ; When this happens, tapinstall.exe prints an error message like this: + ; UpdateDriverForPlugAndPlayDevices failed, GetLastError=-536870333 + ; + ; We can use the presence of that magic number to detect this case. + Var /GLOBAL DRIVER_FAILURE_MAGIC_NUMBER_INDEX + ${StrLoc} $DRIVER_FAILURE_MAGIC_NUMBER_INDEX $1 "536870333" ">" + + StrCmp $DRIVER_FAILURE_MAGIC_NUMBER_INDEX "" submitsentryreport + ; The term "device software" is the same as that used by the prompt, at least on Windows 7. + MessageBox MB_OK "Sorry, you must install the device software in order to use Outline. Please try \ + running the installer again." + Quit + + submitsentryreport: + MessageBox MB_OK "Sorry, we could not configure your system to connect to Outline. Please try \ + running the installer again. If you still cannot install Outline, please get in \ + touch with us and let us know that the TAP device failed to install with error code $0." + + ; Submit a Sentry error event. + ; + ; This will get bundled into an issue named "could not install TAP device" with the following + ; attributes: + ; - a single breadcrumb containing the output of add_tap_device.bat + ; - Windows version, as a tag named "os" with a value identical in most cases to what the + ; JavaScript Sentry client produces, e.g. "Windows 10.0.17134" + ; - client version + ; + ; Note: + ; - Sentry won't accept a breadcrumbs without a timestamp; fortunately, it accepts obviously + ; bogus values so we don't have to fetch the real time. + ; - Because nsExec::ExecToStack yields "NSIS strings" strings suitable for inclusion in, for + ; example, a MessageBox, e.g. "device not found$\ncommand failed", we must convert it to a + ; string that Sentry will like *and* can fit on one line, e.g. + ; "device not found\ncommand failed"; fortunately, StrFunc.nsh's StrNSISToIO does precisely + ; this. + ; - RELEASE and SENTRY_URL are defined in env.nsh which is generated at build time by + ; {package,release}_action.sh. + + ; TODO: Remove this once we figure out why/if breadcrumbs are being truncated. + Var /GLOBAL FAILURE_MESSAGE_LENGTH + StrLen $FAILURE_MESSAGE_LENGTH $1 + + ; http://nsis.sourceforge.net/Docs/StrFunc/StrFunc.txt + Var /GLOBAL FAILURE_MESSAGE + ${StrNSISToIO} $FAILURE_MESSAGE $1 + ${StrRep} $FAILURE_MESSAGE $FAILURE_MESSAGE '"' '\"' + + ${WinVerGetMajor} $R0 + ${WinVerGetMinor} $R1 + ${WinVerGetBuild} $R2 + + ; http://nsis.sourceforge.net/Inetc_plug-in#post + inetc::post '{\ + "message":"could not install TAP device ($0)",\ + "release":"${RELEASE}",\ + "tags":[\ + ["os", "Windows $R0.$R1.$R2"],\ + ["error_message_length", "$FAILURE_MESSAGE_LENGTH"]\ + ],\ + "breadcrumbs":[\ + {"timestamp":1, "message":"$FAILURE_MESSAGE"}\ + ]\ + }' /TOSTACK ${SENTRY_URL} /END + + Quit + + installservice: + + nsExec::Exec install_windows_service.bat + + nsExec::Exec "$SYSDIR\sc query OutlineService" + Pop $0 + StrCmp $0 0 success + ; TODO: Trigger a Sentry report for service installation failure, too, and revisit + ; the restart stuff in the TypeScript code. + MessageBox MB_OK "Sorry, we could not configure your system to connect to Outline. Please try \ + running the installer again. If you still cannot install Outline, please get in touch with us \ + and let us know that OutlineService failed to install." + Quit + + success: + +!macroend + +; TODO: Remove the TAP device on uninstall. This is impossible to implement safely +; with the bundled tapinstall.exe because it can only remove *all* devices +; having hwid tap0901 and these may include non-Outline devices. +!macro customUnInstall + nsExec::Exec "$SYSDIR\net stop OutlineService" + nsExec::Exec "$SYSDIR\sc delete OutlineService" +!macroend diff --git a/src/electron/electron-builder.json b/client/src/electron/electron-builder.json similarity index 100% rename from src/electron/electron-builder.json rename to client/src/electron/electron-builder.json diff --git a/src/electron/find_tap_device_name.bat b/client/src/electron/find_tap_device_name.bat similarity index 100% rename from src/electron/find_tap_device_name.bat rename to client/src/electron/find_tap_device_name.bat diff --git a/src/electron/go_vpn_tunnel.ts b/client/src/electron/go_vpn_tunnel.ts similarity index 100% rename from src/electron/go_vpn_tunnel.ts rename to client/src/electron/go_vpn_tunnel.ts diff --git a/src/electron/icons/mac/icon.icns b/client/src/electron/icons/mac/icon.icns similarity index 100% rename from src/electron/icons/mac/icon.icns rename to client/src/electron/icons/mac/icon.icns diff --git a/src/electron/icons/png/1024x1024.png b/client/src/electron/icons/png/1024x1024.png similarity index 100% rename from src/electron/icons/png/1024x1024.png rename to client/src/electron/icons/png/1024x1024.png diff --git a/src/electron/icons/png/128x128.png b/client/src/electron/icons/png/128x128.png similarity index 100% rename from src/electron/icons/png/128x128.png rename to client/src/electron/icons/png/128x128.png diff --git a/src/electron/icons/png/16x16.png b/client/src/electron/icons/png/16x16.png similarity index 100% rename from src/electron/icons/png/16x16.png rename to client/src/electron/icons/png/16x16.png diff --git a/src/electron/icons/png/24x24.png b/client/src/electron/icons/png/24x24.png similarity index 100% rename from src/electron/icons/png/24x24.png rename to client/src/electron/icons/png/24x24.png diff --git a/src/electron/icons/png/256x256.png b/client/src/electron/icons/png/256x256.png similarity index 100% rename from src/electron/icons/png/256x256.png rename to client/src/electron/icons/png/256x256.png diff --git a/src/electron/icons/png/32x32.png b/client/src/electron/icons/png/32x32.png similarity index 100% rename from src/electron/icons/png/32x32.png rename to client/src/electron/icons/png/32x32.png diff --git a/src/electron/icons/png/48x48.png b/client/src/electron/icons/png/48x48.png similarity index 100% rename from src/electron/icons/png/48x48.png rename to client/src/electron/icons/png/48x48.png diff --git a/src/electron/icons/png/512x512.png b/client/src/electron/icons/png/512x512.png similarity index 100% rename from src/electron/icons/png/512x512.png rename to client/src/electron/icons/png/512x512.png diff --git a/src/electron/icons/png/64x64.png b/client/src/electron/icons/png/64x64.png similarity index 100% rename from src/electron/icons/png/64x64.png rename to client/src/electron/icons/png/64x64.png diff --git a/src/electron/icons/win/icon.ico b/client/src/electron/icons/win/icon.ico similarity index 100% rename from src/electron/icons/win/icon.ico rename to client/src/electron/icons/win/icon.ico diff --git a/src/electron/index.ts b/client/src/electron/index.ts similarity index 100% rename from src/electron/index.ts rename to client/src/electron/index.ts diff --git a/src/electron/install_windows_service.bat b/client/src/electron/install_windows_service.bat similarity index 100% rename from src/electron/install_windows_service.bat rename to client/src/electron/install_windows_service.bat diff --git a/src/electron/preload.d.ts b/client/src/electron/preload.d.ts similarity index 100% rename from src/electron/preload.d.ts rename to client/src/electron/preload.d.ts diff --git a/src/electron/preload.ts b/client/src/electron/preload.ts similarity index 100% rename from src/electron/preload.ts rename to client/src/electron/preload.ts diff --git a/src/electron/process.ts b/client/src/electron/process.ts similarity index 100% rename from src/electron/process.ts rename to client/src/electron/process.ts diff --git a/src/electron/routing_service.ts b/client/src/electron/routing_service.ts similarity index 99% rename from src/electron/routing_service.ts rename to client/src/electron/routing_service.ts index 0ca1f1bc674..2bf0db29701 100755 --- a/src/electron/routing_service.ts +++ b/client/src/electron/routing_service.ts @@ -296,9 +296,7 @@ async function installLinuxRoutingServices(): Promise { const src = path.join(srcFolderPath, descriptor.filename); const srcContent = await fsextra.readFile(src); - descriptor.sha256 = createHash('sha256') - .update(srcContent) - .digest('hex'); + descriptor.sha256 = createHash('sha256').update(srcContent).digest('hex'); const dest = path.join(tmp, descriptor.filename); await fsextra.copy(src, dest, {overwrite: true}); diff --git a/src/electron/start.action.mjs b/client/src/electron/start.action.mjs similarity index 100% rename from src/electron/start.action.mjs rename to client/src/electron/start.action.mjs diff --git a/src/electron/tsconfig.json b/client/src/electron/tsconfig.json similarity index 100% rename from src/electron/tsconfig.json rename to client/src/electron/tsconfig.json diff --git a/src/electron/tunnel_store.ts b/client/src/electron/tunnel_store.ts similarity index 100% rename from src/electron/tunnel_store.ts rename to client/src/electron/tunnel_store.ts diff --git a/src/electron/types/socks/index.d.ts b/client/src/electron/types/socks/index.d.ts similarity index 100% rename from src/electron/types/socks/index.d.ts rename to client/src/electron/types/socks/index.d.ts diff --git a/src/electron/vpn_tunnel.ts b/client/src/electron/vpn_tunnel.ts similarity index 100% rename from src/electron/vpn_tunnel.ts rename to client/src/electron/vpn_tunnel.ts diff --git a/src/electron/webpack_electron_main.mjs b/client/src/electron/webpack_electron_main.mjs similarity index 100% rename from src/electron/webpack_electron_main.mjs rename to client/src/electron/webpack_electron_main.mjs diff --git a/src/electron/windows/digicert-usb-config/eToken-macos.cfg b/client/src/electron/windows/digicert-usb-config/eToken-macos.cfg similarity index 100% rename from src/electron/windows/digicert-usb-config/eToken-macos.cfg rename to client/src/electron/windows/digicert-usb-config/eToken-macos.cfg diff --git a/src/electron/windows/digicert-usb-config/eToken-windows.cfg b/client/src/electron/windows/digicert-usb-config/eToken-windows.cfg similarity index 100% rename from src/electron/windows/digicert-usb-config/eToken-windows.cfg rename to client/src/electron/windows/digicert-usb-config/eToken-windows.cfg diff --git a/src/electron/windows/electron_builder_signing_plugin.cjs b/client/src/electron/windows/electron_builder_signing_plugin.cjs similarity index 87% rename from src/electron/windows/electron_builder_signing_plugin.cjs rename to client/src/electron/windows/electron_builder_signing_plugin.cjs index cc66e17f3e0..fac2b89a7c1 100644 --- a/src/electron/windows/electron_builder_signing_plugin.cjs +++ b/client/src/electron/windows/electron_builder_signing_plugin.cjs @@ -13,7 +13,7 @@ // limitations under the License. // CommonJS module is required, ES6 module is not supported by electron-builder: -// /outline-client/node_modules/app-builder-lib/out/platformPackager.js:597 +// /outline-apps/node_modules/app-builder-lib/out/platformPackager.js:597 // const m = require(p); // ^ // Error [ERR_REQUIRE_ESM]: require() of ES Module .../electron_builder_signing_plugin.mjs not supported. @@ -30,9 +30,13 @@ */ async function electronBuilderEntryPoint(configuration) { const {runAction} = await import('../../build/run_action.mjs'); - await runAction('src/electron/windows/sign_windows_executable', - '--target', configuration.path, - '--algorithm', configuration.hash); + await runAction( + 'src/electron/windows/sign_windows_executable', + '--target', + configuration.path, + '--algorithm', + configuration.hash + ); } exports.default = electronBuilderEntryPoint; diff --git a/src/electron/windows/sign_windows_executable.action.mjs b/client/src/electron/windows/sign_windows_executable.action.mjs similarity index 100% rename from src/electron/windows/sign_windows_executable.action.mjs rename to client/src/electron/windows/sign_windows_executable.action.mjs diff --git a/src/infrastructure/custom_error.ts b/client/src/infrastructure/custom_error.ts similarity index 100% rename from src/infrastructure/custom_error.ts rename to client/src/infrastructure/custom_error.ts diff --git a/src/infrastructure/electron/app_paths.ts b/client/src/infrastructure/electron/app_paths.ts similarity index 100% rename from src/infrastructure/electron/app_paths.ts rename to client/src/infrastructure/electron/app_paths.ts diff --git a/src/infrastructure/i18n.ts b/client/src/infrastructure/i18n.ts similarity index 100% rename from src/infrastructure/i18n.ts rename to client/src/infrastructure/i18n.ts diff --git a/src/infrastructure/memory_storage.ts b/client/src/infrastructure/memory_storage.ts similarity index 100% rename from src/infrastructure/memory_storage.ts rename to client/src/infrastructure/memory_storage.ts diff --git a/src/infrastructure/timeout_promise.ts b/client/src/infrastructure/timeout_promise.ts similarity index 100% rename from src/infrastructure/timeout_promise.ts rename to client/src/infrastructure/timeout_promise.ts diff --git a/src/tun2socks/build.action.mjs b/client/src/tun2socks/build.action.mjs similarity index 95% rename from src/tun2socks/build.action.mjs rename to client/src/tun2socks/build.action.mjs index c91c9889e6f..f89b5019b10 100644 --- a/src/tun2socks/build.action.mjs +++ b/client/src/tun2socks/build.action.mjs @@ -37,7 +37,7 @@ export async function main(...parameters) { 'build', '-o', `output/build/${targetPlatform}/tun2socks`, - 'github.com/Jigsaw-Code/outline-client/src/tun2socks/outline/electron' + 'github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/outline/electron' ); } diff --git a/src/tun2socks/outline/client.go b/client/src/tun2socks/outline/client.go similarity index 100% rename from src/tun2socks/outline/client.go rename to client/src/tun2socks/outline/client.go diff --git a/src/tun2socks/outline/connectivity/connectivity.go b/client/src/tun2socks/outline/connectivity/connectivity.go similarity index 97% rename from src/tun2socks/outline/connectivity/connectivity.go rename to client/src/tun2socks/outline/connectivity/connectivity.go index 34c5ded2eb1..a05e5690b90 100644 --- a/src/tun2socks/outline/connectivity/connectivity.go +++ b/client/src/tun2socks/outline/connectivity/connectivity.go @@ -21,8 +21,8 @@ import ( "net/http" "time" - "github.com/Jigsaw-Code/outline-client/src/tun2socks/outline" - "github.com/Jigsaw-Code/outline-client/src/tun2socks/outline/neterrors" + "github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/outline" + "github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/outline/neterrors" "github.com/Jigsaw-Code/outline-sdk/transport" ) diff --git a/src/tun2socks/outline/connectivity/connectivity_test.go b/client/src/tun2socks/outline/connectivity/connectivity_test.go similarity index 100% rename from src/tun2socks/outline/connectivity/connectivity_test.go rename to client/src/tun2socks/outline/connectivity/connectivity_test.go diff --git a/src/tun2socks/outline/electron/main.go b/client/src/tun2socks/outline/electron/main.go similarity index 95% rename from src/tun2socks/outline/electron/main.go rename to client/src/tun2socks/outline/electron/main.go index 42bdae3d901..e2864c46fcb 100644 --- a/src/tun2socks/outline/electron/main.go +++ b/client/src/tun2socks/outline/electron/main.go @@ -24,10 +24,10 @@ import ( "syscall" "time" - "github.com/Jigsaw-Code/outline-client/src/tun2socks/outline/internal/utf8" - "github.com/Jigsaw-Code/outline-client/src/tun2socks/outline/neterrors" - "github.com/Jigsaw-Code/outline-client/src/tun2socks/outline/shadowsocks" - "github.com/Jigsaw-Code/outline-client/src/tun2socks/outline/tun2socks" + "github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/outline/internal/utf8" + "github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/outline/neterrors" + "github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/outline/shadowsocks" + "github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/outline/tun2socks" "github.com/eycorsican/go-tun2socks/common/log" _ "github.com/eycorsican/go-tun2socks/common/log/simple" // Register a simple logger. "github.com/eycorsican/go-tun2socks/core" diff --git a/src/tun2socks/outline/internal/utf8/utf8.go b/client/src/tun2socks/outline/internal/utf8/utf8.go similarity index 100% rename from src/tun2socks/outline/internal/utf8/utf8.go rename to client/src/tun2socks/outline/internal/utf8/utf8.go diff --git a/src/tun2socks/outline/internal/utf8/utf8_test.go b/client/src/tun2socks/outline/internal/utf8/utf8_test.go similarity index 100% rename from src/tun2socks/outline/internal/utf8/utf8_test.go rename to client/src/tun2socks/outline/internal/utf8/utf8_test.go diff --git a/src/tun2socks/outline/neterrors/neterrors.go b/client/src/tun2socks/outline/neterrors/neterrors.go similarity index 95% rename from src/tun2socks/outline/neterrors/neterrors.go rename to client/src/tun2socks/outline/neterrors/neterrors.go index a95c9ffbfa9..3ebebbc2488 100644 --- a/src/tun2socks/outline/neterrors/neterrors.go +++ b/client/src/tun2socks/outline/neterrors/neterrors.go @@ -24,7 +24,7 @@ func (e Error) Number() int { return int(e) } -// Outline error codes. Must be kept in sync with definitions in https://github.com/Jigsaw-Code/outline-client/blob/master/src/www/model/errors.ts +// Outline error codes. Must be kept in sync with definitions in https://github.com/Jigsaw-Code/outline-apps/blob/master/src/www/model/errors.ts const ( NoError Error = 0 Unexpected Error = 1 diff --git a/src/tun2socks/outline/shadowsocks/client.go b/client/src/tun2socks/outline/shadowsocks/client.go similarity index 95% rename from src/tun2socks/outline/shadowsocks/client.go rename to client/src/tun2socks/outline/shadowsocks/client.go index a96b004b71b..bacbc2c82b2 100644 --- a/src/tun2socks/outline/shadowsocks/client.go +++ b/client/src/tun2socks/outline/shadowsocks/client.go @@ -25,9 +25,9 @@ import ( "strconv" "time" - "github.com/Jigsaw-Code/outline-client/src/tun2socks/outline" - "github.com/Jigsaw-Code/outline-client/src/tun2socks/outline/connectivity" - "github.com/Jigsaw-Code/outline-client/src/tun2socks/outline/internal/utf8" + "github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/outline" + "github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/outline/connectivity" + "github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/outline/internal/utf8" "github.com/Jigsaw-Code/outline-sdk/transport" "github.com/Jigsaw-Code/outline-sdk/transport/shadowsocks" "github.com/eycorsican/go-tun2socks/common/log" diff --git a/src/tun2socks/outline/shadowsocks/client_test.go b/client/src/tun2socks/outline/shadowsocks/client_test.go similarity index 100% rename from src/tun2socks/outline/shadowsocks/client_test.go rename to client/src/tun2socks/outline/shadowsocks/client_test.go diff --git a/src/tun2socks/outline/shadowsocks/config.go b/client/src/tun2socks/outline/shadowsocks/config.go similarity index 100% rename from src/tun2socks/outline/shadowsocks/config.go rename to client/src/tun2socks/outline/shadowsocks/config.go diff --git a/src/tun2socks/outline/shadowsocks/config_test.go b/client/src/tun2socks/outline/shadowsocks/config_test.go similarity index 100% rename from src/tun2socks/outline/shadowsocks/config_test.go rename to client/src/tun2socks/outline/shadowsocks/config_test.go diff --git a/src/tun2socks/outline/tun2socks/tcp.go b/client/src/tun2socks/outline/tun2socks/tcp.go similarity index 100% rename from src/tun2socks/outline/tun2socks/tcp.go rename to client/src/tun2socks/outline/tun2socks/tcp.go diff --git a/src/tun2socks/outline/tun2socks/tunnel.go b/client/src/tun2socks/outline/tun2socks/tunnel.go similarity index 95% rename from src/tun2socks/outline/tun2socks/tunnel.go rename to client/src/tun2socks/outline/tun2socks/tunnel.go index 5944373ab8e..17fc0d522b9 100644 --- a/src/tun2socks/outline/tun2socks/tunnel.go +++ b/client/src/tun2socks/outline/tun2socks/tunnel.go @@ -25,8 +25,8 @@ import ( "github.com/Jigsaw-Code/outline-sdk/transport" - "github.com/Jigsaw-Code/outline-client/src/tun2socks/outline/connectivity" - "github.com/Jigsaw-Code/outline-client/src/tun2socks/tunnel" + "github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/outline/connectivity" + "github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/tunnel" ) // Tunnel represents a tunnel from a TUN device to a server. diff --git a/src/tun2socks/outline/tun2socks/tunnel_android.go b/client/src/tun2socks/outline/tun2socks/tunnel_android.go similarity index 92% rename from src/tun2socks/outline/tun2socks/tunnel_android.go rename to client/src/tun2socks/outline/tun2socks/tunnel_android.go index c9792fc8580..f1ede839f42 100644 --- a/src/tun2socks/outline/tun2socks/tunnel_android.go +++ b/client/src/tun2socks/outline/tun2socks/tunnel_android.go @@ -17,8 +17,8 @@ package tun2socks import ( "runtime/debug" - "github.com/Jigsaw-Code/outline-client/src/tun2socks/outline/shadowsocks" - "github.com/Jigsaw-Code/outline-client/src/tun2socks/tunnel" + "github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/outline/shadowsocks" + "github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/tunnel" "github.com/eycorsican/go-tun2socks/common/log" ) diff --git a/src/tun2socks/outline/tun2socks/tunnel_darwin.go b/client/src/tun2socks/outline/tun2socks/tunnel_darwin.go similarity index 96% rename from src/tun2socks/outline/tun2socks/tunnel_darwin.go rename to client/src/tun2socks/outline/tun2socks/tunnel_darwin.go index 2caf3d06a85..a0ab3b3cad8 100644 --- a/src/tun2socks/outline/tun2socks/tunnel_darwin.go +++ b/client/src/tun2socks/outline/tun2socks/tunnel_darwin.go @@ -20,7 +20,7 @@ import ( "runtime/debug" "time" - "github.com/Jigsaw-Code/outline-client/src/tun2socks/outline/shadowsocks" + "github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/outline/shadowsocks" ) // TunWriter is an interface that allows for outputting packets to the TUN (VPN). diff --git a/src/tun2socks/outline/tun2socks/udp.go b/client/src/tun2socks/outline/tun2socks/udp.go similarity index 100% rename from src/tun2socks/outline/tun2socks/udp.go rename to client/src/tun2socks/outline/tun2socks/udp.go diff --git a/src/tun2socks/tunnel/tun.go b/client/src/tun2socks/tunnel/tun.go similarity index 100% rename from src/tun2socks/tunnel/tun.go rename to client/src/tun2socks/tunnel/tun.go diff --git a/src/tun2socks/tunnel/tun_android.go b/client/src/tun2socks/tunnel/tun_android.go similarity index 100% rename from src/tun2socks/tunnel/tun_android.go rename to client/src/tun2socks/tunnel/tun_android.go diff --git a/src/tun2socks/tunnel/tunnel.go b/client/src/tun2socks/tunnel/tunnel.go similarity index 100% rename from src/tun2socks/tunnel/tunnel.go rename to client/src/tun2socks/tunnel/tunnel.go diff --git a/src/www/.storybook/main.js b/client/src/www/.storybook/main.js similarity index 100% rename from src/www/.storybook/main.js rename to client/src/www/.storybook/main.js diff --git a/src/www/.storybook/preview-head.html b/client/src/www/.storybook/preview-head.html similarity index 100% rename from src/www/.storybook/preview-head.html rename to client/src/www/.storybook/preview-head.html diff --git a/src/www/.storybook/preview.js b/client/src/www/.storybook/preview.js similarity index 100% rename from src/www/.storybook/preview.js rename to client/src/www/.storybook/preview.js diff --git a/src/www/TODO.spec.ts b/client/src/www/TODO.spec.ts similarity index 100% rename from src/www/TODO.spec.ts rename to client/src/www/TODO.spec.ts diff --git a/src/www/app/app.spec.ts b/client/src/www/app/app.spec.ts similarity index 100% rename from src/www/app/app.spec.ts rename to client/src/www/app/app.spec.ts diff --git a/src/www/app/app.ts b/client/src/www/app/app.ts similarity index 100% rename from src/www/app/app.ts rename to client/src/www/app/app.ts diff --git a/src/www/app/clipboard.ts b/client/src/www/app/clipboard.ts similarity index 100% rename from src/www/app/clipboard.ts rename to client/src/www/app/clipboard.ts diff --git a/src/www/app/cordova_main.ts b/client/src/www/app/cordova_main.ts similarity index 100% rename from src/www/app/cordova_main.ts rename to client/src/www/app/cordova_main.ts diff --git a/src/www/app/electron_main.ts b/client/src/www/app/electron_main.ts similarity index 100% rename from src/www/app/electron_main.ts rename to client/src/www/app/electron_main.ts diff --git a/src/www/app/electron_outline_tunnel.ts b/client/src/www/app/electron_outline_tunnel.ts similarity index 100% rename from src/www/app/electron_outline_tunnel.ts rename to client/src/www/app/electron_outline_tunnel.ts diff --git a/src/www/app/environment.ts b/client/src/www/app/environment.ts similarity index 97% rename from src/www/app/environment.ts rename to client/src/www/app/environment.ts index b8a7be40668..3f21114cc6b 100644 --- a/src/www/app/environment.ts +++ b/client/src/www/app/environment.ts @@ -15,7 +15,7 @@ export interface EnvironmentVariables { APP_VERSION: string; APP_BUILD_NUMBER: string; - SENTRY_DSN: string|undefined; + SENTRY_DSN: string | undefined; } // According to http://caniuse.com/#feat=fetch fetch didn't land iOS Safari diff --git a/src/www/app/fake_tunnel.ts b/client/src/www/app/fake_tunnel.ts similarity index 100% rename from src/www/app/fake_tunnel.ts rename to client/src/www/app/fake_tunnel.ts diff --git a/src/www/app/main.ts b/client/src/www/app/main.ts similarity index 100% rename from src/www/app/main.ts rename to client/src/www/app/main.ts diff --git a/src/www/app/outline_server_repository/access_key_serialization.ts b/client/src/www/app/outline_server_repository/access_key_serialization.ts similarity index 100% rename from src/www/app/outline_server_repository/access_key_serialization.ts rename to client/src/www/app/outline_server_repository/access_key_serialization.ts diff --git a/src/www/app/outline_server_repository/index.ts b/client/src/www/app/outline_server_repository/index.ts similarity index 100% rename from src/www/app/outline_server_repository/index.ts rename to client/src/www/app/outline_server_repository/index.ts diff --git a/src/www/app/outline_server_repository/outline_server_repository.spec.ts b/client/src/www/app/outline_server_repository/outline_server_repository.spec.ts similarity index 100% rename from src/www/app/outline_server_repository/outline_server_repository.spec.ts rename to client/src/www/app/outline_server_repository/outline_server_repository.spec.ts diff --git a/src/www/app/outline_server_repository/server.ts b/client/src/www/app/outline_server_repository/server.ts similarity index 100% rename from src/www/app/outline_server_repository/server.ts rename to client/src/www/app/outline_server_repository/server.ts diff --git a/src/www/app/platform.ts b/client/src/www/app/platform.ts similarity index 100% rename from src/www/app/platform.ts rename to client/src/www/app/platform.ts diff --git a/src/www/app/settings.spec.ts b/client/src/www/app/settings.spec.ts similarity index 100% rename from src/www/app/settings.spec.ts rename to client/src/www/app/settings.spec.ts diff --git a/src/www/app/settings.ts b/client/src/www/app/settings.ts similarity index 93% rename from src/www/app/settings.ts rename to client/src/www/app/settings.ts index 2cd7ecb9b07..c0d0fce6cfe 100644 --- a/src/www/app/settings.ts +++ b/client/src/www/app/settings.ts @@ -20,7 +20,7 @@ interface StorageSettings { export enum SettingsKey { VPN_WARNING_DISMISSED = 'vpn-warning-dismissed', AUTO_CONNECT_DIALOG_DISMISSED = 'auto-connect-dialog-dismissed', - PRIVACY_ACK = 'privacy-ack' + PRIVACY_ACK = 'privacy-ack', } // Persistent storage for user settings that supports a limited set of keys. @@ -30,8 +30,9 @@ export class Settings { private readonly settings = new Map(); constructor( - private storage: Storage = window.localStorage, - private validKeys: string[] = Object.values(SettingsKey)) { + private storage: Storage = window.localStorage, + private validKeys: string[] = Object.values(SettingsKey) + ) { this.loadSettings(); } @@ -79,4 +80,3 @@ export class Settings { this.storage.setItem(Settings.STORAGE_KEY, storageSettingsJson); } } - diff --git a/src/www/app/tunnel.ts b/client/src/www/app/tunnel.ts similarity index 100% rename from src/www/app/tunnel.ts rename to client/src/www/app/tunnel.ts diff --git a/src/www/app/updater.ts b/client/src/www/app/updater.ts similarity index 95% rename from src/www/app/updater.ts rename to client/src/www/app/updater.ts index e0c747657a3..09a435d3046 100644 --- a/src/www/app/updater.ts +++ b/client/src/www/app/updater.ts @@ -20,7 +20,7 @@ export interface Updater { } export class AbstractUpdater implements Updater { - private listener: UpdateListener|null = null; + private listener: UpdateListener | null = null; setListener(listener: UpdateListener) { this.listener = listener; diff --git a/src/www/app/url_interceptor.ts b/client/src/www/app/url_interceptor.ts similarity index 100% rename from src/www/app/url_interceptor.ts rename to client/src/www/app/url_interceptor.ts diff --git a/src/www/app/vpn_installer.ts b/client/src/www/app/vpn_installer.ts similarity index 100% rename from src/www/app/vpn_installer.ts rename to client/src/www/app/vpn_installer.ts diff --git a/src/www/assets/brand-logo.png b/client/src/www/assets/brand-logo.png similarity index 100% rename from src/www/assets/brand-logo.png rename to client/src/www/assets/brand-logo.png diff --git a/src/www/assets/circle.png b/client/src/www/assets/circle.png similarity index 100% rename from src/www/assets/circle.png rename to client/src/www/assets/circle.png diff --git a/src/www/assets/icons/about.png b/client/src/www/assets/icons/about.png similarity index 100% rename from src/www/assets/icons/about.png rename to client/src/www/assets/icons/about.png diff --git a/src/www/assets/icons/add.png b/client/src/www/assets/icons/add.png similarity index 100% rename from src/www/assets/icons/add.png rename to client/src/www/assets/icons/add.png diff --git a/src/www/assets/icons/back.png b/client/src/www/assets/icons/back.png similarity index 100% rename from src/www/assets/icons/back.png rename to client/src/www/assets/icons/back.png diff --git a/src/www/assets/icons/change_language.png b/client/src/www/assets/icons/change_language.png similarity index 100% rename from src/www/assets/icons/change_language.png rename to client/src/www/assets/icons/change_language.png diff --git a/src/www/assets/icons/contact.png b/client/src/www/assets/icons/contact.png similarity index 100% rename from src/www/assets/icons/contact.png rename to client/src/www/assets/icons/contact.png diff --git a/src/www/assets/icons/feedback.png b/client/src/www/assets/icons/feedback.png similarity index 100% rename from src/www/assets/icons/feedback.png rename to client/src/www/assets/icons/feedback.png diff --git a/src/www/assets/icons/help.png b/client/src/www/assets/icons/help.png similarity index 100% rename from src/www/assets/icons/help.png rename to client/src/www/assets/icons/help.png diff --git a/src/www/assets/icons/menu.png b/client/src/www/assets/icons/menu.png similarity index 100% rename from src/www/assets/icons/menu.png rename to client/src/www/assets/icons/menu.png diff --git a/src/www/assets/icons/outline.png b/client/src/www/assets/icons/outline.png similarity index 100% rename from src/www/assets/icons/outline.png rename to client/src/www/assets/icons/outline.png diff --git a/src/www/assets/icons/quit.png b/client/src/www/assets/icons/quit.png similarity index 100% rename from src/www/assets/icons/quit.png rename to client/src/www/assets/icons/quit.png diff --git a/src/www/assets/jigsaw-logo.png b/client/src/www/assets/jigsaw-logo.png similarity index 100% rename from src/www/assets/jigsaw-logo.png rename to client/src/www/assets/jigsaw-logo.png diff --git a/src/www/assets/jigsaw-logo.svg b/client/src/www/assets/jigsaw-logo.svg similarity index 100% rename from src/www/assets/jigsaw-logo.svg rename to client/src/www/assets/jigsaw-logo.svg diff --git a/src/www/assets/logo-nav.png b/client/src/www/assets/logo-nav.png similarity index 100% rename from src/www/assets/logo-nav.png rename to client/src/www/assets/logo-nav.png diff --git a/src/www/assets/material_icons.woff2 b/client/src/www/assets/material_icons.woff2 similarity index 100% rename from src/www/assets/material_icons.woff2 rename to client/src/www/assets/material_icons.woff2 diff --git a/src/www/assets/outline-client-logo.png b/client/src/www/assets/outline-client-logo.png similarity index 100% rename from src/www/assets/outline-client-logo.png rename to client/src/www/assets/outline-client-logo.png diff --git a/src/www/assets/outline-client-logo.svg b/client/src/www/assets/outline-client-logo.svg similarity index 100% rename from src/www/assets/outline-client-logo.svg rename to client/src/www/assets/outline-client-logo.svg diff --git a/src/www/assets/privacy-lock.png b/client/src/www/assets/privacy-lock.png similarity index 100% rename from src/www/assets/privacy-lock.png rename to client/src/www/assets/privacy-lock.png diff --git a/src/www/build.action.mjs b/client/src/www/build.action.mjs similarity index 100% rename from src/www/build.action.mjs rename to client/src/www/build.action.mjs diff --git a/src/www/favicon.ico b/client/src/www/favicon.ico similarity index 100% rename from src/www/favicon.ico rename to client/src/www/favicon.ico diff --git a/src/www/get_browser_webpack_config.mjs b/client/src/www/get_browser_webpack_config.mjs similarity index 100% rename from src/www/get_browser_webpack_config.mjs rename to client/src/www/get_browser_webpack_config.mjs diff --git a/src/www/index_cordova.html b/client/src/www/index_cordova.html similarity index 100% rename from src/www/index_cordova.html rename to client/src/www/index_cordova.html diff --git a/src/www/index_electron.html b/client/src/www/index_electron.html similarity index 100% rename from src/www/index_electron.html rename to client/src/www/index_electron.html diff --git a/src/www/karma.conf.js b/client/src/www/karma.conf.js similarity index 96% rename from src/www/karma.conf.js rename to client/src/www/karma.conf.js index 5e17bc1bf85..937e07e56a2 100644 --- a/src/www/karma.conf.js +++ b/client/src/www/karma.conf.js @@ -14,7 +14,7 @@ const path = require('path'); -module.exports = async function(config) { +module.exports = async function (config) { const testConfig = await import('./webpack_test.mjs'); config.set({ diff --git a/src/www/messages/af.json b/client/src/www/messages/af.json similarity index 100% rename from src/www/messages/af.json rename to client/src/www/messages/af.json diff --git a/src/www/messages/am.json b/client/src/www/messages/am.json similarity index 100% rename from src/www/messages/am.json rename to client/src/www/messages/am.json diff --git a/src/www/messages/ar.json b/client/src/www/messages/ar.json similarity index 100% rename from src/www/messages/ar.json rename to client/src/www/messages/ar.json diff --git a/src/www/messages/az.json b/client/src/www/messages/az.json similarity index 100% rename from src/www/messages/az.json rename to client/src/www/messages/az.json diff --git a/src/www/messages/bg.json b/client/src/www/messages/bg.json similarity index 100% rename from src/www/messages/bg.json rename to client/src/www/messages/bg.json diff --git a/src/www/messages/bn.json b/client/src/www/messages/bn.json similarity index 100% rename from src/www/messages/bn.json rename to client/src/www/messages/bn.json diff --git a/src/www/messages/bs.json b/client/src/www/messages/bs.json similarity index 100% rename from src/www/messages/bs.json rename to client/src/www/messages/bs.json diff --git a/src/www/messages/ca.json b/client/src/www/messages/ca.json similarity index 100% rename from src/www/messages/ca.json rename to client/src/www/messages/ca.json diff --git a/src/www/messages/cs.json b/client/src/www/messages/cs.json similarity index 100% rename from src/www/messages/cs.json rename to client/src/www/messages/cs.json diff --git a/src/www/messages/da.json b/client/src/www/messages/da.json similarity index 100% rename from src/www/messages/da.json rename to client/src/www/messages/da.json diff --git a/src/www/messages/de.json b/client/src/www/messages/de.json similarity index 100% rename from src/www/messages/de.json rename to client/src/www/messages/de.json diff --git a/src/www/messages/el.json b/client/src/www/messages/el.json similarity index 100% rename from src/www/messages/el.json rename to client/src/www/messages/el.json diff --git a/src/www/messages/en-GB.json b/client/src/www/messages/en-GB.json similarity index 100% rename from src/www/messages/en-GB.json rename to client/src/www/messages/en-GB.json diff --git a/src/www/messages/en.json b/client/src/www/messages/en.json similarity index 100% rename from src/www/messages/en.json rename to client/src/www/messages/en.json diff --git a/src/www/messages/es-419.json b/client/src/www/messages/es-419.json similarity index 100% rename from src/www/messages/es-419.json rename to client/src/www/messages/es-419.json diff --git a/src/www/messages/es.json b/client/src/www/messages/es.json similarity index 100% rename from src/www/messages/es.json rename to client/src/www/messages/es.json diff --git a/src/www/messages/et.json b/client/src/www/messages/et.json similarity index 100% rename from src/www/messages/et.json rename to client/src/www/messages/et.json diff --git a/src/www/messages/fa.json b/client/src/www/messages/fa.json similarity index 100% rename from src/www/messages/fa.json rename to client/src/www/messages/fa.json diff --git a/src/www/messages/fi.json b/client/src/www/messages/fi.json similarity index 100% rename from src/www/messages/fi.json rename to client/src/www/messages/fi.json diff --git a/src/www/messages/fil.json b/client/src/www/messages/fil.json similarity index 100% rename from src/www/messages/fil.json rename to client/src/www/messages/fil.json diff --git a/src/www/messages/fr.json b/client/src/www/messages/fr.json similarity index 100% rename from src/www/messages/fr.json rename to client/src/www/messages/fr.json diff --git a/src/www/messages/he.json b/client/src/www/messages/he.json similarity index 100% rename from src/www/messages/he.json rename to client/src/www/messages/he.json diff --git a/src/www/messages/hi.json b/client/src/www/messages/hi.json similarity index 100% rename from src/www/messages/hi.json rename to client/src/www/messages/hi.json diff --git a/src/www/messages/hr.json b/client/src/www/messages/hr.json similarity index 100% rename from src/www/messages/hr.json rename to client/src/www/messages/hr.json diff --git a/src/www/messages/hu.json b/client/src/www/messages/hu.json similarity index 100% rename from src/www/messages/hu.json rename to client/src/www/messages/hu.json diff --git a/src/www/messages/hy.json b/client/src/www/messages/hy.json similarity index 100% rename from src/www/messages/hy.json rename to client/src/www/messages/hy.json diff --git a/src/www/messages/id.json b/client/src/www/messages/id.json similarity index 100% rename from src/www/messages/id.json rename to client/src/www/messages/id.json diff --git a/src/www/messages/is.json b/client/src/www/messages/is.json similarity index 100% rename from src/www/messages/is.json rename to client/src/www/messages/is.json diff --git a/src/www/messages/it.json b/client/src/www/messages/it.json similarity index 100% rename from src/www/messages/it.json rename to client/src/www/messages/it.json diff --git a/src/www/messages/ja.json b/client/src/www/messages/ja.json similarity index 100% rename from src/www/messages/ja.json rename to client/src/www/messages/ja.json diff --git a/src/www/messages/ka.json b/client/src/www/messages/ka.json similarity index 100% rename from src/www/messages/ka.json rename to client/src/www/messages/ka.json diff --git a/src/www/messages/kk.json b/client/src/www/messages/kk.json similarity index 100% rename from src/www/messages/kk.json rename to client/src/www/messages/kk.json diff --git a/src/www/messages/km.json b/client/src/www/messages/km.json similarity index 100% rename from src/www/messages/km.json rename to client/src/www/messages/km.json diff --git a/src/www/messages/ko.json b/client/src/www/messages/ko.json similarity index 100% rename from src/www/messages/ko.json rename to client/src/www/messages/ko.json diff --git a/src/www/messages/lo.json b/client/src/www/messages/lo.json similarity index 100% rename from src/www/messages/lo.json rename to client/src/www/messages/lo.json diff --git a/src/www/messages/lt.json b/client/src/www/messages/lt.json similarity index 100% rename from src/www/messages/lt.json rename to client/src/www/messages/lt.json diff --git a/src/www/messages/lv.json b/client/src/www/messages/lv.json similarity index 100% rename from src/www/messages/lv.json rename to client/src/www/messages/lv.json diff --git a/src/www/messages/mk.json b/client/src/www/messages/mk.json similarity index 100% rename from src/www/messages/mk.json rename to client/src/www/messages/mk.json diff --git a/src/www/messages/mn.json b/client/src/www/messages/mn.json similarity index 100% rename from src/www/messages/mn.json rename to client/src/www/messages/mn.json diff --git a/src/www/messages/mr.json b/client/src/www/messages/mr.json similarity index 100% rename from src/www/messages/mr.json rename to client/src/www/messages/mr.json diff --git a/src/www/messages/ms.json b/client/src/www/messages/ms.json similarity index 100% rename from src/www/messages/ms.json rename to client/src/www/messages/ms.json diff --git a/src/www/messages/my.json b/client/src/www/messages/my.json similarity index 100% rename from src/www/messages/my.json rename to client/src/www/messages/my.json diff --git a/src/www/messages/ne.json b/client/src/www/messages/ne.json similarity index 100% rename from src/www/messages/ne.json rename to client/src/www/messages/ne.json diff --git a/src/www/messages/nl.json b/client/src/www/messages/nl.json similarity index 100% rename from src/www/messages/nl.json rename to client/src/www/messages/nl.json diff --git a/src/www/messages/no.json b/client/src/www/messages/no.json similarity index 100% rename from src/www/messages/no.json rename to client/src/www/messages/no.json diff --git a/src/www/messages/pl.json b/client/src/www/messages/pl.json similarity index 100% rename from src/www/messages/pl.json rename to client/src/www/messages/pl.json diff --git a/src/www/messages/pt-BR.json b/client/src/www/messages/pt-BR.json similarity index 100% rename from src/www/messages/pt-BR.json rename to client/src/www/messages/pt-BR.json diff --git a/src/www/messages/pt-PT.json b/client/src/www/messages/pt-PT.json similarity index 100% rename from src/www/messages/pt-PT.json rename to client/src/www/messages/pt-PT.json diff --git a/src/www/messages/ro.json b/client/src/www/messages/ro.json similarity index 100% rename from src/www/messages/ro.json rename to client/src/www/messages/ro.json diff --git a/src/www/messages/ru.json b/client/src/www/messages/ru.json similarity index 100% rename from src/www/messages/ru.json rename to client/src/www/messages/ru.json diff --git a/src/www/messages/si.json b/client/src/www/messages/si.json similarity index 100% rename from src/www/messages/si.json rename to client/src/www/messages/si.json diff --git a/src/www/messages/sk.json b/client/src/www/messages/sk.json similarity index 100% rename from src/www/messages/sk.json rename to client/src/www/messages/sk.json diff --git a/src/www/messages/sl.json b/client/src/www/messages/sl.json similarity index 100% rename from src/www/messages/sl.json rename to client/src/www/messages/sl.json diff --git a/src/www/messages/sq.json b/client/src/www/messages/sq.json similarity index 100% rename from src/www/messages/sq.json rename to client/src/www/messages/sq.json diff --git a/src/www/messages/sr-Latn.json b/client/src/www/messages/sr-Latn.json similarity index 100% rename from src/www/messages/sr-Latn.json rename to client/src/www/messages/sr-Latn.json diff --git a/src/www/messages/sr.json b/client/src/www/messages/sr.json similarity index 100% rename from src/www/messages/sr.json rename to client/src/www/messages/sr.json diff --git a/src/www/messages/sv.json b/client/src/www/messages/sv.json similarity index 100% rename from src/www/messages/sv.json rename to client/src/www/messages/sv.json diff --git a/src/www/messages/sw.json b/client/src/www/messages/sw.json similarity index 100% rename from src/www/messages/sw.json rename to client/src/www/messages/sw.json diff --git a/src/www/messages/ta.json b/client/src/www/messages/ta.json similarity index 100% rename from src/www/messages/ta.json rename to client/src/www/messages/ta.json diff --git a/src/www/messages/th.json b/client/src/www/messages/th.json similarity index 100% rename from src/www/messages/th.json rename to client/src/www/messages/th.json diff --git a/src/www/messages/tr.json b/client/src/www/messages/tr.json similarity index 100% rename from src/www/messages/tr.json rename to client/src/www/messages/tr.json diff --git a/src/www/messages/uk.json b/client/src/www/messages/uk.json similarity index 100% rename from src/www/messages/uk.json rename to client/src/www/messages/uk.json diff --git a/src/www/messages/ur.json b/client/src/www/messages/ur.json similarity index 100% rename from src/www/messages/ur.json rename to client/src/www/messages/ur.json diff --git a/src/www/messages/vi.json b/client/src/www/messages/vi.json similarity index 100% rename from src/www/messages/vi.json rename to client/src/www/messages/vi.json diff --git a/src/www/messages/zh-CN.json b/client/src/www/messages/zh-CN.json similarity index 100% rename from src/www/messages/zh-CN.json rename to client/src/www/messages/zh-CN.json diff --git a/src/www/messages/zh-TW.json b/client/src/www/messages/zh-TW.json similarity index 100% rename from src/www/messages/zh-TW.json rename to client/src/www/messages/zh-TW.json diff --git a/src/www/model/errors.ts b/client/src/www/model/errors.ts similarity index 100% rename from src/www/model/errors.ts rename to client/src/www/model/errors.ts diff --git a/src/www/model/events.spec.ts b/client/src/www/model/events.spec.ts similarity index 99% rename from src/www/model/events.spec.ts rename to client/src/www/model/events.spec.ts index 22583bf6720..e510b8b6305 100644 --- a/src/www/model/events.spec.ts +++ b/client/src/www/model/events.spec.ts @@ -21,7 +21,7 @@ import { ServerForgotten, ServerReconnecting, ServerRenamed, -} from "./events"; +} from './events'; describe('EventQueue', () => { it('subscribe registers listeners to corresponding event', () => { diff --git a/src/www/model/events.ts b/client/src/www/model/events.ts similarity index 100% rename from src/www/model/events.ts rename to client/src/www/model/events.ts diff --git a/src/www/model/server.ts b/client/src/www/model/server.ts similarity index 100% rename from src/www/model/server.ts rename to client/src/www/model/server.ts diff --git a/src/www/shared/error_reporter.ts b/client/src/www/shared/error_reporter.ts similarity index 100% rename from src/www/shared/error_reporter.ts rename to client/src/www/shared/error_reporter.ts diff --git a/src/www/start.action.mjs b/client/src/www/start.action.mjs similarity index 100% rename from src/www/start.action.mjs rename to client/src/www/start.action.mjs diff --git a/src/www/storybook.action.mjs b/client/src/www/storybook.action.mjs similarity index 100% rename from src/www/storybook.action.mjs rename to client/src/www/storybook.action.mjs diff --git a/src/www/style.css b/client/src/www/style.css similarity index 100% rename from src/www/style.css rename to client/src/www/style.css diff --git a/src/www/test.action.mjs b/client/src/www/test.action.mjs similarity index 100% rename from src/www/test.action.mjs rename to client/src/www/test.action.mjs diff --git a/src/www/testing/localize.ts b/client/src/www/testing/localize.ts similarity index 100% rename from src/www/testing/localize.ts rename to client/src/www/testing/localize.ts diff --git a/src/www/tsconfig.json b/client/src/www/tsconfig.json similarity index 100% rename from src/www/tsconfig.json rename to client/src/www/tsconfig.json diff --git a/src/www/types/clipboard.d.ts b/client/src/www/types/clipboard.d.ts similarity index 100% rename from src/www/types/clipboard.d.ts rename to client/src/www/types/clipboard.d.ts diff --git a/src/www/types/shims.d.ts b/client/src/www/types/shims.d.ts similarity index 100% rename from src/www/types/shims.d.ts rename to client/src/www/types/shims.d.ts diff --git a/src/www/types/webintents.d.ts b/client/src/www/types/webintents.d.ts similarity index 100% rename from src/www/types/webintents.d.ts rename to client/src/www/types/webintents.d.ts diff --git a/src/www/ui_components/about-view.js b/client/src/www/ui_components/about-view.js similarity index 100% rename from src/www/ui_components/about-view.js rename to client/src/www/ui_components/about-view.js diff --git a/src/www/ui_components/add-server-view.js b/client/src/www/ui_components/add-server-view.js similarity index 95% rename from src/www/ui_components/add-server-view.js rename to client/src/www/ui_components/add-server-view.js index ff687364667..db55c4a407d 100644 --- a/src/www/ui_components/add-server-view.js +++ b/client/src/www/ui_components/add-server-view.js @@ -190,9 +190,7 @@ Polymer({
[[localize('server-access-key-detected')]]
-
- [[localize('server-detected')]] -
+
[[localize('server-detected')]]
@@ -229,7 +227,7 @@ Polymer({ }, }, - ready: function() { + ready: function () { this.$.serverDetectedSheet.addEventListener('opened-changed', this._openChanged.bind(this)); this.$.addServerSheet.addEventListener('opened-changed', this._openChanged.bind(this)); // Workaround for --paper-input-container-input-[focus|invalid] not getting applied. @@ -238,27 +236,27 @@ Polymer({ this.$.accessKeyInput.addEventListener('invalid-changed', this._inputInvalidChanged.bind(this)); }, - openAddServerSheet: function() { + openAddServerSheet: function () { this.$.serverDetectedSheet.close(); this.$.addServerSheet.open(); }, - openAddServerConfirmationSheet: function(accessKey) { + openAddServerConfirmationSheet: function (accessKey) { this.$.addServerSheet.close(); this.accessKey = accessKey; this.$.serverDetectedSheet.open(); }, - isAddingServer: function() { + isAddingServer: function () { return this.$.serverDetectedSheet.opened; }, - close: function() { + close: function () { this.$.addServerSheet.close(); this.$.serverDetectedSheet.close(); }, - _accessKeyChanged: function() { + _accessKeyChanged: function () { // Use debounce to detect when the user has stopped typing. this.debounce( 'accessKeyChanged', @@ -269,7 +267,7 @@ Polymer({ ); }, - _addServerFromInput: function() { + _addServerFromInput: function () { var accessKeyInput = this.$.accessKeyInput; if (!this.accessKey || this.accessKey === '') { accessKeyInput.invalid = false; @@ -280,18 +278,18 @@ Polymer({ } }, - _addDetectedServer: function() { + _addDetectedServer: function () { this.fire('AddServerRequested', {accessKey: this.accessKey}); this.close(); }, - _ignoreDetectedServer: function() { + _ignoreDetectedServer: function () { this.fire('IgnoreServerRequested', {accessKey: this.accessKey}); this.close(); }, // Event listeners - _openChanged: function(event) { + _openChanged: function (event) { var dialog = event.target; if (dialog.opened) { // Scroll the page to the bottom to prevent the dialog from moving when the keyboard @@ -306,7 +304,7 @@ Polymer({ } }, - _inputFocusChanged: function(event) { + _inputFocusChanged: function (event) { var input = event.target; if (input.focused) { this.$.accessKeyInput.label = ''; @@ -316,7 +314,7 @@ Polymer({ input.toggleClass('input-focus', input.focused); }, - _inputInvalidChanged: function(event) { + _inputInvalidChanged: function (event) { var input = event.target; input.toggleClass('input-invalid', input.invalid); if (input.invalid) { @@ -326,7 +324,7 @@ Polymer({ } }, - _disallowScroll: function(event) { + _disallowScroll: function (event) { event.preventDefault(); }, diff --git a/src/www/ui_components/app-root.js b/client/src/www/ui_components/app-root.js similarity index 100% rename from src/www/ui_components/app-root.js rename to client/src/www/ui_components/app-root.js diff --git a/src/www/ui_components/feedback-view.js b/client/src/www/ui_components/feedback-view.js similarity index 100% rename from src/www/ui_components/feedback-view.js rename to client/src/www/ui_components/feedback-view.js diff --git a/src/www/ui_components/language-view.js b/client/src/www/ui_components/language-view.js similarity index 100% rename from src/www/ui_components/language-view.js rename to client/src/www/ui_components/language-view.js diff --git a/src/www/ui_components/licenses-view.js b/client/src/www/ui_components/licenses-view.js similarity index 65% rename from src/www/ui_components/licenses-view.js rename to client/src/www/ui_components/licenses-view.js index 909bad1f0fc..ed960d56b43 100644 --- a/src/www/ui_components/licenses-view.js +++ b/client/src/www/ui_components/licenses-view.js @@ -15,7 +15,7 @@ */ import {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js'; -import {dom} from '@polymer/polymer/lib/legacy/polymer.dom.js' +import {dom} from '@polymer/polymer/lib/legacy/polymer.dom.js'; import {html} from '@polymer/polymer/lib/utils/html-tag.js'; Polymer({ @@ -36,7 +36,7 @@ Polymer({ -`, + `, is: 'licenses-view', @@ -49,27 +49,30 @@ Polymer({ _licensesLoaded: false, - ready: function() { + ready: function () { // This complexity is to avoid unconditionally loading the (huge) license // text at startup. var appRoot = dom(this).getOwnerRoot().host; - window.addEventListener('location-changed', function() { - if (this._licensesLoaded || appRoot.page !== 'licenses') { - return; - } + window.addEventListener( + 'location-changed', + function () { + if (this._licensesLoaded || appRoot.page !== 'licenses') { + return; + } - var xhr = new XMLHttpRequest(); - xhr.onload = () => { - this.$.licensesText.innerText = xhr.responseText; - this._licensesLoaded = true; - }; - xhr.onerror = () => { - console.error('could not load license.txt'); - }; - // This path works in both Cordova and Electron. - // Do *not* add a leading slash. - xhr.open('GET', 'ui_components/licenses/licenses.txt', true); - xhr.send(); - }.bind(this)); - } + var xhr = new XMLHttpRequest(); + xhr.onload = () => { + this.$.licensesText.innerText = xhr.responseText; + this._licensesLoaded = true; + }; + xhr.onerror = () => { + console.error('could not load license.txt'); + }; + // This path works in both Cordova and Electron. + // Do *not* add a leading slash. + xhr.open('GET', 'ui_components/licenses/licenses.txt', true); + xhr.send(); + }.bind(this) + ); + }, }); diff --git a/src/www/ui_components/licenses/README.md b/client/src/www/ui_components/licenses/README.md similarity index 100% rename from src/www/ui_components/licenses/README.md rename to client/src/www/ui_components/licenses/README.md diff --git a/src/www/ui_components/licenses/licenses.txt b/client/src/www/ui_components/licenses/licenses.txt similarity index 100% rename from src/www/ui_components/licenses/licenses.txt rename to client/src/www/ui_components/licenses/licenses.txt diff --git a/src/www/ui_components/licenses/third_party.sh b/client/src/www/ui_components/licenses/third_party.sh similarity index 100% rename from src/www/ui_components/licenses/third_party.sh rename to client/src/www/ui_components/licenses/third_party.sh diff --git a/src/www/ui_components/outline-icons.js b/client/src/www/ui_components/outline-icons.js similarity index 99% rename from src/www/ui_components/outline-icons.js rename to client/src/www/ui_components/outline-icons.js index 7f3ff31b157..69531368e51 100644 --- a/src/www/ui_components/outline-icons.js +++ b/client/src/www/ui_components/outline-icons.js @@ -27,4 +27,3 @@ $_documentContainer.innerHTML = `[[localize(titleLocalizationKey)]]
[[localize(detailLocalizationKey)]]
- + [[localize(linkTextLocalizationKey)]] - [[localize(dismissButtonTextLocalizationKey)]] + [[localize(dismissButtonTextLocalizationKey)]]
-`, + `, is: 'user-comms-dialog', @@ -130,22 +132,22 @@ Polymer({ fireEventOnHide: String, }, - show: function() { + show: function () { this.$.wrapper.classList.add('active'); }, - hide: function() { + hide: function () { this.$.wrapper.classList.remove('active'); }, - _dismiss: function() { + _dismiss: function () { this.hide(); if (!!this.fireEventOnHide) { this.fire(this.fireEventOnHide); } }, - _shouldHideLink: function() { + _shouldHideLink: function () { return !this.linkUrl; - } + }, }); diff --git a/src/www/views/contact_view/app_type.ts b/client/src/www/views/contact_view/app_type.ts similarity index 100% rename from src/www/views/contact_view/app_type.ts rename to client/src/www/views/contact_view/app_type.ts diff --git a/src/www/views/contact_view/index.spec.ts b/client/src/www/views/contact_view/index.spec.ts similarity index 100% rename from src/www/views/contact_view/index.spec.ts rename to client/src/www/views/contact_view/index.spec.ts diff --git a/src/www/views/contact_view/index.ts b/client/src/www/views/contact_view/index.ts similarity index 100% rename from src/www/views/contact_view/index.ts rename to client/src/www/views/contact_view/index.ts diff --git a/src/www/views/contact_view/issue_type.ts b/client/src/www/views/contact_view/issue_type.ts similarity index 100% rename from src/www/views/contact_view/issue_type.ts rename to client/src/www/views/contact_view/issue_type.ts diff --git a/src/www/views/contact_view/stories.ts b/client/src/www/views/contact_view/stories.ts similarity index 100% rename from src/www/views/contact_view/stories.ts rename to client/src/www/views/contact_view/stories.ts diff --git a/src/www/views/contact_view/support_form/index.spec.ts b/client/src/www/views/contact_view/support_form/index.spec.ts similarity index 100% rename from src/www/views/contact_view/support_form/index.spec.ts rename to client/src/www/views/contact_view/support_form/index.spec.ts diff --git a/src/www/views/contact_view/support_form/index.ts b/client/src/www/views/contact_view/support_form/index.ts similarity index 100% rename from src/www/views/contact_view/support_form/index.ts rename to client/src/www/views/contact_view/support_form/index.ts diff --git a/src/www/views/contact_view/support_form/stories.ts b/client/src/www/views/contact_view/support_form/stories.ts similarity index 100% rename from src/www/views/contact_view/support_form/stories.ts rename to client/src/www/views/contact_view/support_form/stories.ts diff --git a/src/www/views/servers_view/index.ts b/client/src/www/views/servers_view/index.ts similarity index 100% rename from src/www/views/servers_view/index.ts rename to client/src/www/views/servers_view/index.ts diff --git a/src/www/views/servers_view/server_connection_indicator/index.ts b/client/src/www/views/servers_view/server_connection_indicator/index.ts similarity index 100% rename from src/www/views/servers_view/server_connection_indicator/index.ts rename to client/src/www/views/servers_view/server_connection_indicator/index.ts diff --git a/src/www/views/servers_view/server_connection_indicator/stories.ts b/client/src/www/views/servers_view/server_connection_indicator/stories.ts similarity index 100% rename from src/www/views/servers_view/server_connection_indicator/stories.ts rename to client/src/www/views/servers_view/server_connection_indicator/stories.ts diff --git a/src/www/views/servers_view/server_list/index.ts b/client/src/www/views/servers_view/server_list/index.ts similarity index 100% rename from src/www/views/servers_view/server_list/index.ts rename to client/src/www/views/servers_view/server_list/index.ts diff --git a/src/www/views/servers_view/server_list/stories.ts b/client/src/www/views/servers_view/server_list/stories.ts similarity index 100% rename from src/www/views/servers_view/server_list/stories.ts rename to client/src/www/views/servers_view/server_list/stories.ts diff --git a/src/www/views/servers_view/server_list_item/index.ts b/client/src/www/views/servers_view/server_list_item/index.ts similarity index 100% rename from src/www/views/servers_view/server_list_item/index.ts rename to client/src/www/views/servers_view/server_list_item/index.ts diff --git a/src/www/views/servers_view/server_list_item/server_card/index.ts b/client/src/www/views/servers_view/server_list_item/server_card/index.ts similarity index 99% rename from src/www/views/servers_view/server_list_item/server_card/index.ts rename to client/src/www/views/servers_view/server_list_item/server_card/index.ts index 52a218a52fb..9771cbe6c64 100644 --- a/src/www/views/servers_view/server_list_item/server_card/index.ts +++ b/client/src/www/views/servers_view/server_list_item/server_card/index.ts @@ -98,7 +98,7 @@ const sharedCSS = css` font-size: var(--server-name-size); margin-bottom: var(--outline-mini-gutter); /* To break the line in case a sequence of word characters is longer than the line. - See https://github.com/Jigsaw-Code/outline-client/issues/1372. */ + See https://github.com/Jigsaw-Code/outline-apps/issues/1372. */ word-break: break-all; } diff --git a/src/www/views/servers_view/server_list_item/server_card/stories.ts b/client/src/www/views/servers_view/server_list_item/server_card/stories.ts similarity index 100% rename from src/www/views/servers_view/server_list_item/server_card/stories.ts rename to client/src/www/views/servers_view/server_list_item/server_card/stories.ts diff --git a/src/www/webpack_base.mjs b/client/src/www/webpack_base.mjs similarity index 100% rename from src/www/webpack_base.mjs rename to client/src/www/webpack_base.mjs diff --git a/src/www/webpack_cordova.mjs b/client/src/www/webpack_cordova.mjs similarity index 100% rename from src/www/webpack_cordova.mjs rename to client/src/www/webpack_cordova.mjs diff --git a/src/www/webpack_css_rtl_loader.cjs b/client/src/www/webpack_css_rtl_loader.cjs similarity index 100% rename from src/www/webpack_css_rtl_loader.cjs rename to client/src/www/webpack_css_rtl_loader.cjs diff --git a/src/www/webpack_electron.mjs b/client/src/www/webpack_electron.mjs similarity index 100% rename from src/www/webpack_electron.mjs rename to client/src/www/webpack_electron.mjs diff --git a/src/www/webpack_test.mjs b/client/src/www/webpack_test.mjs similarity index 100% rename from src/www/webpack_test.mjs rename to client/src/www/webpack_test.mjs diff --git a/third_party/jsign/.gitignore b/client/third_party/jsign/.gitignore similarity index 100% rename from third_party/jsign/.gitignore rename to client/third_party/jsign/.gitignore diff --git a/third_party/jsign/LICENSE.txt b/client/third_party/jsign/LICENSE.txt similarity index 100% rename from third_party/jsign/LICENSE.txt rename to client/third_party/jsign/LICENSE.txt diff --git a/third_party/jsign/METADATA b/client/third_party/jsign/METADATA similarity index 100% rename from third_party/jsign/METADATA rename to client/third_party/jsign/METADATA diff --git a/third_party/jsign/index.mjs b/client/third_party/jsign/index.mjs similarity index 100% rename from third_party/jsign/index.mjs rename to client/third_party/jsign/index.mjs diff --git a/third_party/newtonsoft/LICENSE b/client/third_party/newtonsoft/LICENSE similarity index 99% rename from third_party/newtonsoft/LICENSE rename to client/third_party/newtonsoft/LICENSE index 05bc493e4d2..ed11c37a1a2 100755 --- a/third_party/newtonsoft/LICENSE +++ b/client/third_party/newtonsoft/LICENSE @@ -1,9 +1,9 @@ -The MIT License (MIT) - -Copyright (c) 2007 James Newton-King - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - +The MIT License (MIT) + +Copyright (c) 2007 James Newton-King + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/third_party/newtonsoft/METADATA b/client/third_party/newtonsoft/METADATA similarity index 95% rename from third_party/newtonsoft/METADATA rename to client/third_party/newtonsoft/METADATA index cd5e9641393..f43a7d6df0b 100755 --- a/third_party/newtonsoft/METADATA +++ b/client/third_party/newtonsoft/METADATA @@ -1,16 +1,16 @@ -name: "Newtonsoft.Json" -description: - "Json.NET is a high-performance JSON framework for .NET." - -third_party { - url { - type: HOMEPAGE - value: "https://www.newtonsoft.com/json" - } - url { - type: GIT - value: "https://github.com/JamesNK/Newtonsoft.Json" - } - version: "11.0.0" - last_upgrade_date { year: 2018 month: 6 day: 26 } -} +name: "Newtonsoft.Json" +description: + "Json.NET is a high-performance JSON framework for .NET." + +third_party { + url { + type: HOMEPAGE + value: "https://www.newtonsoft.com/json" + } + url { + type: GIT + value: "https://github.com/JamesNK/Newtonsoft.Json" + } + version: "11.0.0" + last_upgrade_date { year: 2018 month: 6 day: 26 } +} diff --git a/third_party/newtonsoft/Newtonsoft.Json.dll b/client/third_party/newtonsoft/Newtonsoft.Json.dll similarity index 100% rename from third_party/newtonsoft/Newtonsoft.Json.dll rename to client/third_party/newtonsoft/Newtonsoft.Json.dll diff --git a/third_party/sentry-android/LICENSE b/client/third_party/sentry-android/LICENSE similarity index 100% rename from third_party/sentry-android/LICENSE rename to client/third_party/sentry-android/LICENSE diff --git a/third_party/sentry-android/METADATA b/client/third_party/sentry-android/METADATA similarity index 100% rename from third_party/sentry-android/METADATA rename to client/third_party/sentry-android/METADATA diff --git a/third_party/tap-windows6/.appveyor.yml b/client/third_party/tap-windows6/.appveyor.yml similarity index 100% rename from third_party/tap-windows6/.appveyor.yml rename to client/third_party/tap-windows6/.appveyor.yml diff --git a/third_party/tap-windows6/.gitattributes b/client/third_party/tap-windows6/.gitattributes similarity index 100% rename from third_party/tap-windows6/.gitattributes rename to client/third_party/tap-windows6/.gitattributes diff --git a/third_party/tap-windows6/.gitignore b/client/third_party/tap-windows6/.gitignore similarity index 91% rename from third_party/tap-windows6/.gitignore rename to client/third_party/tap-windows6/.gitignore index feb92116357..c84d7450407 100644 --- a/third_party/tap-windows6/.gitignore +++ b/client/third_party/tap-windows6/.gitignore @@ -1,10 +1,10 @@ -dist/** -*.pyc -*.tar.gz -src/config.h -src/SOURCES -src/build*.log -src/obj* -src/i386 -src/amd64 -tap-windows-*.exe +dist/** +*.pyc +*.tar.gz +src/config.h +src/SOURCES +src/build*.log +src/obj* +src/i386 +src/amd64 +tap-windows-*.exe diff --git a/third_party/tap-windows6/CONTRIBUTING.rst b/client/third_party/tap-windows6/CONTRIBUTING.rst similarity index 100% rename from third_party/tap-windows6/CONTRIBUTING.rst rename to client/third_party/tap-windows6/CONTRIBUTING.rst diff --git a/third_party/tap-windows6/COPYING b/client/third_party/tap-windows6/COPYING similarity index 100% rename from third_party/tap-windows6/COPYING rename to client/third_party/tap-windows6/COPYING diff --git a/third_party/tap-windows6/COPYRIGHT.GPL b/client/third_party/tap-windows6/COPYRIGHT.GPL similarity index 100% rename from third_party/tap-windows6/COPYRIGHT.GPL rename to client/third_party/tap-windows6/COPYRIGHT.GPL diff --git a/third_party/tap-windows6/COPYRIGHT.MIT b/client/third_party/tap-windows6/COPYRIGHT.MIT similarity index 100% rename from third_party/tap-windows6/COPYRIGHT.MIT rename to client/third_party/tap-windows6/COPYRIGHT.MIT diff --git a/third_party/tap-windows6/LICENSE b/client/third_party/tap-windows6/LICENSE similarity index 100% rename from third_party/tap-windows6/LICENSE rename to client/third_party/tap-windows6/LICENSE diff --git a/third_party/tap-windows6/LICENSE.gplv2 b/client/third_party/tap-windows6/LICENSE.gplv2 similarity index 100% rename from third_party/tap-windows6/LICENSE.gplv2 rename to client/third_party/tap-windows6/LICENSE.gplv2 diff --git a/third_party/tap-windows6/METADATA b/client/third_party/tap-windows6/METADATA similarity index 100% rename from third_party/tap-windows6/METADATA rename to client/third_party/tap-windows6/METADATA diff --git a/third_party/tap-windows6/MSCV-VSClass3.cer b/client/third_party/tap-windows6/MSCV-VSClass3.cer similarity index 100% rename from third_party/tap-windows6/MSCV-VSClass3.cer rename to client/third_party/tap-windows6/MSCV-VSClass3.cer diff --git a/third_party/tap-windows6/README.rst b/client/third_party/tap-windows6/README.rst similarity index 100% rename from third_party/tap-windows6/README.rst rename to client/third_party/tap-windows6/README.rst diff --git a/third_party/tap-windows6/bin/amd64/OemVista.inf b/client/third_party/tap-windows6/bin/amd64/OemVista.inf similarity index 97% rename from third_party/tap-windows6/bin/amd64/OemVista.inf rename to client/third_party/tap-windows6/bin/amd64/OemVista.inf index 628a2158be1..d92e2558b35 100644 --- a/third_party/tap-windows6/bin/amd64/OemVista.inf +++ b/client/third_party/tap-windows6/bin/amd64/OemVista.inf @@ -1,191 +1,191 @@ -; **************************************************************************** -; * Copyright (C) 2002-2014 OpenVPN Technologies, Inc. * -; * This program is free software; you can redistribute it and/or modify * -; * it under the terms of the GNU General Public License version 2 * -; * as published by the Free Software Foundation. * -; **************************************************************************** - -; SYNTAX CHECKER -; cd \WINDDK\3790\tools\chkinf -; chkinf c:\src\openvpn\tap-win32\i386\oemvista.inf -; OUTPUT -> file:///c:/WINDDK/3790/tools/chkinf/htm/c%23+src+openvpn+tap-win32+i386+__OemWin2k.htm - -; INSTALL/REMOVE DRIVER -; tapinstall install OemVista.inf tapoas -; tapinstall update OemVista.inf tapoas -; tapinstall remove tapoas - -;********************************************************* -; Note to Developers: -; -; If you are bundling the TAP-Windows driver with your app, -; you should try to rename it in such a way that it will -; not collide with other instances of TAP-Windows defined -; by other apps. Multiple versions of the TAP-Windows -; driver, each installed by different apps, can coexist -; on the same machine if you follow these guidelines. -; NOTE: these instructions assume you are editing the -; generated OemWin2k.inf file, not the source -; OemWin2k.inf.in file which is preprocessed by winconfig -; and uses macro definitions from settings.in. -; -; (1) Rename all tapXXXX instances in this file to -; something different (use at least 5 characters -; for this name!) -; (2) Change the "!define TAP" definition in openvpn.nsi -; to match what you changed tapXXXX to. -; (3) Change TARGETNAME in SOURCES to match what you -; changed tapXXXX to. -; (4) Change TAP_COMPONENT_ID in common.h to match what -; you changed tapXXXX to. -; (5) Change SZDEPENDENCIES in service.h to match what -; you changed tapXXXX to. -; (6) Change DeviceDescription and Provider strings. -; (7) Change PRODUCT_TAP_WIN_DEVICE_DESCRIPTION in constants.h to what you -; set DeviceDescription to. -; -;********************************************************* - -[Version] - Signature = "$Windows NT$" - CatalogFile = tap0901.cat - ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318} - Provider = %Provider% - Class = Net - -; This version number should match the version -; number given in SOURCES. - DriverVer=04/21/2016,9.00.00.21 - -[Strings] - DeviceDescription = "TAP-Windows Adapter V9" - Provider = "TAP-Windows Provider V9" - -;---------------------------------------------------------------- -; Manufacturer + Product Section (Done) -;---------------------------------------------------------------- -[Manufacturer] - %Provider% = tap0901, NTamd64 - -[tap0901.NTamd64] - %DeviceDescription% = tap0901.ndi, root\tap0901 ; Root enumerated - %DeviceDescription% = tap0901.ndi, tap0901 ; Legacy - -;--------------------------------------------------------------- -; Driver Section (Done) -;--------------------------------------------------------------- - -;----------------- Characteristics ------------ -; NCF_PHYSICAL = 0x04 -; NCF_VIRTUAL = 0x01 -; NCF_SOFTWARE_ENUMERATED = 0x02 -; NCF_HIDDEN = 0x08 -; NCF_NO_SERVICE = 0x10 -; NCF_HAS_UI = 0x80 -;----------------- Characteristics ------------ - -[tap0901.ndi] - CopyFiles = tap0901.driver, tap0901.files - AddReg = tap0901.reg - AddReg = tap0901.params.reg - Characteristics = - *IfType = 0x6 ; IF_TYPE_ETHERNET_CSMACD - *MediaType = 0x0 ; NdisMedium802_3 - *PhysicalMediaType = 14 ; NdisPhysicalMedium802_3 - -[tap0901.ndi.Services] - AddService = tap0901, 2, tap0901.service - -[tap0901.reg] - HKR, Ndi, Service, 0, "tap0901" - HKR, Ndi\Interfaces, UpperRange, 0, "ndis5" - HKR, Ndi\Interfaces, LowerRange, 0, "ethernet" - HKR, , Manufacturer, 0, "%Provider%" - HKR, , ProductName, 0, "%DeviceDescription%" - -[tap0901.params.reg] - HKR, Ndi\params\MTU, ParamDesc, 0, "MTU" - HKR, Ndi\params\MTU, Type, 0, "int" - HKR, Ndi\params\MTU, Default, 0, "1500" - HKR, Ndi\params\MTU, Optional, 0, "0" - HKR, Ndi\params\MTU, Min, 0, "100" - HKR, Ndi\params\MTU, Max, 0, "1500" - HKR, Ndi\params\MTU, Step, 0, "1" - HKR, Ndi\params\MediaStatus, ParamDesc, 0, "Media Status" - HKR, Ndi\params\MediaStatus, Type, 0, "enum" - HKR, Ndi\params\MediaStatus, Default, 0, "0" - HKR, Ndi\params\MediaStatus, Optional, 0, "0" - HKR, Ndi\params\MediaStatus\enum, "0", 0, "Application Controlled" - HKR, Ndi\params\MediaStatus\enum, "1", 0, "Always Connected" - HKR, Ndi\params\MAC, ParamDesc, 0, "MAC Address" - HKR, Ndi\params\MAC, Type, 0, "edit" - HKR, Ndi\params\MAC, Optional, 0, "1" - HKR, Ndi\params\AllowNonAdmin, ParamDesc, 0, "Non-Admin Access" - HKR, Ndi\params\AllowNonAdmin, Type, 0, "enum" - HKR, Ndi\params\AllowNonAdmin, Default, 0, "1" - HKR, Ndi\params\AllowNonAdmin, Optional, 0, "0" - HKR, Ndi\params\AllowNonAdmin\enum, "0", 0, "Not Allowed" - HKR, Ndi\params\AllowNonAdmin\enum, "1", 0, "Allowed" - -;---------------------------------------------------------------- -; Service Section -;---------------------------------------------------------------- - -;---------- Service Type ------------- -; SERVICE_KERNEL_DRIVER = 0x01 -; SERVICE_WIN32_OWN_PROCESS = 0x10 -;---------- Service Type ------------- - -;---------- Start Mode --------------- -; SERVICE_BOOT_START = 0x0 -; SERVICE_SYSTEM_START = 0x1 -; SERVICE_AUTO_START = 0x2 -; SERVICE_DEMAND_START = 0x3 -; SERVICE_DISABLED = 0x4 -;---------- Start Mode --------------- - -[tap0901.service] - DisplayName = %DeviceDescription% - ServiceType = 1 - StartType = 3 - ErrorControl = 1 - LoadOrderGroup = NDIS - ServiceBinary = %12%\tap0901.sys - -;----------------------------------------------------------------- -; File Installation -;----------------------------------------------------------------- - -;----------------- Copy Flags ------------ -; COPYFLG_NOSKIP = 0x02 -; COPYFLG_NOVERSIONCHECK = 0x04 -;----------------- Copy Flags ------------ - -; SourceDisksNames -; diskid = description[, [tagfile] [, , subdir]] -; 1 = "Intel Driver Disk 1",e100bex.sys,, - -[SourceDisksNames] - 1 = %DeviceDescription%, tap0901.sys - -; SourceDisksFiles -; filename_on_source = diskID[, [subdir][, size]] -; e100bex.sys = 1,, ; on distribution disk 1 - -[SourceDisksFiles] -tap0901.sys = 1 - -[DestinationDirs] - tap0901.files = 11 - tap0901.driver = 12 - -[tap0901.files] -; TapPanel.cpl,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK -; cipsrvr.exe,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK - -[tap0901.driver] - tap0901.sys,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK - -;--------------------------------------------------------------- -; End -;--------------------------------------------------------------- +; **************************************************************************** +; * Copyright (C) 2002-2014 OpenVPN Technologies, Inc. * +; * This program is free software; you can redistribute it and/or modify * +; * it under the terms of the GNU General Public License version 2 * +; * as published by the Free Software Foundation. * +; **************************************************************************** + +; SYNTAX CHECKER +; cd \WINDDK\3790\tools\chkinf +; chkinf c:\src\openvpn\tap-win32\i386\oemvista.inf +; OUTPUT -> file:///c:/WINDDK/3790/tools/chkinf/htm/c%23+src+openvpn+tap-win32+i386+__OemWin2k.htm + +; INSTALL/REMOVE DRIVER +; tapinstall install OemVista.inf tapoas +; tapinstall update OemVista.inf tapoas +; tapinstall remove tapoas + +;********************************************************* +; Note to Developers: +; +; If you are bundling the TAP-Windows driver with your app, +; you should try to rename it in such a way that it will +; not collide with other instances of TAP-Windows defined +; by other apps. Multiple versions of the TAP-Windows +; driver, each installed by different apps, can coexist +; on the same machine if you follow these guidelines. +; NOTE: these instructions assume you are editing the +; generated OemWin2k.inf file, not the source +; OemWin2k.inf.in file which is preprocessed by winconfig +; and uses macro definitions from settings.in. +; +; (1) Rename all tapXXXX instances in this file to +; something different (use at least 5 characters +; for this name!) +; (2) Change the "!define TAP" definition in openvpn.nsi +; to match what you changed tapXXXX to. +; (3) Change TARGETNAME in SOURCES to match what you +; changed tapXXXX to. +; (4) Change TAP_COMPONENT_ID in common.h to match what +; you changed tapXXXX to. +; (5) Change SZDEPENDENCIES in service.h to match what +; you changed tapXXXX to. +; (6) Change DeviceDescription and Provider strings. +; (7) Change PRODUCT_TAP_WIN_DEVICE_DESCRIPTION in constants.h to what you +; set DeviceDescription to. +; +;********************************************************* + +[Version] + Signature = "$Windows NT$" + CatalogFile = tap0901.cat + ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318} + Provider = %Provider% + Class = Net + +; This version number should match the version +; number given in SOURCES. + DriverVer=04/21/2016,9.00.00.21 + +[Strings] + DeviceDescription = "TAP-Windows Adapter V9" + Provider = "TAP-Windows Provider V9" + +;---------------------------------------------------------------- +; Manufacturer + Product Section (Done) +;---------------------------------------------------------------- +[Manufacturer] + %Provider% = tap0901, NTamd64 + +[tap0901.NTamd64] + %DeviceDescription% = tap0901.ndi, root\tap0901 ; Root enumerated + %DeviceDescription% = tap0901.ndi, tap0901 ; Legacy + +;--------------------------------------------------------------- +; Driver Section (Done) +;--------------------------------------------------------------- + +;----------------- Characteristics ------------ +; NCF_PHYSICAL = 0x04 +; NCF_VIRTUAL = 0x01 +; NCF_SOFTWARE_ENUMERATED = 0x02 +; NCF_HIDDEN = 0x08 +; NCF_NO_SERVICE = 0x10 +; NCF_HAS_UI = 0x80 +;----------------- Characteristics ------------ + +[tap0901.ndi] + CopyFiles = tap0901.driver, tap0901.files + AddReg = tap0901.reg + AddReg = tap0901.params.reg + Characteristics = + *IfType = 0x6 ; IF_TYPE_ETHERNET_CSMACD + *MediaType = 0x0 ; NdisMedium802_3 + *PhysicalMediaType = 14 ; NdisPhysicalMedium802_3 + +[tap0901.ndi.Services] + AddService = tap0901, 2, tap0901.service + +[tap0901.reg] + HKR, Ndi, Service, 0, "tap0901" + HKR, Ndi\Interfaces, UpperRange, 0, "ndis5" + HKR, Ndi\Interfaces, LowerRange, 0, "ethernet" + HKR, , Manufacturer, 0, "%Provider%" + HKR, , ProductName, 0, "%DeviceDescription%" + +[tap0901.params.reg] + HKR, Ndi\params\MTU, ParamDesc, 0, "MTU" + HKR, Ndi\params\MTU, Type, 0, "int" + HKR, Ndi\params\MTU, Default, 0, "1500" + HKR, Ndi\params\MTU, Optional, 0, "0" + HKR, Ndi\params\MTU, Min, 0, "100" + HKR, Ndi\params\MTU, Max, 0, "1500" + HKR, Ndi\params\MTU, Step, 0, "1" + HKR, Ndi\params\MediaStatus, ParamDesc, 0, "Media Status" + HKR, Ndi\params\MediaStatus, Type, 0, "enum" + HKR, Ndi\params\MediaStatus, Default, 0, "0" + HKR, Ndi\params\MediaStatus, Optional, 0, "0" + HKR, Ndi\params\MediaStatus\enum, "0", 0, "Application Controlled" + HKR, Ndi\params\MediaStatus\enum, "1", 0, "Always Connected" + HKR, Ndi\params\MAC, ParamDesc, 0, "MAC Address" + HKR, Ndi\params\MAC, Type, 0, "edit" + HKR, Ndi\params\MAC, Optional, 0, "1" + HKR, Ndi\params\AllowNonAdmin, ParamDesc, 0, "Non-Admin Access" + HKR, Ndi\params\AllowNonAdmin, Type, 0, "enum" + HKR, Ndi\params\AllowNonAdmin, Default, 0, "1" + HKR, Ndi\params\AllowNonAdmin, Optional, 0, "0" + HKR, Ndi\params\AllowNonAdmin\enum, "0", 0, "Not Allowed" + HKR, Ndi\params\AllowNonAdmin\enum, "1", 0, "Allowed" + +;---------------------------------------------------------------- +; Service Section +;---------------------------------------------------------------- + +;---------- Service Type ------------- +; SERVICE_KERNEL_DRIVER = 0x01 +; SERVICE_WIN32_OWN_PROCESS = 0x10 +;---------- Service Type ------------- + +;---------- Start Mode --------------- +; SERVICE_BOOT_START = 0x0 +; SERVICE_SYSTEM_START = 0x1 +; SERVICE_AUTO_START = 0x2 +; SERVICE_DEMAND_START = 0x3 +; SERVICE_DISABLED = 0x4 +;---------- Start Mode --------------- + +[tap0901.service] + DisplayName = %DeviceDescription% + ServiceType = 1 + StartType = 3 + ErrorControl = 1 + LoadOrderGroup = NDIS + ServiceBinary = %12%\tap0901.sys + +;----------------------------------------------------------------- +; File Installation +;----------------------------------------------------------------- + +;----------------- Copy Flags ------------ +; COPYFLG_NOSKIP = 0x02 +; COPYFLG_NOVERSIONCHECK = 0x04 +;----------------- Copy Flags ------------ + +; SourceDisksNames +; diskid = description[, [tagfile] [, , subdir]] +; 1 = "Intel Driver Disk 1",e100bex.sys,, + +[SourceDisksNames] + 1 = %DeviceDescription%, tap0901.sys + +; SourceDisksFiles +; filename_on_source = diskID[, [subdir][, size]] +; e100bex.sys = 1,, ; on distribution disk 1 + +[SourceDisksFiles] +tap0901.sys = 1 + +[DestinationDirs] + tap0901.files = 11 + tap0901.driver = 12 + +[tap0901.files] +; TapPanel.cpl,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK +; cipsrvr.exe,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK + +[tap0901.driver] + tap0901.sys,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK + +;--------------------------------------------------------------- +; End +;--------------------------------------------------------------- diff --git a/third_party/tap-windows6/bin/amd64/tap0901.cat b/client/third_party/tap-windows6/bin/amd64/tap0901.cat similarity index 100% rename from third_party/tap-windows6/bin/amd64/tap0901.cat rename to client/third_party/tap-windows6/bin/amd64/tap0901.cat diff --git a/third_party/tap-windows6/bin/amd64/tap0901.sys b/client/third_party/tap-windows6/bin/amd64/tap0901.sys similarity index 100% rename from third_party/tap-windows6/bin/amd64/tap0901.sys rename to client/third_party/tap-windows6/bin/amd64/tap0901.sys diff --git a/third_party/tap-windows6/bin/amd64/tapinstall.exe b/client/third_party/tap-windows6/bin/amd64/tapinstall.exe similarity index 100% rename from third_party/tap-windows6/bin/amd64/tapinstall.exe rename to client/third_party/tap-windows6/bin/amd64/tapinstall.exe diff --git a/third_party/tap-windows6/bin/i386/OemVista.inf b/client/third_party/tap-windows6/bin/i386/OemVista.inf similarity index 97% rename from third_party/tap-windows6/bin/i386/OemVista.inf rename to client/third_party/tap-windows6/bin/i386/OemVista.inf index f71c2d3e942..6cd67913114 100644 --- a/third_party/tap-windows6/bin/i386/OemVista.inf +++ b/client/third_party/tap-windows6/bin/i386/OemVista.inf @@ -1,191 +1,191 @@ -; **************************************************************************** -; * Copyright (C) 2002-2014 OpenVPN Technologies, Inc. * -; * This program is free software; you can redistribute it and/or modify * -; * it under the terms of the GNU General Public License version 2 * -; * as published by the Free Software Foundation. * -; **************************************************************************** - -; SYNTAX CHECKER -; cd \WINDDK\3790\tools\chkinf -; chkinf c:\src\openvpn\tap-win32\i386\oemvista.inf -; OUTPUT -> file:///c:/WINDDK/3790/tools/chkinf/htm/c%23+src+openvpn+tap-win32+i386+__OemWin2k.htm - -; INSTALL/REMOVE DRIVER -; tapinstall install OemVista.inf tapoas -; tapinstall update OemVista.inf tapoas -; tapinstall remove tapoas - -;********************************************************* -; Note to Developers: -; -; If you are bundling the TAP-Windows driver with your app, -; you should try to rename it in such a way that it will -; not collide with other instances of TAP-Windows defined -; by other apps. Multiple versions of the TAP-Windows -; driver, each installed by different apps, can coexist -; on the same machine if you follow these guidelines. -; NOTE: these instructions assume you are editing the -; generated OemWin2k.inf file, not the source -; OemWin2k.inf.in file which is preprocessed by winconfig -; and uses macro definitions from settings.in. -; -; (1) Rename all tapXXXX instances in this file to -; something different (use at least 5 characters -; for this name!) -; (2) Change the "!define TAP" definition in openvpn.nsi -; to match what you changed tapXXXX to. -; (3) Change TARGETNAME in SOURCES to match what you -; changed tapXXXX to. -; (4) Change TAP_COMPONENT_ID in common.h to match what -; you changed tapXXXX to. -; (5) Change SZDEPENDENCIES in service.h to match what -; you changed tapXXXX to. -; (6) Change DeviceDescription and Provider strings. -; (7) Change PRODUCT_TAP_WIN_DEVICE_DESCRIPTION in constants.h to what you -; set DeviceDescription to. -; -;********************************************************* - -[Version] - Signature = "$Windows NT$" - CatalogFile = tap0901.cat - ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318} - Provider = %Provider% - Class = Net - -; This version number should match the version -; number given in SOURCES. - DriverVer=04/21/2016,9.00.00.21 - -[Strings] - DeviceDescription = "TAP-Windows Adapter V9" - Provider = "TAP-Windows Provider V9" - -;---------------------------------------------------------------- -; Manufacturer + Product Section (Done) -;---------------------------------------------------------------- -[Manufacturer] - %Provider% = tap0901 - -[tap0901] - %DeviceDescription% = tap0901.ndi, root\tap0901 ; Root enumerated - %DeviceDescription% = tap0901.ndi, tap0901 ; Legacy - -;--------------------------------------------------------------- -; Driver Section (Done) -;--------------------------------------------------------------- - -;----------------- Characteristics ------------ -; NCF_PHYSICAL = 0x04 -; NCF_VIRTUAL = 0x01 -; NCF_SOFTWARE_ENUMERATED = 0x02 -; NCF_HIDDEN = 0x08 -; NCF_NO_SERVICE = 0x10 -; NCF_HAS_UI = 0x80 -;----------------- Characteristics ------------ - -[tap0901.ndi] - CopyFiles = tap0901.driver, tap0901.files - AddReg = tap0901.reg - AddReg = tap0901.params.reg - Characteristics = - *IfType = 0x6 ; IF_TYPE_ETHERNET_CSMACD - *MediaType = 0x0 ; NdisMedium802_3 - *PhysicalMediaType = 14 ; NdisPhysicalMedium802_3 - -[tap0901.ndi.Services] - AddService = tap0901, 2, tap0901.service - -[tap0901.reg] - HKR, Ndi, Service, 0, "tap0901" - HKR, Ndi\Interfaces, UpperRange, 0, "ndis5" - HKR, Ndi\Interfaces, LowerRange, 0, "ethernet" - HKR, , Manufacturer, 0, "%Provider%" - HKR, , ProductName, 0, "%DeviceDescription%" - -[tap0901.params.reg] - HKR, Ndi\params\MTU, ParamDesc, 0, "MTU" - HKR, Ndi\params\MTU, Type, 0, "int" - HKR, Ndi\params\MTU, Default, 0, "1500" - HKR, Ndi\params\MTU, Optional, 0, "0" - HKR, Ndi\params\MTU, Min, 0, "100" - HKR, Ndi\params\MTU, Max, 0, "1500" - HKR, Ndi\params\MTU, Step, 0, "1" - HKR, Ndi\params\MediaStatus, ParamDesc, 0, "Media Status" - HKR, Ndi\params\MediaStatus, Type, 0, "enum" - HKR, Ndi\params\MediaStatus, Default, 0, "0" - HKR, Ndi\params\MediaStatus, Optional, 0, "0" - HKR, Ndi\params\MediaStatus\enum, "0", 0, "Application Controlled" - HKR, Ndi\params\MediaStatus\enum, "1", 0, "Always Connected" - HKR, Ndi\params\MAC, ParamDesc, 0, "MAC Address" - HKR, Ndi\params\MAC, Type, 0, "edit" - HKR, Ndi\params\MAC, Optional, 0, "1" - HKR, Ndi\params\AllowNonAdmin, ParamDesc, 0, "Non-Admin Access" - HKR, Ndi\params\AllowNonAdmin, Type, 0, "enum" - HKR, Ndi\params\AllowNonAdmin, Default, 0, "1" - HKR, Ndi\params\AllowNonAdmin, Optional, 0, "0" - HKR, Ndi\params\AllowNonAdmin\enum, "0", 0, "Not Allowed" - HKR, Ndi\params\AllowNonAdmin\enum, "1", 0, "Allowed" - -;---------------------------------------------------------------- -; Service Section -;---------------------------------------------------------------- - -;---------- Service Type ------------- -; SERVICE_KERNEL_DRIVER = 0x01 -; SERVICE_WIN32_OWN_PROCESS = 0x10 -;---------- Service Type ------------- - -;---------- Start Mode --------------- -; SERVICE_BOOT_START = 0x0 -; SERVICE_SYSTEM_START = 0x1 -; SERVICE_AUTO_START = 0x2 -; SERVICE_DEMAND_START = 0x3 -; SERVICE_DISABLED = 0x4 -;---------- Start Mode --------------- - -[tap0901.service] - DisplayName = %DeviceDescription% - ServiceType = 1 - StartType = 3 - ErrorControl = 1 - LoadOrderGroup = NDIS - ServiceBinary = %12%\tap0901.sys - -;----------------------------------------------------------------- -; File Installation -;----------------------------------------------------------------- - -;----------------- Copy Flags ------------ -; COPYFLG_NOSKIP = 0x02 -; COPYFLG_NOVERSIONCHECK = 0x04 -;----------------- Copy Flags ------------ - -; SourceDisksNames -; diskid = description[, [tagfile] [, , subdir]] -; 1 = "Intel Driver Disk 1",e100bex.sys,, - -[SourceDisksNames] - 1 = %DeviceDescription%, tap0901.sys - -; SourceDisksFiles -; filename_on_source = diskID[, [subdir][, size]] -; e100bex.sys = 1,, ; on distribution disk 1 - -[SourceDisksFiles] -tap0901.sys = 1 - -[DestinationDirs] - tap0901.files = 11 - tap0901.driver = 12 - -[tap0901.files] -; TapPanel.cpl,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK -; cipsrvr.exe,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK - -[tap0901.driver] - tap0901.sys,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK - -;--------------------------------------------------------------- -; End -;--------------------------------------------------------------- +; **************************************************************************** +; * Copyright (C) 2002-2014 OpenVPN Technologies, Inc. * +; * This program is free software; you can redistribute it and/or modify * +; * it under the terms of the GNU General Public License version 2 * +; * as published by the Free Software Foundation. * +; **************************************************************************** + +; SYNTAX CHECKER +; cd \WINDDK\3790\tools\chkinf +; chkinf c:\src\openvpn\tap-win32\i386\oemvista.inf +; OUTPUT -> file:///c:/WINDDK/3790/tools/chkinf/htm/c%23+src+openvpn+tap-win32+i386+__OemWin2k.htm + +; INSTALL/REMOVE DRIVER +; tapinstall install OemVista.inf tapoas +; tapinstall update OemVista.inf tapoas +; tapinstall remove tapoas + +;********************************************************* +; Note to Developers: +; +; If you are bundling the TAP-Windows driver with your app, +; you should try to rename it in such a way that it will +; not collide with other instances of TAP-Windows defined +; by other apps. Multiple versions of the TAP-Windows +; driver, each installed by different apps, can coexist +; on the same machine if you follow these guidelines. +; NOTE: these instructions assume you are editing the +; generated OemWin2k.inf file, not the source +; OemWin2k.inf.in file which is preprocessed by winconfig +; and uses macro definitions from settings.in. +; +; (1) Rename all tapXXXX instances in this file to +; something different (use at least 5 characters +; for this name!) +; (2) Change the "!define TAP" definition in openvpn.nsi +; to match what you changed tapXXXX to. +; (3) Change TARGETNAME in SOURCES to match what you +; changed tapXXXX to. +; (4) Change TAP_COMPONENT_ID in common.h to match what +; you changed tapXXXX to. +; (5) Change SZDEPENDENCIES in service.h to match what +; you changed tapXXXX to. +; (6) Change DeviceDescription and Provider strings. +; (7) Change PRODUCT_TAP_WIN_DEVICE_DESCRIPTION in constants.h to what you +; set DeviceDescription to. +; +;********************************************************* + +[Version] + Signature = "$Windows NT$" + CatalogFile = tap0901.cat + ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318} + Provider = %Provider% + Class = Net + +; This version number should match the version +; number given in SOURCES. + DriverVer=04/21/2016,9.00.00.21 + +[Strings] + DeviceDescription = "TAP-Windows Adapter V9" + Provider = "TAP-Windows Provider V9" + +;---------------------------------------------------------------- +; Manufacturer + Product Section (Done) +;---------------------------------------------------------------- +[Manufacturer] + %Provider% = tap0901 + +[tap0901] + %DeviceDescription% = tap0901.ndi, root\tap0901 ; Root enumerated + %DeviceDescription% = tap0901.ndi, tap0901 ; Legacy + +;--------------------------------------------------------------- +; Driver Section (Done) +;--------------------------------------------------------------- + +;----------------- Characteristics ------------ +; NCF_PHYSICAL = 0x04 +; NCF_VIRTUAL = 0x01 +; NCF_SOFTWARE_ENUMERATED = 0x02 +; NCF_HIDDEN = 0x08 +; NCF_NO_SERVICE = 0x10 +; NCF_HAS_UI = 0x80 +;----------------- Characteristics ------------ + +[tap0901.ndi] + CopyFiles = tap0901.driver, tap0901.files + AddReg = tap0901.reg + AddReg = tap0901.params.reg + Characteristics = + *IfType = 0x6 ; IF_TYPE_ETHERNET_CSMACD + *MediaType = 0x0 ; NdisMedium802_3 + *PhysicalMediaType = 14 ; NdisPhysicalMedium802_3 + +[tap0901.ndi.Services] + AddService = tap0901, 2, tap0901.service + +[tap0901.reg] + HKR, Ndi, Service, 0, "tap0901" + HKR, Ndi\Interfaces, UpperRange, 0, "ndis5" + HKR, Ndi\Interfaces, LowerRange, 0, "ethernet" + HKR, , Manufacturer, 0, "%Provider%" + HKR, , ProductName, 0, "%DeviceDescription%" + +[tap0901.params.reg] + HKR, Ndi\params\MTU, ParamDesc, 0, "MTU" + HKR, Ndi\params\MTU, Type, 0, "int" + HKR, Ndi\params\MTU, Default, 0, "1500" + HKR, Ndi\params\MTU, Optional, 0, "0" + HKR, Ndi\params\MTU, Min, 0, "100" + HKR, Ndi\params\MTU, Max, 0, "1500" + HKR, Ndi\params\MTU, Step, 0, "1" + HKR, Ndi\params\MediaStatus, ParamDesc, 0, "Media Status" + HKR, Ndi\params\MediaStatus, Type, 0, "enum" + HKR, Ndi\params\MediaStatus, Default, 0, "0" + HKR, Ndi\params\MediaStatus, Optional, 0, "0" + HKR, Ndi\params\MediaStatus\enum, "0", 0, "Application Controlled" + HKR, Ndi\params\MediaStatus\enum, "1", 0, "Always Connected" + HKR, Ndi\params\MAC, ParamDesc, 0, "MAC Address" + HKR, Ndi\params\MAC, Type, 0, "edit" + HKR, Ndi\params\MAC, Optional, 0, "1" + HKR, Ndi\params\AllowNonAdmin, ParamDesc, 0, "Non-Admin Access" + HKR, Ndi\params\AllowNonAdmin, Type, 0, "enum" + HKR, Ndi\params\AllowNonAdmin, Default, 0, "1" + HKR, Ndi\params\AllowNonAdmin, Optional, 0, "0" + HKR, Ndi\params\AllowNonAdmin\enum, "0", 0, "Not Allowed" + HKR, Ndi\params\AllowNonAdmin\enum, "1", 0, "Allowed" + +;---------------------------------------------------------------- +; Service Section +;---------------------------------------------------------------- + +;---------- Service Type ------------- +; SERVICE_KERNEL_DRIVER = 0x01 +; SERVICE_WIN32_OWN_PROCESS = 0x10 +;---------- Service Type ------------- + +;---------- Start Mode --------------- +; SERVICE_BOOT_START = 0x0 +; SERVICE_SYSTEM_START = 0x1 +; SERVICE_AUTO_START = 0x2 +; SERVICE_DEMAND_START = 0x3 +; SERVICE_DISABLED = 0x4 +;---------- Start Mode --------------- + +[tap0901.service] + DisplayName = %DeviceDescription% + ServiceType = 1 + StartType = 3 + ErrorControl = 1 + LoadOrderGroup = NDIS + ServiceBinary = %12%\tap0901.sys + +;----------------------------------------------------------------- +; File Installation +;----------------------------------------------------------------- + +;----------------- Copy Flags ------------ +; COPYFLG_NOSKIP = 0x02 +; COPYFLG_NOVERSIONCHECK = 0x04 +;----------------- Copy Flags ------------ + +; SourceDisksNames +; diskid = description[, [tagfile] [, , subdir]] +; 1 = "Intel Driver Disk 1",e100bex.sys,, + +[SourceDisksNames] + 1 = %DeviceDescription%, tap0901.sys + +; SourceDisksFiles +; filename_on_source = diskID[, [subdir][, size]] +; e100bex.sys = 1,, ; on distribution disk 1 + +[SourceDisksFiles] +tap0901.sys = 1 + +[DestinationDirs] + tap0901.files = 11 + tap0901.driver = 12 + +[tap0901.files] +; TapPanel.cpl,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK +; cipsrvr.exe,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK + +[tap0901.driver] + tap0901.sys,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK + +;--------------------------------------------------------------- +; End +;--------------------------------------------------------------- diff --git a/third_party/tap-windows6/bin/i386/tap0901.cat b/client/third_party/tap-windows6/bin/i386/tap0901.cat similarity index 100% rename from third_party/tap-windows6/bin/i386/tap0901.cat rename to client/third_party/tap-windows6/bin/i386/tap0901.cat diff --git a/third_party/tap-windows6/bin/i386/tap0901.sys b/client/third_party/tap-windows6/bin/i386/tap0901.sys similarity index 100% rename from third_party/tap-windows6/bin/i386/tap0901.sys rename to client/third_party/tap-windows6/bin/i386/tap0901.sys diff --git a/third_party/tap-windows6/bin/i386/tapinstall.exe b/client/third_party/tap-windows6/bin/i386/tapinstall.exe similarity index 100% rename from third_party/tap-windows6/bin/i386/tapinstall.exe rename to client/third_party/tap-windows6/bin/i386/tapinstall.exe diff --git a/third_party/tap-windows6/bin/include/tap-windows.h b/client/third_party/tap-windows6/bin/include/tap-windows.h similarity index 97% rename from third_party/tap-windows6/bin/include/tap-windows.h rename to client/third_party/tap-windows6/bin/include/tap-windows.h index 25bdd82b41d..d546a5b1cb9 100644 --- a/third_party/tap-windows6/bin/include/tap-windows.h +++ b/client/third_party/tap-windows6/bin/include/tap-windows.h @@ -1,74 +1,74 @@ -/* - * TAP-Windows -- A kernel driver to provide virtual tap - * device functionality on Windows. - * - * This code was inspired by the CIPE-Win32 driver by Damion K. Wilson. - * - * This source code is Copyright (C) 2002-2014 OpenVPN Technologies, Inc., - * and is released under the GPL version 2 (see below). - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program (see the file COPYING included with this - * distribution); if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#ifndef __TAP_WIN_H -#define __TAP_WIN_H - -/* - * ============= - * TAP IOCTLs - * ============= - */ - -#define TAP_WIN_CONTROL_CODE(request,method) \ - CTL_CODE (FILE_DEVICE_UNKNOWN, request, method, FILE_ANY_ACCESS) - -/* Present in 8.1 */ - -#define TAP_WIN_IOCTL_GET_MAC TAP_WIN_CONTROL_CODE (1, METHOD_BUFFERED) -#define TAP_WIN_IOCTL_GET_VERSION TAP_WIN_CONTROL_CODE (2, METHOD_BUFFERED) -#define TAP_WIN_IOCTL_GET_MTU TAP_WIN_CONTROL_CODE (3, METHOD_BUFFERED) -#define TAP_WIN_IOCTL_GET_INFO TAP_WIN_CONTROL_CODE (4, METHOD_BUFFERED) -#define TAP_WIN_IOCTL_CONFIG_POINT_TO_POINT TAP_WIN_CONTROL_CODE (5, METHOD_BUFFERED) -#define TAP_WIN_IOCTL_SET_MEDIA_STATUS TAP_WIN_CONTROL_CODE (6, METHOD_BUFFERED) -#define TAP_WIN_IOCTL_CONFIG_DHCP_MASQ TAP_WIN_CONTROL_CODE (7, METHOD_BUFFERED) -#define TAP_WIN_IOCTL_GET_LOG_LINE TAP_WIN_CONTROL_CODE (8, METHOD_BUFFERED) -#define TAP_WIN_IOCTL_CONFIG_DHCP_SET_OPT TAP_WIN_CONTROL_CODE (9, METHOD_BUFFERED) - -/* Added in 8.2 */ - -/* obsoletes TAP_WIN_IOCTL_CONFIG_POINT_TO_POINT */ -#define TAP_WIN_IOCTL_CONFIG_TUN TAP_WIN_CONTROL_CODE (10, METHOD_BUFFERED) - -/* - * ================= - * Registry keys - * ================= - */ - -#define ADAPTER_KEY "SYSTEM\\CurrentControlSet\\Control\\Class\\{4D36E972-E325-11CE-BFC1-08002BE10318}" - -#define NETWORK_CONNECTIONS_KEY "SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}" - -/* - * ====================== - * Filesystem prefixes - * ====================== - */ - -#define USERMODEDEVICEDIR "\\\\.\\Global\\" -#define SYSDEVICEDIR "\\Device\\" -#define USERDEVICEDIR "\\DosDevices\\Global\\" -#define TAP_WIN_SUFFIX ".tap" - -#endif // __TAP_WIN_H +/* + * TAP-Windows -- A kernel driver to provide virtual tap + * device functionality on Windows. + * + * This code was inspired by the CIPE-Win32 driver by Damion K. Wilson. + * + * This source code is Copyright (C) 2002-2014 OpenVPN Technologies, Inc., + * and is released under the GPL version 2 (see below). + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program (see the file COPYING included with this + * distribution); if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __TAP_WIN_H +#define __TAP_WIN_H + +/* + * ============= + * TAP IOCTLs + * ============= + */ + +#define TAP_WIN_CONTROL_CODE(request,method) \ + CTL_CODE (FILE_DEVICE_UNKNOWN, request, method, FILE_ANY_ACCESS) + +/* Present in 8.1 */ + +#define TAP_WIN_IOCTL_GET_MAC TAP_WIN_CONTROL_CODE (1, METHOD_BUFFERED) +#define TAP_WIN_IOCTL_GET_VERSION TAP_WIN_CONTROL_CODE (2, METHOD_BUFFERED) +#define TAP_WIN_IOCTL_GET_MTU TAP_WIN_CONTROL_CODE (3, METHOD_BUFFERED) +#define TAP_WIN_IOCTL_GET_INFO TAP_WIN_CONTROL_CODE (4, METHOD_BUFFERED) +#define TAP_WIN_IOCTL_CONFIG_POINT_TO_POINT TAP_WIN_CONTROL_CODE (5, METHOD_BUFFERED) +#define TAP_WIN_IOCTL_SET_MEDIA_STATUS TAP_WIN_CONTROL_CODE (6, METHOD_BUFFERED) +#define TAP_WIN_IOCTL_CONFIG_DHCP_MASQ TAP_WIN_CONTROL_CODE (7, METHOD_BUFFERED) +#define TAP_WIN_IOCTL_GET_LOG_LINE TAP_WIN_CONTROL_CODE (8, METHOD_BUFFERED) +#define TAP_WIN_IOCTL_CONFIG_DHCP_SET_OPT TAP_WIN_CONTROL_CODE (9, METHOD_BUFFERED) + +/* Added in 8.2 */ + +/* obsoletes TAP_WIN_IOCTL_CONFIG_POINT_TO_POINT */ +#define TAP_WIN_IOCTL_CONFIG_TUN TAP_WIN_CONTROL_CODE (10, METHOD_BUFFERED) + +/* + * ================= + * Registry keys + * ================= + */ + +#define ADAPTER_KEY "SYSTEM\\CurrentControlSet\\Control\\Class\\{4D36E972-E325-11CE-BFC1-08002BE10318}" + +#define NETWORK_CONNECTIONS_KEY "SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}" + +/* + * ====================== + * Filesystem prefixes + * ====================== + */ + +#define USERMODEDEVICEDIR "\\\\.\\Global\\" +#define SYSDEVICEDIR "\\Device\\" +#define USERDEVICEDIR "\\DosDevices\\Global\\" +#define TAP_WIN_SUFFIX ".tap" + +#endif // __TAP_WIN_H diff --git a/third_party/tap-windows6/buildtap.py b/client/third_party/tap-windows6/buildtap.py similarity index 100% rename from third_party/tap-windows6/buildtap.py rename to client/third_party/tap-windows6/buildtap.py diff --git a/third_party/tap-windows6/installer/ShellLink.dll b/client/third_party/tap-windows6/installer/ShellLink.dll similarity index 100% rename from third_party/tap-windows6/installer/ShellLink.dll rename to client/third_party/tap-windows6/installer/ShellLink.dll diff --git a/third_party/tap-windows6/installer/icon.ico b/client/third_party/tap-windows6/installer/icon.ico similarity index 100% rename from third_party/tap-windows6/installer/icon.ico rename to client/third_party/tap-windows6/installer/icon.ico diff --git a/third_party/tap-windows6/installer/install-whirl.bmp b/client/third_party/tap-windows6/installer/install-whirl.bmp similarity index 100% rename from third_party/tap-windows6/installer/install-whirl.bmp rename to client/third_party/tap-windows6/installer/install-whirl.bmp diff --git a/third_party/tap-windows6/installer/tap-windows6.nsi b/client/third_party/tap-windows6/installer/tap-windows6.nsi similarity index 100% rename from third_party/tap-windows6/installer/tap-windows6.nsi rename to client/third_party/tap-windows6/installer/tap-windows6.nsi diff --git a/third_party/tap-windows6/paths.py b/client/third_party/tap-windows6/paths.py similarity index 100% rename from third_party/tap-windows6/paths.py rename to client/third_party/tap-windows6/paths.py diff --git a/third_party/tap-windows6/src/MAKEFILE b/client/third_party/tap-windows6/src/MAKEFILE similarity index 100% rename from third_party/tap-windows6/src/MAKEFILE rename to client/third_party/tap-windows6/src/MAKEFILE diff --git a/third_party/tap-windows6/src/OemVista.inf.in b/client/third_party/tap-windows6/src/OemVista.inf.in similarity index 100% rename from third_party/tap-windows6/src/OemVista.inf.in rename to client/third_party/tap-windows6/src/OemVista.inf.in diff --git a/third_party/tap-windows6/src/SOURCES.in b/client/third_party/tap-windows6/src/SOURCES.in similarity index 100% rename from third_party/tap-windows6/src/SOURCES.in rename to client/third_party/tap-windows6/src/SOURCES.in diff --git a/third_party/tap-windows6/src/adapter.c b/client/third_party/tap-windows6/src/adapter.c similarity index 100% rename from third_party/tap-windows6/src/adapter.c rename to client/third_party/tap-windows6/src/adapter.c diff --git a/third_party/tap-windows6/src/adapter.h b/client/third_party/tap-windows6/src/adapter.h similarity index 100% rename from third_party/tap-windows6/src/adapter.h rename to client/third_party/tap-windows6/src/adapter.h diff --git a/third_party/tap-windows6/src/config.h.in b/client/third_party/tap-windows6/src/config.h.in similarity index 100% rename from third_party/tap-windows6/src/config.h.in rename to client/third_party/tap-windows6/src/config.h.in diff --git a/third_party/tap-windows6/src/constants.h b/client/third_party/tap-windows6/src/constants.h similarity index 100% rename from third_party/tap-windows6/src/constants.h rename to client/third_party/tap-windows6/src/constants.h diff --git a/third_party/tap-windows6/src/device.c b/client/third_party/tap-windows6/src/device.c similarity index 100% rename from third_party/tap-windows6/src/device.c rename to client/third_party/tap-windows6/src/device.c diff --git a/third_party/tap-windows6/src/device.h b/client/third_party/tap-windows6/src/device.h similarity index 100% rename from third_party/tap-windows6/src/device.h rename to client/third_party/tap-windows6/src/device.h diff --git a/third_party/tap-windows6/src/dhcp.c b/client/third_party/tap-windows6/src/dhcp.c similarity index 100% rename from third_party/tap-windows6/src/dhcp.c rename to client/third_party/tap-windows6/src/dhcp.c diff --git a/third_party/tap-windows6/src/dhcp.h b/client/third_party/tap-windows6/src/dhcp.h similarity index 100% rename from third_party/tap-windows6/src/dhcp.h rename to client/third_party/tap-windows6/src/dhcp.h diff --git a/third_party/tap-windows6/src/endian.h b/client/third_party/tap-windows6/src/endian.h similarity index 100% rename from third_party/tap-windows6/src/endian.h rename to client/third_party/tap-windows6/src/endian.h diff --git a/third_party/tap-windows6/src/error.c b/client/third_party/tap-windows6/src/error.c similarity index 100% rename from third_party/tap-windows6/src/error.c rename to client/third_party/tap-windows6/src/error.c diff --git a/third_party/tap-windows6/src/error.h b/client/third_party/tap-windows6/src/error.h similarity index 100% rename from third_party/tap-windows6/src/error.h rename to client/third_party/tap-windows6/src/error.h diff --git a/third_party/tap-windows6/src/hexdump.h b/client/third_party/tap-windows6/src/hexdump.h similarity index 100% rename from third_party/tap-windows6/src/hexdump.h rename to client/third_party/tap-windows6/src/hexdump.h diff --git a/third_party/tap-windows6/src/lock.h b/client/third_party/tap-windows6/src/lock.h similarity index 100% rename from third_party/tap-windows6/src/lock.h rename to client/third_party/tap-windows6/src/lock.h diff --git a/third_party/tap-windows6/src/macinfo.c b/client/third_party/tap-windows6/src/macinfo.c similarity index 100% rename from third_party/tap-windows6/src/macinfo.c rename to client/third_party/tap-windows6/src/macinfo.c diff --git a/third_party/tap-windows6/src/macinfo.h b/client/third_party/tap-windows6/src/macinfo.h similarity index 100% rename from third_party/tap-windows6/src/macinfo.h rename to client/third_party/tap-windows6/src/macinfo.h diff --git a/third_party/tap-windows6/src/mem.c b/client/third_party/tap-windows6/src/mem.c similarity index 100% rename from third_party/tap-windows6/src/mem.c rename to client/third_party/tap-windows6/src/mem.c diff --git a/third_party/tap-windows6/src/mem.h b/client/third_party/tap-windows6/src/mem.h similarity index 100% rename from third_party/tap-windows6/src/mem.h rename to client/third_party/tap-windows6/src/mem.h diff --git a/third_party/tap-windows6/src/oidrequest.c b/client/third_party/tap-windows6/src/oidrequest.c similarity index 100% rename from third_party/tap-windows6/src/oidrequest.c rename to client/third_party/tap-windows6/src/oidrequest.c diff --git a/third_party/tap-windows6/src/proto.h b/client/third_party/tap-windows6/src/proto.h similarity index 100% rename from third_party/tap-windows6/src/proto.h rename to client/third_party/tap-windows6/src/proto.h diff --git a/third_party/tap-windows6/src/prototypes.h b/client/third_party/tap-windows6/src/prototypes.h similarity index 100% rename from third_party/tap-windows6/src/prototypes.h rename to client/third_party/tap-windows6/src/prototypes.h diff --git a/third_party/tap-windows6/src/resource.rc b/client/third_party/tap-windows6/src/resource.rc similarity index 100% rename from third_party/tap-windows6/src/resource.rc rename to client/third_party/tap-windows6/src/resource.rc diff --git a/third_party/tap-windows6/src/rxpath.c b/client/third_party/tap-windows6/src/rxpath.c similarity index 100% rename from third_party/tap-windows6/src/rxpath.c rename to client/third_party/tap-windows6/src/rxpath.c diff --git a/third_party/tap-windows6/src/tap-windows.h b/client/third_party/tap-windows6/src/tap-windows.h similarity index 100% rename from third_party/tap-windows6/src/tap-windows.h rename to client/third_party/tap-windows6/src/tap-windows.h diff --git a/third_party/tap-windows6/src/tap.h b/client/third_party/tap-windows6/src/tap.h similarity index 100% rename from third_party/tap-windows6/src/tap.h rename to client/third_party/tap-windows6/src/tap.h diff --git a/third_party/tap-windows6/src/tapdrvr.c b/client/third_party/tap-windows6/src/tapdrvr.c similarity index 100% rename from third_party/tap-windows6/src/tapdrvr.c rename to client/third_party/tap-windows6/src/tapdrvr.c diff --git a/third_party/tap-windows6/src/txpath.c b/client/third_party/tap-windows6/src/txpath.c similarity index 100% rename from third_party/tap-windows6/src/txpath.c rename to client/third_party/tap-windows6/src/txpath.c diff --git a/third_party/tap-windows6/src/types.h b/client/third_party/tap-windows6/src/types.h similarity index 100% rename from third_party/tap-windows6/src/types.h rename to client/third_party/tap-windows6/src/types.h diff --git a/third_party/tap-windows6/version.m4 b/client/third_party/tap-windows6/version.m4 similarity index 100% rename from third_party/tap-windows6/version.m4 rename to client/third_party/tap-windows6/version.m4 diff --git a/tools/OutlineService/OutlineService.sln b/client/tools/OutlineService/OutlineService.sln similarity index 97% rename from tools/OutlineService/OutlineService.sln rename to client/tools/OutlineService/OutlineService.sln index 9a40a06fab1..0183a70546a 100755 --- a/tools/OutlineService/OutlineService.sln +++ b/client/tools/OutlineService/OutlineService.sln @@ -1,31 +1,31 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27703.2018 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OutlineService", "OutlineService\OutlineService.csproj", "{F39A4491-9868-4A71-9BE1-980FADE10AC9}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F39A4491-9868-4A71-9BE1-980FADE10AC9}.Debug|Any CPU.ActiveCfg = Release|x86 - {F39A4491-9868-4A71-9BE1-980FADE10AC9}.Debug|Any CPU.Build.0 = Release|x86 - {F39A4491-9868-4A71-9BE1-980FADE10AC9}.Debug|x86.ActiveCfg = Release|x86 - {F39A4491-9868-4A71-9BE1-980FADE10AC9}.Debug|x86.Build.0 = Release|x86 - {F39A4491-9868-4A71-9BE1-980FADE10AC9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F39A4491-9868-4A71-9BE1-980FADE10AC9}.Release|Any CPU.Build.0 = Release|Any CPU - {F39A4491-9868-4A71-9BE1-980FADE10AC9}.Release|x86.ActiveCfg = Release|x86 - {F39A4491-9868-4A71-9BE1-980FADE10AC9}.Release|x86.Build.0 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {55663288-4604-4D50-8D4A-7222B9A2B6BF} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27703.2018 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OutlineService", "OutlineService\OutlineService.csproj", "{F39A4491-9868-4A71-9BE1-980FADE10AC9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F39A4491-9868-4A71-9BE1-980FADE10AC9}.Debug|Any CPU.ActiveCfg = Release|x86 + {F39A4491-9868-4A71-9BE1-980FADE10AC9}.Debug|Any CPU.Build.0 = Release|x86 + {F39A4491-9868-4A71-9BE1-980FADE10AC9}.Debug|x86.ActiveCfg = Release|x86 + {F39A4491-9868-4A71-9BE1-980FADE10AC9}.Debug|x86.Build.0 = Release|x86 + {F39A4491-9868-4A71-9BE1-980FADE10AC9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F39A4491-9868-4A71-9BE1-980FADE10AC9}.Release|Any CPU.Build.0 = Release|Any CPU + {F39A4491-9868-4A71-9BE1-980FADE10AC9}.Release|x86.ActiveCfg = Release|x86 + {F39A4491-9868-4A71-9BE1-980FADE10AC9}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {55663288-4604-4D50-8D4A-7222B9A2B6BF} + EndGlobalSection +EndGlobal diff --git a/tools/OutlineService/OutlineService/App.config b/client/tools/OutlineService/OutlineService/App.config similarity index 97% rename from tools/OutlineService/OutlineService/App.config rename to client/tools/OutlineService/OutlineService/App.config index 321649d3384..5534e287628 100755 --- a/tools/OutlineService/OutlineService/App.config +++ b/client/tools/OutlineService/OutlineService/App.config @@ -1,6 +1,6 @@ - - - - - + + + + + \ No newline at end of file diff --git a/tools/OutlineService/OutlineService/OutlineService.Designer.cs b/client/tools/OutlineService/OutlineService/OutlineService.Designer.cs similarity index 96% rename from tools/OutlineService/OutlineService/OutlineService.Designer.cs rename to client/tools/OutlineService/OutlineService/OutlineService.Designer.cs index 1be3f894c85..2c933d862d8 100755 --- a/tools/OutlineService/OutlineService/OutlineService.Designer.cs +++ b/client/tools/OutlineService/OutlineService/OutlineService.Designer.cs @@ -1,54 +1,54 @@ -// Copyright 2018 The Outline Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -namespace OutlineService -{ - partial class OutlineService - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - // - // OutlineService - // - this.ServiceName = "OutlineService"; - - } - - #endregion - } -} +// Copyright 2018 The Outline Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +namespace OutlineService +{ + partial class OutlineService + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + // + // OutlineService + // + this.ServiceName = "OutlineService"; + + } + + #endregion + } +} diff --git a/tools/OutlineService/OutlineService/OutlineService.cs b/client/tools/OutlineService/OutlineService/OutlineService.cs similarity index 97% rename from tools/OutlineService/OutlineService/OutlineService.cs rename to client/tools/OutlineService/OutlineService/OutlineService.cs index 3f2ad5f571d..654dfeec0f4 100755 --- a/tools/OutlineService/OutlineService/OutlineService.cs +++ b/client/tools/OutlineService/OutlineService/OutlineService.cs @@ -1,1093 +1,1093 @@ -// Copyright 2018 The Outline Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.IO.Pipes; -using System.Linq; -using System.Net; -using System.Net.NetworkInformation; -using System.Net.Sockets; -using System.Runtime.InteropServices; -using System.Runtime.Serialization; -using System.Security.AccessControl; -using System.Security.Principal; -using System.ServiceProcess; -using System.Text; -using Newtonsoft.Json; - -/* - * Windows Service, part of the Outline Windows client, to configure routing. - * Modifying the system routes requires admin permissions, so this service must be installed - * and started as admin. - * - * The service listens on a named pipe and supports the following JSON API: - * - * Requests - * - * configureRouting: Modifies the system's routing table to route all traffic through the TAP device - * except that destined for proxyIp. Disables IPv6 traffic. - * { action: "configureRouting", parameters: {"proxyIp": , "isAutoConnect": "false" }} - * - * resetRouting: Restores the system's default routing. - * { action: "resetRouting"} - * - * Response - * - * { statusCode: , action: errorMessage?: } - * - * The service will send connection status updates if the pipe connection is kept - * open by the client. Such responses have the form: - * - * { statusCode: , action: "statusChanged", connectionStatus: } - * - * View logs with this PowerShell query: - * get-eventlog -logname Application -source OutlineService -newest 20 | format-table -property timegenerated,entrytype,message -autosize - */ -namespace OutlineService -{ - public partial class OutlineService : ServiceBase - { - private const string EVENT_LOG_SOURCE = "OutlineService"; - private const string EVENT_LOG_NAME = "Application"; - // Must be kept in sync with the Electron code. - private const string PIPE_NAME = "OutlineServicePipe"; - private const string TAP_DEVICE_NAME = "outline-tap0"; - private const string TAP_DEVICE_IP = "10.0.85.1"; - - private const string ACTION_CONFIGURE_ROUTING = "configureRouting"; - private const string ACTION_RESET_ROUTING = "resetRouting"; - private const string ACTION_STATUS_CHANGED = "statusChanged"; - private const string PARAM_PROXY_IP = "proxyIp"; - private const string PARAM_AUTO_CONNECT = "isAutoConnect"; - - private static string[] IPV4_SUBNETS = { "0.0.0.0/1", "128.0.0.0/1" }; - private static string[] IPV6_SUBNETS = { "fc00::/7", "2000::/4", "3000::/4" }; - private static string[] IPV4_RESERVED_SUBNETS = { - "0.0.0.0/8", - "10.0.0.0/8", - "100.64.0.0/10", - "169.254.0.0/16", - "172.16.0.0/12", - "192.0.0.0/24", - "192.0.2.0/24", - "192.31.196.0/24", - "192.52.193.0/24", - "192.88.99.0/24", - "192.168.0.0/16", - "192.175.48.0/24", - "198.18.0.0/15", - "198.51.100.0/24", - "203.0.113.0/24", - "240.0.0.0/4" - }; - private const string CMD_NETSH = "netsh"; - private const string CMD_ROUTE = "route"; - - private const uint BUFFER_SIZE_BYTES = 1024; - - private EventLog eventLog; - private NamedPipeServerStream pipe; - private string proxyIp; - private string gatewayIp; - private int gatewayInterfaceIndex; - - // Time, in ms, to wait until considering smartdnsblock.exe to have successfully launched. - private const int SMART_DNS_BLOCK_TIMEOUT_MS = 1000; - - // https://docs.microsoft.com/en-us/windows/desktop/api/ipmib/ns-ipmib-_mib_ipforwardrow - [StructLayout(LayoutKind.Sequential)] - internal class MIB_IPFORWARDROW - { - internal uint dwForwardDest; - internal uint dwForwardMask; - internal uint dwForwardPolicy; - internal uint dwForwardNextHop; - internal int dwForwardIfIndex; - internal uint dwForwardType; - internal uint dwForwardProto; - internal uint dwForwardAge; - internal uint dwForwardNextHopAS; - internal uint dwForwardMetric1; - internal uint dwForwardMetric2; - internal uint dwForwardMetric3; - internal uint dwForwardMetric4; - internal uint dwForwardMetric5; - } - - // https://docs.microsoft.com/en-us/windows/desktop/api/ipmib/ns-ipmib-_mib_ipforwardtable - // - // NOTE: Because of the variable-length array, Marshal.PtrToStructure - // will *not* populate the table field. Additionally, we have seen - // crashes following suspend/resume while trying to marshal this - // structure. See #GetSystemIpv4Gateway for more on this, as well - // as for how to traverse the table. - [StructLayout(LayoutKind.Sequential)] - internal class MIB_IPFORWARDTABLE - { - internal uint dwNumEntries; - internal MIB_IPFORWARDROW[] table; - }; - - // https://docs.microsoft.com/en-us/windows/desktop/api/iphlpapi/nf-iphlpapi-getipforwardtable - [DllImport("iphlpapi", CharSet = CharSet.Auto)] - private extern static int GetIpForwardTable(IntPtr pIpForwardTable, ref int pdwSize, bool bOrder); - - // https://docs.microsoft.com/en-us/windows/desktop/debug/system-error-codes--0-499- - private static int ERROR_INSUFFICIENT_BUFFER = 122; - - // Do as little as possible here because any error thrown will cause "net start" to fail - // without anything being added to the application log. - public OutlineService() - { - InitializeComponent(); - - eventLog = new EventLog(); - if (!EventLog.SourceExists(EVENT_LOG_SOURCE)) - { - EventLog.CreateEventSource(EVENT_LOG_SOURCE, EVENT_LOG_NAME); - } - eventLog.Source = EVENT_LOG_SOURCE; - eventLog.Log = EVENT_LOG_NAME; - } - - protected override void OnStart(string[] args) - { - eventLog.WriteEntry("OutlineService starting"); - NetworkChange.NetworkAddressChanged += - new NetworkAddressChangedEventHandler(NetworkAddressChanged); - CreatePipe(); - } - - protected override void OnStop() - { - eventLog.WriteEntry("OutlineService stopping"); - DestroyPipe(); - NetworkChange.NetworkAddressChanged -= NetworkAddressChanged; - } - - private void CreatePipe() - { - var pipeSecurity = new PipeSecurity(); - pipeSecurity.AddAccessRule(new PipeAccessRule(new SecurityIdentifier( - WellKnownSidType.CreatorOwnerSid, null), - PipeAccessRights.FullControl, AccessControlType.Allow)); - pipeSecurity.AddAccessRule(new PipeAccessRule(new SecurityIdentifier( - WellKnownSidType.AuthenticatedUserSid, null), - PipeAccessRights.ReadWrite, AccessControlType.Allow)); - - pipe = new NamedPipeServerStream(PIPE_NAME, PipeDirection.InOut, -1, PipeTransmissionMode.Message, - PipeOptions.Asynchronous, (int)BUFFER_SIZE_BYTES, (int)BUFFER_SIZE_BYTES, pipeSecurity); - pipe.BeginWaitForConnection(HandleConnection, null); - } - - private void DestroyPipe() - { - if (pipe == null) - { - return; - } - try - { - if (pipe.IsConnected) - { - pipe.Disconnect(); - } - pipe.Close(); - pipe = null; - } - catch (Exception e) - { - eventLog.WriteEntry($"Got an exception while destroying the pipe: {e.ToString()}", - EventLogEntryType.Warning); - } - } - - private void HandleConnection(IAsyncResult result) - { - eventLog.WriteEntry("Got incoming connection"); - - // Save the network config before we do anything. If the request fails - // it will be sent to the client for inclusion in Sentry reports. - var beforeNetworkInfo = GetNetworkInfo(); - - try - { - pipe.EndWaitForConnection(result); - // Keep the pipe connected to send connection status updates. - while (pipe.IsConnected) - { - ServiceResponse response = new ServiceResponse(); - var request = ReadRequest(); - if (request == null) - { - response.statusCode = (int)ErrorCode.GenericFailure; - } - else - { - response.action = request.action; - try - { - HandleRequest(request); - } - catch (Exception e) - { - response.statusCode = (int)ErrorCode.GenericFailure; - response.errorMessage = $"{e.Message} (network config: {beforeNetworkInfo})"; - eventLog.WriteEntry($"request failed: {e.Message}", EventLogEntryType.Error); - } - } - WriteResponse(response); - } - } - catch (Exception e) - { - eventLog.WriteEntry($"Failed to handle connection: {e.ToString()}", EventLogEntryType.Error); - } - finally - { - // Pipe streams are one-to-one connections. Recreate the pipe to handle subsequent requests. - DestroyPipe(); - CreatePipe(); - } - } - - private ServiceRequest ReadRequest() - { - var stringBuilder = new StringBuilder(); - var buffer = new byte[BUFFER_SIZE_BYTES]; - var memoryStream = new MemoryStream(); - do - { - var readBytes = pipe.Read(buffer, 0, buffer.Length); - memoryStream.Write(buffer, 0, readBytes); - } while (!pipe.IsMessageComplete); - var msg = Encoding.UTF8.GetString(buffer); - if (String.IsNullOrWhiteSpace(msg)) - { - eventLog.WriteEntry("Failed to read request", EventLogEntryType.Error); - return null; - } - eventLog.WriteEntry($"incoming message: {msg}"); - return ParseRequest(msg); - } - - private ServiceRequest ParseRequest(string jsonRequest) - { - try - { - return JsonConvert.DeserializeObject(jsonRequest); - } - catch (Exception e) - { - eventLog.WriteEntry($"Failed to parse request: {e.ToString()}"); - } - return null; - } - - private void WriteResponse(ServiceResponse response) - { - var jsonResponse = SerializeResponse(response); - if (jsonResponse == null) - { - eventLog.WriteEntry("Failed to serialize response.", EventLogEntryType.Error); - return; - } - eventLog.WriteEntry($"outgoing message: {jsonResponse}"); - var jsonResponseBytes = Encoding.UTF8.GetBytes(jsonResponse); - pipe.Write(jsonResponseBytes, 0, jsonResponseBytes.Length); - pipe.Flush(); - pipe.WaitForPipeDrain(); - } - - private string SerializeResponse(ServiceResponse response) - { - try - { - return JsonConvert.SerializeObject(response); - } - catch (Exception e) - { - eventLog.WriteEntry($"Failed to serialize response: {e.ToString()}"); - } - return null; - } - - private void HandleRequest(ServiceRequest request) - { - switch (request.action) - { - case ACTION_CONFIGURE_ROUTING: - ConfigureRouting(request.parameters[PARAM_PROXY_IP], Boolean.Parse(request.parameters[PARAM_AUTO_CONNECT])); - break; - case ACTION_RESET_ROUTING: - ResetRouting(proxyIp, gatewayInterfaceIndex); - break; - default: - eventLog.WriteEntry($"Received invalid request: {request.action}", EventLogEntryType.Error); - break; - } - } - - // Routes all traffic *except that destined for the proxy server* - // through the TAP device, creating the illusion of a system-wide VPN. - // - // The two key steps are: - // - Route all IPv4 traffic through the TAP device. - // - Find a gateway and route traffic *to the proxy server only* (a /32 - // mask) through it. - // - // Finding a gateway, in particular, is complex: for more on how it - // works, see #GetSystemIpv4Gateway. - // - // On top of this foundation, we take some steps to help prevent - // "leaking" traffic: - // - IPv6 traffic is "blocked", as Outline does not currently support - // servers on IPv6 addresses. - // - "Smart Multi-Homed Name Resolution" is disabled, as it can cause - // the system's "regular" - and potentially filtered - DNS servers to - // be used (particularly on Windows 10). - // - // Preventing leaks significantly complicates things. In particular, *if - // autostart is true and a gateway cannot be found then the IPv4 - // redirect and IPv6 block remain in place and no exception is thrown*. - // When a gateway re-appears following a network change (see - // #NetworkAddressChanged), we will reconnect. - // - // Lastly, a set of routes is added through the gateway *to non-routable - // ("LAN") addresses*. This allows common hardware such as Chromecast to - // function while Outline is active. - // - // Note: - // - Currently, this function does not "clean up" in the event of - // failure. Instead, we rely on the client to call ResetRouting - // following a connection failure. - // - There's limited protection against "nested connections", i.e. - // connecting to Outline while another VPN, e.g. OpenVPN, is already - // active. There's no simple API we can use to tell whether a VPN is - // already active and *given the difficulty in identifying this - // reliably* (multiple active network interfaces, for example, are - // very common, e.g. it happens - briefly - every time a user - // switches between a wired and wireless network) we err on the side - // of working. Since the user presumably knows whether another VPN is - // already active and *we make no persistent changes to the routing - // table* this seems reasonable. - // - // TODO: The client needs to handle certain autoconnect failures better, - // e.g. if IPv4 redirect fails then the client is not really in - // the reconnecting state; the system is leaking traffic. - public void ConfigureRouting(string proxyIp, bool isAutoConnect) - { - try - { - StartSmartDnsBlock(); - eventLog.WriteEntry($"started smartdnsblock"); - } - catch (Exception e) - { - throw new Exception($"could not start smartdnsblock: {e.Message}"); - } - - try - { - GetSystemIpv4Gateway(proxyIp); - - eventLog.WriteEntry($"connecting via gateway at {gatewayIp} on interface {gatewayInterfaceIndex}"); - - // Set the proxy escape route first to prevent a routing loop when capturing all IPv4 traffic. - try - { - AddOrUpdateProxyRoute(proxyIp, gatewayIp, gatewayInterfaceIndex); - eventLog.WriteEntry($"created route to proxy"); - } - catch (Exception e) - { - throw new Exception($"could not create route to proxy: {e.Message}"); - } - this.proxyIp = proxyIp; - - try - { - AddOrUpdateReservedSubnetBypass(gatewayIp, gatewayInterfaceIndex); - eventLog.WriteEntry($"created LAN bypass routes"); - } - catch (Exception e) - { - throw new Exception($"could not create LAN bypass routes: {e.Message}"); - } - } - catch (Exception e) when (isAutoConnect) - { - eventLog.WriteEntry($"could not reconnect during auto-connect: {e.Message}", EventLogEntryType.Warning); - } - - try - { - StopRoutingIpv6(); - eventLog.WriteEntry($"blocked IPv6 traffic"); - } - catch (Exception e) - { - throw new Exception($"could not block IPv6 traffic: {e.Message}"); - } - - try - { - AddIpv4TapRedirect(); - eventLog.WriteEntry($"redirected IPv4 traffic"); - } - catch (Exception e) - { - throw new Exception($"could not redirect IPv4 traffic: {e.Message}"); - } - } - - // Undoes and removes as many as possible of the routes and other - // changes to the system previously made by #ConfigureRouting. - // - // As per #ConfigureRouting, this function is largely idempodent: - // calling it multiple times in succession should be safe and result in - // the same system configuration. - // - // Notes: - // - *This function does not set any error code when any step fails*. - // It probably should, as the system may in some rare cases still be - // connected (or, worse but less likely, bricked). - // - If the service does not know the IP address of the proxy server - // then it *cannot remove that route*. This can happen if the service - // is restarted while Outline is connected *or* (more likely) if this - // function is called while Outline is not connected. This route is - // mostly harmless because it only affects traffic to the proxy and - // if/when the user reconnects to it the route will be updated. - public void ResetRouting(string proxyIp, int gatewayInterfaceIndex) - { - try - { - RemoveIpv4TapRedirect(); - eventLog.WriteEntry($"removed IPv4 redirect"); - } - catch (Exception e) - { - eventLog.WriteEntry($"failed to remove IPv4 redirect: {e.Message}", EventLogEntryType.Error); - } - - try - { - // This is only necessary when disconecting without network connectivity. - StartRoutingIpv4(); - } - catch (Exception) {} - - try - { - StartRoutingIpv6(); - eventLog.WriteEntry($"unblocked IPv6"); - } - catch (Exception e) - { - eventLog.WriteEntry($"failed to unblock IPv6: {e.Message}", EventLogEntryType.Error); - } - - if (proxyIp != null) - { - try - { - DeleteProxyRoute(proxyIp); - eventLog.WriteEntry($"deleted route to proxy"); - } - catch (Exception e) - { - eventLog.WriteEntry($"failed to delete route to proxy: {e.Message}", EventLogEntryType.Error); - } - this.proxyIp = null; - } - - try - { - RemoveReservedSubnetBypass(); - eventLog.WriteEntry($"deleted LAN bypass routes"); - } - catch (Exception e) - { - eventLog.WriteEntry($"failed to delete LAN bypass routes: {e.Message}", EventLogEntryType.Error); - } - this.gatewayIp = null; - - try - { - StopSmartDnsBlock(); - eventLog.WriteEntry($"stopped smartdnsblock"); - } - catch (Exception e) - { - eventLog.WriteEntry($"failed to stop smartdnsblock: {e.Message}", - EventLogEntryType.Warning); - } - } - - // Disable "Smart Multi-Homed Name Resolution", to ensure the system uses only the - // (non-filtered) DNS server(s) associated with the TAP device. - // - // Notes: - // - To show the current firewall rules: - // netsh wfp show filters - // - This website is an easy way to quickly verify there are no DNS leaks: - // https://ipleak.net/ - // - Because .Net provides *no way* to associate the new process with this one, the - // new process will continue to run even if this service is interrupted or crashes. - // Fortunately, since the changes it makes are *not* persistent, the system can, in - // the worst case, be fixed by rebooting. - private void StartSmartDnsBlock() - { - // smartdnsblock.exe must be a sibling of OutlineService.exe. - Process smartDnsBlock = new Process(); - smartDnsBlock.StartInfo.FileName = new DirectoryInfo(Process.GetCurrentProcess().MainModule.FileName).Parent.FullName + - Path.DirectorySeparatorChar + "smartdnsblock.exe"; - smartDnsBlock.StartInfo.UseShellExecute = false; - - smartDnsBlock.StartInfo.RedirectStandardError = true; - smartDnsBlock.StartInfo.RedirectStandardOutput = true; - - // This is for Windows 7: without it, the process exits immediately, presumably - // because stdin isn't connected to anything: - // https://github.com/Jigsaw-Code/outline-client/issues/415 - // - // This seems to make no difference on Windows 8 and 10. - smartDnsBlock.StartInfo.RedirectStandardInput = true; - - ArrayList stdout = new ArrayList(); - ArrayList stderr = new ArrayList(); - smartDnsBlock.OutputDataReceived += (object sender, DataReceivedEventArgs e) => - { - if (!String.IsNullOrEmpty(e.Data)) - { - stdout.Add(e.Data); - } - }; - smartDnsBlock.ErrorDataReceived += (object sender, DataReceivedEventArgs e) => - { - if (!String.IsNullOrEmpty(e.Data)) - { - stderr.Add(e.Data); - } - }; - - try - { - smartDnsBlock.Start(); - smartDnsBlock.BeginOutputReadLine(); - smartDnsBlock.BeginErrorReadLine(); - } - catch (Exception e) - { - throw new Exception($"could not launch smartdnsblock at {smartDnsBlock.StartInfo.FileName}: { e.Message}"); - } - - // This does *not* throw if the process is still running after Nms. - smartDnsBlock.WaitForExit(SMART_DNS_BLOCK_TIMEOUT_MS); - if (smartDnsBlock.HasExited) - { - throw new Exception($"smartdnsblock failed " + $"(stdout: {String.Join(Environment.NewLine, stdout.ToArray())}, " + - $"(stderr: {String.Join(Environment.NewLine, stderr.ToArray())})"); - } - } - - private void StopSmartDnsBlock() - { - try - { - RunCommand("powershell", "stop-process -name smartdnsblock"); - } - catch (Exception e) - { - throw new Exception($"could not stop smartdnsblock: {e.Message}"); - } - } - - private void AddOrUpdateProxyRoute(string proxyIp, string gatewayIp, int gatewayInterfaceIndex) - { - // "netsh interface ipv4 set route" does *not* work for us here - // because it can only be used to change a route's *metric*. - try - { - RunCommand(CMD_ROUTE, $"change {proxyIp} {gatewayIp} if {gatewayInterfaceIndex}"); - } - catch (Exception) - { - RunCommand(CMD_NETSH, $"interface ipv4 add route {proxyIp}/32 nexthop={gatewayIp} interface=\"{gatewayInterfaceIndex}\" metric=0 store=active"); - } - } - - private void DeleteProxyRoute(string proxyIp) - { - // "route" doesn't need to know on which interface or through which - // gateway the route was created. - RunCommand(CMD_ROUTE, $"delete {proxyIp}"); - } - - // Route IPv4 traffic through the TAP device. Instead of deleting the - // default IPv4 gateway (0.0.0.0/0), we resort to creating two more - // specific routes (see IPV4_SUBNETS) that take precedence over the - // default gateway. This way, we need not worry about the default - // gateway being recreated with a lower metric upon device sleep. - // - // This 'hack' was inspired by OpenVPN; see: - // https://github.com/OpenVPN/openvpn3/commit/d08cc059e7132a3d3aee3dcd946fce4c35b1ced3#diff-1d76f0fd7ec04c6d1398288214a879c5R358 - // - // TODO: If these routes exist on a gateway that's not our TAP device, - // it might be a good signal that OpenVPN is active? - private void AddIpv4TapRedirect() - { - foreach (string subnet in IPV4_SUBNETS) - { - try - { - RunCommand(CMD_NETSH, $"interface ipv4 add route {subnet} nexthop={TAP_DEVICE_IP} interface={TAP_DEVICE_NAME} metric=0 store=active"); - } - catch (Exception) - { - RunCommand(CMD_NETSH, $"interface ipv4 set route {subnet} nexthop={TAP_DEVICE_IP} interface={TAP_DEVICE_NAME} metric=0 store=active"); - } - } - } - - private void RemoveIpv4TapRedirect() - { - foreach (string subnet in IPV4_SUBNETS) - { - RunCommand(CMD_NETSH, $"interface ipv4 delete route {subnet} interface={TAP_DEVICE_NAME}"); - } - } - - private void StartRoutingIpv4() - { - foreach (string subnet in IPV4_SUBNETS) - { - RunCommand(CMD_NETSH, $"interface ipv4 delete route {subnet} interface={NetworkInterface.LoopbackInterfaceIndex}"); - } - } - - private void StopRoutingIpv4() - { - foreach (string subnet in IPV4_SUBNETS) - { - try - { - RunCommand(CMD_NETSH, $"interface ipv4 add route {subnet} interface={NetworkInterface.LoopbackInterfaceIndex} metric=0 store=active"); - } - catch (Exception) - { - RunCommand(CMD_NETSH, $"interface ipv4 set route {subnet} interface={NetworkInterface.LoopbackInterfaceIndex} metric=0 store=active"); - } - } - } - - private void StartRoutingIpv6() - { - foreach (string subnet in IPV6_SUBNETS) - { - RunCommand(CMD_NETSH, $"interface ipv6 delete route {subnet} interface={NetworkInterface.IPv6LoopbackInterfaceIndex}"); - } - } - - // Outline does not currently support IPv6, so we resort to disabling it while the VPN is active to - // prevent leakage. Removing the default IPv6 gateway is not enough since it gets re-created - // through router advertisements and DHCP (disabling these or IPv6 routing altogether requires a - // system reboot). Thus, we resort to creating three IPv6 routes (see IPV6_SUBNETS) to the loopback - // interface that are more specific than the default route, causing IPv6 traffic to get dropped. - private void StopRoutingIpv6() - { - foreach (string subnet in IPV6_SUBNETS) - { - try - { - RunCommand(CMD_NETSH, $"interface ipv6 add route {subnet} interface={NetworkInterface.IPv6LoopbackInterfaceIndex} metric=0 store=active"); - } - catch (Exception) - { - RunCommand(CMD_NETSH, $"interface ipv6 set route {subnet} interface={NetworkInterface.IPv6LoopbackInterfaceIndex} metric=0 store=active"); - } - } - } - - // Routes reserved and private subnets through the default gateway so they bypass the VPN. - private void AddOrUpdateReservedSubnetBypass(string gatewayIp, int gatewayInterfaceIndex) - { - foreach (string subnet in IPV4_RESERVED_SUBNETS) - { - try - { - RunCommand(CMD_ROUTE, $"change {subnet} {gatewayIp} if {gatewayInterfaceIndex}"); - } - catch (Exception) - { - RunCommand(CMD_NETSH, $"interface ipv4 add route {subnet} nexthop={gatewayIp} interface=\"{gatewayInterfaceIndex}\" metric=0 store=active"); - } - } - } - - // Removes reserved subnet routes created to bypass the VPN. - private void RemoveReservedSubnetBypass() - { - foreach (string subnet in IPV4_RESERVED_SUBNETS) - { - RunCommand(CMD_ROUTE, $"delete {subnet}"); - } - } - - // Runs a shell command synchronously. - private void RunCommand(string cmd, string args) - { - Console.WriteLine($"running command: {cmd} {args}"); - - var startInfo = new ProcessStartInfo(cmd); - startInfo.Arguments = args; - startInfo.UseShellExecute = false; - startInfo.RedirectStandardError = true; - startInfo.RedirectStandardOutput = true; - startInfo.CreateNoWindow = true; - - Process p = new Process(); - var stdout = new StringBuilder(); - var stderr = new StringBuilder(); - p.OutputDataReceived += (object sender, DataReceivedEventArgs e) => - { - if (e == null || String.IsNullOrWhiteSpace(e.Data)) - { - return; - } - stdout.Append(e.Data); - }; - p.ErrorDataReceived += (object sender, DataReceivedEventArgs e) => - { - if (e == null || String.IsNullOrWhiteSpace(e.Data)) - { - return; - } - stderr.Append(e.Data); - }; - p.StartInfo = startInfo; - p.Start(); - p.BeginOutputReadLine(); - p.BeginErrorReadLine(); - p.WaitForExit(); - - // "route" is weird and always exits with zero: we have to examine - // stderr to detect its errors. - if (p.ExitCode != 0 || stderr.ToString().Length > 0) - { - // NOTE: Do *not* add args to this error message because it's piped - // back to the client for inclusion in Sentry reports and - // effectively contain access keys. - throw new Exception($"command exited with {p.ExitCode} " + - $"(stdout: {stdout.ToString()}, stderr: {stderr.ToString()})"); - } - } - - // Searches the system's routing table for the best route to the - // specified IP address *that does not route through the TAP device*. - // - // That last requirement - ignoring the TAP device - is what prevents us - // from simply calling GetBestRoute: other than that, it does all the - // work of finding the lowest-weighted gateway to the destination IP. - // - // NOTE: This function does not *always* find the best gateway: it - // currently only considers "default" gateways (0.0.0.0) which may not - // work in some rare cases. Several re-implementations of the Windows - // API illustrate how we could more closely match GetBestRoute: - // - https://github.com/wine-mirror/wine/blob/master/dlls/iphlpapi/iphlpapi_main.c - // - https://github.com/reactos/reactos/blob/master/dll/win32/iphlpapi/iphlpapi_main.c - private void GetSystemIpv4Gateway(string proxyIp) - { - gatewayIp = null; - gatewayInterfaceIndex = -1; - - int tapInterfaceIndex; - try - { - tapInterfaceIndex = NetworkInterface.GetAllNetworkInterfaces() - .Where(i => i.Name == TAP_DEVICE_NAME) - .FirstOrDefault() - .GetIPProperties() - .GetIPv4Properties().Index; - } - catch (Exception) - { - throw new Exception("TAP device not found"); - } - - // Some marshalling craziness follows: we have to first ask - // GetIpForwardTable how much memory is required to hold the routing - // table before calling it again to actually return us the table; - // once we have the table, we have to iterate over the rows - // (thankfully, MIB_IPFORWARDROW marshalls easily). - int bufferSize = 0; - if (GetIpForwardTable(IntPtr.Zero, ref bufferSize, true) != ERROR_INSUFFICIENT_BUFFER) - { - throw new Exception("could not fetch routing table"); - } - var buffer = Marshal.AllocHGlobal(bufferSize); - if (GetIpForwardTable(buffer, ref bufferSize, true) != 0) - { - Marshal.FreeHGlobal(buffer); - throw new Exception("could not fetch routing table"); - } - - // NOTE: We deliberately *do not marshal the entire - // MIB_IPFORWARDTABLE* owing to unexplained crashes following - // suspend/resume. Fortunately, since that structure is - // logically just a DWORD followed by an array, this entails - // little extra work. - var numEntries = Marshal.ReadInt32(buffer); - MIB_IPFORWARDROW bestRow = null; - var rowPtr = buffer + Marshal.SizeOf(numEntries); - for (int i = 0; i < numEntries; i++) - { - MIB_IPFORWARDROW row = (MIB_IPFORWARDROW)Marshal.PtrToStructure(rowPtr, typeof(MIB_IPFORWARDROW)); - - // Must be a gateway (see note above on how we can improve this). - if (row.dwForwardDest != 0) - { - continue; - } - - // Must not be the TAP device. - if (row.dwForwardIfIndex == tapInterfaceIndex) - { - continue; - } - - if (bestRow == null || row.dwForwardMetric1 < bestRow.dwForwardMetric1) - { - bestRow = row; - } - - rowPtr += Marshal.SizeOf(typeof(MIB_IPFORWARDROW)); - } - - Marshal.FreeHGlobal(buffer); - - if (bestRow == null) - { - throw new Exception("no gateway found"); - } - - gatewayIp = new IPAddress(BitConverter.GetBytes(bestRow.dwForwardNextHop)).ToString(); - gatewayInterfaceIndex = bestRow.dwForwardIfIndex; - } - - // Updates, if Outline is connected, the routing table to reflect a new - // gateway. - // - // There's really just one thing to do when the gateway changes: update - // the (direct) route to the proxy server to route through the new - // gateway. If there is no gateway, e.g. because the system has lost - // network connectivity, notify the client and keep the IPv4 redirect - // and IPv6 block in place: this helps prevent leaking traffic. - // - // Notes: - // - *This function must not throw*. If it does, the handler is unset. - // - This function also updates two further sets of routes: the LAN - // bypass routes (which must route through the gateway) and the IPv4 - // redirect routes (which "fall back" to the system gateway once the - // TAP device temporarily disappears due to tun2socks' exit). - // - The NetworkChange.NetworkAddressChanged callback is *extremely - // noisy*. In particular, it seems to be called twice for every - // change to the routing table. There does not seem to be any useful - // information in the supplied EventArgs. This is partly why we don't - // touch the routing table unless the gateway has actually changed. - // - This function may be called while #ConfigureRouting is still - // running. This is partly why we exit early (at the top) if we don't - // think Outline is connected. - private void NetworkAddressChanged(object sender, EventArgs evt) - { - if (proxyIp == null) - { - eventLog.WriteEntry("network changed but Outline is not connected - doing nothing"); - return; - } - - var previousGatewayIp = gatewayIp; - var previousGatewayInterfaceIndex = gatewayInterfaceIndex; - - try - { - GetSystemIpv4Gateway(proxyIp); - } - catch (Exception e) - { - eventLog.WriteEntry($"network changed but no gateway found: {e.Message}"); - } - - if (previousGatewayIp == gatewayIp && previousGatewayInterfaceIndex == gatewayInterfaceIndex) - { - // Only send on actual change, to prevent duplicate notifications (mostly - // harmless but can make debugging harder). - eventLog.WriteEntry($"network changed but gateway and interface stayed the same"); - return; - } - else if (gatewayIp == null) - { - SendConnectionStatusChange(ConnectionStatus.Reconnecting); - - // Stop capturing IPv4 traffic in order to prevent a routing loop in the TAP device. - // Redirect IPv4 traffic to the loopback interface instead to avoid leaking traffic when - // the network becomes available. - try - { - StopRoutingIpv4(); - RemoveIpv4TapRedirect(); - eventLog.WriteEntry($"stopped routing IPv4 traffic"); - } - catch (Exception e) - { - eventLog.WriteEntry($"failed to stop routing IPv4: {e.Message}", EventLogEntryType.Error); - } - return; - } - - eventLog.WriteEntry($"network changed - gateway is now {gatewayIp} on interface {gatewayInterfaceIndex}"); - - // Add the proxy escape route before capturing IPv4 traffic to prevent a routing loop in the TAP device. - try - { - AddOrUpdateProxyRoute(proxyIp, gatewayIp, gatewayInterfaceIndex); - eventLog.WriteEntry($"updated route to proxy"); - } - catch (Exception e) - { - eventLog.WriteEntry($"could not update route to proxy: {e.Message}"); - return; - } - - try - { - AddIpv4TapRedirect(); - StartRoutingIpv4(); - eventLog.WriteEntry($"refreshed IPv4 redirect"); - } - catch (Exception e) - { - eventLog.WriteEntry($"could not refresh IPv4 redirect: {e.Message}"); - return; - } - - // Send the status update now that the full-system VPN is connected. - SendConnectionStatusChange(ConnectionStatus.Connected); - - try - { - AddOrUpdateReservedSubnetBypass(gatewayIp, gatewayInterfaceIndex); - eventLog.WriteEntry($"updated LAN bypass routes"); - } - catch (Exception e) - { - // TODO: This isn't quite right: because we successfully updated - // the route to the proxy, the client *is* connected; it's - // just not "fully" connected, in the way we like. We - // should distinguish between "cannot reconnect right now, - // because no internet" and "cannot reconnect because - // netsh commands are failing". - eventLog.WriteEntry($"could not update LAN bypass routes: {e.Message}"); - return; - } - } - - // Writes the connection status to the pipe, if it is connected. - private void SendConnectionStatusChange(ConnectionStatus status) - { - if (pipe == null || !pipe.IsConnected) - { - eventLog.WriteEntry("Cannot send connection status change, pipe not connected.", EventLogEntryType.Error); - return; - } - ServiceResponse response = new ServiceResponse(); - response.action = ACTION_STATUS_CHANGED; - response.statusCode = (int)ErrorCode.Success; - response.connectionStatus = (int)status; - try - { - WriteResponse(response); - } - catch (Exception e) - { - eventLog.WriteEntry($"Failed to send connection status change: {e.Message}"); - } - } - - public string GetNetworkInfo() - { - return String.Join(", ", NetworkInterface.GetAllNetworkInterfaces() - .Select(a => this.GetAdapterInfo(a))); - } - - private string GetAdapterInfo(NetworkInterface adapter) - { - var numIpv4Gateways = adapter.GetIPProperties().GatewayAddresses - .Select(g => g.Address) - .Where(a => a.AddressFamily == AddressFamily.InterNetwork) - .Count(); - var numIpv6Gateways = adapter.GetIPProperties().GatewayAddresses - .Select(g => g.Address) - .Where(a => a.AddressFamily == AddressFamily.InterNetworkV6) - .Count(); - - return $"{adapter.Name} ({adapter.OperationalStatus}): " + ( - adapter.Supports(NetworkInterfaceComponent.IPv4) ? - $"{numIpv4Gateways} x ipv4 gateways" : - "ipv4 disabled") + ", " + ( - adapter.Supports(NetworkInterfaceComponent.IPv6) ? - $"{numIpv6Gateways} x ipv6 gateways" : - "ipv6 disabled"); - } - } - - [DataContract] - internal class ServiceRequest - { - [DataMember] - internal string action; - [DataMember] - internal Dictionary parameters; - } - - [DataContract] - internal class ServiceResponse - { - [DataMember] - internal string action; - [DataMember] - internal int statusCode; - [DataMember] - internal string errorMessage; - [DataMember] - internal int connectionStatus; - } - - public enum ErrorCode - { - Success = 0, - GenericFailure = 1 - } - - public enum ConnectionStatus - { - Connected = 0, - Disconnected = 1, - Reconnecting = 2 - } -} +// Copyright 2018 The Outline Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.IO.Pipes; +using System.Linq; +using System.Net; +using System.Net.NetworkInformation; +using System.Net.Sockets; +using System.Runtime.InteropServices; +using System.Runtime.Serialization; +using System.Security.AccessControl; +using System.Security.Principal; +using System.ServiceProcess; +using System.Text; +using Newtonsoft.Json; + +/* + * Windows Service, part of the Outline Windows client, to configure routing. + * Modifying the system routes requires admin permissions, so this service must be installed + * and started as admin. + * + * The service listens on a named pipe and supports the following JSON API: + * + * Requests + * + * configureRouting: Modifies the system's routing table to route all traffic through the TAP device + * except that destined for proxyIp. Disables IPv6 traffic. + * { action: "configureRouting", parameters: {"proxyIp": , "isAutoConnect": "false" }} + * + * resetRouting: Restores the system's default routing. + * { action: "resetRouting"} + * + * Response + * + * { statusCode: , action: errorMessage?: } + * + * The service will send connection status updates if the pipe connection is kept + * open by the client. Such responses have the form: + * + * { statusCode: , action: "statusChanged", connectionStatus: } + * + * View logs with this PowerShell query: + * get-eventlog -logname Application -source OutlineService -newest 20 | format-table -property timegenerated,entrytype,message -autosize + */ +namespace OutlineService +{ + public partial class OutlineService : ServiceBase + { + private const string EVENT_LOG_SOURCE = "OutlineService"; + private const string EVENT_LOG_NAME = "Application"; + // Must be kept in sync with the Electron code. + private const string PIPE_NAME = "OutlineServicePipe"; + private const string TAP_DEVICE_NAME = "outline-tap0"; + private const string TAP_DEVICE_IP = "10.0.85.1"; + + private const string ACTION_CONFIGURE_ROUTING = "configureRouting"; + private const string ACTION_RESET_ROUTING = "resetRouting"; + private const string ACTION_STATUS_CHANGED = "statusChanged"; + private const string PARAM_PROXY_IP = "proxyIp"; + private const string PARAM_AUTO_CONNECT = "isAutoConnect"; + + private static string[] IPV4_SUBNETS = { "0.0.0.0/1", "128.0.0.0/1" }; + private static string[] IPV6_SUBNETS = { "fc00::/7", "2000::/4", "3000::/4" }; + private static string[] IPV4_RESERVED_SUBNETS = { + "0.0.0.0/8", + "10.0.0.0/8", + "100.64.0.0/10", + "169.254.0.0/16", + "172.16.0.0/12", + "192.0.0.0/24", + "192.0.2.0/24", + "192.31.196.0/24", + "192.52.193.0/24", + "192.88.99.0/24", + "192.168.0.0/16", + "192.175.48.0/24", + "198.18.0.0/15", + "198.51.100.0/24", + "203.0.113.0/24", + "240.0.0.0/4" + }; + private const string CMD_NETSH = "netsh"; + private const string CMD_ROUTE = "route"; + + private const uint BUFFER_SIZE_BYTES = 1024; + + private EventLog eventLog; + private NamedPipeServerStream pipe; + private string proxyIp; + private string gatewayIp; + private int gatewayInterfaceIndex; + + // Time, in ms, to wait until considering smartdnsblock.exe to have successfully launched. + private const int SMART_DNS_BLOCK_TIMEOUT_MS = 1000; + + // https://docs.microsoft.com/en-us/windows/desktop/api/ipmib/ns-ipmib-_mib_ipforwardrow + [StructLayout(LayoutKind.Sequential)] + internal class MIB_IPFORWARDROW + { + internal uint dwForwardDest; + internal uint dwForwardMask; + internal uint dwForwardPolicy; + internal uint dwForwardNextHop; + internal int dwForwardIfIndex; + internal uint dwForwardType; + internal uint dwForwardProto; + internal uint dwForwardAge; + internal uint dwForwardNextHopAS; + internal uint dwForwardMetric1; + internal uint dwForwardMetric2; + internal uint dwForwardMetric3; + internal uint dwForwardMetric4; + internal uint dwForwardMetric5; + } + + // https://docs.microsoft.com/en-us/windows/desktop/api/ipmib/ns-ipmib-_mib_ipforwardtable + // + // NOTE: Because of the variable-length array, Marshal.PtrToStructure + // will *not* populate the table field. Additionally, we have seen + // crashes following suspend/resume while trying to marshal this + // structure. See #GetSystemIpv4Gateway for more on this, as well + // as for how to traverse the table. + [StructLayout(LayoutKind.Sequential)] + internal class MIB_IPFORWARDTABLE + { + internal uint dwNumEntries; + internal MIB_IPFORWARDROW[] table; + }; + + // https://docs.microsoft.com/en-us/windows/desktop/api/iphlpapi/nf-iphlpapi-getipforwardtable + [DllImport("iphlpapi", CharSet = CharSet.Auto)] + private extern static int GetIpForwardTable(IntPtr pIpForwardTable, ref int pdwSize, bool bOrder); + + // https://docs.microsoft.com/en-us/windows/desktop/debug/system-error-codes--0-499- + private static int ERROR_INSUFFICIENT_BUFFER = 122; + + // Do as little as possible here because any error thrown will cause "net start" to fail + // without anything being added to the application log. + public OutlineService() + { + InitializeComponent(); + + eventLog = new EventLog(); + if (!EventLog.SourceExists(EVENT_LOG_SOURCE)) + { + EventLog.CreateEventSource(EVENT_LOG_SOURCE, EVENT_LOG_NAME); + } + eventLog.Source = EVENT_LOG_SOURCE; + eventLog.Log = EVENT_LOG_NAME; + } + + protected override void OnStart(string[] args) + { + eventLog.WriteEntry("OutlineService starting"); + NetworkChange.NetworkAddressChanged += + new NetworkAddressChangedEventHandler(NetworkAddressChanged); + CreatePipe(); + } + + protected override void OnStop() + { + eventLog.WriteEntry("OutlineService stopping"); + DestroyPipe(); + NetworkChange.NetworkAddressChanged -= NetworkAddressChanged; + } + + private void CreatePipe() + { + var pipeSecurity = new PipeSecurity(); + pipeSecurity.AddAccessRule(new PipeAccessRule(new SecurityIdentifier( + WellKnownSidType.CreatorOwnerSid, null), + PipeAccessRights.FullControl, AccessControlType.Allow)); + pipeSecurity.AddAccessRule(new PipeAccessRule(new SecurityIdentifier( + WellKnownSidType.AuthenticatedUserSid, null), + PipeAccessRights.ReadWrite, AccessControlType.Allow)); + + pipe = new NamedPipeServerStream(PIPE_NAME, PipeDirection.InOut, -1, PipeTransmissionMode.Message, + PipeOptions.Asynchronous, (int)BUFFER_SIZE_BYTES, (int)BUFFER_SIZE_BYTES, pipeSecurity); + pipe.BeginWaitForConnection(HandleConnection, null); + } + + private void DestroyPipe() + { + if (pipe == null) + { + return; + } + try + { + if (pipe.IsConnected) + { + pipe.Disconnect(); + } + pipe.Close(); + pipe = null; + } + catch (Exception e) + { + eventLog.WriteEntry($"Got an exception while destroying the pipe: {e.ToString()}", + EventLogEntryType.Warning); + } + } + + private void HandleConnection(IAsyncResult result) + { + eventLog.WriteEntry("Got incoming connection"); + + // Save the network config before we do anything. If the request fails + // it will be sent to the client for inclusion in Sentry reports. + var beforeNetworkInfo = GetNetworkInfo(); + + try + { + pipe.EndWaitForConnection(result); + // Keep the pipe connected to send connection status updates. + while (pipe.IsConnected) + { + ServiceResponse response = new ServiceResponse(); + var request = ReadRequest(); + if (request == null) + { + response.statusCode = (int)ErrorCode.GenericFailure; + } + else + { + response.action = request.action; + try + { + HandleRequest(request); + } + catch (Exception e) + { + response.statusCode = (int)ErrorCode.GenericFailure; + response.errorMessage = $"{e.Message} (network config: {beforeNetworkInfo})"; + eventLog.WriteEntry($"request failed: {e.Message}", EventLogEntryType.Error); + } + } + WriteResponse(response); + } + } + catch (Exception e) + { + eventLog.WriteEntry($"Failed to handle connection: {e.ToString()}", EventLogEntryType.Error); + } + finally + { + // Pipe streams are one-to-one connections. Recreate the pipe to handle subsequent requests. + DestroyPipe(); + CreatePipe(); + } + } + + private ServiceRequest ReadRequest() + { + var stringBuilder = new StringBuilder(); + var buffer = new byte[BUFFER_SIZE_BYTES]; + var memoryStream = new MemoryStream(); + do + { + var readBytes = pipe.Read(buffer, 0, buffer.Length); + memoryStream.Write(buffer, 0, readBytes); + } while (!pipe.IsMessageComplete); + var msg = Encoding.UTF8.GetString(buffer); + if (String.IsNullOrWhiteSpace(msg)) + { + eventLog.WriteEntry("Failed to read request", EventLogEntryType.Error); + return null; + } + eventLog.WriteEntry($"incoming message: {msg}"); + return ParseRequest(msg); + } + + private ServiceRequest ParseRequest(string jsonRequest) + { + try + { + return JsonConvert.DeserializeObject(jsonRequest); + } + catch (Exception e) + { + eventLog.WriteEntry($"Failed to parse request: {e.ToString()}"); + } + return null; + } + + private void WriteResponse(ServiceResponse response) + { + var jsonResponse = SerializeResponse(response); + if (jsonResponse == null) + { + eventLog.WriteEntry("Failed to serialize response.", EventLogEntryType.Error); + return; + } + eventLog.WriteEntry($"outgoing message: {jsonResponse}"); + var jsonResponseBytes = Encoding.UTF8.GetBytes(jsonResponse); + pipe.Write(jsonResponseBytes, 0, jsonResponseBytes.Length); + pipe.Flush(); + pipe.WaitForPipeDrain(); + } + + private string SerializeResponse(ServiceResponse response) + { + try + { + return JsonConvert.SerializeObject(response); + } + catch (Exception e) + { + eventLog.WriteEntry($"Failed to serialize response: {e.ToString()}"); + } + return null; + } + + private void HandleRequest(ServiceRequest request) + { + switch (request.action) + { + case ACTION_CONFIGURE_ROUTING: + ConfigureRouting(request.parameters[PARAM_PROXY_IP], Boolean.Parse(request.parameters[PARAM_AUTO_CONNECT])); + break; + case ACTION_RESET_ROUTING: + ResetRouting(proxyIp, gatewayInterfaceIndex); + break; + default: + eventLog.WriteEntry($"Received invalid request: {request.action}", EventLogEntryType.Error); + break; + } + } + + // Routes all traffic *except that destined for the proxy server* + // through the TAP device, creating the illusion of a system-wide VPN. + // + // The two key steps are: + // - Route all IPv4 traffic through the TAP device. + // - Find a gateway and route traffic *to the proxy server only* (a /32 + // mask) through it. + // + // Finding a gateway, in particular, is complex: for more on how it + // works, see #GetSystemIpv4Gateway. + // + // On top of this foundation, we take some steps to help prevent + // "leaking" traffic: + // - IPv6 traffic is "blocked", as Outline does not currently support + // servers on IPv6 addresses. + // - "Smart Multi-Homed Name Resolution" is disabled, as it can cause + // the system's "regular" - and potentially filtered - DNS servers to + // be used (particularly on Windows 10). + // + // Preventing leaks significantly complicates things. In particular, *if + // autostart is true and a gateway cannot be found then the IPv4 + // redirect and IPv6 block remain in place and no exception is thrown*. + // When a gateway re-appears following a network change (see + // #NetworkAddressChanged), we will reconnect. + // + // Lastly, a set of routes is added through the gateway *to non-routable + // ("LAN") addresses*. This allows common hardware such as Chromecast to + // function while Outline is active. + // + // Note: + // - Currently, this function does not "clean up" in the event of + // failure. Instead, we rely on the client to call ResetRouting + // following a connection failure. + // - There's limited protection against "nested connections", i.e. + // connecting to Outline while another VPN, e.g. OpenVPN, is already + // active. There's no simple API we can use to tell whether a VPN is + // already active and *given the difficulty in identifying this + // reliably* (multiple active network interfaces, for example, are + // very common, e.g. it happens - briefly - every time a user + // switches between a wired and wireless network) we err on the side + // of working. Since the user presumably knows whether another VPN is + // already active and *we make no persistent changes to the routing + // table* this seems reasonable. + // + // TODO: The client needs to handle certain autoconnect failures better, + // e.g. if IPv4 redirect fails then the client is not really in + // the reconnecting state; the system is leaking traffic. + public void ConfigureRouting(string proxyIp, bool isAutoConnect) + { + try + { + StartSmartDnsBlock(); + eventLog.WriteEntry($"started smartdnsblock"); + } + catch (Exception e) + { + throw new Exception($"could not start smartdnsblock: {e.Message}"); + } + + try + { + GetSystemIpv4Gateway(proxyIp); + + eventLog.WriteEntry($"connecting via gateway at {gatewayIp} on interface {gatewayInterfaceIndex}"); + + // Set the proxy escape route first to prevent a routing loop when capturing all IPv4 traffic. + try + { + AddOrUpdateProxyRoute(proxyIp, gatewayIp, gatewayInterfaceIndex); + eventLog.WriteEntry($"created route to proxy"); + } + catch (Exception e) + { + throw new Exception($"could not create route to proxy: {e.Message}"); + } + this.proxyIp = proxyIp; + + try + { + AddOrUpdateReservedSubnetBypass(gatewayIp, gatewayInterfaceIndex); + eventLog.WriteEntry($"created LAN bypass routes"); + } + catch (Exception e) + { + throw new Exception($"could not create LAN bypass routes: {e.Message}"); + } + } + catch (Exception e) when (isAutoConnect) + { + eventLog.WriteEntry($"could not reconnect during auto-connect: {e.Message}", EventLogEntryType.Warning); + } + + try + { + StopRoutingIpv6(); + eventLog.WriteEntry($"blocked IPv6 traffic"); + } + catch (Exception e) + { + throw new Exception($"could not block IPv6 traffic: {e.Message}"); + } + + try + { + AddIpv4TapRedirect(); + eventLog.WriteEntry($"redirected IPv4 traffic"); + } + catch (Exception e) + { + throw new Exception($"could not redirect IPv4 traffic: {e.Message}"); + } + } + + // Undoes and removes as many as possible of the routes and other + // changes to the system previously made by #ConfigureRouting. + // + // As per #ConfigureRouting, this function is largely idempodent: + // calling it multiple times in succession should be safe and result in + // the same system configuration. + // + // Notes: + // - *This function does not set any error code when any step fails*. + // It probably should, as the system may in some rare cases still be + // connected (or, worse but less likely, bricked). + // - If the service does not know the IP address of the proxy server + // then it *cannot remove that route*. This can happen if the service + // is restarted while Outline is connected *or* (more likely) if this + // function is called while Outline is not connected. This route is + // mostly harmless because it only affects traffic to the proxy and + // if/when the user reconnects to it the route will be updated. + public void ResetRouting(string proxyIp, int gatewayInterfaceIndex) + { + try + { + RemoveIpv4TapRedirect(); + eventLog.WriteEntry($"removed IPv4 redirect"); + } + catch (Exception e) + { + eventLog.WriteEntry($"failed to remove IPv4 redirect: {e.Message}", EventLogEntryType.Error); + } + + try + { + // This is only necessary when disconecting without network connectivity. + StartRoutingIpv4(); + } + catch (Exception) {} + + try + { + StartRoutingIpv6(); + eventLog.WriteEntry($"unblocked IPv6"); + } + catch (Exception e) + { + eventLog.WriteEntry($"failed to unblock IPv6: {e.Message}", EventLogEntryType.Error); + } + + if (proxyIp != null) + { + try + { + DeleteProxyRoute(proxyIp); + eventLog.WriteEntry($"deleted route to proxy"); + } + catch (Exception e) + { + eventLog.WriteEntry($"failed to delete route to proxy: {e.Message}", EventLogEntryType.Error); + } + this.proxyIp = null; + } + + try + { + RemoveReservedSubnetBypass(); + eventLog.WriteEntry($"deleted LAN bypass routes"); + } + catch (Exception e) + { + eventLog.WriteEntry($"failed to delete LAN bypass routes: {e.Message}", EventLogEntryType.Error); + } + this.gatewayIp = null; + + try + { + StopSmartDnsBlock(); + eventLog.WriteEntry($"stopped smartdnsblock"); + } + catch (Exception e) + { + eventLog.WriteEntry($"failed to stop smartdnsblock: {e.Message}", + EventLogEntryType.Warning); + } + } + + // Disable "Smart Multi-Homed Name Resolution", to ensure the system uses only the + // (non-filtered) DNS server(s) associated with the TAP device. + // + // Notes: + // - To show the current firewall rules: + // netsh wfp show filters + // - This website is an easy way to quickly verify there are no DNS leaks: + // https://ipleak.net/ + // - Because .Net provides *no way* to associate the new process with this one, the + // new process will continue to run even if this service is interrupted or crashes. + // Fortunately, since the changes it makes are *not* persistent, the system can, in + // the worst case, be fixed by rebooting. + private void StartSmartDnsBlock() + { + // smartdnsblock.exe must be a sibling of OutlineService.exe. + Process smartDnsBlock = new Process(); + smartDnsBlock.StartInfo.FileName = new DirectoryInfo(Process.GetCurrentProcess().MainModule.FileName).Parent.FullName + + Path.DirectorySeparatorChar + "smartdnsblock.exe"; + smartDnsBlock.StartInfo.UseShellExecute = false; + + smartDnsBlock.StartInfo.RedirectStandardError = true; + smartDnsBlock.StartInfo.RedirectStandardOutput = true; + + // This is for Windows 7: without it, the process exits immediately, presumably + // because stdin isn't connected to anything: + // https://github.com/Jigsaw-Code/outline-apps/issues/415 + // + // This seems to make no difference on Windows 8 and 10. + smartDnsBlock.StartInfo.RedirectStandardInput = true; + + ArrayList stdout = new ArrayList(); + ArrayList stderr = new ArrayList(); + smartDnsBlock.OutputDataReceived += (object sender, DataReceivedEventArgs e) => + { + if (!String.IsNullOrEmpty(e.Data)) + { + stdout.Add(e.Data); + } + }; + smartDnsBlock.ErrorDataReceived += (object sender, DataReceivedEventArgs e) => + { + if (!String.IsNullOrEmpty(e.Data)) + { + stderr.Add(e.Data); + } + }; + + try + { + smartDnsBlock.Start(); + smartDnsBlock.BeginOutputReadLine(); + smartDnsBlock.BeginErrorReadLine(); + } + catch (Exception e) + { + throw new Exception($"could not launch smartdnsblock at {smartDnsBlock.StartInfo.FileName}: { e.Message}"); + } + + // This does *not* throw if the process is still running after Nms. + smartDnsBlock.WaitForExit(SMART_DNS_BLOCK_TIMEOUT_MS); + if (smartDnsBlock.HasExited) + { + throw new Exception($"smartdnsblock failed " + $"(stdout: {String.Join(Environment.NewLine, stdout.ToArray())}, " + + $"(stderr: {String.Join(Environment.NewLine, stderr.ToArray())})"); + } + } + + private void StopSmartDnsBlock() + { + try + { + RunCommand("powershell", "stop-process -name smartdnsblock"); + } + catch (Exception e) + { + throw new Exception($"could not stop smartdnsblock: {e.Message}"); + } + } + + private void AddOrUpdateProxyRoute(string proxyIp, string gatewayIp, int gatewayInterfaceIndex) + { + // "netsh interface ipv4 set route" does *not* work for us here + // because it can only be used to change a route's *metric*. + try + { + RunCommand(CMD_ROUTE, $"change {proxyIp} {gatewayIp} if {gatewayInterfaceIndex}"); + } + catch (Exception) + { + RunCommand(CMD_NETSH, $"interface ipv4 add route {proxyIp}/32 nexthop={gatewayIp} interface=\"{gatewayInterfaceIndex}\" metric=0 store=active"); + } + } + + private void DeleteProxyRoute(string proxyIp) + { + // "route" doesn't need to know on which interface or through which + // gateway the route was created. + RunCommand(CMD_ROUTE, $"delete {proxyIp}"); + } + + // Route IPv4 traffic through the TAP device. Instead of deleting the + // default IPv4 gateway (0.0.0.0/0), we resort to creating two more + // specific routes (see IPV4_SUBNETS) that take precedence over the + // default gateway. This way, we need not worry about the default + // gateway being recreated with a lower metric upon device sleep. + // + // This 'hack' was inspired by OpenVPN; see: + // https://github.com/OpenVPN/openvpn3/commit/d08cc059e7132a3d3aee3dcd946fce4c35b1ced3#diff-1d76f0fd7ec04c6d1398288214a879c5R358 + // + // TODO: If these routes exist on a gateway that's not our TAP device, + // it might be a good signal that OpenVPN is active? + private void AddIpv4TapRedirect() + { + foreach (string subnet in IPV4_SUBNETS) + { + try + { + RunCommand(CMD_NETSH, $"interface ipv4 add route {subnet} nexthop={TAP_DEVICE_IP} interface={TAP_DEVICE_NAME} metric=0 store=active"); + } + catch (Exception) + { + RunCommand(CMD_NETSH, $"interface ipv4 set route {subnet} nexthop={TAP_DEVICE_IP} interface={TAP_DEVICE_NAME} metric=0 store=active"); + } + } + } + + private void RemoveIpv4TapRedirect() + { + foreach (string subnet in IPV4_SUBNETS) + { + RunCommand(CMD_NETSH, $"interface ipv4 delete route {subnet} interface={TAP_DEVICE_NAME}"); + } + } + + private void StartRoutingIpv4() + { + foreach (string subnet in IPV4_SUBNETS) + { + RunCommand(CMD_NETSH, $"interface ipv4 delete route {subnet} interface={NetworkInterface.LoopbackInterfaceIndex}"); + } + } + + private void StopRoutingIpv4() + { + foreach (string subnet in IPV4_SUBNETS) + { + try + { + RunCommand(CMD_NETSH, $"interface ipv4 add route {subnet} interface={NetworkInterface.LoopbackInterfaceIndex} metric=0 store=active"); + } + catch (Exception) + { + RunCommand(CMD_NETSH, $"interface ipv4 set route {subnet} interface={NetworkInterface.LoopbackInterfaceIndex} metric=0 store=active"); + } + } + } + + private void StartRoutingIpv6() + { + foreach (string subnet in IPV6_SUBNETS) + { + RunCommand(CMD_NETSH, $"interface ipv6 delete route {subnet} interface={NetworkInterface.IPv6LoopbackInterfaceIndex}"); + } + } + + // Outline does not currently support IPv6, so we resort to disabling it while the VPN is active to + // prevent leakage. Removing the default IPv6 gateway is not enough since it gets re-created + // through router advertisements and DHCP (disabling these or IPv6 routing altogether requires a + // system reboot). Thus, we resort to creating three IPv6 routes (see IPV6_SUBNETS) to the loopback + // interface that are more specific than the default route, causing IPv6 traffic to get dropped. + private void StopRoutingIpv6() + { + foreach (string subnet in IPV6_SUBNETS) + { + try + { + RunCommand(CMD_NETSH, $"interface ipv6 add route {subnet} interface={NetworkInterface.IPv6LoopbackInterfaceIndex} metric=0 store=active"); + } + catch (Exception) + { + RunCommand(CMD_NETSH, $"interface ipv6 set route {subnet} interface={NetworkInterface.IPv6LoopbackInterfaceIndex} metric=0 store=active"); + } + } + } + + // Routes reserved and private subnets through the default gateway so they bypass the VPN. + private void AddOrUpdateReservedSubnetBypass(string gatewayIp, int gatewayInterfaceIndex) + { + foreach (string subnet in IPV4_RESERVED_SUBNETS) + { + try + { + RunCommand(CMD_ROUTE, $"change {subnet} {gatewayIp} if {gatewayInterfaceIndex}"); + } + catch (Exception) + { + RunCommand(CMD_NETSH, $"interface ipv4 add route {subnet} nexthop={gatewayIp} interface=\"{gatewayInterfaceIndex}\" metric=0 store=active"); + } + } + } + + // Removes reserved subnet routes created to bypass the VPN. + private void RemoveReservedSubnetBypass() + { + foreach (string subnet in IPV4_RESERVED_SUBNETS) + { + RunCommand(CMD_ROUTE, $"delete {subnet}"); + } + } + + // Runs a shell command synchronously. + private void RunCommand(string cmd, string args) + { + Console.WriteLine($"running command: {cmd} {args}"); + + var startInfo = new ProcessStartInfo(cmd); + startInfo.Arguments = args; + startInfo.UseShellExecute = false; + startInfo.RedirectStandardError = true; + startInfo.RedirectStandardOutput = true; + startInfo.CreateNoWindow = true; + + Process p = new Process(); + var stdout = new StringBuilder(); + var stderr = new StringBuilder(); + p.OutputDataReceived += (object sender, DataReceivedEventArgs e) => + { + if (e == null || String.IsNullOrWhiteSpace(e.Data)) + { + return; + } + stdout.Append(e.Data); + }; + p.ErrorDataReceived += (object sender, DataReceivedEventArgs e) => + { + if (e == null || String.IsNullOrWhiteSpace(e.Data)) + { + return; + } + stderr.Append(e.Data); + }; + p.StartInfo = startInfo; + p.Start(); + p.BeginOutputReadLine(); + p.BeginErrorReadLine(); + p.WaitForExit(); + + // "route" is weird and always exits with zero: we have to examine + // stderr to detect its errors. + if (p.ExitCode != 0 || stderr.ToString().Length > 0) + { + // NOTE: Do *not* add args to this error message because it's piped + // back to the client for inclusion in Sentry reports and + // effectively contain access keys. + throw new Exception($"command exited with {p.ExitCode} " + + $"(stdout: {stdout.ToString()}, stderr: {stderr.ToString()})"); + } + } + + // Searches the system's routing table for the best route to the + // specified IP address *that does not route through the TAP device*. + // + // That last requirement - ignoring the TAP device - is what prevents us + // from simply calling GetBestRoute: other than that, it does all the + // work of finding the lowest-weighted gateway to the destination IP. + // + // NOTE: This function does not *always* find the best gateway: it + // currently only considers "default" gateways (0.0.0.0) which may not + // work in some rare cases. Several re-implementations of the Windows + // API illustrate how we could more closely match GetBestRoute: + // - https://github.com/wine-mirror/wine/blob/master/dlls/iphlpapi/iphlpapi_main.c + // - https://github.com/reactos/reactos/blob/master/dll/win32/iphlpapi/iphlpapi_main.c + private void GetSystemIpv4Gateway(string proxyIp) + { + gatewayIp = null; + gatewayInterfaceIndex = -1; + + int tapInterfaceIndex; + try + { + tapInterfaceIndex = NetworkInterface.GetAllNetworkInterfaces() + .Where(i => i.Name == TAP_DEVICE_NAME) + .FirstOrDefault() + .GetIPProperties() + .GetIPv4Properties().Index; + } + catch (Exception) + { + throw new Exception("TAP device not found"); + } + + // Some marshalling craziness follows: we have to first ask + // GetIpForwardTable how much memory is required to hold the routing + // table before calling it again to actually return us the table; + // once we have the table, we have to iterate over the rows + // (thankfully, MIB_IPFORWARDROW marshalls easily). + int bufferSize = 0; + if (GetIpForwardTable(IntPtr.Zero, ref bufferSize, true) != ERROR_INSUFFICIENT_BUFFER) + { + throw new Exception("could not fetch routing table"); + } + var buffer = Marshal.AllocHGlobal(bufferSize); + if (GetIpForwardTable(buffer, ref bufferSize, true) != 0) + { + Marshal.FreeHGlobal(buffer); + throw new Exception("could not fetch routing table"); + } + + // NOTE: We deliberately *do not marshal the entire + // MIB_IPFORWARDTABLE* owing to unexplained crashes following + // suspend/resume. Fortunately, since that structure is + // logically just a DWORD followed by an array, this entails + // little extra work. + var numEntries = Marshal.ReadInt32(buffer); + MIB_IPFORWARDROW bestRow = null; + var rowPtr = buffer + Marshal.SizeOf(numEntries); + for (int i = 0; i < numEntries; i++) + { + MIB_IPFORWARDROW row = (MIB_IPFORWARDROW)Marshal.PtrToStructure(rowPtr, typeof(MIB_IPFORWARDROW)); + + // Must be a gateway (see note above on how we can improve this). + if (row.dwForwardDest != 0) + { + continue; + } + + // Must not be the TAP device. + if (row.dwForwardIfIndex == tapInterfaceIndex) + { + continue; + } + + if (bestRow == null || row.dwForwardMetric1 < bestRow.dwForwardMetric1) + { + bestRow = row; + } + + rowPtr += Marshal.SizeOf(typeof(MIB_IPFORWARDROW)); + } + + Marshal.FreeHGlobal(buffer); + + if (bestRow == null) + { + throw new Exception("no gateway found"); + } + + gatewayIp = new IPAddress(BitConverter.GetBytes(bestRow.dwForwardNextHop)).ToString(); + gatewayInterfaceIndex = bestRow.dwForwardIfIndex; + } + + // Updates, if Outline is connected, the routing table to reflect a new + // gateway. + // + // There's really just one thing to do when the gateway changes: update + // the (direct) route to the proxy server to route through the new + // gateway. If there is no gateway, e.g. because the system has lost + // network connectivity, notify the client and keep the IPv4 redirect + // and IPv6 block in place: this helps prevent leaking traffic. + // + // Notes: + // - *This function must not throw*. If it does, the handler is unset. + // - This function also updates two further sets of routes: the LAN + // bypass routes (which must route through the gateway) and the IPv4 + // redirect routes (which "fall back" to the system gateway once the + // TAP device temporarily disappears due to tun2socks' exit). + // - The NetworkChange.NetworkAddressChanged callback is *extremely + // noisy*. In particular, it seems to be called twice for every + // change to the routing table. There does not seem to be any useful + // information in the supplied EventArgs. This is partly why we don't + // touch the routing table unless the gateway has actually changed. + // - This function may be called while #ConfigureRouting is still + // running. This is partly why we exit early (at the top) if we don't + // think Outline is connected. + private void NetworkAddressChanged(object sender, EventArgs evt) + { + if (proxyIp == null) + { + eventLog.WriteEntry("network changed but Outline is not connected - doing nothing"); + return; + } + + var previousGatewayIp = gatewayIp; + var previousGatewayInterfaceIndex = gatewayInterfaceIndex; + + try + { + GetSystemIpv4Gateway(proxyIp); + } + catch (Exception e) + { + eventLog.WriteEntry($"network changed but no gateway found: {e.Message}"); + } + + if (previousGatewayIp == gatewayIp && previousGatewayInterfaceIndex == gatewayInterfaceIndex) + { + // Only send on actual change, to prevent duplicate notifications (mostly + // harmless but can make debugging harder). + eventLog.WriteEntry($"network changed but gateway and interface stayed the same"); + return; + } + else if (gatewayIp == null) + { + SendConnectionStatusChange(ConnectionStatus.Reconnecting); + + // Stop capturing IPv4 traffic in order to prevent a routing loop in the TAP device. + // Redirect IPv4 traffic to the loopback interface instead to avoid leaking traffic when + // the network becomes available. + try + { + StopRoutingIpv4(); + RemoveIpv4TapRedirect(); + eventLog.WriteEntry($"stopped routing IPv4 traffic"); + } + catch (Exception e) + { + eventLog.WriteEntry($"failed to stop routing IPv4: {e.Message}", EventLogEntryType.Error); + } + return; + } + + eventLog.WriteEntry($"network changed - gateway is now {gatewayIp} on interface {gatewayInterfaceIndex}"); + + // Add the proxy escape route before capturing IPv4 traffic to prevent a routing loop in the TAP device. + try + { + AddOrUpdateProxyRoute(proxyIp, gatewayIp, gatewayInterfaceIndex); + eventLog.WriteEntry($"updated route to proxy"); + } + catch (Exception e) + { + eventLog.WriteEntry($"could not update route to proxy: {e.Message}"); + return; + } + + try + { + AddIpv4TapRedirect(); + StartRoutingIpv4(); + eventLog.WriteEntry($"refreshed IPv4 redirect"); + } + catch (Exception e) + { + eventLog.WriteEntry($"could not refresh IPv4 redirect: {e.Message}"); + return; + } + + // Send the status update now that the full-system VPN is connected. + SendConnectionStatusChange(ConnectionStatus.Connected); + + try + { + AddOrUpdateReservedSubnetBypass(gatewayIp, gatewayInterfaceIndex); + eventLog.WriteEntry($"updated LAN bypass routes"); + } + catch (Exception e) + { + // TODO: This isn't quite right: because we successfully updated + // the route to the proxy, the client *is* connected; it's + // just not "fully" connected, in the way we like. We + // should distinguish between "cannot reconnect right now, + // because no internet" and "cannot reconnect because + // netsh commands are failing". + eventLog.WriteEntry($"could not update LAN bypass routes: {e.Message}"); + return; + } + } + + // Writes the connection status to the pipe, if it is connected. + private void SendConnectionStatusChange(ConnectionStatus status) + { + if (pipe == null || !pipe.IsConnected) + { + eventLog.WriteEntry("Cannot send connection status change, pipe not connected.", EventLogEntryType.Error); + return; + } + ServiceResponse response = new ServiceResponse(); + response.action = ACTION_STATUS_CHANGED; + response.statusCode = (int)ErrorCode.Success; + response.connectionStatus = (int)status; + try + { + WriteResponse(response); + } + catch (Exception e) + { + eventLog.WriteEntry($"Failed to send connection status change: {e.Message}"); + } + } + + public string GetNetworkInfo() + { + return String.Join(", ", NetworkInterface.GetAllNetworkInterfaces() + .Select(a => this.GetAdapterInfo(a))); + } + + private string GetAdapterInfo(NetworkInterface adapter) + { + var numIpv4Gateways = adapter.GetIPProperties().GatewayAddresses + .Select(g => g.Address) + .Where(a => a.AddressFamily == AddressFamily.InterNetwork) + .Count(); + var numIpv6Gateways = adapter.GetIPProperties().GatewayAddresses + .Select(g => g.Address) + .Where(a => a.AddressFamily == AddressFamily.InterNetworkV6) + .Count(); + + return $"{adapter.Name} ({adapter.OperationalStatus}): " + ( + adapter.Supports(NetworkInterfaceComponent.IPv4) ? + $"{numIpv4Gateways} x ipv4 gateways" : + "ipv4 disabled") + ", " + ( + adapter.Supports(NetworkInterfaceComponent.IPv6) ? + $"{numIpv6Gateways} x ipv6 gateways" : + "ipv6 disabled"); + } + } + + [DataContract] + internal class ServiceRequest + { + [DataMember] + internal string action; + [DataMember] + internal Dictionary parameters; + } + + [DataContract] + internal class ServiceResponse + { + [DataMember] + internal string action; + [DataMember] + internal int statusCode; + [DataMember] + internal string errorMessage; + [DataMember] + internal int connectionStatus; + } + + public enum ErrorCode + { + Success = 0, + GenericFailure = 1 + } + + public enum ConnectionStatus + { + Connected = 0, + Disconnected = 1, + Reconnecting = 2 + } +} diff --git a/tools/OutlineService/OutlineService/OutlineService.csproj b/client/tools/OutlineService/OutlineService/OutlineService.csproj similarity index 97% rename from tools/OutlineService/OutlineService/OutlineService.csproj rename to client/tools/OutlineService/OutlineService/OutlineService.csproj index 7a8947f7239..4fac6eb2eae 100755 --- a/tools/OutlineService/OutlineService/OutlineService.csproj +++ b/client/tools/OutlineService/OutlineService/OutlineService.csproj @@ -1,92 +1,92 @@ - - - - - Debug - AnyCPU - {F39A4491-9868-4A71-9BE1-980FADE10AC9} - WinExe - OutlineService - OutlineService - v4.6.1 - 512 - true - - - x86 - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - true - bin\x86\Debug\ - DEBUG;TRACE - full - x86 - prompt - MinimumRecommendedRules.ruleset - true - - - bin\ - TRACE - true - pdbonly - x86 - prompt - MinimumRecommendedRules.ruleset - true - - - - ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll - - - - - - - - - - - - - - - Component - - - OutlineService.cs - - - - - - - - - - - OutlineService.cs - - - - - - + + + + + Debug + AnyCPU + {F39A4491-9868-4A71-9BE1-980FADE10AC9} + WinExe + OutlineService + OutlineService + v4.6.1 + 512 + true + + + x86 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + true + bin\x86\Debug\ + DEBUG;TRACE + full + x86 + prompt + MinimumRecommendedRules.ruleset + true + + + bin\ + TRACE + true + pdbonly + x86 + prompt + MinimumRecommendedRules.ruleset + true + + + + ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll + + + + + + + + + + + + + + + Component + + + OutlineService.cs + + + + + + + + + + + OutlineService.cs + + + + + + \ No newline at end of file diff --git a/tools/OutlineService/OutlineService/OutlineService.resx b/client/tools/OutlineService/OutlineService/OutlineService.resx similarity index 97% rename from tools/OutlineService/OutlineService/OutlineService.resx rename to client/tools/OutlineService/OutlineService/OutlineService.resx index 1a80cdd6e7c..0129fa82a53 100755 --- a/tools/OutlineService/OutlineService/OutlineService.resx +++ b/client/tools/OutlineService/OutlineService/OutlineService.resx @@ -1,123 +1,123 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + \ No newline at end of file diff --git a/tools/OutlineService/OutlineService/Program.cs b/client/tools/OutlineService/OutlineService/Program.cs similarity index 97% rename from tools/OutlineService/OutlineService/Program.cs rename to client/tools/OutlineService/OutlineService/Program.cs index bb9d7ee7dd5..62d8c9b47d7 100755 --- a/tools/OutlineService/OutlineService/Program.cs +++ b/client/tools/OutlineService/OutlineService/Program.cs @@ -1,70 +1,70 @@ -// Copyright 2018 The Outline Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using System; -using System.Collections.Generic; -using System.Linq; -using System.ServiceProcess; -using System.Text; -using System.Threading.Tasks; - -namespace OutlineService -{ - static class Program - { - static void Main(string[] args) - { - if (!Environment.UserInteractive) - { - ServiceBase[] ServicesToRun; - ServicesToRun = new ServiceBase[] { new OutlineService() }; - ServiceBase.Run(ServicesToRun); - } - else - { - var service = new OutlineService(); - // To run as a service from the command-line: - // service.OnStart(null); - // System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite); - if (args.Length < 2) - { - ShowUsageAndExit(); - } - switch (args[0]) - { - case "on": - service.ConfigureRouting(args[1], false); - break; - case "off": - if (args.Length < 3) - { - ShowUsageAndExit(); - } - service.ResetRouting(args[1], Int32.Parse(args[2])); - break; - default: - ShowUsageAndExit(); - break; - } - Console.WriteLine($"network config: {service.GetNetworkInfo()}"); - } - } - - static void ShowUsageAndExit() - { - Console.WriteLine("usage: on |off "); - Environment.Exit(1); - } - } -} // namespace OutlineService +// Copyright 2018 The Outline Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.ServiceProcess; +using System.Text; +using System.Threading.Tasks; + +namespace OutlineService +{ + static class Program + { + static void Main(string[] args) + { + if (!Environment.UserInteractive) + { + ServiceBase[] ServicesToRun; + ServicesToRun = new ServiceBase[] { new OutlineService() }; + ServiceBase.Run(ServicesToRun); + } + else + { + var service = new OutlineService(); + // To run as a service from the command-line: + // service.OnStart(null); + // System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite); + if (args.Length < 2) + { + ShowUsageAndExit(); + } + switch (args[0]) + { + case "on": + service.ConfigureRouting(args[1], false); + break; + case "off": + if (args.Length < 3) + { + ShowUsageAndExit(); + } + service.ResetRouting(args[1], Int32.Parse(args[2])); + break; + default: + ShowUsageAndExit(); + break; + } + Console.WriteLine($"network config: {service.GetNetworkInfo()}"); + } + } + + static void ShowUsageAndExit() + { + Console.WriteLine("usage: on |off "); + Environment.Exit(1); + } + } +} // namespace OutlineService diff --git a/tools/OutlineService/OutlineService/Properties/AssemblyInfo.cs b/client/tools/OutlineService/OutlineService/Properties/AssemblyInfo.cs similarity index 97% rename from tools/OutlineService/OutlineService/Properties/AssemblyInfo.cs rename to client/tools/OutlineService/OutlineService/Properties/AssemblyInfo.cs index fc957bac77d..20c3e92b6c1 100755 --- a/tools/OutlineService/OutlineService/Properties/AssemblyInfo.cs +++ b/client/tools/OutlineService/OutlineService/Properties/AssemblyInfo.cs @@ -1,50 +1,50 @@ -// Copyright 2018 The Outline Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OutlineService")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OutlineService")] -[assembly: AssemblyCopyright("Copyright © 2018")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("f39a4491-9868-4a71-9be1-980fade10ac9")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +// Copyright 2018 The Outline Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OutlineService")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OutlineService")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f39a4491-9868-4a71-9be1-980fade10ac9")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/tools/OutlineService/OutlineService/bin/OutlineService.exe b/client/tools/OutlineService/OutlineService/bin/OutlineService.exe similarity index 100% rename from tools/OutlineService/OutlineService/bin/OutlineService.exe rename to client/tools/OutlineService/OutlineService/bin/OutlineService.exe diff --git a/tools/OutlineService/OutlineService/packages.config b/client/tools/OutlineService/OutlineService/packages.config similarity index 97% rename from tools/OutlineService/OutlineService/packages.config rename to client/tools/OutlineService/OutlineService/packages.config index 27e210f08a1..5762754177a 100755 --- a/tools/OutlineService/OutlineService/packages.config +++ b/client/tools/OutlineService/OutlineService/packages.config @@ -1,4 +1,4 @@ - - - + + + \ No newline at end of file diff --git a/tools/build/Dockerfile b/client/tools/build/Dockerfile similarity index 100% rename from tools/build/Dockerfile rename to client/tools/build/Dockerfile diff --git a/tools/build/README.md b/client/tools/build/README.md similarity index 100% rename from tools/build/README.md rename to client/tools/build/README.md diff --git a/tools/build/android_tools_versions.sh b/client/tools/build/android_tools_versions.sh similarity index 100% rename from tools/build/android_tools_versions.sh rename to client/tools/build/android_tools_versions.sh diff --git a/tools/build/build.action.sh b/client/tools/build/build.action.sh similarity index 100% rename from tools/build/build.action.sh rename to client/tools/build/build.action.sh diff --git a/tools/build/build.sh b/client/tools/build/build.sh similarity index 100% rename from tools/build/build.sh rename to client/tools/build/build.sh diff --git a/tools/build/setup_linux_android.sh b/client/tools/build/setup_linux_android.sh similarity index 100% rename from tools/build/setup_linux_android.sh rename to client/tools/build/setup_linux_android.sh diff --git a/tools/build/setup_macos_android.sh b/client/tools/build/setup_macos_android.sh similarity index 100% rename from tools/build/setup_macos_android.sh rename to client/tools/build/setup_macos_android.sh diff --git a/tools/find_tap_name/bin/386/find_tap_name.exe b/client/tools/find_tap_name/bin/386/find_tap_name.exe similarity index 100% rename from tools/find_tap_name/bin/386/find_tap_name.exe rename to client/tools/find_tap_name/bin/386/find_tap_name.exe diff --git a/tools/find_tap_name/bin/amd64/find_tap_name.exe b/client/tools/find_tap_name/bin/amd64/find_tap_name.exe similarity index 100% rename from tools/find_tap_name/bin/amd64/find_tap_name.exe rename to client/tools/find_tap_name/bin/amd64/find_tap_name.exe diff --git a/tools/find_tap_name/build.action.sh b/client/tools/find_tap_name/build.action.sh similarity index 100% rename from tools/find_tap_name/build.action.sh rename to client/tools/find_tap_name/build.action.sh diff --git a/tools/find_tap_name/main.go b/client/tools/find_tap_name/main.go similarity index 100% rename from tools/find_tap_name/main.go rename to client/tools/find_tap_name/main.go diff --git a/tools/outline_proxy_controller/.gitignore b/client/tools/outline_proxy_controller/.gitignore similarity index 100% rename from tools/outline_proxy_controller/.gitignore rename to client/tools/outline_proxy_controller/.gitignore diff --git a/tools/outline_proxy_controller/CMakeLists.txt b/client/tools/outline_proxy_controller/CMakeLists.txt similarity index 100% rename from tools/outline_proxy_controller/CMakeLists.txt rename to client/tools/outline_proxy_controller/CMakeLists.txt diff --git a/tools/outline_proxy_controller/Dockerfile b/client/tools/outline_proxy_controller/Dockerfile similarity index 100% rename from tools/outline_proxy_controller/Dockerfile rename to client/tools/outline_proxy_controller/Dockerfile diff --git a/tools/outline_proxy_controller/OutlineProxyControllerConfig.h.in b/client/tools/outline_proxy_controller/OutlineProxyControllerConfig.h.in similarity index 100% rename from tools/outline_proxy_controller/OutlineProxyControllerConfig.h.in rename to client/tools/outline_proxy_controller/OutlineProxyControllerConfig.h.in diff --git a/tools/outline_proxy_controller/README.md b/client/tools/outline_proxy_controller/README.md similarity index 100% rename from tools/outline_proxy_controller/README.md rename to client/tools/outline_proxy_controller/README.md diff --git a/tools/outline_proxy_controller/build.action.sh b/client/tools/outline_proxy_controller/build.action.sh similarity index 100% rename from tools/outline_proxy_controller/build.action.sh rename to client/tools/outline_proxy_controller/build.action.sh diff --git a/tools/outline_proxy_controller/dist/OutlineProxyController b/client/tools/outline_proxy_controller/dist/OutlineProxyController similarity index 100% rename from tools/outline_proxy_controller/dist/OutlineProxyController rename to client/tools/outline_proxy_controller/dist/OutlineProxyController diff --git a/tools/outline_proxy_controller/dist/install_linux_service.sh b/client/tools/outline_proxy_controller/dist/install_linux_service.sh similarity index 100% rename from tools/outline_proxy_controller/dist/install_linux_service.sh rename to client/tools/outline_proxy_controller/dist/install_linux_service.sh diff --git a/tools/outline_proxy_controller/dist/outline_proxy_controller.service b/client/tools/outline_proxy_controller/dist/outline_proxy_controller.service similarity index 100% rename from tools/outline_proxy_controller/dist/outline_proxy_controller.service rename to client/tools/outline_proxy_controller/dist/outline_proxy_controller.service diff --git a/tools/outline_proxy_controller/logger.cpp b/client/tools/outline_proxy_controller/logger.cpp similarity index 100% rename from tools/outline_proxy_controller/logger.cpp rename to client/tools/outline_proxy_controller/logger.cpp diff --git a/tools/outline_proxy_controller/logger.h b/client/tools/outline_proxy_controller/logger.h similarity index 100% rename from tools/outline_proxy_controller/logger.h rename to client/tools/outline_proxy_controller/logger.h diff --git a/tools/outline_proxy_controller/network_monitor.cpp b/client/tools/outline_proxy_controller/network_monitor.cpp similarity index 100% rename from tools/outline_proxy_controller/network_monitor.cpp rename to client/tools/outline_proxy_controller/network_monitor.cpp diff --git a/tools/outline_proxy_controller/network_monitor.h b/client/tools/outline_proxy_controller/network_monitor.h similarity index 100% rename from tools/outline_proxy_controller/network_monitor.h rename to client/tools/outline_proxy_controller/network_monitor.h diff --git a/tools/outline_proxy_controller/outline_controller_server.cpp b/client/tools/outline_proxy_controller/outline_controller_server.cpp similarity index 100% rename from tools/outline_proxy_controller/outline_controller_server.cpp rename to client/tools/outline_proxy_controller/outline_controller_server.cpp diff --git a/tools/outline_proxy_controller/outline_controller_server.h b/client/tools/outline_proxy_controller/outline_controller_server.h similarity index 100% rename from tools/outline_proxy_controller/outline_controller_server.h rename to client/tools/outline_proxy_controller/outline_controller_server.h diff --git a/tools/outline_proxy_controller/outline_daemon.cpp b/client/tools/outline_proxy_controller/outline_daemon.cpp similarity index 100% rename from tools/outline_proxy_controller/outline_daemon.cpp rename to client/tools/outline_proxy_controller/outline_daemon.cpp diff --git a/tools/outline_proxy_controller/outline_error.cpp b/client/tools/outline_proxy_controller/outline_error.cpp similarity index 100% rename from tools/outline_proxy_controller/outline_error.cpp rename to client/tools/outline_proxy_controller/outline_error.cpp diff --git a/tools/outline_proxy_controller/outline_error.h b/client/tools/outline_proxy_controller/outline_error.h similarity index 100% rename from tools/outline_proxy_controller/outline_error.h rename to client/tools/outline_proxy_controller/outline_error.h diff --git a/tools/outline_proxy_controller/outline_proxy_controller.cpp b/client/tools/outline_proxy_controller/outline_proxy_controller.cpp similarity index 100% rename from tools/outline_proxy_controller/outline_proxy_controller.cpp rename to client/tools/outline_proxy_controller/outline_proxy_controller.cpp diff --git a/tools/outline_proxy_controller/outline_proxy_controller.h b/client/tools/outline_proxy_controller/outline_proxy_controller.h similarity index 100% rename from tools/outline_proxy_controller/outline_proxy_controller.h rename to client/tools/outline_proxy_controller/outline_proxy_controller.h diff --git a/tools/smartdnsblock/README.md b/client/tools/smartdnsblock/README.md similarity index 100% rename from tools/smartdnsblock/README.md rename to client/tools/smartdnsblock/README.md diff --git a/tools/smartdnsblock/bin/smartdnsblock.exe b/client/tools/smartdnsblock/bin/smartdnsblock.exe similarity index 100% rename from tools/smartdnsblock/bin/smartdnsblock.exe rename to client/tools/smartdnsblock/bin/smartdnsblock.exe diff --git a/tools/smartdnsblock/smartdnsblock.sln b/client/tools/smartdnsblock/smartdnsblock.sln similarity index 100% rename from tools/smartdnsblock/smartdnsblock.sln rename to client/tools/smartdnsblock/smartdnsblock.sln diff --git a/tools/smartdnsblock/smartdnsblock/smartdnsblock.cpp b/client/tools/smartdnsblock/smartdnsblock/smartdnsblock.cpp similarity index 100% rename from tools/smartdnsblock/smartdnsblock/smartdnsblock.cpp rename to client/tools/smartdnsblock/smartdnsblock/smartdnsblock.cpp diff --git a/tools/smartdnsblock/smartdnsblock/smartdnsblock.filters b/client/tools/smartdnsblock/smartdnsblock/smartdnsblock.filters similarity index 100% rename from tools/smartdnsblock/smartdnsblock/smartdnsblock.filters rename to client/tools/smartdnsblock/smartdnsblock/smartdnsblock.filters diff --git a/tools/smartdnsblock/smartdnsblock/smartdnsblock.user b/client/tools/smartdnsblock/smartdnsblock/smartdnsblock.user similarity index 100% rename from tools/smartdnsblock/smartdnsblock/smartdnsblock.user rename to client/tools/smartdnsblock/smartdnsblock/smartdnsblock.user diff --git a/tools/smartdnsblock/smartdnsblock/smartdnsblock.vcxproj b/client/tools/smartdnsblock/smartdnsblock/smartdnsblock.vcxproj similarity index 100% rename from tools/smartdnsblock/smartdnsblock/smartdnsblock.vcxproj rename to client/tools/smartdnsblock/smartdnsblock/smartdnsblock.vcxproj diff --git a/tsconfig.json b/client/tsconfig.json similarity index 100% rename from tsconfig.json rename to client/tsconfig.json diff --git a/commitlint.config.js b/commitlint.config.js index d53855c5e3e..9116e17c99d 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -5,18 +5,19 @@ module.exports = { 2, 'always', [ - 'build', - 'cordova', - 'cordova/android', - 'cordova/apple', - 'cordova/apple/ios', - 'cordova/apple/macos', + 'client', + 'client/build', + 'client/cordova', + 'client/cordova/android', + 'client/cordova/apple', + 'client/cordova/apple/ios', + 'client/cordova/apple/macos', 'devtools', 'docs', - 'electron', - 'electron/linux', - 'electron/windows', - 'www', + 'client/electron', + 'client/electron/linux', + 'client/electron/windows', + 'client/www', 'service', 'service/linux', 'service/windows', diff --git a/go.mod b/go.mod index efbd0781fc0..631ef5d1397 100644 --- a/go.mod +++ b/go.mod @@ -1,27 +1,20 @@ -module github.com/Jigsaw-Code/outline-client +module github.com/Jigsaw-Code/outline-apps go 1.20 require ( github.com/Jigsaw-Code/outline-sdk v0.0.9 - github.com/Jigsaw-Code/outline-sdk/x v0.0.0-20230807220427-893de7fdc6b8 github.com/crazy-max/xgo v0.30.0 github.com/eycorsican/go-tun2socks v1.16.11 - github.com/stretchr/testify v1.8.4 golang.org/x/mobile v0.0.0-20231127183840-76ac6878050a golang.org/x/sys v0.15.0 ) require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/miekg/dns v1.1.54 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect github.com/shadowsocks/go-shadowsocks2 v0.1.5 // indirect github.com/songgao/water v0.0.0-20200317203138-2b4b6d7c09d8 // indirect golang.org/x/crypto v0.16.0 // indirect golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.19.0 // indirect golang.org/x/sync v0.5.0 // indirect golang.org/x/tools v0.16.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 1ba35cb8e43..867719b527f 100644 --- a/go.sum +++ b/go.sum @@ -1,20 +1,11 @@ github.com/Jigsaw-Code/outline-sdk v0.0.9 h1:FuyrqJ5OBh5y8mpXkSomdGJreGi8bAOWRXRNB2B+Hdc= github.com/Jigsaw-Code/outline-sdk v0.0.9/go.mod h1:hhlKz0+r9wSDFT8usvN8Zv/BFToCIFAUn1P2Qk8G2CM= -github.com/Jigsaw-Code/outline-sdk/x v0.0.0-20230807220427-893de7fdc6b8 h1:BxOHmmuppPM8K0DGUsfvajKF4PKfGxv9boNDhmbszFU= -github.com/Jigsaw-Code/outline-sdk/x v0.0.0-20230807220427-893de7fdc6b8/go.mod h1:tBqJXpVm+kym+EAUdwNodcFxy872FfjVErfj8Br+gs0= github.com/crazy-max/xgo v0.30.0 h1:2uunjwLBrVu5LKIS1dIDXz9U5OIX4H5LEsC3P6wFTto= github.com/crazy-max/xgo v0.30.0/go.mod h1:m/aqfKaN/cYzfw+Pzk7Mk0tkmShg3/rCS4Zdhdugi4o= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/eycorsican/go-tun2socks v1.16.11 h1:+hJDNgisrYaGEqoSxhdikMgMJ4Ilfwm/IZDrWRrbaH8= github.com/eycorsican/go-tun2socks v1.16.11/go.mod h1:wgB2BFT8ZaPKyKOQ/5dljMG/YIow+AIXyq4KBwJ5sGQ= -github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/miekg/dns v1.1.54 h1:5jon9mWcb0sFJGpnI99tOMhCPyJ+RPVz5b63MQG0VWI= -github.com/miekg/dns v1.1.54/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 h1:f/FNXud6gA3MNr8meMVVGxhp+QBTqY91tM8HjEuMjGg= github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3/go.mod h1:HgjTstvQsPGkxUsCd2KWxErBblirPizecHcpD3ffK+s= github.com/shadowsocks/go-shadowsocks2 v0.1.5 h1:PDSQv9y2S85Fl7VBeOMF9StzeXZyK1HakRm86CUbr28= @@ -34,8 +25,6 @@ golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20191021144547-ec77196f6094/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -46,7 +35,4 @@ golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXR golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM= golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/list.action.mjs b/list.action.mjs index 47d37bf181c..51de1058e61 100644 --- a/list.action.mjs +++ b/list.action.mjs @@ -16,7 +16,7 @@ import url from 'url'; import * as globby from 'globby'; import path from 'path'; import fs from 'fs/promises'; -import {getRootDir} from './src/build/get_root_dir.mjs'; +import {getRootDir} from './client/src/build/get_root_dir.mjs'; /** * @description returns a list of all valid actions to run diff --git a/package-lock.json b/package-lock.json index 6c79a084d24..2323fd7f16b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,20 @@ { - "name": "outline-client", + "name": "outline-apps", "version": "0.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "outline-client", - "version": "0.0.0", + "name": "outline-apps", "workspaces": [ - "src/cordova/plugin" + "client" ], + "engines": { + "node": "18.x.x" + } + }, + "client": { + "version": "0.0.0", "dependencies": { "@material/mwc-button": "^0.25.3", "@material/mwc-circular-progress": "^0.27.0", @@ -115,7 +120,7 @@ "outline-i18n": "Jigsaw-Code/outline-i18n#v0.0.7", "postcss": "^7.0.39", "postcss-rtl": "^1.7.3", - "prettier": "2.8", + "prettier": "^2.8.0", "pretty-quick": "^2.0.1", "puppeteer": "^13.1.2", "replace-in-file": "^6.3.5", @@ -132,14 +137,14 @@ "webpack-shell-plugin-next": "^2.1.1", "xmlbuilder2": "^3.1.1" }, - "engines": { - "node": "^18.16.0", - "npm": "^9.5.1" - }, "optionalDependencies": { "ios-deploy": "^1.11.4" } }, + "client/src/cordova/plugin": { + "version": "0.0.0", + "dev": true + }, "node_modules/@ampproject/remapping": { "version": "2.2.0", "dev": true, @@ -10363,7 +10368,7 @@ "license": "MIT" }, "node_modules/cordova-plugin-outline": { - "resolved": "src/cordova/plugin", + "resolved": "client/src/cordova/plugin", "link": true }, "node_modules/cordova-plugin-splashscreen": { @@ -19773,6 +19778,10 @@ "os-tmpdir": "^1.0.0" } }, + "node_modules/outline-client": { + "resolved": "client", + "link": true + }, "node_modules/outline-i18n": { "version": "0.0.7", "resolved": "git+ssh://git@github.com/Jigsaw-Code/outline-i18n.git#4642c3657074246b8eca09486941434718f66608", @@ -26380,7 +26389,8 @@ }, "src/cordova/plugin": { "name": "cordova-plugin-outline", - "version": "0.0.0" + "version": "0.0.0", + "extraneous": true } }, "dependencies": { @@ -34016,7 +34026,7 @@ "from": "cordova-plugin-clipboard@github:Jigsaw-Code/outline-cordova-plugin-clipboard#v2.0.0" }, "cordova-plugin-outline": { - "version": "file:src/cordova/plugin" + "version": "file:client/src/cordova/plugin" }, "cordova-plugin-splashscreen": { "version": "6.0.2" @@ -40600,6 +40610,130 @@ "os-tmpdir": "^1.0.0" } }, + "outline-client": { + "version": "file:client", + "requires": { + "@babel/core": "^7.12.10", + "@babel/polyfill": "^7.12.1", + "@babel/preset-env": "^7.12.11", + "@commitlint/config-conventional": "^16.2.4", + "@jsdevtools/coverage-istanbul-loader": "^3.0.5", + "@material/mwc-button": "^0.25.3", + "@material/mwc-circular-progress": "^0.27.0", + "@material/mwc-formfield": "^0.25.3", + "@material/mwc-icon-button": "^0.25.3", + "@material/mwc-menu": "^0.25.3", + "@material/mwc-radio": "^0.25.3", + "@material/mwc-select": "^0.25.3", + "@material/mwc-textarea": "^0.25.3", + "@material/mwc-textfield": "^0.25.3", + "@open-wc/testing": "^3.2.0", + "@open-wc/testing-karma": "^4.0.9", + "@polymer/app-layout": "^3.1.0", + "@polymer/app-localize-behavior": "^3.0.1", + "@polymer/app-route": "^3.0.2", + "@polymer/decorators": "^3.0.0", + "@polymer/font-roboto": "^3.0.2", + "@polymer/iron-icons": "^3.0.1", + "@polymer/iron-iconset-svg": "^3.0.1", + "@polymer/iron-pages": "^3.0.1", + "@polymer/paper-behaviors": "^3.0.1", + "@polymer/paper-button": "^3.0.1", + "@polymer/paper-card": "^3.0.1", + "@polymer/paper-dialog": "^3.0.1", + "@polymer/paper-dropdown-menu": "^3.1.0", + "@polymer/paper-icon-button": "^3.0.2", + "@polymer/paper-input": "^3.2.1", + "@polymer/paper-item": "^3.0.1", + "@polymer/paper-listbox": "^3.0.1", + "@polymer/paper-menu-button": "^3.0.1", + "@polymer/paper-ripple": "^3.0.2", + "@polymer/paper-styles": "^3.0.1", + "@polymer/paper-toast": "^3.0.1", + "@rollup/plugin-image": "^2.1.1", + "@sentry/browser": "^7.31.1", + "@sentry/electron": "^4.2.0", + "@types/auto-launch": "^5.0.0", + "@types/cordova": "^0.0.34", + "@types/jasmine": "^4.3.6", + "@types/node": "^14.14.7", + "@types/polymer": "^1.2.9", + "@types/uuidv4": "^2.0.0", + "@typescript-eslint/eslint-plugin": "^5.32.0", + "@typescript-eslint/parser": "^5.32.0", + "@web/dev-server": "^0.1.35", + "@web/dev-server-esbuild": "^0.3.3", + "@web/dev-server-storybook": "^0.5.4", + "@webcomponents/webcomponentsjs": "^2.4.4", + "auto-launch": "^5.0.5", + "babel-loader": "^8.2.2", + "browserslist": "^4.20.3", + "chalk": "^5.0.1", + "copy-dir": "^1.3.0", + "copy-webpack-plugin": "^5.1.1", + "cordova-android": "^11.0.0", + "cordova-browser": "~6.0.0", + "cordova-ios": "github:apache/cordova-ios#1a5cd45e2243b239b5045a0ade9d2da1d779b72a", + "cordova-lib": "^11.0.0", + "cordova-osx": "github:apache/cordova-osx", + "cordova-plugin-clipboard": "github:Jigsaw-Code/outline-cordova-plugin-clipboard#v2.0.0", + "cordova-plugin-outline": "file:src/cordova/plugin", + "cordova-plugin-splashscreen": "^6.0.0", + "cordova-plugin-statusbar": "^2.2.3", + "cordova-webintent": "github:cordova-misc/cordova-webintent#v2.0.0", + "css-loader": "^5.0.1", + "deepmerge": "^4.3.1", + "electron": "^19.1.9", + "electron-builder": "^23.6.0", + "electron-icon-maker": "^0.0.5", + "electron-updater": "^5.0.5", + "eslint": "^8.15.0", + "eslint-import-resolver-typescript": "^3.4.0", + "eslint-plugin-compat": "^4.0.2", + "eslint-plugin-import": "^2.26.0", + "esm": "^3.2.25", + "file-loader": "^6.2.0", + "html-webpack-plugin": "^5.1.0", + "husky": "^1.3.1", + "i18n-strings-files": "^2.0.0", + "intl-messageformat": "^9.12.0", + "ios-deploy": "^1.11.4", + "istanbul": "^0.4.5", + "karma": "^6.4.2", + "karma-chrome-launcher": "^3.1.0", + "karma-coverage-istanbul-reporter": "^3.0.3", + "karma-jasmine": "^4.0.1", + "karma-webpack": "^5.0.0", + "lit": "^2.2.2", + "minimist": "^1.2.6", + "node-fetch": "^3.3.0", + "node-gyp": "^10.0.1", + "outline-i18n": "Jigsaw-Code/outline-i18n#v0.0.7", + "postcss": "^7.0.39", + "postcss-rtl": "^1.7.3", + "prettier": "^2.8.0", + "pretty-quick": "^2.0.1", + "puppeteer": "^13.1.2", + "replace-in-file": "^6.3.5", + "rimraf": "^2.7.1", + "rmfr": "^2.0.0", + "ShadowsocksConfig": "github:Jigsaw-Code/outline-shadowsocksconfig#v0.2.1", + "socks": "^1.1.10", + "style-loader": "^2.0.0", + "sudo-prompt": "^9.2.1", + "ts-loader": "^9.3.1", + "typescript": "^4.7.4", + "url": "^0.11.0", + "uuidv4": "^4.0.0", + "web-animations-js": "^2.3.2", + "webpack": "^5.16.0", + "webpack-cli": "^4.4.0", + "webpack-dev-server": "^4.5.0", + "webpack-merge": "^5.8.0", + "webpack-shell-plugin-next": "^2.1.1", + "xmlbuilder2": "^3.1.1" + } + }, "outline-i18n": { "version": "git+ssh://git@github.com/Jigsaw-Code/outline-i18n.git#4642c3657074246b8eca09486941434718f66608", "dev": true, diff --git a/package.json b/package.json index 1a05d103ea9..afc9baa06a2 100644 --- a/package.json +++ b/package.json @@ -1,172 +1,27 @@ { - "name": "outline-client", - "version": "0.0.0", + "name": "outline-apps", "productName": "Outline", "scripts": { "action:help": "npm run action list", "action:list": "npm run action list", - "action": "node ./src/build/run_action.mjs", - "clean": "rimraf build output node_modules www platforms plugins third_party/jsign/*.jar", + "action": "node ./client/src/build/run_action.mjs", + "clean": "rimraf client/build client/output node_modules client/node_modules client/www client/platforms client/plugins client/third_party/jsign/*.jar", "format:all": "prettier --write \"**/*.{cjs,mjs,html,js,json,md,ts}\"", "format": "pretty-quick --staged --pattern \"**/*.{cjs,mjs,html,js,json,md,ts}\"", - "lint:ts": "eslint --ext ts,mjs src", + "lint:ts": "eslint --ext ts,mjs client/src", "lint": "npm run lint:ts", "reset": "npm run clean && npm ci" }, - "comments": { - "version": "The 'version' in this file is just a placeholder for 'npx generate-license-file', please do not change it.", - "codrova-osx": "Version-controlled platform config files at src/cordova/apple/xcode/osx/Outline/config.xml, src/cordova/apple/xcode/osx/osx.json, and src/cordova/apple/xcode/osx/www/cordova_plugins.js as a workaround for https://github.com/apache/cordova-osx/issues/106. Delete these files when the issue is fixed." - }, - "dependencies": { - "@material/mwc-button": "^0.25.3", - "@material/mwc-circular-progress": "^0.27.0", - "@material/mwc-formfield": "^0.25.3", - "@material/mwc-icon-button": "^0.25.3", - "@material/mwc-menu": "^0.25.3", - "@material/mwc-radio": "^0.25.3", - "@material/mwc-select": "^0.25.3", - "@material/mwc-textarea": "^0.25.3", - "@material/mwc-textfield": "^0.25.3", - "@polymer/app-layout": "^3.1.0", - "@polymer/app-localize-behavior": "^3.0.1", - "@polymer/app-route": "^3.0.2", - "@polymer/decorators": "^3.0.0", - "@polymer/font-roboto": "^3.0.2", - "@polymer/iron-icons": "^3.0.1", - "@polymer/iron-iconset-svg": "^3.0.1", - "@polymer/iron-pages": "^3.0.1", - "@polymer/paper-behaviors": "^3.0.1", - "@polymer/paper-button": "^3.0.1", - "@polymer/paper-card": "^3.0.1", - "@polymer/paper-dialog": "^3.0.1", - "@polymer/paper-dropdown-menu": "^3.1.0", - "@polymer/paper-icon-button": "^3.0.2", - "@polymer/paper-input": "^3.2.1", - "@polymer/paper-item": "^3.0.1", - "@polymer/paper-listbox": "^3.0.1", - "@polymer/paper-menu-button": "^3.0.1", - "@polymer/paper-ripple": "^3.0.2", - "@polymer/paper-styles": "^3.0.1", - "@polymer/paper-toast": "^3.0.1", - "@sentry/browser": "^7.31.1", - "@sentry/electron": "^4.2.0", - "@webcomponents/webcomponentsjs": "^2.4.4", - "auto-launch": "^5.0.5", - "browserslist": "^4.20.3", - "cordova-plugin-splashscreen": "^6.0.0", - "cordova-plugin-statusbar": "^2.2.3", - "electron-updater": "^5.0.5", - "lit": "^2.2.2", - "ShadowsocksConfig": "github:Jigsaw-Code/outline-shadowsocksconfig#v0.2.1", - "socks": "^1.1.10", - "sudo-prompt": "^9.2.1", - "uuidv4": "^4.0.0", - "web-animations-js": "^2.3.2" - }, "engines": { "node": "18.x.x" }, - "devDependencies": { - "@babel/core": "^7.12.10", - "@babel/polyfill": "^7.12.1", - "@babel/preset-env": "^7.12.11", - "@commitlint/config-conventional": "^16.2.4", - "@jsdevtools/coverage-istanbul-loader": "^3.0.5", - "@open-wc/testing": "^3.2.0", - "@open-wc/testing-karma": "^4.0.9", - "@rollup/plugin-image": "^2.1.1", - "@types/auto-launch": "^5.0.0", - "@types/cordova": "^0.0.34", - "@types/jasmine": "^4.3.6", - "@types/node": "^14.14.7", - "@types/polymer": "^1.2.9", - "@types/uuidv4": "^2.0.0", - "@typescript-eslint/eslint-plugin": "^5.32.0", - "@typescript-eslint/parser": "^5.32.0", - "@web/dev-server": "^0.1.35", - "@web/dev-server-esbuild": "^0.3.3", - "@web/dev-server-storybook": "^0.5.4", - "babel-loader": "^8.2.2", - "chalk": "^5.0.1", - "copy-dir": "^1.3.0", - "copy-webpack-plugin": "^5.1.1", - "cordova-android": "^11.0.0", - "cordova-browser": "~6.0.0", - "cordova-ios": "github:apache/cordova-ios#1a5cd45e2243b239b5045a0ade9d2da1d779b72a", - "cordova-lib": "^11.0.0", - "cordova-osx": "github:apache/cordova-osx", - "cordova-plugin-clipboard": "github:Jigsaw-Code/outline-cordova-plugin-clipboard#v2.0.0", - "cordova-plugin-outline": "file:src/cordova/plugin", - "cordova-webintent": "github:cordova-misc/cordova-webintent#v2.0.0", - "css-loader": "^5.0.1", - "deepmerge": "^4.3.1", - "electron": "^19.1.9", - "electron-builder": "^23.6.0", - "electron-icon-maker": "^0.0.5", - "eslint": "^8.15.0", - "eslint-import-resolver-typescript": "^3.4.0", - "eslint-plugin-compat": "^4.0.2", - "eslint-plugin-import": "^2.26.0", - "esm": "^3.2.25", - "file-loader": "^6.2.0", - "html-webpack-plugin": "^5.1.0", - "husky": "^1.3.1", - "i18n-strings-files": "^2.0.0", - "intl-messageformat": "^9.12.0", - "istanbul": "^0.4.5", - "karma": "^6.4.2", - "karma-chrome-launcher": "^3.1.0", - "karma-coverage-istanbul-reporter": "^3.0.3", - "karma-jasmine": "^4.0.1", - "karma-webpack": "^5.0.0", - "minimist": "^1.2.6", - "node-fetch": "^3.3.0", - "node-gyp": "^10.0.1", - "outline-i18n": "Jigsaw-Code/outline-i18n#v0.0.7", - "postcss": "^7.0.39", - "postcss-rtl": "^1.7.3", - "prettier": "^2.8.0", - "pretty-quick": "^2.0.1", - "puppeteer": "^13.1.2", - "replace-in-file": "^6.3.5", - "rimraf": "^2.7.1", - "rmfr": "^2.0.0", - "style-loader": "^2.0.0", - "ts-loader": "^9.3.1", - "typescript": "^4.7.4", - "url": "^0.11.0", - "webpack": "^5.16.0", - "webpack-cli": "^4.4.0", - "webpack-dev-server": "^4.5.0", - "webpack-merge": "^5.8.0", - "webpack-shell-plugin-next": "^2.1.1", - "xmlbuilder2": "^3.1.1" - }, - "optionalDependencies": { - "ios-deploy": "^1.11.4" - }, - "main": "build/electron/electron/index.js", "husky": { "hooks": { "pre-commit": "npm run lint:ts -- --fix && npm run format" } }, - "cordova": { - "plugins": { - "cordova-plugin-outline": {}, - "cordova-plugin-splashscreen": {}, - "cordova-plugin-statusbar": {}, - "cordova-plugin-clipboard": {}, - "cordova-webintent": {} - }, - "platforms": [ - "browser", - "android", - "ios", - "osx" - ] - }, + "private": true, "workspaces": [ - "src/cordova/plugin" + "client" ] } diff --git a/tools/OutlineService/OutlineService/bin/Release/OutlineService.exe.config b/tools/OutlineService/OutlineService/bin/Release/OutlineService.exe.config deleted file mode 100755 index 6a19d29ee02..00000000000 --- a/tools/OutlineService/OutlineService/bin/Release/OutlineService.exe.config +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - \ No newline at end of file