├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── MIT-License.txt ├── Makefile ├── README.md ├── TODO.md ├── bin └── nproxy ├── generate-certs-cmd └── generate-server-cert.sh ├── keys ├── ca.crt ├── ca.key ├── certificate.pem ├── privatekey.pem ├── server.crt └── server.key ├── lib ├── agent.js ├── cert.js ├── log.js ├── middlewares │ ├── forward.js │ ├── index.js │ ├── respond.js │ └── responders │ │ ├── combo.js │ │ ├── index.js │ │ ├── local-file.js │ │ └── web-file.js ├── nproxy.js └── utils.js ├── package.json ├── replace-rule.sample.js ├── start.js └── test ├── forward.js ├── hot-deploy.js ├── listen.js ├── mocha.opts ├── respond.js └── support ├── files ├── replaced │ ├── ar.css │ ├── bstar.css │ ├── c1.js │ ├── c2.js │ ├── c3.js │ ├── c4.js │ ├── hot-deploy.js │ ├── img │ │ └── avatar.jpg │ ├── js │ │ ├── he.js │ │ ├── hell.js │ │ ├── hello.js │ │ └── hello2.js │ └── ui │ │ └── re │ │ └── img │ │ ├── avatar.jpg │ │ └── avatar2.jpg └── web │ ├── a.css │ ├── b.css │ ├── ba.css │ ├── combine.js │ ├── combined.js │ └── hot-deploy.js ├── keys ├── certificate.pem └── privatekey.pem ├── replace-list.js ├── replace-list2.js ├── target-server.js └── util.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | *.DS_Store 3 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/.travis.yml -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /MIT-License.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/MIT-License.txt -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | test: 2 | ./node_modules/.bin/mocha 3 | 4 | .PHONY: test -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/README.md -------------------------------------------------------------------------------- /TODO.md: -------------------------------------------------------------------------------- 1 | #TODO 2 | 3 | -------------------------------------------------------------------------------- /bin/nproxy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/bin/nproxy -------------------------------------------------------------------------------- /generate-certs-cmd/generate-server-cert.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/generate-certs-cmd/generate-server-cert.sh -------------------------------------------------------------------------------- /keys/ca.crt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/keys/ca.crt -------------------------------------------------------------------------------- /keys/ca.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/keys/ca.key -------------------------------------------------------------------------------- /keys/certificate.pem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/keys/certificate.pem -------------------------------------------------------------------------------- /keys/privatekey.pem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/keys/privatekey.pem -------------------------------------------------------------------------------- /keys/server.crt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/keys/server.crt -------------------------------------------------------------------------------- /keys/server.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/keys/server.key -------------------------------------------------------------------------------- /lib/agent.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/lib/agent.js -------------------------------------------------------------------------------- /lib/cert.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/lib/cert.js -------------------------------------------------------------------------------- /lib/log.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/lib/log.js -------------------------------------------------------------------------------- /lib/middlewares/forward.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/lib/middlewares/forward.js -------------------------------------------------------------------------------- /lib/middlewares/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/lib/middlewares/index.js -------------------------------------------------------------------------------- /lib/middlewares/respond.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/lib/middlewares/respond.js -------------------------------------------------------------------------------- /lib/middlewares/responders/combo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/lib/middlewares/responders/combo.js -------------------------------------------------------------------------------- /lib/middlewares/responders/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/lib/middlewares/responders/index.js -------------------------------------------------------------------------------- /lib/middlewares/responders/local-file.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/lib/middlewares/responders/local-file.js -------------------------------------------------------------------------------- /lib/middlewares/responders/web-file.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/lib/middlewares/responders/web-file.js -------------------------------------------------------------------------------- /lib/nproxy.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/lib/nproxy.js -------------------------------------------------------------------------------- /lib/utils.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/lib/utils.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/package.json -------------------------------------------------------------------------------- /replace-rule.sample.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/replace-rule.sample.js -------------------------------------------------------------------------------- /start.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/start.js -------------------------------------------------------------------------------- /test/forward.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/test/forward.js -------------------------------------------------------------------------------- /test/hot-deploy.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/test/hot-deploy.js -------------------------------------------------------------------------------- /test/listen.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/test/listen.js -------------------------------------------------------------------------------- /test/mocha.opts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/test/mocha.opts -------------------------------------------------------------------------------- /test/respond.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/test/respond.js -------------------------------------------------------------------------------- /test/support/files/replaced/ar.css: -------------------------------------------------------------------------------- 1 | ar.css -------------------------------------------------------------------------------- /test/support/files/replaced/bstar.css: -------------------------------------------------------------------------------- 1 | bstar.css -------------------------------------------------------------------------------- /test/support/files/replaced/c1.js: -------------------------------------------------------------------------------- 1 | c1.js -------------------------------------------------------------------------------- /test/support/files/replaced/c2.js: -------------------------------------------------------------------------------- 1 | c2.js -------------------------------------------------------------------------------- /test/support/files/replaced/c3.js: -------------------------------------------------------------------------------- 1 | c3.js -------------------------------------------------------------------------------- /test/support/files/replaced/c4.js: -------------------------------------------------------------------------------- 1 | c4.js -------------------------------------------------------------------------------- /test/support/files/replaced/hot-deploy.js: -------------------------------------------------------------------------------- 1 | replaced-hot-deploy.js -------------------------------------------------------------------------------- /test/support/files/replaced/img/avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/test/support/files/replaced/img/avatar.jpg -------------------------------------------------------------------------------- /test/support/files/replaced/js/he.js: -------------------------------------------------------------------------------- 1 | he.js -------------------------------------------------------------------------------- /test/support/files/replaced/js/hell.js: -------------------------------------------------------------------------------- 1 | hell.js -------------------------------------------------------------------------------- /test/support/files/replaced/js/hello.js: -------------------------------------------------------------------------------- 1 | hello.js -------------------------------------------------------------------------------- /test/support/files/replaced/js/hello2.js: -------------------------------------------------------------------------------- 1 | hell2.js -------------------------------------------------------------------------------- /test/support/files/replaced/ui/re/img/avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/test/support/files/replaced/ui/re/img/avatar.jpg -------------------------------------------------------------------------------- /test/support/files/replaced/ui/re/img/avatar2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/test/support/files/replaced/ui/re/img/avatar2.jpg -------------------------------------------------------------------------------- /test/support/files/web/a.css: -------------------------------------------------------------------------------- 1 | a.css -------------------------------------------------------------------------------- /test/support/files/web/b.css: -------------------------------------------------------------------------------- 1 | b.css -------------------------------------------------------------------------------- /test/support/files/web/ba.css: -------------------------------------------------------------------------------- 1 | ba.css -------------------------------------------------------------------------------- /test/support/files/web/combine.js: -------------------------------------------------------------------------------- 1 | combined.js -------------------------------------------------------------------------------- /test/support/files/web/combined.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/support/files/web/hot-deploy.js: -------------------------------------------------------------------------------- 1 | hot-deploy.js -------------------------------------------------------------------------------- /test/support/keys/certificate.pem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/test/support/keys/certificate.pem -------------------------------------------------------------------------------- /test/support/keys/privatekey.pem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/test/support/keys/privatekey.pem -------------------------------------------------------------------------------- /test/support/replace-list.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/test/support/replace-list.js -------------------------------------------------------------------------------- /test/support/replace-list2.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/test/support/replace-list2.js -------------------------------------------------------------------------------- /test/support/target-server.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/test/support/target-server.js -------------------------------------------------------------------------------- /test/support/util.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goddyZhao/nproxy/HEAD/test/support/util.js --------------------------------------------------------------------------------