I’ve seen a number of articles on how to fix broken RJ45 connectors including the somewhat famous zip tie hack. The best way of course is to replace the plug but that usually requires some tools and good eyes. I’m not that patient and besides, the plug can get broken again.
Instead, I buy an inline coupler and super glue it on to the end of the broken connector. Simply insert the broken connector into the inline connector and then place a single drop of super glue in the gap on one side of the plug. A drop is all it takes or you’ll risk blocking the electrical connection with glue.
You’ll need a short second cable (commonly referred to as a patch cable) to connect to the device. Should the patch cable ever get damaged, replace it. Problem solved. And if you ever need to extend the line, simply attach a longer patch cable.
Make sure the connector is rated for network cable. The one pictured above works with CAT 5 and 5e. If you have CAT 6, you’ll need a connector rated for CAT 6 network cable.