• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2101
  • Last Modified:

NAT Transversal - INDY / Delphi Source Code

Hi,

Has anyone got some sample Delphi source code for NAT Transversal?

I am interested in getting our accounting application to run Peer-to-peer behind firewalls.  
It is already multi-tier with client / server using INDY.
0
enigmasolutions
Asked:
enigmasolutions
  • 2
1 Solution
 
btanExec ConsultantCommented:
something useful may include
- How do I use Indy with a NAT (Network Address Translator)?
http://www.indyproject.org/kb/index.html?ftpsslbehindnat.htm

others...

- Using Universal Plug And Play (UPnP) with Delphi (created a 'TNetworkDeviceFinder')
http://francois-piette.blogspot.sg/2013/02/using-universal-plug-and-play-upnp-with.html
 
thought 'pwnat' may be useful reference as it is in .c though not Delphi - most codes are in C#
http://samy.pl/pwnat/
- pwnat, pronounced "poe-nat", is a tool that allows any
    number of clients behind NATs to communicate with a
    server behind a separate NAT with *no* port forwarding
    *no* DMZ setup, and no 3rd party involvement. The server
    does not need to know anything about the clients trying
    to connect.

http://samy.pl/chownat/
- chownat, pronounced "chone nat", allows two peers behind
       two separate NATs with NO port forwarding and NO DMZ setup
       on their routers to directly communicate with each other.

http://www.codeproject.com/Articles/27992/NAT-Traversal-with-UPnP-in-C
- UPnP library that only covers the NAT aspects, and not even fully at that - only UPnP device discovery, basic port forwarding, and retrieving the external IP address.
0
 
btanExec ConsultantCommented:
Useful info

http://bcbjournal.org/forums/viewtopic.php?f=10&t=1300

There are several different techniques for dealing with routers - NAT Traversal, Hole Punching, uPNP, Role Reversal, just to name a few. Skype, and most other peer-to-peer apps, utilize many of these techniques
Can I use Indy for dealing with routers?

Yes (in fact, Skype for Windows is written in Delphi and uses Indy, actually). What I described earlier are techniques, logic patterns, etc. They are not specific to any particular socket library, so they will work with any socket library you choose to use, whether that be Indy, ICS, Synapse, WinSock, whatever. As long as you have access to base TCP/UDP functionality, you can utilize them.
0
 
enigmasolutionsAuthor Commented:
Thank you.  That is great information.  Good enough for me to start the research.
0

Featured Post

When ransomware hits your clients, what do you do?

MSPs: Endpoint security isn’t enough to prevent ransomware.
As the impact and severity of crypto ransomware attacks has grown, Webroot fought back, not just by building a next-gen endpoint solution capable of preventing ransomware attacks but also by being a thought leader.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now