hole-punching

UDP/TCP hole punching vs UPnP vs STUN vs?

梦想与她 提交于 2019-12-04 08:49:05
I try to make a P2P Program and need help with getting through the NAT of the clients. I have read many questions here on stackoverflow, but i never got what the drawbacks and benefits of all the Methods to get through a NAT are. How many routers support which methods? Which methods are commonly used by the big companies? (BitTorrent, TeamViewer,...) What are the drawbacks/benefits of the three methods i listed and which else exists? UPnP requires software support in your router. Even when routers have it, it's sometimes turned off due to security concerns. STUN uses a simple public server to

What's so hard about p2p Hole Punching?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 11:39:57
问题 I am trying to experiment with some p2p networking. Upon doing some research, one of the biggest obstacle I learnt is "What if a client is behind a NAT/Firewall" , later on I discovered about Hole Punching but that it is not always guaranteed to work. As far a I understand, I don't understand why it might fail, This is what I know so far: Based on the diagram above, this is how I understand how a successful connection can be established. Alice joins the network (1) by creating connection to a

UDP Hole Punching help

有些话、适合烂在心里 提交于 2019-12-03 09:20:14
I'm trying to add networking over the internet to my game, using Peer to Peer. I have already implemented a LAN only version, which uses .NET's peer to peer classes to connect within the local network. I realized I need to use UDP hole punching in order to establish a connection to other clients that are behind a firewall. This is how I have started to implement it: The server is a HTTP server using very simple PHP scripts to get the job done. register name on server, sending the private ip address and port as a GET variable when the server gets a registration request, it will save the public

Magento Hole puch With Varnish

青春壹個敷衍的年華 提交于 2019-12-03 08:55:34
问题 I recently installed the varnish 3.x in system (ubuntu) and configured it to 8080. Now full page caching is enabled and its working fine. I just want to ignore some specific dynamic blocks of the page. How can i do with magento. Also i am not using Magentos default caching techniques so i disabled it. also tried module Terpentine Thanks & Regard Rajesh Ganjeer 回答1: I have done this using Try this in local.xml inside the app/design/frontend/XXX/XXX/layout/local.xml file: <reference name="block

Communication between two computers without opening ports, using a third computer to set up the connection

前提是你 提交于 2019-12-03 08:01:58
问题 Let's say I have a server, and two clients connected to it. (via TCP, but it doesn't matter) My goal is to allow a direct connection between those two clients. This is to allow direct voice contact between two players, for example, or any other client plugin they may have installed which don't need server interaction (like playing some kind of random game between the two). The server can be there to help setting up the connection. From duskwuff's answer, I got several leads: http://en

UDP hole punching not going through on 3G

故事扮演 提交于 2019-12-03 02:53:59
问题 I'm trying to implement in a software a hole punching feature. The thing is, I'm implementing this with an already made TCP Server to communicate with Users. Here's what I have so far : "A" sends a message to an UDP Server "US" (on port 9333) "US" sends back to "A" the port it has connected to (port 31000 - localport 31005) "A" sends a message to a TCP Server "TS" saying he want's to connect to B (and give the port 31000) "TS" sends a message to "B" giving him the "A"'s port (31000) and ip "B

Communication between two computers without opening ports, using a third computer to set up the connection

自作多情 提交于 2019-12-02 21:30:12
Let's say I have a server, and two clients connected to it. (via TCP, but it doesn't matter) My goal is to allow a direct connection between those two clients. This is to allow direct voice contact between two players, for example, or any other client plugin they may have installed which don't need server interaction (like playing some kind of random game between the two). The server can be there to help setting up the connection. From duskwuff's answer, I got several leads: http://en.wikipedia.org/wiki/STUN which describes an algorithm to do that, and http://en.wikipedia.org/wiki/UDP_hole

How do I do TCP hole punching?

…衆ロ難τιáo~ 提交于 2019-12-02 18:34:31
Question is below. Here is my current test code which did not succeed. static void Main(string[] args) { if (args.Count() != 3) { Console.WriteLine("Bad args"); } var ep = new IPEndPoint(IPAddress.Parse(args[0]), int.Parse(args[1])); var lp = new IPEndPoint(IPAddress.Any, int.Parse(args[2])); var s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); s.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true); s.Bind(lp); var c = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); c.SetSocketOption(SocketOptionLevel.Socket

UDP hole punching host-specific failure

孤街醉人 提交于 2019-12-02 06:48:47
问题 I wrote a program that sets-up peer-to-peer links. The programm, which can be found at http://basyl.co.uk/code/punch/doc/files/Readme-txt.html, is in two parts: a server that runs on a public host; and a client that is used by each end of the desired peer-to-peer link. I have access to two public servers: 'bonn' (home.contextshift.co.uk) and 'entropy' (home2.contextshift.co.uk) If the server is on bonn and clients are run on bonn, entropy and my home PC (behind NAT), a punched connection from

Java-Client PHP-Server UDP Hole Punching example code

▼魔方 西西 提交于 2019-12-02 03:25:40
问题 I'm working on a project that will require ea p2p server, but I haven't found any java-client php-server example code. I understand the concept of how udp hole punching works but I can't get anything to work in code. What I've tried: TheSocket.java public class TheSocket { public static String response = "hello"; public static String request; public static String webServerAddress; public static ServerSocket s; protected static ServerSocket getServerSocket(int port)throws Exception{ return new