Coder Social home page Coder Social logo

vaginessa / easyproxy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vijayrawatsan/easyproxy

0.0 1.0 0.0 95 KB

Easy Http Proxy for android apps. For those days when you want proxy for your app only. Supports different proxy for different urls.

Java 100.00%

easyproxy's Introduction

Easy Proxy For Android & Java

Easy Proxy for android & java apps. For those days when you want proxy for your app only. Supports different proxy for different urls.

We all know how painful is :

Going to wifi -> Long click your wifi -> Modify network -> Enter IP and port

Later forgetting that you have done this setting and thinking why the fuck my internet is not working. Why God why???

Features

  • Setup single proxy for all the urls.
  • Setup single proxy for all urls except some exclusion rules.
  • Setup single proxy for all urls except some exclusion rules & some separate proxy rules for some url patterns.
  • Library agnostic. You can use any library you want Volley, OkHttp, Ion or any other http library.

Example Usage

Initialize EasyProxy in you application class like below.

package com.vijayrawatsan.easyproxy.demo;

import android.app.Application;
import com.vijayrawatsan.easyproxy.EasyProxy;
import com.vijayrawatsan.easyproxy.ProxyInfo;

public class EasyProxyDemoApplication extends Application {
    @Override
    public void onCreate() {
        //This will set 10.125.24.28:8080 as proxy for all the urls from this app.
        EasyProxy.init(new ProxyInfo("10.125.24.28", 8080));
        super.onCreate();
    }
}

or

boolean isLogEnabled = true;
Set<String> exclusions = new HashSet<>(Arrays.asList("^.*google*$"));
//This will set 10.125.24.28:8080 as proxy for all the urls from this app.
//Except any url that contains "google" in it.
EasyProxy.init(new ProxyInfo("10.125.24.28", 8080), exclusions, isLogEnabled);

or

Set<String> exclusions = new HashSet<>(Arrays.asList("^.*google.*$"));
Set<UrlProxyInfo> inclusions = new HashSet<>(Arrays.asList( new UrlProxyInfo( "^.*yahoo.*$", new ProxyInfo("10.65.65.87", 8080))));
//This will set 10.125.24.28:8080 as proxy for all the urls from this app.
//Except any url that contains "google" in it.
//And for any url containing "yahoo" it will set proxy to 10.65.65.87:8080
EasyProxy.init(new ProxyInfo("10.125.24.28", 8080), exclusions, inclusions, true);

Including in your project

gradle:

Step 1. Add the JitPack repository to your build file

repositories {
    maven {
        url "https://jitpack.io"
    }
}

Step 2. Add the dependency in the form

dependencies {
    compile 'com.github.vijayrawatsan:easyproxy:1.0'
}

maven:

Step 1. Add the JitPack repository to your build file

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>

Step 2. Add the dependency in the form

<dependency>
    <groupId>com.github.vijayrawatsan</groupId>
    <artifactId>easyproxy</artifactId>
    <version>1.0</version>
</dependency>

Contributing

Contributions welcome via Github pull requests.

easyproxy's People

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.