-
-
Save csdntb/8f2b4bc4327bf9a6a2dd8103de61bf8d to your computer and use it in GitHub Desktop.
Revisions
-
jamesdixon revised this gist
Sep 4, 2019 . 1 changed file with 8 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,17 +1,18 @@ // Make sure to replace <YOUR_LOCAL_IP> with // the external IP of your computer if you're using Android. // Note that we're using port 8888 which is Charles' default. String proxy = Platform.isAndroid ? '<YOUR_LOCAL_IP>:8888' : 'localhost:8888'; // Create a new HttpClient instance. HttpClient httpClient = new HttpClient(); // Hook into the findProxy callback to set // the client's proxy. httpClient.findProxy = (uri) { return "PROXY $proxy;"; }; // This is a workaround to allow Charles to receive // SSL payloads when your app is running on Android httpClient.badCertificateCallback = ((X509Certificate cert, String host, int port) => Platform.isAndroid); -
jamesdixon created this gist
Aug 30, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ // make sure to replace <YOUR_LOCAL_IP> with // the external IP of your computer. String proxy = '<YOUR_LOCAL_IP>:8888'; // create a new HttpClient instance HttpClient httpClient = new HttpClient(); // hook into the findProxy callback to set // the client's proxy httpClient.findProxy = (uri) { return "PROXY $proxy;"; }; // this is a workaround to allow Charles to receive // SSL payloads when your app is running on Android httpClient.badCertificateCallback = ((X509Certificate cert, String host, int port) => Platform.isAndroid);