utopic_tor_onion_proxy 0.4.0 copy "utopic_tor_onion_proxy: ^0.4.0" to clipboard
utopic_tor_onion_proxy: ^0.4.0 copied to clipboard

discontinued
PlatformAndroid

Flutter Plugin for Android, based on Android binary that start Tor Onion Proxy on random local socket.

Tor Onion Proxy For Flutter (Android only) #

What is this? #

This is a Flutter Plugin for Android, based on code from Tor Onion Proxy Library and Tor Android.

Check out the example app included in this repo for reference on how to use this library with sockets.

Currently used Tor version #

This is built using tor 0.4.3.6

All releases

Preview #

123

How do I use this plugin? #

Preparation (for Android App Bundling) #

  1. Add android.bundle.enableUncompressedNativeLibs=false to your android -> gradle.properties file.
org.gradle.jvmargs=-Xmx1536M
...
android.bundle.enableUncompressedNativeLibs=false
copied to clipboard
  1. Add android:extractNativeLibs="true" to your AndroidManifest.xml.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="...">

    ...

    <application
        ...
        android:extractNativeLibs="true">
        ...
    </application>

    ...
</manifest>
copied to clipboard
  1. Add shrink, zip aligned and minify settings into your android/app/build.gradle file.
android {
    compileSdkVersion 29

    defaultConfig {
        ...
        minSdkVersion 16
        targetSdkVersion 29
    }

    buildTypes {
        ...
        release {
            signingConfig signingConfigs.debug
            shrinkResources false
            zipAlignEnabled false
            minifyEnabled false
            ...
        }
    }
}
copied to clipboard
  1. Use --no-shrink param in build appbundle command.
flutter build appbundle --no-shrink ...
copied to clipboard

1. add dependencies into you project pubspec.yaml file #

dependencies:
    utopic_tor_onion_proxy: version_number
copied to clipboard

2. import lib #

import 'package:utopic_tor_onion_proxy/utopic_tor_onion_proxy.dart';
copied to clipboard

3. start Tor Onion Proxy #

try {
    port = await UtopicTorOnionProxy.startTor();
} on PlatformException catch (e) {
    print('Failed to get port. Message: ${e.message}');
}
copied to clipboard

4. check is Tor OP running #

try {
    await UtopicTorOnionProxy.isTorRunning();
} on PlatformException catch (e) {
    print('Failed to get is tor running. Message: ${e.message}');
}
copied to clipboard

5. stop Tor Onion Proxy when done #

try {
    await UtopicTorOnionProxy.stopTor();
} on PlatformException catch (e) {
    print('Failed to stop tor. Message: ${e.message}');
}
copied to clipboard
15
likes
160
points
38
downloads

Publisher

unverified uploader

Weekly Downloads

2024.08.20 - 2025.03.04

Flutter Plugin for Android, based on Android binary that start Tor Onion Proxy on random local socket.

Repository (GitHub)

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on utopic_tor_onion_proxy