cnping icon indicating copy to clipboard operation
cnping copied to clipboard

[Suggestion] Interface selection

Open mrbesen opened this issue 4 years ago • 4 comments

Would be cool, if you could specify the interface to use. like normal ping where you can do ping -I wlan0 1.1.1.1

mrbesen avatar Apr 22 '20 22:04 mrbesen

At least on linux that should be easily possible: c - bind socket to network Interface - Stack Overflow

One thing to investigate though is if that actually needs root permissions and CAP_NET_RAW. The top answer says so but lets hope this is incorrect and we can make it work with capabilities only. (Running cnping as root messed with Wayland in the past and probably still does. That's why we went with CAP_NET_RAW only back then.)

I probably won't work on this in the foreseeable future but I'm happy to help/guide you if you want to start hacking!

Out of curiosity: What is your use case? VPNs?

dreua avatar Apr 27 '20 08:04 dreua

In my case i have more than one connection to the internet (ethernet and mobile) and sometimes the ethernet connection breaks. So when i wait for the ethernet connection to come back up i would like to use cnping to monitor the ethernet interface. But of cause cnping chooses the working mobile connection and is not really helpfull. I guess VPN-User or VM-Hosts may use this feature too.

mrbesen avatar Apr 27 '20 09:04 mrbesen

Are you interested in working on this?

dreua avatar Apr 27 '20 09:04 dreua

@mrbesen that does sound like a preeettyy cool feature to have... It could exist if you make it exists. We can test and help.

cnlohr avatar May 03 '20 07:05 cnlohr

Closed via 0f821852b2f05632429577c5b363a51017977f9b

Thank you @mrbesen ! :100:

dreua avatar Aug 25 '22 10:08 dreua