mirror of
https://github.com/M66B/NetGuard.git
synced 2024-12-22 15:58:25 +00:00
0d61d804d8
Setup: - download dnscrypt-proxy compiled for Android from https://dnscrypt.org/ - copy the following files to /system/xbin using recovery: -rwxr-xr-x root root 224320 2016-02-03 14:44 dnscrypt-proxy -rwxr-xr-x root root 130432 2016-02-03 14:40 hostip -rwxr-xr-x root root 268196 2016-02-03 14:40 libsodium.so - make these files executable (chmod 755) - copy dnscrypt-resolvers.csv to /sdcard//Download/dnscrypt/ - run this script from the shell: export LD_LIBRARY_PATH="/system/xbin" dnscrypt-proxy -a127.0.0.1:5353 --loglevel=7 --resolver-name="dnscrypt.org-fr" --resolvers-list=/sdcard//Download/dnscrypt/dnscrypt-resolvers.csv - make sure you set an IPv4 DNS server in NetGuard - note that Android caches DNS responses for 10 minutes - profit! Refs #272
46 lines
1.4 KiB
Prolog
46 lines
1.4 KiB
Prolog
# Add project specific ProGuard rules here.
|
|
# By default, the flags in this file are appended to flags specified
|
|
# in /home/marcel/Android/Sdk/tools/proguard/proguard-android.txt
|
|
# You can edit the include path and order by changing the proguardFiles
|
|
# directive in build.gradle.
|
|
#
|
|
# For more details, see
|
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
|
|
|
# Add any project specific keep options here:
|
|
|
|
# If your project uses WebView with JS, uncomment the following
|
|
# and specify the fully qualified class name to the JavaScript interface
|
|
# class:
|
|
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
|
# public *;
|
|
#}
|
|
|
|
#Line numbers
|
|
-renamesourcefileattribute SourceFile
|
|
-keepattributes SourceFile,LineNumberTable
|
|
|
|
#NetGuard
|
|
-keepnames class eu.faircode.netguard.** { *; }
|
|
|
|
#JNI
|
|
-keepclasseswithmembernames class * {
|
|
native <methods>;
|
|
}
|
|
|
|
#JNI callbacks
|
|
-keep class eu.faircode.netguard.Packet { *; }
|
|
-keep class eu.faircode.netguard.SinkholeService {
|
|
void nativeExit(java.lang.String);
|
|
void logPacket(eu.faircode.netguard.Packet);
|
|
void dnsResolved(eu.faircode.netguard.ResourceRecord);
|
|
boolean isDomainBlocked(java.lang.String);
|
|
int isAddressAllowed(eu.faircode.netguard.Packet);
|
|
}
|
|
|
|
#Support library
|
|
-keep class android.support.v7.widget.** { *; }
|
|
-dontwarn android.support.v4.**
|
|
|
|
#Picasso
|
|
-dontwarn com.squareup.okhttp.**
|