How to connect DataSnap client to DataSnap server via proxy server?
<p>The problem is this:</p>

<p>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. </p>

<p>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 <strong>"<code>10061 connection refused</code>"</strong> 
or <strong>"<code>Expected datasnap context in request http://[YourServerIP]:[YourPort]/datasnap/tunnel</code>"</strong>.</p>

<p>I tried to enter IP and port of the proxy server to params of component <strong><code>TSQLConnection.Driver</code></strong> params <strong><code>DSProxyHost</code></strong> and <strong><code>DSProxyPort</code></strong>, turned off my firewall and antivirus software, checked allows traffic to the proxy ip + port, but the problem has not disappeared.</p>

<p>After few days searches, without results, i decided listening requests from client application and response of my DataSnap Server application in <strong><code>HTTPTrace</code></strong> procedure of <strong><code>DSHTTPService1</code></strong> component, also with software <em>HTTPDebugerPro</em>, and i noticed interesting thing:</p>

<ul>
<li>when client app connecting to ds server app without proxy server, in request ds server app receive <strong><code>URI</code></strong> with this text <strong>"<code>/datasnap/tunnel</code>"</strong> and all works fine ds server response <strong>"<code>200, OK</code>"</strong>.</li>
<li>when client app connecting to ds server app with proxy, in request ds server app receive <strong><code>URI</code></strong> with text <strong>"<code>http://[YourServerIP]:[YourPort]/datasnap/tunnel</code>"</strong> and raised exception with response error <strong>"<code>404, Expected datasnap context in request http://YourServerIP:YourPort/datasnap/tunnel</code>"</strong>.</li>
</ul>

<p>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.</p>