[GH-ISSUE #636] Android device/emulator hardly connects #634

Closed
opened 2026-03-03 19:20:28 +03:00 by kerem · 36 comments
Owner

Originally created by @faisalmohd83 on GitHub (Sep 24, 2020).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/636

Originally assigned to: @NghiaTranUIT on GitHub.

Proxyman version? 2.7.0

macOS Version? Catalina 10.15.6

Steps to reproduce

  1. Connect the Android device/ Start an emulator
  2. Follow the Proxyman config steps (as guided in the Proxyman Mac App)
  3. Device/Emulator is able to connect sometime (if lucky)

It connects 'sometimes'. If connected, the device will complain 'No Connection' in some time.
More: Found co

Expected behavior

Connect the device all the time.

Originally created by @faisalmohd83 on GitHub (Sep 24, 2020). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/636 Originally assigned to: @NghiaTranUIT on GitHub. ### Proxyman version? 2.7.0 ### macOS Version? Catalina 10.15.6 ### Steps to reproduce 1. Connect the Android device/ Start an emulator 2. Follow the Proxyman config steps (as guided in the Proxyman Mac App) 3. Device/Emulator is able to connect sometime (if lucky) > It connects 'sometimes'. If connected, the device will complain '**No Connection**' in some time. > More: Found co ### Expected behavior Connect the device all the time.
kerem 2026-03-03 19:20:28 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@yauheniprakapenka commented on GitHub (Sep 24, 2020):

I have a proxy configured on my android device and it works through proxyman 2.7.0. I am having problems where requests from my test applications are not showing up in the proxy. The browser requests is displayed, but my applications requests are not displayed. I have no idea how to reproduce this. I just use it, and at some point they stop being displayed. Only complete removal of the proxymal name can help. And then requests disappear again. Unfortunately, I do not know how to suggest the steps of the playback. Therefore, I am not creating an issue.

<!-- gh-comment-id:698575462 --> @yauheniprakapenka commented on GitHub (Sep 24, 2020): I have a proxy configured on my android device and it works through proxyman 2.7.0. I am having problems where requests from my test applications are not showing up in the proxy. The browser requests is displayed, but my applications requests are not displayed. I have no idea how to reproduce this. I just use it, and at some point they stop being displayed. Only complete removal of the proxymal name can help. And then requests disappear again. Unfortunately, I do not know how to suggest the steps of the playback. Therefore, I am not creating an issue.
Author
Owner

@NghiaTranUIT commented on GitHub (Sep 24, 2020):

I have received few reports about Android emulator connection too, but really hard to reproduce.

I suppose that it’s from the Android emulator itself, because I always work fine with iOS simulator.

Can you guys try to delete entire android and create again? And if it happens with Android real device?

Meanwhile I will spend today to try to reproduce it 👍

<!-- gh-comment-id:698636171 --> @NghiaTranUIT commented on GitHub (Sep 24, 2020): I have received few reports about Android emulator connection too, but really hard to reproduce. I suppose that it’s from the Android emulator itself, because I always work fine with iOS simulator. Can you guys try to delete entire android and create again? And if it happens with Android real device? Meanwhile I will spend today to try to reproduce it 👍
Author
Owner

@NghiaTranUIT commented on GitHub (Sep 24, 2020):

If you guys don’t mind, please try to use Android Emulator on other proxy tools like Charles, to see if it still persists or not 🧐

<!-- gh-comment-id:698636564 --> @NghiaTranUIT commented on GitHub (Sep 24, 2020): If you guys don’t mind, please try to use Android Emulator on other proxy tools like Charles, to see if it still persists or not 🧐
Author
Owner

@NghiaTranUIT commented on GitHub (Sep 25, 2020):

@faisalmohd83 @yauheniprakapenka just wondering: What is the Android Emulator you're using? I use Pixel 3 Android Emulator API 29 from Android Studio, but I'm not able to reproduce the bug 🤔

<!-- gh-comment-id:698760407 --> @NghiaTranUIT commented on GitHub (Sep 25, 2020): @faisalmohd83 @yauheniprakapenka just wondering: What is the Android Emulator you're using? I use Pixel 3 Android Emulator API 29 from Android Studio, but I'm not able to reproduce the bug 🤔
Author
Owner

@yauheniprakapenka commented on GitHub (Sep 25, 2020):

I am using only Android Device Xiaomi Redmi 9a android 10. This Saturday I will try to find how to reproduce the problem.

<!-- gh-comment-id:698761689 --> @yauheniprakapenka commented on GitHub (Sep 25, 2020): I am using only Android Device Xiaomi Redmi 9a android 10. This Saturday I will try to find how to reproduce the problem.
Author
Owner

@faisalmohd83 commented on GitHub (Sep 25, 2020):

@NghiaTranUIT I doubt it's an issue with device/emulator.

I and team use a combination of emulators and physical devices with different OS versions for development/testing. In Android, works well once connected but disconnects in a while and it'll start complaining as connection lost. The only way to reconnect would be forgetting the connected WiFi and redo all the configuration(though not guaranteed). Whereas in iOS, the Proxyman works super smooth and our dev/test team uses it extensively.

--
The combination of emulators(all are GooglePlay images) used are followed and tried with many of it. Regardless of the device/emulator configuration, the behaviour is the same.

Screenshot 2020-09-25 at 08 30 17

Eagerly looking forward to solving it, Would be happy to provide more info.

<!-- gh-comment-id:698785424 --> @faisalmohd83 commented on GitHub (Sep 25, 2020): @NghiaTranUIT I doubt it's an issue with device/emulator. I and team use a combination of emulators and physical devices with different OS versions for development/testing. In Android, works well once connected but disconnects in a while and it'll start complaining as **connection lost**. The only way to reconnect would be forgetting the connected WiFi and redo all the configuration(though not guaranteed). Whereas in iOS, the Proxyman works super smooth and our dev/test team uses it extensively. -- The combination of emulators(all are GooglePlay images) used are followed and tried with many of it. Regardless of the device/emulator configuration, the behaviour is the same. <img width="777" alt="Screenshot 2020-09-25 at 08 30 17" src="https://user-images.githubusercontent.com/6148442/94239197-59868c80-ff09-11ea-9e30-709480d6cb40.png"> Eagerly looking forward to solving it, Would be happy to provide more info.
Author
Owner

@NghiaTranUIT commented on GitHub (Sep 25, 2020):

Thanks for the detailed report @faisalmohd83. I would summarize that we have two different problems:

  1. Lost connection after setting HTTP Proxy in Wifi Setting from your Android devices: It's common problems and it could be fixed by:
  • Your macOS's IP might change after a while => Please verify the IP in Wifi Setting (from Android Devices) that matches with the current macOS IP.
  • Firewall can block all incoming connections: Please turn off the Firewall or allow Proxyman in the whitelist.

Read more at https://docs.proxyman.io/troubleshooting/my-ios-devices-couldnt-connect-to-proxyman-via-proxy

  1. You're able to connect to Proxyman, able to see HTTPS Traffic, but it disconnects after a period of time. => It's a problem that we're investigating since I'm unable to reproduce it and it works fine with iOS devices 🤔

To investigate, I might change some configuration when starting a Proxy Server (Powered by SwiftNIO)
Currently, I'm using:

ChannelOptions.backlog
ChannelOptions.socket(SOL_SOCKET, SO_REUSEADDR)
ChannelOptions.socket(IPPROTO_TCP, TCP_NODELAY)
ChannelOptions.maxMessagesPerRead
ChannelOptions.allowRemoteHalfClosure
ChannelOptions.recvAllocator
ChannelOptions.connectTimeout
<!-- gh-comment-id:698794529 --> @NghiaTranUIT commented on GitHub (Sep 25, 2020): Thanks for the detailed report @faisalmohd83. I would summarize that we have two different problems: 1. Lost connection after setting HTTP Proxy in Wifi Setting from your Android devices: It's common problems and it could be fixed by: - Your macOS's IP might change after a while => Please verify the IP in Wifi Setting (from Android Devices) that matches with the current macOS IP. - Firewall can block all incoming connections: Please turn off the Firewall or allow Proxyman in the whitelist. Read more at https://docs.proxyman.io/troubleshooting/my-ios-devices-couldnt-connect-to-proxyman-via-proxy 2. You're able to connect to Proxyman, able to see HTTPS Traffic, but it disconnects after a period of time. => It's a problem that we're investigating since I'm unable to reproduce it and it works fine with iOS devices 🤔 To investigate, I might change some configuration when starting a Proxy Server (Powered by SwiftNIO) Currently, I'm using: ``` ChannelOptions.backlog ChannelOptions.socket(SOL_SOCKET, SO_REUSEADDR) ChannelOptions.socket(IPPROTO_TCP, TCP_NODELAY) ChannelOptions.maxMessagesPerRead ChannelOptions.allowRemoteHalfClosure ChannelOptions.recvAllocator ChannelOptions.connectTimeout ```
Author
Owner

@NghiaTranUIT commented on GitHub (Sep 25, 2020):

Hey @faisalmohd83 , please help me to ON/OFF the option Use Android Studio HTTP Proxy Setting.

Screen_Shot_2020-09-25_at_4_11_40_PM

I assume that the Android Emulator has a bug. Sometime it follow the Android Studio HTTP Proxy or HTTP Proxy in Setting app, which might cause the connection lost.

I tried to set manual Proxy in Android Studio HTTP Proxy to Proxyman, but it always show the IP instead of the domain. It happens on Charles and Fiddler too

<!-- gh-comment-id:698820192 --> @NghiaTranUIT commented on GitHub (Sep 25, 2020): Hey @faisalmohd83 , please help me to ON/OFF the option Use Android Studio HTTP Proxy Setting. <img width="1387" alt="Screen_Shot_2020-09-25_at_4_11_40_PM" src="https://user-images.githubusercontent.com/5878421/94249363-02ed7280-ff4a-11ea-9e9f-c692434f8580.png"> I assume that the Android Emulator has a bug. Sometime it follow the Android Studio HTTP Proxy or HTTP Proxy in Setting app, which might cause the connection lost. I tried to set manual Proxy in Android Studio HTTP Proxy to Proxyman, but it always show the IP instead of the domain. It happens on Charles and Fiddler too
Author
Owner

@NghiaTranUIT commented on GitHub (Sep 25, 2020):

Meanwhile, I notices that from Android API 30, install Proxyman CA Certificate requires extra steps to install it properly.

For instance, I have manually install in Security Tab in Setting app

Screen Shot 2020-09-25 at 4 07 43 PM

I will update the document 👍

<!-- gh-comment-id:698820889 --> @NghiaTranUIT commented on GitHub (Sep 25, 2020): Meanwhile, I notices that from Android API 30, install Proxyman CA Certificate requires extra steps to install it properly. For instance, I have manually install in Security Tab in Setting app <img width="461" alt="Screen Shot 2020-09-25 at 4 07 43 PM" src="https://user-images.githubusercontent.com/5878421/94249616-58c21a80-ff4a-11ea-962e-cb7603ae2af7.png"> I will update the document 👍
Author
Owner

@faisalmohd83 commented on GitHub (Sep 25, 2020):

@NghiaTranUIT

Certificate downloading was an issue but found you answered it another thread and done it in Android 30 emulator.
Can you please also share the Mac DNS/Proxy/Firewall settings apart from emulator settings?

<!-- gh-comment-id:698844405 --> @faisalmohd83 commented on GitHub (Sep 25, 2020): @NghiaTranUIT Certificate downloading was an issue but found you answered it another thread and done it in Android 30 emulator. Can you please also share the Mac DNS/Proxy/Firewall settings apart from emulator settings?
Author
Owner

@NghiaTranUIT commented on GitHub (Sep 25, 2020):

Sure, I will update 👍 if you don’t mind, please help me test out with Android Studio HTTP Proxy setting in the previous comment.

<!-- gh-comment-id:698873464 --> @NghiaTranUIT commented on GitHub (Sep 25, 2020): Sure, I will update 👍 if you don’t mind, please help me test out with Android Studio HTTP Proxy setting in the previous comment.
Author
Owner

@faisalmohd83 commented on GitHub (Sep 26, 2020):

@NghiaTranUIT

I tried with the above suggestions, had no luck!
In fact, all configuration was already in place except the

  • Emulator proxy >> None
  • Turning OFF the Mac firewall

Resulting behaviour:
The device connected but the internet connection lost after a while.

<!-- gh-comment-id:699480913 --> @faisalmohd83 commented on GitHub (Sep 26, 2020): @NghiaTranUIT I tried with the above suggestions, had no luck! In fact, all configuration was already in place except the - Emulator proxy >> None - Turning OFF the Mac firewall **Resulting behaviour:** The device connected but the internet connection lost after a while.
Author
Owner

@NghiaTranUIT commented on GitHub (Sep 26, 2020):

Hey @faisalmohd83 if you don’t mind, please help me test the Android issue with Charles Proxy app (it has a free version). If it doesn’t happen on Charles, it means something wrong with Proxyman and Android

<!-- gh-comment-id:699481279 --> @NghiaTranUIT commented on GitHub (Sep 26, 2020): Hey @faisalmohd83 if you don’t mind, please help me test the Android issue with Charles Proxy app (it has a free version). If it doesn’t happen on Charles, it means something wrong with Proxyman and Android
Author
Owner

@NghiaTranUIT commented on GitHub (Sep 27, 2020):

@faisalmohd83 @yauheniprakapenka it seems that Android Emulator has a problem. I search for "Android Emulator lost connection after a while" and there are tons of StackOverflow about it.

They often suggest setting DNS as 8.8.8.8 as a solution.

Please help me to check it out 👍

<!-- gh-comment-id:699604453 --> @NghiaTranUIT commented on GitHub (Sep 27, 2020): @faisalmohd83 @yauheniprakapenka it seems that Android Emulator has a problem. I search for "Android Emulator lost connection after a while" and there are tons of StackOverflow about it. They often suggest setting DNS as 8.8.8.8 as a solution. - https://stackoverflow.com/questions/42736038/android-emulator-not-able-to-access-the-internet - https://stackoverflow.com/questions/21035055/android-emulator-loses-internet-connection-after-a-period-of-time-inactive-or-a/22077852#22077852 - https://stackoverflow.com/a/63337791/3127477 Please help me to check it out 👍
Author
Owner

@yauheniprakapenka commented on GitHub (Sep 27, 2020):

I will add a new address 8.8.8.8 to macbook`s Wi-Fi settings and watching for correct works for a few days.

<!-- gh-comment-id:699605630 --> @yauheniprakapenka commented on GitHub (Sep 27, 2020): I will add a new address 8.8.8.8 to macbook`s Wi-Fi settings and watching for correct works for a few days.
Author
Owner

@yauheniprakapenka commented on GitHub (Sep 29, 2020):

Good day! :)

