[GH-ISSUE #948] SSL Handshake Failed when listen Python #942

Open
opened 2026-03-03 19:23:13 +03:00 by kerem · 7 comments
Owner

Originally created by @Drovosek01 on GitHub (Aug 1, 2021).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/948

Originally assigned to: @NghiaTranUIT on GitHub.

Proxyman version? (Ex. Proxyman 1.4.3)

2.30.0

macOS Version? (Ex. mac 10.14)

macOS 10.14.6

Steps to reproduce

  1. Execute in terminal - /bin/bash -c "$(curl -fsSL https://gist.githubusercontent.com/ThisIsNoahEvans/f595e2e59ff4a00fdcf2decdc4415428/raw/install.sh)"
  2. Start listen Python in ProxyMan
  3. Open Adobe Packager.command in Application folder

Expected behavior

I expect to see the standard data display in the Response clause

Screenshots (optional)

image
image
image

Originally created by @Drovosek01 on GitHub (Aug 1, 2021). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/948 Originally assigned to: @NghiaTranUIT on GitHub. ### Proxyman version? (Ex. Proxyman 1.4.3) 2.30.0 ### macOS Version? (Ex. mac 10.14) macOS 10.14.6 ### Steps to reproduce 1. Execute in terminal - `/bin/bash -c "$(curl -fsSL https://gist.githubusercontent.com/ThisIsNoahEvans/f595e2e59ff4a00fdcf2decdc4415428/raw/install.sh)"` 2. Start listen Python in ProxyMan 3. Open Adobe Packager.command in Application folder ### Expected behavior I expect to see the standard data display in the Response clause ### Screenshots (optional) ![image](https://user-images.githubusercontent.com/29478700/127768851-1bb7bd68-b512-407d-831e-16ab02d5ca01.png) ![image](https://user-images.githubusercontent.com/29478700/127768853-f4ef1583-dd2d-4a34-9ec4-68adfd8c72c9.png) ![image](https://user-images.githubusercontent.com/29478700/127768879-96095036-99d4-435f-a174-972784b2ffb6.png)
Author
Owner

@NghiaTranUIT commented on GitHub (Aug 1, 2021):

Hey @Drovosek01 Thanks for the report.

From the last screenshot, it seems Python doesn't trust self-signed certificate by default. As a result, SSL would be failed.

You have to tell Python to use Proxyman Root Certificate at ~/.proxyman/proxyman-ca.pem (I assume that you've installed and trust the Certificate, if not please follow Certificate Menu -> Install Certificate on This Mac).

Here is some solutions, which I found in StackOverflow:

  1. https://stackoverflow.com/a/46337779/3127477
export SSL_CERT_FILE=~/.proxyman/proxyman-ca.pem
  1. https://stackoverflow.com/a/43935319/3127477
export REQUESTS_CA_BUNDLE=~/.proxyman/proxyman-ca.pem
  1. Or Googling with macos python trust self signed certificate

Please try one of them and I believe that it would fix your problem 👍

<!-- gh-comment-id:890520435 --> @NghiaTranUIT commented on GitHub (Aug 1, 2021): Hey @Drovosek01 Thanks for the report. From the last screenshot, it seems Python doesn't trust self-signed certificate by default. As a result, SSL would be failed. You have to tell Python to use Proxyman Root Certificate at `~/.proxyman/proxyman-ca.pem` (I assume that you've installed and trust the Certificate, if not please follow Certificate Menu -> Install Certificate on This Mac). Here is some solutions, which I found in StackOverflow: 1. https://stackoverflow.com/a/46337779/3127477 ``` export SSL_CERT_FILE=~/.proxyman/proxyman-ca.pem ``` 2. https://stackoverflow.com/a/43935319/3127477 ``` export REQUESTS_CA_BUNDLE=~/.proxyman/proxyman-ca.pem ``` 3. Or Googling with `macos python trust self signed certificate` Please try one of them and I believe that it would fix your problem 👍
Author
Owner

@Drovosek01 commented on GitHub (Aug 1, 2021):

Thank you very much, I managed to fix the error with Python only on the third attempt, when I saved this in bash_profile

image

It seems to me that it will be useful to add this information to the Proxyman documentation and to the menu items, where the "Install Certificate on" items are..."

image

<!-- gh-comment-id:890591021 --> @Drovosek01 commented on GitHub (Aug 1, 2021): Thank you very much, I managed to fix the error with Python only on the third attempt, when I saved this in bash_profile ![image](https://user-images.githubusercontent.com/29478700/127785714-3a0c1a47-46ab-4745-96b1-af2d23550743.png) It seems to me that it will be useful to add this information to the Proxyman documentation and to the menu items, where the "Install Certificate on" items are..." ![image](https://user-images.githubusercontent.com/29478700/127786084-0f7634d9-94cd-496f-b4da-bae50e5d5382.png)
Author
Owner

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

Glad to know that it works 😄

It makes sense to add this document to the Certificate Menu. I'm going to implement it now 👍

<!-- gh-comment-id:890653430 --> @NghiaTranUIT commented on GitHub (Aug 2, 2021): Glad to know that it works 😄 It makes sense to add this document to the Certificate Menu. I'm going to implement it now 👍
Author
Owner
<!-- gh-comment-id:891747060 --> @NghiaTranUIT commented on GitHub (Aug 3, 2021): Done 🎉 Beta build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_2.30.0_Update_Certificate_guideline_for_ruby_and_python.dmg <img width="525" alt="Screen Shot 2021-08-03 at 17 52 57" src="https://user-images.githubusercontent.com/5878421/128003904-3aa897cb-5d89-4c6d-8a9e-6ba1e3f83bda.png">
Author
Owner

@Drovosek01 commented on GitHub (Aug 4, 2021):

But now, after I executed the above commands in the terminal, the python script without Proxyman stopped working for me.
That is, when Proxyman is running, the Python script runs without errors.

If I close Proxyman, and then run the Python script again, the following errors appear:

image

I managed to fix them when I commented out the last line in the file ."bash_profile"

image

Please add this information to the documentation.

<!-- gh-comment-id:892568668 --> @Drovosek01 commented on GitHub (Aug 4, 2021): But now, after I executed the above commands in the terminal, the python script without Proxyman stopped working for me. That is, when Proxyman is running, the Python script runs without errors. If I close Proxyman, and then run the Python script again, the following errors appear: ![image](https://user-images.githubusercontent.com/29478700/128168716-09ef801d-f98f-4417-8e4e-c0453d5a6ca6.png) I managed to fix them when I commented out the last line in the file ."bash_profile" ![image](https://user-images.githubusercontent.com/29478700/128170670-a8039149-cfcf-4c73-bf44-c55e4b785c60.png) Please add this information to the documentation.
Author
Owner

@NghiaTranUIT commented on GitHub (Aug 4, 2021):

Thanks for your insight @Drovosek01 I will add to the Doc 👍

<!-- gh-comment-id:892569764 --> @NghiaTranUIT commented on GitHub (Aug 4, 2021): Thanks for your insight @Drovosek01 I will add to the Doc 👍
Author
Owner

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

FYI: We can capture all HTTPS Traffic from Python with the Auto Setup (https://docs.proxyman.io/debug-devices/python)

No need to config the Proxy or manually trust the self-signed certificate on your Python code 👍

<!-- gh-comment-id:2376334346 --> @NghiaTranUIT commented on GitHub (Sep 26, 2024): FYI: We can capture all HTTPS Traffic from Python with the Auto Setup (https://docs.proxyman.io/debug-devices/python) No need to config the Proxy or manually trust the self-signed certificate on your Python code 👍
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#942
No description provided.