mirror of
https://github.com/ProxymanApp/Proxyman.git
synced 2026-04-26 08:35:53 +03:00
[GH-ISSUE #1220] [Enhancement] Direct merge Proxyman certificate to python certs #1214
Labels
No labels
Discussion
Feature request
In Progress...
Plugins
Waiting response
Windows
Windows
bug
duplicate
enhancement
feature
good first issue
iOS
macOS 10.11
question
wontfix
✅ Done
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Proxyman#1214
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @novitae on GitHub (May 3, 2022).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1220
Originally assigned to: @NghiaTranUIT on GitHub.
Hello,
I recently have few issues with my certs in python and Proxyman. I of course followed what is written here, but a lot of certificate bugs happened with other modules than requests.
httpxandaiohttpwere makingcertsslverifyerrorwith the method written in the documentation. By replacing directlycertificertificate, when Proxyman was closed all (requests,httpxandaiohttp) were makingcertsslverifyerror.I found a solution, and made this little script:
It allows to add directly the content of Proxyman's .pem root ca to the certificates of
certifimodule of python. It is very simple to use, by makingpython file.py add (or) remove.addwill ask the path to root certificate of Proxyman, and will merge it to certifi.removewill match the previous one added, and remove it from the file.All is made to, if removed, don't keep additional breaklines, to be the cleanest as possible.
The traffic will be captured for all modules that needs to make requests, wether Proxyman is opened or closed. And if this method causes errors for other people, at least you just have to run
python file.py remove.@NghiaTranUIT commented on GitHub (May 3, 2022):
Thanks for your hard work @novitae 🙌
I will add your script to our Python Doc, so others can manually run it on their machine.
I don't think that I should add your script to Proxyman (to automatically perform) because python2 is completely removed from macOS 12.3.1.
@novitae commented on GitHub (May 3, 2022):
Anyway it is not python2-compatible so it's not a problem 😄
@novitae commented on GitHub (May 3, 2022):
@NghiaTranUIT This script works well for what all what I tried, but I didn't tested all python capabilities with it. As an example, I got my first error due to this technique, I'm getting ssl error with
pippackage when Proxyman is opened and running with SSL Proxying list targeting python.I must run
pip install PACKAGE_NAME --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.orgto bypass this.I don't know what you wanted to do in the documentation, but don't remove the previous written things because it seems that all methods have it strengths and its weakness. Just append mine if you want, but don't remove other methods.
@azarouski commented on GitHub (Sep 8, 2022):
@novitae Big thanks for this script. When i used it I noticed that regex part it not fully matched with my certificate, so in result of my little research i found that in
...[A-Za-z0-9\/\+\n]{1,}...you need to add
=sign.Result should look like
...[A-Za-z0-9\/\+\n=]{1,}...@novitae commented on GitHub (Sep 16, 2022):
little update about this script, thanks to @azarouski
also added new path verification because the old one was trash
@NghiaTranUIT commented on GitHub (Sep 16, 2022):
Thanks for the script @novitae 🎉 . I will add it to the Python Document 🙌
@johnnyoshika commented on GitHub (Nov 14, 2023):
This is great! As the Windows version of Proxyman still doesn't offer the automatic setup option in Terminal, this script worked like a charm.
@NghiaTranUIT commented on GitHub (Nov 15, 2023):
Just a friendly reminder that this script can be automatically done with an Automatic Setup feature on the latest Proxyman macOS.
Just start the pre-configured Terminal -> Run your Python script here
Proxyman auto:
@johnnyoshika you're right, This feature is only available on the macOS. We soon support on Windows and Linux 👍
@johnnyoshika commented on GitHub (Nov 15, 2023):
Yes, on macOS it works great! You can even launch VSCode (
code .) from a Proxyman launched terminal and VSCode's terminal will be configured to proxy through Proxyman as well. I tested this with Python and Node and they both worked well.Windows on the other hand is much more difficult. I got python to work through the script provided above but I've been less successful with Node, despite following the
Old Techniquesolutions here: https://docs.proxyman.io/debug-devices/nodejs@NghiaTranUIT commented on GitHub (Nov 15, 2023):
May I ask @johnnyoshika
@johnnyoshika commented on GitHub (Nov 15, 2023):
I use both Powershell and WSL, but mostly Powershell
@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 👍
@johnnyoshika commented on GitHub (Oct 5, 2024):
Even in Windows?
@NghiaTranUIT commented on GitHub (Oct 6, 2024):
@johnnyoshika Automatic Script is only available on Windows 👍