Giter Site home page Giter Site logo

dnsproxy2's Introduction

dnsproxy2 - a replacement DNS proxy for Android 4.3+

This currently allows the user to manually override the DNS server IP,
and it sets the correct UID on outbound requests so they can be filtered
via iptables / AFWall+ / DroidWall / etc.


Requirements:

Root access

Write access to /system

/etc/init.d (if you want to start it on boot)


Build instructions:

1) Install NDK r8e under /opt/android-ndk

2) Run /opt/android-ndk/ndk-build

3) Binaries are under libs/.  Most devices will use libs/armeabi-v7a/


Installation instructions:

Make sure adb is in your PATH and functional, then on your PC host run:

bash misc/install.sh

This installs /system/xbin/dnsproxy2 and /etc/init.d/20dnsproxy2

To uninstall, remount /system read-write and delete those files.

dnsproxy2's People

Contributors

cernekee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dnsproxy2's Issues

use ndc to set dns

on android 4.3 and 4.4 run command bellow:
ndc resolver setifdns wlan0 "" 208.67.222.222 208.67.220.220

res_query: send error

DNS resolution works correctly when calling dnsproxy2 -l directly:

;; res_setoptions("debug", "env")..
;;	debug
;; res_nquerydomain(google.fr, <Nil>, 1, 1)
;; res_query(google.fr, 1, 1)
;; res_nmkquery(QUERY, google.fr, IN, A)
;; res_send()
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27940
;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;;	google.fr, type = A, class = IN
;; Querying server (# 1) address = 8.8.8.8
;; new DG socket
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27940
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;;	google.fr, type = A, class = IN
google.fr.		4m59s IN A	216.58.209.227
216.58.209.227

But if fails when used in proxy mode:

;; res_nquerydomain(google.fr, <Nil>, 1, 1)
;; res_query(google.fr, 1, 1)
;; res_nmkquery(QUERY, google.fr, IN, A)
;; res_send()
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36674
;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;;	google.fr, type = A, class = IN
;; res_query: send error

undefined reference errors

Hello,
I get these errors when running ndk-build:

[armeabi-v7a] Executable     : dnsproxy2
jni/resolv/res_send.c:948: error: undefined reference to '__evNowTime'
jni/resolv/res_send.c:949: error: undefined reference to '__evConsTime'
jni/resolv/res_send.c:950: error: undefined reference to '__evAddTime'
jni/resolv/res_send.c:821: error: undefined reference to '__evConsIovec'
jni/resolv/res_send.c:823: error: undefined reference to '__evConsIovec'
jni/resolv/res_send.c:1121: error: undefined reference to '__evNowTime'
jni/resolv/res_send.c:1122: error: undefined reference to '__evConsTime'
jni/resolv/res_send.c:1123: error: undefined reference to '__evAddTime'
jni/resolv/res_send.c:982: error: undefined reference to '__evNowTime'
jni/resolv/res_send.c:991: error: undefined reference to '__evCmpTime'
jni/resolv/res_send.c:992: error: undefined reference to '__evSubTime'
jni/resolv/res_send.c:994: error: undefined reference to '__evConsTime'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
/home/pierre/lib/android-ndk/build/core/build-binary.mk:715: recipe for target 'obj/local/armeabi-v7a/dnsproxy2' failed
make: *** [obj/local/armeabi-v7a/dnsproxy2] Error 1

Binary files would be useful to common people

Really great project, i was just wondering if you could put a dist/ folder with the latest built commit.
Would be very useful for people experimenting with the binary, or someone that wants to create a GUI for it!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.