At the moment, with such settings, it works fine for me on physical device. I continue to watch.

Screenshot 09-29-2020 14 47 56

<!-- gh-comment-id:700691157 --> @yauheniprakapenka commented on GitHub (Sep 29, 2020): Good day! :) At the moment, with such settings, it works fine for me on physical device. I continue to watch. ![Screenshot 09-29-2020 14 47 56](https://user-images.githubusercontent.com/47568606/94562505-182a1000-026e-11eb-82c2-b4d82bbf33af.jpg)
Author
Owner

@NghiaTranUIT commented on GitHub (Sep 29, 2020):

Hopefully, it works 🤣

<!-- gh-comment-id:700691864 --> @NghiaTranUIT commented on GitHub (Sep 29, 2020): Hopefully, it works 🤣
Author
Owner

@NghiaTranUIT commented on GitHub (Sep 29, 2020):

I've updated the Troubleshooting Page for Android: https://docs.proxyman.io/troubleshooting/my-ios-devices-couldnt-connect-to-proxyman-via-proxy#android-devices-and-android-emulator 👍

<!-- gh-comment-id:700736260 --> @NghiaTranUIT commented on GitHub (Sep 29, 2020): I've updated the Troubleshooting Page for Android: https://docs.proxyman.io/troubleshooting/my-ios-devices-couldnt-connect-to-proxyman-via-proxy#android-devices-and-android-emulator 👍
Author
Owner

@ghowardqa commented on GitHub (Sep 29, 2020):

Evening guys

Hope you're well.

@faisalmohd83 has asked me to weigh in on the issue.

Massive fan of proxyman, I was a user of Charles before finding out about proxyman and haven't looked back!

I've always had issues with Android and any HTTP Proxy tool ever since Android has tightened their network security. So following the usual setup of adding the network_security_config.xml to the project and referencing it in the Android Manifest.xml works fine. Next, linking up the device or emulator to proxyman and installing the Root certificate and device certificate again goes smoothly.

Now, this where things start to happen, firstly attempt SSL handshake and then obviously making sure the endpoint is enabled for SSL HTTPS Response.

Next, attempted to forget the network connection and rejoin it network and attempt again. Now this sometimes works or as @faisalmohd83 pointed out a system alert is displayed of 'No Internet Connection' or within the device/emulator it'll say its connected but no internet connection.

So the physical device I'm using is a Samsung S10 running 10.0 (OneUI 2.)1 and the emulator is the standard AVD Google Pixel running OS 10.0

I'll also attempt the DNS server solution and report back. :)

<!-- gh-comment-id:700844298 --> @ghowardqa commented on GitHub (Sep 29, 2020): Evening guys Hope you're well. @faisalmohd83 has asked me to weigh in on the issue. Massive fan of proxyman, I was a user of Charles before finding out about proxyman and haven't looked back! I've always had issues with Android and any HTTP Proxy tool ever since Android has tightened their network security. So following the usual setup of adding the network_security_config.xml to the project and referencing it in the Android Manifest.xml works fine. Next, linking up the device or emulator to proxyman and installing the Root certificate and device certificate again goes smoothly. Now, this where things start to happen, firstly attempt SSL handshake and then obviously making sure the endpoint is enabled for SSL HTTPS Response. Next, attempted to forget the network connection and rejoin it network and attempt again. Now this sometimes works or as @faisalmohd83 pointed out a system alert is displayed of 'No Internet Connection' or within the device/emulator it'll say its connected but no internet connection. So the physical device I'm using is a Samsung S10 running 10.0 (OneUI 2.)1 and the emulator is the standard AVD Google Pixel running OS 10.0 I'll also attempt the DNS server solution and report back. :)
Author
Owner

