From bf006c15b9a54b02e77368d9f63dabfbb8139072 Mon Sep 17 00:00:00 2001 From: Vinicius Fortuna Date: Wed, 25 Sep 2024 07:50:27 -0600 Subject: [PATCH 1/9] fix(mobileproxy): add diagram to README --- x/mobileproxy/README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/x/mobileproxy/README.md b/x/mobileproxy/README.md index 16ae5418..0de7a099 100644 --- a/x/mobileproxy/README.md +++ b/x/mobileproxy/README.md @@ -1,7 +1,15 @@ -# Mobileproxy: Local Proxy Library for Mobile Apps +# MobileProxy: Local Proxy Library for Mobile Apps This package enables the use Go Mobile to generate a mobile library to run a local proxy and configure your app networking libraries. +**Content app without MobileProxy:** +![image](https://github.com/user-attachments/assets/d96b209c-2198-4382-8bba-12efd8f75dbb) + +**Content app with MobileProxy:** +![image](https://github.com/user-attachments/assets/8b07c0b6-7948-4b61-a6b2-fe2fafdb1a33) + + + ## Build the Go Mobile binaries with [`go build`](https://pkg.go.dev/cmd/go#hdr-Compile_packages_and_dependencies) From the `x/` directory: From 96df2278735dedafbcde68ad6e760a109bdfbd24 Mon Sep 17 00:00:00 2001 From: Vinicius Fortuna Date: Wed, 25 Sep 2024 07:52:10 -0600 Subject: [PATCH 2/9] Update README.md --- x/mobileproxy/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/x/mobileproxy/README.md b/x/mobileproxy/README.md index 0de7a099..35673c89 100644 --- a/x/mobileproxy/README.md +++ b/x/mobileproxy/README.md @@ -8,8 +8,6 @@ This package enables the use Go Mobile to generate a mobile library to run a loc **Content app with MobileProxy:** ![image](https://github.com/user-attachments/assets/8b07c0b6-7948-4b61-a6b2-fe2fafdb1a33) - - ## Build the Go Mobile binaries with [`go build`](https://pkg.go.dev/cmd/go#hdr-Compile_packages_and_dependencies) From the `x/` directory: From bcb4929f149991e360e4a3c8a7bbb416a9db8bfa Mon Sep 17 00:00:00 2001 From: Vinicius Fortuna Date: Wed, 25 Sep 2024 08:02:10 -0600 Subject: [PATCH 3/9] Update README.md --- x/mobileproxy/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/x/mobileproxy/README.md b/x/mobileproxy/README.md index 35673c89..b3a9a4c9 100644 --- a/x/mobileproxy/README.md +++ b/x/mobileproxy/README.md @@ -8,6 +8,12 @@ This package enables the use Go Mobile to generate a mobile library to run a loc **Content app with MobileProxy:** ![image](https://github.com/user-attachments/assets/8b07c0b6-7948-4b61-a6b2-fe2fafdb1a33) +The integration typically consists of 3 steps: +1. Build the mobile native library using Go Mobile. +1. Add the library to your application. +1. Configure and run MobileProxy within your app. +1. Update your networking code to proxy traffic through the local MobileProxy. + ## Build the Go Mobile binaries with [`go build`](https://pkg.go.dev/cmd/go#hdr-Compile_packages_and_dependencies) From the `x/` directory: From bb1f709f0cada173bfb63ac0eacb084d7897c532 Mon Sep 17 00:00:00 2001 From: Vinicius Fortuna Date: Wed, 25 Sep 2024 08:02:58 -0600 Subject: [PATCH 4/9] Update README.md --- x/mobileproxy/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/mobileproxy/README.md b/x/mobileproxy/README.md index b3a9a4c9..0456f5b9 100644 --- a/x/mobileproxy/README.md +++ b/x/mobileproxy/README.md @@ -8,7 +8,7 @@ This package enables the use Go Mobile to generate a mobile library to run a loc **Content app with MobileProxy:** ![image](https://github.com/user-attachments/assets/8b07c0b6-7948-4b61-a6b2-fe2fafdb1a33) -The integration typically consists of 3 steps: +The integration typically consists of the following steps: 1. Build the mobile native library using Go Mobile. 1. Add the library to your application. 1. Configure and run MobileProxy within your app. From 69f607ce7f592812208e61e44199157ce0d0bce5 Mon Sep 17 00:00:00 2001 From: Vinicius Fortuna Date: Wed, 25 Sep 2024 08:08:42 -0600 Subject: [PATCH 5/9] Updates as per the cheat sheet --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 04371ced..eb24ad8f 100644 --- a/README.md +++ b/README.md @@ -144,7 +144,7 @@ They all take a `-transport` flag with a config that specifies what transport sh The config format can be found in [x/config](https://pkg.go.dev/github.com/Jigsaw-Code/outline-sdk/x/config). -### DNS Query +### Resolve a Domain Name The [`resolve` tool](https://pkg.go.dev/github.com/Jigsaw-Code/outline-sdk/x/examples/resolve) resolves a domain name, similar to `dig`: @@ -157,7 +157,7 @@ $ go run github.com/Jigsaw-Code/outline-sdk/x/examples/resolve@latest -type A -t ``` -### HTTP Fetch +### Fetch a Web Page The [`fetch` tool](https://pkg.go.dev/github.com/Jigsaw-Code/outline-sdk/x/examples/fetch) fetches a URL, similar to `curl`. The example below would bypass blocking of `meduza.io` in Russia: @@ -177,7 +177,7 @@ $ go run github.com/Jigsaw-Code/outline-sdk/x/examples/fetch@latest -transport " [DEBUG] 2023/12/28 18:44:56.491273 main.go:105: Cf-Cache-Status: [DYNAMIC] ``` -### Local Proxy Forwarder +### Run a Local Forward Proxy The [`http2transport` tool](https://pkg.go.dev/github.com/Jigsaw-Code/outline-sdk/x/examples/http2transport) runs a local proxy that creates connections according to the transport. It's effectively a circumvention tool. @@ -210,7 +210,7 @@ cf-ray: 83cdb579bbec4376-EWR alt-svc: h3=":443"; ma=86400 ``` -### Proxy Connectivity Test +### Test Proxy Connectivity The [`test-connectivity` tool](https://pkg.go.dev/github.com/Jigsaw-Code/outline-sdk/x/examples/test-connectivity) is useful to test connectivity to a proxy. It uses DNS resolutions over TCP and UDP using the transport to test if there is stream and datagram connectivity. @@ -223,7 +223,7 @@ $ go run github.com/Jigsaw-Code/outline-sdk/x/examples/test-connectivity@latest success ``` -### Speed Test +### Test Download Speed The [`fetch-speed` tool](https://pkg.go.dev/github.com/Jigsaw-Code/outline-sdk/x/examples/fetch-speed) fetches a URL, similar to `curl` and calculates the download speed. It could be used for troubleshooting. From b9c5efbaaffd0e1d25626e8717b4855b4da1cc63 Mon Sep 17 00:00:00 2001 From: Vinicius Fortuna Date: Wed, 25 Sep 2024 08:11:09 -0600 Subject: [PATCH 6/9] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index eb24ad8f..56896cec 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,8 @@

