ZEOSDBO-7.1.3a-stable and Delphi7 -proxy

The official tester's forum for ZeosLib 7.1. Ask for help, post proposals or solutions.
Post Reply
mrtg
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 15.04.2021, 10:17

ZEOSDBO-7.1.3a-stable and Delphi7 -proxy

Post by mrtg »

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!
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1962
Joined: 17.01.2011, 14:17

Re: ZEOSDBO-7.1.3a-stable and Delphi7 -proxy

Post by marsupilami »

mrtg wrote: 15.04.2021, 10:31 I'm using ZEOSDBO-7.1.3a-stable and Delphi7
Zeos 7.1 has been discontinued for some years now. Please migrate to Zeos 7.2 or to the new Zeos 8.0.
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
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.

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
mrtg
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 15.04.2021, 10:17

Re: ZEOSDBO-7.1.3a-stable and Delphi7 -proxy

Post by mrtg »

Jan, thank you for information.
Fr0sT
Zeos Dev Team
Zeos Dev Team
Posts: 280
Joined: 08.05.2014, 12:08

Re: ZEOSDBO-7.1.3a-stable and Delphi7 -proxy

Post by Fr0sT »

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.
mrtg
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 15.04.2021, 10:17

Re: ZEOSDBO-7.1.3a-stable and Delphi7 -proxy

Post by mrtg »

Fr0sT»

Thank you for your attention and detailed answer.
Post Reply