@NghiaTranUIT commented on GitHub (Sep 30, 2020):

Glad to know that Proxyman have many massive fans 😄

I just discover that we can automatically install the self-signed certificate to Android Emulator by using ADB 😲 https://ivrodriguez.com/installing-self-signed-certificates-on-android/

I will attempt to add this automatic flow to Proxyman to make it easier 🙌

<!-- gh-comment-id:701111683 --> @NghiaTranUIT commented on GitHub (Sep 30, 2020): Glad to know that Proxyman have many massive fans 😄 I just discover that we can **automatically** install the self-signed certificate to Android Emulator by using ADB 😲 https://ivrodriguez.com/installing-self-signed-certificates-on-android/ I will attempt to add this automatic flow to Proxyman to make it easier 🙌
Author
Owner

@faisalmohd83 commented on GitHub (Oct 2, 2020):

@yauheniprakapenka Curious! Is it solved on your side?

<!-- gh-comment-id:702635680 --> @faisalmohd83 commented on GitHub (Oct 2, 2020): @yauheniprakapenka Curious! Is it solved on your side?
Author
Owner

@yauheniprakapenka commented on GitHub (Oct 2, 2020):

@yauheniprakapenka Curious! Is it solved on your side?

On my physical device, the problem no longer happens from Monday to this Friday.

  1. On my MacBook in Wi-Fi DNS added 8.8.8.8
  2. I did not add DNS on the device, only proxy address and port
