Proxyman icon indicating copy to clipboard operation
Proxyman copied to clipboard

Throttling Support

Open fishcharlie opened this issue 5 years ago • 35 comments

It'd be awesome to see support for throttling requests/responses. Where you can simulate different network conditions (bad signal, slow speeds, etc).

fishcharlie avatar Apr 17 '19 02:04 fishcharlie

Thank for this request @fishcharlie , we will consider to implement this feature in this years.

For now, you can use the combination of Proxyman and Network Link Conditioner (Apple tool) to throttle the network 👍 It's one of preferred tool to do it during my development 😄

NghiaTranUIT avatar Apr 17 '19 03:04 NghiaTranUIT

This is not just a functional app but a gorgeous app too. The only thing stopping me from switching from Charles is Throttling. If you can some how get it in sprint that would be amazing .

abeazam avatar May 22 '20 11:05 abeazam

Hi @abeazam, sorry for the delay because I was too busy to implement other high priority features during the journey. I actually did implement but the result was not great and didn't fulfill my expectation.

I would suggest using Network Conditioner to stimulate poor networks.

If you're using Map Local with delay, I would support it soon because it's eaiser https://github.com/ProxymanApp/Proxyman/issues/510

NghiaTranUIT avatar May 22 '20 12:05 NghiaTranUIT

Does Network Link Conditioner allow you to be selective about which domains to throttle like Charles does? Throttling entire machine is problematic when needing to test specific scenarios so I would +1 that Proxyman should do this as Charles does perfectly well.

cameroncooke avatar Jan 15 '21 11:01 cameroncooke

@cameroncooke it's system-wide, not a particular domain. I've recently received a lot of requests for this feature. I will work on it after the iOS Proxyman and Rule Folder (https://github.com/ProxymanApp/Proxyman/issues/739) 👍

NghiaTranUIT avatar Jan 15 '21 13:01 NghiaTranUIT

The only thing stopping me from switching from Charles is Throttling.

I share this :) really like the app, but missing throttling is a bummer

harkairt avatar Feb 13 '21 07:02 harkairt

Sorry to hear that. Just wondering if you’re going to use Throttle for particular domains or all domains? And which profile you would use (3G, 4G, poor wift, etc)?

NghiaTranUIT avatar Feb 13 '21 07:02 NghiaTranUIT

I get the impression this is hard to pull off. Even Charles has some bugs when using throttling, I've had throttling turned on and it just stop working for example.

But when it works it's probably Charles's strongest feature and so useful for helping finding race conditions in apps especially when targeting just some domains.

cameroncooke avatar Feb 13 '21 08:02 cameroncooke

Thanks. I'm researching about the Token Bucket, which is possible to implement the bandwidth limit (like Throttle does) 👍 I understand this feature is essential and Proxyman should support it 😄

NghiaTranUIT avatar Feb 13 '21 08:02 NghiaTranUIT

So for me at the moment I'm using a combination of Proxyman and Charles. Though I do tend to keep falling back a Charles when I need throttling. But my ambition is to move completely to Proxyman as it's actively developed. Throttling is only thing holding me back.

cameroncooke avatar Feb 13 '21 08:02 cameroncooke

Sure, I'm implementing it now, and I'm sorry for the delay since 2019 because there are many features need to be done.

NghiaTranUIT avatar Feb 13 '21 08:02 NghiaTranUIT

I would like to update the progress of the Network Throttling feature

Basically, we can set Network Conditions for system wide or particular domains 🎉

We support various preset profile as well 👍

It's 80%, and we're going to release it in the next releases 😄

Screen Shot 2021-03-03 at 20 21 01 Screen Shot 2021-03-03 at 20 20 58 Screen Shot 2021-03-03 at 20 20 51

NghiaTranUIT avatar Mar 03 '21 13:03 NghiaTranUIT

Amazing, happy to beta test when a build is available as we use this a lot in Charles esp. domain-specific throttling.

Cameron.

On Wed, 3 Mar 2021 at 13:31, Nghia Tran [email protected] wrote:

I would like to update the progress of the Network Throttling feature

Basically, we can set Network Conditions for system wide or particular domains 🎉

We support various preset profile as well 👍

It's 80%, and we're going to release it in the next releases 😄

[image: Screen Shot 2021-03-03 at 20 21 01] https://user-images.githubusercontent.com/5878421/109811986-1241bc00-7c5e-11eb-90d2-ca343fb44411.png

[image: Screen Shot 2021-03-03 at 20 20 58] https://user-images.githubusercontent.com/5878421/109811991-1372e900-7c5e-11eb-997b-e4e8d4486ed7.png

[image: Screen Shot 2021-03-03 at 20 20 51] https://user-images.githubusercontent.com/5878421/109811969-0e159e80-7c5e-11eb-8b1f-b9ad6be32fab.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ProxymanApp/Proxyman/issues/119#issuecomment-789715568, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEZ6SKJRMVWWBFF2IUW4P3TBY24BANCNFSM4HGQLO4Q .

cameroncooke avatar Mar 03 '21 13:03 cameroncooke

Awesome news! :star_struck: Thank you so much @NghiaTranUIT! :tada:

michaelhogg avatar Mar 07 '21 20:03 michaelhogg

Hey @michaelhogg @cameroncooke, let check out the v1 of Network Condition in the latest build (2.20.0). You can directly update from the app 👍

Changelog at: https://github.com/ProxymanApp/Proxyman/releases/tag/2.20.0

In this build, we're able to select the preset profiles, but not customize them. I will improve it in the v2 😄

NghiaTranUIT avatar Mar 14 '21 03:03 NghiaTranUIT

@NghiaTranUIT: I'm now using Proxyman v2.21.1, and the Network Conditions v1 functionality is looking great! :heart: Thank you for implementing this :smiley: Looking forward to v2 with the ability to customise the profiles! :tada:

