googlearchive / ADBPlugin

Google Chrome Extension with ADB Daemon
375 stars 73 forks source link

Why is port forwarding limited to 1024-10000 range? #35

Closed risujin closed 10 years ago

risujin commented 10 years ago

Port forwarding is a great feature but is limited by a seemingly arbitrary range restriction in Chrome:

function validatePort(input) {
  var match = input.value.match(/^(\d+)$/);
  if (!match)
    return false;
  var port = parseInt(match[1]);
  if (port < 1024 || 10000 < port) // ←←←←←←←←←←
    return false;
  ...
  return true;
}

Is there a reason for that? Can this be changed to allow all ports, or at least, ports above 10000?

paulirish commented 10 years ago

yes, this has now been updated!

http://src.chromium.org/viewvc/chrome?view=revision&revision=245151

Chrome 34 (currently dev channel and canary) support ports >10000