# udp_hole **Repository Path**: lduml/udp_hole ## Basic Information - **Project Name**: udp_hole - **Description**: UDP 打洞 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-10-09 - **Last Updated**: 2023-11-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README note: - server ``` gcc -o server udp_server.c ``` - client before run client, change the SRV_IP is need todo . ``` gcc -o client udp_client.c ./client 101 ./client 102 # 101 or 102 is the client id ``` code from: https://github.com/mwarning/UDP-hole-punching-examples/blob/master/example1/README.md A simple UDP hole punching example originally taken from http://www.rapapaing.com/blog/?p=24. To use it you need to set SRV_IP in client_udp.c. A drawback is that it always punches the one port that the server is using to talk to the other client. It would be better to test the ports above that port for a higher success rate.