Question: I have an http proxy, which works OK, but there are some address on my lan which provides some web services.

I want to configure my device so that for some range of addresses the proxy is bypassed.

I have tried with 10.0.0.0/8, but it doesn't work!

Answer: 
Yes. This is definitely possible, requiring no modifications or drivers on the PC. As the OP mentions, the USB identification on the phone end is ultimately done in software (in this file <https://github.com/android/kernel_msm/blob/android-msm-2.6.35/drivers/usb/gadget/composite.c>), and it could be modified to identify itself as a standard USB keyboard.

This change would require a couple of things.

1. A modified kernel with a patched USB driver
2. An Android app that could talk to some interface exposed by the modified USB driver.

There is a paper that was published in 2010 titled [*Exploiting smart-phone USB connectivity for fun and profit*](https://dl.acm.org/doi/10.1145/1920261.1920314). It describes using a phone to brute-force desktop login screens. The method they used involved making the phone appear as a USB keyboard.
At a minimum, this would require both software on the phone and on the PC. The 2 pieces of software would have to communicate with each other. Nothing like this, that I know of currently, exists. 

And for the PC to think that the device is truly a keyboard, it would require a new driver that would tell the PC that the device is a keyboard, and how "to use it as a keyboard". 

I am not saying that it is not possible, because just about anything is possible when it comes to things like this. What I am saying though, is that nothing like this exists, currently.

USB is both hardware and software, if it was software alone, then the same USB driver would work for all android devices on Windows, and this is not the case. USB mass-storage and MTP are handled by the drivers on the PC, not the device. What devices support both MTP and USB mass-storage and at the same time? I have found articles stating that devices can support UMS and MTP, but only support UMS if there is an external sdcard. You cannot mount the external sdcard with MTP and with UMS. MTP is for the internal storage. And I haven't read anything that can confirm or deny that you can use both at the same time.

You don't have to install drivers for keyboards, if they follow the "default" spec because windows already has the drivers for it. There are keyboards that come with their own drivers. As I said, it would be possible. I am not sure about how it would be done. It would, almost certainly, require a custom kernel at the very least for it to act like a keyboard and no additional drivers to be needed on the PC side.

Additionally, I agree with @davidbb that it is possible and I have already said that it is. The problem with a question asking if something is possible, does not ever solve the problem. It would be like me saying "is it possible for me to run ios applications natively on windows?". This is theoretically possible, but there is nothing that does this now and there is not something that a "normal user" (or even an advanced user) can do to make this happen. This site is geared for users, so saying you just need to write a modified kernel is not an answer that is going to benefit anyone. So the real answer to the question is no, because there is not a modified kernel out there.