Originally Posted by
jup234
So... i kind of need help on this one.
Im looking to create a class that can simulate the same connection loss i get when i unplug my ethernet cable.
I personally code in c# and java. So far with the application im building its been in c#, but if theres some specific assemblies in the JRE with a little work i think i could change my code to Java? currently using alot of system32 dlls, havent used them much in java but im sure with a little work i could find them
In my experience testing so far, the 3 main methods of simulating internet loss cause an instant loss of connection. Here's what I've attempted using in making my software lagswitch
Using IP config /-renew and /-release : the game im playing instantly locks out all input when executing. Even for 0ms of time. when the command runs in my C# program it will lock out input, remove game assets and freeze the game.
Editing firewall rules: i didnt code this one, but used a 3rd party lagswitch application just to test if this avenue would work. Had the same result of executing the ipconfig commands. Instant response and
UDP Flooding: tried this with a 3rd party app as well. Game's anti-cheat picked this one up and then I didnt have time to test with DoSing my appt complex's internet on my laptop. Theres 3 major problems with this method: first of all, if im running the flooder on a seperate computer, i have alot less control of when i execute DoS. Second of all, this method is less precise in when the connection is on or off, theres delay between how fast the DNS can handle the packets thats variable based off of other factors such as other users packets ect. 3rd... i dont think my laptop can generate packets fast enough to ddos my appartment complex's internet
Manually unplugging and replugging my ethernet: DOESNT INSTANTLY LOCK THE GAME UP! that being said, its impossible to time correct internet loss to the milisecond.
Ideally, what i need is a C# method of disabling then re-enabling my ethernet port and then i'll update from there.