Hi everybody!
I'm using ZEOSDBO-7.1.3a-stable and Delphi7 OS Win 10 64bit to Access a MySQL DataBase using TZConnection.
I can connect to the host for example: example.com like
..
Form1.ZConnection1.HostName :='example.com';
Form1.ZConnection1.Port := 3306;
Form1.ZConnection1.Protocol := 'mysql';
…
Now I learned that equipment and programs were added to the network.
and it is impossible without a proxy ... the program cannot reach the HOST: 'example.com
How can I use proxi (ip and port 192.111.111.111 4444) in my program code to connect example.com
if possible a simple example to study
Thanks!
ZEOSDBO-7.1.3a-stable and Delphi7 -proxy
-
- Platinum Boarder
- Posts: 1962
- Joined: 17.01.2011, 14:17
Re: ZEOSDBO-7.1.3a-stable and Delphi7 -proxy
Zeos 7.1 has been discontinued for some years now. Please migrate to Zeos 7.2 or to the new Zeos 8.0.
I doubt, that MySQL can establish a direct connection through a proxy. Also this will depend on the kind of proxy that is in use (http vs. SOCKS). You should consult the MySQL / MariaDB documentation on that. Zeos only uses the limbysql.dll to talk to MySQL / MariaDB and doesn't care how the connection is done.mrtg wrote: ↑15.04.2021, 10:31OS Win 10 64bit to Access a MySQL DataBase using TZConnection.
I can connect to the host for example: example.com like
..
Form1.ZConnection1.HostName :='example.com';
Form1.ZConnection1.Port := 3306;
Form1.ZConnection1.Protocol := 'mysql';
…
Now I learned that equipment and programs were added to the network.
and it is impossible without a proxy ... the program cannot reach the HOST: 'example.com
How can I use proxi (ip and port 192.111.111.111 4444) in my program code to connect example.com
With Zeos 8.0 there could be a chance to get the Webservice driver to work with a proxy. But there are limitations to this approach:
- The driver doesn't work with Delphi 7 (yet). This mostly has to do with Delphi 7 not having a possibililty to encode and decode base64 - as far as I know. There are ideas on how to overcome this limitation.
- The driver doesn't yet talk to proxies.
- You would have to install the Zeos Proxy Server on the server side.
Another option might be to check out the mORMot framework or to implement your own web service.
Best regards,
Jan
Re: ZEOSDBO-7.1.3a-stable and Delphi7 -proxy
Jan, thank you for information.
Re: ZEOSDBO-7.1.3a-stable and Delphi7 -proxy
Additionally you can use:
- port mapping. Setup a software on a host that is reachable from client side and could reach DB server to listen on some port and redirect traffic to a port where DB server lives. Then from client just talk to that host
client => portmapper_host => DB server
- local proxy (kind of port mapping). Setup a software that is able to connect via proxy and can listen for incoming connections, then talk with it like it was DB server
- socksifier. Launch client from socksifier software that would intercept all network functions and wrap traffic into socks channel
Related software: 3proxy, tinyproxy, squid etc; FreeCap - socksifier
Btw, #2 could even be built-in into your app, it's not that hard with Indy or ICS.
- port mapping. Setup a software on a host that is reachable from client side and could reach DB server to listen on some port and redirect traffic to a port where DB server lives. Then from client just talk to that host
client => portmapper_host => DB server
- local proxy (kind of port mapping). Setup a software that is able to connect via proxy and can listen for incoming connections, then talk with it like it was DB server
- socksifier. Launch client from socksifier software that would intercept all network functions and wrap traffic into socks channel
Related software: 3proxy, tinyproxy, squid etc; FreeCap - socksifier
Btw, #2 could even be built-in into your app, it's not that hard with Indy or ICS.
Re: ZEOSDBO-7.1.3a-stable and Delphi7 -proxy
Fr0sT»
Thank you for your attention and detailed answer.
Thank you for your attention and detailed answer.