ProxymanApp / proxyman-windows-linux

Public tracker for Proxyman Windows/Linux
https://proxyman.io/
MIT License
96 stars 4 forks source link

[Map Remote] #1 Basic UI and Logic #348

Open NghiaTranUIT opened 7 months ago

NghiaTranUIT commented 7 months ago

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

Screenshot 2024-01-16 at 09 08 16
NghiaTranUIT commented 7 months ago

2. Map Remote Edit screen

Screenshot 2024-01-16 at 09 07 52

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

NghiaTranUIT commented 7 months ago

3. Port classes to Proxyman Windows

For example:

Additional Logic

Screenshot 2024-01-16 at 09 28 51 Screenshot 2024-01-16 at 09 29 54
NghiaTranUIT commented 7 months ago

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