Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for NAT traversal techniques #1437

Open
wants to merge 20 commits into
base: master
from
Open
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Fix browser issues and revert nat-pmp patch

  • Loading branch information
yciabaud committed Feb 22, 2017
commit cf0559078bbed214b492564f0f277017fd0d0780
@@ -132,7 +132,7 @@ function WebTorrent (opts) {
var address = self.dht.address()
if (address) {
self.dhtPort = address.port
if (self._natTraversal) {
if (self._natTraversal.portMapping) {
self._natTraversal.portMapping(self.dhtPort)
}
}
@@ -432,7 +432,7 @@ WebTorrent.prototype._destroy = function (err, cb) {
})
}

if (self._natTraversal) {
if (self._natTraversal.destroy) {
tasks.push(function (cb) {
self._natTraversal.destroy(cb)
})
@@ -456,7 +456,7 @@ WebTorrent.prototype._onListening = function () {
var address = this._tcpPool.server.address()
if (address) {
this.torrentPort = address.port
if (this._natTraversal) {
if (this._natTraversal.portMapping) {
this._natTraversal.portMapping(this.torrentPort)
}
}
@@ -45,7 +45,7 @@
"memory-chunk-store": "^1.2.0",
"mime": "^1.3.4",
"multistream": "^2.0.5",
"nat-pmp": "github:yciabaud/node-nat-pmp#patch-1",
"nat-pmp": "^1.0.0",
"nat-upnp": "^1.0.4",
"network": "^0.3.2",
"package-json-versionify": "^1.0.2",
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.