Skip to content

Commit

Permalink
Merge pull request #32 from greatfire/vitriolix-readme-update
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
vitriolix authored Mar 31, 2023
2 parents 45e5d13 + d695baf commit 6eeeea7
Showing 1 changed file with 13 additions and 29 deletions.
42 changes: 13 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,32 @@
### Wikipedia Android app
# Wikipedia Android app

This repository is a fork of the official [Wikipedia Android app](https://play.google.com/store/apps/details?id=org.wikipedia) that has been integrated with the [Envoy library](https://github.com/greatfire/envoy). There are several additional steps required to build this version of the app:
This repository is a fork of the official [Wikipedia Android app](https://play.google.com/store/apps/details?id=org.wikipedia) that has been integrated with the [Envoy library](https://github.com/greatfire/envoy).

1. Download cronet.aar
Cronet.aar has the same API as Google's cronet (except for one extra method `setEnvoyUrl`).
Download this aar file [cronet-0.0.87.0.4280.66.aar](https://repo1.maven.org/maven2/info/guardianproject/envoy/cronet/0.0.87.0.4280.66/cronet-0.0.87.0.4280.66.aar).
## Building the App

2. To build envoy-$BUILD.aar, follow the instructions in the android directory [here](https://github.com/mnbogner/envoy/tree/envoy-feedback)
Envoy is a bootstrapping library that has adapters for serval popular libraries (OkHttp/Retrofit, Volley, etc).
This version of the wikipedia app relies on broadcasts from the branch of Envoy specified above.
Copy and rename the cronet-0.0.87.0.4280.66.aar file from step one to `android/cronet/cronet-$BUILD.aar`.
$BUILD will be debug or release depending on your build variant.

3. Build IPtProxy from the branch [here](https://gitlab.com/stevenmcdonald/IPtProxy/-/tree/dnstt-client), or download the IPtProxy.aar file.
1. Configuration parameters must be specified to enable Envoy services. If these parameters need to be changed, create a file called credentials.properties in the root project directory. The following options are supported:

4. Copy cronet-$BUILD.aar, envoy-$BUILD.aar, and IPtProxy.aar to `/app/libs`.
* `defProxy`: comma separated list of Envoy URLs to proxies
* `hystCert`: If using a Hysteria server with a self-signed certificate, this is the root certificate PEM file, with newlines replaced with commas

5. Alternately, use the Maven dependencies currently included in `/app/build.gradle`.

6. Several parameters must be specified to support envoy services. If these parameters need to be changed, create a file called credentials.properties in the root project directory. It should have the following contents:
Example:
```
dnsttdomain=<the domain name used for DNSTT>
dnsttkey=<the authentication key for DNSTT>
dnsttpath=<the path to the file on the DNSTT HTTP server that contains additional urls>
dohUrl=<the URL or address of a reachable DNS over HTTP provider>
dotAddr=<the URL or address of a reachable DNS over TCP provider>
hystCert=<comma delimited string representing a certificate in PEM format>
defProxy=<comma separated list of urls>
hystCert=MIIEtjCCAx6gAwIBAgIRAK8VbNIfz8BrRYM1uWDRoGowDQYJKoZIhvcNAQELBQAw,czEeMBwGA1UEChMVbWtjZXJ0IGRldmVsb3BtZW50IENB...
defProxy=https://wiki.example.com/wikipedia/,https://proxy.example.org/wiki/
```

- Only a DNS over HTTP or DNS over TCP provider is required, an empty string should be provided for the other.
- The optional hystCert parameter must be included if you intend to submit any Hysteria URLs. It is a comma delimited string representing a self generated root certificate for the hysteria server in PEM format.
- If the optional defProxy parameter is included, Envoy will attempt to connect to those urls directly first. This can be included to avoid using proxy resources when the target domain is not blocked.

After creating this file, run the following gradle command in the root project directory:
```
./gradlew hideSecretFromPropertiesFile -PpropertiesFileName=credentials.properties -Ppackage=org.greatfire.wikiunblocked
```

7. Specify the `greatfire` flavor when building the application, eiither on the command line or in Android Studio, e.g. `./gradlew assembleGreatfireDebug` or:
More information on Envoy URLs can be found in the [Envoy Documentation](https://github.com/greatfire/envoy/blob/master/android/README.md)

2. Specify the `greatfire` flavor when building the application, eiither on the command line or in Android Studio, e.g. `./gradlew assembleGreatfireDebug` or:

![variant](https://user-images.githubusercontent.com/6945405/173699837-5108cc88-4fe1-4165-9961-1d600e0f681c.png)

8. When running the application, click on the "More" icon a the bottom and look for the "Anonymous" icon. A check indicates that Envoy is running, an X indicates that Envoy is not running. (note that Envoy will not run if a direct connection can be made)
3. When running the application, click on the "More" icon a the bottom and look for the "Anonymous" icon. A check indicates that Envoy is running, an X indicates that Envoy is not running. (note that Envoy will not run if a direct connection can be made)

![screen_mark](https://user-images.githubusercontent.com/6945405/173699843-3c9a50fd-3936-49ef-95f0-eb39dedea2bd.png)

Expand Down

0 comments on commit 6eeeea7

Please sign in to comment.