Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network Condition: Network Logic #3 #323

Open
8 tasks done
NghiaTranUIT opened this issue Oct 30, 2023 · 2 comments
Open
8 tasks done

Network Condition: Network Logic #3 #323

NghiaTranUIT opened this issue Oct 30, 2023 · 2 comments
Assignees
Labels
✅ Done Ticket is resolved enhancement New feature or request

Comments

@NghiaTranUIT
Copy link
Member

NghiaTranUIT commented Oct 30, 2023

Description

It's time to implement the Network Condition. It's quite tricky because I haven't found any reliable npm package (with a high download number and active maintenance).

Some examples (not reliable):

Acceptance Criteria

  • Find a npm package that can help implement the Network Condition

  • Or read some code and bring it Proxyman (e.g toxy library)

  • Implement the logic to simulate: Upload = Client -> Proxyman -> Server. Download = Server -> Proxyman -> Client

  • Download Bandwidth

  • Download Package Drop Rate

  • Download delay (latency)

  • Upload Bandwidth

  • Upload Package Drop Rate

  • Upload delay (latency)

NOTE

  • If a connection is matched with a Network Condition Rule -> It should be handled by the Network Condition.
  • Other connections (don't match the network) -> It works as normal.
  • If the Wide-System rule is activated -> ALL traffic is affected
@NghiaTranUIT NghiaTranUIT added the enhancement New feature or request label Oct 30, 2023
@NghiaTranUIT
Copy link
Member Author

How to test:

Case 1: Happy Case

  1. Create a new Network Condition Rule -> Tick System-Wide -> Select 4G profile
  2. Open https://fast.com/ and confirm that Bandwidth matches with 4G profile
  3. Open Youtube or some website -> Notice the internet speed is slow as intended
  4. Repeat with 3G profile and confirm the speed is slower
  5. Disable the Rule or Tool
  6. Confirm all network backs to normal

Case 2: Enable 1 rule

  1. Create a new Network Condition Rule -> Host = fast.com -> Select 4G profile
  2. Open https://fast.com/ and confirm that Bandwidth matches with 4G profile
  3. Open https://www.speedtest.net/ -> Confirm it has full speed because we only apply Network Condition to fast.com
  4. Open Rule view -> Disable it
  5. Confirm fast.com runs as normal speed.

@NghiaTranUIT
Copy link
Member Author

Case 3: 100% loss

  1. Create a new Network Condition Rule -> Wide-System rule -> Select 100% loss
  2. Open any website -> Confirm all connections are waiting forever -> It doesn't close the connection.
  3. Open Rule view -> Disable it
  4. Confirm all websites just works fine

@kics223w1 kics223w1 added the ✅ Done Ticket is resolved label Dec 4, 2023
@NghiaTranUIT NghiaTranUIT added this to the Proxyman 2.9.0 milestone Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✅ Done Ticket is resolved enhancement New feature or request
Development

No branches or pull requests

2 participants