-> ⚠️ **Warning**: This code is in early stages and is not guaranteed to be stable. If you are +> [!Note] +> This code is under active development and not guaranteed to be stable. If you are > interested in integrating with it, we'd love your [feedback](https://github.com/Jigsaw-Code/outline-sdk/issues/new). The Outline SDK allows you to: From bb652802e1bd9495f27e7ecb4c924f7e70e36f23 Mon Sep 17 00:00:00 2001 From: Vinicius Fortuna Date: Wed, 25 Sep 2024 08:13:18 -0600 Subject: [PATCH 7/9] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 56896cec..4ab01129 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,8 @@ The Outline SDK allows you to: - Create tools to protect against network-level interference. -- Add network-level interference protection to existing apps, such as content or communication apps. +- [Add network-level interference protection to existing apps](#add-the-sdk-to-your-app), such as content or communication apps. +- Troubleshoot connectivity and measure interference with a collection of [command-line tools](#command-line-tools). ## Advantages From b822a5ceebec7e7b0fdf351d87f9553b641d382a Mon Sep 17 00:00:00 2001 From: Vinicius Fortuna Date: Wed, 25 Sep 2024 08:17:46 -0600 Subject: [PATCH 8/9] Update README.md --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4ab01129..90b58782 100644 --- a/README.md +++ b/README.md @@ -88,9 +88,12 @@ The Outline Client uses a **generated mobile library** on Android, iOS and macOS Below we provide more details on each integration approach. For more details about setting up and using Outline SDK features, see the [Discussions tab](https://github.com/Jigsaw-Code/outline-sdk/discussions). + ### Generated Mobile Library -To integrate the SDK into a mobile app, follow these steps: +See our [MobileProxy page](./x/mobileproxy/) to learn about the easiest way to integrate the Outline SDK into a mobile app. It runs a local forward proxy that implements resillience strategies that you can use to configure your app's networking libraries. + +For advanced users, it is possible to generate your own mobile library, following these steps: 1. **Create a Go library**: Create a Go package that wraps the SDK functionalities you need. 1. **Generate mobile library**: Use [`gomobile bind`](https://pkg.go.dev/golang.org/x/mobile/cmd/gomobile) to generate Android Archives (AAR) and Apple Frameworks with Java and Objective-C bindings. @@ -100,8 +103,6 @@ To integrate the SDK into a mobile app, follow these steps: > **Note**: You must use `gomobile bind` on the package you create, not directly on the SDK packages. -An easy way to integrate with the SDK in a mobile app is by using the [`x/mobileproxy` library](./x/mobileproxy/) -to run a local web proxy that you can use to configure your app's networking libraries. ### Side Service From a8287125680453af6f9e5700870d12ecd870adc5 Mon Sep 17 00:00:00 2001 From: Vinicius Fortuna Date: Wed, 25 Sep 2024 08:57:27 -0600 Subject: [PATCH 9/9] Update config.json --- x/examples/smart-proxy/config.json | 62 +----------------------------- 1 file changed, 1 insertion(+), 61 deletions(-) diff --git a/x/examples/smart-proxy/config.json b/x/examples/smart-proxy/config.json index 8fa3a168..316218fe 100644 --- a/x/examples/smart-proxy/config.json +++ b/x/examples/smart-proxy/config.json @@ -2,105 +2,45 @@ "dns": [ {"https": {"name": "2620:fe::fe"}, "//": "Quad9"}, {"https": {"name": "9.9.9.9"}}, - {"https": {"name": "149.112.112.112"}}, {"https": {"name": "2001:4860:4860::8888"}, "//": "Google"}, {"https": {"name": "8.8.8.8"}}, - {"https": {"name": "2001:4860:4860::8844"}}, - {"https": {"name": "8.8.4.4"}}, {"https": {"name": "2606:4700:4700::1111"}, "//": "Cloudflare"}, {"https": {"name": "1.1.1.1"}}, - {"https": {"name": "2606:4700:4700::1001"}}, - {"https": {"name": "1.0.0.1"}}, - {"https": {"name": "cloudflare-dns.com.", "address": "cloudflare.net."}}, - - {"https": {"name": "2620:119:35::35"}, "//": "OpenDNS"}, - {"https": {"name": "208.67.220.220"}}, - {"https": {"name": "2620:119:53::53"}}, - {"https": {"name": "208.67.222.222"}}, {"https": {"name": "2001:67c:930::1"}, "//": "Wikimedia DNS"}, {"https": {"name": "185.71.138.138"}}, - {"https": {"name": "doh.dns.sb", "address": "cloudflare.net:443"}, "//": "DNS.SB"}, - - {"tls": {"name": "2620:fe::fe"}, "//": "Quad9"}, {"tls": {"name": "9.9.9.9"}}, - {"tls": {"name": "149.112.112.112"}}, {"tls": {"name": "2001:4860:4860::8888"}, "//": "Google"}, {"tls": {"name": "8.8.8.8"}}, - {"tls": {"name": "2001:4860:4860::8844"}}, - {"tls": {"name": "8.8.4.4"}}, {"tls": {"name": "2606:4700:4700::1111"}, "//": "Cloudflare"}, {"tls": {"name": "1.1.1.1"}}, - {"tls": {"name": "2606:4700:4700::1001"}}, - {"tls": {"name": "1.0.0.1"}}, - - {"tls": {"name": "2620:119:35::35"}, "//": "OpenDNS"}, - {"tls": {"name": "208.67.220.220"}}, - {"tls": {"name": "2620:119:53::53"}}, - {"tls": {"name": "208.67.222.222"}}, {"tls": {"name": "2001:67c:930::1"}, "//": "Wikimedia DNS"}, {"tls": {"name": "185.71.138.138"}}, - {"tcp": {"address": "2620:fe::fe"}, "//": "Quad9"}, {"tcp": {"address": "9.9.9.9"}}, - {"tcp": {"address": "149.112.112.112"}}, - {"tcp": {"address": "[2620:fe::fe]:9953"}}, - {"tcp": {"address": "9.9.9.9:9953"}}, - {"tcp": {"address": "149.112.112.112:9953"}}, {"tcp": {"address": "2001:4860:4860::8888"}, "//": "Google"}, {"tcp": {"address": "8.8.8.8"}}, - {"tcp": {"address": "2001:4860:4860::8844"}}, - {"tcp": {"address": "8.8.4.4"}}, {"tcp": {"address": "2606:4700:4700::1111"}, "//": "Cloudflare"}, {"tcp": {"address": "1.1.1.1"}}, - {"tcp": {"address": "2606:4700:4700::1001"}}, - {"tcp": {"address": "1.0.0.1"}}, - - {"tcp": {"address": "2620:119:35::35"}, "//": "OpenDNS"}, - {"tcp": {"address": "208.67.220.220"}}, - {"tcp": {"address": "2620:119:53::53"}}, - {"tcp": {"address": "208.67.222.222"}}, - {"tcp": {"address": "[2620:119:35::35]:443"}}, - {"tcp": {"address": "208.67.220.220:443"}}, - {"tcp": {"address": "[2620:119:35::35]:5353"}}, - {"tcp": {"address": "208.67.220.220:5353"}}, - - + {"udp": {"address": "2620:fe::fe"}, "//": "Quad9"}, {"udp": {"address": "9.9.9.9"}}, - {"udp": {"address": "149.112.112.112"}}, - {"udp": {"address": "[2620:fe::fe]:9953"}}, - {"udp": {"address": "9.9.9.9:9953"}}, - {"udp": {"address": "149.112.112.112:9953"}}, {"udp": {"address": "2001:4860:4860::8888"}, "//": "Google"}, {"udp": {"address": "8.8.8.8"}}, - {"udp": {"address": "2001:4860:4860::8844"}}, - {"udp": {"address": "8.8.4.4"}}, {"udp": {"address": "2606:4700:4700::1111"}, "//": "Cloudflare"}, {"udp": {"address": "1.1.1.1"}}, - {"udp": {"address": "2606:4700:4700::1001"}}, - {"udp": {"address": "1.0.0.1"}}, - - {"udp": {"address": "2620:119:35::35"}, "//": "OpenDNS"}, - {"udp": {"address": "208.67.220.220"}}, - {"udp": {"address": "2620:119:53::53"}}, - {"udp": {"address": "208.67.222.222"}}, - {"udp": {"address": "[2620:119:35::35]:443"}}, - {"udp": {"address": "208.67.220.220:443"}}, - {"udp": {"address": "[2620:119:35::35]:5353"}}, - {"udp": {"address": "208.67.220.220:5353"}} ], "tls": [