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

Node Debugger Should Make IP Address Configurable #3306

Closed
yunong opened this issue Oct 9, 2015 · 3 comments
Closed

Node Debugger Should Make IP Address Configurable #3306

yunong opened this issue Oct 9, 2015 · 3 comments
Labels
feature request Issues that request new features to be added to Node.js.

Comments

@yunong
Copy link
Member

yunong commented Oct 9, 2015

Hi,

Today the Node debugger forces all debug processes to run on the loop back IP of 127.0.0.1.

See:

host = '127.0.0.1',

But there cases where you might want to expose a remote debugger port that's not just on the loopback interface. For example, on 0.0.0.0 instead. Otherwise, as it is implemented today, remote debugging is not possible -- since the use of the loopback forces all client connections to the node process to be local.

@mscdex mscdex added debugger feature request Issues that request new features to be added to Node.js. labels Oct 9, 2015
@bnoordhuis
Copy link
Member

I think a pull request making that change would be acceptable, as long as the default behavior stays the same.

For the record, the code you link to knows about external hosts, it's the parsing code for node debug example.com:1234. The code you're looking for is in lib/_debug_agent.js and src/debug-agent.cc.

@bnoordhuis
Copy link
Member

I had a quick look and I think that (at least in master) the debugger binds to ::0 by default. Probably an unintended change from 2272052 and arguably a small security liability.

@bnoordhuis
Copy link
Member

#3316

bnoordhuis added a commit to bnoordhuis/io.js that referenced this issue Jun 30, 2016
`--debug=1.2.3.4:5678` and `--debug=example.com:5678` are now accepted,
likewise the `--debug-brk` and `--debug-port` switch.  The latter is
now something of a misnomer but it's undocumented and for internal use
only so it shouldn't matter too much.

`--inspect=1.2.3.4:5678` and `--inspect=example.com:5678` are also
accepted but don't use the host name yet; they still bind to the
default address.

Fixes: nodejs#3306
PR-URL: nodejs#3316
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Fishrock123 pushed a commit that referenced this issue Jul 5, 2016
`--debug=1.2.3.4:5678` and `--debug=example.com:5678` are now accepted,
likewise the `--debug-brk` and `--debug-port` switch.  The latter is
now something of a misnomer but it's undocumented and for internal use
only so it shouldn't matter too much.

`--inspect=1.2.3.4:5678` and `--inspect=example.com:5678` are also
accepted but don't use the host name yet; they still bind to the
default address.

Fixes: #3306
PR-URL: #3316
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Qard pushed a commit to Qard/node that referenced this issue Nov 19, 2016
`--debug=1.2.3.4:5678` and `--debug=example.com:5678` are now accepted,
likewise the `--debug-brk` and `--debug-port` switch.  The latter is
now something of a misnomer but it's undocumented and for internal use
only so it shouldn't matter too much.

`--inspect=1.2.3.4:5678` and `--inspect=example.com:5678` are also
accepted but don't use the host name yet; they still bind to the
default address.

Fixes: nodejs#3306
PR-URL: nodejs#3316
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
MylesBorins pushed a commit that referenced this issue Nov 22, 2016
`--debug=1.2.3.4:5678` and `--debug=example.com:5678` are now accepted,
likewise the `--debug-brk` and `--debug-port` switch.  The latter is
now something of a misnomer but it's undocumented and for internal use
only so it shouldn't matter too much.

`--inspect=1.2.3.4:5678` and `--inspect=example.com:5678` are also
accepted but don't use the host name yet; they still bind to the
default address.

Fixes: #3306
PR-URL: #3316
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
MylesBorins pushed a commit that referenced this issue Nov 22, 2016
`--debug=1.2.3.4:5678` and `--debug=example.com:5678` are now accepted,
likewise the `--debug-brk` and `--debug-port` switch.  The latter is
now something of a misnomer but it's undocumented and for internal use
only so it shouldn't matter too much.

`--inspect=1.2.3.4:5678` and `--inspect=example.com:5678` are also
accepted but don't use the host name yet; they still bind to the
default address.

Fixes: #3306
PR-URL: #3316
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to Node.js.
Projects
None yet
Development

No branches or pull requests

3 participants