{"_id":"superman2","_rev":"34-1a15c5eaa6808d25026b5a2a823da40f","name":"superman2","description":"##Node based configurable proxy/router/'anything you want' project.","dist-tags":{"latest":"0.1.1"},"versions":{"0.0.1":{"name":"superman2","version":"0.0.1","private":false,"scripts":{"start":"node app.js"},"dependencies":{"express":"*","ejs":"*","stylus":"*","mongodb":"*","passport":"*","passport-http":"*","passport-local":"*","requirejs":"*","mongoose":"*","linq":"*","q":"*","jeet":"*","express.io":"*","tedious":"*","connect-busboy":"*","http-proxy":"*"},"engines":{"node":"1.10.x"},"Sili":{"initVersion":"0.0.26","currentVersion":"0.0.26"},"description":"##Node based configurable proxy/router/'anything you want' project.","_id":"superman2@0.0.1","dist":{"shasum":"a5b981ddb301eddbaab51cd3697885e8f56193d4","tarball":"https://registry.npmjs.org/superman2/-/superman2-0.0.1.tgz","integrity":"sha512-LSEx0tpLX8Zm26MOvT+quKbYgTE6O3+bwdBLXFuFrP2VRoFcKSYrHvF3x8gHb3PNqkH17GwZTyfjHPhPpWjOlA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJhju+k8vBFm638/W5zh2UmQFswfa5FoixrU4g4TTmvwIgCiJIDZizlNC4oR3H2e31UlS/qqSG5lFrbDJR33a6f/o="}]},"_from":".","_npmVersion":"1.3.10","_npmUser":{"name":"srfrnk","email":"srfrnk@gmail.com"},"maintainers":[{"name":"srfrnk","email":"srfrnk@gmail.com"}]},"0.0.2":{"name":"superman2","version":"0.0.2","private":false,"scripts":{"start":"node app.js"},"bin":{"superman":"app.js"},"dependencies":{"express":"*","ejs":"*","stylus":"*","mongodb":"*","passport":"*","passport-http":"*","passport-local":"*","requirejs":"*","mongoose":"*","linq":"*","q":"*","jeet":"*","express.io":"*","tedious":"*","connect-busboy":"*","http-proxy":"*"},"engines":{"node":"1.10.x"},"Sili":{"initVersion":"0.0.26","currentVersion":"0.0.26"},"description":"##Node based configurable proxy/router/'anything you want' project.","_id":"superman2@0.0.2","dist":{"shasum":"a3ae0e97209687b6da6656ad51fd6bcf7efc9bdc","tarball":"https://registry.npmjs.org/superman2/-/superman2-0.0.2.tgz","integrity":"sha512-A4Hz4DV0+OdAFo7XORpd/Ikjj4qNmcMXAmDdgH4Wqq/x54R0aqffx9BNYaBF371WdnHiGIOsAB21rmL1g/lV6Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/gOL4idEwcH97z1TOnSP++Is7XL1NrrBRDeQNgpHrSwIgYNc9VLQspLjOSQ1kd+j5vIqbp/3eFTFwrTbaGerdtMc="}]},"_from":".","_npmVersion":"1.3.10","_npmUser":{"name":"srfrnk","email":"srfrnk@gmail.com"},"maintainers":[{"name":"srfrnk","email":"srfrnk@gmail.com"}]},"0.0.3":{"name":"superman2","version":"0.0.3","private":false,"scripts":{"start":"node app.js"},"bin":{"superman":"app.js"},"dependencies":{"express":"*","ejs":"*","stylus":"*","mongodb":"*","passport":"*","passport-http":"*","passport-local":"*","requirejs":"*","mongoose":"*","linq":"*","q":"*","jeet":"*","express.io":"*","tedious":"*","connect-busboy":"*","http-proxy":"*"},"engines":{"node":"1.10.x"},"Sili":{"initVersion":"0.0.26","currentVersion":"0.0.26"},"repository":{"type":"git","url":"https://github.com/srfrnk/superman"},"description":"##Node based configurable proxy/router/'anything you want' project.","bugs":{"url":"https://github.com/srfrnk/superman/issues"},"_id":"superman2@0.0.3","dist":{"shasum":"a515d3992188997be2090f221208ab0e71dd915a","tarball":"https://registry.npmjs.org/superman2/-/superman2-0.0.3.tgz","integrity":"sha512-cwvqIFloEk161cSg27DpAxrfKriATpeW9SHz4cFiXhL5x7HH5YVvhrbrhDA8f+uYO7fPbcucVSoQTSi3XGWlvg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCmCqofxON2dGr33PORol0GEW9wdwW8tlvjYe9F+pQPCAIgZL8QPbAhvWx7RpT2NQHwl6jjXqDFAZHhDDG3U6pLhOM="}]},"_from":".","_npmVersion":"1.3.10","_npmUser":{"name":"srfrnk","email":"srfrnk@gmail.com"},"maintainers":[{"name":"srfrnk","email":"srfrnk@gmail.com"}]},"0.0.4":{"name":"superman2","version":"0.0.4","private":false,"scripts":{"start":"node app.js"},"bin":{"superman":"app.js"},"dependencies":{"express":"*","ejs":"*","stylus":"*","mongodb":"*","passport":"*","passport-http":"*","passport-local":"*","requirejs":"*","mongoose":"*","linq":"*","q":"*","jeet":"*","express.io":"*","tedious":"*","connect-busboy":"*","http-proxy":"*"},"engines":{"node":"1.10.x"},"Sili":{"initVersion":"0.0.26","currentVersion":"0.0.26"},"repository":{"type":"git","url":"https://github.com/srfrnk/superman"},"description":"##Node based configurable proxy/router/'anything you want' project.","bugs":{"url":"https://github.com/srfrnk/superman/issues"},"_id":"superman2@0.0.4","dist":{"shasum":"7ca560cd6a850fcc109ed0fda6dc26f747e48282","tarball":"https://registry.npmjs.org/superman2/-/superman2-0.0.4.tgz","integrity":"sha512-siZ87nnB3Gjtel3C4AstdlM9mYVd7FnY93YGmTYlkz1FU4z6oyHXbiSZJuNSydoRsgYpRzkRONazVy9J9P934Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDPq0mIuRQ/Mr27CnJ2Yur3aBG+r3iGXzsFWRKPmC67tAiBwHzgTKDOoESPRM8WOu/TvTOjZ66MlAqwjC8kKxS0jGQ=="}]},"_from":".","_npmVersion":"1.3.10","_npmUser":{"name":"srfrnk","email":"srfrnk@gmail.com"},"maintainers":[{"name":"srfrnk","email":"srfrnk@gmail.com"}]},"0.0.5":{"name":"superman2","version":"0.0.5","private":false,"scripts":{"start":"node app.js"},"bin":{"superman":"app.js"},"dependencies":{"express":"*","ejs":"*","stylus":"*","mongodb":"*","passport":"*","passport-http":"*","passport-local":"*","requirejs":"*","mongoose":"*","linq":"*","q":"*","jeet":"*","express.io":"*","tedious":"*","connect-busboy":"*","http-proxy":"*"},"engines":{"node":"1.10.x"},"Sili":{"initVersion":"0.0.26","currentVersion":"0.0.26"},"repository":{"type":"git","url":"https://github.com/srfrnk/superman"},"description":"##Node based configurable proxy/router/'anything you want' project.","bugs":{"url":"https://github.com/srfrnk/superman/issues"},"_id":"superman2@0.0.5","dist":{"shasum":"aaad7d547f9806c9148da01dbcbfa2c075aca2c5","tarball":"https://registry.npmjs.org/superman2/-/superman2-0.0.5.tgz","integrity":"sha512-j25rMDG2yVRVYF4bdwFBUAc7KIR3bcmpaXlGbJXfBncXGYUvZ0seeHD3H3TmJm7qTADfpVXyYB2qytgplpKuFg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGuHWGE2F/tmBsFSB/ELa5sdy5qmgqnrxs0QVhbjzPqxAiEA7ixx+pGMpA7QdERNaMP9WTj1xhrUKN83oNSogwYtWDw="}]},"_from":".","_npmVersion":"1.3.10","_npmUser":{"name":"srfrnk","email":"srfrnk@gmail.com"},"maintainers":[{"name":"srfrnk","email":"srfrnk@gmail.com"}]},"0.0.6":{"name":"superman2","version":"0.0.6","private":false,"scripts":{"start":"node app.js"},"bin":{"superman":"./app.js"},"dependencies":{"express":"*","ejs":"*","stylus":"*","mongodb":"*","passport":"*","passport-http":"*","passport-local":"*","requirejs":"*","mongoose":"*","linq":"*","q":"*","jeet":"*","express.io":"*","tedious":"*","connect-busboy":"*","http-proxy":"*"},"engines":{"node":"1.10.x"},"Sili":{"initVersion":"0.0.26","currentVersion":"0.0.26"},"repository":{"type":"git","url":"https://github.com/srfrnk/superman"},"description":"##Node based configurable proxy/router/'anything you want' project.","bugs":{"url":"https://github.com/srfrnk/superman/issues"},"_id":"superman2@0.0.6","dist":{"shasum":"7ff5815754f059d5700bc42aa8c7b87b897db2c5","tarball":"https://registry.npmjs.org/superman2/-/superman2-0.0.6.tgz","integrity":"sha512-yb4jb201lxFV1t1LnWW/czNEwLFCCI2+rC01My95ZRoxRKs9P1f5IHID7o0ccHRPkSLs8GgsoT6140vJKdF9uA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDBeAlxIMvcfTfWdgQblBNnp7BkLcUj0jwj5aVMEH+l9AIgOUewi6Tn4XPaMRUFvjGXnC4GIFctHblhwAs6838T4zw="}]},"_from":".","_npmVersion":"1.3.10","_npmUser":{"name":"srfrnk","email":"srfrnk@gmail.com"},"maintainers":[{"name":"srfrnk","email":"srfrnk@gmail.com"}]},"0.1.0":{"name":"superman2","version":"0.1.0","private":false,"scripts":{"start":"node app.js"},"bin":{"superman":"./app.js"},"dependencies":{"express":"*","ejs":"*","stylus":"*","mongodb":"*","passport":"*","passport-http":"*","passport-local":"*","requirejs":"*","mongoose":"*","linq":"*","q":"*","jeet":"*","express.io":"*","tedious":"*","connect-busboy":"*","http-proxy":"*"},"engines":{"node":"1.10.x"},"Sili":{"initVersion":"0.0.26","currentVersion":"0.0.26"},"repository":{"type":"git","url":"https://github.com/srfrnk/superman"},"description":"##Node based configurable proxy/router/'anything you want' project.","bugs":{"url":"https://github.com/srfrnk/superman/issues"},"_id":"superman2@0.1.0","dist":{"shasum":"8c072d7c989f4f8034bccbe92992747e8e6a43b7","tarball":"https://registry.npmjs.org/superman2/-/superman2-0.1.0.tgz","integrity":"sha512-L7fVcjIAGT0yDToVt6EIuzTyRTOd2aK8p0rp2wdVhUNA1JehaVgygdynOufwNgA15eU8TvLealjZFAGCqjyVeg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCRKyn+/2YXD2jHlWlByeZSm9VOVmkh/ZbnTqzsgekxxgIhAOJcsa4/8VyFXZRU6sFTAndiD0oW585HOPK4u1hG7Zgo"}]},"_from":".","_npmVersion":"1.3.10","_npmUser":{"name":"srfrnk","email":"srfrnk@gmail.com"},"maintainers":[{"name":"srfrnk","email":"srfrnk@gmail.com"}]},"0.1.1":{"name":"superman2","version":"0.1.1","private":false,"scripts":{"start":"node app.js"},"bin":{"superman":"./app.js"},"dependencies":{"express":"*","ejs":"*","stylus":"*","mongodb":"*","passport":"*","passport-http":"*","passport-local":"*","requirejs":"*","mongoose":"*","linq":"*","q":"*","jeet":"*","express.io":"*","tedious":"*","connect-busboy":"*","http-proxy":"*"},"engines":{"node":"1.10.x"},"Sili":{"initVersion":"0.0.26","currentVersion":"0.0.26"},"repository":{"type":"git","url":"https://github.com/srfrnk/superman"},"description":"##Node based configurable proxy/router/'anything you want' project.","bugs":{"url":"https://github.com/srfrnk/superman/issues"},"_id":"superman2@0.1.1","dist":{"shasum":"8311b79e94ff2fc02c2cc08d5bae4585807a5837","tarball":"https://registry.npmjs.org/superman2/-/superman2-0.1.1.tgz","integrity":"sha512-lqSjw/lcDK9M1ZU+tZrOekEiJ2TJRDcXUyqnf9sOFuPF8O+P8u2ztzSIzo6oT4ROZUJKTeLwoX83Pc0OgG/H0A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCIBJuJOnze74EERQkWGDt8QfUL+wjxAu2z6TMeLf0D0t3Ah8yBaLCsEKc1uGpBk38GlFIjfoD99w1G0PW8FOGzkNN"}]},"_from":".","_npmVersion":"1.3.10","_npmUser":{"name":"srfrnk","email":"srfrnk@gmail.com"},"maintainers":[{"name":"srfrnk","email":"srfrnk@gmail.com"}]}},"readme":"#Superman\n\n##Node based configurable proxy/router/'anything you want' project.\n\nIf you ...\n\n* Use hosts file manager to debug your web application...\n* Need to replace calls to remote servers from your client to debug your webapps.. e.g. replace a call for an image with a local image....\n* Want to log all request...\n* Need anything else a proxy can do...\n\n... Superman can help you.\n \nSuperman is a NodeJS proxy based on [node-http-proxy](https://github.com/nodejitsu/node-http-proxy) ... Nothing new about that part.\nSuperman adds the ability to configure what the proxy performs in three easy ways.\nIt is also very easily extensible so that any other needs you may have may be quickly added.\nSuperman can be configured in real-time. Most settings will be applicable from the very next server request.\n\nSuperman works with rules.\nA rule determines how the proxy should behave in response to a server request.\nEach rule has two important parts - a matcher and an action.\nA rule matcher determines which requests should be handled by the rule.\nA rule action determines what response should be applied when the rule is matched to a request.\n\nRules are ordered by their priority - higher priority means it's going to be matched first.\nRules can be active or inactive - inactive rules will not be matched.\nWhen a rule is matched by a request - no further rules will be matched, instead the rule is applied.\nA rule that is applied to a request will have it's action performed.\nIt is up to the action to have the response handled correctly.\n  \nThere are built-in matchers and built-in actions but it's very easy to construct new matchers and actions, add them and use them.\nMatchers and actions use generic and specific parameters within the rule to effect their performance.\nSee the API below for more info.\n\n### Documentation\n\n#### Installation\n$ npm install -g superman2\n\n#### Running\n$ superman\n\nSet your browser proxy settings to use localhost:#### as proxy for all calls except 'localhost'. #### being the proxy port superman is setup for. (default is 8000)\nUse the browser to configure superman by going to http://localhost:####/superman\n\nThree ways to configure Superman:\n* Settings file\n* Web interface\n* REPL interface\n\n#### Settings File\nThe **settings.json** file is at the root of the project dir.\nIt is loaded once at server startup - Changes to it will affect next run.\n\n#### Web Interface\nWhen superman is up it also serves as a web-server at the same port as the proxy - on localhost.\nTo access the configuration web-interface open your favorite chrome browser :-) to:\n*http://localhost:####/superman* - #### being the proxy port superman is setup for. (default is 8000)\n\nThe list of rules is displayed.\nIt can be reordered by D&D.\nRules can be deleted with the 'X' button.\nNew rules can be added at the top with the 'Add New...' button.\nThe 'Save' button applies changes to the server so they take affect immediately from next request.\nEach rule can be active/inactive.\nThe order of the rules determines the priority in which they are processed.\nNext to the active/inactive checkbox you can edit the rule description.\nBelow you can edit the rule matcher and the rules action.\nTry no to delete the last 'catch-all' rule... :)\n\n#### REPL Interface\nWhen Superman is run from console you will get a 'Superman >>' cmd prompt.\nYou have access to the 'sm' object which contains all of superman's configurable content.\nMost probably the 'sm.settings.rules' object is what you're going to use...\nAny changes will take affect immediately - at the next request and on.\n\n**The REPL offers great power over superman:**\n*With great power comes great responsibility*\n\n**Be careful not to mess the 'sm' object.... A superman restart will most likely be needed in such cases!**  \n\n### Rules\nA Rule object takes the following basic properties:\n- 'active' - bool - true to process the rule, false to ignore it.\n- 'priority' - int - determines order for processing rules, higher is first in order.     \n- 'matcher' - string - name of mather to use for the rule. See 'Matchers'\n- 'action' - string - name of action to use for the rule. See 'Actions'\n- 'description' - string - description of rule - will be added to logger output when rule is used.   \n- 'comment' - string - optional text to describe or add info about the rule. will not used by superman. purely for maintenance purposes.\n\n### Matchers\nA Matcher is a method to determine if a rule applies to a request.\nMatchers are put into the 'sm' ruleMatchers property. They can be added or deleted.\nMatchers are identified within the ruleMatchers object by name.\nEach matcher is a function of the form:\n\n*function(rule , req , proxyInfo)*\n\nWhere:\n- 'rule' - object - the rule object being matched.\n- 'req' - object - the ServerRequest object of the request being matched.\n- 'proxyInfo' - object - the 'sm' object containing all superman's configurable content (see 'REPL')\n\nThe function must return a boolean, true if the rule is matched by this matcher for this request, false if not.\n\nMatchers may define and use custom properties of the rule object.\nEach matcher may thus require setting of additional properties.\n\n**Current built-in matchers:**\n\n**\"url-string\"**  Matches requests where the url contains a string value. \n\nCustom properties:\n\n  'url' - string - a string to be searched within the request url.\n  \n  \n**\"url-regex\"**  Matches requests where the url matches a regular expression value. \n\nCustom properties:\n\n  'url' - string - a string containing a regex pattern to be matched against the request url.\n\n\n**\"match-all\"**  Matches all requests. This is usually for a catch-all rule. \n\nCustom properties:\n\n  None!\n  \n  \n### Actions\nAn Action is a method that performs actions and determines the response for the rule.\nActions are put into the 'sm' ruleActions property. They can be added or deleted.\nActions are identified within the ruleActions object by name.\nEach action is a function of the form:\n\n*function (rule , req , res , proxyInfo)*\n\nWhere:\n- 'rule' - object - the rule object.\n- 'req' - object - the ServerRequest object of the request.\n- 'res' - object - the ServerResponse object of the response.\n\n'proxyInfo' - object - the 'sm' object containing all superman's configurable content (see 'REPL')\n \nThe function must return a string, which will be put into the log as the description of the action that was performed by the rule.\n\nActions may define and use custom properties of the rule object.\nEach action may thus require setting of additional properties.\n\n**Current built-in actions:**\n\n**\"static-file\"**  Respond by streaming a static-file to the client. \n\nCustom properties:\n\n  'filePath' - string - a path to the file to stream, relative to the superman app dir. \n  \n  \n**\"localhost\"**  Proxy the request to a server on the localhost\n\nCustom properties:\n\n  'localPort' - int - the local port to proxy to. defaults to 80. \n  \n  \n**\"pass-through\"**  Proxy the request to the original target. effectively passes through superman, this is usually the action of the 'catch-all' rule.\n\nCustom properties:\n\n  None! \n  \n\nHopefully didn't forget anything...\nIf I did - or if you need any help.... drop in an issue on GitHub...\n\nEnjoy - and may the force be with you! \n","maintainers":[{"name":"srfrnk","email":"srfrnk@gmail.com"}],"time":{"modified":"2022-06-27T02:17:23.938Z","created":"2014-07-19T06:16:01.699Z","0.0.1":"2014-07-19T06:16:26.175Z","0.0.2":"2014-07-19T07:14:06.951Z","0.0.3":"2014-07-19T07:15:49.212Z","0.0.4":"2014-07-19T07:20:33.438Z","0.0.5":"2014-07-19T07:27:41.045Z","0.0.6":"2014-07-19T15:01:51.018Z","0.1.0":"2014-07-23T16:50:02.456Z","0.1.1":"2014-07-23T16:52:16.048Z"},"readmeFilename":"README.md","repository":{"type":"git","url":"https://github.com/srfrnk/superman"},"bugs":{"url":"https://github.com/srfrnk/superman/issues"}}