{
  "_args": [
    [
      {
        "raw": "github:meishuu/tera-proxy-sls",
        "scope": null,
        "escapedName": null,
        "name": null,
        "rawSpec": "github:meishuu/tera-proxy-sls",
        "spec": "github:meishuu/tera-proxy-sls",
        "type": "hosted",
        "hosted": {
          "type": "github",
          "ssh": "git@github.com:meishuu/tera-proxy-sls.git",
          "sshUrl": "git+ssh://git@github.com/meishuu/tera-proxy-sls.git",
          "httpsUrl": "git+https://github.com/meishuu/tera-proxy-sls.git",
          "gitUrl": "git://github.com/meishuu/tera-proxy-sls.git",
          "shortcut": "github:meishuu/tera-proxy-sls",
          "directUrl": "https://raw.githubusercontent.com/meishuu/tera-proxy-sls/master/package.json"
        }
      },
      "C:\\Users\\YarNova\\Local Apps\\tera-proxy"
    ]
  ],
  "_from": "meishuu/tera-proxy-sls",
  "_id": "tera-proxy-sls@0.1.0",
  "_inCache": true,
  "_location": "/tera-proxy-sls",
  "_phantomChildren": {},
  "_requested": {
    "raw": "github:meishuu/tera-proxy-sls",
    "scope": null,
    "escapedName": null,
    "name": null,
    "rawSpec": "github:meishuu/tera-proxy-sls",
    "spec": "github:meishuu/tera-proxy-sls",
    "type": "hosted",
    "hosted": {
      "type": "github",
      "ssh": "git@github.com:meishuu/tera-proxy-sls.git",
      "sshUrl": "git+ssh://git@github.com/meishuu/tera-proxy-sls.git",
      "httpsUrl": "git+https://github.com/meishuu/tera-proxy-sls.git",
      "gitUrl": "git://github.com/meishuu/tera-proxy-sls.git",
      "shortcut": "github:meishuu/tera-proxy-sls",
      "directUrl": "https://raw.githubusercontent.com/meishuu/tera-proxy-sls/master/package.json"
    }
  },
  "_requiredBy": [
    "#USER",
    "/"
  ],
  "_resolved": "git://github.com/meishuu/tera-proxy-sls.git#6841c18fd0ec851a0e530489332716dc3cf7ca9c",
  "_shasum": "28f3909c055fbe8e8502b21a86b99dffad9d56d0",
  "_shrinkwrap": null,
  "_spec": "github:meishuu/tera-proxy-sls",
  "_where": "C:\\Users\\YarNova\\Local Apps\\tera-proxy",
  "author": {
    "name": "meishu"
  },
  "bugs": {
    "url": "https://github.com/meishuu/tera-proxy-sls/issues"
  },
  "dependencies": {
    "http-proxy": "^1.15.1",
    "xmldom": "^0.1.22"
  },
  "description": "Adds servers to the EME TERA server list.",
  "devDependencies": {},
  "engines": {
    "node": ">=6.0.0"
  },
  "gitHead": "6841c18fd0ec851a0e530489332716dc3cf7ca9c",
  "homepage": "https://github.com/meishuu/tera-proxy-sls#readme",
  "license": "ISC",
  "main": "index.js",
  "name": "tera-proxy-sls",
  "optionalDependencies": {},
  "readme": "# tera-proxy-sls\n\nSpawns an HTTP proxy server to modify a TERA server list.\n\n## Example:\n```javascript\nvar SlsProxy = require('sls');\nvar proxy = new SlsProxy({\n  customServers: {\n    4009: { name: 'Celestial Chills', port: 9999, overwrite: false }\n  }\n});\nproxy.listen('127.0.0.1', () => console.log('listening'));\nprocess.on('SIGHUP', () => proxy.close());\n```\n\n## API Reference:\n\n### `new SlsProxy(opts)`\nConstructor with the following allowed options:\n * `host`: The hostname for the target server list. Default: `sls.service.enmasse.com`\n * `port`: The port for the target server list and for the proxy server. Default: `8080`\n * `customServers`: An object of custom servers. See `setServers` below for details. Default: `{}`\n * `listenHostname`: The hostname for the proxy server to accept connections on. See `net.server.listen`. Default: `127.0.0.1`\n\n### `proxy.setServers(servers)`\nSets the custom server object where `servers` is a mapping of server IDs with custom options.\n\nFor each server, valid options are:\n * `ip`: The IP to point to for the custom server. Default: `127.0.0.1`\n * `port`: The port for the custom server. Default: `null` (no change)\n * `name`: The name to use for this server in the list. Default: `null` (no change)\n * `overwrite`: If `true`, this custom server will completely replace the original one in the list. Default: `false`\n\nIf `overwrite` is `false` for a server ID, then the `crowdness` for the new server will have a sort value of `0`\nto give it priority over the old server when TERA selects which one to automatically log into.\n\n### `proxy.fetch(callback)`\nFetches a map of server IDs and simplified properties from the official list.\n\n`callback` receives two parameters:\n * `err`: The error, or `null` if none.\n * `servers`: An object mapping IDs to objects containing server metadata.\n\nExample result:\n```json\n{\n  \"4004\": {\n    \"id\": \"4004\",\n    \"ip\": \"208.67.49.28\",\n    \"port\": \"10001\",\n    \"name\": \"Tempest Reach\"\n  },\n  \"4009\": {\n    \"id\": \"4009\",\n    \"ip\": \"208.67.49.68\",\n    \"port\": \"10001\",\n    \"name\": \"Celestial Hills - Roleplay\"\n  },\n  \"4012\": {\n    \"id\": \"4012\",\n    \"ip\": \"208.67.49.92\",\n    \"port\": \"10001\",\n    \"name\": \"Mount Tyrannas\"\n  }\n}\n```\n\n### `proxy.listen(hostname, callback)`\nStarts an HTTP server listening on `hostname`, using `callback` as the handler for the `listening` event\n(see [net.Server#listening](https://nodejs.org/api/net.html#net_event_listening)). If there was an error,\nit will be passed as the first parameter to `callback`.\n\nThis also modifies `/etc/hosts` to point `proxy.host` to `127.0.0.1`, which may fail without administrative\npermissions.\n\n### `proxy.close()`\nCloses the HTTP server and removes the entry from `/etc/hosts`.\n\n**This should be called on termination if `proxy.listen` is called.**\nOtherwise, the entry in the hosts file will remain, even though the SLS proxy server is no longer running.\nIt is not necessary to call this if `listen` errors, but there shouldn't be any harm in doing this step anyway.\n",
  "readmeFilename": "README.md",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/meishuu/tera-proxy-sls.git"
  },
  "version": "0.1.0"
}
