Skip to content

Commit 94cd7f7

Browse files
committed
Initial commit
0 parents  commit 94cd7f7

File tree

7,735 files changed

+2248081
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

7,735 files changed

+2248081
-0
lines changed

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/config/cicd-config.properties
5+
.DS_Store
6+
/build
7+
/captures
8+
/tv/release
9+
/openvpn/build
10+
/builds
11+
.externalNativeBuild
12+
/openvpn/build/
13+
/.idea/
14+
/openvpn/.cxx/

.gitlab-ci.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
image: $CI_REGISTRY_IMAGE
2+
3+
variables:
4+
LC_ALL: "en_US.UTF-8"
5+
LANG: "en_US.UTF-8"
6+
GIT_STRATEGY: clone
7+
MOBILE_APK_PATH: "${CI_PROJECT_DIR}/mobile/build/outputs/apk/debug/mobile-debug.apk"
8+
CHANGE_LOG_PATH: "${CI_PROJECT_DIR}/fastlane/metadata/android/en-US/changelogs/"
9+
SIGN_KEY_NAME: "release.jks"
10+
SIGN_KEY_PATH: "${CI_PROJECT_DIR}/${SIGN_KEY_NAME}"
11+
GCM_KEY_PATH: "${CI_PROJECT_DIR}/gcm_key.json"
12+
BUILD_PROPERTIES_PATH: "${CI_PROJECT_DIR}/config/build.properties"
13+
SIGN_PROPERTIES_PATH: "${CI_PROJECT_DIR}/config/sign.properties"
14+
15+
stages:
16+
- Test
17+
- Deploy
18+
19+
SignAndUpload:
20+
stage: Deploy
21+
when: manual
22+
before_script:
23+
- apk -U upgrade
24+
- apk --no-cache add curl
25+
- apk add jq
26+
- authToken=$(curl -X POST https://pki.int.windscribe.com:8200/v1/auth/approle/login -d "role_id=$role_id&secret_id=$secret_id" | jq --raw-output '.auth.client_token')
27+
- secretData=$(curl -H "X-Vault-Token:$authToken" -X GET https://pki.int.windscribe.com:8200/v1/kv/cicd/client-android)
28+
- signProperties=$(echo "$secretData" | jq '.data."sign.properties"')
29+
- echo "$signProperties" | base64 -d -i > $SIGN_PROPERTIES_PATH
30+
- buildProperties=$(echo "$secretData" | jq '.data."build.properties"')
31+
- echo "$buildProperties" | base64 -d -i > $BUILD_PROPERTIES_PATH
32+
- uploadKey=$(echo "$secretData" | jq '.data.android_play_store_upload_key')
33+
- echo "$uploadKey" | base64 -d -i > $GCM_KEY_PATH
34+
- signKey=$(echo "$secretData" | jq '.data.android_play_store_sign_key')
35+
- echo "$signKey" | base64 -d -i > $SIGN_KEY_PATH
36+
- export GRADLE_USER_HOME=$(pwd)/.gradle
37+
- chmod +x ./gradlew
38+
- extras fastlane
39+
- apk --no-cache add swig
40+
- fastlane updateBuildVersion
41+
- export VERSION_CODE=$(grep -E "versionCode" mobile/build.gradle | cut -d '"' -f2
42+
| tr -d '"' | tr -d 'versionCode ')
43+
- export VERSION_NAME=${MAJOR}.${MINOR}.${VERSION_CODE}
44+
- touch ${CHANGE_LOG_PATH}${VERSION_CODE}.txt
45+
after_script:
46+
- rm $SIGN_KEY_PATH
47+
- rm $BUILD_PROPERTIES_PATH
48+
- rm $SIGN_PROPERTIES_PATH
49+
- rm $GCM_KEY_PATH
50+
script:
51+
- fastlane publishToInternal
52+
- echo "VERSION_CODE=$VERSION_CODE" >> build.env
53+
- echo "VERSION_NAME=$VERSION_NAME" >> build.env
54+
artifacts:
55+
reports:
56+
dotenv: build.env
57+
58+
".curl":
59+
stage: Deploy
60+
before_script:
61+
- extras fastlane
62+
- apk --no-cache add curl
63+
64+
Slack:
65+
stage: Deploy
66+
when: on_success
67+
dependencies:
68+
- SignAndUpload
69+
needs:
70+
- SignAndUpload
71+
extends:
72+
- ".curl"
73+
script:
74+
- export TITLE="Available on play store Release $VERSION_NAME"
75+
- export CHANGE_LOG=$(cat $CHANGE_LOG_PATH${VERSION_CODE}.txt)
76+
- export SPACE=$'\n\n'
77+
- export MESSAGE=$TITLE$SPACE$CHANGE_LOG
78+
- export PAYLOAD={\"text\":\"$MESSAGE\"}
79+
- curl --retry 5 -X POST $SLACK_URL --show-error --fail -d "$PAYLOAD"

Gemfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
source "https://rubygems.org"
2+
3+
gem "fastlane"
4+
5+
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
6+
eval_gemfile(plugins_path) if File.exist?(plugins_path)

Gemfile.lock

Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
CFPropertyList (3.0.3)
5+
addressable (2.8.0)
6+
public_suffix (>= 2.0.2, < 5.0)
7+
artifactory (3.0.15)
8+
atomos (0.1.3)
9+
aws-eventstream (1.1.1)
10+
aws-partitions (1.489.0)
11+
aws-sdk-core (3.119.0)
12+
aws-eventstream (~> 1, >= 1.0.2)
13+
aws-partitions (~> 1, >= 1.239.0)
14+
aws-sigv4 (~> 1.1)
15+
jmespath (~> 1.0)
16+
aws-sdk-kms (1.46.0)
17+
aws-sdk-core (~> 3, >= 3.119.0)
18+
aws-sigv4 (~> 1.1)
19+
aws-sdk-s3 (1.99.0)
20+
aws-sdk-core (~> 3, >= 3.119.0)
21+
aws-sdk-kms (~> 1)
22+
aws-sigv4 (~> 1.1)
23+
aws-sigv4 (1.2.4)
24+
aws-eventstream (~> 1, >= 1.0.2)
25+
babosa (1.0.4)
26+
claide (1.0.3)
27+
colored (1.2)
28+
colored2 (3.1.2)
29+
commander (4.6.0)
30+
highline (~> 2.0.0)
31+
declarative (0.0.20)
32+
digest-crc (0.6.4)
33+
rake (>= 12.0.0, < 14.0.0)
34+
domain_name (0.5.20190701)
35+
unf (>= 0.0.5, < 1.0.0)
36+
dotenv (2.7.6)
37+
emoji_regex (3.2.2)
38+
excon (0.85.0)
39+
faraday (1.7.0)
40+
faraday-em_http (~> 1.0)
41+
faraday-em_synchrony (~> 1.0)
42+
faraday-excon (~> 1.1)
43+
faraday-httpclient (~> 1.0.1)
44+
faraday-net_http (~> 1.0)
45+
faraday-net_http_persistent (~> 1.1)
46+
faraday-patron (~> 1.0)
47+
faraday-rack (~> 1.0)
48+
multipart-post (>= 1.2, < 3)
49+
ruby2_keywords (>= 0.0.4)
50+
faraday-cookie_jar (0.0.7)
51+
faraday (>= 0.8.0)
52+
http-cookie (~> 1.0.0)
53+
faraday-em_http (1.0.0)
54+
faraday-em_synchrony (1.0.0)
55+
faraday-excon (1.1.0)
56+
faraday-httpclient (1.0.1)
57+
faraday-net_http (1.0.1)
58+
faraday-net_http_persistent (1.2.0)
59+
faraday-patron (1.0.0)
60+
faraday-rack (1.0.0)
61+
faraday_middleware (1.1.0)
62+
faraday (~> 1.0)
63+
fastimage (2.2.5)
64+
fastlane (2.191.0)
65+
CFPropertyList (>= 2.3, < 4.0.0)
66+
addressable (>= 2.8, < 3.0.0)
67+
artifactory (~> 3.0)
68+
aws-sdk-s3 (~> 1.0)
69+
babosa (>= 1.0.3, < 2.0.0)
70+
bundler (>= 1.12.0, < 3.0.0)
71+
colored
72+
commander (~> 4.6)
73+
dotenv (>= 2.1.1, < 3.0.0)
74+
emoji_regex (>= 0.1, < 4.0)
75+
excon (>= 0.71.0, < 1.0.0)
76+
faraday (~> 1.0)
77+
faraday-cookie_jar (~> 0.0.6)
78+
faraday_middleware (~> 1.0)
79+
fastimage (>= 2.1.0, < 3.0.0)
80+
gh_inspector (>= 1.1.2, < 2.0.0)
81+
google-apis-androidpublisher_v3 (~> 0.3)
82+
google-apis-playcustomapp_v1 (~> 0.1)
83+
google-cloud-storage (~> 1.31)
84+
highline (~> 2.0)
85+
json (< 3.0.0)
86+
jwt (>= 2.1.0, < 3)
87+
mini_magick (>= 4.9.4, < 5.0.0)
88+
multipart-post (~> 2.0.0)
89+
naturally (~> 2.2)
90+
plist (>= 3.1.0, < 4.0.0)
91+
rubyzip (>= 2.0.0, < 3.0.0)
92+
security (= 0.1.3)
93+
simctl (~> 1.6.3)
94+
terminal-notifier (>= 2.0.0, < 3.0.0)
95+
terminal-table (>= 1.4.5, < 2.0.0)
96+
tty-screen (>= 0.6.3, < 1.0.0)
97+
tty-spinner (>= 0.8.0, < 1.0.0)
98+
word_wrap (~> 1.0.0)
99+
xcodeproj (>= 1.13.0, < 2.0.0)
100+
xcpretty (~> 0.3.0)
101+
xcpretty-travis-formatter (>= 0.0.3)
102+
fastlane-plugin-increment_version_code (0.4.3)
103+
gh_inspector (1.1.3)
104+
google-apis-androidpublisher_v3 (0.10.0)
105+
google-apis-core (>= 0.4, < 2.a)
106+
google-apis-core (0.4.1)
107+
addressable (~> 2.5, >= 2.5.1)
108+
googleauth (>= 0.16.2, < 2.a)
109+
httpclient (>= 2.8.1, < 3.a)
110+
mini_mime (~> 1.0)
111+
representable (~> 3.0)
112+
retriable (>= 2.0, < 4.a)
113+
rexml
114+
webrick
115+
google-apis-iamcredentials_v1 (0.6.0)
116+
google-apis-core (>= 0.4, < 2.a)
117+
google-apis-playcustomapp_v1 (0.5.0)
118+
google-apis-core (>= 0.4, < 2.a)
119+
google-apis-storage_v1 (0.6.0)
120+
google-apis-core (>= 0.4, < 2.a)
121+
google-cloud-core (1.6.0)
122+
google-cloud-env (~> 1.0)
123+
google-cloud-errors (~> 1.0)
124+
google-cloud-env (1.5.0)
125+
faraday (>= 0.17.3, < 2.0)
126+
google-cloud-errors (1.1.0)
127+
google-cloud-storage (1.34.1)
128+
addressable (~> 2.5)
129+
digest-crc (~> 0.4)
130+
google-apis-iamcredentials_v1 (~> 0.1)
131+
google-apis-storage_v1 (~> 0.1)
132+
google-cloud-core (~> 1.6)
133+
googleauth (>= 0.16.2, < 2.a)
134+
mini_mime (~> 1.0)
135+
googleauth (0.17.0)
136+
faraday (>= 0.17.3, < 2.0)
137+
jwt (>= 1.4, < 3.0)
138+
memoist (~> 0.16)
139+
multi_json (~> 1.11)
140+
os (>= 0.9, < 2.0)
141+
signet (~> 0.14)
142+
highline (2.0.3)
143+
http-cookie (1.0.4)
144+
domain_name (~> 0.5)
145+
httpclient (2.8.3)
146+
jmespath (1.4.0)
147+
json (2.5.1)
148+
jwt (2.2.3)
149+
memoist (0.16.2)
150+
mini_magick (4.11.0)
151+
mini_mime (1.1.0)
152+
multi_json (1.15.0)
153+
multipart-post (2.0.0)
154+
nanaimo (0.3.0)
155+
naturally (2.2.1)
156+
os (1.1.1)
157+
plist (3.6.0)
158+
public_suffix (4.0.6)
159+
rake (13.0.6)
160+
representable (3.1.1)
161+
declarative (< 0.1.0)
162+
trailblazer-option (>= 0.1.1, < 0.2.0)
163+
uber (< 0.2.0)
164+
retriable (3.1.2)
165+
rexml (3.2.5)
166+
rouge (2.0.7)
167+
ruby2_keywords (0.0.5)
168+
rubyzip (2.3.2)
169+
security (0.1.3)
170+
signet (0.15.0)
171+
addressable (~> 2.3)
172+
faraday (>= 0.17.3, < 2.0)
173+
jwt (>= 1.5, < 3.0)
174+
multi_json (~> 1.10)
175+
simctl (1.6.8)
176+
CFPropertyList
177+
naturally
178+
terminal-notifier (2.0.0)
179+
terminal-table (1.8.0)
180+
unicode-display_width (~> 1.1, >= 1.1.1)
181+
trailblazer-option (0.1.1)
182+
tty-cursor (0.7.1)
183+
tty-screen (0.8.1)
184+
tty-spinner (0.9.3)
185+
tty-cursor (~> 0.7)
186+
uber (0.1.0)
187+
unf (0.1.4)
188+
unf_ext
189+
unf_ext (0.0.7.7)
190+
unicode-display_width (1.7.0)
191+
webrick (1.7.0)
192+
word_wrap (1.0.0)
193+
xcodeproj (1.21.0)
194+
CFPropertyList (>= 2.3.3, < 4.0)
195+
atomos (~> 0.1.3)
196+
claide (>= 1.0.2, < 2.0)
197+
colored2 (~> 3.1)
198+
nanaimo (~> 0.3.0)
199+
rexml (~> 3.2.4)
200+
xcpretty (0.3.0)
201+
rouge (~> 2.0.7)
202+
xcpretty-travis-formatter (1.0.1)
203+
xcpretty (~> 0.2, >= 0.0.7)
204+
205+
PLATFORMS
206+
ruby
207+
208+
DEPENDENCIES
209+
fastlane
210+
fastlane-plugin-increment_version_code
211+
212+
BUNDLED WITH
213+
1.17.2

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# **Windscribe for Android**
2+
3+
# **How to build:**
4+
5+
Install
6+
- SDK
7+
- NDK
8+
- Cmake
9+
- Swig
10+
- Clone this repository and run ./gradlew
11+
assembleDebug or open project in android studio.
12+
13+
# **Strongswan:**
14+
15+
Prebuilt Strongswan binaries are included. If required build Strongswan
16+
using these instructions and replace contents of ./strongswan/libs
17+
https://wiki.strongswan.org/projects/strongswan/wiki/AndroidVPNClientBuild
18+
19+
20+
# **Code style:**
21+
22+
- ktlint with default rules is used for Kotlin.
23+
- Java uses
24+
grandcentrix-AndroidCodeStyle(https://github.com/GCX-HCI/grandcentrix-AndroidCodeStyle)
25+
26+
# **Contributing**
27+
28+
- Stick to ktlint code style.
29+
- Most of the code is written in Java. We are in the process to move
30+
everything to kotlin. Our preferred stack includes kotlin ,
31+
coroutines, Kotlin flows, and MVP. All future changes should respect
32+
it where possible.
33+
- Code is structured into multiple feature modules(Openvpn, Strongswan,
34+
Stealth, Test), base module(Core Logic) and UI Modules(Tv, Mobile).
35+
Avoid circular dependencies between modules. It should always follow
36+
this path: Feature > base > UI
37+
38+
# **Versioning**
39+
40+
format: [major][minor][BuildNumber]
41+
42+
43+
Copyright (c) 2021 Windscribe Limited

base/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

0 commit comments

Comments
 (0)