[GH-ISSUE #745] Is it possible to write to the local file or sent get/post requests via Scripting? #742

Open
opened 2026-03-03 19:21:30 +03:00 by kerem · 10 comments
Owner

Originally created by @amorphius on GitHub (Dec 30, 2020).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/745

Originally assigned to: @NghiaTranUIT on GitHub.

I want to use Proxyman as middleman and pass some intercepted data to another application. So I need somehow to communicate with it. Either via local file or with simple http request. Is it possible?

Originally created by @amorphius on GitHub (Dec 30, 2020). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/745 Originally assigned to: @NghiaTranUIT on GitHub. I want to use Proxyman as middleman and pass some intercepted data to another application. So I need somehow to communicate with it. Either via local file or with simple http request. Is it possible?
Author
Owner

@NghiaTranUIT commented on GitHub (Dec 30, 2020):

Maybe it's possible by using the Scripting tool 🤔

You can use JS to write to flow onRequest or onResponse to a file (This feature has not implemented yet, it's just an idea)

<!-- gh-comment-id:752629378 --> @NghiaTranUIT commented on GitHub (Dec 30, 2020): Maybe it's possible by using the Scripting tool 🤔 You can use JS to write to flow `onRequest` or `onResponse` to a file (This feature has not implemented yet, it's just an idea)
Author
Owner

@NghiaTranUIT commented on GitHub (Dec 30, 2020):

You can checkout this ticket: #741 because it might be related

<!-- gh-comment-id:752635448 --> @NghiaTranUIT commented on GitHub (Dec 30, 2020): You can checkout this ticket: #741 because it might be related
Author
Owner

@amorphius commented on GitHub (Dec 30, 2020):

Yes, this seems related. And is it possible to make http request? Similar to fetch

<!-- gh-comment-id:752636002 --> @amorphius commented on GitHub (Dec 30, 2020): Yes, this seems related. And is it possible to make http request? Similar to `fetch`
Author
Owner

@NghiaTranUIT commented on GitHub (Dec 30, 2020):

at the moment, it's not possible because the script runs synchronize, not async (Promise doesn't fully support). If you can make a fetch works synchronize, I suppose that it should work

<!-- gh-comment-id:752636339 --> @NghiaTranUIT commented on GitHub (Dec 30, 2020): at the moment, it's not possible because the script runs synchronize, not async (Promise doesn't fully support). If you can make a `fetch` works synchronize, I suppose that it should work
Author
Owner

@NghiaTranUIT commented on GitHub (Dec 30, 2020):

Write to file is easier, so I can support it if you like 😄

<!-- gh-comment-id:752636428 --> @NghiaTranUIT commented on GitHub (Dec 30, 2020): Write to file is easier, so I can support it if you like 😄
Author
Owner

@amorphius commented on GitHub (Dec 30, 2020):

That would be great 👍👍👍

<!-- gh-comment-id:752640063 --> @amorphius commented on GitHub (Dec 30, 2020): That would be great 👍👍👍
Author
Owner

@amorphius commented on GitHub (Dec 30, 2020):

BTW how can I use synchronous fetch? How to import it into my script?

<!-- gh-comment-id:752642185 --> @amorphius commented on GitHub (Dec 30, 2020): BTW how can I use synchronous fetch? How to import it into my script?
Author
Owner

@NghiaTranUIT commented on GitHub (Dec 30, 2020):

Good question. Since JavascriptCore from Apple doesn't have fetch by default, we have to find some way to add it as an addon. I don't think that it's easy.

I will support the "Write to file" and send you a beta

For a fetch, I will research and support it soon 👍

<!-- gh-comment-id:752643230 --> @NghiaTranUIT commented on GitHub (Dec 30, 2020): Good question. Since JavascriptCore from Apple doesn't have `fetch` by default, we have to find some way to add it as an addon. I don't think that it's easy. I will support the "Write to file" and send you a beta For a fetch, I will research and support it soon 👍
Author
Owner

@NghiaTranUIT commented on GitHub (Dec 31, 2020):

@amorphius please check out this build at https://github.com/ProxymanApp/Proxyman/issues/741#issuecomment-752842805 👍

<!-- gh-comment-id:752842865 --> @NghiaTranUIT commented on GitHub (Dec 31, 2020): @amorphius please check out this build at https://github.com/ProxymanApp/Proxyman/issues/741#issuecomment-752842805 👍
Author
Owner

@amorphius commented on GitHub (Jan 1, 2021):

thanks!

<!-- gh-comment-id:753356129 --> @amorphius commented on GitHub (Jan 1, 2021): thanks!
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#742
No description provided.