clumsy icon indicating copy to clipboard operation
clumsy copied to clipboard

Remote control of clumsy

Open jvanegmond opened this issue 10 years ago • 18 comments

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).

jvanegmond avatar Dec 10 '13 13:12 jvanegmond

I'm thinking of implementing a command line version and you can specify the parameters on start up. Would this meet your requirements?

jagt avatar Dec 10 '13 16:12 jagt

Yes, I think that would satisfy the requirements. We can always add network control later as a wrapper around the command line version.

jvanegmond avatar Dec 10 '13 21:12 jvanegmond

Cool! I'll try to get this done.

jagt avatar Dec 12 '13 16:12 jagt

@jvanegmond I've uploaded a new release accepting command line options. There's no doc yet, but it's pretty easy to figure out the arguments in the commit 046572c44d388c80a03dddaf6438d2baa04fcb65 .

An example:

clumsy.exe --filter outbound --drop on --drop-chance 50

jagt avatar Dec 14 '13 17:12 jagt

tks @jagt , your commit fix our big problem.

billzhuang avatar Dec 01 '15 07:12 billzhuang

Hello, I was wondering if there was a way to have clumsy start when it opens, as I am opening from the command line, but having to interface with the GUI and press the start button removes my ability to automate its use, thanks!

Ehntae avatar Oct 20 '16 19:10 Ehntae

I would like to send the delay value of 70ms, I tried with: .\clumsy --lag on --lag-delay 70

But it doesn't work. What should be the parameters?

rafarojas avatar Oct 20 '16 22:10 rafarojas

Change --lag-delay to --lag-time!

Ehntae avatar Oct 20 '16 22:10 Ehntae

Awesome, thanks ;)

rafarojas avatar Oct 21 '16 15:10 rafarojas

BTW, do you know where I can find documentation for those commands? @Aeomi on my tests I don't have to click on "Start" if I send at least one of the parameters, like drop, or the lag-time. But if I don't send any parameter it doesn't start right away and I will need to click on Start manually

rafarojas avatar Oct 21 '16 15:10 rafarojas

I see, that isn't what happens with me, I've had to use AHK to controlclick the start button when the application starts. I would still really like a command line based version of clumsy, it would definitely make the task of automation far easier. Also, as far as I know there is no documentation for it, however, you can view the source code and figure out most of the parameters from there is what I think the dev said.

Ehntae avatar Oct 21 '16 16:10 Ehntae

I would like to start clumsy from command line with these parameters :

Filters: inbound and (ip.SrcAddr = 10.40.2.181 or ip.SrcAddr = 10.40.2.134 or ip.SrcAddr = 10.40.2.157 or ip.SrcAddr = 10.40.2.113 )

Functions: Drop Inbound Outbound chance 10%

What are the clumsy commandline parameters?

thank you

fabry00 avatar Aug 22 '17 15:08 fabry00

@fabry00 Add those settings to clumsy's config.txt as a new filter, then specify --filter filter_name to use it.

inequity avatar Mar 15 '18 19:03 inequity

any chance of documentation?

rogierschouten avatar Jun 06 '18 12:06 rogierschouten

https://github.com/jagt/clumsy/wiki/Command-Line-Arguments @rogierschouten there you go

nddipiazza avatar Apr 09 '19 13:04 nddipiazza

Thx!

rogierschouten avatar Apr 10 '19 19:04 rogierschouten

Hi, it would be possible to lag udp packets targeted to a outbound multicast ip? If yes, which would be the correct configuration?.

Thank you in advance

eduranf avatar Apr 15 '20 14:04 eduranf

Found this sample in config.txt. May help:

udp ipv4 against port: udp and (udp.DstPort == 12354 or udp.SrcPort == 12354)

So your filter could be:

udp and ip.DstAddr == 224.x.x.x

moerwald avatar Apr 22 '21 09:04 moerwald