This question already has an answer here:
I'm building a network emulator to help realize different speeds. Basically, this system would shape a given user's network metrics (such as upload speed/download speeds/packet loss/jitter etc) based on the user's request. For instance, if a user selected 3G, the system would transform his/her connection to behave like a 3G connection. I imagine doing this by using the user's IP address.
I have been searching for some help on this but couldn't find a lot. I wonder if this is feasible at all.