Giter Site home page Giter Site logo

jagt / clumsy Goto Github PK

View Code? Open in Web Editor NEW
4.9K 4.9K 482.0 56.38 MB

clumsy makes your network condition on Windows significantly worse, but in a controlled and interactive manner.

Home Page: http://jagt.github.io/clumsy/

License: Other

Lua 6.26% C 85.14% Python 1.24% Batchfile 0.72% Zig 6.25% Assembly 0.38%

clumsy's People

Contributors

crunkyball avatar drewnoakes avatar ericlaw1979 avatar gregorias avatar j4y avatar jagt avatar jlennox avatar khmelyoff avatar pkarneliuk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

clumsy's Issues

ip by port filter doesn't work

The filter ip.DstPort == 12345 or ip.SrcPort = 12345 doesn't work, displaying Failed to start filtering : filter syntax error.

using tcp.DstPort... or tcp.SrcPort... or udp.DstPort... or udp.SrcPort does work.

New feature interest, bandwidth limiting effect ("cap")

I am interested in a simple bandwidth limiting effect. I have uncommented a section of Clumsy that contained a "cap" effect. This effect seems to have the correct logic. One issue that I see is a packet is always pushed from the local "cap" buffer. There is a comment in the "cap" process loop indicating that the local buffer packet will get stuck if a packet is not pushed during a process cycle. This seems to be the case if the code is modified to not output a packet every cap::process cycle.

Any insight into this "cap" effect effort / removal would be appreciated.
Thanks,
Bob

More granular chance parameters

With version 0.2, the chance parameters can only be set to as low as 0.1%. Any lower and the chance is effectively 0%.

Can you make it much more granular? I'm testing the transfer of some files over SMB, with 0.1% everywhere and it's still too drastic - the network becomes basically unusable.

Clumsy not re-ordering packets when out of order checked

Hi there,

So I've been using Wireshark to check out the functionality of clumsy, and found that the out of order function doesn't seem to work. I've ticked inbound and outbound as well as putting the chance value as 100%, with no observable effect. I know this is the case because I have timestamps within my UDP packets, and have observed a consistent second by second increment within the packets.

I've confirmed I've got the right filtering settings by checking drop and observing dropped packets within Wireshark. The same results were found for lag, throttle.etc

Was just wondering if anyone else has had this issue with out of order and knows of a workaround?

Any help would be greatly appreciated =)

Cheers,

Moh

Floating network issues

I am in taxi. I got from one LTE/3G/mobile base station into another. While gaming I have ping 100. But during transition I have 300. Than again 100. Would be interesting to have check box to float all ON parameter from 0 to maximal values, with some modification of total bad time, and some formula to raise issues and stop them - abruptly or smooth.

E.g. ping could be:
100 100 100 100 100 300 400 200 100 100 100 100.

So I can make things smooth in my game even if floating network.

Hotkey Help

Can someone please make a hotkey for the start/stop button, I have tried Autohotkey but with my extremely limited knowledge of coding in any sense or form. I can't figure it out myself thanks in advance if this is possible and if not sorry for the bother.

port filter not working on windows

ip.DstPort == 12354 or ip.SrcPort == 12354 is not valid (default rule)
tcp.DstPort nor tcp.SrcPort is working (however valid rule)

Host machine: Windows 8 64b, version clumsy: 0.2 64b

Can't open Clumsy

When trying to use Clumsy it flickers constantly and I am unable to use. I have been using it before and it was fine, any ideas? Is there some type of permissions or something that could cause this?

Failed to start filtering : failed to open device (code:1058). Make sure you run clumsy as Administrator.

On a fresh restart, clumsy ALWAYS works. Sometimes I have to close clumsy and open back up (for testing purposes).

Randomly (but very very frequently) I will get the following error message when starting back up.
Failed to start filtering : failed to open device (code:1058). Make sure you run clumsy as

Yes, for SURE it is being run as admin. I don't understand how to fix this! Restarting computer fixes it every time.

Please please please... how do I solve this without restarting??
See screenshot below:

See pic: http://i.imgur.com/uTZTiIq.png

Lag value can not be specified

Command line: clumsy.exe --filter "outbound" --lag on --lag-outbound on --lag-chance 100
Lag stays at default value of 50.

Single instance?

Should Clumsy check to see if there's an existing UI instance running, and if so, simply switch to it?

(This might be a little tricky due to the UAC elevation dance that runs at the beginning)

Hangs when filtering UDP

example: outbound and ip and (udp or tcp)