<!-- gh-comment-id:702638009 --> @yauheniprakapenka commented on GitHub (Oct 2, 2020): > @yauheniprakapenka Curious! Is it solved on your side? On my physical device, the problem no longer happens from Monday to this Friday. 1. On my MacBook in Wi-Fi DNS added 8.8.8.8 2. I did not add DNS on the device, only proxy address and port
Author
Owner

@faisalmohd83 commented on GitHub (Oct 11, 2020):

@NghiaTranUIT @yauheniprakapenka thanks for inputs.

Updates based on trials:

Certainly, Adding DNS to MacOS WiFi Setting helps.
It seems I found the issue, The Proxman Certificate should be installed as VPN and apps not W-Fi. Would be worth mentioning in the documentation.

<!-- gh-comment-id:706784366 --> @faisalmohd83 commented on GitHub (Oct 11, 2020): @NghiaTranUIT @yauheniprakapenka thanks for inputs. Updates based on trials: Certainly, Adding DNS to MacOS WiFi Setting helps. It seems I found the issue, The Proxman Certificate should be installed as **VPN and apps** not _W-Fi_. Would be worth mentioning in the documentation.
Author
Owner

@NghiaTranUIT commented on GitHub (Oct 12, 2020):

It seems that adding DNS 8.8.8.8 to macOS could resolve this problem 👍

