[GH-ISSUE #71] Send request to Proxyman on start of request #48

Open
opened 2026-03-03 19:11:18 +03:00 by kerem · 2 comments
Owner

Originally created by @djbe on GitHub (May 12, 2021).
Original GitHub issue: https://github.com/ProxymanApp/atlantis/issues/71

Originally assigned to: @NghiaTranUIT on GitHub.

Based on https://github.com/ProxymanApp/atlantis/issues/28#issuecomment-840056741:

Right now, Atlantis only sends a message to Proxyman when a requests finishes (success or failure). But, since TrafficPackage have an ID (here), nothing should stop us from sending the info before the start of a call, and then when a call finishes, send the updated package and have Proxyman update the call/row as needed.

Note that this is how Bagel works, which Atlantis is (kinda) based on:

  • Bagel sends a message at the start of a request (with only the request content), and a second message at the end of a request with the full info (request, response, etc...)
  • Proxyman only expects a message at the end of a request.

Right now, if we modify Atlantis to send the traffic package at the start (inside injectorSessionDidCallResume), the call will appear twice in Proxyman: one "active" incomplete call, and one "completed" call with all the data (see screenshot).

Screen Shot 2021-05-12 at 21 54 22

Todo:

  • Update Proxyman to handle traffic packages with the same ID, and consolidate them.
  • Update Atlantis to send out the traffic package on resume (inside injectorSessionDidCallResume)
Originally created by @djbe on GitHub (May 12, 2021). Original GitHub issue: https://github.com/ProxymanApp/atlantis/issues/71 Originally assigned to: @NghiaTranUIT on GitHub. Based on https://github.com/ProxymanApp/atlantis/issues/28#issuecomment-840056741: Right now, Atlantis only sends a message to Proxyman when a requests finishes (success or failure). But, since `TrafficPackage` have an ID ([here](https://github.com/ProxymanApp/atlantis/blob/main/Sources/Packages.swift#L55)), nothing should stop us from sending the info before the start of a call, and then when a call finishes, send the updated package and have Proxyman update the call/row as needed. Note that this is how Bagel works, which Atlantis is (kinda) based on: - Bagel sends a message at the **start** of a request (with only the request content), and a second message at the **end** of a request with the full info (request, response, etc...) - Proxyman only expects a message at the **end** of a request. Right now, if we modify Atlantis to send the traffic package at the start (inside `injectorSessionDidCallResume`), the call will appear twice in Proxyman: one "active" incomplete call, and one "completed" call with all the data (see screenshot). <img width="1141" alt="Screen Shot 2021-05-12 at 21 54 22" src="https://user-images.githubusercontent.com/641356/118043050-29470d80-b375-11eb-948f-04e0b24358c5.png"> Todo: - [ ] Update Proxyman to handle traffic packages with the same ID, and consolidate them. - [ ] Update Atlantis to send out the traffic package on resume (inside [injectorSessionDidCallResume](https://github.com/ProxymanApp/atlantis/blob/main/Sources/Atlantis.swift#L218))
Author
Owner

@NghiaTranUIT commented on GitHub (May 13, 2021):

I'm afraid it's too difficult to change the logic from Atlantis and Proxyman, which is live on the Production.

I would highly recommend that you might update your Kotlin code to send a message to Proxyman in a single package (when you have a Request and a Response)

<!-- gh-comment-id:840249674 --> @NghiaTranUIT commented on GitHub (May 13, 2021): I'm afraid it's too difficult to change the logic from Atlantis and Proxyman, which is live on the Production. I would highly recommend that you might update your Kotlin code to send a message to Proxyman in a single package (when you have a Request and a Response)
Author
Owner

@djbe commented on GitHub (May 13, 2021):

Note that for #28, we've indeed changed the logic for now to only send it once. I made a separate issue for this, as it could be an improvement in general, especially for long lived network operations.

While it would indeed require changes to Proxyman itself, it wouldn't be the first time Proxyman or Atlantis require a new (or minimum) version of each other? See for example the latest Atlantis 1.9.0 version, which requires Proxyman 2.24 or higher, because of the addition of websocket logging.

<!-- gh-comment-id:840602246 --> @djbe commented on GitHub (May 13, 2021): Note that for #28, we've indeed changed the logic for now to only send it once. I made a separate issue for this, as it could be an improvement in general, especially for long lived network operations. While it would indeed require changes to Proxyman itself, it wouldn't be the first time Proxyman or Atlantis require a new (or minimum) version of each other? See for example the latest Atlantis 1.9.0 version, which requires Proxyman 2.24 or higher, because of the addition of websocket logging.
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/atlantis#48
No description provided.