Giter Site home page Giter Site logo

proxycat's Introduction

proxycat

proxycat makes it easy to transparently proxy a specific Android application's TCP traffic.

proxycat is a largely a wrapper around iptables and has to be run on an Android device with root privileges. proxycat does not take into consideration existing iptables rules on the device and might conflict with or clobber existing rules. Use with caution.

iptables rules are inserted into the PROXYCAT chain in the nat table. Run iptables -t nat -L on the Android device to view the inserted rules.

Usage

➜ ./proxycat
proxycat 0.1.0
Terry Chia <[email protected]>


USAGE:
    proxycat [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

SUBCOMMANDS:
    add      Add proxy rule.
    clean    Remove iptable NAT rules.
    help     Prints this message or the help of the given subcommand(s)

proxycat add

This subcommand is used to add a new iptables rule and requires the package name and proxy address as arguments.

➜ ./proxycat add --help
proxycat-add
Add proxy rule.

USAGE:
    proxycat add <PACKAGE> <PROXY>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

ARGS:
    <PACKAGE>    Android app to proxy.
    <PROXY>      Proxy address to use.

proxycat clean

The clean subcommand removes all nat rules from the device.

How It Works

iptables rules can be configured to apply to packets created by a specific user with the --uid-owner option.

This can be used to create iptables rules that apply to a specific application as every Android app is assigned a unique UID at install time. This UID is stored in the /data/system/packages.list file which is parsed by proxycat.

nat rules are then added to transparently proxy traffic to the specified proxy address.

Building

proxycat can be compiled into a static binary with the following command:

➜ cargo build --target x86_64-unknown-linux-musl --release

If a binary for another architecture is required, proxycat can be cross-compiled using cross.

➜ cross build --target arm-unknown-linux-musleabi --release

proxycat's People

Contributors

ayrx avatar wpandaw 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.