I will add this information to the Android Troubleshooting page. Thank all for testing it 😄

<!-- gh-comment-id:706804522 --> @NghiaTranUIT commented on GitHub (Oct 12, 2020): It seems that adding DNS 8.8.8.8 to macOS could resolve this problem 👍 I will add this information to the Android Troubleshooting page. Thank all for testing it 😄
Author
Owner

@faisalmohd83 commented on GitHub (Oct 12, 2020):

It seems that adding DNS 8.8.8.8 to macOS could resolve this problem 👍

I will add this information to the Android Troubleshooting page. Thank all for testing it 😄

Only DNS didn't solve my issue, Proxyman Certificate should be installed as VPN and apps. I was always installed as WiFi

<!-- gh-comment-id:706902530 --> @faisalmohd83 commented on GitHub (Oct 12, 2020): > It seems that adding DNS 8.8.8.8 to macOS could resolve this problem 👍 > > I will add this information to the Android Troubleshooting page. Thank all for testing it 😄 Only DNS didn't solve my issue, Proxyman Certificate should be installed as **VPN and apps**. I was always installed as WiFi
Author
Owner

@NghiaTranUIT commented on GitHub (Oct 14, 2020):

I'm happy to show you guys that I'm working on the Script to automatically do:

  • Override HTTP Proxy
  • Install and Trust Proxyman Certificate

