SamDecrock / node-tcp-hole-punching

Node.js script to demonstrate TCP hole punching through NAT
MIT License
73 stars 21 forks source link

(B->A) connection closed with err: ETIMEDOUT #6

Open huhu2356 opened 6 years ago

huhu2356 commented 6 years ago

i run publicserver.js on a public server (not behind a NAT). clientA.js on mac behind a NAT. clientB.js on win10 behind a different NAT.

but it logs : in win10 : (B->A) connection closed with err: ETIMEDOUT in mac : (A->B) connection closed with err: ETIMEDOUT

B don't receive any data from A, A don't receive any data from B.

what is problem ?

SamDecrock commented 6 years ago

It could be that one of of the NATs don't allow TCP hole punching.

Try using some other NATs. I too had the problem that TCP hole punching was not possible through the NAT of our university, but did work between 2 residential NATs.

UDP hole punching on the other hand works most of the time: https://github.com/SamDecrock/node-udp-hole-punching

huhu2356 commented 6 years ago

I try node-udp-hole-punching in different NATs , but it also fails ,

in clientB , it logs sending UDP message to A , but never receive any data from A ,

A is the same situation .

2018-03-08 20:37 GMT+08:00 Sam notifications@github.com:

It could be that one of of the NATs don't allow TCP hole punching.

Try using some other NATs. I too had the problem that TCP hole punching was not possible through the NAT of our university, but did work between 2 residential NATs.

UDP hole punching on the other hand works most of the time: https://github.com/SamDecrock/node-udp-hole-punching

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SamDecrock/node-tcp-hole-punching/issues/6#issuecomment-371475091, or mute the thread https://github.com/notifications/unsubscribe-auth/ASztgcUdjaUikLnSleJsKqJOqUR4UoT-ks5tcSYGgaJpZM4SiRvK .