mirror of
https://github.com/ProxymanApp/Proxyman.git
synced 2026-04-26 16:45:57 +03:00
[GH-ISSUE #1680] SSL interception does not work when using a custom User-Agent header #1675
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#1675
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 @Ricardo1980 on GitHub (Jun 14, 2023).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1680
Description
When I add this line of code to my app:
request.addValue("User-Agent", forHTTPHeaderField: "lbroutingkey/canary")Then SSL interception does not work and I see the error:
SSL Handshake FailedAnd if I remove that line of code, it works.
BTW, with that line of code I want to overwrite the default value, which is perfectly valid. (The default value is
DemoAppInternal/69 CFNetwork/1406.0.4 Darwin/22.3.0in my app, but I don't want to send that)Steps to Reproduce
Add the previous line of code and add your network requests to the SSL proxy list to see the content in Proxyman.
When your app sends a network request, you will not see the content in ProxyMan.
Current Behavior
I see
SSL Handshake FailedExpected Behavior
No error. I should be able to see the content of the network requests.
Environment
@NghiaTranUIT commented on GitHub (Jun 14, 2023):
It's odd, the Header doesn't affect the SSL Proxying.
Can you fix your code, it should be:
instead of
@Ricardo1980 commented on GitHub (Jun 14, 2023):
Thanks @NghiaTranUIT
I didn't realise key/value were reversed.
I fixed that and now ProxyMan is working fine.
In any case, I don't understand why it does not work if key/value is reversed.
Close the ticket if you want, or leave it open to take a look.
Thanks a lot!
@NghiaTranUIT commented on GitHub (Jun 14, 2023):
yes, I'm not sure about it too. It seems the URLSession is failed if the Header-Value is invalid.