One-click and work automatically with all Android Emulators (Include Android 11)

Screen_Shot_2020-10-14_at_20_18_46

https://twitter.com/proxyman_app/status/1316370751612579841

I will send a Beta build here when it's out 🙌

<!-- gh-comment-id:708411607 --> @NghiaTranUIT commented on GitHub (Oct 14, 2020): I'm happy to show you guys that I'm working on the Script to **automatically** do: - Override HTTP Proxy - Install and Trust Proxyman Certificate **One-click** and work automatically with all Android Emulators (Include Android 11) <img width="1022" alt="Screen_Shot_2020-10-14_at_20_18_46" src="https://user-images.githubusercontent.com/5878421/95997340-e2844a00-0e5d-11eb-8779-af2fc0eed1dd.png"> https://twitter.com/proxyman_app/status/1316370751612579841 I will send a Beta build here when it's out 🙌
Author
Owner

@faisalmohd83 commented on GitHub (Oct 15, 2020):

I'm happy to show you guys that I'm working on the Script to automatically do:

  • Override HTTP Proxy
  • Install and Trust Proxyman Certificate

One-click and work automatically with all Android Emulators (Include Android 11)

Screen_Shot_2020-10-14_at_20_18_46

https://twitter.com/proxyman_app/status/1316370751612579841

I will send a Beta build here when it's out 🙌

Hope this will improve consistency. Though Android/Emulator connects well, the connection loses after some time.

