how to implement an embedded proxy in java or kotlin
I need an embedded proxy to just forward request to a rest api.
what i have is an embedded jcef browser that for some limitations can’t connect directly to a server on localhost or remote. so we thought of running an embedded java or kotlin proxy so that the jcef browser can call the embedded proxy like http://localhost:9090/my/path and the embedded proxy will just forward to a server at http://localhost:5051 and just return the raw result to the browser.
I thought about trying jetty for this purpose,
any other ideas? examples?