Giter Site home page Giter Site logo

fm-labs / androidproxysetter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from manadream/androidproxysetter

0.0 1.0 0.0 200 KB

An android app that sets the proxy settings for a wifi access point by using adb

License: GNU General Public License v3.0

Java 100.00%

androidproxysetter's Introduction

AndroidProxySetter

An android app that sets the proxy settings for a wifi access point by using adb. This DOES NOT require root and will work with any device that has USB debugging on or any emulator (including Genymotion).

This app uses the Android Proxy Library from here

#NOTE This app now works on Android Emulators and Genymotion Emulators on Android Marshmallow 6.0 if you build/install the emulator build variant or APK. The emulator variant is signed with the Android Emulator platform keystore and thus has permissions to modify the wifi access points again. The emulator apk will only work on emulators, not real devices.

Usage

Build (or download) and install the apk to your device, then perform the following actions.

Set proxy by executing this command with extras listed below:

adb shell am start -n tk.elevenk.proxysetter/.MainActivity

Extras:

-e host <host>					# The host ip or address for the proxy
-e port <port>					# The port for the proxy
-e ssid <ssid>					# The SSID of the wifi network to set proxy on
								  (optional, will apply on the first one if empty)
-e key <shared key>				# The password/key for the wifi network
-e bypass <bypass string>		# The bypass string to use for proxy settings
-e reset-wifi <boolean>			# Whether or not to reset the wifi settings. This flag will tell
									the tool to forget all connected networks, make a new
									network config with the SSID and key given, and then
									attempt to connect to the wifi network. If no key is given,
									the wifi network is assumed to be unprotected/open
-e clear <boolean>				# A flag that will clear the proxy settings for the given SSID

Note that for setting a proxy, only host, port and ssid are required. The other extras are optional. Also note that if the reset-wifi flag is used it will "forget" any connected networks in order to reset the connection.

example of setting the proxy on an open wifi network with a bypass string and reset wifi flag set:

adb shell am start -n tk.elevenk.proxysetter/.MainActivity -e host 192.168.56.1 -e port 8080 -e ssid PublicWifi -e bypass test.com,test2.com -e reset-wifi true

example of setting the proxy on a wifi network with a password:

adb shell am start -n tk.elevenk.proxysetter/.MainActivity -e host 192.168.56.1 -e port 8080 -e ssid PrivateWifi -e key Passw0rd

The proxy can be cleared for an SSID by executing the following:

adb shell am start -n tk.elevenk.proxysetter/.MainActivity -e ssid <ssid> -e clear true

example of a .sh script, pre-filling the IP Address, for daily updating of the unique SSID

IPADDRESS=`ifconfig en0 | grep inet | grep -v inet6 | awk '{print $2}'`
adb shell am start -n tk.elevenk.proxysetter/.MainActivity -e host $IPADDRESS -e port 8888

androidproxysetter's People

Contributors

benoitjadinon avatar luispereira avatar manadream avatar tabrotest avatar

Watchers

 avatar

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.