LastProxy
A wrapper provide yaml config for AnyProxy.
A fully configurable proxy in NodeJS, which can handle HTTPS requests perfectly.
Features
Easily config the following options (features) for AnyProxy via yml config.
urlReplace
Redirect url to another path
urlReplace: example.com: /help: /current/working/page /about: /current/working/page2
proxy
Reverse proxy for specified host or path
proxy: # proxy for domain example.com: 127.0.0.1 # proxy for specified path example.com /static: 127.0.0.1
localResponse
Map remote folder or file to local
localResponse: # localResponse exact url http://example.com/app.js: /local/path/to/debug.js # localResponse specified pattern example.com/static/**: /local/folder/to/static
interceptHttps
Intercept https for specified host
interceptHttps: www.example.com: true example2.com: true
cache
Disable cache by remove 'if-modified-since' and 'if-none-match' from request header
userAgent
allowOrigin
Add Access-Control-Allow-Origin header to response
configurable options
See allUsage
npm installcp config.yml.sample config.yml # You must have pm2 globally installed # With pm2 your proxy will restart automatically after script or config files changed npm start# or start via nodemon nodemon --ext "js,yml" index.js# or node index.js