Maybe it helps to somebody with the same problem. I need to forward the traffic from one server in public ip to a private, VPN connected server. The solution is very simple, actually. Thanks to the @evgeny help.
he trick is change the path to any name (I choose forward)
And the in the server with port 8099 (not in the picture but is a standard server with port 8099 and json channel) do this.
procedure THTTPChatServerMainForm.ROServerCustomResponseEvent(const aTransport: IROHTTPTransport; const aRequestStream,
aResponseStream: TStream; const aResponse: IROHTTPResponse; var aHandled: Boolean);
begin
if pos('/forward',aTransport.PathInfo) = 1 then
begin
(ROIndyHTTPChannel1 as IROTransportChannel).Dispatch(aRequestStream, aResponseStream);
aHandled := True;
end;
end;
The ROIndyHTTPChannel have target url as http://127.0.0.1:9000/json
The event manager also WAE!
Project source can be downloaded here.
Maybe with some adjustments can be included in RemObjects samples in a near future.
HTH
P.S. If you don´t care can please vote my requirements of Delphi ARM Linux compiler