A Node.js script to reprovision a Streisand Instance to a new IP for GFW circumvention on Digital Ocean
- A running Streisand droplet deployed on Digital Ocean
- The initial droplet created by streisand should have a snapshot taken after creation. All new droplets created with Juke first check for a snapshot, and if that is not found then it uses the Droplet's
image_id
. - Droplet name should contain the string
streisand-
. I use the conventionstreisand-month-day-hour.minute
i.e.streisand-01-20-14.46
which is what Juke will use when recreating the droplet.
- The initial droplet created by streisand should have a snapshot taken after creation. All new droplets created with Juke first check for a snapshot, and if that is not found then it uses the Droplet's
- A Digital Ocean API token with read/write access
- (optional) A domain configured on Digital Ocean with an
A
record pointing at your Streisand droplet's IP
- NPM, Node installed at
node@>=6.0.0
- Checkout this repository and cd to dir:
git checkout git@github.com:nickolasclarke/juke.git && cd juke
- Install node dependencies:
npm install
- Run with
node juke.js
- If using an IP in your Shadowsocks client configuration, update it to reflect the new server's IP
- Currently only reconfigures the Shadowsocks service for use
- The https:// and tor:// gateways are also unavailble upon redeployment, which contains the client configuration details, mirrors, etc.
- Testing suite
- Refactor to use async/await
- Handle network failures gracefully
- Add automatic reconfiguration for other services besides Shadowsocks
make domain optional- add generic error handler for fatal and non fatal reporting