Removing udp works fine, but including it causes clumsy to hang after anywhere between 10 seconds and a few minutes. Clumsy becomes unresponsive and I have to force close it, disable the network adapter, then enable it to get a network connection back. The disable/enable process takes a good 5 minutes to complete too.

With no functions enabled Clumsy is affecting network connections

I've been experimenting with clumsy and a windows file share and with:
-Clumsy Running
-Filtering Started
-No functions enabled

I experience a poor network connection. If I stop the filtering then the connection will go back to normal.

If no functions are enabled and filtering is running should n't I expect to see a normal network connection.

Seems the connection is affected even before functions are being enabled.

John

Does not work Azure VM

  1. Create Windows 10 VM on Azure
  2. Press check marks to make Azure as less intrusive to networking as possible
  3. Run Clumsy

Expected:

  • starts to work
  • or shows error

Actual:

  • nothing happens

Overhead when started, but no functions enabled

I'm observing an interesting situation where I start with the following filter:

tcp and (tcp.DstPort == 80 or tcp.SrcPort == 80)

We have an internal website (internal network, not localhost) that load time looks like this without Clumsy running (consistently over ~10 page loads):

DOMContentLoaded: 600ms
Load event fired: 700ms

However, if I click "start", but do not enable any functions (nothing is checked), that load time now looks like this (repeatable result):

DOMContentLoaded: 1,500ms
Load event fired: 6,500ms

The testing was done in Chrome, and the time was measure in the Network tab of Chroms dev tools. Now, if I enable lag for 20ms, the time reduces even further (as expected):

DOMContentLoaded: ~2,000ms
Load event fired: ~9,500ms

However, because of the overhead, this makes me wonder - does adding 20ms of lag really make my website take 2.5 seconds longer to load (e.g., if I had a real 20ms lag without clumsy running), or does Clumsy add some additional overhead as part of those 2.5 seconds (as evidenced by the fact that just running Clumsy, with nothing enabled, made a 600 ms request triple to ~1.5secs)

i.e. any TCP request on port 80 will always take 3 times longer just with clumsy running? And therefore a 20ms lag that added 2.5secs of load time would, in reality, only add 2.5 / 3 total seconds of load time?

So, I guess my question is this:

  • Should clumsy be adding overhead, even when no functions are enabled (but clumsy is still running)

Failed to start filtering: failed to open device (code:1753)

Clumsy isn't able to start filtering, gives an error:
Failed to start filtering: failed to open device (code:1753)

Windows 7 x64
NIC: Realtek PCIe GBE Family Controller (on board), no other network cards
COMODO Firewall (latest)
It is a physical PC, not VM.

I run Clumsy from unpacked clumsy-0.2-win64.zip, of course i do have admin privileges.
clumsyerror

Increase maximum latency beyond 3000ms

Is there any specific reason why you cut the latency at 3000ms? I would like to rather have a latency of 20 seconds. Could I easily change it or did you face problems before when you tried that?

Hotkey control

Make a Hotkey control of Stop/Start
which contains OnlyActiveWhile("" == Pressed)
and Toggle to active.

routed packet support

I am running clumsy on a router but it doesn't seem to capture any routed traffic, is it possible to do so?

Network quality presets

Like there are filter presets, but for

{3g, 4g, wifi, ethernet} x {very remote server, local server} - total 8 presets for network qualities.

So people can check out their scenarios from kind of some ground.

I guess presets could be deduced from:

https://na.leagueoflegends.com/en/page/ethernet-vs-wifi-ping-packets-playing-better

https://hpbn.co/mobile-networks/#real-world-3g-4g-and-wifi-performance

http://dl.ifip.org/db/conf/networking/networking2016/1570235910.pdf

https://www.youtube.com/user/xFPxAUTh0r1ty/playlists

Random distribution range for latency?

Rather than a constant latency value, some variation in latency within a distribution (uniform or normal) seems like a more realistic simulation. Just wondering how viable this would be to implement?

Icon not visible in Windows 10 task bar

Hi there,

the current black on transparent icon is not visible in the default Windows 10 task bar.
clumsy_window-inactive
When the clumsy window is active, one can vaguely see an icon, but the contrast is very low.
clumsy_window-active

I would suggest to outline the icon, but I am not a designer :) Any suggestions or opinions? I am also happy to submit a PR with a modified icon.

Best,
Tobias

Included IUP library is outdated

The included IUP library is outdated (3.8), it does not handle HiDPI-supporting applications. The newest version (3.16) includes HiDPI support.

Sidenote: to make clumsy HiDPI compatible, call SetProcessDpiAwareness(PROCESS_SYSTEM_DPI_AWARE); from main().

