Questions tagged [hole-punching]

Hole punching is the process of taking advantage of the standard way of implementing NAT to allow direct connection between computers in private networks.

The process starts as normal proxy - two devices connect to the same public server:

image description

The data flows through public server. The green circles represent the socket connections between devices, the blue line is the flow of data.

Now what it the server sends socket A to device B and vice versa?

image description

Suddenly, both devices have each other's "address" and can send any information to each other:

image description

181 questions
0
votes
2 answers

best peer to peer technique for mobile network

I deal with design of peer to peer communication between mobile unit and user phone. Mobile unit is targeted into cars, so it is possible that it could be connected to many various ISPs. It can be also expected that the clients will be often…
0
votes
1 answer

Binding a UDP socket to wildcard hosts in Ruby

I have been trying to understand the basic idea behind UDP hole punching, and I'm having trouble understanding the difference between the following two socket bindings: sock = UDPSocket.new sock.bind('', port ) and sock =…
sham
  • 1
0
votes
3 answers

Java(Android): create ServerSocket on LocalPort used for another Socket

I'm a little stumped and probably because I don't know how to search for this properly (I've tried many different keywords). Anyway, I'm attempting a variation of TCP hole punching(with a rendezvous server). I have created a TCP socket to the server…
RoboLam
  • 488
  • 6
  • 14
0
votes
1 answer

Magento Enterprise Full Page Cache(FPC) Cart Sidebar issue when Switching between Multiple currencies

The Issue: If your magento enterprise store has multiple currencies enabled and you are using Cart Sidebar to give a quick overview of items in the cart: Full Page Cache will be a villain when the customer try to switch between currencies. The Cart…
Nidheesh
  • 453
  • 4
  • 11
0
votes
1 answer

UDP hole punching only partially working c#

I am trying to use UDP hole punching for a voip application. I currently have this part working: Open port not blocked by firewall on server (Port forwarding) Created UDP socket on client1 Created UDP socket on client2 Send packets over to Server…
0
votes
1 answer

UDP hole punching expires

UPDATE It turned out that the problem is unrelated to NAT and UDP hole punching. So I have created a new Q. I've implemented UDP hole punching using the following approach: A known server (no NAT), at a known port, is handling incoming UDP. A client…
Bram
  • 7,440
  • 3
  • 52
  • 94
0
votes
1 answer

Does UDP hole punching occur in between hosts inside the same network?

Say I have a router with IP 42.98.1.70, with 2 NiCs connected to it with IPs 192.168.1.200 and 192.168.1.300. The router has port forwarding on port 10433 to redirect packets to 192.168.1.200. The routers internal network IP is 192.168.1.100. When…
Daltrey Waters
  • 325
  • 2
  • 14
0
votes
1 answer

I have been trying hole punching and send a datagram to my friends computer behind a router but nothing happens

I am trying to create a p2p connection. This is a just test app that i have check but seems like it does not work over internet. This is the java code that I am using on my pc to send a datagram to my friend: ' import java.io.IOException; …
0
votes
0 answers

UDP hole punching not working in Windows, but Linux is OK

I'm having problem with UDP communication between Linux/Windows machines. I implemented a simple P2P communication protocol over UDP using a relay server. It uses UDP hole punching to eliminate role of server in data transfer. Data transmission…
sorush-r
  • 10,490
  • 17
  • 89
  • 173
0
votes
1 answer

TCP hole punching, can't reuse address on android

I have an android device hosting an HTTP server and is NATed(behind router). I want to access it from a public server which is not NATed. I run a HTTP server on android device at port 8080 in a thread and after some time, I launch a client thread…
rohitverma
  • 767
  • 2
  • 9
  • 14
0
votes
1 answer

UDP hole punching on 1 port?

I want to use UDP to send PUSH notifications for users of our system , but i wonder if it will work ? Assuming i have one server which have port let's say UDP:8888 open and waiting for connections . My questions are : Is it possible for many users…
Rami Dabain
  • 4,709
  • 12
  • 62
  • 106
-1
votes
1 answer

udp hole punch and port restricted cone NAT,

I would like to understand how udp hole punching works when two hosts each behind the port restricted cone NAT establish connection. As I understood, it happens in several stages and involves three hosts. Host A and host B are behind the port…
Yuming
  • 1
  • 1
-1
votes
1 answer

UDP hole punching can't connect externally

I have previously made a simple peer to peer chat program using UDP hole punching that worked and now I am trying to do something similar but within a game made using libGDX. The game itself runs fine and the connections work on a LAN but I have…
Basim Khajwal
  • 946
  • 6
  • 6
-1
votes
1 answer

Android, how do i get the my NAT addr?

hi now im learning and developing android application it's about remote controlling, make android phone to control computer but... i've encountered serious problem.. When client is under the NAT environment, both server and client couuldn't…
John_potato
  • 105
  • 1
  • 4
-2
votes
1 answer

Python TCP hole punching

I am currently working on a little p2p basic system in python and I would like to know how do you make a TCP hole punch. I already successfully did one in UDP but I want the more organized TCP connection for the rest. And yes, i've already googled…
System230
  • 3
  • 2
1 2 3
11
12