Skip to content

Commit 06dca05

Browse files
author
isayan
committed
upgrade gradle
1 parent d68818a commit 06dca05

File tree

6 files changed

+15
-12
lines changed

6 files changed

+15
-12
lines changed

android_app/app/build.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ android {
44
compileSdkVersion 29
55
buildToolsVersion "29.0.3"
66

7+
sourceCompatibility = '11' // -source
8+
targetCompatibility = '11' // -target
9+
710
defaultConfig {
811
applicationId "tun.proxy"
912
minSdkVersion 21
1013
targetSdkVersion 29
11-
versionCode 100250
14+
versionCode 100260
1215
versionName VERSION_NAME
1316
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1417
externalNativeBuild {
@@ -47,7 +50,7 @@ android {
4750
}
4851
}
4952

50-
ndkVersion = '21.0.6113669'
53+
ndkVersion = '22.1.7171670'
5154

5255
applicationVariants.all { variant ->
5356
if (variant.buildType.name.equals("release")) {
-2.06 MB
Binary file not shown.

android_app/app/src/main/cpp/tcp.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -504,8 +504,6 @@ jboolean handle_tcp(const struct arguments *args,
504504
int uid,
505505
const int epoll_fd) {
506506

507-
508-
509507
// Get headers
510508
const uint8_t version = (*pkt) >> 4;
511509
const struct iphdr *ip4 = (struct iphdr *) pkt;
@@ -591,7 +589,7 @@ jboolean handle_tcp(const struct arguments *args,
591589
uint16_t mss = get_default_mss(version);
592590
uint8_t ws = 0;
593591
int optlen = tcpoptlen;
594-
uint8_t *options = tcpoptions;
592+
const uint8_t * options = tcpoptions;
595593
while (optlen > 0) {
596594
uint8_t kind = *options;
597595
uint8_t len = *(options + 1);
@@ -732,7 +730,7 @@ jboolean handle_tcp(const struct arguments *args,
732730
if (cur->tcp.connect_sent == TCP_CONNECT_NOT_SENT) {
733731
if (len > 0) {
734732
char buffer[512];
735-
sprintf(buffer, "CONNECT %s:443 HTTP/1.0\r\n\r\n", cur->tcp.hostname);
733+
sprintf(buffer, "CONNECT %s:%d HTTP/1.0\r\n\r\n", cur->tcp.hostname, rport);
736734

737735
ssize_t sent = send(cur->socket, buffer, strlen(buffer), MSG_NOSIGNAL);
738736
if (sent < 0) {

android_app/build.gradle

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
4+
55
repositories {
66
google()
7-
jcenter()
7+
mavenCentral()
88

99
}
10+
11+
1012
dependencies {
11-
classpath 'com.android.tools.build:gradle:3.6.2'
13+
classpath 'com.android.tools.build:gradle:4.2.2'
1214

1315
// NOTE: Do not place your application dependencies here; they belong
1416
// in the individual module build.gradle files
@@ -18,7 +20,7 @@ buildscript {
1820
allprojects {
1921
repositories {
2022
google()
21-
jcenter()
23+
mavenCentral()
2224

2325
}
2426

android_app/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ android.useAndroidX=true
1919
android.enableJetifier=true
2020

2121
APP_NAME=TunProxy
22-
VERSION_NAME=1.2.5
22+
VERSION_NAME=1.2.6
2323

2424
productKeyStore=../changeit.jks
2525
productKeyAlias=key0

android_app/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip

0 commit comments

Comments
 (0)