Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ captures/

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
.cxx/

# Google Services (e.g. APIs or Firebase)
# google-services.json
Expand Down Expand Up @@ -92,4 +93,4 @@ keystore.properties
baselineProfiles/
TASKER_PLUGIN_DEVELOPMENT_GUIDE.md
app/src/main/jniLibs/
.devcontainer/devcontainer.json
.devcontainer/devcontainer.json
12 changes: 12 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ android {
buildConfigField("String", "FrpsFileName", "\"libfrps.so\"")
buildConfigField("String", "FrpcConfigFileName", "\"frpc.toml\"")
buildConfigField("String", "FrpsConfigFileName", "\"frps.toml\"")

externalNativeBuild {
cmake {
cppFlags += listOf("-std=c++20", "-Wall", "-Wextra")
}
}
}

buildTypes {
Expand Down Expand Up @@ -174,6 +180,12 @@ android {
}
namespace = "io.github.acedroidx.frp"

externalNativeBuild {
cmake {
path = file("src/main/cpp/CMakeLists.txt")
}
}

}

androidComponents {
Expand Down
14 changes: 13 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,17 @@
android:value="explanation_for_special_use" />
</service>

<service
android:name=".HttpProxyService"
android:enabled="true"
android:exported="false"
android:foregroundServiceType="specialUse"
android:stopWithTask="false">
<property
android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
android:value="Runs the user-enabled HTTP and HTTPS CONNECT proxy server" />
</service>

<activity
android:name=".MainActivity"
android:exported="true"
Expand All @@ -87,6 +98,7 @@
android:exported="true">
<intent-filter android:priority="1000">
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />

<category android:name="android.intent.category.HOME" />
</intent-filter>
Expand Down Expand Up @@ -128,4 +140,4 @@
android:grantUriPermissions="true" />
</application>

</manifest>
</manifest>
8 changes: 8 additions & 0 deletions app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
cmake_minimum_required(VERSION 3.22.1)

project(http_proxy LANGUAGES CXX)

add_library(http_proxy SHARED http_proxy.cpp)

target_compile_features(http_proxy PRIVATE cxx_std_20)
target_link_libraries(http_proxy PRIVATE log)
Loading