I have a question about the Apply System-wide: All traffic in your machine will be affected by Network Throttling checkbox. When checked, does this operate in the same way as Apple's Network Link Conditioner (which is a GUI for the dnctl and pfctl command-line tools), applying the network conditions to the whole of macOS (even to network traffic which is not being proxied through Proxyman) ?

I've tried creating a rule with this Apply System-wide checkbox enabled, and using the 2G (EDGE) preset profile (which is a very slow preset), but it seems that it only affects the network traffic which is being proxied through Proxyman. If this is the intended behaviour (which I expect it is), then maybe the checkbox could be renamed to something like: Apply to all hosts: All traffic being proxied through Proxyman will be affected by Network Throttling ?

michaelhogg avatar Mar 25 '21 01:03 michaelhogg

When checked, does this operate in the same way as Apple's Network Link Conditioner (which is a GUI for the dnctl and pfctl command-line tools), applying the network conditions to the whole of macOS (even to network traffic which is not being proxied through Proxyman) ?

It only affects traffic, which is being proxied to Proxyman app.

then maybe the checkbox could be renamed to something like: Apply to all hosts: All traffic being proxied through Proxyman will be affected by Network Throttling ?

Ah nice idea, I will improve the wording to make it clear 😄

NghiaTranUIT avatar Mar 25 '21 01:03 NghiaTranUIT

Great feature! I have a few notes:

  • With "100% Loss" profile, requests don't show up in the list, in Charles these connections will show up with the response that was sent to client, this helps to determine if client is not connected to proxy correctly or some proxy rule is applied.
  • When you edit a rule and click Done it gets enabled automatically, you end up with multiple enabled rules, but only one is "Active".
  • Little nitpick: "100% Loss" profile has "Download: Max, Upload: Max", shouldn't it be zero?

sewar avatar Apr 12 '21 15:04 sewar

Thanks for your suggestion. I'm going to improve/fix it in the next release 😄

NghiaTranUIT avatar Apr 13 '21 02:04 NghiaTranUIT

It would be great to be able to create custom throttling profiles, or at least have more presets to choose from.

I'd like to see presets for really poor 2G/3G where bandwidth is ~5 kbps and packet loss around 10%.

I'm also not seeing @sewar 's proposal to show requests with the 100% Loss profile, which would be really good to have to confirm client behaviour.

alextesttesttest avatar Jul 28 '21 11:07 alextesttesttest

Thanks for the request @alextesttesttest. I totally agree that we should be able to customize our own network profile 👍 I will put this feature in high priority queue 👍

NghiaTranUIT avatar Jul 28 '21 13:07 NghiaTranUIT

What about making own profiles? I love just making long delay like, several seconds without packet lost to test how apps will behave when a lot of requests are delayed. Setting 100% packet lost is not as good, because it may interfere with connectivity checks and force no connection state, instead of just waiting for response.

vrnvorona avatar Oct 21 '21 13:10 vrnvorona

@vrnvorona how about selecting the "Very Bad Network" Profile 🤔 The bandwidth is <1mbps and delay ~=10-20s

NghiaTranUIT avatar Oct 21 '21 13:10 NghiaTranUIT

Well I assumed it's not 10-20s from tooltip. If it is, it's too big this way. Well, at least ability to control it is nice imo. image

vrnvorona avatar Oct 21 '21 14:10 vrnvorona

Hi! How is it going with custom network profiles? I've just installed Proxyman and it's a quite nice tool but I need to check very very bad connections like delay of 5-10 secs and loss like 30%.

PS. Network Link Conditioner doesn't work at all on Monterey :(

sergej-s avatar Jan 12 '22 09:01 sergej-s

Sorry, but no progress so far on the Customize Profile @sergej-s : /

I see that somebody can run Network Link Conditioner on Monterey https://developer.apple.com/forums/thread/690358?answerId=693458022#693458022

NghiaTranUIT avatar Jan 12 '22 10:01 NghiaTranUIT

Many thanks for quick reply! Sad but I hope you will manage to make it at some day :) I've tried v12, didn't work out. It seems the root access is needed to make it work.

sergej-s avatar Jan 12 '22 11:01 sergej-s

Long term Charles user, recently discovered Proxyman - really liking it, but I'm not sure it's fully featured enough for me to leave Charles completely yet. For some reason "Very bad network" doesn't seem to really make any difference for localhost requests (even though I can see the requests in proxyman) - still ~30ms response times, yet Charles doesn't have the issue and works as expected.

I really hope Proxyman can match (or better) the throttling offerings from Charles as I think this is an awesome app.

leepowelldev avatar May 24 '22 20:05 leepowelldev

Just wondering @leepowelldev: When you call localhost, do you see the localhost traffic on the Proxyman app?

I assume that you'd visit localhost, and by default, it doesn't go through Proxyman Server. Thus, it's not throttled.

To fix it, you might access your localhost via the alias name, which you define in etc/hosts. Read more at https://docs.proxyman.io/troubleshooting/couldnt-see-any-request-from-localhost-server#3.-solutions

Please let me know the result 👍

NghiaTranUIT avatar May 25 '22 00:05 NghiaTranUIT

Hi @NghiaTranUIT 👋

Yes I see the traffic, as I'm explicitly directing my requests at the proxy. This is a Node app which makes a request to another Node app (an api) and I'm using a standard Node request. I have tried both solutions from your FAQ's and sadly neither seemed to work for me.

EDIT: Upon closer inspection, it does seem to make a small difference. Without throttling responses are around 15ms, with a bad network connection they're around 30ms. Maybe I'm just used to Charles where I can manually add additional latency and server stability.

leepowelldev avatar May 25 '22 06:05 leepowelldev