Recent

Author Topic: lazsecuretcptunnel  (Read 1500 times)

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
lazsecuretcptunnel
« on: March 31, 2019, 06:22:48 pm »
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
Code: [Select]
local_port=2411
remote_ip=localhost
remote_port=2418
crypt_enabled=true
is_local_node=true

config2.ini has the following parameters
Code: [Select]
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.
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: lazsecuretcptunnel
« Reply #1 on: April 02, 2019, 11:53:05 am »
Hi guys, have the people who downloaded my source, compiled it and watched it work? Does anyone have any idea where the error is hiding?
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

 

TinyPortal © 2005-2018