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

Bind to localhost by default instead of local ip for security and privacy #231

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ var rc = require('rc')
var clivas = require('clivas')
var numeral = require('numeral')
var os = require('os')
var address = require('network-address')
var readTorrent = require('read-torrent')
var proc = require('child_process')
var peerflix = require('./')
Expand Down Expand Up @@ -180,7 +179,7 @@ var ontorrent = function (torrent) {
}

engine.server.on('listening', function () {
var host = argv.hostname || address()
var host = argv.hostname || 'localhost'
var href = 'http://' + host + ':' + engine.server.address().port + '/'
var localHref = 'http://localhost:' + engine.server.address().port + '/'
var filename = engine.server.index.name.split('/').pop().replace(/\{|\}/g, '')
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"inquirer": "^0.8.0",
"keypress": "^0.2.1",
"mime": "^1.2.11",
"network-address": "0.0.5",
"numeral": "^1.5.3",
"open": "0.0.5",
"optimist": "^0.6.1",
Expand Down