Hi guys, it's been a while since I've had the idea of creating a encrypted tcp tunnel all in pure pascal. I proceed by degrees but proceed:
1. I created the unencrypted tcp tunnel - done and it always seems functional
2. I encrypted the connection with a 256-bit aes (military encryption) - done but it doesn't always work
3. copy of the password with an asymmetric key encryption - to do but so come
I am attaching the work done so far. My problem is that this software was created for security. If the software is started without encryption everything works (query a database with flamerobin for example) and you will see that there are no problems. If you start the tunnel with encryption after a while it stops working. Who explains me why? I don't really understand it.
Now I will explain how to make it operational. Complete the project. The executable duplicates it also in another folder. Then you will see that there is the file config1.ini and config2.ini
Copy config1.ini to a folder with the executable and rename it to config.ini
Copy config2.ini into the other folder with the executable and rename it to config.ini
config1.ini has the following parameters
local_port=2411
remote_ip=localhost
remote_port=2418
crypt_enabled=true
is_local_node=true
config2.ini has the following parameters
local_port=2418
remote_ip=localhost
remote_port=3050
crypt_enabled=true
is_local_node=false
debug_b=true
The config1.ini is the one that starts the part of the tunnel to which flamerobin must connect on port 2411 and which creates the encrypted connection to port 2418 of the remote server (I have everything in localhost)
The config2.ini is the one that worked to close the tunnel and establish the encrypted connection to then redirect the content to port 3050 (in this case it is firebird)
Now I ask you to do something that is not the point 2. Flamerobin must work without interruption with the encrypted connection. Without this I am the project and I make it available to everyone in the form of an open source project.
I use synapses to use sockets.