[GH-ISSUE #672] SSL Handshake Failed & enable all SSL requests for remote devices #668

Open
opened 2026-03-03 19:20:49 +03:00 by kerem · 7 comments
Owner

Originally created by @rainb3rry on GitHub (Oct 29, 2020).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/672

Originally assigned to: @NghiaTranUIT on GitHub.

Proxyman version? 2.10.0

macOS Version? 10.15.6

Steps to reproduce

I'm trying intercept https requests coming from my NoxPlayer android emulator, activated and truested ssl certificates on mac and emulator, added the proxy options to emulator.

I can see requests on Remote devices tab in Proxyman app, but i got SSL Handshake Failed error even though certificates installed on devices.
The error:

handshakeFailed(NIOSSL.BoringSSLError.sslError([Error: 268436498 error:10000412:SSL routines:OPENSSL_internal:SSLV3_ALERT_BAD_CERTIFICATE]))

Expected behavior

I just want to see and intercept all requests from my emulator smoothly.

BTW, is there any option to enable all ssl responses for emulator like in apps, I can see only Enable only this domain button, i would like to enable all domains for my emulator too.
image

Originally created by @rainb3rry on GitHub (Oct 29, 2020). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/672 Originally assigned to: @NghiaTranUIT on GitHub. ### Proxyman version? `2.10.0` ### macOS Version? `10.15.6` ### Steps to reproduce I'm trying intercept https requests coming from my NoxPlayer android emulator, activated and truested ssl certificates on mac and emulator, added the proxy options to emulator. I can see requests on `Remote devices` tab in Proxyman app, but i got `SSL Handshake Failed` error even though certificates installed on devices. The error: ``` handshakeFailed(NIOSSL.BoringSSLError.sslError([Error: 268436498 error:10000412:SSL routines:OPENSSL_internal:SSLV3_ALERT_BAD_CERTIFICATE])) ``` ### Expected behavior I just want to see and intercept all requests from my emulator smoothly. BTW, is there any option to enable all ssl responses for emulator like in apps, I can see only `Enable only this domain` button, i would like to enable all domains for my emulator too. ![image](https://user-images.githubusercontent.com/26173028/97517799-f45e0500-19a6-11eb-81cb-7745f10f75ac.png)
Author
Owner

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

Hi @rainb3rry,

It's the first time I hear "NoxPlayer android emulator". Maybe it requires extra steps to make it works.

Can you try Android Emulator from Android Studio? If you use it, you can run our built-in script (https://docs.proxyman.io/debug-devices/android-device/automatic-script-for-android-emulator) to do all tasks automatically (includes HTTP Proxy, Install, and Trust certificates).

Btw, can you share with us what Android version are you using? Because if it's Android 11+, you have to manually trust the Certificate in the system. Read more at: https://docs.proxyman.io/troubleshooting/my-ios-devices-couldnt-connect-to-proxyman-via-proxy#2-install-and-trust-proxyman-ca-for-android-with-api-30


Regarding the Enable from app in Android Emulator, it's technically impossible since we don't know where the traffic from if it's from the physical or emulator. It's possible on macOS because we can access to iptable.

<!-- gh-comment-id:718319616 --> @NghiaTranUIT commented on GitHub (Oct 29, 2020): Hi @rainb3rry, It's the first time I hear "NoxPlayer android emulator". Maybe it requires extra steps to make it works. Can you try Android Emulator from Android Studio? If you use it, you can run our built-in script (https://docs.proxyman.io/debug-devices/android-device/automatic-script-for-android-emulator) to do all tasks automatically (includes HTTP Proxy, Install, and Trust certificates). Btw, can you share with us what Android version are you using? Because if it's Android 11+, you have to manually trust the Certificate in the system. Read more at: https://docs.proxyman.io/troubleshooting/my-ios-devices-couldnt-connect-to-proxyman-via-proxy#2-install-and-trust-proxyman-ca-for-android-with-api-30 ------------- Regarding the Enable from app in Android Emulator, it's technically impossible since we don't know where the traffic from if it's from the physical or emulator. It's possible on macOS because we can access to iptable.
Author
Owner

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

There is one more scenario that your config in your project yet:

  • Add res/xml/network_security_config.xml
  • Add to AndroidManifest.xml
  • Make sure you replace your_production_domain with your real domains that you're going to intercept.

Please check out the Step 4 at https://docs.proxyman.io/debug-devices/android-device#android-setup-guide

<!-- gh-comment-id:718320241 --> @NghiaTranUIT commented on GitHub (Oct 29, 2020): There is one more scenario that your config in your project yet: - Add res/xml/network_security_config.xml - Add to AndroidManifest.xml - Make sure you replace your_production_domain with your real domains that you're going to intercept. Please check out the Step 4 at https://docs.proxyman.io/debug-devices/android-device#android-setup-guide
Author
Owner

@rainb3rry commented on GitHub (Oct 29, 2020):

Hey @NghiaTranUIT thanks for quick response.

My android version is 7.1.2 and I want to say I'm not working on my own android app I'm trying to intercept some apps traffic like instagram and https websites on android browser but i cannot see the requests and responses smoothly on the Proxyman app.

I see CONNECT text on method column in requests row on remote device tab, i would like to see POST or GET requests instead of CONNECT and this requests have 999 error code.

I'm getting same issue likewise when I try to connect https://google.com (I enabled ssl for that domain) on android browser,
image

I can see post and get requests for mac apps perfectly but i cannot see for 192.168.2.112 remote device (Noxplayer emulator).

Btw, i see my mac name on certificate that installed android side, is that okay?
image

<!-- gh-comment-id:718333213 --> @rainb3rry commented on GitHub (Oct 29, 2020): Hey @NghiaTranUIT thanks for quick response. My android version is 7.1.2 and I want to say I'm not working on my own android app I'm trying to intercept some apps traffic like instagram and https websites on android browser but i cannot see the requests and responses smoothly on the Proxyman app. I see `CONNECT` text on method column in requests row on remote device tab, i would like to see `POST` or `GET` requests instead of `CONNECT` and this requests have 999 error code. I'm getting same issue likewise when I try to connect `https://google.com` (I enabled ssl for that domain) on android browser, ![image](https://user-images.githubusercontent.com/26173028/97521348-756cca80-19ae-11eb-915b-c13cde76ef0d.png) I can see post and get requests for mac apps perfectly but i cannot see for 192.168.2.112 remote device (Noxplayer emulator). Btw, i see my mac name on certificate that installed android side, is that okay? ![image](https://user-images.githubusercontent.com/26173028/97521109-e65fb280-19ad-11eb-9640-a21b5b1e7dae.png)
Author
Owner

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

So, if you're trying to intercept other apps (not the one you're own) from Android. It's impossible unfortunately (even though it's possible in iOS)

