Users send queries to the database through different clients. All these clients use the http port of the database (yes, it accepts requests via http). Let it be port 123. I want to put my http proxy which will listen to port 123 in front of this database, do some validation of the sql request and if everything is ok, send it directly to the database.
I started looking at https://github.com/abhinavsingh/proxy.py but I don’t understand how to use it. The documentation is absolutely not clear to me. I spent several hours trying to put together something working - nothing worked.
The main problem with this library is that it requires the client to specify it as a proxy i.e. cURL --proxy which is not what I need. I tried to run it as reverse proxy but all the time I send request to it respond 400 Bad Request:
HTTP/1.1 400 BAD REQUESTServer: proxy.py v2.4.3Content-Length: 0Connection: closeThe main requirement is that the user should not change anything on his side at all. NOTHING at all. Everything should work as before.
Someone please help me how to do this using proxypy or some other python library. I’m already exhausted, I have no strength. what would you use for such a task?