{"action":"created","issue":{"url":"https://api.github.com/repos/libp2p/js-libp2p/issues/104","repository_url":"https://api.github.com/repos/libp2p/js-libp2p","labels_url":"https://api.github.com/repos/libp2p/js-libp2p/issues/104/labels{/name}","comments_url":"https://api.github.com/repos/libp2p/js-libp2p/issues/104/comments","events_url":"https://api.github.com/repos/libp2p/js-libp2p/issues/104/events","html_url":"https://github.com/libp2p/js-libp2p/issues/104","id":241525799,"number":104,"title":"NAT Traversal","user":{"login":"diasdavid","id":1211152,"avatar_url":"https://avatars0.githubusercontent.com/u/1211152?v=4","gravatar_id":"","url":"https://api.github.com/users/diasdavid","html_url":"https://github.com/diasdavid","followers_url":"https://api.github.com/users/diasdavid/followers","following_url":"https://api.github.com/users/diasdavid/following{/other_user}","gists_url":"https://api.github.com/users/diasdavid/gists{/gist_id}","starred_url":"https://api.github.com/users/diasdavid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diasdavid/subscriptions","organizations_url":"https://api.github.com/users/diasdavid/orgs","repos_url":"https://api.github.com/users/diasdavid/repos","events_url":"https://api.github.com/users/diasdavid/events{/privacy}","received_events_url":"https://api.github.com/users/diasdavid/received_events","type":"User","site_admin":false},"labels":[{"id":419592417,"url":"https://api.github.com/repos/libp2p/js-libp2p/labels/difficulty:hard","name":"difficulty:hard","color":"bfe5bf","default":false},{"id":239815003,"url":"https://api.github.com/repos/libp2p/js-libp2p/labels/help%20wanted","name":"help wanted","color":"0e8a16","default":true},{"id":494551375,"url":"https://api.github.com/repos/libp2p/js-libp2p/labels/ready","name":"ready","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-07-09T13:45:08Z","updated_at":"2018-05-29T20:43:23Z","closed_at":null,"author_association":"MEMBER","body":"Currently, the only mechanism to pierce through NATs in js-libp2p is the WebRTC transport. NAT Traversal is a feature that is hard to get 100% complete as there will be always more NAT implementations that will not work with the strategies we have in place. Ultimately the last resort is Relay (Circuit or Packet Switched).\r\n\r\nThere is plenty of work available for NAT Traversal, WebRTC is kind of a canon to solve this problem, but not every peer will have WebRTC neither we can trust WebRTC 100% of the times. \r\n\r\nHere is a list of good resources to get started:\r\n  - https://tools.ietf.org/html/rfc5128\r\n  - http://www.brynosaurus.com/pub/net/p2pnat/\r\n  - https://samy.pl/chownat/\r\n  - http://samy.pl/pwnat/\r\n  - https://en.wikipedia.org/wiki/Universal_Plug_and_Play\r\n  - https://www.npmjs.com/package/pmp\r\n  - There are more modules -- https://www.npmjs.com/search?q=nat+traversal --, I haven't looked at them all. Getting a throughout review of them would be awesome.\r\n  - https://github.com/getlantern/natty\r\n\r\nThe next milestone for Relay is to support UPnP for TCP ports, the same way go-ipfs does."},"comment":{"url":"https://api.github.com/repos/libp2p/js-libp2p/issues/comments/392937152","html_url":"https://github.com/libp2p/js-libp2p/issues/104#issuecomment-392937152","issue_url":"https://api.github.com/repos/libp2p/js-libp2p/issues/104","id":392937152,"user":{"login":"dryajov","id":1094341,"avatar_url":"https://avatars1.githubusercontent.com/u/1094341?v=4","gravatar_id":"","url":"https://api.github.com/users/dryajov","html_url":"https://github.com/dryajov","followers_url":"https://api.github.com/users/dryajov/followers","following_url":"https://api.github.com/users/dryajov/following{/other_user}","gists_url":"https://api.github.com/users/dryajov/gists{/gist_id}","starred_url":"https://api.github.com/users/dryajov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dryajov/subscriptions","organizations_url":"https://api.github.com/users/dryajov/orgs","repos_url":"https://api.github.com/users/dryajov/repos","events_url":"https://api.github.com/users/dryajov/events{/privacy}","received_events_url":"https://api.github.com/users/dryajov/received_events","type":"User","site_admin":false},"created_at":"2018-05-29T20:43:23Z","updated_at":"2018-05-29T20:43:23Z","author_association":"MEMBER","body":"Quick update and outline of what is currently being worked on:\r\n\r\n- I've put together an initial implementation of a nat mapper that will allow creating port mappings using different available techniques (upnp, pmp, pcp, hole punching, etc...). Currently, pmp and upnp are being supported, with pcp and hole punching planed once the rest settles in.\r\n  - the code is here (heavy wip) - https://github.com/libp2p/js-libp2p-nat-mngr\r\n- A `dialme` protocol has been proposed here - https://github.com/libp2p/specs/pull/64\r\n  - this will allow us to request dial backs on mapped public ports from clients dialed over a relay, thus allowing to upgrade circuited connections to direct ones if that is possible\r\n \r\n"}}
{"actor":{"display_login":"dryajov"}}