how uncheck checkbox?

I do this: IupSetAttribute(toggle, "VALUE", "OFF");
this uncheck checkbox but function still working.. If I Start and Stop clumsy - function still working too..

Please help me.
(sorry for my bad english)

Hotkey request

hi can you add a hotkey feature, so when we press the hotkey, it presses the start button with the current settings we have on? thanks!

Compatibility issue with Windows Server 2008?

Clumsy 0.2 starts up the program fine with Windows Server 2008. However, whenever I press the Start button, it will produce the error message: 'Failed to start filtering : failed to open device (code:127). Make sure you run clumsy as Administrator'.

This occurs when I use the default localhost ipv4 all preset ('outbound and ip.DstAddr >= 127.0.0.1 and ip.DstAddr <= 127.255.255.255'). It also happens with the other presets. If I leave the filtering textbox blank, it will give a 'Failed to start filtering : filter syntax error.' error message instead.

This message occurs on both 32 and 64 bit operating systems. I'm running the program with an administrator account, and I've right-clicked on the executable and selected 'Run as administrator'. The program runs correctly on Windows 7 though.

Remote control of clumsy

In order for clumsy to be deployed in automated test runs, it is necessary to be able to control clumsy from other applications.

Ideally clumsy would:

  • Expose a RESTful service or a TCP service with a simple protocol allowing:
    • Start and stop an get current state
    • Get and set filter
    • Set and get options for different functions
    • Enable or disable the different functions
  • Automatically ignore the control connection when modifying the packets (maybe simply by adding a part to the filter automatically).

Bandwidth rate limiting

First off, awesome tool - thanks!

I'd love to see ability to set a specific rate limit on bandwidth. At the moment it allows you to set a relative throttle (in %), but that doesn't allow me to set up cases like: "I want to see how the app/page will behave on 200ms RTT with 1Mbps downlink". Is that a plausible thing to implement? I think it would be a very popular feature for web developers. :)

Emulate packet burst losses

It would be nice to have an option to emulate packet burst losses when we use the "Drop" method.
Maybe there could be something similar to the "Correlation" parameter from WANem (The Wide Area Network Emulator). Their correlation is documented as follows:

wanem_correlation

Stop clumsy from command line

I'm trying to start and stop clumsy from command line. Is it possible to do this? I can run the command to start it initiating the filters and all, but how do i stop it? I'm using the drop feature.

Issue with premake

When running premake I get the following error message:
premake4.lua:116: attempt to call global 'debugdir' (a nil value)

按钮开关问题

有木有大神有写好的 热键开关 和默认开启Drop。

麻烦大家了。。。

Hot key switch problem

There are wood, God and written hotkey switch, and drop is enabled by default.

Please...

Unable to use clumsy for outbound packets

Hi, I am using clumsy for simulating WAN latency on two intefaces between win and linux servers and I see that its unable to add latency for outgoing traffic generated using a simulator, however its working fine for incoming traffic.
I tried using different filters based on SrcAdr and DstAdr.

  1. Win(Simulator) ---(notworking)---> Linux ---------> Windows(Another simulator)
  2. Win(Simulator) <---(notworking)--- Linux <----(working fine)----Windows(Another simulator)

Note:Both simulators are running on same machine.
Regards,
Amit

Upgrade to the latest WinDivert

Hi jagt,

The current version of clumsy is using a very old version of WinDivert, namely WinDivert1.1.1 for the latest 0.2-rc release. WinDivert1.1.1 contains bugs that may affect clumsy, e.g. see here.

I recommend upgrading to the latest version of WinDivert (currently WinDivert1.1.6), and then to WinDivert1.1.7 when it is released (hopefully released 1-2weeks).

Clumsy not working at all

I'm using Clumsy on Window's 10 and it doesn't do anything when using ping. When using my software, it behaves arbitrarily. Am I missing an installation or configuration step?

Failed to start filtering on Win2012 R2

I'm attempting to run Clumsy on a web server with Windows Server 2012 R2. Whenever I attempt to start filtering, I get an error:

Failed to start filtering: failed to open device (code: 1753) Make sure you run clumsy as Administrator

I am running as administrator. I notice a similar, closed issue for Windows Vista and Windows Server 2008, but I'm not sure if the solution will apply to Windows 2012, since the Microsoft KB article does not mention 2012.

I saw a comment for another issue that Clumsy depends on having the Base Filtering Engine service running. When I start that I get another error code: 2150760455 (the rest of the error message is identical)

image

Please let me know any suggestions.

Thanks

I've seen this behavior on releases 0.2 and 0.3rc2.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.