eighthave / envoy

C and Java Library derived from Chromium Cronet which can be used to make Android apps resistant to censorship

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C and Java Library derived from chromium cronet.

We are looking for developers to improve envoy together, please contact support@greatfire.org.

我们正在寻找开发者一同改进envoy,详情联系support@greatfire.org

Technical details are explained here.

  • for pure c and java cronet library, see directory native/.
  • for the android library, import directory android/ from android studio or build with gradle from the command line.

Please note that this project is unrelated to the Envoy Proxy project.

ENVOY Developer Guide

Welcome to the envoy developer guide. This document will teach you how to build Android apps using APIs in the Android framework and other libraries.

Protocols which Envoy supports

  • HTTPS: proxy all traffic through regular web servers (or use Content Delivery Network(s) as middleboxes).
  • Shadowsocks: use the socks5 proxy provided by shadowsocks client/server.

All you need is to call Cronet_EngineParams_envoy_url_set(engine_params, "ENVOY_URL") where ENVOY_URL is your HTTPS URL or shadowsocks' socks5 proxy address.

Visit native/README.md and android/README.md for more technical details.

What is Cronet

Cronet is the networking stack of Chromium put into a library for use on mobile. This is the same networking stack that is used in the Chrome browser by over a billion people. It offers an easy-to-use, high performance, standards-compliant, and secure way to perform HTTP requests.. On Android, Cronet offers its own Java asynchronous API as well as support for the java.net.HttpURLConnection API. Cronet takes advantage of multiple technologies that reduce the latency and increase the throughput of the network requests that your app needs to work.

All About Envoy

Envoy is built on top of cronet which offers support for OkHttp, Volley, WebView, Cronet basic and java.net.HttpURLConnection.

We have built robust, unique, censorship-defeating tools and services that are having a big impact in some country where some website and their content are censored

This tool is derived from Cronet.

Cronet is the networking stack of Chromium put into a library for use on mobile. This is the same networking stack that is used in chrome browser by over a billion user.

So it will work with all request type which is mostly used in development. It is used to make app which is resistant to censorship

What is Envoy And Where It can be used

As name suggest envoy is a representative or messenger

Like it our tool will work as messenger or representative for certain website or web content access without worrying of censorship as our tool will work as representative.

As earlier said it can be used to make app resistant to censorship.

Also it can be used as proxy tool communication for secure web access to your app. E.g. if facebook and YouTube is not accessible to country like china and you want to make app which shows facebook content or YouTube content then you can use this tool to show your content.

It can be used as partial content showing or can be used to make whole server communication with this tool depending upon your requirement.

Also if you don't want to use envoy proxy then also you can use this tool to get benefit of cronet library hassle-free. And in future if you want then you just have to simply define envoy url to bypass censorship.

App examples

Go to patches for each application in directory apps to learn how to integrate envoy library, or test with our demo apk files.

  1. Wikipedia: ./gradlew clean assembleDevDebug, demo apk, and the migration guide.
  2. DuckDuckGo: ./gradlew assembleDebug, demo apk
  3. WordPress:
    1. WordPress-FluxC-Android: echo "sdk.dir=YOUR_SDK_DIR" > local.properties && ./gradlew fluxc:build
    2. WordPress-Android: set wp.oauth.app_id and wp.oauth.app_secret, then cp gradle.properties-example gradle.properties && ./gradlew assembleVanillaDebug

You can submit more apps with git -c diff.noprefix=false format-patch --numbered --binary HEAD~.

Release steps

  1. Rebuild cronet-debug.aar and cronet-release.aar: run ./native/build_cronet.sh debug and ./native/build_cronet.sh release
  2. Rebuild envoy: ./android/build-envoy.sh
  3. Rebuild demo apps: ./apps/build-apps.sh

Building everything from source requires around 100GB of disk space and time. The whole release process is also scripted in the .gitlab-ci.yml. This can also be run using Vagrant by running vagrant up --provision --no-destroy-on-error.

History

  1. Google to reimplement curl in libcrurl | daniel.haxx.se, Simplified Chinese
  2. 973603 - [Cronet] libcurl wrapper library using Cronet API - chromium

About

C and Java Library derived from Chromium Cronet which can be used to make Android apps resistant to censorship

License:Apache License 2.0


Languages

Language:Kotlin 39.5%Language:C++ 34.0%Language:Java 19.7%Language:Shell 6.7%Language:Makefile 0.1%