<!-- gh-comment-id:709105228 --> @faisalmohd83 commented on GitHub (Oct 15, 2020): > I'm happy to show you guys that I'm working on the Script to **automatically** do: > > * Override HTTP Proxy > * Install and Trust Proxyman Certificate > > **One-click** and work automatically with all Android Emulators (Include Android 11) > > <img alt="Screen_Shot_2020-10-14_at_20_18_46" width="1022" src="https://user-images.githubusercontent.com/5878421/95997340-e2844a00-0e5d-11eb-8779-af2fc0eed1dd.png"> > > https://twitter.com/proxyman_app/status/1316370751612579841 > > I will send a Beta build here when it's out 🙌 Hope this will improve consistency. Though Android/Emulator connects well, the connection loses after some time.
Author
Owner

@faisalmohd83 commented on GitHub (Oct 23, 2020):

@NghiaTranUIT Awesome 👍🏼
The new auto-provisioning for emulator works our of the box.

<!-- gh-comment-id:715329228 --> @faisalmohd83 commented on GitHub (Oct 23, 2020): @NghiaTranUIT Awesome 👍🏼 The new auto-provisioning for emulator works our of the box.
Author
Owner

@NghiaTranUIT commented on GitHub (Oct 23, 2020):

Glad to hear that it works for you 😄

<!-- gh-comment-id:715329557 --> @NghiaTranUIT commented on GitHub (Oct 23, 2020): Glad to hear that it works for you 😄
Author
Owner

@castrojr913 commented on GitHub (Mar 2, 2021):

@yauheniprakapenka Curious! Is it solved on your side?

On my physical device, the problem no longer happens from Monday to this Friday.

  1. On my MacBook in Wi-Fi DNS added 8.8.8.8
  2. I did not add DNS on the device, only proxy address and port

@yauheniprakapenka How did u resolve it? I keep trying through Android emulator and It doesn't work. I've followed steps, installed certificate and it's marked as Trusted one in User tab. The same thing that u faced, browser requests are caught by ProxyMan but It doesn't catch my mobile app requests. UPDATE: I've checked emulator version out and it's a Pixel one. When I try overriding its settings, it displays an ADB error on step 5:
adb: error: stat failed when trying to push to /data/misc/user/0/cacerts-added/e93dbc37.0: Permission denied

<!-- gh-comment-id:788646535 --> @castrojr913 commented on GitHub (Mar 2, 2021): > > @yauheniprakapenka Curious! Is it solved on your side? > > On my physical device, the problem no longer happens from Monday to this Friday. > > 1. On my MacBook in Wi-Fi DNS added 8.8.8.8 > 2. I did not add DNS on the device, only proxy address and port @yauheniprakapenka How did u resolve it? I keep trying through Android emulator and It doesn't work. I've followed steps, installed certificate and it's marked as Trusted one in User tab. The same thing that u faced, browser requests are caught by ProxyMan but It doesn't catch my mobile app requests. UPDATE: I've checked emulator version out and it's a Pixel one. When I try overriding its settings, it displays an ADB error on step 5: `adb: error: stat failed when trying to push to /data/misc/user/0/cacerts-added/e93dbc37.0: Permission denied`
Author
Owner

@NghiaTranUIT commented on GitHub (Mar 2, 2021):

@castrojr913 Are you using Native Android or React Native for Android apps?

  • If it's a native Android, which Network Library you're using 🤔
  • If it's a React Native, I'm aware that it needs extra configs to make it works.

If you can see the traffic from the Browser on Android Emulator, but not your app. It means that your network library doesn't respect the HTTP/HTTPS Proxy

<!-- gh-comment-id:788647993 --> @NghiaTranUIT commented on GitHub (Mar 2, 2021): @castrojr913 Are you using Native Android or React Native for Android apps? - If it's a native Android, which Network Library you're using 🤔 - If it's a React Native, I'm aware that it needs extra configs to make it works. If you can see the traffic from the Browser on Android Emulator, but not your app. It means that your network library doesn't respect the HTTP/HTTPS Proxy
Author
Owner

@NghiaTranUIT commented on GitHub (Mar 2, 2021):

@castrojr913 here is troubleshooting that I collect for Android Emulator: https://docs.proxyman.io/troubleshooting/my-ios-devices-couldnt-connect-to-proxyman-via-proxy#1-after-setting-http-proxy-in-wifi-setting-i-could-not-open-http-proxy-man-ssl

