The problem is this:
I decided to make a messenger/chat (VCL application) with callback on DataSnap technology (IDE Delphi XE6), has created a simple DataSnap server (tcp / ip + http) without the database, and thick client.
All works fine if the whole thing run on a local network (tcp / ip) or via the Internet (http).Problems arise when run over HTTP and the client machine has a HTTP proxy server, the client application can not connect to my DataSnap server application. Client application gets error "10061 connection refused"
or "Expected datasnap context in request http://[YourServerIP]:[YourPort]/datasnap/tunnel".
I tried to enter IP and port of the proxy server to params of component TSQLConnection.Driver params DSProxyHost and DSProxyPort, turned off my firewall and antivirus software, checked allows traffic to the proxy ip + port, but the problem has not disappeared.
After few days searches, without results, i decided listening requests from client application and response of my DataSnap Server application in HTTPTrace procedure of DSHTTPService1 component, also with software HTTPDebugerPro, and i noticed interesting thing:
when client app connecting to ds server app without proxy server, in request ds server app receive URI with this text "/datasnap/tunnel" and all works fine ds server response "200, OK".
when client app connecting to ds server app with proxy, in request ds server app receive URI with text "http://[YourServerIP]:[YourPort]/datasnap/tunnel" and raised exception with response error "404, Expected datasnap context in request http://YourServerIP:YourPort/datasnap/tunnel".
Has anyone knows solution about this problem? How to connect DataSnap client to DataSnap server via proxy server? I searched solution for this problem several days, I shoveled the Internet but have not yet found a solution.
Related
Having a grpc client and server and they are exchanging messages in grpc unary mode. I want to log all the messages the client sends to the server without changing a single line of code in both client or server. I came across to Nginx with its new graceful grpc support. Is it possible to route grpc messages from client to server via Nginx while sending a copy of them to a remote logging service? If No, please let me know if there are any other tools out there that do the same stuff.
My requirement is if a browser sends the request to ServerBootStrap then the ServerBootStrap creates BootStrap (Client) and that client connects with a proxy server.
The problem here is to connect with Proxy Server we need to send first HTTP CONNECT method to open a tunnel from Proxy and BootStrap (Client) and then whatever request comes from Browser to Server, the server will send BootStrap(client) and all the communication should happen.
This will look like
Browser ->ServerBootStrap(Server)->BootStrap(Client)->ProxyServer(HTTP2)
Can somebody tell me how do I implement this for Http2?
How do I send Http CONNECT from a Handler for the First time while Client instantiating and If CONNECT gets 200OK from Proxy Server I will to remove Handler from channel pipeline?
Can we explicitly call any HTTP CONNECT request while adding a handler in Pipeline and getting the response to check the status?
--Can somebody answer ?
We have an application which uses SignalR hubs but the hubs location is in a different server not in the application server.
All the signalR ping requests from the application are going to application server, how to make ping requests to hit the signalR server (different hub server).
The question is about ping url when the hub location is in a different server.
Thanks,
Pavan
I am trying to write Connect calls via a NTLM authenticating proxy server. I open a socket to the proxy server and send it a “CONNECT x.x.x.49:80 HTTP/1.1\r\n\r\n”. I expect this to fail as it is an authenticating proxy server but it fails and also closes my connection to the proxy server. I am using Wireshark to check packet values. I can see “Proxy-Connection: close\r\n”. If I do a GET it does not close the connection.
My question is if it is correct for a failed Connect call to close my socket connection?
I'm not 100% clear about your question - I would not expect the first CONNECT to fail with an NTLM proxy server, as it should have sent a Proxy-Authenticate: NTLM header back.
In any case, proxy server has the full right to close the client-side connection in a case of failure, so the answer to your question is "yes". It is odd that it does not do the same for GET, however proxies are more limited with what they can do as a response to CONNECT, and this one may decide that it can't support HTTPS for your request.
What do i need to send to a proxy server (http or socks) that will tell me if it is connected to the host i specified it to connect to.
Neither proxy protocol provides that functionality. There is no way to query a proxy to see what server it is connected to, or whether it is a still connected to a server. If you tell it to connect to a server, then you have to assume it is always connected to that server as long as you have a valid connection with the proxy. If the proxy loses its connection to the server, then it needs to close the connection with your client.