mirror of
https://github.com/ProxymanApp/atlantis.git
synced 2026-04-26 08:26:04 +03:00
[GH-ISSUE #26] Support WebSocket #23
Labels
No labels
Done
Done
Windows
bug
bug
bug
enhancement
enhancement
enhancement
good first issue
hacktoberfest
pull-request
wontfix
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/atlantis#23
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 @NghiaTranUIT on GitHub (Nov 3, 2020).
Original GitHub issue: https://github.com/ProxymanApp/atlantis/issues/26
Originally assigned to: @NghiaTranUIT on GitHub.
Description
We can do "Method Swizzling" for
send(_:completionHandler:)andreceive(completionHandler:)fromURLSessionWebSocketTaskto capture the WS/WSS messages.We should support this feature 👍
Acceptance Criteria
If you have the same feature request, please add 👍 on this ticket.
@bastianh commented on GitHub (Jan 9, 2021):
this would be really helpful .. is there a easy way to add sending the data manually over the library ?
@NghiaTranUIT commented on GitHub (Jan 10, 2021):
@bastianh It's possible to manually send the request/response to Proxyman by Atlantis. Please check out https://github.com/ProxymanApp/atlantis#advanced-usage
It's useful for apps that are using GRPC, C++ libraries, or other formats that haven't supported yet 👍
@bastianh commented on GitHub (Jan 10, 2021):
Yes.. I saw that .. but I have no idea how to do that for a websocket connection..
I'm starting it with this snippet:
and then get only callbacks for message that I receive.
@NghiaTranUIT commented on GitHub (Jan 10, 2021):
Sorry for this. The code I show you only work with HTTP/HTTPS request/response, not WS/WSS for now :/
I will add this feature to the next release 👍
@bastianh commented on GitHub (Jan 10, 2021):
great... thank you
@NghiaTranUIT commented on GitHub (Apr 9, 2021):
The good news here 🎉
I'm working on this ticket, so we can capture the WS/WSS from your iOS with ease.
This feature might be a reasonable solution to fix the bug that Proxyman app couldn't capture WS/WSS from URLSessionWebsocketTask (https://github.com/ProxymanApp/Proxyman/issues/586#issuecomment-720197948)
@youjinp commented on GitHub (Apr 17, 2021):
I've just tried this new update, and it's working with WSS from URLSessionWebsocketTask 😀! Thanks for the update!
However I also tried it on Starscream and it didn't work 😕. I've read their source code and it seems like they're not using
__NSURLSessionWebSocketTaskbut instead some low level CoreFoundation APICFStreamCreatePairWithSocketToHost?Do you have any idea how to approach that? It doesn't seem like a method that can be swizzled? Seems to me like a function.. (I'm not super fluent with Objective-C)
@NghiaTranUIT commented on GitHub (Apr 17, 2021):
@youjinp let set
useCustomEngine: false, so Starscream can use Native Engine (URLSessionWebsocket).@NghiaTranUIT commented on GitHub (Apr 17, 2021):
For low-level CoreFoundation API CFStreamCreatePairWithSocketToHost, I suppose that it's impossible to do Method Swizzling because it's a C func, not Objective-C
@youjinp commented on GitHub (Apr 17, 2021):
Yep. Thought so 👍
@NghiaTranUIT commented on GitHub (May 27, 2021):
@youjinp Just a friendly reminder that Atlantis has supported WS/WSS from URLSessionWebSocketTask 👍
Release: https://github.com/ProxymanApp/atlantis/releases/tag/1.9.0