[GH-ISSUE #348] [Map Remote] #1 Basic UI and Logic #346

Open
opened 2026-03-03 19:50:02 +03:00 by kerem · 3 comments
Owner

Originally created by @NghiaTranUIT on GitHub (Jan 16, 2024).
Original GitHub issue: https://github.com/ProxymanApp/proxyman-windows-linux/issues/348

Originally assigned to: @kics223w1 on GitHub.

Description

It's time to implement the Map Remote features.

It's okay to duplicate or subclass. Similar to what we've done for Map Local, Breakpoint and Scripting

1. Main UI

  • Implement and reuse the Main Table View + Logic
    Screenshot 2024-01-16 at 09 07 49

  • Right Menu Context
    Screenshot 2024-01-16 at 09 08 07

  • Make sure the logic of the menu context is working as Map Local, Breakpoint. For example, I can delete, duplicate, edit or create new Rule by using the Menu Context or Shortcut

  • Implement the Filter, similar to Map Local (Please note that Proxyman macOS doesn't support the Filter on Map Remote yet.)

  • Map Remote on Toolbar

Screenshot 2024-01-16 at 09 08 16
Originally created by @NghiaTranUIT on GitHub (Jan 16, 2024). Original GitHub issue: https://github.com/ProxymanApp/proxyman-windows-linux/issues/348 Originally assigned to: @kics223w1 on GitHub. ## Description It's time to implement the Map Remote features. ✅ It's okay to duplicate or subclass. Similar to what we've done for Map Local, Breakpoint and Scripting ## 1. Main UI - [x] Implement and reuse the Main Table View + Logic <img width="1090" alt="Screenshot 2024-01-16 at 09 07 49" src="https://github.com/ProxymanApp/proxyman-windows-linux/assets/5878421/270bfff9-7fd8-4c01-8cb6-61696c1542b4"> - [x] Right Menu Context <img width="285" alt="Screenshot 2024-01-16 at 09 08 07" src="https://github.com/ProxymanApp/proxyman-windows-linux/assets/5878421/15b3b2bf-9f74-4fa7-b3c0-0ce0e2f4a1e3"> - [x] Make sure the logic of the menu context is working as Map Local, Breakpoint. For example, I can delete, duplicate, edit or create new Rule by using the Menu Context or Shortcut - [x] Implement the Filter, similar to Map Local (Please note that Proxyman macOS doesn't support the Filter on Map Remote yet.) - [x] Map Remote on Toolbar <img width="344" alt="Screenshot 2024-01-16 at 09 08 16" src="https://github.com/ProxymanApp/proxyman-windows-linux/assets/5878421/dc7f06e8-63b1-48ab-9643-491681f52270">
Author
Owner

@NghiaTranUIT commented on GitHub (Jan 16, 2024):

2. Map Remote Edit screen

  • Implement the UI of the Map Remote Edit Screen
Screenshot 2024-01-16 at 09 07 52
  • Reuse the Match Rule View from other Tools. Don't implement the new one.
    Screenshot 2024-01-16 at 09 13 17

  • After editing the Protocol, it automatically fills the port number to 443 if the port is empty and protocol = https

https://github.com/ProxymanApp/proxyman-windows-linux/assets/5878421/985bf7e7-5173-4f8d-8646-eb4bca9118ec

<!-- gh-comment-id:1892973249 --> @NghiaTranUIT commented on GitHub (Jan 16, 2024): ## 2. Map Remote Edit screen - [x] Implement the UI of the Map Remote Edit Screen <img width="1090" alt="Screenshot 2024-01-16 at 09 07 52" src="https://github.com/ProxymanApp/proxyman-windows-linux/assets/5878421/4ebde67c-af2e-47da-97a6-0b26b5554f35"> - [x] Reuse the Match Rule View from other Tools. Don't implement the new one. <img width="843" alt="Screenshot 2024-01-16 at 09 13 17" src="https://github.com/ProxymanApp/proxyman-windows-linux/assets/5878421/d1edd71f-a057-4a20-be58-265fc8050c27"> - [x] After editing the Protocol, it automatically fills the port number to 443 if the port is empty and protocol = https https://github.com/ProxymanApp/proxyman-windows-linux/assets/5878421/985bf7e7-5173-4f8d-8646-eb4bca9118ec
Author
Owner

@NghiaTranUIT commented on GitHub (Jan 16, 2024):

3. Port classes to Proxyman Windows

  • Port MapRemoteEntry, MapRemoteService and URLEntryComponent classes. Ping @NghiaTranUIT to get these file
  • Use this MapRemoteEntry to implement the Map Remote List + Map Remote Edit screen -> Verify we can save, duplicate, create new, edit -> Work fine.
  • Ping @NghiaTranUIT to get HTTPHandler.swift and a demo, to understand how Map Remote works under hood.

For example:

  • Map Remote changes the First Message Line and the Host Header of the capture request.

Additional Logic

  • As soon as we create or edit a new Map Remote Rule -> Notify the tunnel to close this alive connection with this host -> Verify it's closed.
  • Show the debugging tool in the Summary. Please note that the Notes row might change, depending on the Map Remote Entry config. See the flow.serveFromRemoteURL in MapRemoteService
Screenshot 2024-01-16 at 09 28 51 Screenshot 2024-01-16 at 09 29 54
<!-- gh-comment-id:1892975504 --> @NghiaTranUIT commented on GitHub (Jan 16, 2024): ## 3. Port classes to Proxyman Windows - [x] Port `MapRemoteEntry`, `MapRemoteService` and `URLEntryComponent` classes. Ping @NghiaTranUIT to get these file - [x] Use this `MapRemoteEntry` to implement the Map Remote List + Map Remote Edit screen -> Verify we can save, duplicate, create new, edit -> Work fine. - [x] Ping @NghiaTranUIT to get `HTTPHandler.swift` and a demo, to understand how Map Remote works under hood. For example: - Map Remote changes the First Message Line and the Host Header of the capture request. ### Additional Logic - [x] As soon as we create or edit a new Map Remote Rule -> Notify the tunnel to close this alive connection with this host -> Verify it's closed. - [x] Show the debugging tool in the Summary. Please note that the `Notes` row might change, depending on the Map Remote Entry config. See the `flow.serveFromRemoteURL` in `MapRemoteService` <img width="744" alt="Screenshot 2024-01-16 at 09 28 51" src="https://github.com/ProxymanApp/proxyman-windows-linux/assets/5878421/58f263eb-b77f-4f49-aa14-918e481c3115"> <img width="720" alt="Screenshot 2024-01-16 at 09 29 54" src="https://github.com/ProxymanApp/proxyman-windows-linux/assets/5878421/007b2dea-d8f8-4a07-9d81-1bd10e92eea0">
Author
Owner

@NghiaTranUIT commented on GitHub (Jan 16, 2024):

4. Map Remote Logic

4.1 How to test manually (Localhost to Production)

  1. Remove all Map Remote List and SLL proxying list
  2. Use Postman and send http://localhost:3000/post?action=map_remote -> Verify the connection is failed because we don't have any localhost:3000 server
  3. Right Click on the error request on Proxyman -> Tool -> Map Remote
  4. Enter the following setting
Screenshot 2024-01-16 at 09 28 00
  1. Save
  2. Make a request again or Repeat it
  3. Verify the new URL becomes https://httpbin.proxyman.app
Screenshot 2024-01-16 at 09 28 51
  1. Open Map Remote -> Edit the first rule -> Tick Preserve the original URL
  2. Save -> Repeat the request again
  3. Verify the URL is preserved and have the new Summary Note
Screenshot 2024-01-16 at 09 33 26

Video Demo

https://github.com/ProxymanApp/proxyman-windows-linux/assets/5878421/aa510e72-ea26-47ef-821a-b2d0b1b8130e

4.2 How to test manually (Production to Localhost)

  1. Install docker and start a local httpbin: $ docker run -p 80:80 kennethreitz/httpbin

  2. Verify we can call: http://127.0.0.1/get?id=123 in cURL or postman

  3. Use Postman and send: https://httpbin.proxyman.app/get?id=123

  4. Right Click on the request on Proxyman -> Tool -> Map Remote

  5. Enter the following setting:
    Screenshot 2024-01-16 at 09 46 47

  6. Repeat the request

  7. Verify we get the response from the httpbin.org docker

<!-- gh-comment-id:1892982896 --> @NghiaTranUIT commented on GitHub (Jan 16, 2024): ## 4. Map Remote Logic ### 4.1 How to test manually (Localhost to Production) 1. Remove all Map Remote List and SLL proxying list 2. Use Postman and send `http://localhost:3000/post?action=map_remote` -> Verify the connection is failed because we don't have any localhost:3000 server 3. Right Click on the error request on Proxyman -> Tool -> Map Remote 4. Enter the following setting <img width="1041" alt="Screenshot 2024-01-16 at 09 28 00" src="https://github.com/ProxymanApp/proxyman-windows-linux/assets/5878421/05a570c6-f81f-4ae8-8046-08bf76ebbb83"> 5. Save 6. Make a request again or Repeat it 7. ✅ Verify the new URL becomes `https://httpbin.proxyman.app` <img width="744" alt="Screenshot 2024-01-16 at 09 28 51" src="https://github.com/ProxymanApp/proxyman-windows-linux/assets/5878421/c84651dd-d4b9-4d47-ae4c-ebb5f3480b42"> 8. Open Map Remote -> Edit the first rule -> Tick `Preserve the original URL` 9. Save -> Repeat the request again 10. ✅ Verify the URL is preserved and have the new Summary Note <img width="700" alt="Screenshot 2024-01-16 at 09 33 26" src="https://github.com/ProxymanApp/proxyman-windows-linux/assets/5878421/08273e4d-3cf5-486f-a293-0eb36c372e57"> #### Video Demo https://github.com/ProxymanApp/proxyman-windows-linux/assets/5878421/aa510e72-ea26-47ef-821a-b2d0b1b8130e ### 4.2 How to test manually (Production to Localhost) 1. Install docker and start a local httpbin: `$ docker run -p 80:80 kennethreitz/httpbin` 2. Verify we can call: `http://127.0.0.1/get?id=123` in cURL or postman 3. Use Postman and send: `https://httpbin.proxyman.app/get?id=123` 3. Right Click on the request on Proxyman -> Tool -> Map Remote 4. Enter the following setting: <img width="1090" alt="Screenshot 2024-01-16 at 09 46 47" src="https://github.com/ProxymanApp/proxyman-windows-linux/assets/5878421/9a8058bd-a8d2-4fb1-b4d5-8d4b92122777"> 5. Repeat the request 6. ✅ Verify we get the response from the `httpbin.org` docker
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-windows-linux#346
No description provided.