Skip to content

Commit

Permalink
Beginning of work on version 2.0
Browse files Browse the repository at this point in the history
PowerTunnel - Extensible cross-platform proxy server

Bump version to 2.0-alpha
Bump version code to 90

Application ID changed to 'io.github.krlvm.powertunnel.android'

License changed to GNU GPLv3
  • Loading branch information
krlvm committed Aug 19, 2021
1 parent e0978fc commit 7f585f9
Show file tree
Hide file tree
Showing 81 changed files with 1,996 additions and 87 deletions.
14 changes: 14 additions & 0 deletions .gitignore
@@ -0,0 +1,14 @@
# Idea Files
/.idea/
/PowerTunnel-Android.iml

# Gradle Files
/.gradle/

# Build Files
/build/
.externalNativeBuild
.cxx/

# Android Files
/local.properties
17 changes: 0 additions & 17 deletions .project

This file was deleted.

13 changes: 0 additions & 13 deletions .settings/org.eclipse.buildship.core.prefs

This file was deleted.

695 changes: 674 additions & 21 deletions LICENSE

Large diffs are not rendered by default.

35 changes: 25 additions & 10 deletions app/build.gradle
@@ -1,25 +1,42 @@
/*
* This file is part of PowerTunnel-Android.
*
* PowerTunnel-Android is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PowerTunnel-Android 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 PowerTunnel-Android. If not, see <https://www.gnu.org/licenses/>.
*/

apply plugin: 'com.android.application'

