title: adding routes to the win/OSX hosts files without admin privileges, or using a complimentary hosts file
body: <p>I've read <a href="https://stackoverflow.com/questions/10310530/how-to-configure-user-specific-hosts-file-on-windows">How to configure user specific hosts file on Windows</a>, it has no answers and is from 2012 so the chance that anyone revives it is pretty much zero.</p>
  
  <p>Here's my use case: we have a nodejs tool suite that lets users generate content that is saved to their own subdomain on the production system. Say it's deployed on <code>example.org</code>, and you're registered with username <code>xyz</code> then the content you generate ends up on <code>xyz.examplecontent.org</code> (different domain because of obvious security issues).</p>
  
  <p>The problem is that this also needs to be tested locally by devs, including the system that does username-prefixed domain routing. Since on a clean checkout, there are no prebaked users, each dev would have to set up some users (this part is essential, because it tests the user-creation process), but then also manually edit their <code>hosts</code> file so that there are (As far as the computer knows) user subdomain hosts that will resolve correctly.</p>
  
  <p>It's possible to sort-of-kind-of automate the hosts modifications using libraries like <a href="https://npmjs.org/package/hostile" rel="nofollow noreferrer">https://npmjs.org/package/hostile</a> or <a href="https://npmjs.org/package/mod-hosts" rel="nofollow noreferrer">https://npmjs.org/package/mod-hosts</a> (discounting <a href="https://npmjs.org/package/local-tld" rel="nofollow noreferrer">https://npmjs.org/package/local-tld</a> because it's OSX only) but since modifying the hosts file on windows or OSX requires administrative rights, and you're definitely not going to run any app with admin rights, these libraries are cool, but not actually usable.</p>
  
  <p>Are there any Node.js packages that I can't find when searching <a href="http://npmjs.org" rel="nofollow noreferrer">http://npmjs.org</a> for "hosts" that would solve this issue, or do windows and OSX have ways to set up complimentary hosts files so that additional hosts rules can be specified without polluting the master file, and not needing admin rights?</p>
  
  <p><strong>note:</strong> Answers of the kind "this automation tool can do that for you and runs on *n*x, OSX and windows, but requires ruby/python/perl/whatever" are also perfectly acceptable of course. As long as it's cross-platform and doesn't require admin rights, that's already better than hand curating.</p>