Skip to content

Commit

Permalink
upgrade gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
isayan committed Jul 10, 2021
1 parent d68818a commit 06dca05
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
7 changes: 5 additions & 2 deletions android_app/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ android {
compileSdkVersion 29
buildToolsVersion "29.0.3"

sourceCompatibility = '11' // -source
targetCompatibility = '11' // -target

defaultConfig {
applicationId "tun.proxy"
minSdkVersion 21
targetSdkVersion 29
versionCode 100250
versionCode 100260
versionName VERSION_NAME
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild {
Expand Down Expand Up @@ -47,7 +50,7 @@ android {
}
}

ndkVersion = '21.0.6113669'
ndkVersion = '22.1.7171670'

applicationVariants.all { variant ->
if (variant.buildType.name.equals("release")) {
Expand Down
Binary file removed android_app/app/release/app-release.aab
Binary file not shown.
6 changes: 2 additions & 4 deletions android_app/app/src/main/cpp/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,8 +504,6 @@ jboolean handle_tcp(const struct arguments *args,
int uid,
const int epoll_fd) {



// Get headers
const uint8_t version = (*pkt) >> 4;
const struct iphdr *ip4 = (struct iphdr *) pkt;
Expand Down Expand Up @@ -591,7 +589,7 @@ jboolean handle_tcp(const struct arguments *args,
uint16_t mss = get_default_mss(version);
uint8_t ws = 0;
int optlen = tcpoptlen;
uint8_t *options = tcpoptions;
const uint8_t * options = tcpoptions;
while (optlen > 0) {
uint8_t kind = *options;
uint8_t len = *(options + 1);
Expand Down Expand Up @@ -732,7 +730,7 @@ jboolean handle_tcp(const struct arguments *args,
if (cur->tcp.connect_sent == TCP_CONNECT_NOT_SENT) {
if (len > 0) {
char buffer[512];
sprintf(buffer, "CONNECT %s:443 HTTP/1.0\r\n\r\n", cur->tcp.hostname);
sprintf(buffer, "CONNECT %s:%d HTTP/1.0\r\n\r\n", cur->tcp.hostname, rport);

ssize_t sent = send(cur->socket, buffer, strlen(buffer), MSG_NOSIGNAL);
if (sent < 0) {
Expand Down
10 changes: 6 additions & 4 deletions android_app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

repositories {
google()
jcenter()
mavenCentral()

}


dependencies {
classpath 'com.android.tools.build:gradle:3.6.2'
classpath 'com.android.tools.build:gradle:4.2.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -18,7 +20,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()

}

Expand Down
2 changes: 1 addition & 1 deletion android_app/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ android.useAndroidX=true
android.enableJetifier=true

APP_NAME=TunProxy
VERSION_NAME=1.2.5
VERSION_NAME=1.2.6

productKeyStore=../changeit.jks
productKeyAlias=key0
Expand Down
2 changes: 1 addition & 1 deletion android_app/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip

0 comments on commit 06dca05

Please sign in to comment.