android {
compileSdkVersion 30
buildToolsVersion "30.0.3"

defaultConfig {
applicationId "ru.krlvm.powertunnel.android"
applicationId "io.github.krlvm.powertunnel.android"
minSdkVersion 16
targetSdkVersion 30
versionCode 21
versionName "1.9.1-dns"
versionCode 90
versionName "2.0-alpha"
multiDexEnabled true

externalNativeBuild {
cmake {
cppFlags "-std=c++11 -fvisibility=hidden "
cppFlags '-std=c++11 -fvisibility=hidden'
abiFilters 'arm64-v8a'
abiFilters 'armeabi-v7a'
abiFilters 'x86'
abiFilters 'x86_64'
arguments "-DCMAKE_VERBOSE_MAKEFILE=1 -DANDROID_FUNCTION_LEVEL_LINKING=ON"
arguments '-DCMAKE_VERBOSE_MAKEFILE=1 -DANDROID_FUNCTION_LEVEL_LINKING=ON'
}
}

Expand All @@ -28,11 +45,11 @@ android {

externalNativeBuild {
cmake {
path "CMakeLists.txt"
path 'CMakeLists.txt'
}
}

ndkVersion "22.1.7171670"
ndkVersion '22.1.7171670'

buildTypes {
release {
Expand All @@ -48,8 +65,6 @@ android {
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.preference:preference:1.1.1'
implementation('dnsjava:dnsjava:3.4.1') {
Expand All @@ -60,7 +75,7 @@ dependencies {
exclude group: 'dnsjava', module: 'dnsjava'
}
implementation 'org.bouncycastle:bcpkix-jdk15on:1.65' // LittleProxy-MITM dependency
//implementation 'org.littleshoot:littleproxy:1.1.2'
implementation 'org.littleshoot:littleproxy:1.1.2'

androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
Expand Down
Binary file removed app/libs/littleproxy-1.1.2-littleproxy-shade.jar
Binary file not shown.
@@ -1,5 +1,24 @@
/*
* This file is part of PowerTunnel-Android.
*
* PowerTunnel-Android is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PowerTunnel-Android 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 PowerTunnel-Android. If not, see <https://www.gnu.org/licenses/>.
*/

package ru.krlvm.powertunnel.android;

import static org.junit.Assert.assertEquals;

import android.content.Context;

import androidx.test.ext.junit.runners.AndroidJUnit4;
Expand All @@ -8,8 +27,6 @@
import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.assertEquals;

/**
* Instrumented test, which will execute on an Android device.
*
Expand Down
17 changes: 17 additions & 0 deletions app/src/main/AndroidManifest.xml
@@ -1,4 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ This file is part of PowerTunnel-Android.
~
~ PowerTunnel-Android is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ PowerTunnel-Android 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 PowerTunnel-Android. If not, see <https://www.gnu.org/licenses/>.
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ru.krlvm.powertunnel.android">

Expand Down
17 changes: 17 additions & 0 deletions app/src/main/java/io/netty/handler/codec/http/HttpMethod.java
@@ -1,3 +1,20 @@
/*
* This file is part of PowerTunnel-Android.
*
* PowerTunnel-Android is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PowerTunnel-Android 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 PowerTunnel-Android. If not, see <https://www.gnu.org/licenses/>.
*/

/*
* Copyright 2012 The Netty Project
*
Expand Down
29 changes: 23 additions & 6 deletions app/src/main/java/org/littleshoot/proxy/impl/ProxyConnection.java
@@ -1,3 +1,20 @@
/*
* This file is part of PowerTunnel-Android.
*
* PowerTunnel-Android is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PowerTunnel-Android 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 PowerTunnel-Android. If not, see <https://www.gnu.org/licenses/>.
*/

/******************************************************************************
Apache License
Version 2.0, January 2004
Expand Down Expand Up @@ -203,6 +220,12 @@ file or class name and description of purpose be included on the
******************************************************************************/
package org.littleshoot.proxy.impl;

import static org.littleshoot.proxy.impl.ConnectionState.AWAITING_CHUNK;
import static org.littleshoot.proxy.impl.ConnectionState.AWAITING_INITIAL;
import static org.littleshoot.proxy.impl.ConnectionState.DISCONNECTED;
import static org.littleshoot.proxy.impl.ConnectionState.HANDSHAKING;
import static org.littleshoot.proxy.impl.ConnectionState.NEGOTIATING_CONNECT;

import android.util.Log;

import org.littleshoot.proxy.HttpFilters;
Expand Down Expand Up @@ -235,12 +258,6 @@ file or class name and description of purpose be included on the
import ru.krlvm.powertunnel.PowerTunnel;
import ru.krlvm.powertunnel.utilities.PacketUtility;

import static org.littleshoot.proxy.impl.ConnectionState.AWAITING_CHUNK;
import static org.littleshoot.proxy.impl.ConnectionState.AWAITING_INITIAL;
import static org.littleshoot.proxy.impl.ConnectionState.DISCONNECTED;
import static org.littleshoot.proxy.impl.ConnectionState.HANDSHAKING;
import static org.littleshoot.proxy.impl.ConnectionState.NEGOTIATING_CONNECT;

/**
* <p>
* Base class for objects that represent a connection to/from our proxy.
Expand Down
@@ -1,3 +1,20 @@
/*
* This file is part of PowerTunnel-Android.
*
* PowerTunnel-Android is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PowerTunnel-Android 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 PowerTunnel-Android. If not, see <https://www.gnu.org/licenses/>.
*/

/******************************************************************************
Apache License
Version 2.0, January 2004
Expand Down Expand Up @@ -203,6 +220,13 @@ file or class name and description of purpose be included on the
******************************************************************************/
package org.littleshoot.proxy.impl;

import static org.littleshoot.proxy.impl.ConnectionState.AWAITING_CHUNK;
import static org.littleshoot.proxy.impl.ConnectionState.AWAITING_CONNECT_OK;
import static org.littleshoot.proxy.impl.ConnectionState.AWAITING_INITIAL;
import static org.littleshoot.proxy.impl.ConnectionState.CONNECTING;
import static org.littleshoot.proxy.impl.ConnectionState.DISCONNECTED;
import static org.littleshoot.proxy.impl.ConnectionState.HANDSHAKING;

import android.util.Log;

import com.google.common.net.HostAndPort;
Expand Down Expand Up @@ -262,13 +286,6 @@ file or class name and description of purpose be included on the
import ru.krlvm.powertunnel.PowerTunnel;
import ru.krlvm.powertunnel.enums.SNITrick;

import static org.littleshoot.proxy.impl.ConnectionState.AWAITING_CHUNK;
import static org.littleshoot.proxy.impl.ConnectionState.AWAITING_CONNECT_OK;
import static org.littleshoot.proxy.impl.ConnectionState.AWAITING_INITIAL;
import static org.littleshoot.proxy.impl.ConnectionState.CONNECTING;
import static org.littleshoot.proxy.impl.ConnectionState.DISCONNECTED;
import static org.littleshoot.proxy.impl.ConnectionState.HANDSHAKING;

/**
* <p>
* Represents a connection from our proxy to a server on the web.
Expand Down
17 changes: 17 additions & 0 deletions app/src/main/java/org/littleshoot/proxy/mitm/Authority.java
@@ -1,3 +1,20 @@
/*
* This file is part of PowerTunnel-Android.
*
* PowerTunnel-Android is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PowerTunnel-Android 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 PowerTunnel-Android. If not, see <https://www.gnu.org/licenses/>.
*/

/*
*
* Apache License
Expand Down
@@ -1,3 +1,20 @@
/*
* This file is part of PowerTunnel-Android.
*
* PowerTunnel-Android is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PowerTunnel-Android 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 PowerTunnel-Android. If not, see <https://www.gnu.org/licenses/>.
*/

/*
*
* Apache License
Expand Down Expand Up @@ -282,7 +299,7 @@ public class BouncyCastleSslEngineSource implements SslEngineSource {

private PrivateKey caPrivKey;

private Cache<String, SSLContext> serverSSLContexts;
private final Cache<String, SSLContext> serverSSLContexts;

/**
* Creates a SSL engine source create a Certificate Authority if needed and
Expand Down
@@ -1,3 +1,20 @@
/*
* This file is part of PowerTunnel-Android.
*
* PowerTunnel-Android is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PowerTunnel-Android 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 PowerTunnel-Android. If not, see <https://www.gnu.org/licenses/>.
*/

/*
*
* Apache License
Expand Down

0 comments on commit 7f585f9

Please sign in to comment.