Or you can use Automatic Script for Android Emulator: https://docs.proxyman.io/debug-devices/android-device/automatic-script-for-android-emulator

<!-- gh-comment-id:788648866 --> @NghiaTranUIT commented on GitHub (Mar 2, 2021): @castrojr913 here is troubleshooting that I collect for Android Emulator: https://docs.proxyman.io/troubleshooting/my-ios-devices-couldnt-connect-to-proxyman-via-proxy#1-after-setting-http-proxy-in-wifi-setting-i-could-not-open-http-proxy-man-ssl Or you can use Automatic Script for Android Emulator: https://docs.proxyman.io/debug-devices/android-device/automatic-script-for-android-emulator
Author
Owner

@castrojr913 commented on GitHub (Mar 2, 2021):

@castrojr913 Are you using Native Android or React Native for Android apps?

  • If it's a native Android, which Network Library you're using 🤔
  • If it's a React Native, I'm aware that it needs extra configs to make it works.

If you can see the traffic from the Browser on Android Emulator, but not your app. It means that your network library doesn't respect the HTTP/HTTPS Proxy

@NghiaTranUIT Xamarin Forms and I'm using Rider IDE. Network library is Refit.

<!-- gh-comment-id:788649890 --> @castrojr913 commented on GitHub (Mar 2, 2021): > @castrojr913 Are you using Native Android or React Native for Android apps? > > * If it's a native Android, which Network Library you're using 🤔 > * If it's a React Native, I'm aware that it needs extra configs to make it works. > > If you can see the traffic from the Browser on Android Emulator, but not your app. It means that your network library doesn't respect the HTTP/HTTPS Proxy @NghiaTranUIT Xamarin Forms and I'm using Rider IDE. Network library is [Refit](https://github.com/reactiveui/refit).
Author
Owner

@NghiaTranUIT commented on GitHub (Mar 2, 2021):

Yay @castrojr913 , it's a third-party network library. We have to manually set the Proxy Server for Refit.

Proxyman is listening at 127.0.0.1 port 9090

You should try this solution: https://github.com/reactiveui/refit/issues/123#issuecomment-71534478

<!-- gh-comment-id:788651177 --> @NghiaTranUIT commented on GitHub (Mar 2, 2021): Yay @castrojr913 , it's a third-party network library. We have to manually set the Proxy Server for Refit. Proxyman is listening at 127.0.0.1 port 9090 You should try this solution: https://github.com/reactiveui/refit/issues/123#issuecomment-71534478
Author
Owner

@castrojr913 commented on GitHub (Mar 3, 2021):

@NghiaTranUIT Good point sir. Thank u so much. Regarding that suggested implementation, I added ServerCertificateCustomValidationCallback property in order to ignore SSL errors.

new HttpClientHandler
{
    UseProxy = true,
    Proxy = new WebProxy(ProxyUrl, false),
    ServerCertificateCustomValidationCallback =  (sender, cert, chain, sslPolicyErrors) => true // Ignore SSL errors
}

ProxyUrl is http://proxyman_ip:proxyman_port

<!-- gh-comment-id:789396045 --> @castrojr913 commented on GitHub (Mar 3, 2021): @NghiaTranUIT Good point sir. Thank u so much. Regarding that suggested implementation, I added **ServerCertificateCustomValidationCallback** property in order to ignore SSL errors. ``` new HttpClientHandler { UseProxy = true, Proxy = new WebProxy(ProxyUrl, false), ServerCertificateCustomValidationCallback = (sender, cert, chain, sslPolicyErrors) => true // Ignore SSL errors } ``` **ProxyUrl** is http://**proxyman_ip**:**proxyman_port**
Author
Owner

@NghiaTranUIT commented on GitHub (Mar 3, 2021):

Glad to know it works 😄 🌮

<!-- gh-comment-id:789396412 --> @NghiaTranUIT commented on GitHub (Mar 3, 2021): Glad to know it works 😄 🌮
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Proxyman#634
No description provided.