mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2024-12-14 19:36:24 +00:00
allow specifying hostnames for udp/http individually
This commit is contained in:
parent
e7f0478e6e
commit
3eb0228c91
@ -121,9 +121,9 @@ Server.prototype.listen = function (/* port, hostname, onlistening */) {
|
|||||||
// ATTENTION:
|
// ATTENTION:
|
||||||
// binding to :: only receives IPv4 connections if the bindv6only
|
// binding to :: only receives IPv4 connections if the bindv6only
|
||||||
// sysctl is set 0, which is the default on many operating systems.
|
// sysctl is set 0, which is the default on many operating systems.
|
||||||
if (self.http) self.http.listen(port.http || port, hostname || '::')
|
if (self.http) self.http.listen(port.http || port, (hostname && hostname.http) || hostname || '::')
|
||||||
if (self.udp4) self.udp4.bind(port.udp || port, hostname)
|
if (self.udp4) self.udp4.bind(port.udp || port, (hostname && hostname.udp) || hostname)
|
||||||
if (self.udp6) self.udp6.bind(port.udp || port, hostname)
|
if (self.udp6) self.udp6.bind(port.udp || port, (hostname && hostname.udp) || hostname)
|
||||||
}
|
}
|
||||||
|
|
||||||
Server.prototype.close = function (cb) {
|
Server.prototype.close = function (cb) {
|
||||||
|
Loading…
Reference in New Issue
Block a user