Because Android requires configurations in network_security_config.xml and AndroidManifest.xml in order to intercept the HTTPS Traffic.

Therefore, you see SSL Error. It's correct behavior

<!-- gh-comment-id:718336773 --> @NghiaTranUIT commented on GitHub (Oct 29, 2020): So, if you're trying to intercept other apps (not the one you're own) from Android. It's impossible unfortunately (even though it's possible in iOS) Because Android requires configurations in network_security_config.xml and AndroidManifest.xml in order to intercept the HTTPS Traffic. Therefore, you see SSL Error. It's correct behavior
Author
Owner

@rainb3rry commented on GitHub (Oct 29, 2020):

Hmm, so i cannot intercept even in browser actions (ssl websites) on android? It's was doing that on Burp Suite.
So, can I do that and ios apps on external IOS device?

Thanks.

<!-- gh-comment-id:718340746 --> @rainb3rry commented on GitHub (Oct 29, 2020): Hmm, so i cannot intercept even in browser actions (ssl websites) on android? It's was doing that on Burp Suite. So, can I do that and ios apps on external IOS device? Thanks.
Author
Owner

@rainb3rry commented on GitHub (Oct 29, 2020):

I tried on IOS now and it's worked on safari browser for ssl websites but I'm getting same error on instagram app, that's because of some development settings of the instagram app?
If so, how they intercept a mobile app API structure and write an unofficial API based the mobile app API (like https://github.com/dilame/instagram-private-api)

Edit: I tried on another app and it's worked beautifully, digressive but how can I see instagram app API do you know 😂 like above repository.

Thanks for your help.

<!-- gh-comment-id:718343595 --> @rainb3rry commented on GitHub (Oct 29, 2020): I tried on IOS now and it's worked on safari browser for ssl websites but I'm getting same error on instagram app, that's because of some development settings of the instagram app? If so, how they intercept a mobile app API structure and write an unofficial API based the mobile app API (like https://github.com/dilame/instagram-private-api) Edit: I tried on another app and it's worked beautifully, digressive but how can I see instagram app API do you know 😂 like above repository. Thanks for your help.
Author
Owner

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

Yay, famous iOS apps are already used SSL Pinning techniques to prevent man-in-the-middle app like Proxyman or Charles to intercept their https traffic. Therefore you couldn’t intercept it unless you are Instagram developers who have the company certificates.

You can by pass it by using a jailbreak iOS device or rooted Android device to force the app to trust Proxyman certificate. Thus, you can get HTTPs traffic 😁

<!-- gh-comment-id:718344909 --> @NghiaTranUIT commented on GitHub (Oct 29, 2020): Yay, famous iOS apps are already used SSL Pinning techniques to prevent man-in-the-middle app like Proxyman or Charles to intercept their https traffic. Therefore you couldn’t intercept it unless you are Instagram developers who have the company certificates. You can by pass it by using a jailbreak iOS device or rooted Android device to force the app to trust Proxyman certificate. Thus, you can get HTTPs traffic 😁
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#668
No description provided.