Skip to content

Commit e7af712

Browse files
authored
✨ feat(android): upgrade ovpn core lib (#17)
* 🐳 chore(android): add ics-openvpn * 🐳 chore(android): move ics-openvpn to v0.7.33 * 🐳 chore(android): rm old ovpn core lib * 🐳 chore(android): add scripts to build vpn lib * 🐳 chore(android): add vpn lib * 🐳 chore(android): create and apply patch for ovpn * 🐳 chore(package.json): add npm scripts * ✨ feat(android): support latest ovpn core * 🐳 chore(android): update build.gradle * 🐳 chore(android): support RN 0.63 ~ 0.68 * 🐳 chore: update example
1 parent 9223476 commit e7af712

File tree

392 files changed

+21823
-2175
lines changed

Some content is hidden

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

392 files changed

+21823
-2175
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "ics-openvpn"]
2+
path = ics-openvpn
3+
url = https://github.com/schwabe/ics-openvpn.git

android/build.gradle

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,22 @@
1919

2020
apply plugin: 'com.android.library'
2121

22-
def DEFAULT_COMPILE_SDK_VERSION = 26
23-
def DEFAULT_BUILD_TOOLS_VERSION = '26.0.2'
22+
def DEFAULT_COMPILE_SDK_VERSION = 30
23+
def DEFAULT_BUILD_TOOLS_VERSION = '30.0.2'
2424
def DEFAULT_MIN_SDK_VERSION = 16
25-
def DEFAULT_TARGET_SDK_VERSION = 26
25+
def DEFAULT_TARGET_SDK_VERSION = 30
2626

2727
def safeExtGet(prop, fallback) {
2828
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
2929
}
3030

3131
buildscript {
3232
repositories {
33-
maven {
34-
url 'https://maven.google.com/'
35-
name 'Google'
36-
}
37-
jcenter()
33+
google()
34+
mavenCentral()
3835
}
3936
dependencies {
40-
classpath 'com.android.tools.build:gradle:3.1.2'
37+
classpath 'com.android.tools.build:gradle:4.2.1'
4138
}
4239
}
4340

@@ -56,15 +53,17 @@ android {
5653
}
5754

5855
repositories {
59-
mavenLocal()
60-
jcenter()
6156
maven {
6257
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
6358
url "$rootDir/../node_modules/react-native/android"
6459
}
60+
google()
61+
mavenLocal()
62+
mavenCentral()
6563
}
6664

6765
dependencies {
68-
compile "com.facebook.react:react-native:${safeExtGet('reactNative', '+')}"
69-
compile fileTree( dir: "libs", includes: ['*.jar'] )
66+
implementation "com.facebook.react:react-native:${safeExtGet('reactNative', '+')}"
67+
implementation fileTree(dir: "libs", includes: ['*.jar'])
68+
implementation project(path: ':vpnLib')
7069
}

android/src/main/AndroidManifest.xml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.norcod.rnovpn">
2+
xmlns:tools="http://schemas.android.com/tools"
3+
package="com.norcod.rnovpn">
34

4-
<uses-permission android:name="com.android.vending.BILLING" />
5+
<uses-permission android:name="android.permission.INTERNET" />
56
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
6-
<uses-permission android:name="android.permission.WAKE_LOCK" />
77
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
88

9-
<application>
9+
<application
10+
android:extractNativeLibs="true"
11+
tools:ignore="UnusedAttribute">
12+
<meta-data
13+
android:name="android.content.APP_RESTRICTIONS"
14+
android:resource="@xml/app_restrictions" />
1015
<service
1116
android:name="de.blinkt.openvpn.core.OpenVPNService"
17+
android:exported="false"
1218
android:permission="android.permission.BIND_VPN_SERVICE">
1319
<intent-filter>
1420
<action android:name="android.net.VpnService" />
-5.55 KB
Binary file not shown.
-5.27 KB
Binary file not shown.
-5.31 KB
Binary file not shown.
-5.92 KB
Binary file not shown.
-5.55 KB
Binary file not shown.
-5.27 KB
Binary file not shown.
-5.31 KB
Binary file not shown.

0 commit comments

Comments
 (0)